-- cambio a prepolizaspagoventas
This commit is contained in:
@@ -134,15 +134,6 @@ Partial Class Bancos_PopIEVentas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property MovimientoPagar As IEMovimiento
|
||||
Get
|
||||
Return CType(ViewState("MovimientoPagar"), IEMovimiento)
|
||||
End Get
|
||||
Set(value As IEMovimiento)
|
||||
ViewState("MovimientoPagar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property VentaActual As Venta
|
||||
Get
|
||||
Return CType(ViewState("VentaActual"), Venta)
|
||||
@@ -316,7 +307,6 @@ Partial Class Bancos_PopIEVentas
|
||||
CveMoneda = 0
|
||||
CveMonedaFiltros = 0
|
||||
CveVenta = -1
|
||||
MovimientoPagar = Nothing
|
||||
ArrIE = New ArrayList()
|
||||
ArrIEFuncionariosEmpleados = New ArrayList()
|
||||
RFCCliente = "-1"
|
||||
@@ -498,17 +488,17 @@ Partial Class Bancos_PopIEVentas
|
||||
End If
|
||||
End If
|
||||
|
||||
MovimientoPagar = New IEMovimiento
|
||||
MovimientoPagar.SubTotal = dr("SubTotal").ToString.ToDecimal
|
||||
MovimientoPagar.IVA = dr("IVA").ToString.ToDecimal
|
||||
MovimientoPagar.RetIVA = dr("RetIVA").ToString.ToDecimal
|
||||
MovimientoPagar.RetISR = dr("RetISR").ToString.ToDecimal
|
||||
MovimientoPagar.Total = dr("Total").ToString.ToDecimal
|
||||
MovimientoPagar.Saldo = dr("Saldo").ToString.ToDecimal
|
||||
MovimientoPagar.IEPS = dr("IEPS").ToString.ToDecimal
|
||||
MovimientoPagar.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
|
||||
'MovimientoPagar = New IEMovimiento
|
||||
'MovimientoPagar.SubTotal = dr("SubTotal").ToString.ToDecimal
|
||||
'MovimientoPagar.IVA = dr("IVA").ToString.ToDecimal
|
||||
'MovimientoPagar.RetIVA = dr("RetIVA").ToString.ToDecimal
|
||||
'MovimientoPagar.RetISR = dr("RetISR").ToString.ToDecimal
|
||||
'MovimientoPagar.Total = dr("Total").ToString.ToDecimal
|
||||
'MovimientoPagar.Saldo = dr("Saldo").ToString.ToDecimal
|
||||
'MovimientoPagar.IEPS = dr("IEPS").ToString.ToDecimal
|
||||
'MovimientoPagar.PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal
|
||||
|
||||
Dim VentaActual As New Venta(UsuarioActual)
|
||||
VentaActual = New Venta(UsuarioActual)
|
||||
VentaActual.CveVenta = pCveVenta
|
||||
VentaActual.Fecha = dr("Fecha").ToString.ToDate
|
||||
VentaActual.CveCliente = dr("CveCliente").ToString.ToEntero
|
||||
@@ -517,7 +507,7 @@ Partial Class Bancos_PopIEVentas
|
||||
VentaActual.SerieFolio = dr("SerieFolio").ToString
|
||||
VentaActual.ClienteNombre = NombreCliente
|
||||
VentaActual.TC = dr("TipoCambio").ToString.ToDecimal
|
||||
VentaActual.Total = dr("Original").ToString.ToDecimal
|
||||
VentaActual.Total = dr("Total").ToString.ToDecimal
|
||||
VentaActual.IVA = dr("IVA").ToString.ToDecimal
|
||||
VentaActual.IEPS = dr("IEPS").ToString.ToDecimal
|
||||
VentaActual.RetIVA = dr("RetIVA").ToString.ToDecimal
|
||||
@@ -1144,40 +1134,29 @@ Partial Class Bancos_PopIEVentas
|
||||
|
||||
Dim MsgError As String = ""
|
||||
Dim CveConceptoPrePoliza As Integer = -1
|
||||
Dim CveConceptoPrePoliza2 As Integer = -1
|
||||
Dim CvePersonal As Integer = -1
|
||||
Dim Inserta As Boolean = True
|
||||
Dim ImportePagado As Decimal = 0
|
||||
Dim TipoMovimiento As Boolean = False
|
||||
Dim PorcentajePago As Decimal = 0
|
||||
Dim CveProveedor2 As Integer = -1
|
||||
Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate
|
||||
Dim CompraSaldo As Decimal = 0
|
||||
If Not EmpresaPrueba Then CveIE = -1
|
||||
|
||||
Select Case RBLContado.SelectedValue
|
||||
Case "1" ' Bancos
|
||||
ImportePagado = If(DdlOtrosPagos.SelectedValue.ToEntero = 2, TxtTotal.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal) 'TxtImporte.Text.Trim.ToDecimal
|
||||
Fecha = TxtFechaDocumento.Text.Trim.ToDate
|
||||
TipoMovimiento = True
|
||||
Case "2" 'FyE
|
||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
||||
Fecha = TxtFechaDocumento.Text.Trim.ToDate
|
||||
CveConceptoPrePoliza = 29
|
||||
CveIE = -1
|
||||
TipoMovimiento = True
|
||||
Dim stringPersonal As String = DdlFuncionarioEmpleado.SelectedItem.ToString
|
||||
CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
|
||||
'CvePersonal = DdlFuncionarioEmpleado.SelectedValue.ToEntero
|
||||
Case "3" 'Ingresos X Comprobar
|
||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
||||
Case "4" 'Deudores Diversos
|
||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
||||
CveConceptoPrePoliza = 17
|
||||
CveConceptoPrePoliza2 = 37
|
||||
CveIE = -1
|
||||
Case "5" 'Compras
|
||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
||||
CveProveedor2 = CveCliente
|
||||
CveIE = -1
|
||||
Case Else
|
||||
ImportePagado = 0
|
||||
@@ -1224,15 +1203,15 @@ Partial Class Bancos_PopIEVentas
|
||||
'SE AGREGA DETALLE DE UNA VENTA
|
||||
If CveVenta > 0 Then
|
||||
|
||||
If MovimientoPagar IsNot Nothing Then
|
||||
If VentaActual IsNot Nothing Then
|
||||
Dim tipoCambioPago As Decimal = 1
|
||||
Dim CuentasContablesInvalidas As New StringBuilder
|
||||
Dim CuentasContablesInvalidasSIG As New StringBuilder
|
||||
Dim tFecha As Date = TxtFechaDocumento.Text.ToDate
|
||||
|
||||
Dim Pago As New VentaPago
|
||||
Pago.Fecha = TxtFechaDocumento.Text.ToDate
|
||||
Pago.CveMonedaPago = CveMoneda
|
||||
Pago.Referencia = VentaActual.SerieFolio
|
||||
If DdlOtrosPagos.SelectedValue = "2" Then
|
||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL - TxtComision.Text.ToDecimal
|
||||
Else
|
||||
@@ -1259,6 +1238,7 @@ Partial Class Bancos_PopIEVentas
|
||||
If CveIE > 0 Then
|
||||
If CveVenta > 0 Then
|
||||
Pago.ImportePago = ImportePagado
|
||||
Pago.ImportePagoVenta = ImportePagado
|
||||
Pago.CveIE = CveIE
|
||||
Pago.TipoPago = "B"
|
||||
|
||||
@@ -1273,19 +1253,19 @@ Partial Class Bancos_PopIEVentas
|
||||
Case "3" 'Ingresos x Comprobar
|
||||
If CveVenta > 0 Then
|
||||
CveConceptoPrePoliza = 2
|
||||
CveConceptoPrePoliza2 = 92
|
||||
CveCliente = DdlIngreso.SelectedValue.ToEntero
|
||||
CveIE = -1
|
||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
||||
Pago.ImportePago = ImportePagado
|
||||
Pago.TipoPago = "I"
|
||||
Pago.FechaDocumentoRelacionado = Now 'FechaIngreso
|
||||
|
||||
For Each rw As GridViewRow In GvIngresos.Rows
|
||||
If rw.FCCheckBox("Chk").Checked Then
|
||||
CveIE = rw.DataKey("CveIE").ToEntero
|
||||
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
|
||||
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
||||
Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
|
||||
Pago.FechaDocumentoRelacionado = rw.DataKey("Fecha").ToDate
|
||||
If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal
|
||||
If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
|
||||
|
||||
@@ -1301,8 +1281,7 @@ Partial Class Bancos_PopIEVentas
|
||||
If CveVenta > 0 Then
|
||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
||||
CveConceptoPrePoliza = 2
|
||||
CveConceptoPrePoliza2 = 43
|
||||
CveProveedor2 = DdlDeudor.SelectedValue.ToEntero
|
||||
'CveProveedor2 = DdlDeudor.SelectedValue.ToEntero
|
||||
CveIE = -1
|
||||
If DdlDeudor.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("Debe especificar el deudor.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
Reference in New Issue
Block a user