Servicios

This commit is contained in:
Oscar Irigoyen
2022-10-14 22:16:03 -07:00
parent 7760088839
commit f5d84f920d
7 changed files with 110 additions and 22 deletions

View File

@@ -650,7 +650,7 @@ Partial Class General_SaldosIniciales
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
DTCuentasContables = ObjConta.DtResultados
End If
ObjConta.Dispose()
@@ -1502,8 +1502,8 @@ Partial Class General_SaldosIniciales
Dim CveProveedorSucursal As Integer = Row("CveProveedorSucursal").ToString.ToEntero
Dim PorcentajeIVA As String = Row("PorcentajeIVA").ToString
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
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorCompras = True
@@ -1511,7 +1511,8 @@ 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.Contiene("INGRESOS", "INGRESO", "ING"), "Fac", "NC").ToString
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESOS", "INGRESO", "ING", "FACTURA"), "Fac", "NC").ToString
'Temporalmente SE BORRARA
@@ -1553,7 +1554,7 @@ Partial Class General_SaldosIniciales
CveCompra = ObjCompras.CveCompra
'Compra Detalle
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, Sucursal.ToEntero, -1, 0, 1, SubTotal, 0.16D, SubTotal, 0, "Carga Inicial", -1) Then
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, Sucursal.ToEntero, -1, 0, 1, SubTotal, 0.16D, SubTotal, 0, "Carga Inicial", -1, IVAPorcentaje:=PorcentajeIVA.ToDecimal, RetIVAPorcentaje:=RetIVAPorcentaje, RetISRPorcentaje:=RetISRPorcentaje) Then
ErrorCompras = True
Exit For
End If
@@ -1563,7 +1564,13 @@ Partial Class General_SaldosIniciales
'PrePólizaDetalle
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Folio, IIf(TipoDocto = "Fac", 5, 18).ToString.ToEntero, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Total, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, Folio, 6, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=SubTotal, CveClasificacion:=CveClasificacion, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Folio, 14, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=IVA, CveSubProyecto:=Sucursal.ToEntero) Then ErrorCompras = True : Exit For
If IVA > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Folio, 14, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=IVA, 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, 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
@@ -1572,8 +1579,8 @@ Partial Class General_SaldosIniciales
'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
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Folio, 95, Folio, Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Total - Saldo) Then ErrorCompras = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, $"{Folio} SALDO INICIAL", 17, Folio, Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Total - Saldo) Then ErrorCompras = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, $"{Folio} SALDO INICIAL", 95, Folio, Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Total - Saldo) Then ErrorCompras = True : Exit For
End If
Encontrados = Encontrados + 1
@@ -2372,8 +2379,8 @@ Partial Class General_SaldosIniciales
Dim Clasificacion As String = dRow("Clasificacion").ToString.Trim
Dim Categoria As String = dRow("Categoria").ToString.Trim
Dim UsoClasificacion As String = dRow("UsoClasificacion").ToString.Trim.ToUpper
Dim CuentaContableIngreso As String = dRow("CuentaContableIngreso").ToString.Trim
Dim CuentaContableGasto As String = dRow("CuentaContableGasto").ToString.Trim
Dim CuentaContableIngreso As String = dRow("CuentaContableIngreso").ToString.Trim.Replace("-", "")
Dim CuentaContableGasto As String = dRow("CuentaContableGasto").ToString.Trim.Replace("-", "")
Dim CveClasificacion As Integer = -1
Dim CveUsoClasificacion As Integer = -1