impuesto locales, de ventas
This commit is contained in:
@@ -1233,14 +1233,14 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim Folio As Integer = Row("Folio").ToString.ToEntero
|
Dim Folio As Integer = Row("Folio").ToString.ToEntero
|
||||||
Dim Fecha As Date = Row("Fecha").ToString.ToDate
|
Dim Fecha As Date = Row("Fecha").ToString.ToDate
|
||||||
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString.ToDate
|
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString.ToDate
|
||||||
Dim ImpuestoLocal As Double = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDouble, 0.0)
|
Dim ImpuestoLocal As Decimal = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDecimal, 0D)
|
||||||
Dim Amortizacion As Double = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString.ToDouble, 0.0)
|
Dim Amortizacion As Double = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString.ToDouble, 0.0)
|
||||||
Dim SubTotal As Decimal = Row("SubTotal").ToString.ToDecimal
|
Dim SubTotal As Decimal = Row("SubTotal").ToString.ToDecimal
|
||||||
Dim IVA As Decimal = Row("IVA").ToString.ToDecimal
|
Dim IVA As Decimal = Row("IVA").ToString.ToDecimal
|
||||||
Dim Total As Decimal = Row("Total").ToString.ToDecimal
|
Dim Total As Decimal = Row("Total").ToString.ToDecimal
|
||||||
Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal
|
Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal
|
||||||
Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero
|
Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero
|
||||||
Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble
|
Dim RetIVA As Decimal = Row("Ret IVA").ToString.ToDecimal
|
||||||
Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble
|
Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble
|
||||||
Dim Moneda As String = Row("Moneda").ToString
|
Dim Moneda As String = Row("Moneda").ToString
|
||||||
Dim TipoCambio As String = Row("Tipo Cambio").ToString
|
Dim TipoCambio As String = Row("Tipo Cambio").ToString
|
||||||
@@ -1249,7 +1249,6 @@ Partial Class General_SaldosIniciales
|
|||||||
Dim CveVendedor As Integer = 0
|
Dim CveVendedor As Integer = 0
|
||||||
Dim IEPS As Decimal = 0 'Row("IEPS").ToString.ToDecimal
|
Dim IEPS As Decimal = 0 'Row("IEPS").ToString.ToDecimal
|
||||||
Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString.ToEntero
|
Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString.ToEntero
|
||||||
Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDecimal, 0)
|
|
||||||
Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString, "")
|
Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString, "")
|
||||||
Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString.ToDecimal, 4), 0)
|
Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString.ToDecimal, 4), 0)
|
||||||
|
|
||||||
@@ -1300,7 +1299,7 @@ Partial Class General_SaldosIniciales
|
|||||||
0, 0, 0, FechaVencimiento, Fecha, "", "", Fecha, CveVendedor, Folio2, "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, -1, 0, CvePrePoliza,
|
0, 0, 0, FechaVencimiento, Fecha, "", "", Fecha, CveVendedor, Folio2, "", "", 0, 0, 0, "-1".ToDate, "-1".ToDate, "-1".ToDate, -1, -1, 0, CvePrePoliza,
|
||||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=Sucursal.ToEntero, CveSubProyectoEjecucion:=Sucursal.ToEntero,
|
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Serie:=Serie, CveSubProyecto:=Sucursal.ToEntero, CveSubProyectoEjecucion:=Sucursal.ToEntero,
|
||||||
CveSubProyectoCobranza:=Sucursal.ToEntero, IEPS:=IEPS,
|
CveSubProyectoCobranza:=Sucursal.ToEntero, IEPS:=IEPS,
|
||||||
ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente, ImpuestoLocal:=ImpuestosLocales) Then
|
ObservacionesAlmacen:=Transaccion, Entrega:=CodCliente, ImpuestoLocal:=ImpuestoLocal) Then
|
||||||
ErrorVentas = True
|
ErrorVentas = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1329,14 +1328,22 @@ Partial Class General_SaldosIniciales
|
|||||||
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaComplementaria = True
|
If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaComplementaria = True
|
||||||
|
|
||||||
'PrePólizaDetalle
|
'PrePólizaDetalle
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero) Then ErrorVentas = True : Exit For
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then ErrorVentas = True : Exit For
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||||
|
|
||||||
If IVA > 0 Then
|
If IVA > 0 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||||
End If
|
End If
|
||||||
'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString, 38, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For
|
'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString, 38, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For
|
||||||
|
|
||||||
|
If RetIVA > 0 Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, Folio.ToString, 8, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=RetIVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||||
|
End If
|
||||||
|
If ImpuestoLocal > 0 Then
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImpuestoLocal, Folio.ToString, 27, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImpuestoLocal, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsaComplementaria Then
|
If UsaComplementaria Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total * TipoCambio.ToDecimal - Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal - Total, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total * TipoCambio.ToDecimal - Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal - Total, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user