cambios, para activación de cuentas de crédito
This commit is contained in:
@@ -180,6 +180,18 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlPersonal.SelectedText = drp
|
||||
End If
|
||||
|
||||
If GvRow.DataKey("CveCredito").ToEntero > 0 Then
|
||||
DdlCreditos.Items.Clear()
|
||||
DdlCreditos.ClearSelection()
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||
End If
|
||||
ObjCreditos.Dispose()
|
||||
DdlCreditos.DataBind()
|
||||
DdlCreditos.SelectedValue = GvRow.DataKey("CveCredito")
|
||||
End If
|
||||
|
||||
LbAgregar.Text = "Actualizar"
|
||||
UpModalModulos.Update()
|
||||
RegistraScript("$('#ModalCat').modal();")
|
||||
@@ -203,6 +215,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString)
|
||||
divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
|
||||
divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
|
||||
divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString)
|
||||
|
||||
DdlActivoFijo.Enabled = False
|
||||
|
||||
@@ -215,10 +228,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
Else
|
||||
DdlActivoFijo.Enabled = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
divConceptoNomina.Visible = Dr("AplicaNomina").ToString = "True"
|
||||
|
||||
If CveConceptoContable = 51 Then
|
||||
@@ -231,6 +242,21 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
If Dr("CveTipoSaldo").ToString = "1" Then
|
||||
divRegeneraCuenta.Visible = True
|
||||
End If
|
||||
|
||||
If Dr("AplicaCredito").ToString = "True" Then
|
||||
Dim ObjCreditos As New ClsBancos
|
||||
If ObjCreditos.GetCreditos(-1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlCreditos.DataSource = ObjCreditos.DtResultados.FiltraParametros("", DistinctColumns:={"CveCredito", "Referencia"})
|
||||
End If
|
||||
ObjCreditos.Dispose()
|
||||
DdlCreditos.DataBind()
|
||||
|
||||
If OpAgregar Then
|
||||
DdlCreditos.Enabled = True
|
||||
Else
|
||||
DdlCreditos.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -322,7 +348,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
ErrorString = "Error al agregar"
|
||||
End If
|
||||
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
||||
@@ -330,7 +356,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero(),
|
||||
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveCredito:=DdlCreditos.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||
ErrorString = "Error al actualizar"
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user