Ventas Empresa llantera Solo mostrar ps con existencias, meses sin intereses, contado otros pagos
This commit is contained in:
@@ -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,
|
||||
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 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
|
||||
|
||||
DataAdapter("PA_Banc_IEAdd")
|
||||
@@ -1334,6 +1335,7 @@ Public Class ClsBancos
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
.Add("@CveProveedorIntermediario", SqlDbType.Int).Value = CveProveedorIntermediario
|
||||
.Add("@FueConciliado", SqlDbType.Bit).Value = FueConciliado
|
||||
.Add("@MesesSinIntereses", SqlDbType.Int).Value = MesesSinIntereses
|
||||
|
||||
.Add("@CveIE", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@FolioRegistro", SqlDbType.VarChar, 50).Direction = ParameterDirection.Output
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%@ WebHandler Language="VB" Class="SIGWeb" %>
|
||||
|
||||
<%@ WebHandler Language="VB" Class="SIGWeb" %>
|
||||
|
||||
Imports System
|
||||
Imports System.Web
|
||||
Imports System.Data
|
||||
@@ -79,10 +79,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "File"
|
||||
|
||||
|
||||
Private Sub Downfile(ByVal context As HttpContext)
|
||||
Dim savepath As String = ""
|
||||
Dim tempPath As String = ""
|
||||
@@ -133,9 +133,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
context.Response.Write(tick)
|
||||
context.Response.StatusCode = 200
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Get Cliente"
|
||||
Private Function GetClientes(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -164,9 +164,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Get Proveedor"
|
||||
Private Function GetProveedores(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -195,10 +195,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GET PS "
|
||||
Private Function getpsalmacen(ByVal context As HttpContext) As String
|
||||
|
||||
@@ -285,19 +285,28 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
If objInv.GetExistenciasProductosLike(Name, CveClasificacion, CveSubProyecto, Estatus.ToEntero, AplicaParaVenta, CveEmpresa) Then
|
||||
|
||||
' limpio los almacenes donde no tiene ningun producto existencia
|
||||
For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
|
||||
|
||||
For i = objInv.DtResultados.Columns.Count - 1 To 1 Step -1
|
||||
|
||||
If Not objInv.DtResultados.Columns(i).ColumnName.Contiene("CvePS", "PSCodigo", "PSCodigoClasificacion") AndAlso objInv.DtResultados.SUM(String.Format("[{0}]", objInv.DtResultados.Columns(i).ColumnName)) = 0 Then
|
||||
objInv.DtResultados.Columns.RemoveAt(i)
|
||||
End If
|
||||
Next
|
||||
|
||||
DtPSRetorno = objInv.DtResultados
|
||||
Next
|
||||
|
||||
DtPSRetorno = objInv.DtResultados
|
||||
|
||||
End If
|
||||
|
||||
|
||||
objInv.Dispose()
|
||||
|
||||
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
|
||||
@@ -386,19 +395,19 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#Region "Funciones"
|
||||
Public Function GetJson(ByVal dt As DataTable) As String
|
||||
|
||||
@@ -419,10 +428,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Get
|
||||
UsuarioActual = DirectCast(context.Session("UsuarioSIG"), Usuario)
|
||||
End Get
|
||||
End Property
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GET PS SAT "
|
||||
Private Function GETPSSAT(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -448,10 +457,10 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
DtPSRetorno.Dispose()
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GET UM SAT "
|
||||
Private Function GETUMSAT(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -476,9 +485,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
context.Response.Write("[]")
|
||||
End If
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GET FRACCION ARANCELARIA "
|
||||
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
@@ -504,12 +513,12 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
DtRetorno.Dispose()
|
||||
Return retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "USADOS"
|
||||
|
||||
|
||||
Private Function GETPSUSADOS(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
Dim DtPSRetorno As DataTable = Nothing
|
||||
@@ -599,9 +608,9 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
@@ -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>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="TxtImporteCredito" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</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: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>
|
||||
</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 class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Debito:</label>
|
||||
@@ -2989,7 +3004,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie1">
|
||||
|
||||
<div class="chequesie1">
|
||||
<div class="row">
|
||||
<label class="col-md-2">Transf.:</label>
|
||||
<div class="col-md-4 input-icon">
|
||||
@@ -3004,6 +3020,47 @@
|
||||
</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="row">
|
||||
<div class="col-md-6">
|
||||
@@ -3021,6 +3078,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6620,7 +6683,18 @@
|
||||
var totalDebito = ToDouble($get("TxtImporteDebito").value);
|
||||
var totalCheque = ToDouble($get("TxtImporteCheque").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;
|
||||
}
|
||||
|
||||
@@ -1802,7 +1802,10 @@ Partial Class Ventas
|
||||
TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
|
||||
|
||||
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
|
||||
|
||||
'ImgCerrarTerminoCorte.Attributes.Add("OnClick", "$('#DivTerminarCorte').hide();")
|
||||
'ImgCerrarIE.Attributes.Add("OnClick", "$('#DivIngresoEgreso').hide();")DdlTipoComprobante
|
||||
'ImgCerrarEstadoCaja.Attributes.Add("OnClick", "$('#DivEstadoCaja').hide();")
|
||||
@@ -1907,6 +1910,8 @@ Partial Class Ventas
|
||||
CargaOrdenProduccion()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'Carga Venta
|
||||
If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then
|
||||
ViewState("CveVenta") = Request("CveVenta")
|
||||
@@ -2422,6 +2427,16 @@ Partial Class Ventas
|
||||
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
|
||||
|
||||
''EN REALIDAD SE OCUPAN ESTAS COSAS DENTRO DEL POSTABCK ???
|
||||
@@ -10090,7 +10105,7 @@ Partial Class Ventas
|
||||
Exit For
|
||||
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
|
||||
|
||||
@@ -16095,6 +16110,7 @@ Partial Class Ventas
|
||||
DtPagos.Columns.Add("Observaciones", GetType(String))
|
||||
DtPagos.Columns.Add("Tipo", GetType(String))
|
||||
DtPagos.Columns.Add("CveMetodoPago", GetType(Integer))
|
||||
DtPagos.Columns.Add("MesesSinIntereses", GetType(Integer))
|
||||
|
||||
CargaCuentas()
|
||||
|
||||
@@ -16108,6 +16124,8 @@ Partial Class Ventas
|
||||
TxtImporteCheque.Text = "0.00"
|
||||
TxtImporteTransferencia.Text = "0.00"
|
||||
TxtImporteContado.Text = "0.00"
|
||||
TxtImporteOtrosContado.Text = "0.00"
|
||||
|
||||
End Sub
|
||||
Private Sub LimpiaEscondeContado()
|
||||
'LIMPIA
|
||||
@@ -16156,6 +16174,39 @@ Partial Class Ventas
|
||||
DdlCuentaTransferencia.DataBind()
|
||||
|
||||
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
|
||||
Dim Folio As Long
|
||||
|
||||
@@ -16211,6 +16262,8 @@ Partial Class Ventas
|
||||
DrEfectivo("Observaciones") = ""
|
||||
DrEfectivo("Tipo") = "Caja Chica"
|
||||
DrEfectivo("CveMetodoPago") = 1
|
||||
DrEfectivo("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrEfectivo)
|
||||
Else
|
||||
Alert("Debe seleccionar una cuenta válida de caja", TipoMensaje.MsgAdvertencia)
|
||||
@@ -16219,6 +16272,7 @@ Partial Class Ventas
|
||||
|
||||
'Pago Tarjeta Credito
|
||||
If TxtImporteCredito.Text.ToDecimal > 0 Then
|
||||
|
||||
If DdlCuentaTarjetaCredito.Items.Count > 0 Then
|
||||
Dim DrCredito = DtPagos.NewRow
|
||||
DrCredito("CveTipoMovimiento") = 12
|
||||
@@ -16230,10 +16284,20 @@ Partial Class Ventas
|
||||
DrCredito("Observaciones") = ""
|
||||
DrCredito("Tipo") = "Tarjeta de Crédito"
|
||||
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)
|
||||
Else
|
||||
Alert("Debe seleccionar una cuenta válida de crédito", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'Pago Tarjeta Debito
|
||||
@@ -16249,6 +16313,7 @@ Partial Class Ventas
|
||||
DrDebito("Observaciones") = ""
|
||||
DrDebito("Tipo") = "Tarjeta de Débito"
|
||||
DrDebito("CveMetodoPago") = 5
|
||||
DrDebito("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrDebito)
|
||||
Else
|
||||
@@ -16269,6 +16334,7 @@ Partial Class Ventas
|
||||
DrCheque("Observaciones") = ""
|
||||
DrCheque("Tipo") = "Cheque"
|
||||
DrCheque("CveMetodoPago") = 2
|
||||
DrCheque("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrCheque)
|
||||
Else
|
||||
@@ -16289,6 +16355,7 @@ Partial Class Ventas
|
||||
DrCheque("Observaciones") = ""
|
||||
DrCheque("Tipo") = "Transferencia"
|
||||
DrCheque("CveMetodoPago") = 3
|
||||
DrCheque("MesesSinIntereses") = -1
|
||||
|
||||
DtPagos.Rows.Add(DrCheque)
|
||||
Else
|
||||
@@ -16296,6 +16363,82 @@ Partial Class Ventas
|
||||
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.
|
||||
abonado = DtPagos.SUM("Importe")
|
||||
saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
||||
@@ -22763,4 +22906,5 @@ Partial Class Ventas
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user