Agregando nuevos campos al formato de cliente en saldos iniciales

This commit is contained in:
Antonio Gonzalez
2019-08-21 13:22:27 -05:00
parent 2ebadb8e49
commit d739266e31
2 changed files with 16 additions and 3 deletions

View File

@@ -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