diff --git a/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx b/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx index 251dc040f..dbc90a51d 100644 Binary files a/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx and b/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx differ diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index d5bdb3a1b..9ff2eeba6 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -121,6 +121,12 @@ Partial Class General_SaldosIniciales Alert("El nombre de la treceava columna debe ser 'Plazo Cobranza'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub End If + If RblFormato.SelectedValue = "1" Then + If Not dt.Columns(14).ColumnName = "Es distribuidor" Then + Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + End If ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Then If Not dt.Columns(0).ColumnName = "Sucursal" Then @@ -718,6 +724,7 @@ Partial Class General_SaldosIniciales Dim Contacto As String = Row("Contacto").ToString Dim CelularContacto As String = Row("Celular Contacto").ToString Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero + Dim EsDistribuidor As Boolean = If(Row("Es distribuidor").ToString = "si", True, False) If CveCliente > 0 Then ExisteCliente = True @@ -730,7 +737,7 @@ Partial Class General_SaldosIniciales 'End If Else If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, -1, - "-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1) Then + "-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor) Then ErrorClientes = True RFC.GuardaLog Exit For @@ -769,11 +776,11 @@ Partial Class General_SaldosIniciales Dim Encontrados As Integer = 0 DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) Dim RFC As String = "" -Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("") + Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("") Dim CvePS As Integer = drr("CvePS").ToString.ToEntero Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString.ToEntero Dim CveClasificacion As Integer = drr("CveClasificacion").ToString.ToEntero - Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) + Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows @@ -789,7 +796,7 @@ Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("") Dim Saldo As Decimal = Row("Saldo").ToString.ToDecimal Dim TipoDocto As String = Row("Tipo Documento").ToString Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero - GuardaLog(Sucursal + " - " + Row("Sucursal").ToString) + GuardaLog(Sucursal + " - " + Row("Sucursal").ToString) Dim RetIVA As Double = Row("Ret IVA").ToString.ToDouble Dim RetISR As Double = Row("Ret ISR").ToString.ToDouble Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal