Cobro de caja, que se puedan registrar doble pago de tarjeta de Crédito/débito/transf.
This commit is contained in:
@@ -331,10 +331,10 @@
|
|||||||
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio,CondicionesPago,PlazoCobranza">
|
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio,CondicionesPago,PlazoCobranza">
|
||||||
<Columns>
|
<Columns>
|
||||||
<%--<asp:BoundField HeaderText="Atención" DataField="AtencionA" />--%>
|
<%--<asp:BoundField HeaderText="Atención" DataField="AtencionA" />--%>
|
||||||
<asp:TemplateField HeaderText="Atención/Cliente" ItemStyle-HorizontalAlign="Left" >
|
<asp:TemplateField HeaderText="Atención/Cliente" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label runat="server" ID="LblAtencionA" Font-Italic="true" Text='<%# Eval("AtencionA") %>' ></asp:Label><br />
|
<asp:Label runat="server" ID="LblAtencionA" Font-Italic="true" Text='<%# Eval("AtencionA") %>'></asp:Label><br />
|
||||||
<asp:Label runat="server" ID="Label4" Text='<%# Eval("NombreComercial") %>' ></asp:Label>
|
<asp:Label runat="server" ID="Label4" Text='<%# Eval("NombreComercial") %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
||||||
@@ -553,42 +553,32 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="chequesie1" runat="server" id="DivContadoOtros" visible="false">
|
<asp:UpdatePanel class="chequesie1" runat="server" ID="UpContadoOtros" Visible="false" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" ClientIDMode="Static" AutoPostBack="true">
|
<label>TD/TC/Trans.:</label>
|
||||||
<asp:ListItem Value="-1">Otros</asp:ListItem>
|
|
||||||
<asp:ListItem Value="1">Credito</asp:ListItem>
|
|
||||||
<asp:ListItem Value="2">Debito</asp:ListItem>
|
|
||||||
<asp:ListItem Value="3">Cheque</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4 input-icon">
|
<div class="col-md-4 input-icon">
|
||||||
<i style="margin: 0px;">$</i>
|
<i style="margin: 0px;">$</i>
|
||||||
<asp:TextBox ID="TxtImporteOtrosContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
<asp:TextBox ID="TxtImporteOtrosContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FETxtImporteOtrosContado" runat="server" TargetControlID="TxtImporteOtrosContado" FilterType="Custom, Numbers" ValidChars=".," />
|
<ajax:FilteredTextBoxExtender ID="FETxtImporteOtrosContado" runat="server" TargetControlID="TxtImporteOtrosContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6" runat="server" id="DivContadoOtrosCuenta">
|
<div class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlCuentaOtrosContado" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" CssClass="form-control input-sm select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlOtroFormaPago_SelectedIndexChanged">
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="DdlCuentaTarjetaCredito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
|
<asp:ListItem Value="-1">Seleccione</asp:ListItem>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender24" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
|
<asp:ListItem Value="1">Debito</asp:ListItem>
|
||||||
</div>
|
<asp:ListItem Value="2">Crédito</asp:ListItem>
|
||||||
|
<asp:ListItem Value="3">Transferencia</asp:ListItem>
|
||||||
<div class="col-md-3" runat="server" id="DivMesesSinIntereses2" visible="false">
|
|
||||||
<asp:DropDownList ID="DdlMesesSinIntereses2" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%">
|
|
||||||
<asp:ListItem Value="-1">Meses</asp:ListItem>
|
|
||||||
<asp:ListItem Value="3">3M</asp:ListItem>
|
|
||||||
<asp:ListItem Value="6">6M</asp:ListItem>
|
|
||||||
<asp:ListItem Value="9">9M</asp:ListItem>
|
|
||||||
<asp:ListItem Value="12">12M</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<asp:DropDownList ID="DdlCuentaOtrosContado" runat="server" CssClass="form-control input-sm select2me" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div class="chequesie2">
|
<div class="chequesie2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -1286,7 +1276,7 @@
|
|||||||
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
||||||
|
|
||||||
//si es con.nc,es.el.total
|
//si es con.nc,es.el.total
|
||||||
let Total = ToDouble($get("C_LtlSaldo").value.replace(",",""));
|
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
|
||||||
|
|
||||||
let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").value.replace(",", "")).toFixed(2));
|
let SaldoCompra = parseFloat(parseFloat($get("C_LtlSaldo").value.replace(",", "")).toFixed(2));
|
||||||
|
|
||||||
@@ -1389,11 +1379,13 @@
|
|||||||
let totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
|
let totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
|
||||||
let TotalOtrosContado = 0;
|
let TotalOtrosContado = 0;
|
||||||
|
|
||||||
let total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado;
|
let total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia;
|
||||||
|
|
||||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||||
let totalAnticipos = ToDouble($get("TxtNCDev").value);
|
let totalAnticipos = ToDouble($get("TxtNCDev").value);
|
||||||
total = total + totalAnticipos;
|
TotalOtrosContado = ToDouble($get("TxtImporteOtrosContado").value);
|
||||||
|
|
||||||
|
total = total + totalAnticipos + TotalOtrosContado;
|
||||||
}
|
}
|
||||||
|
|
||||||
let totalVenta = ToDouble($get('HdnTotal').value);// - ToDouble($get('HdnTotal').value);
|
let totalVenta = ToDouble($get('HdnTotal').value);// - ToDouble($get('HdnTotal').value);
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 189 Then
|
If UsuarioActual.CveEmpresa = 189 Then
|
||||||
DivDatosCheque.Visible = True
|
DivDatosCheque.Visible = True
|
||||||
|
UpContadoOtros.Visible = True
|
||||||
|
UpContadoOtros.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
@@ -458,7 +460,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
If VentaContado Then
|
If VentaContado Then
|
||||||
'validaciones
|
'validaciones
|
||||||
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal()
|
Dim Pagado As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal + TxtNCDev.Text.ToDecimal() + TxtImporteOtrosContado.Text.ToDecimal()
|
||||||
If Pagado = 0 Then
|
If Pagado = 0 Then
|
||||||
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
|
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -485,6 +487,18 @@ Partial Class Ventas_PVCobranza
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TxtImporteOtrosContado.Text.ToDecimal() > 0 Then
|
||||||
|
If DdlOtroFormaPago.SelectedValue.ToEntero() <= 0 Then
|
||||||
|
Alert("Es necesario especificar la forma de pago adicional", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DdlCuentaOtrosContado.SelectedValue.ToEntero() <= 0 Then
|
||||||
|
Alert("Es necesario especificar la cuenta de la forma de pago adicional", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim tCveCorte As Integer = CveCorte
|
Dim tCveCorte As Integer = CveCorte
|
||||||
@@ -626,6 +640,23 @@ Partial Class Ventas_PVCobranza
|
|||||||
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
|
PagoAplicado += TxtImporteTransferencia.Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteOtrosContado.Text.ToDecimal > 0 Then
|
||||||
|
Dim CveConceptroOtros As Integer = -1
|
||||||
|
|
||||||
|
Select Case DdlOtroFormaPago.SelectedValue
|
||||||
|
Case "1" 'Debito
|
||||||
|
CveConceptroOtros = 11
|
||||||
|
Case "2" 'Crédito
|
||||||
|
CveConceptroOtros = 12
|
||||||
|
Case "3" 'Transferencia
|
||||||
|
CveConceptroOtros = 8
|
||||||
|
End Select
|
||||||
|
|
||||||
|
MsgError = RegistraIE(CveConceptroOtros, DdlCuentaOtrosContado.SelectedValue.ToEntero, TxtImporteOtrosContado.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2, tCveCorte, CveSubProyecto:=VentaActual.CveSubProyecto)
|
||||||
|
SaldoPendiente -= TxtImporteOtrosContado.Text.ToDecimal
|
||||||
|
PagoAplicado += TxtImporteOtrosContado.Text.ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
If MsgError = "" AndAlso SaldoPendiente > 0 AndAlso TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
||||||
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
|
Dim PagoEfectivo As Decimal = TxtImporteEfectivo.Text.ToDecimal
|
||||||
|
|
||||||
@@ -2034,4 +2065,23 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlOtroFormaPago_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
Dim DtCC As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
Dim CveMon As Integer = 1
|
||||||
|
|
||||||
|
If DdlOtroFormaPago.SelectedValue.Contiene("1", "2") Then
|
||||||
|
DdlCuentaOtrosContado.dataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", CveMon))
|
||||||
|
ElseIf DdlOtroFormaPago.SelectedValue.Contiene("3") Then
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa.Contiene(195, 197) Then
|
||||||
|
DdlCuentaOtrosContado.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(CveMon <= 0, 1, CveMon)))
|
||||||
|
Else
|
||||||
|
DdlCuentaOtrosContado.DataSource = DtCC.FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(CveMon <= 0, 1, CveMon)))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
DdlCuentaOtrosContado.DataBind()
|
||||||
|
|
||||||
|
UpContadoOtros.Update()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user