- simplificación de uso de nómna
This commit is contained in:
@@ -289,23 +289,23 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
|
|
||||||
CargaCuentas()
|
CargaCuentas()
|
||||||
|
|
||||||
If Request("CvePeriodo") IsNot Nothing AndAlso IsNumeric(Request("CvePeriodo")) AndAlso Request("CvePeriodo").ToEntero() > 0 Then
|
'If Request("CvePeriodo") IsNot Nothing AndAlso IsNumeric(Request("CvePeriodo")) AndAlso Request("CvePeriodo").ToEntero() > 0 Then
|
||||||
ViewState("CvePeriodo") = Request("CvePeriodo").ToEntero()
|
' ViewState("CvePeriodo") = Request("CvePeriodo").ToEntero()
|
||||||
ViewState("CveProyecto") = Request("CveProyecto").ToEntero()
|
' ViewState("CveProyecto") = Request("CveProyecto").ToEntero()
|
||||||
ViewState("CveSubProyecto") = Request("CveSubProyecto").ToEntero()
|
' ViewState("CveSubProyecto") = Request("CveSubProyecto").ToEntero()
|
||||||
ViewState("CveTurno") = Request("CveTurno").ToEntero()
|
' ViewState("CveTurno") = Request("CveTurno").ToEntero()
|
||||||
|
|
||||||
'DdlPlantilla.Items.Add(New ListItem("Pago Nomina", "61"))
|
' 'DdlPlantilla.Items.Add(New ListItem("Pago Nomina", "61"))
|
||||||
'DdlPlantilla.SelectedValue = "61"
|
' 'DdlPlantilla.SelectedValue = "61"
|
||||||
DdlPlantilla.Enabled = False
|
' DdlPlantilla.Enabled = False
|
||||||
DivAgregarConceptos.Visible = False
|
' DivAgregarConceptos.Visible = False
|
||||||
|
|
||||||
CargaNomina()
|
' CargaNomina()
|
||||||
|
|
||||||
RegistraScript("$(document).ready(function () { calculateCargo(); Sys.Application.add_load(function (s, e) { calculateCargo(); }); } );", 1)
|
' RegistraScript("$(document).ready(function () { calculateCargo(); Sys.Application.add_load(function (s, e) { calculateCargo(); }); } );", 1)
|
||||||
RegistraScript("$(document).ready(function () { calculateAbono(); Sys.Application.add_load(function (s, e) { calculateAbono(); }); } );", 2)
|
' RegistraScript("$(document).ready(function () { calculateAbono(); Sys.Application.add_load(function (s, e) { calculateAbono(); }); } );", 2)
|
||||||
RegistraScript("$(document).ready(function () { comparar(); Sys.Application.add_load(function (s, e) { comparar(); }); } );", 3)
|
' RegistraScript("$(document).ready(function () { comparar(); Sys.Application.add_load(function (s, e) { comparar(); }); } );", 3)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If IfNull(Request("Tipo"), "").ToString() <> "NOMPROV" Then
|
If IfNull(Request("Tipo"), "").ToString() <> "NOMPROV" Then
|
||||||
GvPrePoliza.Columns(3).Visible = False
|
GvPrePoliza.Columns(3).Visible = False
|
||||||
@@ -360,81 +360,81 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
End With
|
End With
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaNomina()
|
'Private Sub CargaNomina()
|
||||||
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero()
|
' Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero()
|
||||||
Dim ObjNomina As New ClsNominas
|
' Dim ObjNomina As New ClsNominas
|
||||||
Dim ObjConta As New ClsContabilidad
|
' Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
Dim Dt As DataTable = Nothing
|
' Dim Dt As DataTable = Nothing
|
||||||
Dim Cuenta As String = ""
|
' Dim Cuenta As String = ""
|
||||||
Dim Concepto As String = ""
|
' Dim Concepto As String = ""
|
||||||
Dim IdCuenta As Integer = 0
|
' Dim IdCuenta As Integer = 0
|
||||||
Dim TipoMovto As Integer
|
' Dim TipoMovto As Integer
|
||||||
Dim CveConcepto As Integer
|
' Dim CveConcepto As Integer
|
||||||
Dim CodigoCuenta As String = ""
|
' Dim CodigoCuenta As String = ""
|
||||||
Dim NombreCuenta As String = ""
|
' Dim NombreCuenta As String = ""
|
||||||
Dim Referencia As String = ""
|
' Dim Referencia As String = ""
|
||||||
Dim EsComodin As Integer = 0
|
' Dim EsComodin As Integer = 0
|
||||||
DtMovimientos.Clear()
|
' DtMovimientos.Clear()
|
||||||
|
|
||||||
If ObjNomina.GetProvisionNomina(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
' If ObjNomina.GetProvisionNomina(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||||
Dt = ObjNomina.DtResultados
|
' Dt = ObjNomina.DtResultados
|
||||||
|
|
||||||
For Each drt As DataRow In Dt.Rows
|
' For Each drt As DataRow In Dt.Rows
|
||||||
Dim dr As DataRow = DtMovimientos.NewRow
|
' Dim dr As DataRow = DtMovimientos.NewRow
|
||||||
|
|
||||||
If drt("NombreCompleto").ToString() = "" AndAlso ObjConta.GetRetCuenta(31, UsuarioActual.CveEmpresa) Then
|
' If drt("NombreCompleto").ToString() = "" AndAlso ObjConta.GetRetCuenta(31, UsuarioActual.CveEmpresa) Then
|
||||||
CveConcepto = 98
|
' CveConcepto = 98
|
||||||
Cuenta = "Nominas por Pagar"
|
' Cuenta = "Nominas por Pagar"
|
||||||
IdCuenta = ObjConta.DtResultados(0)("IdCtaContable").ToString().ToEntero()
|
' IdCuenta = ObjConta.DtResultados(0)("IdCtaContable").ToString().ToEntero()
|
||||||
Concepto = "Pago Nomina"
|
' Concepto = "Pago Nomina"
|
||||||
Referencia = "Pago Nomina"
|
' Referencia = "Pago Nomina"
|
||||||
Else
|
' Else
|
||||||
Concepto = drt("NombreCompleto")
|
' Concepto = drt("NombreCompleto")
|
||||||
Referencia = ""
|
' Referencia = ""
|
||||||
CveConcepto = drt("CveConceptoContable").ToString().ToEntero()
|
' CveConcepto = drt("CveConceptoContable").ToString().ToEntero()
|
||||||
Cuenta = drt("ConceptoContable").ToString()
|
' Cuenta = drt("ConceptoContable").ToString()
|
||||||
IdCuenta = drt("IdCtaContable").ToString().ToEntero()
|
' IdCuenta = drt("IdCtaContable").ToString().ToEntero()
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero($"Id={IdCuenta}")
|
' Dim drr As DataRow = DtCuentasContables.FiltroPrimero($"Id={IdCuenta}")
|
||||||
CodigoCuenta = If(drr IsNot Nothing, drr("CuentaFormato").ToString(), "")
|
' CodigoCuenta = If(drr IsNot Nothing, drr("CuentaFormato").ToString(), "")
|
||||||
NombreCuenta = If(drr IsNot Nothing, drr("Nombre").ToString(), "")
|
' NombreCuenta = If(drr IsNot Nothing, drr("Nombre").ToString(), "")
|
||||||
|
|
||||||
TipoMovto = drt("TipoMovto")
|
' TipoMovto = drt("TipoMovto")
|
||||||
|
|
||||||
If TipoMovto = 0 Then
|
' If TipoMovto = 0 Then
|
||||||
dr("Cargo") = Math.Abs(drt("Importe").ToString().ToDecimal())
|
' dr("Cargo") = Math.Abs(drt("Importe").ToString().ToDecimal())
|
||||||
dr("Abono") = 0
|
' dr("Abono") = 0
|
||||||
Else
|
' Else
|
||||||
dr("Cargo") = 0
|
' dr("Cargo") = 0
|
||||||
dr("Abono") = Math.Abs(drt("Importe").ToString().ToDecimal())
|
' dr("Abono") = Math.Abs(drt("Importe").ToString().ToDecimal())
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
dr("IdCuenta") = IdCuenta
|
' dr("IdCuenta") = IdCuenta
|
||||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
' dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||||
dr("Cuenta") = Cuenta
|
' dr("Cuenta") = Cuenta
|
||||||
dr("Concepto") = Concepto
|
' dr("Concepto") = Concepto
|
||||||
dr("Descripcion") = Concepto
|
' dr("Descripcion") = Concepto
|
||||||
dr("Referencia") = Referencia
|
' dr("Referencia") = Referencia
|
||||||
dr("TipoMovto") = TipoMovto
|
' dr("TipoMovto") = TipoMovto
|
||||||
dr("EsComodin") = EsComodin
|
' dr("EsComodin") = EsComodin
|
||||||
dr("CveConcepto") = CveConcepto
|
' dr("CveConcepto") = CveConcepto
|
||||||
dr("CveProveedor") = "-1"
|
' dr("CveProveedor") = "-1"
|
||||||
dr("CveSubProyecto") = drt("CveSubProyecto")
|
' dr("CveSubProyecto") = drt("CveSubProyecto")
|
||||||
dr("CvePersonal") = drt("CvePersonal")
|
' dr("CvePersonal") = drt("CvePersonal")
|
||||||
dr("CveClasificacion") = drt("CveClasificacion")
|
' dr("CveClasificacion") = drt("CveClasificacion")
|
||||||
dr("CveTipoGasto") = drt("CveTipoGasto")
|
' dr("CveTipoGasto") = drt("CveTipoGasto")
|
||||||
|
|
||||||
DtMovimientos.Rows.Add(dr)
|
' DtMovimientos.Rows.Add(dr)
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
GvMov.DataSource = DtMovimientos
|
' GvMov.DataSource = DtMovimientos
|
||||||
GvMov.DataBind()
|
' GvMov.DataBind()
|
||||||
UPMovs.Update()
|
' UPMovs.Update()
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
Private Sub CargaPrePoliza()
|
Private Sub CargaPrePoliza()
|
||||||
BtnEliminar.Visible = True
|
BtnEliminar.Visible = True
|
||||||
@@ -1072,11 +1072,11 @@ Partial Class ContabilidadC_RegPrePoliza
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
If CvePeriodo > 0 Then
|
'If CvePeriodo > 0 Then
|
||||||
If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
' If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
MsgError = "No se pudo actualizar el periodo de la nómina"
|
' MsgError = "No se pudo actualizar el periodo de la nómina"
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
|
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
|
||||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||||
|
|||||||
@@ -579,10 +579,10 @@
|
|||||||
<table class="table table-striped table-advance table-hover Widthall">
|
<table class="table table-striped table-advance table-hover Widthall">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 730px"> </td>
|
<td style="width: 730px"> </td>
|
||||||
<th style="width: 70px;">
|
<th style="width: 90px;">
|
||||||
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="70px" Text="0.00"></asp:TextBox></th>
|
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="90px" Text="0.00"></asp:TextBox></th>
|
||||||
<th style="width: 70px;">
|
<th style="width: 90px;">
|
||||||
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="70px" Text="0.00"></asp:TextBox></th>
|
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="90px" Text="0.00"></asp:TextBox></th>
|
||||||
<asp:HiddenField ID="HdnTotales" runat="server" ClientIDMode="Static" />
|
<asp:HiddenField ID="HdnTotales" runat="server" ClientIDMode="Static" />
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user