regenerar cuenta
This commit is contained in:
@@ -192,6 +192,10 @@
|
|||||||
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="240px" ValidationGroup="GrpModulo" ></asp:DropDownList>
|
<asp:DropDownList ID="DdlTipoGasto" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoGasto" DataValueField="CveTipoGasto" Width="240px" ValidationGroup="GrpModulo" ></asp:DropDownList>
|
||||||
<label for="<%= DdlTipoGasto.ClientID.ToString()%>">Tipo Gasto: </label>
|
<label for="<%= DdlTipoGasto.ClientID.ToString()%>">Tipo Gasto: </label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright" id="divRegeneraCuenta" runat="server" visible="false">
|
||||||
|
<asp:CheckBox ID="chkRegeneraCuenta" runat="server" />
|
||||||
|
<label for="<%= chkRegeneraCuenta.ClientID.ToString()%>">Regenera Cuenta: </label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -136,7 +136,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
|
DdlCconceptosContables.SelectedValueExist(GvRow.DataKey("CveConceptoContable"))
|
||||||
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
|
DdlCuenta.SelectedValueExist(GvRow.DataKey("CveCuenta"))
|
||||||
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
|
DdlConceptoNomina.SelectedValueExist(GvRow.DataKey("CveConceptoNomina").ToEntero)
|
||||||
DdlProveedor.ddl.SelectedValueExist(GvRow.DataKey("CveProveedor"))
|
If GvRow.DataKey("CveProveedor").ToEntero > 0 Then
|
||||||
|
DdlProveedor.ddl.Items.Clear()
|
||||||
|
DdlProveedor.ddl.ClearSelection()
|
||||||
|
Dim NomProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, CveProveedor:=GvRow.DataKey("CveProveedor").ToEntero).FiltroPrimeroValor("NombreComercial")
|
||||||
|
DdlProveedor.ddl.Items.Add(New ListItem(NomProv, GvRow.DataKey("CveProveedor")))
|
||||||
|
DdlProveedor.SelectedValue = GvRow.DataKey("CveProveedor")
|
||||||
|
End If
|
||||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||||
DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen"))
|
DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen"))
|
||||||
TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta")
|
TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta")
|
||||||
@@ -150,8 +156,14 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||||
|
|
||||||
DdlClientes.ddl.SelectedValueExist(CveCliente)
|
DdlClientes.ddl.SelectedValueExist(CveCliente)
|
||||||
DdlPersonal.ddl.SelectedValueExist(CvePersonal)
|
|
||||||
|
|
||||||
|
If CvePersonal > 0 Then
|
||||||
|
Dim drp As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal).FiltroPrimeroValor("NombreCompleto")
|
||||||
|
|
||||||
|
DdlPersonal.ddl.Items.Add(New ListItem(drp, CvePersonal))
|
||||||
|
|
||||||
|
End If
|
||||||
|
DdlPersonal.ddl.SelectedValueExist(CvePersonal)
|
||||||
LbAgregar.Text = "Actualizar"
|
LbAgregar.Text = "Actualizar"
|
||||||
UpModalModulos.Update()
|
UpModalModulos.Update()
|
||||||
RegistraScript("$('#ModalCat').modal();")
|
RegistraScript("$('#ModalCat').modal();")
|
||||||
@@ -197,6 +209,9 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
DdlTipoGasto.DataBind()
|
DdlTipoGasto.DataBind()
|
||||||
' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
||||||
End If
|
End If
|
||||||
|
If Dr("CveTipoSaldo").ToString = "1" Then
|
||||||
|
divRegeneraCuenta.Visible = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -262,30 +277,37 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
|||||||
|
|
||||||
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
Protected Sub LbAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
ObjConta.IniciaTransacSQL()
|
||||||
Dim ErrorString As String = ""
|
Dim ErrorString As String = ""
|
||||||
If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then
|
If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then
|
||||||
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
If Not ObjConta.AddCuentasAsignaciones(DdlCconceptosContables.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlCuenta.SelectedValue.ToEntero, TxtIdCuentaContable.Text.ToEntero,
|
||||||
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.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) Then
|
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||||
|
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||||
ErrorString = "Error al agregar"
|
ErrorString = "Error al agregar"
|
||||||
End If
|
End If
|
||||||
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then
|
||||||
If Not 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,
|
DdlProveedor.SelectedValue.ToEntero, DdlClientes.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero,
|
||||||
DdlClasificacion.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, TxtPorcentajeIVA.Text.ToDecimal, CveBancoCuenta:=DdlCuentaBancaria.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) Then
|
CveConceptoNomina:=DdlConceptoNomina.SelectedValue.ToEntero(), CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero,
|
||||||
|
CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, RegeneraCuenta:=chkRegeneraCuenta.Checked) Then
|
||||||
ErrorString = "Error al actualizar"
|
ErrorString = "Error al actualizar"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
|
||||||
If Not ChkSeguirRegistrando.Checked Then RegistraScript("$('#ModalCat').modal('hide');")
|
If Not ChkSeguirRegistrando.Checked Then RegistraScript("$('#ModalCat').modal('hide');")
|
||||||
|
|
||||||
If ErrorString.Length > 0 Then
|
If ErrorString.Length > 0 Then
|
||||||
|
ObjConta.RollBack()
|
||||||
Alert(ErrorString)
|
Alert(ErrorString)
|
||||||
Else
|
Else
|
||||||
|
ObjConta.Commit()
|
||||||
Alert("Agregado correctamente")
|
Alert("Agregado correctamente")
|
||||||
End If
|
End If
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
CargaDatosSistema()
|
CargaDatosSistema()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user