-- mejoras en carga de porv
This commit is contained in:
@@ -1237,14 +1237,15 @@ Partial Class General_SaldosIniciales
|
||||
Dim TipoDocto As String = Row("Tipo Documento").ToString
|
||||
Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero
|
||||
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString)
|
||||
Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble
|
||||
Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble
|
||||
Dim RetIVA As Decimal = Row("Ret IVA").ToString.ToDecimal
|
||||
Dim RetISR As Decimal = Row("Ret ISR").ToString.ToDecimal
|
||||
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
|
||||
Dim Moneda As String = Row("Moneda").ToString
|
||||
Dim TipoCambio As String = Row("Tipo Cambio").ToString
|
||||
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString.ToDate
|
||||
Dim CveMoneda As Integer = 1
|
||||
Dim CveProveedorSucursal As Integer = Row("CveProveedorSucursal").ToString.ToEntero
|
||||
Dim PorcentajeIVA As String = Row("PorcentajeIVA").ToString
|
||||
|
||||
|
||||
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorCompras = True
|
||||
@@ -1252,7 +1253,7 @@ Partial Class General_SaldosIniciales
|
||||
If Not CveProveedor > 0 Then Alert(String.Format("No se encontró el Proveedor con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorCompras = True : Exit For
|
||||
If Not CveProveedorSucursal > 0 Then CveProveedorSucursal = -1
|
||||
|
||||
TipoDocto = IIf(TipoDocto.ToUpper = "INGRESOS", "Fac", "NC").ToString
|
||||
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESOS", "INGRESO", "ING"), "Fac", "NC").ToString
|
||||
|
||||
|
||||
'Temporalmente SE BORRARA
|
||||
@@ -1261,9 +1262,9 @@ Partial Class General_SaldosIniciales
|
||||
Dim CodProvee As String = "" 'Row("CodProvee2").ToString
|
||||
|
||||
'Moneda
|
||||
If Moneda = "Pesos" Then
|
||||
If Moneda.ToUpper.Contiene("PESOS", "PESO", "MXN") Then
|
||||
CveMoneda = 1
|
||||
ElseIf Moneda = "Dólares" Then
|
||||
ElseIf Moneda.ToUpper.Contiene("DOLARES", "DOLAR", "USD", "DÓLARES") Then
|
||||
CveMoneda = 2
|
||||
End If
|
||||
|
||||
@@ -1287,7 +1288,7 @@ Partial Class General_SaldosIniciales
|
||||
'Compra
|
||||
If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero, SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDouble, FechaVencimiento,
|
||||
False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal,
|
||||
NumeroReembolso:=Transaccion, PorcentajeIVA:=0.16) Then
|
||||
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal) Then
|
||||
ErrorCompras = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1308,6 +1309,10 @@ Partial Class General_SaldosIniciales
|
||||
If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, Folio, 25, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=IEPS, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
|
||||
|
||||
|
||||
If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, Folio, 15, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetIVA, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
|
||||
If RetISR > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetISR, Folio, 16, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetISR, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
|
||||
|
||||
|
||||
'Saldo
|
||||
If Saldo < Total Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Folio, 17, Folio, Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Total - Saldo) Then ErrorCompras = True : Exit For
|
||||
|
||||
Reference in New Issue
Block a user