Portal de Prosepago
This commit is contained in:
@@ -309,7 +309,7 @@
|
||||
<asp:PostBackTrigger ControlID="LbExcelCxCActivas" />
|
||||
</Triggers>
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCxC" runat="server" DataKeyNames="CveVenta,Folio,Original,Saldo,CveMoneda,TipoCambio,CveSubProyecto,IVA,RetIVA,RetISR,IEPS" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" ToolTip="Listado de CxC" CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvCxC" runat="server" DataKeyNames="CveVenta,Folio,Original,Saldo,CveMoneda,TipoCambio,CveSubProyecto,IVA,RetIVA,RetISR,IEPS,PorcentajeIVA,PorcentajeIEPS,PorcentajeRetIVA,PorcentajeRetISR" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" ToolTip="Listado de CxC" CssClass="table table-striped table-advance table-hover ScrollAD" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Factura</HeaderTemplate>
|
||||
@@ -1882,15 +1882,40 @@
|
||||
<h4 class="modal-title">Confirmación de Pago</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-horizontal">
|
||||
<div class="row">
|
||||
<label class="control-label col-sm-2 label-titulo">Facturas:</label>
|
||||
<div class="col-sm-10">
|
||||
<asp:Label ID="LbFactura" Text="" CssClass="form-control-static" runat="server" />
|
||||
<label class="control-label col-sm-3 label-titulo">Nombre:</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">#</span>
|
||||
<asp:TextBox ID="TxtNombreCompleto" ClientIDMode="Static" Text="" CssClass="form-control input-sm" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<label class="control-label col-sm-2 label-titulo">Pago:</label>
|
||||
<div class="col-sm-4">
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<label class="control-label col-sm-3 label-titulo">Concepto:</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">#</span>
|
||||
<asp:TextBox ID="TxtConcepto" ClientIDMode="Static" Text="" CssClass="form-control input-sm" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<label class="control-label col-sm-3 label-titulo">Referencia:</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">#</span>
|
||||
<asp:TextBox ID="TxtReferencia" ClientIDMode="Static" Text="" CssClass="form-control input-sm" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<label class="control-label col-sm-3 label-titulo">Importe:</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">$</span>
|
||||
<asp:TextBox ID="TxtImporte" ClientIDMode="Static" Text="" Enabled="false" CssClass="form-control input-sm" runat="server" />
|
||||
@@ -1900,18 +1925,28 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtImporte" runat="server" HighlightCssClass="vco" TargetControlID="RVTxtImporte" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="DivPagoDolares" class="row" style="margin-top: 20px;" runat="server">
|
||||
<div class="col-sm-12 text-right">
|
||||
<p>
|
||||
*El pago incluye facturas en dolares. Las cuales se calcularon con el TC del día <b>$
|
||||
|
||||
*El pago incluye facturas en dolares. Las cuales se calcularon con el TC del día <b>$
|
||||
<asp:Literal ID="LtTC" Text="" runat="server" />
|
||||
</b>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<label class="control-label col-sm-3 label-titulo">Correo:</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">@</span>
|
||||
<asp:TextBox ID="TxtCorreo" ClientIDMode="Static" Text="" CssClass="form-control input-sm" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="CancelarProsePago" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
|
||||
@@ -564,9 +564,13 @@ Partial Class Ventas_PortalCliente
|
||||
DtPagos.Columns.Add("TCVenta", GetType(Decimal))
|
||||
DtPagos.Columns.Add("ImporteVenta", GetType(Decimal))
|
||||
DtPagos.Columns.Add("IVA", GetType(Decimal))
|
||||
DtPagos.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
||||
DtPagos.Columns.Add("RetIVA", GetType(Decimal))
|
||||
DtPagos.Columns.Add("RetISR", GetType(Decimal))
|
||||
DtPagos.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
|
||||
DtPagos.Columns.Add("RetISR", GetType(Decimal))
|
||||
DtPagos.Columns.Add("PorcentajeRetISR", GetType(Decimal))
|
||||
DtPagos.Columns.Add("IEPS", GetType(Decimal))
|
||||
DtPagos.Columns.Add("PorcentajeIEPS", GetType(Decimal))
|
||||
DtPagos.Columns.Add("TCPago", GetType(Decimal))
|
||||
DtPagos.Columns.Add("ImportePago", GetType(Decimal))
|
||||
DtPagos.Columns.Add("ImportePagoMX", GetType(Decimal))
|
||||
@@ -584,11 +588,14 @@ Partial Class Ventas_PortalCliente
|
||||
Dr("CveMoneda") = Gvr.DataKey("CveMoneda").ToEntero
|
||||
Dr("TCVenta") = Gvr.DataKey("TipoCambio").ToDecimal
|
||||
Dr("ImporteVenta") = Gvr.DataKey("Original").ToDecimal
|
||||
Dr("IVA") = Gvr.DataKey("IVA").ToDecimal
|
||||
Dr("IVA") = Gvr.DataKey("IVA").ToDecimal
|
||||
Dr("PorcentajeIVA") = Gvr.DataKey("PorcentajeIVA").ToDecimal
|
||||
Dr("RetIVA") = Gvr.DataKey("RetIVA").ToDecimal
|
||||
Dr("RetISR") = Gvr.DataKey("RetISR").ToDecimal
|
||||
Dr("IEPS") = Gvr.DataKey("IEPS").ToDecimal
|
||||
|
||||
Dr("PorcentajeRetIVA") = Gvr.DataKey("PorcentajeRetIVA").ToDecimal
|
||||
Dr("RetISR") = Gvr.DataKey("RetISR").ToDecimal
|
||||
Dr("PorcentajeRetISR") = Gvr.DataKey("PorcentajeRetISR").ToDecimal
|
||||
Dr("IEPS") = Gvr.DataKey("IEPS").ToDecimal
|
||||
Dr("PorcentajeIEPS") = Gvr.DataKey("PorcentajeIEPS").ToDecimal
|
||||
Dr("TCPago") = If(Gvr.DataKey("CveMoneda").ToEntero = 1, 1, TCPago)
|
||||
Dr("ImportePago") = Gvr.DataKey("Saldo").ToDecimal
|
||||
If Gvr.DataKey("CveMoneda").ToEntero > 1 Then
|
||||
@@ -615,10 +622,14 @@ Partial Class Ventas_PortalCliente
|
||||
DivPagoDolares.Visible = False
|
||||
End If
|
||||
|
||||
LbFactura.Text = Facturas.Substring(0, Facturas.Length - 2)
|
||||
'LbFactura.Text = Facturas.Substring(0, Facturas.Length - 2)
|
||||
TxtImporte.Text = DtPagos.SUM("ImportePagoMX").FormatoNumero(2)
|
||||
RVTxtImporte.MaximumValue = DtPagos.SUM("ImportePagoMX").FormatoNumero(2)
|
||||
|
||||
TxtConcepto.Text = "Pago de facturas"
|
||||
TxtReferencia.Text = CveCliente.ToString
|
||||
TxtNombreCompleto.Text = LtlCliente.Text
|
||||
|
||||
RegistraScript("$('#ModalProsePago').modal()")
|
||||
|
||||
UpProsePago.Update()
|
||||
@@ -644,11 +655,11 @@ Partial Class Ventas_PortalCliente
|
||||
End Select
|
||||
|
||||
Dim myNameValueCollection As New NameValueCollection()
|
||||
Dim Nombre = LimpiaTextoSoloLetras(LtlCliente.Text)
|
||||
Dim Facturas = LimpiaTextoSoloLetrasNumeros(LbFactura.Text.Replace(",", " "))
|
||||
Dim Nombre = LimpiaTextoSoloLetras(TxtNombreCompleto.Text)
|
||||
|
||||
myNameValueCollection.Add("nom", Nombre.Substring(0, If(Nombre.Length > 200, 200, Nombre.Length)))
|
||||
myNameValueCollection.Add("con", $"Pago de facturas {Facturas.Substring(0, If(Facturas.Length > 180, 180, Facturas.Length))}")
|
||||
myNameValueCollection.Add("ref", CveCliente.ToString)
|
||||
myNameValueCollection.Add("con", TxtConcepto.Text)
|
||||
myNameValueCollection.Add("ref", TxtReferencia.Text)
|
||||
myNameValueCollection.Add("imp", TxtImporte.Text)
|
||||
myNameValueCollection.Add("ema", UsuarioActual.Usuario) '
|
||||
myNameValueCollection.Add("urlOk", $"{Request.Url.GetLeftPart(UriPartial.Authority)}/PortalCliente/PortalCliente.aspx?okpp=1&p={Parametro}")
|
||||
@@ -746,7 +757,7 @@ Partial Class Ventas_PortalCliente
|
||||
' PREPOLIZA
|
||||
Dim CvePlantillaPoliza = 11
|
||||
Dim FechaMovimiento As Date = Now
|
||||
Dim Concepto = ""
|
||||
Dim Concepto = "Prosepago"
|
||||
Dim DtConceptos As New DataTable
|
||||
Dim CveMonedaPago = 1
|
||||
|
||||
@@ -764,9 +775,13 @@ Partial Class Ventas_PortalCliente
|
||||
Dim CveMonedaVenta = 1
|
||||
Dim TCVenta = 0.0D
|
||||
Dim IVAVenta = 0.0D
|
||||
Dim RetIVAVenta = 0.0D
|
||||
Dim PorcentajeIVA = 0.0D
|
||||
Dim RetIVAVenta = 0.0D
|
||||
Dim PorcentajeRetIVA = 0.0D
|
||||
Dim RetISRVenta = 0.0D
|
||||
Dim IEPSVenta = 0.0D
|
||||
Dim PorcentajeRetISR = 0.0D
|
||||
Dim IEPSVenta = 0.0D
|
||||
Dim PorcentajeIEPS = 0.0D
|
||||
Dim TCPago = 0.0D
|
||||
Dim PorcentajePago = 0.0D
|
||||
Dim ImportePago = 0.0D
|
||||
@@ -774,6 +789,7 @@ Partial Class Ventas_PortalCliente
|
||||
Dim TCGeneral = 0.0D
|
||||
Dim TCFluctuacion = 0.0D
|
||||
Dim CveProveedorContabilizar = -1
|
||||
Dim PorcentajeImpuesto As Decimal = 0
|
||||
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("PortalCliente/Pago-Prosepago", CvePlantillaPoliza, TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal, CveMonedaPago, FechaMovimiento, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
@@ -795,6 +811,7 @@ Partial Class Ventas_PortalCliente
|
||||
importeMX = 0
|
||||
IdCtaContable = 0
|
||||
CveCuenta = 0
|
||||
PorcentajeImpuesto = 0
|
||||
ConceptoMovimiento = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, LtlCliente.Text, DrPago("Factura").ToString, DrPago("Factura").ToString)
|
||||
'VALORES DE LA VENTA
|
||||
Referencia = DrPago("Factura").ToString
|
||||
@@ -802,18 +819,22 @@ Partial Class Ventas_PortalCliente
|
||||
CveVenta = DrPago("CveVenta").ToString.ToEntero
|
||||
CveMonedaVenta = DrPago("CveMoneda").ToString.ToEntero
|
||||
TCVenta = DrPago("TCVenta").ToString.ToDecimal
|
||||
IVAVenta = DrPago("IVA").ToString.ToDecimal
|
||||
RetIVAVenta = DrPago("RetIVA").ToString.ToDecimal
|
||||
RetISRVenta = DrPago("RetISR").ToString.ToDecimal
|
||||
IEPSVenta = DrPago("IEPS").ToString.ToDecimal
|
||||
IVAVenta = DrPago("IVA").ToString.ToDecimal
|
||||
PorcentajeIVA = DrPago("PorcentajeIVA").ToString.ToDecimal
|
||||
RetIVAVenta = DrPago("RetIVA").ToString.ToDecimal
|
||||
PorcentajeRetIVA = DrPago("PorcentajeRetIVA").ToString.ToDecimal
|
||||
RetISRVenta = DrPago("RetISR").ToString.ToDecimal
|
||||
PorcentajeRetISR = DrPago("PorcentajeRetISR").ToString.ToDecimal
|
||||
IEPSVenta = DrPago("IEPS").ToString.ToDecimal
|
||||
PorcentajeIEPS = DrPago("PorcentajeIEPS").ToString.ToDecimal
|
||||
TCPago = DrPago("TCPago").ToString.ToDecimal
|
||||
ImportePago = DrPago("ImportePago").ToString.ToDecimal
|
||||
ImportePagoMX = DrPago("ImportePagoMX").ToString.ToDecimal
|
||||
PorcentajePago = DrPago("ImportePago").ToString.ToDecimal / DrPago("ImporteVenta").ToString.ToDecimal 'EL IMPORTE PAGO ES EL IMPORTE QUE SE PAGÓ EN LA MONEDA ORIGINAL DE LA VENTA
|
||||
TCFluctuacion = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", TCVenta, TCPago)
|
||||
|
||||
|
||||
'CONFIGURACION POR CONCEPTO DE PREPOLIZA
|
||||
TCFluctuacion = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", TCVenta, TCPago)
|
||||
|
||||
|
||||
'CONFIGURACION POR CONCEPTO DE PREPOLIZA
|
||||
Select Case ConceptoContable
|
||||
Case 2 'PAGO CLIENTE
|
||||
ImporteMovimiento = ImportePago.RoundSQL()
|
||||
@@ -854,6 +875,7 @@ Partial Class Ventas_PortalCliente
|
||||
ImporteMovimiento = IVAVenta * PorcentajePago
|
||||
importeMX = ImporteMovimiento * TCVenta
|
||||
End If
|
||||
PorcentajeImpuesto = PorcentajeIVA
|
||||
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL()
|
||||
importeMX = importeMX.RoundSQL()
|
||||
@@ -871,6 +893,7 @@ Partial Class Ventas_PortalCliente
|
||||
ImporteMovimiento = IVAVenta * PorcentajePago
|
||||
importeMX = ImporteMovimiento * TCFluctuacion
|
||||
End If
|
||||
PorcentajeImpuesto = PorcentajeIVA
|
||||
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL()
|
||||
importeMX = importeMX.RoundSQL()
|
||||
@@ -888,6 +911,7 @@ Partial Class Ventas_PortalCliente
|
||||
ImporteMovimiento = RetIVAVenta * PorcentajePago
|
||||
importeMX = ImporteMovimiento * TCVenta
|
||||
End If
|
||||
PorcentajeImpuesto = PorcentajeRetIVA
|
||||
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL()
|
||||
importeMX = importeMX.RoundSQL()
|
||||
@@ -920,6 +944,7 @@ Partial Class Ventas_PortalCliente
|
||||
ImporteMovimiento = RetIVAVenta * PorcentajePago
|
||||
importeMX = ImporteMovimiento * TCFluctuacion
|
||||
End If
|
||||
PorcentajeImpuesto = PorcentajeRetIVA
|
||||
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL()
|
||||
importeMX = importeMX.RoundSQL()
|
||||
@@ -953,6 +978,7 @@ Partial Class Ventas_PortalCliente
|
||||
ImporteMovimiento = RetISRVenta * PorcentajePago
|
||||
importeMX = ImporteMovimiento * TCVenta
|
||||
End If
|
||||
PorcentajeImpuesto = PorcentajeRetISR
|
||||
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL()
|
||||
importeMX = importeMX.RoundSQL()
|
||||
@@ -986,6 +1012,7 @@ Partial Class Ventas_PortalCliente
|
||||
ImporteMovimiento = RetIVAVenta * PorcentajePago
|
||||
importeMX = ImporteMovimiento * TCFluctuacion
|
||||
End If
|
||||
PorcentajeImpuesto = PorcentajeRetISR
|
||||
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL()
|
||||
importeMX = importeMX.RoundSQL()
|
||||
@@ -1019,6 +1046,7 @@ Partial Class Ventas_PortalCliente
|
||||
ImporteMovimiento = IEPSVenta * PorcentajePago
|
||||
importeMX = ImporteMovimiento * TCVenta
|
||||
End If
|
||||
PorcentajeImpuesto = PorcentajeIEPS
|
||||
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL()
|
||||
importeMX = importeMX.RoundSQL()
|
||||
@@ -1035,7 +1063,8 @@ Partial Class Ventas_PortalCliente
|
||||
ElseIf CveMonedaVenta = 2 Then
|
||||
ImporteMovimiento = IEPSVenta * PorcentajePago
|
||||
importeMX = ImporteMovimiento * TCFluctuacion
|
||||
End If
|
||||
End If
|
||||
PorcentajeImpuesto = PorcentajeIEPS
|
||||
|
||||
ImporteMovimiento = ImporteMovimiento.RoundSQL()
|
||||
importeMX = importeMX.RoundSQL()
|
||||
@@ -1081,7 +1110,7 @@ Partial Class Ventas_PortalCliente
|
||||
|
||||
'AGREGA PREPOLIZA DETALLE
|
||||
If ImporteMovimiento <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, CveProveedorContabilizar, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TCGeneral) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, CveVenta, -1, CveSubProyecto, CveCliente, CveProveedorContabilizar, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TCGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||
TieneError = True
|
||||
MensajeError.Append("No se pudo insertar el detalle de la póliza<br>")
|
||||
Exit For
|
||||
@@ -3438,7 +3467,7 @@ Partial Class Ventas_PortalCliente
|
||||
|
||||
End Sub
|
||||
Private Sub EnviarCorreoPedido(ObjFactura As Modelos.Factura)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, ObjFactura.CveVenta, True, ObjFactura, ""))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(UsuarioActual, ObjFactura.CveVenta, True, ObjFactura))
|
||||
Hilo.Start()
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user