This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-07-04 10:51:57 -07:00
71 changed files with 19098 additions and 1074 deletions

View File

@@ -1253,6 +1253,7 @@ Partial Class General_SaldosIniciales
Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString.ToEntero
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 PorcentajeRetIVA As Decimal = If(dt.Columns.Contains("PorcentajeRetIVA"), Round(Row("PorcentajeRetIVA").ToString.ToDecimal, 4), 0)
Dim PedidoContrato As String = If(dt.Columns.Contains("Pedido"), Row("Pedido").ToString, "")
@@ -1309,7 +1310,7 @@ Partial Class General_SaldosIniciales
End If
CveVenta = ObjVentas.CveVenta
If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, IVA, SubTotal * PorcentajeIVA, "Saldo Inicial", 0, 0, Sucursal.ToEntero, 0, PorcentajeIVA:=PorcentajeIVA) Then
If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, IVA, SubTotal * PorcentajeIVA, "Saldo Inicial", 0, 0, Sucursal.ToEntero, 0, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA) Then
ErrorVentas = True
Exit For
End If
@@ -1712,14 +1713,14 @@ Partial Class General_SaldosIniciales
Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
Dim YaExiste As Boolean = False
Dim DataTemp As DataTable
Dim Afectable As Boolean = False
Cuenta = Cuenta.Replace(" ", "")
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then
If ObjConta.GetCuentas(-1, Cuenta.Replace("-", "").Trim, -1, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero
'TipoCuenta = ObjConta.DtResultados().FiltroPrimeroValor("Tipo")
Afectable = ObjConta.DtResultados().FiltroPrimeroValor("Afectable") = "True"
Else
Reporte.AppendLine($"{Cuenta} - {NombreCuenta} - {Importe} </br>")
TieneError = True
@@ -1746,7 +1747,7 @@ Partial Class General_SaldosIniciales
' CargoAbono = False
'End If
If YaExiste = False Then
If YaExiste = False AndAlso Afectable Then
If IdCuenta > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", 95, Concepto, Now.ToDate, -1, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then
TieneError = True