This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2025-01-23 04:02:18 -07:00
42 changed files with 3823 additions and 1322 deletions

View File

@@ -199,7 +199,8 @@ Public Class ClsCompras
Optional CveOC As Integer = -1, Optional CveCajaChica As Integer = -1, Optional CvePersonal As Integer = -1, Optional NumeroReembolso As String = "-1", Optional CveProveedorSucursal As Integer = -1,
Optional AplicoPromocion As Boolean = False, Optional PorcentajeIVA As Decimal = 0, Optional CveMetodoPago As Integer = -1, Optional CveRetIVAConcepto As Integer = -1, Optional CveConceptoContableAlmacen As Integer = -1,
Optional CveRetISRConcepto As Integer = -1, Optional NoDeducible As Integer = 0, Optional CveTipoCompra As Integer = -1, Optional TotalOriginal As Decimal = 0, Optional CveTipoConcepto As Integer = 1, Optional CveFactura As Integer = -1,
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1, Optional DoctosRelacionados As String = "-1", Optional CveFolioGarantia As Integer = -1) As Boolean
Optional CveContrato As Integer = -1, Optional EsImportacion As Boolean = False, Optional CveSubProyecto As Integer = -1, Optional DoctosRelacionados As String = "-1", Optional CveFolioGarantia As Integer = -1,
Optional CveCompraRelacionada As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -255,6 +256,7 @@ Public Class ClsCompras
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@DoctosRelacionados", SqlDbType.VarChar).Value = DoctosRelacionados
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
.Add("@CveCompraRelacionada", SqlDbType.Int).Value = CveCompraRelacionada
End With
Try

View File

@@ -6311,7 +6311,7 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function UpdatePedidoDetalleCantidad(CveVentaDetalle As Integer, Cantidad As Decimal, Optional Opcion As Integer = 1) As Boolean
Public Function UpdatePedidoDetalleCantidad(CveVentaDetalle As Integer, Cantidad As Decimal, CveUsuario As Integer, Optional Opcion As Integer = 1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasDetalleCantidadUpdate")
@@ -6319,6 +6319,7 @@ Public Class ClsInventarios
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
.Add("@Cantidad", SqlDbType.Money).Value = Cantidad
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try

View File

@@ -9809,11 +9809,11 @@ Public Class ClsPaginas
Public Property SerieFolio As String = ""
Public Property ClienteNombre As String = ""
Public Property TC As Decimal = 1
Public Property Total As Decimal
Public Property IVA As Decimal
Public Property IEPS As Decimal
Public Property RetIVA As Decimal
Public Property RetISR As Decimal
Public Property Total As Decimal = 0
Public Property IVA As Decimal = 0
Public Property IEPS As Decimal = 0
Public Property RetIVA As Decimal = 0
Public Property RetISR As Decimal = 0
Public Property PorcentajeIVA As Decimal
Public Property CveSubProyecto As Integer
Public Property CveUsoCFDI As Integer

View File

@@ -7568,6 +7568,28 @@ Public Class ClsVentas
#End Region
Public Function GetRepVentasBiosistemas(CveEmpresa As Integer, Opcion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasBiosistemasGetRep")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Opcion", SqlDbType.Int).Value = Opcion
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region "IDisposable Support"

View File

@@ -1488,7 +1488,8 @@ Namespace Modelos
Optional CveSubProyecto As Integer = -1,
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1,
Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -1,
Optional CveVentaDetalleRemision As Integer = -1, Optional CveViajePasajero As Integer = -1, Optional RedondearTotal As Boolean = True) As Boolean
Optional CveVentaDetalleRemision As Integer = -1, Optional CveViajePasajero As Integer = -1, Optional RedondearTotal As Boolean = True,
Optional CvePromocionDetalle As Integer = -1) As Boolean
If Not CvePS > 0 Then
Alert("Ocurrió un error al cargar la información del producto a agregar. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgError)
@@ -1651,7 +1652,6 @@ Namespace Modelos
Row("IEPS") = Row("ImporteIEPS")
Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales)
Row("TipoDescuento") = -1
Row("CvePromocionDetalle") = -1
If RedondearTotal Then
Row("Total") = (Cantidad * PU).RoundSQL(NumeroDecimales)
@@ -1678,6 +1678,7 @@ Namespace Modelos
Row("CveVentaDetallePedido2") = -1
Row("CuentaPredial") = CuentaPredial
Row("EsCargo") = 0
Row("CvePromocionDetalle") = CvePromocionDetalle
If Me.DtDetalle.Columns.Contains("CveMarca") Then
Row("CveMarca") = DrPS("CveMarca")
@@ -2258,7 +2259,7 @@ Namespace Modelos
Row("PU").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Math.Round((Row("Total").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
Row("Obs").ToString, Row("Descuento").ToString.ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoIngreso").ToString.ToEntero,
TiempoEntrega:=Row("TiempoEntrega").ToString, CveVentaDetallePadre:=Row("CveVentaDetalle").ToString.ToEntero, CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero,
CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString}").ToEntero, -1),
CvePromocionDetalle:=Row("CvePromocionDetalle").ToString.ToEntero,
IEPS:=Row("ImporteIEPS").ToString.ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDecimal,
PorcentajeIEPS:=Row("PorcentajeIEPS").ToString.ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString.ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString.ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString,

View File

@@ -832,13 +832,13 @@ Public Class E141 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe
If ObjFactura.TipoDocto = "Cot" Then
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago = ObjClientes.CveFormaPago33
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33))
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33))
ObjFactura.CveFormaPago = ObjClientes.CveFormaPago
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago))
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago))
ObjFactura.CveMetodoPago = ObjClientes.CveMetodoPago33
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33))
ObjFactura.CveMetodoPago = ObjClientes.CveMetodoPago
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago))
ObjFactura.CveUsoCFDI = ObjClientes.CveUsoCFDI
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjClientes.CveUsoCFDI))

View File

@@ -326,13 +326,13 @@ Public Class E194 : Implements IHttpHandler, System.Web.SessionState.IRequiresSe
Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago33
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago33
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))

View File

@@ -314,13 +314,13 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago33
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago33
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))

View File

@@ -26,9 +26,7 @@
</li>
</ContentTemplate>
</asp:UpdatePanel>
<li>
<asp:HyperLink ID="HpLPrePoliza" NavigateUrl="#" runat="server" Visible="false" Style="color: #686868;"><i class="" style="color:#686868;"></i> Póliza</asp:HyperLink>
</li>
<asp:UpdatePanel ID="UppEliminarIE" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<li>
@@ -62,7 +60,12 @@
<li>
<asp:HyperLink ID="LnkEnviarMailPago" runat="server" Style="color: #686868;" Visible="false"><i class="fa fa-envelope" style="color: #686868;"></i> Envíar Comprobante Mail</asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="HpLPrePoliza" NavigateUrl="#" runat="server" Visible="false" Style="color: #686868;"><i class="" style="color:#686868;"></i>Ver Póliza</asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="LnkDescargaPoliza" Target="_blank" runat="server" Visible="false" Style="color: #686868;"> <i class="fa fa-print" style="color: #686868;"></i> Imprimir Póliza</asp:HyperLink>
</li>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<li>

View File

@@ -863,6 +863,8 @@ Partial Class Bancos_IE
ViewState("CvePrePoliza") = ObjIE.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero
HpLPrePoliza.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ViewState("CvePrePoliza"))
HpLPrePoliza.Visible = True
LnkDescargaPoliza.Visible = True
LnkDescargaPoliza.NavigateUrl = $"/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=PREPO&CvePrePoliza={0}", ViewState("CvePrePoliza")))}"
TxtFechaDocumento.Text = ObjIE.FechaDocumento.ToShortDateString
TxtFolio.Text = ObjIE.Folio
LblBeneficiario.Text = ObjIE.PagueseA

View File

@@ -28,7 +28,8 @@
<div class="row">
<label class="col-md-2 control-label">Movimiento:</label>
<div class="col-md-4">
<asp:DropDownList ID="DdlTipoTransanccionPrestamo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar">
<asp:DropDownList ID="DdlTipoTransanccionPrestamo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar"
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoTransanccionPrestamo_SelectedIndexChanged" >
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoTransaccionPrestamo" runat="server" ControlToValidate="DdlTipoTransanccionPrestamo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPrestamo"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceTipoTransancionPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccionPrestamo" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -71,6 +72,12 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo3" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendarioPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaPrestamo" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
OnInit="RVTxtFechaPrestamo_Init"
ControlToValidate="TxtFechaPrestamo" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">
@@ -155,7 +162,8 @@
<div class="row">
<label class="col-md-2 control-label">Movimiento:</label>
<div class="col-md-4">
<asp:DropDownList ID="DdlTipoTransaccion" Width="100%" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar">
<asp:DropDownList ID="DdlTipoTransaccion" Width="100%" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar"
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoTransaccion_SelectedIndexChanged" >
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -201,6 +209,12 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
OnInit="RVTxtFechaDocumento_Init"
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">

View File

@@ -12,7 +12,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{
#region "PROPIEDADES"
private int CveMonedaCuentaPago
{
get
@@ -36,7 +36,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
{
CveMonedaCuentaPago = 0;
rowComisiones.Visible = true;
@@ -53,18 +53,21 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
CargarCentrosDeCosto(null, null, null, LblSubProyecto);
LblSubProyecto2.Text = LblSubProyecto.Text;
ValidaFechaDocumentoDiasPosterioresPrestamo();
ValidaFechaDocumentoDiasPosteriores();
}
}
private void CargaSubproyectos()
{
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos( UsuarioActual.CveEmpresa);
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(UsuarioActual.CveEmpresa);
DdlSubProyecto.DataBind();
DdlSubProyecto.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlSubProyectoPago.DataSource = get_GlobalDTSubProyectos( UsuarioActual.CveEmpresa);
DdlSubProyectoPago.DataSource = get_GlobalDTSubProyectos(UsuarioActual.CveEmpresa);
DdlSubProyectoPago.DataBind();
DdlSubProyectoPago.Items.Insert(0, new ListItem("Seleccione", "-1"));
@@ -116,7 +119,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
CveMonedaCuentaPago = 0;
if (dr != null)
{
CveMonedaCuentaPago = dr["CveMoneda"].ToString().ToEntero();
CveMonedaCuentaPago = dr["CveMoneda"].ToString().ToEntero();
}
if (CveMonedaCuentaPago != 1)
@@ -144,8 +147,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
bancos.Dispose();
TxtFolio.Text = Folio.ToString();
TxtDDImporte.Attributes.Add("onblur",$"validaDeudoresDiversos({CveMonedaCuentaPago});FormatoMoneda(this);");
TxtDDImporte.Attributes.Add("onblur", $"validaDeudoresDiversos({CveMonedaCuentaPago});FormatoMoneda(this);");
UpDatos.Update();
}
@@ -231,7 +234,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{
decimal ImporteBanco = TxtImporte.Text.ToDecimal();
decimal ImporteMNBanco = ImporteBanco;
decimal ImporteComplementaria = 0;
decimal ImporteComplementaria = 0;
decimal TCPago = TxtTCPago.Text.ToDecimal();
string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
string Ref = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
@@ -243,14 +246,14 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (CveIE > 0)
{
decimal Importe;
decimal ImporteMN;
decimal ImporteComision;
decimal ImporteComisionMN;
decimal AcumImporteMN = 0;
decimal ImporteBancosMN, ImporteAcreedorMN;
bool TipoMovtoComision = false;
bool TipoMovtoComision = false;
int CveConceptoDiferenciaCambiaria = 0;
//GUARDA PREPOLIZAS DETALLE
@@ -262,7 +265,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
ImporteAcreedorMN = Importe;
ImporteBancosMN = Importe;
ImporteComisionMN = ImporteComision;
ImporteComplementaria = 0;
ImporteComplementaria = 0;
if (gvr.FCTextBox("TxtComision").Text.ToDecimal() < 0)
{
@@ -273,7 +276,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
else
{
TipoMovtoComision = false;
}
}
if (gvr.FCCheckBox("Chk").Checked)
{
@@ -308,7 +311,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
}
else if (CveMonedaPago == 2 && tCveMoneda == 2)
{
//ImporteComisionMN = ImporteComision;
//ImporteMN = Importe;
//ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
@@ -318,48 +321,48 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
//ImporteComplementaria = ImporteComplementaria.RoundSQL();
ImporteComisionMN = ImporteComisionMN.RoundSQL();
ImporteComision = ImporteComision.RoundSQL();
AcumImporteMN += ImporteMN;
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, ImporteMN, CveConceptoContablePago, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
AcumImporteMN += ImporteMN;
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, ImporteMN, CveConceptoContablePago, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de pago acreedor";
break;
}
}
if (tCveMoneda > 1 && MsgError == "")
{
ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, ImporteComplementaria, CveConceptoContablePrestamoComplementario, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, ImporteComplementaria, CveConceptoContablePrestamoComplementario, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
MsgError = "No se pudo insertar concepto de acreedor complementaria";
}
if (ImporteBancosMN != ImporteAcreedorMN && MsgError == "")
{
bool TipoMovto = false;
if (ImporteBancosMN != ImporteAcreedorMN && MsgError == "")
{
bool TipoMovto = false;
if (TCPago > TC)
{
CveConceptoDiferenciaCambiaria = 65;
TipoMovto = false;
TipoMovto = false;
}
else if (TCPago < TC)
{
CveConceptoDiferenciaCambiaria = 64;
TipoMovto = true;
}
Importe = ((Importe * TCPago) - (Importe * TC)).Abs();
Importe = ((Importe * TCPago) - (Importe * TC)).Abs();
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Importe, CveConceptoDiferenciaCambiaria, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteME: Importe, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Importe, CveConceptoDiferenciaCambiaria, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteME: Importe, CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
MsgError = "No se pudo insertar concepto de diferencia cambiaria";
}
if (ImporteComision != 0 && MsgError == "" && DdlOtrosPagos.SelectedValue == "2" )
if (ImporteComision != 0 && MsgError == "" && DdlOtrosPagos.SelectedValue == "2")
{
ImporteComisionMN = (ImporteComision * TCPago).RoundSQL();
int tTipoConceptoOtro = 255;
//if (DdlOtrosPagos.SelectedValue == "3") tTipoConceptoOtro = 43; //deudores diversos
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, ImporteComisionMN, tTipoConceptoOtro, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(),CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, ImporteComisionMN, tTipoConceptoOtro, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TC, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de pago acreedor";
break;
@@ -389,30 +392,30 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
//CveMonedaPago
ImporteComision = ImporteComision.RoundSQL();
ImporteComisionMN = (ImporteComision * TCPago).RoundSQL() ;
ImporteComisionMN = (ImporteComision * TCPago).RoundSQL();
ImporteComisionMN = (ImporteComision * TCPago).RoundSQL();
int tTipoConceptoOtro = 43; //deudores diversos
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoComision, ImporteComision, ImporteComisionMN, tTipoConceptoOtro, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de pago acreedor";
MsgError = "No se pudo insertar concepto de pago acreedor";
}
}
if (CveMonedaPago != 1)
{
ImporteComplementaria = (ImporteBanco * TCPago - ImporteBanco).RoundSQL();
{
ImporteComplementaria = (ImporteBanco * TCPago - ImporteBanco).RoundSQL();
}
if (MsgError == "" && !ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, ImporteBanco, 30, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(),ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos";
if (MsgError == "" && !ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, ImporteBanco, 30, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos";
//movimiento de ajuste por sino se aplicó en el proceso anterior
if (MsgError == "" && CveMonedaPago != 1 )
if (MsgError == "" && CveMonedaPago != 1)
{
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, ImporteComplementaria, 204, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos complementaria";
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, ImporteBanco, ImporteComplementaria, 204, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), ImporteME: ImporteBanco, TipoCambio: TCPago, TipoCambioPago: TCPago, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero())) MsgError = "No se pudo insertar concepto de bancos complementaria";
}
}
else
@@ -426,15 +429,15 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
}
//VALIDA QUE CUADRE LA PREPOLIZA
Usuario UA = UsuarioActual;
if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA,Opcion:5))
Usuario UA = UsuarioActual;
if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 5))
{
if (ObjMov.ValorPolizaDescuadre > 0)
{
MsgError = ObjMov.MensajePolizaDescuadre;
ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas");
}
}
}
if (MsgError.Equals(""))
{
@@ -445,10 +448,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
}
//GUARDA COMPROBANTE
if (!filemove.Equals(""))
{
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
}
if (!filemove.Equals(""))
{
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
}
System.IO.FileInfo archivo = null;
if (DdlTipoTransaccion.SelectedValue.ToEntero().Contiene(2, 8, 9))
@@ -481,10 +484,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
//{
// Msg.AppendFormat(@"<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza);
//}
Msg.AppendFormat(@"<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Ver Póliza</a><br/>", CvePrePoliza);
Msg.AppendFormat($"<a class='Texto' target='_blank' href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}'>Imprimir</a>");
}
else
{
@@ -542,8 +545,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
}
private void AsignaCuentaProveedor(int CveProveedor)
{
{
}
protected void BtnGuardarPrestamo_Click(object sender, EventArgs e)
@@ -597,8 +600,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (CveMoneda != 1)
{
ImporteMN = Importe;
ImporteComplementaria = Importe * TC - Importe;
ImporteMN = Importe;
ImporteComplementaria = Importe * TC - Importe;
}
@@ -611,7 +614,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, ImporteMN,CveConceptoContableBanco, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, ImporteMN, CveConceptoContableBanco, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de bancos";
}
@@ -619,23 +622,23 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (CveMoneda != 1)
{
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, CveConceptoContablePrestamo, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, CveConceptoContablePrestamo, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de acreedor";
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, ImporteComplementaria, CveConceptoContableBancoComplementario, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, Importe, ImporteComplementaria, CveConceptoContableBancoComplementario, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de bancos complementaria";
}
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteComplementaria, CveConceptoContablePrestamoComplementario, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteComplementaria, CveConceptoContablePrestamoComplementario, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: Importe, TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de acreedor complementaria";
}
}
else
{
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, CveConceptoContablePrestamo, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, CveConceptoContablePrestamo, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: TC, TipoCambioPago: TC, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
{
MsgError = "No se pudo insertar concepto de acreedor";
}
@@ -653,14 +656,14 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
//VALIDA QUE CUADRE LA POLIZA
Usuario UA = UsuarioActual;
if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 5))
if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 5))
{
if (ObjMov.ValorPolizaDescuadre > 0)
{
MsgError = ObjMov.MensajePolizaDescuadre;
ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas");
}
}
}
if (MsgError.Equals(""))
{
@@ -808,7 +811,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
divDD.Visible = false;
if (DdlOtrosPagos.SelectedValue == "2")
{
TxtOtrosImportes.Visible = true;
TxtOtrosImportes.Visible = true;
TxtTotal.Visible = true;
GvMovAcreedor.Columns[8].Visible = true;
TxtOtrosImportes.Text = "";
@@ -818,14 +821,14 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
else
{
if (DdlOtrosPagos.SelectedValue == "3")
{
{
TxtDDImporte.Text = "";
divDD.Visible = true;
RegistraScript($"$get('TxtImporte').value = FormatoNumero(SumaValores({CveMonedaCuentaPago}), 2);");
}
}
TxtOtrosImportes.Visible = false;
TxtTotal.Visible = false;
GvMovAcreedor.Columns[8].Visible = false;
GvMovAcreedor.Columns[8].Visible = false;
}
UpDatos.Update();
UpMovAcreedor.Update();
@@ -835,4 +838,93 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{
CargaReporte();
}
protected void DdlTipoTransaccion_SelectedIndexChanged(object sender, EventArgs e)
{
ValidaFechaDocumentoDiasPosteriores();
}
protected void RVTxtFechaDocumento_Init(object sender, EventArgs e)
{
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString();
RVTxtFechaDocumento.MinimumValue = NowADS().AddMonths(-38).ToShortDateString();
Calendario.EndDate = NowADS().AddDays(2);
}
private void ValidaFechaDocumentoDiasPosteriores()
{
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString();
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual";
Calendario.EndDate = NowADS().AddDays(3);
// Equivalente a: If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then
// Suponiendo que "Contiene" verifique si SelectedValue es "1" o "16"
if (DdlTipoTransaccion.SelectedValue == "1" || DdlTipoTransaccion.SelectedValue == "16")
{
// cheques, 3 meses
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString();
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual";
Calendario.EndDate = NowADS().AddMonths(3);
}
// transfer, 3 semanas
if (DdlTipoTransaccion.SelectedValue == "2")
{
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString();
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual";
Calendario.EndDate = NowADS().AddDays(21);
}
UpDatos.Update();
//UpGuardar.Update();
}
protected void DdlTipoTransanccionPrestamo_SelectedIndexChanged(object sender, EventArgs e)
{
ValidaFechaDocumentoDiasPosterioresPrestamo();
}
protected void RVTxtFechaPrestamo_Init(object sender, EventArgs e)
{
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(2).ToShortDateString();
RVTxtFechaPrestamo.MinimumValue = NowADS().AddMonths(-38).ToShortDateString();
CalendarioPrestamo.EndDate = NowADS().AddDays(2);
}
private void ValidaFechaDocumentoDiasPosterioresPrestamo()
{
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(3).ToShortDateString();
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual";
CalendarioPrestamo.EndDate = NowADS().AddDays(3);
// Equivalente a: If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then
// Suponiendo que "Contiene" verifique si SelectedValue es "1" o "16"
if (DdlTipoTransanccionPrestamo.SelectedValue == "1" || DdlTipoTransanccionPrestamo.SelectedValue == "16")
{
// cheques, 3 meses
RVTxtFechaPrestamo.MaximumValue = NowADS().AddMonths(3).ToShortDateString();
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual";
CalendarioPrestamo.EndDate = NowADS().AddMonths(3);
}
// transfer, 3 semanas
if (DdlTipoTransanccionPrestamo.SelectedValue == "2")
{
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(21).ToShortDateString();
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual";
CalendarioPrestamo.EndDate = NowADS().AddDays(21);
}
UpPrestamo.Update();
}
}

View File

@@ -42,7 +42,8 @@
<label>Tipo Movimiento:</label>
</div>
<div class="col-md-8">
<asp:DropDownList ID="DdlTipoTransaccionPrestamo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar">
<asp:DropDownList ID="DdlTipoTransaccionPrestamo" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar"
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoTransaccionPrestamo_SelectedIndexChanged" >
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoTransaccionPrestamo" runat="server" ControlToValidate="DdlTipoTransaccionPrestamo" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardarPrestamo"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceTipoTransancionPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccionPrestamo" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -95,6 +96,12 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaPrestamo3" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendarioPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaPrestamo" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
OnInit="RVTxtFechaPrestamo_Init"
ControlToValidate="TxtFechaPrestamo" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaPrestamo" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
@@ -209,7 +216,8 @@
<label>Tipo Movimiento:</label>
</div>
<div class="col-md-8">
<asp:DropDownList ID="DdlTipoTransaccion" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar">
<asp:DropDownList ID="DdlTipoTransaccion" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar"
AutoPostBack="true" OnSelectedIndexChanged="DdlTipoTransaccion_SelectedIndexChanged" >
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -263,6 +271,12 @@
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
OnInit="RVTxtFechaDocumento_Init"
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>

View File

@@ -56,6 +56,9 @@ public partial class Bancos_PagoDeudor : ClsPaginas
TxtImporte.Attributes.Add("disabled", "disabled");
CargarCentrosDeCosto(null, null, null, LblSubProyecto);
LblSubProyecto2.Text = LblSubProyecto.Text;
ValidaFechaDocumentoDiasPosterioresPrestamo();
ValidaFechaDocumentoDiasPosteriores();
}
}
@@ -372,6 +375,48 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (ObjComp != null)
ObjComp.Dispose();
}
protected void DdlTipoTransaccionPrestamo_SelectedIndexChanged(object sender, EventArgs e)
{
ValidaFechaDocumentoDiasPosterioresPrestamo();
}
protected void RVTxtFechaPrestamo_Init(object sender, EventArgs e)
{
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(2).ToShortDateString();
RVTxtFechaPrestamo.MinimumValue = NowADS().AddMonths(-38).ToShortDateString();
CalendarioPrestamo.EndDate = NowADS().AddDays(2);
}
private void ValidaFechaDocumentoDiasPosterioresPrestamo()
{
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(3).ToShortDateString();
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual";
CalendarioPrestamo.EndDate = NowADS().AddDays(3);
// Equivalente a: If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then
// Suponiendo que "Contiene" verifique si SelectedValue es "1" o "16"
if (DdlTipoTransaccionPrestamo.SelectedValue == "1" || DdlTipoTransaccionPrestamo.SelectedValue == "16")
{
// cheques, 3 meses
RVTxtFechaPrestamo.MaximumValue = NowADS().AddMonths(3).ToShortDateString();
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual";
CalendarioPrestamo.EndDate = NowADS().AddMonths(3);
}
// transfer, 3 semanas
if (DdlTipoTransaccionPrestamo.SelectedValue == "2")
{
RVTxtFechaPrestamo.MaximumValue = NowADS().AddDays(21).ToShortDateString();
RVTxtFechaPrestamo.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual";
CalendarioPrestamo.EndDate = NowADS().AddDays(21);
}
UpPrestamo.Update();
//UpGuardar.Update();
}
#endregion
#region "PAGO DEUDORES"
@@ -830,4 +875,52 @@ public partial class Bancos_PagoDeudor : ClsPaginas
TxtFechaDocumento.Attributes.Remove("onchange");
DivImporteME.Visible = false;
}
protected void DdlTipoTransaccion_SelectedIndexChanged(object sender, EventArgs e)
{
ValidaFechaDocumentoDiasPosteriores();
}
protected void RVTxtFechaDocumento_Init(object sender, EventArgs e)
{
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString();
RVTxtFechaDocumento.MinimumValue = NowADS().AddMonths(-38).ToShortDateString();
Calendario.EndDate = NowADS().AddDays(2);
}
private void ValidaFechaDocumentoDiasPosteriores()
{
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString();
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 días de la fecha actual";
Calendario.EndDate = NowADS().AddDays(3);
// Equivalente a: If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then
// Suponiendo que "Contiene" verifique si SelectedValue es "1" o "16"
if (DdlTipoTransaccion.SelectedValue == "1" || DdlTipoTransaccion.SelectedValue == "16")
{
// cheques, 3 meses
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString();
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual";
Calendario.EndDate = NowADS().AddMonths(3);
}
// transfer, 3 semanas
if (DdlTipoTransaccion.SelectedValue == "2")
{
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString();
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual";
Calendario.EndDate = NowADS().AddDays(21);
}
UpMovDeudor.Update();
//UpGuardar.Update();
}
}

View File

@@ -105,15 +105,16 @@
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendario" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
<ajax:MaskedEditValidator ID="MEVCalendario" runat="server" ControlExtender="MEEFecha" ControlToValidate="TxtFechaDocumento" Display="None" IsValidEmpty="False" MaximumValueMessage="Fecha Excedida" ErrorMessage="*" InvalidValueMessage="Fecha Invalida" InvalidValueBlurredMessage="b" MinimumValueMessage="Fecha Menor a la permitida" Enabled="False" ValidationGroup="GrpGuardar"></ajax:MaskedEditValidator>
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha Documento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha Documento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha Documento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 días de la fecha actual"
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaDocumentoMenor" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento está fuera de lo permitido" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento4" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumentoMenor" Width="350px"></ajax:ValidatorCalloutExtender>
<%--<asp:RangeValidator ID="RVTxtFechaDocumentoMenor" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento está fuera de lo permitido" ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento4" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumentoMenor" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div>
</div>
@@ -341,10 +342,10 @@
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
<asp:CheckBox Text=" No Validar ante SAT" ID="ChkNoValidaSAT" CssClass="md-checksd" runat="server" Checked="false" Visible="false" />
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
<asp:CheckBox Text="Descuento Masivo" ID="chkaplicaDescuentoMasivo" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuentoMasivo_CheckedChanged" AutoPostBack="true" Visible="false" />
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
<asp:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" />
<asp:CheckBox Text="Generar Remisión" ID="ChkGeneraRNC" CssClass="md-checksd" runat="server" Checked="false" Visible="false" />
</td>
</tr>
@@ -608,14 +609,27 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript" language="javascript">
var Facturas = '';
var RNCAutocheck = true;
function FnSuma(t, txt, importe) {
function FnSuma(t, txt, importe, idTxtDescuento) {
var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares");
if (t.checked) {
txt.value = FormatoNumero(importe, 2);
let txtDescuento = $("#" + idTxtDescuento)
if (typeof txtDescuento.val() === "string"){
let descuentoValue = $("#" + idTxtDescuento).val().trim();
if (descuentoValue.length > 0) {
calculaDescuentoEscalonado(importe, idTxtDescuento, txt, t, 'El Importe no debe de exceder el saldo',1);
}
}
} else {
txt.value = "";
}
@@ -644,46 +658,50 @@
if (textBoxes[i].id.indexOf('C_GvCxP_TxtAbonar') >= 0) {
if (textBoxes[i].value != '') {
idd = textBoxes[i].id.replace('C_GvCxP_TxtAbonar_', '');
Facturas = Facturas + (Importe == 0 ? '' : ', ') + $get("C_GvCxP_HplF_" + idd).innerText;
let importeFactura = 0;
let chk = $('#C_GvCxP_Chk_'+idd) //C_GvCxP_Chk_
if(chk.is(':checked')){
Facturas = Facturas + (Importe == 0 ? '' : ', ') + $get("C_GvCxP_HplF_" + idd).innerText;
let importeFactura = 0;
if (cveMonedaPago == 0) {
if (aplicaTC && $get('TxtTC') != null) {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
} else {
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
}
} else {
let cveMonedaCompra = textBoxes[i].getAttribute("cvemoneda");
if (cveMonedaPago == 0) {
if (aplicaTC && $get('TxtTC') != null) {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
} else {
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
}
} else {
let cveMonedaCompra = textBoxes[i].getAttribute("cvemoneda");
switch (cveMonedaPago) {
case 1: //PAGO CON PESOS
switch (cveMonedaPago) {
case 1: //PAGO CON PESOS
//SI SON DOLARES MULTIPLICAR POR TC
if (cveMonedaCompra == '2') {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
//MISMA MONEDA DEBE SOLO SUMAR
} else if (cveMonedaCompra == '1') {
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
}
break;
case 2: //PAGO CON DOLARES
//SI SON DOLARES MULTIPLICAR POR TC
if (cveMonedaCompra == '2') {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
//MISMA MONEDA DEBE SOLO SUMAR
} else if (cveMonedaCompra == '1') {
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
}
break;
case 2: //PAGO CON DOLARES
//MISMA MONEDA DEBE SOLO SUMAR
if (cveMonedaCompra == '2') {
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
//SI SON PESOS DIVIDIR ENTRE EL TC
} else if (cveMonedaCompra == '1') {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) / parseFloat($get('TxtTC').value), 2).split(',').join(''));
}
break;
if (cveMonedaCompra == '2') {
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
//SI SON PESOS DIVIDIR ENTRE EL TC
} else if (cveMonedaCompra == '1') {
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) / parseFloat($get('TxtTC').value), 2).split(',').join(''));
}
break;
}
}
}
Importe = parseFloat(Importe) + importeFactura;
Importe = parseFloat(Importe) + importeFactura;
}
}
}
if (textBoxes[i].id.indexOf('C_GvCxP_TxtComision') >= 0) {
@@ -714,12 +732,14 @@
}
function FnCambia(chk, txt, saldo, op, text, Tipo) {
debugger;
var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares");
if (op == 1) {
if (txt.value != '') {
chk.checked = true;
if( RNCAutocheck){
chk.checked = true;
}
} else {
chk.checked = false;
}
@@ -831,7 +851,7 @@
var TipoCambioActual = 0.0;
function CambiaTC(txt) {
debugger;
//let TipoCambioTxt = ToDouble(txt.value)
//if (TipoCambioActual != TipoCambioTxt) {
$get("BtnCambiaTipoMoneda").click();
@@ -839,8 +859,8 @@
//}
}
function calculaDescuentoEscalonado(saldo, TxtDescuento, TxtAbonar, chk, Text, Tipo) {
let idTxtDescuento = TxtDescuento.id;
function calculaDescuentoEscalonado(saldo, idTxtDescuento, TxtAbonar, chk, Text, Tipo) {
//let idTxtDescuento = TxtDescuento.id;
let idTxtAbonar = TxtAbonar.id;
let descuentoValue = $("#" + idTxtDescuento).val().trim();
@@ -870,6 +890,8 @@
function DescuenoMasivo(txt) {
RNCAutocheck = false;
$(".selDescuento").val(txt.value);
$(".selDescuento").trigger("keyup");
}

File diff suppressed because it is too large Load Diff

View File

@@ -82,6 +82,13 @@
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:RangeValidator ID="RVTxtFechaDocumento" runat="server" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior 2 d<>as de la fecha actual"
ControlToValidate="TxtFechaDocumento" MinimumValue="01/01/1900" Type="Date" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento3" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</td>
</tr>

View File

@@ -78,6 +78,7 @@ Partial Class Bancos_Transferencias
DdlTipoMovto_SelectedIndexChanged(Nothing, Nothing)
End If
End Sub
@@ -616,6 +617,9 @@ Partial Class Bancos_Transferencias
RFVTxtPaguese.Visible = True
End If
End If
ValidaFechaDocumentoDiasPosteriores()
UPPDatos.Update()
End Sub
@@ -662,4 +666,36 @@ Partial Class Bancos_Transferencias
DdlCajaChica.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub
Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(2).ToShortDateString
RVTxtFechaDocumento.MinimumValue = NowADS().AddMonths(-38).ToShortDateString
Calendario.EndDate = NowADS().AddDays(2)
End Sub
Private Sub ValidaFechaDocumentoDiasPosteriores()
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(3).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 d<>as de la fecha actual"
Calendario.EndDate = NowADS().AddDays(3)
If DdlTipoMovto.SelectedValue.Contiene("1", "16") Then 'cheques, 3meses
RVTxtFechaDocumento.MaximumValue = NowADS().AddMonths(3).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 meses de la fecha actual"
Calendario.EndDate = NowADS().AddMonths(3)
End If
If DdlTipoMovto.SelectedValue = "2" Then 'transfer, 3semanas
RVTxtFechaDocumento.MaximumValue = NowADS().AddDays(21).ToShortDateString
RVTxtFechaDocumento.ErrorMessage = "<b><span style='text-decoration: underline'>ERROR:</span></b> <br/> La fecha del documento no puede ser superior a 3 semanas de la fecha actual"
Calendario.EndDate = NowADS().AddDays(21)
End If
UPPDatos.Update()
'UpGuardar.Update()
End Sub
End Class

View File

@@ -22517,15 +22517,15 @@ Partial Class Compras_Compras
nRow("CveSubProyecto") = CveSubProyecto
nRow("SubProyecto") = SubProyecto
If CveFactura > 0 Then
nRow("IVA") = ivaParcial.RoundSQL(4)
nRow("RetIVA") = retIvaParcial.RoundSQL(4)
nRow("RetISR") = retIsrParcial.RoundSQL(4)
Else
nRow("IVA") = (ivaParcial / subtotalParcial).RoundSQL(4)
nRow("RetIVA") = (retIvaParcial / subtotalParcial).RoundSQL(4)
nRow("RetISR") = (retIsrParcial / subtotalParcial).RoundSQL(4)
End If
'If CveFactura > 0 Then
' nRow("IVA") = ivaParcial.RoundSQL(4)
' nRow("RetIVA") = retIvaParcial.RoundSQL(4)
' nRow("RetISR") = retIsrParcial.RoundSQL(4)
'Else
nRow("IVA") = (ivaParcial / subtotalParcial).RoundSQL(4)
nRow("RetIVA") = (retIvaParcial / subtotalParcial).RoundSQL(4)
nRow("RetISR") = (retIsrParcial / subtotalParcial).RoundSQL(4)
'End If
nRow("SubTotal") = subtotalParcial.RoundSQL(4)

View File

@@ -2469,8 +2469,22 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim objconta3 As New ClsContabilidad
objconta3.GetConta_CuentasDataContabilidad(CveCuentaExcel, UsuarioActual.CveEmpresa)
If objconta3.DtResultados.Rows.Count > 0 Then
Dim rowcc As DataRow = objconta3.DtResultados.Rows(0)
CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
'si solo hay una cuenta asignada, toma el primero
If objconta3.DtResultados.Rows.Count = 1 Then
Dim rowcc As DataRow = objconta3.DtResultados.Rows(0)
CveBancoCuenta = rowcc("CveBancoCuenta").ToString.ToEntero()
Else
CveBancoCuenta = objconta3.DtResultados.Rows(0)("CveBancoCuenta").ToString.ToEntero() 'toma el primero sino hay del tipo cheque
'casos que tienen la misma cuenta, que primero tome las cuentas de tipo cheque, y luego las demás
Dim dttC As DataTable = GlobalDTBancosCuentasGral(UsuarioActual.CveEmpresa, Estatus:=-1)
For Each drcta As DataRow In objconta3.DtResultados.Rows
Dim tCveTipoCuentas As Integer = dttC.FiltroPrimeroValor("CveTipoCuenta", $"CveCuenta= {drcta("CveBancoCuenta")}").ToEntero
If tCveTipoCuentas = 2 Then 'tipo cheques
CveBancoCuenta = drcta("CveBancoCuenta").ToString.ToEntero()
Exit For
End If
Next
End If
Else
CveBancoCuenta = 0
End If

View File

@@ -539,13 +539,13 @@ Partial Class Contratos_FacturacionMasiva
'Dim ObjCliente As New ClsClientes()
'If ObjCliente.GetClientes(DR("CveCliente").ToString.ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
' If ObjCliente.DtResultados.Rows.Count > 0 Then
' ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33
' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
' ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
' ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
' ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")

File diff suppressed because it is too large Load Diff

View File

@@ -4677,7 +4677,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim CveVentaDetalle As Integer = Dr("CveVentaDetalle").ToString().ToEntero()
Dim Cantidad As Decimal = Dr("Cantidad").ToString().ToDecimal
If CveVentaDetalle > 0 Then
If Not ObjInventario.UpdatePedidoDetalleCantidad(CveVentaDetalle, Cantidad) Then
If Not ObjInventario.UpdatePedidoDetalleCantidad(CveVentaDetalle, Cantidad, UsuarioActual.CveUsuario) Then
Respuesta = False
Exit For
End If

View File

@@ -372,29 +372,29 @@ Partial Class Inventarios_RecepcionDevolucion
Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
Me.ObjRemisionNC.CveFormaPago = ObjCliente.CveFormaPago33
'Me.ObjRemisionNC.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
'Me.ObjRemisionNC.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
Me.ObjRemisionNC.CveFormaPago = ObjCliente.CveFormaPago
'Me.ObjRemisionNC.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
'Me.ObjRemisionNC.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago33
'Me.ObjRemisionNC.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
'Me.ObjRemisionNC.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago
'Me.ObjRemisionNC.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
'Me.ObjRemisionNC.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
Me.ObjRemisionNC.CveUsoCFDI = ObjCliente.CveUsoCFDI
'Me.ObjRemisionNC.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
'Me.ObjRemisionNC.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago33
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago
If GlobalDTVtaMetodoPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)).Rows.Count > 0 Then
Me.ObjRemisionNC.MetodoPago = GlobalDTVtaMetodoPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)).Rows(0)("MetodoPago").ToString
If GlobalDTVtaMetodoPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then
Me.ObjRemisionNC.MetodoPago = GlobalDTVtaMetodoPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString
Else
Me.ObjRemisionNC.CveMetodoPago = 1
Me.ObjRemisionNC.MetodoPago = "Efectivo"
End If
If UsuarioActual.CveEmpresa = 119 Then
Me.ObjRemisionNC.CveFormaPago = 20 'POR DEFINIR AND (@CveMetodoPago33 = 3 AND @CveFormaPago33 <> 20)
Me.ObjRemisionNC.CveFormaPago = 20 'POR DEFINIR AND (@CveMetodoPago = 3 AND @CveFormaPago33 <> 20)
If Me.ObjRemisionNC.CveMetodoPago = 3 Then
Me.ObjRemisionNC.CveFormaPago = 20
End If

View File

@@ -2455,22 +2455,22 @@ Partial Class Inventarios_RecepcionUsados
Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
Me.ObjRemisionNC.CveFormaPago = ObjCliente.CveFormaPago33
'Me.ObjRemisionNC.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
'Me.ObjRemisionNC.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33))
Me.ObjRemisionNC.CveFormaPago = ObjCliente.CveFormaPago
'Me.ObjRemisionNC.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
'Me.ObjRemisionNC.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago33
'Me.ObjRemisionNC.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
'Me.ObjRemisionNC.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago
'Me.ObjRemisionNC.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
'Me.ObjRemisionNC.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
Me.ObjRemisionNC.CveUsoCFDI = ObjCliente.CveUsoCFDI
'Me.ObjRemisionNC.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
'me.ObjRemisionNC.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago33
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago
'If GlobalDTMetodosPago IsNot Nothing Then
' Dim DtMetodoPago As DataTable = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33))
' Dim DtMetodoPago As DataTable = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
' If DtMetodoPago IsNot Nothing Then
@@ -2735,6 +2735,8 @@ Partial Class Inventarios_RecepcionUsados
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
Return TmpDT
End Function

View File

@@ -466,13 +466,13 @@ Partial Class Inventarios_Remanufactura
'If ObjCliente.GetClientes(DdlCliente.SelectedValue.ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
' If ObjCliente.DtResultados.Rows.Count > 0 Then
' ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33
' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
' ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
' ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
' ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
@@ -620,7 +620,7 @@ Partial Class Inventarios_Remanufactura
Entrega:="", Vigencia:=MinFecha,
CveAlmacenTraspasoDestino:=CveAlmacenTraspasoDestino, CveAlmacenTraspasoOrigen:=CveAlmacenTraspasoOrigen, CveDireccionEnvio:=-1, CveOC:=-1, IEPS:=factura.IEPSTC, Serie:=factura.Serie, CveCondicionEntrega:=-1,
PedidoContrato:="", CveSubProyecto:=CveSubProyecto, CveSubProyectoCobranza:=CveSubProyecto, CveSubProyectoEjecucion:=CveSubProyecto, CveFormaPago33:=factura.CveFormaPago,
CveMetodoPago33:=factura.CveMetodoPago, CveUsoCFDI:=factura.CveUsoCFDI) Then
CveMetodoPago:=factura.CveMetodoPago, CveUsoCFDI:=factura.CveUsoCFDI) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
End If

View File

@@ -3038,21 +3038,21 @@ Partial Class Ventas_PortalCliente
'Dim ObjCliente As New ClsClientes
'If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
' If ObjCliente.DtResultados.Rows.Count > 0 Then
' ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33
' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
' ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
' ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
' ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
' ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
' ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33
' If GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago33 = {ObjCliente.CveMetodoPago33}").Rows.Count > 0 Then
' ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago33 = {ObjCliente.CveMetodoPago33}").Rows(0)("MetodoPago").ToString
' ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
' If GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago}").Rows.Count > 0 Then
' ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago}").Rows(0)("MetodoPago").ToString
' Else
' ObjFactura.CveMetodoPago = 1
' ObjFactura.MetodoPago = "Efectivo"
@@ -3459,7 +3459,7 @@ Partial Class Ventas_PortalCliente
AtencionA:=factura.AtencionA, CveContrato:=factura.CveContrato, Det_FechaOrdenCompra:=factura.Det_FechaOrdenCompra, Det_OrdenCompra:=factura.Det_OrdenCompra, otros:=factura.Otros,
CveAlmacenTraspasoDestino:=CveAlmacenTraspasoDestino, CveAlmacenTraspasoOrigen:=CveAlmacenTraspasoOrigen, IEPS:=factura.IEPSTC, Serie:=factura.Serie,
CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago,
CveMetodoPago33:=factura.CveMetodoPago, CveUsoCFDI:=factura.CveUsoCFDI, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
CveMetodoPago:=factura.CveMetodoPago, CveUsoCFDI:=factura.CveUsoCFDI, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo) Then

View File

@@ -1426,7 +1426,7 @@
<div class="modal-body">
<ul>
<li>{"FolioFactura"}</li>
<li>{"SerieFolio"}</li>
<li>{"TipoDocumento"}</li>
<li>{"ImporteFactura"}</li>
<li>{"FechaFactura"}</li>

View File

@@ -707,7 +707,7 @@ Partial Class RepContratoDetalle
If Not ObjVentas.UpdateVentas(SubTotalNew, 0, IVANew, 0, TotalNew, CveMonedaNew, TC, FechaVenta, DescripcionNew,
UsuarioActual.CveEmpresa, CveVentaRemision,
Vigencia:=FechaVenta, CondicionesPago:=-1,
PedidoContrato:="-1", AtencionA:="-1", CveMetodoPago33:=-1,
PedidoContrato:="-1", AtencionA:="-1", CveMetodoPago:=-1,
CveFormaPago33:=-1, TipoDocto:="Rem", CveCliente:=CveClienteNew, CveClienteSucursal:=-1,
OrdenCompra:="-1", RetIVA:=0, RetISR:=0, Kilometraje:=0D, CveUsoCFDi:=-1,
CveVendedor:=-1, ServicioDomicilio:=False, CveMedico:=-1, CveProcedimiento:=-1,

View File

@@ -2434,19 +2434,14 @@
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Original" DataField="Original" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField HeaderText="Devolución" ItemStyle-HorizontalAlign="Center" Visible="false">
<asp:BoundField HeaderText="Saldo" DataField="SaldoConImpuestos" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Mon" DataField="Abreviatura" ItemStyle-Width="60px" />
<asp:TemplateField HeaderText="Devolución" ItemStyle-HorizontalAlign="Center" Visible="false" ItemStyle-Width="80px">
<ItemTemplate>
<asp:CheckBox ID="chkDevolver" runat="server" Visible="false" CssClass="CssSelector" onclick="FCSumaTotalesNCAnticipos()" />
<asp:HyperLink ID="HLDevolverDinero" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-usd'></i>" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:TemplateField HeaderText="Autorización" ItemStyle-HorizontalAlign="Center" Visible="false">
<ItemTemplate>
<asp:LinkButton ID="LnkAutorizar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ToolTip="Autorizar Anticipo" runat="server" OnClick="LnkAutorizarAnticipo_Click" />
<asp:LinkButton ID="LnkCancelar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-ban'></i>" ToolTip="Bloquear Anticipo" runat="server" OnClick="LnkCancelarAnticipo_Click" />
</ItemTemplate>
</asp:TemplateField>--%>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>

View File

@@ -922,7 +922,7 @@ Partial Class Clientes
LnkPersonaFisica.Visible = True
End If
InicializaDevolverDinero()
'InicializaDevolverDinero()
TxtFechaICredito.Text = NowADS().AddYears(-2).ToShortDateString()
TxtFechaFCredito.Text = NowADS().ToShortDateString()
@@ -1632,7 +1632,7 @@ Partial Class Clientes
DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString())
DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago.ToString())
'DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString())
'DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago.ToString())
CargaFormaDePago(ObjClientes.CveFormaPago)
If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
@@ -1956,12 +1956,8 @@ Partial Class Clientes
DtClientesAnticipo = Nothing
GVAnticiposHistorial.DataSource = Nothing
DtAnticipoHistorial = Nothing
End If
End If
ObjMovtos.Dispose()
'If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then
' GVAnticipos.Columns(7).Visible = True
'End If
GVAnticipos.DataBind()
GVAnticiposHistorial.DataBind()
@@ -2176,7 +2172,6 @@ Partial Class Clientes
If e.Row.DBCampo("CveVenta") = "" Then
If e.Row.DBCampo("CveIE") <> "" Then
e.Row.Cells(0).Text = String.Format("{0} - {1}", e.Row.DBCampo("Banco"), e.Row.DBCampo("NumCuenta"))
e.Row.FCLiteral("LtlFechaVenci").Text = e.Row.DBCampo("FechaDocumento").ToDate().ToShortDateString()
e.Row.FCHyperLink("HplCheque").Visible = True
@@ -2280,7 +2275,7 @@ Partial Class Clientes
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
Cuerpo = Cuerpo.Replace("{""FolioFactura""}", HdnSerieFolio.Value.ToString())
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString())
If Dr IsNot Nothing Then
Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
@@ -2298,7 +2293,7 @@ Partial Class Clientes
Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
Asunto = Asunto.Replace("{""FolioFactura""}", HdnSerieFolio.Value.ToString())
Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString())
If Dr IsNot Nothing Then
Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
@@ -2319,7 +2314,7 @@ Partial Class Clientes
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
Cuerpo = Cuerpo.Replace("{""FolioFactura""}", HdnSerieFolio.Value.ToString())
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString())
If Dr IsNot Nothing Then
Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Cuerpo = Cuerpo.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -2336,7 +2331,7 @@ Partial Class Clientes
Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
Asunto = Asunto.Replace("{""FolioFactura""}", HdnSerieFolio.Value.ToString())
Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString())
If Dr IsNot Nothing Then
Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Asunto = Asunto.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -2697,7 +2692,7 @@ Partial Class Clientes
If Not ObjClientes.AddSucursal(CveClienteNuevo, Row("SucursalCliente").ToString(), UsuarioActual.CveUsuario, Row("CiudadSucursal").ToString(), Row("ColoniaSucursal").ToString(), Row("CPSucursal").ToString(), Row("DireccionSucursal").ToString(), Row("EstadoSucursal").ToString(), Row("LocalidadSucursal").ToString(),
Row("PaisSucursal").ToString(), Row("NumExtSucursal").ToString(), Row("NumIntSucursal").ToString(), Row("TelefonoSucursal").ToString(), Row("CorreoSucursal").ToString(), Row("CorreoCotiziacionSucursal").ToString(), Row("ContactoSucursal").ToString(),
Row("CveVendedorSucursal").ToString().ToEntero(), Row("NumCuenta").ToString(), Row("CveMetodoPago").ToString().ToEntero(), Row("LimiteCredito").ToString().ToDecimal(), Row("CveResponsableCobranza").ToString().ToEntero(),
Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago33").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString(), CveAlmacenAsignado:=CveAlmacenAsignadoSucursal) Then
Row("CveUsoCFDI").ToString().ToEntero(), Row("CveFormaPago33").ToString().ToEntero(), Row("CveMetodoPago").ToString().ToEntero(), LT:=Row("LT").ToString(), LG:=Row("LG").ToString(), CveAlmacenAsignado:=CveAlmacenAsignadoSucursal) Then
ErrorProceso = True
Exit For
End If
@@ -3037,28 +3032,35 @@ Partial Class Clientes
If (e.Row.DBCampo("CveVenta").ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").Contiene("Ant", "NC", "Dev")) OrElse (e.Row.DBCampo("CveIE").ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo") = "IxC") Then
'If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) AndAlso CType(sender, GridView).ID = "GVAnticipos" Then
' If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant") Then
' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
' e.Row.FCLinkButton("LnkAutorizar").Visible = True
' e.Row.FCLinkButton("LnkCancelar").Visible = False
' Else
' e.Row.FCLinkButton("LnkAutorizar").Visible = False
' e.Row.FCLinkButton("LnkCancelar").Visible = True
' End If
' End If
'End If
If ModalidadSelecionDevAnticipos Then
e.Row.FCCheckBox("chkDevolver").Visible = True
e.Row.FCCheckBox("chkDevolver").InputAttributes.Add("data-saldo", e.Row.DBCampo("SaldoConImpuestos"))
End If
e.Row.FCHyperLink("HLDevolverDinero").Visible = True
e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinV&P={Parametros}"
If e.Row.DBCampo("CveVenta").ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo") = "NC" Then
Dim Parametros As String = Encripta($"CveVenta={e.Row.DBCampo("CveVenta").ToEntero()}&SerieFolio={e.Row.DBCampo("Folio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveCliente={CveCliente}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}")
'If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) AndAlso CType(sender, GridView).ID = "GVAnticipos" Then
' If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant") Then
' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
' e.Row.FCLinkButton("LnkAutorizar").Visible = True
' e.Row.FCLinkButton("LnkCancelar").Visible = False
' Else
' e.Row.FCLinkButton("LnkAutorizar").Visible = False
' e.Row.FCLinkButton("LnkCancelar").Visible = True
' End If
' End If
'End If
' e.Row.FCHyperLink("HLDevolverDinero").Visible = True
e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinV&P={Parametros}"
End If
End If
End If
End If
End If
End If
End Sub
#End Region
@@ -3342,7 +3344,7 @@ Partial Class Clientes
DdlResponsableSucursal.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveResponsableCobranza").ToString())
DdlSucursalUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString())
DdlSucursalMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString())
DdlSucursalMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString())
DdlSucursalFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString())
txtLg.Text = ObjCliente.DtResultados.Rows(0)("LG").ToString()
@@ -5682,7 +5684,7 @@ Partial Class Clientes
RowSucursal("CveUsoCFDI") = DdlSucursalUsoCFDI.SelectedValue.ToEntero()
RowSucursal("CveFormaPago33") = DdlSucursalFormaPago33.SelectedValue.ToEntero()
RowSucursal("CveMetodoPago33") = DdlSucursalMetodoPago33.SelectedValue.ToEntero()
RowSucursal("CveMetodoPago") = DdlSucursalMetodoPago33.SelectedValue.ToEntero()
RowSucursal("LimiteCredito") = TxtLimiteCreditoSucursal.Text.ToDecimal
RowSucursal("CveResponsableCobranza") = DdlResponsableSucursal.SelectedValue.ToEntero
@@ -5736,7 +5738,7 @@ Partial Class Clientes
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
Cuerpo = Cuerpo.Replace("{""FolioFactura""}", HdnSerieFolio2.Value.ToString())
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString())
If Dr IsNot Nothing Then
Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Cuerpo = Cuerpo.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -5754,7 +5756,7 @@ Partial Class Clientes
Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
Asunto = Asunto.Replace("{""FolioFactura""}", HdnSerieFolio2.Value.ToString())
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString())
If Dr IsNot Nothing Then
Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Asunto = Asunto.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -5774,7 +5776,7 @@ Partial Class Clientes
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
Cuerpo = Cuerpo.Replace("{""FolioFactura""}", HdnSerieFolio2.Value.ToString())
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString())
If Dr IsNot Nothing Then
Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Cuerpo = Cuerpo.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -5787,13 +5789,12 @@ Partial Class Clientes
End If
End If
If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
Asunto = Asunto.Replace("{""FolioFactura""}", HdnSerieFolio2.Value.ToString())
Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString())
If Dr IsNot Nothing Then
Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Asunto = Asunto.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -8081,7 +8082,7 @@ Partial Class Clientes
#Region " DEVOLVER DINERO ANT/NC "
Private Sub InicializaDevolverDinero()
If UsuarioActual.TienePermisoProceso(247) Then
GVAnticipos.Columns(6).Visible = True
GVAnticipos.Columns(7).Visible = True
End If
End Sub
#End Region
@@ -9421,7 +9422,9 @@ Partial Class Clientes
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
Return TmpDT
End Function
@@ -10772,6 +10775,7 @@ Partial Class Clientes
TxtDevRedondeo.Text = ""
DdlCuentaDeposito.DataSource = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
DdlCuentaDeposito.DataBind()
GVAnticipos.Columns(7).Visible = True
'Dim Dep As New ClsGenerales
'If Dep.GetCuentasDepositos(CveCliente:=CveCliente, CveEmpresa:=UsuarioActual.CveEmpresa) Then
' DdlCuentaDeposito.DataSource = Dep.DtResultados
@@ -10886,7 +10890,7 @@ Partial Class Clientes
'IMPUESTOS
If gvr.DataKey("IVA").ToDecimal > 0 Then
tImporte = -(gvr.DataKey("IVA").ToDecimal * PorcentajePagoDevDin).RoundSQL
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, tImporte, tImporte, 13, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME, PorcentajeImpuesto:=gvr.DataKey("PorcentajeIVA").ToDecimal) Then
If gvr.DataKey("Tipo").Contiene("Dev", "NC") AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, tImporte, tImporte, 13, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME, PorcentajeImpuesto:=gvr.DataKey("PorcentajeIVA").ToDecimal) Then
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
Exit For
End If

View File

@@ -205,10 +205,14 @@
</div>
<div class="row" id="divAnticipo" runat="server" visible="false">
<div class="col-md-2">Anticipo:</div>
<div class="col-md-3">
<div class="col-md-2">
<asp:TextBox ID="TxtAnticipo" runat="server" Width="100px" ClientIDMode="Static" />
</div>
<div class="col-md-2" runat="server" id="Div3" visible="false"></div>
<div class="col-md-1" runat="server" id="DivAntSubProyectoTexto" visible="false">Sucursal:</div>
<div class="col-md-2" runat="server" id="DivAntSubProyecto" visible="false">
<asp:DropDownList runat="server" ID="DdlSubProyectos" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm">
</asp:DropDownList>
</div>
<div class="col-md-3" runat="server" id="Div4" visible="false">
</div>
</div>
@@ -831,7 +835,7 @@
var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares");
debugger;
if (t.checked) {
txt.value = FormatoNumero(importe, 2);
@@ -853,8 +857,15 @@
}
}
function SumaValores(pagoMultiple, monedaPago) {
function FnRecalcula(pagoMultiple,monedaPago)
{
var Suma = SumaValores(pagoMultiple, monedaPago);
$get('TxtImporte').value = FormatoNumero(Suma, 2);
$('#LtlTotalMXN').text(FormatoNumero(Suma, 2))
}
function SumaValores(pagoMultiple, monedaPago) {
var Importe = 0;
var Comision = 0.00;
var topLevelElem = document.getElementById("form1");
@@ -945,7 +956,7 @@
$get('TxtAnticipo').value = 0.00
}
else {
Importe = Importe + ToDouble($get('TxtAnticipo').value);
Importe = Importe + ToDouble($get('TxtAnticipo').value);
}
}
if ($get('TxtPrestamoImporte') != null) {

View File

@@ -4,6 +4,7 @@
Imports System.Data
Imports ADSTimbrado
Imports Extensiones
Imports Org.BouncyCastle.Ocsp
Partial Class Ventas_ClientesAbonar
Inherits ClsPaginas
@@ -343,6 +344,13 @@ Partial Class Ventas_ClientesAbonar
DtPrestamos = CargaPrestamos(1)
End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then 'GDIaz
divAnticipo.Visible = True
TxtAnticipo.Attributes.Add("onKeyUp", "FnRecalcula(0,1);")
DivAntSubProyecto.Visible = True
DivAntSubProyectoTexto.visible = True
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, Nothing, AplicaTodos:="")
End If
CargaDatos(tCveMoneda)
Else
Alert("El Cliente Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
@@ -758,7 +766,8 @@ Partial Class Ventas_ClientesAbonar
Dim MsgError As String = ""
Dim NCGeneradas As New List(Of RespuestaNotaCredrito)
Dim ListaFacturasGenerarNC As New List(Of Modelos.Factura)
Dim ObjFacturaAnt As Modelos.Factura = Nothing
Dim RespAnt As Modelos.Factura.MMensajeFactura = Nothing
Dim ImporteSeleccionado As Decimal = 0
'02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR
@@ -1176,12 +1185,79 @@ Partial Class Ventas_ClientesAbonar
End If
End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TxtAnticipo.Text.ToDecimal > 0 AndAlso MsgError = "" Then '' si es empresa GDiaz
'generar un anticipo y registrarle el pago.
Dim tCveMoneda As Integer = 1
Dim tCveFormaPago As Integer = GlobalDTTipoTransacciones().FiltroPrimeroValor("CveFormaPago", $"CveTipoTransaccion={DdlTipoTransaccion.SelectedValue}").ToEntero
Dim tCvePS As Integer
Dim tCveUM As Integer = 0
Dim tCveSub As Integer = DdlSubProyectos.SelectedValue.ToEntero
ObjFacturaAnt = Modelos.Factura.CrearVentaNueva(UsuarioActual, tCveSub, CveCliente, tCveMoneda, "Ant")
ObjFacturaAnt.CveMoneda = tCveMoneda
ObjFacturaAnt.CveFormaPago = tCveFormaPago
ObjFacturaAnt.CveMetodoPago = 1
ObjFacturaAnt.ClaveMetodoPagoSAT = "PUE"
ObjFacturaAnt.ClaveFormaPagoSAT = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjFacturaAnt.CveFormaPago}")
ObjFacturaAnt.ClaveUsoCFDISAT = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {ObjFacturaAnt.CveUsoCFDI}")
Dim drPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CodigoSATPS:="84111506").FiltroPrimero("PSCodigo LIKE '%ANTICIPO%' OR PSCodigo LIKE '%anticipo%' OR PSCodigo LIKE '%Anticipo%'")
Dim tPorIVA As Decimal = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=tCveSub).FiltroPrimeroValor("IVA").ToDecimal
Dim tPU As Decimal = (TxtAnticipo.Text.ToDecimal / (1 + tPorIVA)).RoundSQL(6)
If drPS IsNot Nothing Then
tCvePS = drPS("CvePS").ToString.ToEntero
tCveUM = drPS("CveUnidadMedida").ToString.ToEntero
End If
ObjFacturaAnt.AgregarPS(tCvePS, 1, tPU, 0, "", CveUM:=tCveUM, CveSubProyecto:=tCveSub, PorcentajeIVA:=tPorIVA)
ObjFacturaAnt.CalculaTotales()
RespAnt = ObjFacturaAnt.EmitirFactura(False, Transac:=ObjMov.IniciaTransacSQL(), Modulo:="Ventas/ClientesAbonarAnt", MostrarURL:=True)
RespAnt.Factura = ObjFacturaAnt
If RespAnt IsNot Nothing AndAlso RespAnt.Factura IsNot Nothing Then
Dim VentaActual As New Venta(UsuarioActual)
VentaActual.CveVenta = RespAnt.Factura.CveVenta
VentaActual.Fecha = RespAnt.Factura.Fecha
VentaActual.CveCliente = CveCliente
VentaActual.CveMoneda = tCveMoneda
VentaActual.TipoDocto = "Ant"
VentaActual.SerieFolio = RespAnt.Factura.SerieFolio
VentaActual.ClienteNombre = NombreComercial
VentaActual.TC = 1
VentaActual.Total = TxtAnticipo.Text.ToDecimal
VentaActual.IVA = (tPorIVA * tPU).RoundSQL(2)
VentaActual.PorcentajeIVA = tPorIVA
VentaActual.CveSubProyecto = tCveSub
'Importe de pago
Dim Pago As New VentaPago
Pago.TipoPago = "XXX"
Pago.Fecha = TxtFechaDocumento.Text.ToDate
Pago.CveIE = CveIE
Pago.CveMonedaPago = tCveMoneda
Pago.ImportePago = TxtAnticipo.Text.ToDecimal
Pago.ImportePagoVenta = TxtAnticipo.Text.ToDecimal
Pago.Referencia = TxtFolio.Text
Pago.TipoPago = "XXX"
'If RblTipoPago.SelectedValue = "3" Then
' Pago.TipoPago = "I"
' Pago.FechaDocumentoRelacionado = FechaIngreso
' Pago.CveClientePago = CveCliente
'End If
'MsgError = RespAnt.Mensajes.ToString
If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
End If
End If
End If
If MsgError = "" AndAlso Not ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then
MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
'If ObjMov.ValorPolizaDescuadre > 0 Then
' MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
'End If
End If
Else
MsgError = "No se pudo insertar la póliza"
End If
@@ -1326,6 +1402,25 @@ Partial Class Ventas_ClientesAbonar
End If
Next
If ObjFacturaAnt IsNot Nothing Then
Dim MsgTimbrado As String = ""
Try
ObjFacturaAnt.PreparaTimbre()
MsgTimbrado = TimbrarFactura(ObjFacturaAnt, True)
StrMsg.AppendFormat("<br/><br/>Anticipo generado correctamente.<br/> Folio: <a href='/Ventas/Ventas.aspx?CveVenta={0}' target='_blank' class='Texto'>{1}</a><br/>", ObjFacturaAnt.CveVenta, ObjFacturaAnt.SerieFolio)
If Not String.IsNullOrEmpty(MsgTimbrado) Then
Dim StrEr As String = $"<div id = 'DivTipoCambioAdvertencia' class='alert alert-danger' style='padding: 5px; margin-bottom: 5px; padding-right: 25px;'><strong style = 'font-size: 20px; margin-right: 25px;' > Comprobante no emitido : </strong><br/> {MsgTimbrado}<br/>Por favor inténtelo de nuevo a través del botón 'Emitir' en ventas.</div>"
StrMsg.AppendFormat("<br/>{0}<br/>", StrEr)
End If
Catch ex As Exception
GuardaLogAD(ex.ToString())
StrMsg.AppendFormat("<br/>{0}<br/>", MsgTimbrado)
End Try
End If
If ChkComplementoPago.Checked Then
Dim TextoComplementoPago As String = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
StrMsg.AppendFormat("<br/><br/>{0}", TextoComplementoPago)
@@ -1352,6 +1447,26 @@ Partial Class Ventas_ClientesAbonar
End Sub
Private Function TimbrarFactura(ByRef ObjFactura As Modelos.Factura, ByRef SeTimbro As Boolean) As String
Dim MsgErrorTimbrado As String = ""
Dim ObjTimbrado As New Timbrado
Try
SeTimbro = ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura)
Dim FolioFiscalFactura As String = ObjTimbrado.UUID
MsgErrorTimbrado = ObjTimbrado.MensajeErrorCFDI
ObjTimbrado = Nothing
Catch ex As Exception
OnError("Ocurrió un error al generar el timbrado", ex)
End Try
If Not String.IsNullOrEmpty(MsgErrorTimbrado) Then
GuardaLogAD(MsgErrorTimbrado, Archivo:="LogTimbrado")
End If
Return MsgErrorTimbrado
End Function
Private Function RegistraAmortizacionAnticipo(ByRef ObjMov As ClsContabilidad, CvePrePoliza As Integer, CveIE As Integer, Importe As Decimal, tipoCambioPago As Decimal, CveVenta As Integer, ReferenciaVenta As String, ReferenciaPago As String) As String
Dim MsgError As String = ""
If CveMonedaPago = 2 Then
@@ -1986,7 +2101,8 @@ Partial Class Ventas_ClientesAbonar
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String))
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
Return TmpDT
End Function
Private Function InicializaDTVentasNC() As DataTable

View File

@@ -2681,11 +2681,11 @@ Partial Class PV
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
'DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString)
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
'DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago.ToString)
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
@@ -2906,8 +2906,8 @@ Partial Class PV
'CveMetodoPagoCliente = ObjCliente.CveMetodoPago
DdlMetodoPago.SelectedValueExist(CveMetodoPagoCliente.ToString)
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago)
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago)
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
@@ -4703,6 +4703,9 @@ Partial Class PV
TmpDT.Columns.Add("AplicaSerie", GetType(Boolean))
TmpDT.Columns.Add("CveMarca", GetType(Integer))
TmpDT.Columns.Add("CvePromocionDetalle", GetType(Integer))
TmpDT.Columns("CvePromocionDetalle").DefaultValue = -1
End Sub

View File

@@ -596,7 +596,7 @@
</div>
</div>
<asp:UpdatePanel class="chequesie1" runat="server" ID="UpContadoOtros" Visible="false" UpdateMode="Conditional">
<asp:UpdatePanel class="chequesie1" runat="server" ID="UpContadoOtros" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-2">

View File

@@ -161,11 +161,8 @@ Partial Class Ventas_PVCobranza
DivDatosCheque.Visible = True
UpContadoOtros.Visible = True
UpContadoOtros.Update()
End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
DivNoTimbradas.Visible = True
End If
End If
End If
End Sub
@@ -184,12 +181,6 @@ Partial Class Ventas_PVCobranza
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
txtFechaF.Text = Now.ToShortDateString
'DdlCuentaEfectivo.Items.Clear()
'DdlCuentaTarjetaCredito.Items.Clear()
'DdlCuentaTarjetaDebito.Items.Clear()
'DdlCuentaCheque.Items.Clear()
'DdlCuentaTransferencia.Items.Clear()
Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
Dim CveMon As Integer = 1
@@ -198,7 +189,6 @@ Partial Class Ventas_PVCobranza
DdlCuentaEfectivo.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
DdlCuentaCheque.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
'If UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DdlCuentaTarjetaCredito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
DdlCuentaTarjetaDebito.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1 AND TieneTerminal = 1", CveMon))
@@ -1149,7 +1139,7 @@ Partial Class Ventas_PVCobranza
For Each Dr As DataRow In ObjFactura.DtRemisionesPS.Rows
ObjFactura.AgregarPS(Dr("CvePS").ToString().ToEntero(), Dr("Cantidad").ToString().ToDecimal(), Dr("PU").ToString().ToDecimal(), Dr("Descuento").ToString().ToDecimal, Dr("Obs").ToString(), CveUM:=Dr("CveUM").ToString().ToEntero(),
CveProyecto:=Dr("CveProyecto").ToString().ToEntero(), CveSubProyecto:=Dr("CveSubProyecto").ToString().ToEntero(), CveVentaDetallePadre:=Dr("CveVentaDetalle").ToString().ToEntero(), CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(),
PorcentajeIVA:=Dr("PorcentajeIVA").ToString().ToDecimal())
PorcentajeIVA:=Dr("PorcentajeIVA").ToString().ToDecimal(), CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString.ToEntero)
Next
If Not ValidateString(ObservacionesAlmacen.ToLower(), "parcial") Then
@@ -1158,14 +1148,12 @@ Partial Class Ventas_PVCobranza
ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero()
End If
ObjFactura.CalculaTotales()
ObjFactura.PreparaTimbre()
If HdnTipoAmortizacion.Value = "4" Then
DtAnticipos.Columns.Add("CveVenta", GetType(Integer))
DtAnticipos.Columns.Add("Importe", GetType(Decimal))
DtAnticipos.Columns.Add("CveConceptoContable", GetType(Integer))
@@ -2456,7 +2444,7 @@ Partial Class Ventas_PVCobranza
Msg = Msg & "<br/><a class='Texto' href='/Ventas/Ventas.aspx?CveDevolucion=" & CveVentaCancelacion & "&NuevaFactura=1'> Refacturar</a>"
End If
Alert(Msg, TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion:="Enviar", TextoSegundoBoton:="Cancelar")
Alert(Msg, TipoMensaje.MsgConfirmacion, JSBtnAceptar:="BtnEnviarMailCancelacion()", TextoConfirmacion:="Enviar", TextoSegundoBoton:="Cancelar", ShowCloseButton:=False)
Else
Msg = resp.Mensaje

View File

@@ -101,9 +101,20 @@
<li>
<asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkGeneraXLS1" OnClick="LnkGeneraXLS1_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 1</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkGeneraXLS2" OnClick="LnkGeneraXLS2_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 2</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" />
<asp:PostBackTrigger ControlID="LnkGeneraXLS1" />
<asp:PostBackTrigger ControlID="LnkGeneraXLS2" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>

View File

@@ -153,6 +153,12 @@ Partial Class Ventas_RepVentas
PrePersonalizacion()
CargaPersonalizacion()
If UsuarioActual.CveEmpresa = 199 Then
LnkGeneraXLS1.Visible = True
LnkGeneraXLS2.Visible = True
End If
End If
End Sub
@@ -1058,4 +1064,41 @@ Partial Class Ventas_RepVentas
End Sub
Protected Sub LnkGeneraXLS1_Click(sender As Object, e As EventArgs)
RepVentasBioSistemas(1)
End Sub
Protected Sub LnkGeneraXLS2_Click(sender As Object, e As EventArgs)
RepVentasBioSistemas(2)
End Sub
Private Sub RepVentasBioSistemas(OpcionReporte As Integer)
Dim ObjVentas As New ClsVentas
Dim DTResultados As New DataTable
If ObjVentas.GetRepVentasBiosistemas(UsuarioActual.CveEmpresa, OpcionReporte) Then
DTResultados = ObjVentas.DtResultados
End If
Dim NombreReporte As String = "Reporte 1"
Dim TituloReporte As String = "Reporte 1"
DTResultados.TableName = "Reporte1"
If OpcionReporte = 2 Then
NombreReporte = "Reporte 2"
TituloReporte = "Reporte1 2"
DTResultados.TableName = "Reporte2"
End If
DTResultados.ExportToExcelG(NombreReporte, TituloReporte, UsuarioActual, "")
End Sub
End Class

View File

@@ -9298,7 +9298,14 @@
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UPExist" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvExist" runat="server" AutoGenerateColumns="true" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover Widthall">
<asp:GridView ID="GvExist" runat="server" AutoGenerateColumns="true" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover">
<Columns>
<asp:TemplateField HeaderText="Producto">
<ItemTemplate >
<span style="width:400px; display:flex;"> <asp:Literal ID="LtlProducto" runat="server" Text='<%# Eval("Producto") %>'></asp:Literal>&nbsp;</span>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -10494,10 +10494,16 @@ Partial Class Ventas
Protected Sub EmitirImprimirNew(Optional TipoDoctoViejo As String = "")
OrdenarPS(Reeordenar:=False, RecargarGV:=False)
If Not ValidaVentaContratoObra() Then
Exit Sub
End If
If Not ValidaPorcentajeIVA() Then
Exit Sub
End If
If ValidaPagosContado(TipoDoctoViejo:=TipoDoctoViejo) Then
Exit Sub
End If
@@ -25322,6 +25328,21 @@ Partial Class Ventas
Return Retorno
End Function
Private Function ValidaPorcentajeIVA() As Boolean
Dim Retorno As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
Dim DtIVA As DataTable = TmpDT.FiltraParametros("PorcentajeIVA > 0", "", {"PorcentajeIVA"})
'SOLO DEBE TENER PORCENTAJE DE 8 o 16 no ambos
If DtIVA.Rows.Count > 1 Then
Retorno = False
Alert("No se puede tener porcentajes de IVA de 8 y 16% en una sola factura", TipoMensaje.MsgAdvertencia)
End If
End If
Return Retorno
End Function
#End Region
#Region " SERIE ALMACEN "
@@ -26525,7 +26546,7 @@ Partial Class Ventas
End If
End Sub
Private Sub OrdenarPS(Optional Reeordenar As Boolean = True)
Private Sub OrdenarPS(Optional Reeordenar As Boolean = True, Optional RecargarGV As Boolean = True)
If Reeordenar Then
For Each row As GridViewRow In GvPS.Rows
@@ -26544,8 +26565,10 @@ Partial Class Ventas
TmpDT.AcceptChanges()
GvPS.DataSource = TmpDT
GvPS.DataBind()
If RecargarGV Then
GvPS.DataSource = TmpDT
GvPS.DataBind()
End If
End Sub
Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs)
OrdenarPS()
@@ -33904,7 +33927,7 @@ Partial Class Ventas
Next
Return Nothing
End Function
Private Function AgregaPSCotizacion(Optional RecalculaImpustosLocales As Boolean = True) As Boolean
Private Function AgregaPSCotizacion(Optional RecalculaImpustosLocales As Boolean = True, Optional DtOrden As DataTable = Nothing) As Boolean
'Dim ObjFactCotizacion As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
'Dim TotalCotizacion As Decimal = ObjFactCotizacion.Total 'TmpDT.SUM("TotalImporte").ToDecimal() + TmpDT.SUM("ImporteIVA").ToDecimal() + TmpDT.SUM("ImporteIEPS").ToDecimal() - TmpDT.SUM("ImporteRetIVA").ToDecimal() - TmpDT.SUM("ImporteRetISR").ToDecimal()
@@ -33925,11 +33948,17 @@ Partial Class Ventas
' Dr("PorcentajeIVA").ToString().ToDecimal, Dr("IVA").ToString().ToDecimal,
' Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
' CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True)
Dim OrdenManual As Integer = 0
If DtOrden IsNot Nothing Then
OrdenManual = DtOrden.FiltroPrimeroValor("Orden", $"CveVentaDetalle = {Dr("CveVentaDetalle")}").ToEntero()
End If
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
Dr("CvePS").ToString.ToEntero(), Dr("PS").ToString, Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString, Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
CveContratoDetalle:=Dr("CveContratoDetalle").ToString.ToEntero(), CveVentaDetalleCotizacion:=Dr("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True,
PorcentajeIVAFijo:=Dr("PorcentajeIVA").ToString.ToDecimal, CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero())
PorcentajeIVAFijo:=Dr("PorcentajeIVA").ToString.ToDecimal, CvePromocionDetalle:=Dr("CvePromocionDetalle").ToString().ToEntero(), OrdenManual:=OrdenManual)
Next
'Dim TotalFactura = TmpDT.SUM("TotalImporte").ToDecimal() + TmpDT.SUM("ImporteIVA").ToDecimal() + TmpDT.SUM("ImporteIEPS").ToDecimal() - TmpDT.SUM("ImporteRetIVA").ToDecimal() - TmpDT.SUM("ImporteRetISR").ToDecimal()
@@ -33940,6 +33969,10 @@ Partial Class Ventas
' LastRow("ImporteIVA") = LastRow("ImporteIVA").ToString().ToDecimal() - Diferencia
'End If
If DtOrden IsNot Nothing Then
OrdenarPS(Reeordenar:=False, RecargarGV:=False)
End If
CalculaTotalesVenta(RecalculaImpuestosLocales:=RecalculaImpustosLocales)
Return True
Else
@@ -33954,6 +33987,12 @@ Partial Class Ventas
'LIMPIAMOS
'Dim TotalCotizacion As Decimal = TxtTotal.Text.Replace(",", "").ToDecimal()
Dim DtOrden As DataTable = Nothing
'SI ES UNA VENTA EXISTENTE, CONSEVAR EL ORDEN
If CveVenta > 0 Then
DtOrden = TmpDT.FiltraParametros("", "Orden", {"CveVentaDetalle", "Orden"})
End If
TmpDT.Rows.Clear()
TxtSubTotal.Text = "0.00"
@@ -33978,7 +34017,7 @@ Partial Class Ventas
End If
ObjClientes.Dispose()
If Not AgregaPSCotizacion(RecalculaImpustosLocales:=False) Then
If Not AgregaPSCotizacion(RecalculaImpustosLocales:=False, DtOrden:=DtOrden) Then
Alert("Ocurrió un error al agregar los conceptos de la cotización. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Return False
End If
@@ -35281,8 +35320,6 @@ Partial Class Ventas
End Function
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -35419,6 +35456,7 @@ Partial Class Ventas
End If
If FolioFijo = 0 Then CargaFolios(FacturarDocumentoNuevo:=True) 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO
EmitirImprimir(TipoDoctoViejo) 'MANDA A EMITIR - PROCESO VIEJO
End If
@@ -40776,9 +40814,9 @@ Partial Class Ventas
GvExist.DataSource = DtExistencias
GvExist.DataBind()
'GvExist.Columns(0).ItemStyle.Width = New Unit(200, UnitType.Pixel)
'ORDENA HACIA LA DERECHA LAS CANTIDAD - OJO!! NO SE USO GV.COLUMNS.COUNT PORQUE LAS COLUMNAS GENERADAS EN BEHIND NO LAS RECONOCE
For index As Integer = 1 To DtExistencias.Columns.Count - 1
'EL GV TIENE UNA COLUMNA EXTRA DEBE TENER UN INDICE MAYOR
For index As Integer = 1 To DtExistencias.Columns.Count
For Each gvr As GridViewRow In GvExist.Rows
gvr.Cells(index).HorizontalAlign = HorizontalAlign.Right
Next
@@ -40791,7 +40829,7 @@ Partial Class Ventas
Protected Sub GvExist_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvExist.RowDataBound
If e.Row.RowType = DataControlRowType.Header OrElse e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Cells(0).Attributes.Add("colspan", "3")
e.Row.Cells(1).Visible = False
End If
End Sub

View File

@@ -644,21 +644,21 @@ Public Class WSApp
Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago33
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago}")
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago}")
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago33
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
ObjFactura.ClaveUsoCFDISAT = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago33
If ClsPaginas.GlobalDTVtaMetodoPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago33}").Rows.Count > 0 Then
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago33}").Rows(0)("MetodoPago").ToString
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
If ClsPaginas.GlobalDTVtaMetodoPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago}").Rows.Count > 0 Then
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltraParametros($"CveMetodoPago = {ObjCliente.CveMetodoPago}").Rows(0)("MetodoPago").ToString
Else
ObjFactura.CveMetodoPago = 1
ObjFactura.MetodoPago = "Efectivo"

View File

@@ -1942,13 +1942,13 @@ Public Class WSSIGApp
Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago33
ObjFactura.FormaPago = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
ObjFactura.ClaveFormaPagoSAT = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago33}")
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
ObjFactura.FormaPago = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago}")
ObjFactura.ClaveFormaPagoSAT = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago}")
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago33
ObjFactura.MetodoPago = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}")
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
ObjFactura.MetodoPago = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")