Creacion del modelo clientes aunque CveCliente sea -1 y la asignacion valores para empresaCRM

This commit is contained in:
Hector Javier Rodriguez Flores
2021-09-24 14:21:25 -07:00
parent 394be5e7c6
commit 72b4c47cbe
2 changed files with 11 additions and 1 deletions

View File

@@ -6582,6 +6582,8 @@ Namespace Modelos
Me.ClienteSucursal.Sucursal = Cliente.Sucursal
Me.ClienteSucursal.ImprimeNombreSucursal = Cliente.ImprimeNombreSucursal.ToString()
End If
Else
Cliente = New Modelos.ClienteModel()
End If
End Sub
Public Sub SetMoneda()
@@ -9791,6 +9793,9 @@ Namespace Modelos
Inherits Modelos.EntityModel
Protected Overloads Sub SetDefaultValues()
CveCliente = -1
Nombre = ""
RFC = ""
Codigo = ""
EnviarFactura = "Si"
Estatus = "Activo"
NoExt = ""

View File

@@ -10048,6 +10048,11 @@ Partial Class Ventas
'CLIENTE
ObjFactura.CveCliente = CveCliente
ObjFactura.SetCliente()
ObjFactura.CveEmpresaCRM = CveEmpresaCRM
If CveCliente = -1 And CveEmpresaCRM > 0 Then
ObjFactura.Cliente.Nombre = LblEmpresaCRM.Text
ObjFactura.Cliente.RFC = LblRFCCRM.Text
End If
'SUCURSAL
'ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
@@ -13824,7 +13829,7 @@ Partial Class Ventas
CreaObjetosVenta(True)
If ObjFactura Is Nothing Or ObjFactura.Cliente Is Nothing Then
If ObjFactura Is Nothing Or (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then
Alert("Ocurrió un error al procesar los datos para la vista previa. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
ObjFactura = Nothing
Exit Sub