Ventas Empresa llantera Solo mostrar ps con existencias, meses sin intereses, contado otros pagos

This commit is contained in:
Rakcsle Supertramp
2019-09-24 18:01:33 -07:00
parent e186734343
commit 9a2a463706
4 changed files with 277 additions and 48 deletions

View File

@@ -1300,7 +1300,8 @@ Public Class ClsBancos
Public Function AddBancos_IE(CveCuenta As Integer, CveTipoTransaccion As Integer, FechaDocumento As Date, Folio As String, PagueseA As String, Importe As Double, CveMoneda As Integer, TipoCambio As Double, Observaciones As String, Public Function AddBancos_IE(CveCuenta As Integer, CveTipoTransaccion As Integer, FechaDocumento As Date, Folio As String, PagueseA As String, Importe As Double, CveMoneda As Integer, TipoCambio As Double, Observaciones As String,
NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer, NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer,
Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1, Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1,
Optional Referencia As String = "-1", Optional CveIESustitucion As Integer = -1, Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False) As Integer Optional Referencia As String = "-1", Optional CveIESustitucion As Integer = -1, Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False,
Optional MesesSinIntereses As Integer = -1) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_Banc_IEAdd") DataAdapter("PA_Banc_IEAdd")
@@ -1334,6 +1335,7 @@ Public Class ClsBancos
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte .Add("@CveCorte", SqlDbType.Int).Value = CveCorte
.Add("@CveProveedorIntermediario", SqlDbType.Int).Value = CveProveedorIntermediario .Add("@CveProveedorIntermediario", SqlDbType.Int).Value = CveProveedorIntermediario
.Add("@FueConciliado", SqlDbType.Bit).Value = FueConciliado .Add("@FueConciliado", SqlDbType.Bit).Value = FueConciliado
.Add("@MesesSinIntereses", SqlDbType.Int).Value = MesesSinIntereses
.Add("@CveIE", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CveIE", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@FolioRegistro", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output .Add("@FolioRegistro", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output

View File

@@ -293,13 +293,22 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
Next Next
DtPSRetorno = objInv.DtResultados DtPSRetorno = objInv.DtResultados
End If End If
objInv.Dispose() objInv.Dispose()
End If End If
If usuario.Empresa.Funcionalidad(558) = 1 Then
Try
Dim NobreFiltroColumna As String = DtPSRetorno.Columns(3).ColumnName
DtPSRetorno = DtPSRetorno.FiltraParametros($"{NobreFiltroColumna} > 0")
Catch ex As Exception
End Try
End If
If UsaGlobal Then If UsaGlobal Then
Dim DTPS = DirectCast(context.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow)) Dim DTPS = DirectCast(context.Application("GlobalDTPSSimplificado"), EnumerableRowCollection(Of DataRow))

View File

@@ -2952,13 +2952,28 @@
<asp:TextBox ID="TxtImporteCredito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox> <asp:TextBox ID="TxtImporteCredito" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporteCredito" FilterType="Custom, Numbers" ValidChars=".," /> <ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporteCredito" FilterType="Custom, Numbers" ValidChars=".," />
</div> </div>
<div class="col-md-6"> <div class="col-md-6" runat="server" id="DivDdlCuentaTarjetaCredito" >
<asp:DropDownList ID="DdlCuentaTarjetaCredito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList> <asp:DropDownList ID="DdlCuentaTarjetaCredito" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100%"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" 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:RequiredFieldValidator ID="RequiredFieldValidator1" 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>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-3" runat="server" id="DivMesesSinIntereses" visible="false">
<asp:DropDownList ID="DDlMesesSinIntereses" 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:RequiredFieldValidator ID="RFVDDlMesesSinIntereses" runat="server" ControlToValidate="DDlMesesSinIntereses" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />campo <b>''Meses sin intereses''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpAgregarPago"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="CEDDlMesesSinIntereses" runat="server" HighlightCssClass="vco" TargetControlID="RFVDDlMesesSinIntereses" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</div>
</div> </div>
</div> </div>
<div class="chequesie1"> <div class="chequesie1">
<div class="row"> <div class="row">
<label class="col-md-2">Debito:</label> <label class="col-md-2">Debito:</label>
@@ -2989,7 +3004,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="chequesie1">
<div class="chequesie1">
<div class="row"> <div class="row">
<label class="col-md-2">Transf.:</label> <label class="col-md-2">Transf.:</label>
<div class="col-md-4 input-icon"> <div class="col-md-4 input-icon">
@@ -3004,6 +3020,47 @@
</div> </div>
</div> </div>
</div> </div>
<div class="chequesie1" runat="server" id ="DivContadoOtros" visible="false">
<div class="row">
<div class="col-md-2">
<asp:DropDownList runat="server" ID="DdlOtroFormaPago" ClientIDMode="Static" AutoPostBack="true" OnSelectedIndexChanged="DdlOtroFormaPago_SelectedIndexChanged">
<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 class="col-md-4 input-icon">
<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>
<ajax:FilteredTextBoxExtender ID="FETxtImporteOtrosContado" runat="server" TargetControlID="TxtImporteOtrosContado" FilterType="Custom, Numbers" ValidChars=".," />
</div>
<div class="col-md-6" runat="server" id="DivContadoOtrosCuenta" >
<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: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>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender24" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<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>
</div>
</div>
</div>
<div class="chequesie2"> <div class="chequesie2">
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
@@ -3021,6 +3078,12 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -6620,7 +6683,18 @@
var totalDebito = ToDouble($get("TxtImporteDebito").value); var totalDebito = ToDouble($get("TxtImporteDebito").value);
var totalCheque = ToDouble($get("TxtImporteCheque").value); var totalCheque = ToDouble($get("TxtImporteCheque").value);
var totalTransferencia = ToDouble($get("TxtImporteTransferencia").value); var totalTransferencia = ToDouble($get("TxtImporteTransferencia").value);
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia;
var TotalOtrosContado = 0;
try{
if ($('#DdlOtroFormaPago').val() != "-1") {
TotalOtrosContado = ToDouble($get("TxtImporteOtrosContado").value);
}
} catch (e) {}
var total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia + TotalOtrosContado;
$get("TxtImporteContado").value = total; $get("TxtImporteContado").value = total;
} }

View File

@@ -1802,7 +1802,10 @@ Partial Class Ventas
TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();") TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();") TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();") TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();") TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();") 'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();")
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")DdlTipoComprobante 'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")DdlTipoComprobante
'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();") 'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();")
@@ -1907,6 +1910,8 @@ Partial Class Ventas
CargaOrdenProduccion() CargaOrdenProduccion()
End If End If
'Carga Venta 'Carga Venta
If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then
ViewState("CveVenta") = Request("CveVenta") ViewState("CveVenta") = Request("CveVenta")
@@ -2422,6 +2427,16 @@ Partial Class Ventas
End If End If
End If End If
If UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 Then
DivMesesSinIntereses.Visible = True
DivDdlCuentaTarjetaCredito.Attributes.Add("class", "col-md-3")
DivContadoOtros.Visible = True
End If
End If End If
''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ??? ''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ???
@@ -10090,7 +10105,7 @@ Partial Class Ventas
Exit For Exit For
End If End If
CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString.ToEntero, DrPago("CveTipoMovimiento").ToString.ToEntero, Fecha, FolioIE.ToString, String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString.ToDouble, DdlMoneda.SelectedValue.ToEntero, tipoCambio, DrPago("Observaciones").ToString, "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte) CveIEPago = ObjBancos.AddBancos_IE(DrPago("CveCuenta").ToString.ToEntero, DrPago("CveTipoMovimiento").ToString.ToEntero, Fecha, FolioIE.ToString, String.Format("PAGO: {0}", TxtFolio.Text), DrPago("Importe").ToString.ToDouble, DdlMoneda.SelectedValue.ToEntero, tipoCambio, DrPago("Observaciones").ToString, "", False, False, -1, ObjFactura.CvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=CveCorte, MesesSinIntereses:=DrPago("MesesSinIntereses").ToString.ToEntero)
If CveIEPago > 0 Then If CveIEPago > 0 Then
@@ -16095,6 +16110,7 @@ Partial Class Ventas
DtPagos.Columns.Add("Observaciones", GetType(String)) DtPagos.Columns.Add("Observaciones", GetType(String))
DtPagos.Columns.Add("Tipo", GetType(String)) DtPagos.Columns.Add("Tipo", GetType(String))
DtPagos.Columns.Add("CveMetodoPago", GetType(Integer)) DtPagos.Columns.Add("CveMetodoPago", GetType(Integer))
DtPagos.Columns.Add("MesesSinIntereses", GetType(Integer))
CargaCuentas() CargaCuentas()
@@ -16108,6 +16124,8 @@ Partial Class Ventas
TxtImporteCheque.Text = "0.00" TxtImporteCheque.Text = "0.00"
TxtImporteTransferencia.Text = "0.00" TxtImporteTransferencia.Text = "0.00"
TxtImporteContado.Text = "0.00" TxtImporteContado.Text = "0.00"
TxtImporteOtrosContado.Text = "0.00"
End Sub End Sub
Private Sub LimpiaEscondeContado() Private Sub LimpiaEscondeContado()
'LIMPIA 'LIMPIA
@@ -16156,6 +16174,39 @@ Partial Class Ventas
DdlCuentaTransferencia.DataBind() DdlCuentaTransferencia.DataBind()
End Sub End Sub
Protected Sub DdlOtroFormaPago_SelectedIndexChanged(sender As Object, e As EventArgs)
DivContadoOtrosCuenta.Attributes.Add("class", "col-md-6")
DivMesesSinIntereses2.Visible = False
Select Case DdlOtroFormaPago.SelectedValue.ToEntero
Case 1
DivContadoOtrosCuenta.Attributes.Add("class", "col-md-3")
DivMesesSinIntereses2.Visible = True
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero <= 0, 1, DdlMoneda.SelectedValue.ToEntero)))
Exit Select
Case 2
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta <> 1", If(DdlMoneda.SelectedValue.ToEntero <= 0, 1, DdlMoneda.SelectedValue.ToEntero)))
Exit Select
Case 3
DdlCuentaOtrosContado.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros(String.Format("CveMoneda = {0} AND CveTipoCuenta = 1", If(DdlMoneda.SelectedValue.ToEntero <= 0, 1, DdlMoneda.SelectedValue.ToEntero)))
Exit Select
Case -1
DdlCuentaOtrosContado.DataSource = Nothing
Exit Select
End Select
DdlCuentaOtrosContado.DataBind()
UpContado.Update()
End Sub
'DdlOtroFormaPago
Private Function CargaFolioContado(CveCuenta As Integer, TipoTransaccion As Integer) As Long Private Function CargaFolioContado(CveCuenta As Integer, TipoTransaccion As Integer) As Long
Dim Folio As Long Dim Folio As Long
@@ -16211,6 +16262,8 @@ Partial Class Ventas
DrEfectivo("Observaciones") = "" DrEfectivo("Observaciones") = ""
DrEfectivo("Tipo") = "Caja Chica" DrEfectivo("Tipo") = "Caja Chica"
DrEfectivo("CveMetodoPago") = 1 DrEfectivo("CveMetodoPago") = 1
DrEfectivo("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrEfectivo) DtPagos.Rows.Add(DrEfectivo)
Else Else
Alert("Debe seleccionar una cuenta válida de caja", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar una cuenta válida de caja", TipoMensaje.MsgAdvertencia)
@@ -16219,6 +16272,7 @@ Partial Class Ventas
'Pago Tarjeta Credito 'Pago Tarjeta Credito
If TxtImporteCredito.Text.ToDecimal > 0 Then If TxtImporteCredito.Text.ToDecimal > 0 Then
If DdlCuentaTarjetaCredito.Items.Count > 0 Then If DdlCuentaTarjetaCredito.Items.Count > 0 Then
Dim DrCredito = DtPagos.NewRow Dim DrCredito = DtPagos.NewRow
DrCredito("CveTipoMovimiento") = 12 DrCredito("CveTipoMovimiento") = 12
@@ -16230,10 +16284,20 @@ Partial Class Ventas
DrCredito("Observaciones") = "" DrCredito("Observaciones") = ""
DrCredito("Tipo") = "Tarjeta de Crédito" DrCredito("Tipo") = "Tarjeta de Crédito"
DrCredito("CveMetodoPago") = 4 DrCredito("CveMetodoPago") = 4
If UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 Then
DrCredito("MesesSinIntereses") = DDlMesesSinIntereses.SelectedValue.ToEntero
Else
DrCredito("MesesSinIntereses") = -1
End If
DtPagos.Rows.Add(DrCredito) DtPagos.Rows.Add(DrCredito)
Else Else
Alert("Debe seleccionar una cuenta válida de crédito", TipoMensaje.MsgAdvertencia) Alert("Debe seleccionar una cuenta válida de crédito", TipoMensaje.MsgAdvertencia)
End If End If
End If End If
'Pago Tarjeta Debito 'Pago Tarjeta Debito
@@ -16249,6 +16313,7 @@ Partial Class Ventas
DrDebito("Observaciones") = "" DrDebito("Observaciones") = ""
DrDebito("Tipo") = "Tarjeta de Débito" DrDebito("Tipo") = "Tarjeta de Débito"
DrDebito("CveMetodoPago") = 5 DrDebito("CveMetodoPago") = 5
DrDebito("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrDebito) DtPagos.Rows.Add(DrDebito)
Else Else
@@ -16269,6 +16334,7 @@ Partial Class Ventas
DrCheque("Observaciones") = "" DrCheque("Observaciones") = ""
DrCheque("Tipo") = "Cheque" DrCheque("Tipo") = "Cheque"
DrCheque("CveMetodoPago") = 2 DrCheque("CveMetodoPago") = 2
DrCheque("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrCheque) DtPagos.Rows.Add(DrCheque)
Else Else
@@ -16289,6 +16355,7 @@ Partial Class Ventas
DrCheque("Observaciones") = "" DrCheque("Observaciones") = ""
DrCheque("Tipo") = "Transferencia" DrCheque("Tipo") = "Transferencia"
DrCheque("CveMetodoPago") = 3 DrCheque("CveMetodoPago") = 3
DrCheque("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrCheque) DtPagos.Rows.Add(DrCheque)
Else Else
@@ -16296,6 +16363,82 @@ Partial Class Ventas
End If End If
End If End If
'Otro Metodo de pago
Select Case DdlOtroFormaPago.SelectedValue.ToEntero
Case -1
Exit Select
Case 1
If TxtImporteOtrosContado.Text.ToDecimal > 0 Then
If DdlCuentaOtrosContado.Items.Count > 0 Then
Dim DrCredito = DtPagos.NewRow
DrCredito("CveTipoMovimiento") = 12
DrCredito("TipoMovimiento") = "Tarjeta de Crédito"
DrCredito("CveCuenta") = DdlCuentaOtrosContado.SelectedValue
DrCredito("Cuenta") = DdlCuentaOtrosContado.SelectedItem.Text
DrCredito("Importe") = TxtImporteOtrosContado.Text
DrCredito("Folio") = CargaFolioContado(DdlCuentaOtrosContado.SelectedValue.ToEntero, 12)
DrCredito("Observaciones") = ""
DrCredito("Tipo") = "Tarjeta de Crédito"
DrCredito("CveMetodoPago") = 4
If UsuarioActual.Empresa.Funcionalidad(558).ToEntero = 1 Then
DrCredito("MesesSinIntereses") = DdlMesesSinIntereses2.SelectedValue.ToEntero
Else
DrCredito("MesesSinIntereses") = -1
End If
DtPagos.Rows.Add(DrCredito)
Else
Alert("Debe seleccionar una cuenta válida de crédito( Otra condición de pago)", TipoMensaje.MsgAdvertencia)
End If
End If
Exit Select
Case 2
If TxtImporteOtrosContado.Text.ToDecimal > 0 Then
If DdlCuentaOtrosContado.Items.Count > 0 Then
Dim DrDebito = DtPagos.NewRow
DrDebito("CveTipoMovimiento") = 11
DrDebito("TipoMovimiento") = "Tarjeta de Debito"
DrDebito("CveCuenta") = DdlCuentaOtrosContado.SelectedValue
DrDebito("Cuenta") = DdlCuentaOtrosContado.SelectedItem.Text
DrDebito("Importe") = TxtImporteOtrosContado.Text
DrDebito("Folio") = CargaFolioContado(DdlCuentaOtrosContado.SelectedValue.ToEntero, 11)
DrDebito("Observaciones") = ""
DrDebito("Tipo") = "Tarjeta de Débito"
DrDebito("CveMetodoPago") = 5
DrDebito("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrDebito)
Else
Alert("Debe seleccionar una cuenta válida de débito( Otra condición de pago)", TipoMensaje.MsgAdvertencia)
End If
End If
Exit Select
Case 3
If TxtImporteOtrosContado.Text.ToDecimal > 0 Then
If DdlCuentaOtrosContado.Items.Count > 0 Then
Dim DrCheque = DtPagos.NewRow
DrCheque("CveTipoMovimiento") = 3
DrCheque("TipoMovimiento") = "Cheque"
DrCheque("CveCuenta") = DdlCuentaOtrosContado.SelectedValue
DrCheque("Cuenta") = DdlCuentaOtrosContado.SelectedItem.Text
DrCheque("Importe") = TxtImporteOtrosContado.Text
DrCheque("Folio") = CargaFolioContado(DdlCuentaOtrosContado.SelectedValue.ToEntero, 3)
DrCheque("Observaciones") = ""
DrCheque("Tipo") = "Cheque"
DrCheque("CveMetodoPago") = 2
DrCheque("MesesSinIntereses") = -1
DtPagos.Rows.Add(DrCheque)
Else
Alert("Debe seleccionar una cuenta de cheque( Otra condición de pago)", TipoMensaje.MsgAdvertencia)
End If
End If
Exit Select
End Select
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P. 'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
abonado = DtPagos.SUM("Importe") abonado = DtPagos.SUM("Importe")
saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
@@ -22763,4 +22906,5 @@ Partial Class Ventas
#End Region #End Region
End Class End Class