This commit is contained in:
rrene
2020-03-30 10:23:49 -07:00
2 changed files with 45 additions and 7 deletions

View File

@@ -51,9 +51,10 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlClientes.setEsWebService(True)
If ObjRH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
DdlPersonal.DataSource = ObjRH.DtResultados
End If
DdlPersonal.setEsWebService(True)
'If ObjRH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
' DdlPersonal.DataSource = ObjRH.DtResultados
'End If
If ObjClasificaciones.GetClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa) Then
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
@@ -73,7 +74,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlCconceptosContables.DataBind()
DdlCuenta.DataBind()
DdlProveedor.DataBind()
DdlPersonal.DataBind()
'DdlPersonal.DataBind()
DdlClasificacion.DataBind()
DdlAlmacen.DataBind()
@@ -94,6 +95,29 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlAlmacen.SelectedValue = GvRow.DataKey("CveAlmacen").ToEntero
TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta")
TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA")
Dim CveCliente As Integer = GvRow.DataKey("CveCliente").ToEntero
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
If CveCliente > 0 Then
DdlClientes.setEsWebService(False)
Dim ObjCliente As New ClsClientes
If ObjCliente.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
DdlClientes.ddl.DataSource = ObjCliente.DtResultados
End If
DdlClientes.ddl.DataBind()
DdlClientes.ddl.SelectedValue = CveCliente
End If
If CvePersonal > 0 Then
DdlPersonal.setEsWebService(False)
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
DdlPersonal.ddl.DataSource = ObjPersonal.DtResultados
End If
DdlPersonal.ddl.DataBind()
DdlPersonal.ddl.SelectedValue = CvePersonal
End If
LbAgregar.Text = "Actualizar"
UpModalModulos.Update()
RegistraScript("$('#ModalCat').modal();")
@@ -105,6 +129,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
If ObjConta.RemoveCuentasAsignaciones(GvRow.DataKey("CveCuentaAsignacion").ToEntero) Then
Alert("se elimino correctamente")
End If
CargaDatos()
UpDatos.Update()
ObjConta.Dispose()
End Sub
@@ -117,6 +143,12 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
DdlAlmacen.SelectedValue = -1
TxtIdCuentaContable.Text = ""
TxtPorcentajeIVA.Text = ""
DdlClientes.ddl.DataSource = ""
DdlClientes.ddl.DataBind()
DdlClientes.setEsWebService(True)
DdlPersonal.ddl.DataSource = ""
DdlPersonal.ddl.DataBind()
DdlPersonal.setEsWebService(True)
LbAgregar.Text = "Agregar"
UpModalModulos.Update()
RegistraScript("$('#ModalCat').modal();")
@@ -126,13 +158,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Dim ObjConta As New ClsContabilidad
Dim ErrorString As String = ""
If LbAgregar.Text = "Agregar" Then
If ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal) Then
ErrorString = "Error al Agregar"
End If
ElseIf LbAgregar.Text = "Actualizar" Then
If ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
If Not ObjConta.UpdateCuentasAsignaciones(CveConceptoAsignacion, DdlCconceptosContables.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal) Then
ErrorString = "Error al Actualizar"
@@ -142,6 +174,10 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
RegistraScript("$('#ModalCat').modal('hide');")
If ErrorString.Length > 0 Then
Alert(ErrorString)
Else
Alert("Agregado correctamente")
End If
CargaDatos()
UpDatos.Update()
End Sub
End Class

View File

@@ -1456,7 +1456,9 @@ Partial Class Inventarios_TraspasoAlmacen
BtnCancelarTraspaso.Visible = False
Else
BtnRecibir.Visible = True
BtnCancelarTraspaso.Visible = True
If UsuarioActual.TienePermisoProceso(290) Then
BtnCancelarTraspaso.Visible = True
End If
End If