SMS Sub Especialidades, Genrar almacen a cliente en fnc 404 fnc 578
This commit is contained in:
@@ -2520,6 +2520,15 @@ Partial Class Clientes
|
||||
|
||||
Dim CvePrecioLista As Integer = DdlPrecioLista.SelectedValue.ToEntero()
|
||||
|
||||
|
||||
If Not ErrorProceso Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(404) = "30" AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DdlAlmacenAsignado.SelectedValue.ToEntero = -1 Then 'limpiar ddl alamcen temporal que se agrego temporalmente
|
||||
If Not GeneraGuardaAlmacenCliente(ObjClientes.IniciaTransacSQL) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
'VERIFICA SI ES CLIENTE NUEVO O ACTUALIZACION
|
||||
If Me.CveCliente = -1 Then
|
||||
@@ -2642,13 +2651,16 @@ Partial Class Clientes
|
||||
ObjClientes.RollBack()
|
||||
CargaPrecioLista()
|
||||
Alert("Ocurrió un error al guardar.", TipoMensaje.MsgError)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404) = "30" And UsuarioActual.Empresa.Funcionalidad(578) = "1" Then 'limpiar ddl alamcen temporal que se agrego temporalmente
|
||||
CargaDdlAlmacen()
|
||||
End If
|
||||
Else
|
||||
ObjClientes.Commit()
|
||||
|
||||
If CveClienteNuevo > 0 Then
|
||||
ViewState("CveCliente") = CveClienteNuevo
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
@@ -5972,16 +5984,28 @@ Partial Class Clientes
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DdlSATPais.Items.Add(New ListItem("Guatemala", "GTM"))
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
CargaDdlAlmacen()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDdlAlmacen()
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
|
||||
DdlAlmacenAsignado.SelectedValue = Nothing
|
||||
DdlAlmacenAsignado.ClearSelection()
|
||||
DdlAlmacenAsignado.Items.Clear()
|
||||
|
||||
divAlmacenAsignado.Visible = True
|
||||
DdlAlmacenAsignado.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacenAsignado.DataBind()
|
||||
DdlAlmacenAsignado.Items.Insert(0, New ListItem("-", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||
@@ -10397,5 +10421,25 @@ Partial Class Clientes
|
||||
|
||||
End Function
|
||||
|
||||
Private Function GeneraGuardaAlmacenCliente(ByRef transaccionSQL As SqlTransaction) As Boolean
|
||||
|
||||
Dim respuesta As Boolean = True
|
||||
Dim ObjInv As New ClsInventarios(transaccionSQL)
|
||||
|
||||
If ObjInv.AddAlmacen(TxtNombre.Text.Trim, 1, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, DdlSubProyecto.SelectedValue.ToEntero) Then
|
||||
|
||||
DdlAlmacenAsignado.Items.Add(New ListItem(TxtNombre.Text.Trim, ObjInv.CveAlmacenAgregado.ToString))
|
||||
DdlAlmacenAsignado.SelectedValueExist(ObjInv.CveAlmacenAgregado.ToString)
|
||||
|
||||
GlobalDTAlmacen(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
Else
|
||||
respuesta = False
|
||||
End If
|
||||
|
||||
Return respuesta
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user