Ventas Empresa llantera Solo mostrar ps con existencias, meses sin intereses, contado otros pagos
This commit is contained in:
@@ -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