-- opcionales en registro factura
This commit is contained in:
@@ -1237,8 +1237,6 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
ObjClientes.IniciaTransacSQL()
|
||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||
NumRow = NumRow + 1
|
||||
@@ -1374,13 +1372,8 @@ Partial Class General_SaldosIniciales
|
||||
Exit Select
|
||||
Case Else
|
||||
CveFormaPago33 = 99
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
'Dim RazonSocial As String = Row("RazonSocial").ToString()
|
||||
|
||||
'Contacto
|
||||
|
||||
If CveCliente > 0 Then
|
||||
@@ -1407,16 +1400,10 @@ Partial Class General_SaldosIniciales
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorClientes = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
If Not ErrorClientes Then
|
||||
ObjClientes.Commit()
|
||||
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1) Then Application("GlobalDTCliente") = ObjClientes.DtResultados
|
||||
@@ -1460,11 +1447,9 @@ Partial Class General_SaldosIniciales
|
||||
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||
Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'")
|
||||
RFC = Row("RFC").ToString().Trim
|
||||
RFC = Row("RFC").ToString().Trim
|
||||
Dim Serie As String = Row("Serie").ToString()
|
||||
Dim Folio As String = Row("Folio").ToString()
|
||||
Dim Fecha As Date = Row("Fecha").ToString().ToDate
|
||||
@@ -1477,17 +1462,18 @@ Partial Class General_SaldosIniciales
|
||||
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString())
|
||||
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 IEPS As Decimal = If(dt.Columns.Contains("IEPS"), Row("IEPS").ToString(), "0").ToDecimal
|
||||
Dim Moneda As String = Row("Moneda").ToString()
|
||||
Dim TipoCambio As String = Row("Tipo Cambio").ToString()
|
||||
Dim TipoCambio As String = If(dt.Columns.Contains("Tipo Cambio"), Row("Tipo Cambio").ToString(), "1")
|
||||
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()
|
||||
Dim CveProveedorSucursal As Integer = If(dt.Columns.Contains("CveProveedorSucursal"), Row("CveProveedorSucursal").ToString(), "0").ToEntero
|
||||
Dim PorcentajeIVA As String = If(dt.Columns.Contains("PorcentajeIVA"), Row("PorcentajeIVA").ToString(), "0")
|
||||
Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestosLocales"), Row("ImpuestosLocales").ToString(), "0").ToDecimal
|
||||
Dim RetIVAPorcentaje As Decimal = Row("RetIVAPorcentaje").ToString().ToDecimal
|
||||
Dim RetISRPorcentaje As Decimal = Row("RetISRPorcentaje").ToString().ToDecimal
|
||||
|
||||
Dim RetIVAPorcentaje As Decimal = If(dt.Columns.Contains("RetIVAPorcentaje"), Row("RetIVAPorcentaje").ToString(), "0").ToDecimal
|
||||
Dim RetISRPorcentaje As Decimal = If(dt.Columns.Contains("RetISRPorcentaje"), Row("RetISRPorcentaje").ToString(), "0").ToDecimal
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", String.Format("SubProyecto='{0}'", If(dt.Columns.Contains("SubProyecto"), Row("SubProyecto").ToString(), ""))).ToEntero
|
||||
If CveSubProyecto = 0 Then CveSubProyecto = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
|
||||
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorCompras = True
|
||||
If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorCompras = True
|
||||
@@ -1496,8 +1482,6 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESOS", "INGRESO", "ING", "FACTURA"), "Fac", "NC").ToString()
|
||||
|
||||
|
||||
|
||||
'Temporalmente SE BORRARA
|
||||
Dim Transaccion As String = "" 'Row("Transaccion2").ToString()
|
||||
Dim Folio2 As String = "" 'Row("Folio2").ToString()
|
||||
@@ -1527,7 +1511,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.ToDecimal, FechaVencimiento,
|
||||
False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal,
|
||||
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal, TotalOriginal:=Total) Then
|
||||
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal, TotalOriginal:=Total, CveSubProyecto:=CveSubProyecto) Then
|
||||
ErrorCompras = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1549,8 +1533,6 @@ Partial Class General_SaldosIniciales
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, IVA, 14, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero(), CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeIVA.ToDecimal) Then ErrorCompras = True : Exit For
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, IEPS, 25, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
|
||||
|
||||
If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetIVA, RetIVA, 15, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
|
||||
|
||||
Reference in New Issue
Block a user