This commit is contained in:
2025-01-21 23:26:40 -07:00
31 changed files with 3525 additions and 1212 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 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 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 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 Dim Retorno As Boolean = False
@@ -255,6 +256,7 @@ Public Class ClsCompras
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@DoctosRelacionados", SqlDbType.VarChar).Value = DoctosRelacionados .Add("@DoctosRelacionados", SqlDbType.VarChar).Value = DoctosRelacionados
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
.Add("@CveCompraRelacionada", SqlDbType.Int).Value = CveCompraRelacionada
End With End With
Try Try

View File

@@ -1488,7 +1488,8 @@ Namespace Modelos
Optional CveSubProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1,
Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1, Optional SubProyecto As String = "", Optional PorcentajeIVA As Decimal = -1,
Optional CuentaPredial As String = "", Optional CveVentaDetallePadre As Integer = -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 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) 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("IEPS") = Row("ImporteIEPS")
Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales) Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales)
Row("TipoDescuento") = -1 Row("TipoDescuento") = -1
Row("CvePromocionDetalle") = -1
If RedondearTotal Then If RedondearTotal Then
Row("Total") = (Cantidad * PU).RoundSQL(NumeroDecimales) Row("Total") = (Cantidad * PU).RoundSQL(NumeroDecimales)
@@ -1678,6 +1678,7 @@ Namespace Modelos
Row("CveVentaDetallePedido2") = -1 Row("CveVentaDetallePedido2") = -1
Row("CuentaPredial") = CuentaPredial Row("CuentaPredial") = CuentaPredial
Row("EsCargo") = 0 Row("EsCargo") = 0
Row("CvePromocionDetalle") = CvePromocionDetalle
If Me.DtDetalle.Columns.Contains("CveMarca") Then If Me.DtDetalle.Columns.Contains("CveMarca") Then
Row("CveMarca") = DrPS("CveMarca") 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("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, 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, 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, IEPS:=Row("ImporteIEPS").ToString.ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString.ToEntero,
ImporteRetIVA:=Row("ImporteRetIVA").ToString.ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString.ToDecimal, 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, 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 ObjFactura.TipoDocto = "Cot" Then
If ObjClientes.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) 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 If ObjClientes.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago = ObjClientes.CveFormaPago33 ObjFactura.CveFormaPago = ObjClientes.CveFormaPago
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33)) ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago))
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago33)) ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjClientes.CveFormaPago))
ObjFactura.CveMetodoPago = ObjClientes.CveMetodoPago33 ObjFactura.CveMetodoPago = ObjClientes.CveMetodoPago
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33)) ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago33)) ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjClientes.CveMetodoPago))
ObjFactura.CveUsoCFDI = ObjClientes.CveUsoCFDI ObjFactura.CveUsoCFDI = ObjClientes.CveUsoCFDI
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", 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 Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then If ObjCliente.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago33 ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago33 ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", 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 Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then If ObjCliente.DtResultados.Rows.Count > 0 Then
ObjFactura.CveFormaPago = ObjCliente.CveFormaPago33 ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) ObjFactura.FormaPago = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) ObjFactura.ClaveFormaPagoSAT = ClsPaginas.GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago33 ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) ObjFactura.MetodoPago = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) ObjFactura.ClaveMetodoPagoSAT = ClsPaginas.GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) ObjFactura.UsoCFDI = ClsPaginas.GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))

View File

@@ -26,9 +26,7 @@
</li> </li>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </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"> <asp:UpdatePanel ID="UppEliminarIE" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li>
@@ -62,7 +60,12 @@
<li> <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> <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>
<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"> <asp:UpdatePanel runat="server">
<ContentTemplate> <ContentTemplate>
<li> <li>

View File

@@ -863,6 +863,8 @@ Partial Class Bancos_IE
ViewState("CvePrePoliza") = ObjIE.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero ViewState("CvePrePoliza") = ObjIE.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero
HpLPrePoliza.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ViewState("CvePrePoliza")) HpLPrePoliza.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", ViewState("CvePrePoliza"))
HpLPrePoliza.Visible = True 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 TxtFechaDocumento.Text = ObjIE.FechaDocumento.ToShortDateString
TxtFolio.Text = ObjIE.Folio TxtFolio.Text = ObjIE.Folio
LblBeneficiario.Text = ObjIE.PagueseA LblBeneficiario.Text = ObjIE.PagueseA

View File

@@ -28,7 +28,8 @@
<div class="row"> <div class="row">
<label class="col-md-2 control-label">Movimiento:</label> <label class="col-md-2 control-label">Movimiento:</label>
<div class="col-md-4"> <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: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> <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> <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="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="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> <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> </div>
<div class="row"> <div class="row">
@@ -155,7 +162,8 @@
<div class="row"> <div class="row">
<label class="col-md-2 control-label">Movimiento:</label> <label class="col-md-2 control-label">Movimiento:</label>
<div class="col-md-4"> <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: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> <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> <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="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="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> <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> </div>
<div class="row"> <div class="row">

View File

@@ -12,7 +12,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{ {
#region "PROPIEDADES" #region "PROPIEDADES"
private int CveMonedaCuentaPago private int CveMonedaCuentaPago
{ {
get get
@@ -36,7 +36,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!IsPostBack) if (!IsPostBack)
{ {
CveMonedaCuentaPago = 0; CveMonedaCuentaPago = 0;
rowComisiones.Visible = true; rowComisiones.Visible = true;
@@ -53,18 +53,21 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
CargarCentrosDeCosto(null, null, null, LblSubProyecto); CargarCentrosDeCosto(null, null, null, LblSubProyecto);
LblSubProyecto2.Text = LblSubProyecto.Text; LblSubProyecto2.Text = LblSubProyecto.Text;
ValidaFechaDocumentoDiasPosterioresPrestamo();
ValidaFechaDocumentoDiasPosteriores();
} }
} }
private void CargaSubproyectos() private void CargaSubproyectos()
{ {
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos( UsuarioActual.CveEmpresa); DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(UsuarioActual.CveEmpresa);
DdlSubProyecto.DataBind(); DdlSubProyecto.DataBind();
DdlSubProyecto.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlSubProyecto.Items.Insert(0, new ListItem("Seleccione", "-1"));
DdlSubProyectoPago.DataSource = get_GlobalDTSubProyectos( UsuarioActual.CveEmpresa); DdlSubProyectoPago.DataSource = get_GlobalDTSubProyectos(UsuarioActual.CveEmpresa);
DdlSubProyectoPago.DataBind(); DdlSubProyectoPago.DataBind();
DdlSubProyectoPago.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlSubProyectoPago.Items.Insert(0, new ListItem("Seleccione", "-1"));
@@ -116,7 +119,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
CveMonedaCuentaPago = 0; CveMonedaCuentaPago = 0;
if (dr != null) if (dr != null)
{ {
CveMonedaCuentaPago = dr["CveMoneda"].ToString().ToEntero(); CveMonedaCuentaPago = dr["CveMoneda"].ToString().ToEntero();
} }
if (CveMonedaCuentaPago != 1) if (CveMonedaCuentaPago != 1)
@@ -144,8 +147,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
bancos.Dispose(); bancos.Dispose();
TxtFolio.Text = Folio.ToString(); TxtFolio.Text = Folio.ToString();
TxtDDImporte.Attributes.Add("onblur",$"validaDeudoresDiversos({CveMonedaCuentaPago});FormatoMoneda(this);"); TxtDDImporte.Attributes.Add("onblur", $"validaDeudoresDiversos({CveMonedaCuentaPago});FormatoMoneda(this);");
UpDatos.Update(); UpDatos.Update();
} }
@@ -231,7 +234,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{ {
decimal ImporteBanco = TxtImporte.Text.ToDecimal(); decimal ImporteBanco = TxtImporte.Text.ToDecimal();
decimal ImporteMNBanco = ImporteBanco; decimal ImporteMNBanco = ImporteBanco;
decimal ImporteComplementaria = 0; decimal ImporteComplementaria = 0;
decimal TCPago = TxtTCPago.Text.ToDecimal(); decimal TCPago = TxtTCPago.Text.ToDecimal();
string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text; string Conc = TxtObservaciones.Text == "" ? TxtFolio.Text : TxtObservaciones.Text;
string Ref = 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) if (CveIE > 0)
{ {
decimal Importe; decimal Importe;
decimal ImporteMN; decimal ImporteMN;
decimal ImporteComision; decimal ImporteComision;
decimal ImporteComisionMN; decimal ImporteComisionMN;
decimal AcumImporteMN = 0; decimal AcumImporteMN = 0;
decimal ImporteBancosMN, ImporteAcreedorMN; decimal ImporteBancosMN, ImporteAcreedorMN;
bool TipoMovtoComision = false; bool TipoMovtoComision = false;
int CveConceptoDiferenciaCambiaria = 0; int CveConceptoDiferenciaCambiaria = 0;
//GUARDA PREPOLIZAS DETALLE //GUARDA PREPOLIZAS DETALLE
@@ -262,7 +265,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
ImporteAcreedorMN = Importe; ImporteAcreedorMN = Importe;
ImporteBancosMN = Importe; ImporteBancosMN = Importe;
ImporteComisionMN = ImporteComision; ImporteComisionMN = ImporteComision;
ImporteComplementaria = 0; ImporteComplementaria = 0;
if (gvr.FCTextBox("TxtComision").Text.ToDecimal() < 0) if (gvr.FCTextBox("TxtComision").Text.ToDecimal() < 0)
{ {
@@ -273,7 +276,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
else else
{ {
TipoMovtoComision = false; TipoMovtoComision = false;
} }
if (gvr.FCCheckBox("Chk").Checked) if (gvr.FCCheckBox("Chk").Checked)
{ {
@@ -308,7 +311,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
} }
else if (CveMonedaPago == 2 && tCveMoneda == 2) else if (CveMonedaPago == 2 && tCveMoneda == 2)
{ {
//ImporteComisionMN = ImporteComision; //ImporteComisionMN = ImporteComision;
//ImporteMN = Importe; //ImporteMN = Importe;
//ImporteComplementaria = (Importe * TC - Importe).RoundSQL(); //ImporteComplementaria = (Importe * TC - Importe).RoundSQL();
@@ -318,48 +321,48 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
//ImporteComplementaria = ImporteComplementaria.RoundSQL(); //ImporteComplementaria = ImporteComplementaria.RoundSQL();
ImporteComisionMN = ImporteComisionMN.RoundSQL(); ImporteComisionMN = ImporteComisionMN.RoundSQL();
ImporteComision = ImporteComision.RoundSQL(); ImporteComision = ImporteComision.RoundSQL();
AcumImporteMN += ImporteMN; 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())) 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"; MsgError = "No se pudo insertar concepto de pago acreedor";
break; break;
} }
if (tCveMoneda > 1 && MsgError == "") if (tCveMoneda > 1 && MsgError == "")
{ {
ImporteComplementaria = (Importe * TC - Importe).RoundSQL(); 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"; MsgError = "No se pudo insertar concepto de acreedor complementaria";
} }
if (ImporteBancosMN != ImporteAcreedorMN && MsgError == "") if (ImporteBancosMN != ImporteAcreedorMN && MsgError == "")
{ {
bool TipoMovto = false; bool TipoMovto = false;
if (TCPago > TC) if (TCPago > TC)
{ {
CveConceptoDiferenciaCambiaria = 65; CveConceptoDiferenciaCambiaria = 65;
TipoMovto = false; TipoMovto = false;
} }
else if (TCPago < TC) else if (TCPago < TC)
{ {
CveConceptoDiferenciaCambiaria = 64; CveConceptoDiferenciaCambiaria = 64;
TipoMovto = true; 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"; 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(); ImporteComisionMN = (ImporteComision * TCPago).RoundSQL();
int tTipoConceptoOtro = 255; int tTipoConceptoOtro = 255;
//if (DdlOtrosPagos.SelectedValue == "3") tTipoConceptoOtro = 43; //deudores diversos //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"; MsgError = "No se pudo insertar concepto de pago acreedor";
break; break;
@@ -389,30 +392,30 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
//CveMonedaPago //CveMonedaPago
ImporteComision = ImporteComision.RoundSQL(); ImporteComision = ImporteComision.RoundSQL();
ImporteComisionMN = (ImporteComision * TCPago).RoundSQL() ; ImporteComisionMN = (ImporteComision * TCPago).RoundSQL();
ImporteComisionMN = (ImporteComision * TCPago).RoundSQL(); ImporteComisionMN = (ImporteComision * TCPago).RoundSQL();
int tTipoConceptoOtro = 43; //deudores diversos 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())) 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) 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 //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 else
@@ -426,15 +429,15 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
} }
//VALIDA QUE CUADRE LA PREPOLIZA //VALIDA QUE CUADRE LA PREPOLIZA
Usuario UA = UsuarioActual; 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) if (ObjMov.ValorPolizaDescuadre > 0)
{ {
MsgError = ObjMov.MensajePolizaDescuadre; MsgError = ObjMov.MensajePolizaDescuadre;
ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas"); ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas");
} }
} }
if (MsgError.Equals("")) if (MsgError.Equals(""))
{ {
@@ -445,10 +448,10 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
} }
//GUARDA COMPROBANTE //GUARDA COMPROBANTE
if (!filemove.Equals("")) if (!filemove.Equals(""))
{ {
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false); filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
} }
System.IO.FileInfo archivo = null; System.IO.FileInfo archivo = null;
if (DdlTipoTransaccion.SelectedValue.ToEntero().Contiene(2, 8, 9)) 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(@"<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=""/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>"); Msg.AppendFormat($"<a class='Texto' target='_blank' href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=PREPO&CvePrePoliza={CvePrePoliza}")}'>Imprimir</a>");
} }
else else
{ {
@@ -542,8 +545,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
} }
private void AsignaCuentaProveedor(int CveProveedor) private void AsignaCuentaProveedor(int CveProveedor)
{ {
} }
protected void BtnGuardarPrestamo_Click(object sender, EventArgs e) protected void BtnGuardarPrestamo_Click(object sender, EventArgs e)
@@ -597,8 +600,8 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (CveMoneda != 1) if (CveMoneda != 1)
{ {
ImporteMN = Importe; ImporteMN = Importe;
ImporteComplementaria = Importe * TC - 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); 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"; MsgError = "No se pudo insertar concepto de bancos";
} }
@@ -619,23 +622,23 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
if (CveMoneda != 1) 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"; 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"; 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"; MsgError = "No se pudo insertar concepto de acreedor complementaria";
} }
} }
else 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"; MsgError = "No se pudo insertar concepto de acreedor";
} }
@@ -653,14 +656,14 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
//VALIDA QUE CUADRE LA POLIZA //VALIDA QUE CUADRE LA POLIZA
Usuario UA = UsuarioActual; 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) if (ObjMov.ValorPolizaDescuadre > 0)
{ {
MsgError = ObjMov.MensajePolizaDescuadre; MsgError = ObjMov.MensajePolizaDescuadre;
ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas"); ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas");
} }
} }
if (MsgError.Equals("")) if (MsgError.Equals(""))
{ {
@@ -808,7 +811,7 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
divDD.Visible = false; divDD.Visible = false;
if (DdlOtrosPagos.SelectedValue == "2") if (DdlOtrosPagos.SelectedValue == "2")
{ {
TxtOtrosImportes.Visible = true; TxtOtrosImportes.Visible = true;
TxtTotal.Visible = true; TxtTotal.Visible = true;
GvMovAcreedor.Columns[8].Visible = true; GvMovAcreedor.Columns[8].Visible = true;
TxtOtrosImportes.Text = ""; TxtOtrosImportes.Text = "";
@@ -818,14 +821,14 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
else else
{ {
if (DdlOtrosPagos.SelectedValue == "3") if (DdlOtrosPagos.SelectedValue == "3")
{ {
TxtDDImporte.Text = ""; TxtDDImporte.Text = "";
divDD.Visible = true; divDD.Visible = true;
RegistraScript($"$get('TxtImporte').value = FormatoNumero(SumaValores({CveMonedaCuentaPago}), 2);"); RegistraScript($"$get('TxtImporte').value = FormatoNumero(SumaValores({CveMonedaCuentaPago}), 2);");
} }
TxtOtrosImportes.Visible = false; TxtOtrosImportes.Visible = false;
TxtTotal.Visible = false; TxtTotal.Visible = false;
GvMovAcreedor.Columns[8].Visible = false; GvMovAcreedor.Columns[8].Visible = false;
} }
UpDatos.Update(); UpDatos.Update();
UpMovAcreedor.Update(); UpMovAcreedor.Update();
@@ -835,4 +838,93 @@ public partial class Bancos_PagoAcreedor : ClsPaginas
{ {
CargaReporte(); 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> <label>Tipo Movimiento:</label>
</div> </div>
<div class="col-md-8"> <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: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> <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> <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="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="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> <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> </div>
@@ -209,7 +216,8 @@
<label>Tipo Movimiento:</label> <label>Tipo Movimiento:</label>
</div> </div>
<div class="col-md-8"> <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: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> <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> <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="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="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> <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>
</div> </div>

View File

@@ -56,6 +56,9 @@ public partial class Bancos_PagoDeudor : ClsPaginas
TxtImporte.Attributes.Add("disabled", "disabled"); TxtImporte.Attributes.Add("disabled", "disabled");
CargarCentrosDeCosto(null, null, null, LblSubProyecto); CargarCentrosDeCosto(null, null, null, LblSubProyecto);
LblSubProyecto2.Text = LblSubProyecto.Text; LblSubProyecto2.Text = LblSubProyecto.Text;
ValidaFechaDocumentoDiasPosterioresPrestamo();
ValidaFechaDocumentoDiasPosteriores();
} }
} }
@@ -372,6 +375,48 @@ public partial class Bancos_PagoDeudor : ClsPaginas
if (ObjComp != null) if (ObjComp != null)
ObjComp.Dispose(); 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 #endregion
#region "PAGO DEUDORES" #region "PAGO DEUDORES"
@@ -830,4 +875,52 @@ public partial class Bancos_PagoDeudor : ClsPaginas
TxtFechaDocumento.Attributes.Remove("onchange"); TxtFechaDocumento.Attributes.Remove("onchange");
DivImporteME.Visible = false; 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: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> <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: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="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="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> <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" <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> 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> <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> <%--<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> <ajax:ValidatorCalloutExtender ID="VCOFechaDocumento4" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtFechaDocumentoMenor" Width="350px"></ajax:ValidatorCalloutExtender>--%>
</div> </div>
</div> </div>
@@ -341,8 +342,7 @@
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" /> <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: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: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" 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:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox> <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+" /> <ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" />
</td> </td>

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> <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="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="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> </div>
</td> </td>
</tr> </tr>

View File

@@ -78,6 +78,7 @@ Partial Class Bancos_Transferencias
DdlTipoMovto_SelectedIndexChanged(Nothing, Nothing) DdlTipoMovto_SelectedIndexChanged(Nothing, Nothing)
End If End If
End Sub End Sub
@@ -616,6 +617,9 @@ Partial Class Bancos_Transferencias
RFVTxtPaguese.Visible = True RFVTxtPaguese.Visible = True
End If End If
End If End If
ValidaFechaDocumentoDiasPosteriores()
UPPDatos.Update() UPPDatos.Update()
End Sub End Sub
@@ -662,4 +666,36 @@ Partial Class Bancos_Transferencias
DdlCajaChica.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlCajaChica.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub 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 End Class

View File

@@ -539,13 +539,13 @@ Partial Class Contratos_FacturacionMasiva
'Dim ObjCliente As New ClsClientes() '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.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 ' If ObjCliente.DtResultados.Rows.Count > 0 Then
' ObjFactura.CveFormaPago33 = ObjCliente.CveFormaPago33 ' ObjFactura.CveFormaPago = ObjCliente.CveFormaPago
' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago33}") ' ObjFactura.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago33}") ' ObjFactura.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", $"CveFormaPago = {ObjCliente.CveFormaPago}")
' ObjFactura.CveMetodoPago33 = ObjCliente.CveMetodoPago33 ' ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}") ' ObjFactura.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago33}") ' ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {ObjCliente.CveMetodoPago}")
' ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI ' ObjFactura.CveUsoCFDI = ObjCliente.CveUsoCFDI
' ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}") ' ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", $"CveUsoCFDI = {ObjCliente.CveUsoCFDI}")

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -2455,22 +2455,22 @@ Partial Class Inventarios_RecepcionUsados
Dim ObjCliente As New ClsClientes Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then If ObjCliente.DtResultados.Rows.Count > 0 Then
Me.ObjRemisionNC.CveFormaPago = ObjCliente.CveFormaPago33 Me.ObjRemisionNC.CveFormaPago = ObjCliente.CveFormaPago
'Me.ObjRemisionNC.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) 'Me.ObjRemisionNC.FormaPago33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPago", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
'Me.ObjRemisionNC.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago33)) 'Me.ObjRemisionNC.FormaPagoSAT33 = GlobalDTVtaFormaPago.FiltroPrimeroValor("ClaveFormaPagoSAT", String.Format("CveFormaPago = {0}", ObjCliente.CveFormaPago))
Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago33 Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago
'Me.ObjRemisionNC.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) 'Me.ObjRemisionNC.MetodoPago33 = GlobalDTVtaMetodoPago.FiltroPrimeroValor("MetodoPago", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
'Me.ObjRemisionNC.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)) 'Me.ObjRemisionNC.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago))
Me.ObjRemisionNC.CveUsoCFDI = ObjCliente.CveUsoCFDI Me.ObjRemisionNC.CveUsoCFDI = ObjCliente.CveUsoCFDI
'Me.ObjRemisionNC.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", 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.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 '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 ' If DtMetodoPago IsNot Nothing Then

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

View File

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

View File

@@ -1426,7 +1426,7 @@
<div class="modal-body"> <div class="modal-body">
<ul> <ul>
<li>{"FolioFactura"}</li> <li>{"SerieFolio"}</li>
<li>{"TipoDocumento"}</li> <li>{"TipoDocumento"}</li>
<li>{"ImporteFactura"}</li> <li>{"ImporteFactura"}</li>
<li>{"FechaFactura"}</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, If Not ObjVentas.UpdateVentas(SubTotalNew, 0, IVANew, 0, TotalNew, CveMonedaNew, TC, FechaVenta, DescripcionNew,
UsuarioActual.CveEmpresa, CveVentaRemision, UsuarioActual.CveEmpresa, CveVentaRemision,
Vigencia:=FechaVenta, CondicionesPago:=-1, Vigencia:=FechaVenta, CondicionesPago:=-1,
PedidoContrato:="-1", AtencionA:="-1", CveMetodoPago33:=-1, PedidoContrato:="-1", AtencionA:="-1", CveMetodoPago:=-1,
CveFormaPago33:=-1, TipoDocto:="Rem", CveCliente:=CveClienteNew, CveClienteSucursal:=-1, CveFormaPago33:=-1, TipoDocto:="Rem", CveCliente:=CveClienteNew, CveClienteSucursal:=-1,
OrdenCompra:="-1", RetIVA:=0, RetISR:=0, Kilometraje:=0D, CveUsoCFDi:=-1, OrdenCompra:="-1", RetIVA:=0, RetISR:=0, Kilometraje:=0D, CveUsoCFDi:=-1,
CveVendedor:=-1, ServicioDomicilio:=False, CveMedico:=-1, CveProcedimiento:=-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="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IVA" DataField="IVA" 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="Original" DataField="Original" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Saldo" DataField="SaldoConImpuestos" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField HeaderText="Devolución" ItemStyle-HorizontalAlign="Center" Visible="false"> <asp:BoundField HeaderText="Mon" DataField="Abreviatura" ItemStyle-Width="60px" />
<asp:TemplateField HeaderText="Devolución" ItemStyle-HorizontalAlign="Center" Visible="false" ItemStyle-Width="80px">
<ItemTemplate> <ItemTemplate>
<asp:CheckBox ID="chkDevolver" runat="server" Visible="false" CssClass="CssSelector" onclick="FCSumaTotalesNCAnticipos()" /> <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" /> <asp:HyperLink ID="HLDevolverDinero" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-usd'></i>" runat="server" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </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>--%>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>

View File

@@ -922,7 +922,7 @@ Partial Class Clientes
LnkPersonaFisica.Visible = True LnkPersonaFisica.Visible = True
End If End If
InicializaDevolverDinero() 'InicializaDevolverDinero()
TxtFechaICredito.Text = NowADS().AddYears(-2).ToShortDateString() TxtFechaICredito.Text = NowADS().AddYears(-2).ToShortDateString()
TxtFechaFCredito.Text = NowADS().ToShortDateString() TxtFechaFCredito.Text = NowADS().ToShortDateString()
@@ -1632,7 +1632,7 @@ Partial Class Clientes
DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString()) DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString())
DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago.ToString()) DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago.ToString())
'DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString()) 'DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago.ToString())
CargaFormaDePago(ObjClientes.CveFormaPago) CargaFormaDePago(ObjClientes.CveFormaPago)
If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal) If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
@@ -1956,12 +1956,8 @@ Partial Class Clientes
DtClientesAnticipo = Nothing DtClientesAnticipo = Nothing
GVAnticiposHistorial.DataSource = Nothing GVAnticiposHistorial.DataSource = Nothing
DtAnticipoHistorial = Nothing DtAnticipoHistorial = Nothing
End If End If
ObjMovtos.Dispose() ObjMovtos.Dispose()
'If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then
' GVAnticipos.Columns(7).Visible = True
'End If
GVAnticipos.DataBind() GVAnticipos.DataBind()
GVAnticiposHistorial.DataBind() GVAnticiposHistorial.DataBind()
@@ -2279,7 +2275,7 @@ Partial Class Clientes
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
Cuerpo = Cuerpo.Replace("{""FolioFactura""}", HdnSerieFolio.Value.ToString()) Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString())
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
@@ -2297,7 +2293,7 @@ Partial Class Clientes
Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
Asunto = Asunto.Replace("{""FolioFactura""}", HdnSerieFolio.Value.ToString()) Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString())
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
@@ -2318,7 +2314,7 @@ Partial Class Clientes
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
Cuerpo = Cuerpo.Replace("{""FolioFactura""}", HdnSerieFolio.Value.ToString()) Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString())
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Cuerpo = Cuerpo.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero()) Cuerpo = Cuerpo.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -2335,7 +2331,7 @@ Partial Class Clientes
Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
Asunto = Asunto.Replace("{""FolioFactura""}", HdnSerieFolio.Value.ToString()) Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio.Value.ToString())
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Asunto = Asunto.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero()) Asunto = Asunto.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -2696,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(), 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("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("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 ErrorProceso = True
Exit For Exit For
End If End If
@@ -3348,7 +3344,7 @@ Partial Class Clientes
DdlResponsableSucursal.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveResponsableCobranza").ToString()) DdlResponsableSucursal.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveResponsableCobranza").ToString())
DdlSucursalUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").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()) DdlSucursalFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString())
txtLg.Text = ObjCliente.DtResultados.Rows(0)("LG").ToString() txtLg.Text = ObjCliente.DtResultados.Rows(0)("LG").ToString()
@@ -5647,7 +5643,7 @@ Partial Class Clientes
TempDTSucursales.Columns.Add("CveAlmacenAsignado", Type.GetType("System.Int32")) TempDTSucursales.Columns.Add("CveAlmacenAsignado", Type.GetType("System.Int32"))
TempDTSucursales.Columns.Add("CveUsoCFDI", Type.GetType("System.Int32")) TempDTSucursales.Columns.Add("CveUsoCFDI", Type.GetType("System.Int32"))
TempDTSucursales.Columns.Add("CveFormaPago33", Type.GetType("System.Int32")) TempDTSucursales.Columns.Add("CveFormaPago33", Type.GetType("System.Int32"))
TempDTSucursales.Columns.Add("CveMetodoPago33", Type.GetType("System.Int32")) TempDTSucursales.Columns.Add("CveMetodoPago", Type.GetType("System.Int32"))
TempDTSucursales.Columns.Add("Correo", Type.GetType("System.String")) TempDTSucursales.Columns.Add("Correo", Type.GetType("System.String"))
TempDTSucursales.Columns.Add("CorreoCotizacion", Type.GetType("System.String")) TempDTSucursales.Columns.Add("CorreoCotizacion", Type.GetType("System.String"))
TempDTSucursales.Columns.Add("LimiteCredito", Type.GetType("System.Decimal")) TempDTSucursales.Columns.Add("LimiteCredito", Type.GetType("System.Decimal"))
@@ -5688,7 +5684,7 @@ Partial Class Clientes
RowSucursal("CveUsoCFDI") = DdlSucursalUsoCFDI.SelectedValue.ToEntero() RowSucursal("CveUsoCFDI") = DdlSucursalUsoCFDI.SelectedValue.ToEntero()
RowSucursal("CveFormaPago33") = DdlSucursalFormaPago33.SelectedValue.ToEntero() RowSucursal("CveFormaPago33") = DdlSucursalFormaPago33.SelectedValue.ToEntero()
RowSucursal("CveMetodoPago33") = DdlSucursalMetodoPago33.SelectedValue.ToEntero() RowSucursal("CveMetodoPago") = DdlSucursalMetodoPago33.SelectedValue.ToEntero()
RowSucursal("LimiteCredito") = TxtLimiteCreditoSucursal.Text.ToDecimal RowSucursal("LimiteCredito") = TxtLimiteCreditoSucursal.Text.ToDecimal
RowSucursal("CveResponsableCobranza") = DdlResponsableSucursal.SelectedValue.ToEntero RowSucursal("CveResponsableCobranza") = DdlResponsableSucursal.SelectedValue.ToEntero
@@ -5742,7 +5738,7 @@ Partial Class Clientes
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
Cuerpo = Cuerpo.Replace("{""FolioFactura""}", HdnSerieFolio2.Value.ToString()) Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString())
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Cuerpo = Cuerpo.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero()) Cuerpo = Cuerpo.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -5760,7 +5756,7 @@ Partial Class Clientes
Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
Asunto = Asunto.Replace("{""FolioFactura""}", HdnSerieFolio2.Value.ToString()) Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString())
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Asunto = Asunto.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero()) Asunto = Asunto.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -5780,7 +5776,7 @@ Partial Class Clientes
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
Cuerpo = Cuerpo.Replace("{""FolioFactura""}", HdnSerieFolio2.Value.ToString()) Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString())
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Cuerpo = Cuerpo.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Cuerpo = Cuerpo.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero()) Cuerpo = Cuerpo.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -5793,13 +5789,12 @@ Partial Class Clientes
End If End If
End If End If
If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) Asunto = Asunto.Replace("{""NombreCliente""}", LtlCliente.Text.Trim)
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
Asunto = Asunto.Replace("{""FolioFactura""}", HdnSerieFolio2.Value.ToString()) Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString())
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Asunto = Asunto.Replace("{""FechaFactura""}", Dr("Fecha").ToString().ToDate().ToShortDateString())
Asunto = Asunto.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero()) Asunto = Asunto.Replace("{""ImporteFactura""}", Dr("Total").ToString().FormatoNumero())
@@ -8087,7 +8082,7 @@ Partial Class Clientes
#Region " DEVOLVER DINERO ANT/NC " #Region " DEVOLVER DINERO ANT/NC "
Private Sub InicializaDevolverDinero() Private Sub InicializaDevolverDinero()
If UsuarioActual.TienePermisoProceso(247) Then If UsuarioActual.TienePermisoProceso(247) Then
GVAnticipos.Columns(6).Visible = True GVAnticipos.Columns(7).Visible = True
End If End If
End Sub End Sub
#End Region #End Region
@@ -10778,6 +10773,7 @@ Partial Class Clientes
TxtDevRedondeo.Text = "" TxtDevRedondeo.Text = ""
DdlCuentaDeposito.DataSource = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente) DdlCuentaDeposito.DataSource = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
DdlCuentaDeposito.DataBind() DdlCuentaDeposito.DataBind()
GVAnticipos.Columns(7).Visible = True
'Dim Dep As New ClsGenerales 'Dim Dep As New ClsGenerales
'If Dep.GetCuentasDepositos(CveCliente:=CveCliente, CveEmpresa:=UsuarioActual.CveEmpresa) Then 'If Dep.GetCuentasDepositos(CveCliente:=CveCliente, CveEmpresa:=UsuarioActual.CveEmpresa) Then
' DdlCuentaDeposito.DataSource = Dep.DtResultados ' DdlCuentaDeposito.DataSource = Dep.DtResultados

View File

@@ -205,10 +205,14 @@
</div> </div>
<div class="row" id="divAnticipo" runat="server" visible="false"> <div class="row" id="divAnticipo" runat="server" visible="false">
<div class="col-md-2">Anticipo:</div> <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" /> <asp:TextBox ID="TxtAnticipo" runat="server" Width="100px" ClientIDMode="Static" />
</div> </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 class="col-md-3" runat="server" id="Div4" visible="false">
</div> </div>
</div> </div>
@@ -831,7 +835,7 @@
var chkPesosBancos = $get("ChkPagarPesos"); var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares"); var chkDolaresBancos = $get("ChkPagarDolares");
debugger;
if (t.checked) { if (t.checked) {
txt.value = FormatoNumero(importe, 2); 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 Importe = 0;
var Comision = 0.00; var Comision = 0.00;
var topLevelElem = document.getElementById("form1"); var topLevelElem = document.getElementById("form1");
@@ -945,7 +956,7 @@
$get('TxtAnticipo').value = 0.00 $get('TxtAnticipo').value = 0.00
} }
else { else {
Importe = Importe + ToDouble($get('TxtAnticipo').value); Importe = Importe + ToDouble($get('TxtAnticipo').value);
} }
} }
if ($get('TxtPrestamoImporte') != null) { if ($get('TxtPrestamoImporte') != null) {

View File

@@ -4,6 +4,7 @@
Imports System.Data Imports System.Data
Imports ADSTimbrado Imports ADSTimbrado
Imports Extensiones Imports Extensiones
Imports Org.BouncyCastle.Ocsp
Partial Class Ventas_ClientesAbonar Partial Class Ventas_ClientesAbonar
Inherits ClsPaginas Inherits ClsPaginas
@@ -343,6 +344,13 @@ Partial Class Ventas_ClientesAbonar
DtPrestamos = CargaPrestamos(1) DtPrestamos = CargaPrestamos(1)
End If 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) CargaDatos(tCveMoneda)
Else Else
Alert("El Cliente Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia) 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 MsgError As String = ""
Dim NCGeneradas As New List(Of RespuestaNotaCredrito) Dim NCGeneradas As New List(Of RespuestaNotaCredrito)
Dim ListaFacturasGenerarNC As New List(Of Modelos.Factura) 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 Dim ImporteSeleccionado As Decimal = 0
'02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR '02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR
@@ -1176,12 +1185,79 @@ Partial Class Ventas_ClientesAbonar
End If End If
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 If MsgError = "" AndAlso Not ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then
MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
'If ObjMov.ValorPolizaDescuadre > 0 Then 'If ObjMov.ValorPolizaDescuadre > 0 Then
' MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia ' MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
'End If 'End If
End If End If
Else Else
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
@@ -1326,6 +1402,25 @@ Partial Class Ventas_ClientesAbonar
End If End If
Next 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 If ChkComplementoPago.Checked Then
Dim TextoComplementoPago As String = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago) Dim TextoComplementoPago As String = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
StrMsg.AppendFormat("<br/><br/>{0}", TextoComplementoPago) StrMsg.AppendFormat("<br/><br/>{0}", TextoComplementoPago)
@@ -1352,6 +1447,26 @@ Partial Class Ventas_ClientesAbonar
End Sub 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 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 = "" Dim MsgError As String = ""
If CveMonedaPago = 2 Then If CveMonedaPago = 2 Then

View File

@@ -2681,11 +2681,11 @@ Partial Class PV
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString) DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
'DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.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.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty) DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString) DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago.ToString)
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString) 'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString) DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
@@ -2906,8 +2906,8 @@ Partial Class PV
'CveMetodoPagoCliente = ObjCliente.CveMetodoPago 'CveMetodoPagoCliente = ObjCliente.CveMetodoPago
DdlMetodoPago.SelectedValueExist(CveMetodoPagoCliente.ToString) DdlMetodoPago.SelectedValueExist(CveMetodoPagoCliente.ToString)
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33) DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago)
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33) DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago)
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI) DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then

View File

@@ -1139,7 +1139,7 @@ Partial Class Ventas_PVCobranza
For Each Dr As DataRow In ObjFactura.DtRemisionesPS.Rows 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(), 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(), 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 Next
If Not ValidateString(ObservacionesAlmacen.ToLower(), "parcial") Then If Not ValidateString(ObservacionesAlmacen.ToLower(), "parcial") Then
@@ -1148,14 +1148,12 @@ Partial Class Ventas_PVCobranza
ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero() ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero()
End If End If
ObjFactura.CalculaTotales() ObjFactura.CalculaTotales()
ObjFactura.PreparaTimbre() ObjFactura.PreparaTimbre()
If HdnTipoAmortizacion.Value = "4" Then If HdnTipoAmortizacion.Value = "4" Then
DtAnticipos.Columns.Add("CveVenta", GetType(Integer)) DtAnticipos.Columns.Add("CveVenta", GetType(Integer))
DtAnticipos.Columns.Add("Importe", GetType(Decimal)) DtAnticipos.Columns.Add("Importe", GetType(Decimal))
DtAnticipos.Columns.Add("CveConceptoContable", GetType(Integer)) DtAnticipos.Columns.Add("CveConceptoContable", GetType(Integer))

View File

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

View File

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