--Al crear/actualizar ps, precios, clientes a la otra empresa FUNC 563
This commit is contained in:
@@ -781,7 +781,7 @@ Partial Class Clientes
|
||||
|
||||
'JM 05-02-19: CRM
|
||||
'If UsuarioActual.Empresa.UsaCRM Then
|
||||
If GlobalDTCRMTipoProceso(UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||
If GlobalDTCRMTipoProceso(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTCRMTipoProceso(UsuarioActual.CveEmpresa).Rows.Count > 0 Then
|
||||
VerificaVinculacion()
|
||||
UpAccionesCRM.Update()
|
||||
End If
|
||||
@@ -2618,6 +2618,10 @@ Partial Class Clientes
|
||||
Next
|
||||
End If
|
||||
|
||||
If Not ErrorProceso AndAlso UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
ErrorProceso = Not ActualizarClienteFranquicia(ObjClientes, CveClienteNuevo)
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
@@ -2671,6 +2675,10 @@ Partial Class Clientes
|
||||
If Not ErrorProceso AndAlso Not GuardarDocumentosClientes(objDoc, Me.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If Not ErrorProceso AndAlso UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
ErrorProceso = Not ActualizarClienteFranquicia(ObjClientes, Me.CveCliente)
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
@@ -2773,6 +2781,23 @@ Partial Class Clientes
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function ActualizarClienteFranquicia(ByRef ObjClientes As ClsClientes, CveClienteRef As Integer) As Boolean
|
||||
Dim TieneError As Boolean = False
|
||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||
|
||||
Dim Franquicias As String() = FranquiciasStr.Split(","c)
|
||||
|
||||
For Each Franquicia As String In Franquicias
|
||||
Dim CveEmpresaFranquicia As Integer = Franquicia.ToEntero
|
||||
If Not ObjClientes.UpdateClienteFranquicia(CveClienteRef, UsuarioActual.CveEmpresa, CveEmpresaFranquicia) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Return Not TieneError
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user