diff --git a/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx b/Empresas/Grales/SaldosIniciales/FormatoClientes.xlsx index dbc90a51d..a5159403a 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 9ff2eeba6..3fbfc4bca 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -122,7 +122,15 @@ Partial Class General_SaldosIniciales Exit Sub End If If RblFormato.SelectedValue = "1" Then - If Not dt.Columns(14).ColumnName = "Es distribuidor" Then + If Not dt.Columns(14).ColumnName = "Vendedor" Then + Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not dt.Columns(15).ColumnName = "Clasificación" Then + Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not dt.Columns(16).ColumnName = "Es distribuidor" Then Alert("El nombre de la catorceava columna debe ser 'Es distribuidor'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub End If @@ -723,7 +731,12 @@ Partial Class General_SaldosIniciales Dim Telefono As String = Row("Teléfono").ToString Dim Contacto As String = Row("Contacto").ToString Dim CelularContacto As String = Row("Celular Contacto").ToString + Dim Vendedor As String = Row("Vendedor").ToString + Dim Clasificacion As String = Row("Clasificación").ToString Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString.ToEntero + + Dim CveVendedor As Integer = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveVendedor", $"Vendedor = '{Vendedor}'").ToString.ToEntero + Dim CveClasificación As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero Dim EsDistribuidor As Boolean = If(Row("Es distribuidor").ToString = "si", True, False) If CveCliente > 0 Then @@ -736,8 +749,8 @@ Partial Class General_SaldosIniciales ' Exit For '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, EsDistribuidor:=EsDistribuidor) Then + If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, "", "", Colonia, "", "", Estado, Pais, RFC, CodigoPostal, "", "", Contacto, "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, -1, -1, + "-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, 0, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación) Then ErrorClientes = True RFC.GuardaLog Exit For