This commit is contained in:
HECTOR RODRIGUEZ
2021-05-03 09:39:07 -07:00
parent cb8c22ead5
commit 83248cd3ed
18 changed files with 1548 additions and 1542 deletions

View File

@@ -96,13 +96,15 @@
</tr><tr> <td>Crédito al Salario</td>
<td>
<asp:TextBox ID="TxtCredSalario" runat="server" Width="75px"></asp:TextBox></td></tr></table>
<asp:TextBox ID="TxtCredSalario" runat="server" Width="75px"></asp:TextBox></td>
</tr></table>
</asp:Panel>
<asp:Panel ID="PnlFiniquito" runat="server" Visible="false">
<table>
<asp:Panel ID="PnlFiniquito" runat="server" Visible="true">
<table border="0" id="TbIEPersonal" runat="server" Visible="false" >
<tr><td>Personal:</td><td><asp:DropDownList CssClass="select2me" ID="DdlNominaPersonal" DataTextField="Nombre" DataValueField="CvePersonal" runat="server" Width="200px"> </asp:DropDownList></td></tr>
</table>
<table border="0" id="TbIE" runat="server" visible="false">
<table border="0" id="TbIE" runat="server" visible="true">
<tr><td>Movimiento:</td><td><asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar" Width="250px"></asp:DropDownList></td></tr>
<tr><td>Cuenta Bancaria:</td><td><asp:DropDownList ID="DdlCuenta" CssClass="form-control input-sm select2me" Width="250px" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpGuardar"></asp:DropDownList></td></tr>
<tr><td>Folio:</td><td><asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm" Width="70px"></asp:TextBox></td></tr>

View File

@@ -51,6 +51,7 @@ Partial Class AC_RegNomina
CargaPresupuestos()
CargaMeta()
CargaCombosIE()
TxtImporte.Enabled = False
CreaDTDetalles()
BtnAgregar.Enabled = False
@@ -232,6 +233,10 @@ Partial Class AC_RegNomina
Dim total As Double = LbTotal.Text.ToDouble
LbTotal.Text = (total + dr("Importe").ToString.ToDouble).ToString.FormatoNumero
If RBLPago.selectedvalue = "1" Then
txttotal.text = LbTotal.Text.todecimal.FormatoNumero
End If
CboMeta.SelectedIndex = -1
CboUnidadAdministrativa.Items.Clear()
CboFuenteFinanciamiento.Items.Clear()
@@ -241,6 +246,8 @@ Partial Class AC_RegNomina
TxtImporte.Text = ""
TxtImporte.Enabled = False
BtnAgregar.Enabled = False
Else
Alert("El importe supera el capital disponible. Por favor de revisar y modificar", TipoMensaje.MsgAdvertencia)
End If
@@ -270,6 +277,9 @@ Partial Class AC_RegNomina
ChkDevengar.Checked = True : ChkEjercer.Checked = True : ChkPagar.Checked = True
ChkEjercer.Enabled = True : ChkPagar.Enabled = True
tbGeneral.Visible = True
TbIEPersonal.visible = False
PnlFiniquito.visible = True
CargaCombosIE()
Case "2"
PnlNomina.Visible = False : PnlFiniquito.Visible = True
ChkEjercer.Checked = False : ChkEjercer.Enabled = False
@@ -278,7 +288,7 @@ Partial Class AC_RegNomina
ChkDevengar.Checked = True
trGasto.Visible = True
tbGeneral.Visible = True
TbIEPersonal.visible = True
DdlNominaPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("IdCtaContPersonal > 0")
DdlNominaPersonal.DataBind()
TbIE.Visible = False
@@ -287,19 +297,7 @@ Partial Class AC_RegNomina
ChkDevengar.Checked = True : ChkEjercer.Checked = True : ChkPagar.Checked = True
trGasto.Visible = False
tbGeneral.Visible = False
DdlTipoTransaccion.Items.Clear()
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros(String.Format("Tipo = '{0}'", If(RBLPago.SelectedValue = "3", "Ing", "Egs")))
DdlTipoTransaccion.DataBind()
DdlNominaPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("IdCtaContPersonal > 0")
DdlNominaPersonal.DataBind()
DdlCuenta.Items.Clear()
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas
DdlCuenta.DataSource = dt
DdlCuenta.DataBind()
TbIE.Visible = True
CargaCombosIE()
If RBLPago.SelectedValue = "4" Then
trGasto.Visible = True
@@ -311,6 +309,23 @@ Partial Class AC_RegNomina
End Sub
Public Sub CargaCombosIE()
DdlTipoTransaccion.Items.Clear()
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros(String.Format("Tipo = '{0}' and Estatus = 1", If(RBLPago.SelectedValue = "3", "Ing", "Egs")))
DdlTipoTransaccion.DataBind()
DdlNominaPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltraParametros("IdCtaContPersonal > 0")
DdlNominaPersonal.DataBind()
DdlNominaPersonal.items.insert(0, New listitem("-", "-1"))
DdlCuenta.Items.Clear()
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas
DdlCuenta.DataSource = dt
DdlCuenta.DataBind()
TbIE.Visible = True
End Sub
Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged
'Dim valor As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
'Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing
@@ -351,6 +366,8 @@ Partial Class AC_RegNomina
Dim Total As Decimal = DtDetalle.SUMD("Importe")
Dim Fecha As Date = TxtFecha.Text.ToDate
Dim Concepto As String = TxtConcepto.Text.Trim
Dim GeneraIE As Boolean = False
Dim IdCtaISPT As Integer = 640
Dim IdCtaCreditoSalario As Integer = 635
@@ -379,10 +396,15 @@ Partial Class AC_RegNomina
If dr IsNot Nothing Then
IdCtaPersonal = dr("IdCtaContPersonal").ToString.ToEntero
End If
Else
If Seleccion = "1" Then
CtaPuente = 0
GeneraIE = True
End If
End If
If Seleccion.Contiene("3", "4") Then
If Seleccion.Contiene("1", "3", "4") Then
Dim dr As DataRow
dr = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue))
@@ -440,57 +462,57 @@ Partial Class AC_RegNomina
If TieneError Then MensajeError = "Error Tipo 1"
If Seleccion.Contiene("1", "2", "3") Then
'If Seleccion.Contiene("1", "2", "3") Then
Total = DtDetalle.SUMD("Importe")
If Seleccion = "3" Then Total = TxtTotal.Text.ToDecimal
Dim objACPI As New ClsAC()
' Total = DtDetalle.SUMD("Importe")
' If Seleccion = "3" Then Total = TxtTotal.Text.ToDecimal
' Dim objACPI As New ClsAC()
If objACPI.GetPresupuestoIngresos(CvePresupuestoIngreso, UsuarioActual.Empresa.EjercicioActual, True, UsuarioActual.CveEmpresa) Then
If objACPI.DtResultados.Rows.Count > 0 Then
drt = objACPI.DtResultados.Rows(0)
' If objACPI.GetPresupuestoIngresos(CvePresupuestoIngreso, UsuarioActual.Empresa.EjercicioActual, True, UsuarioActual.CveEmpresa) Then
' If objACPI.DtResultados.Rows.Count > 0 Then
' drt = objACPI.DtResultados.Rows(0)
If RBLPago.SelectedValue.Contiene("1", "2") Then
' If RBLPago.SelectedValue.Contiene("1", "2") Then
'se debe de registrar el ingreso
'DEVENGO EL INGRESO
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaPorEjecutar").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
' 'se debe de registrar el ingreso
' 'DEVENGO EL INGRESO
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaPorEjecutar").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
' 'CARGO la deuda del cliente
' 'If Not objAC.AddMovimiento(IDPoliza, CtaCliente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
' 'abono,
'CARGO la deuda del cliente
' If Not objAC.AddMovimiento(IDPoliza, CtaCliente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
'abono,
If Not objAC.AddMovimiento(IDPoliza, CtaCliente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaMatriz").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaMatriz").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
End If
If RBLPago.SelectedValue.Contiene("1", "3") Then
'RECAUDO EL INGRESO
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
' End If
' If RBLPago.SelectedValue.Contiene("1", "3") Then
' 'RECAUDO EL INGRESO
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaRecaudado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
' If Not objAC.AddMovimiento(IDPoliza, drt("IdCuentaRecaudado").ToString.ToEntero, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
If Seleccion = "1" AndAlso Not objAC.AddMovimiento(IDPoliza, CtaPuente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
' If Seleccion = "1" AndAlso Not objAC.AddMovimiento(IDPoliza, CtaPuente, False, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
If Not objAC.AddMovimiento(IDPoliza, CtaCliente, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
' If Not objAC.AddMovimiento(IDPoliza, CtaCliente, True, Total, "", Concepto, 0, Fecha, "") Then TieneError = True
End If
' End If
Else
TieneError = True
End If
Else
TieneError = True
End If
' Else
' TieneError = True
' End If
' Else
' TieneError = True
' End If
objACPI.Dispose()
' objACPI.Dispose()
End If
'End If
If IdCtaPersonal > 0 Then
@@ -499,13 +521,15 @@ Partial Class AC_RegNomina
'cuando es el pago a personal, se carga, los demas casos se abona
If Seleccion.Contiene("1", "2", "4") Then If Not objAC.AddMovimiento(IDPoliza, IdCtaPersonal, If(Seleccion = "4", False, True), Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
CtaPuente = 0 ' para que no se inserte mas abajo
GeneraIE = True
End If
If Seleccion.Contiene("3", "4") Then
If Seleccion.Contiene("1", "3", "4") AndAlso GeneraIE Then
'registro un IE
ObjIE = New ClsBancos
ObjIE.IniciaTransacSQL()
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
Dim CvePrePoliza = ObjMov.AddPrePolizas("Banc", 2, Importe, Importe, 1, Fecha, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim CvePrePoliza = ObjMov.AddPrePolizas("Banc/RegNomina", 2, Importe, Importe, 1, Fecha, TxtConcepto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
Dim Obs As String = TxtConcepto.Text
Dim Folio As String
@@ -520,6 +544,10 @@ Partial Class AC_RegNomina
If Seleccion = "3" Then
CveConceptoCargo = 29
CveConceptoAbono = 30
ElseIf Seleccion = "1" Then
CveConceptoCargo = 95
CveConceptoAbono = 30
Obs = "NOMINA PAGADA"
End If
'lo envia como transferencia recibida
@@ -544,10 +572,6 @@ Partial Class AC_RegNomina
End If
End If
'Registra el movimiento total
Importe = DtDetalle.SUM("Importe")
If CtaPuente > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, CtaPuente, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
@@ -566,7 +590,6 @@ Partial Class AC_RegNomina
Importe = TxtISPT.Text.ToDouble - TxtCredSalario.Text.ToDouble
If Importe <> 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaDevolucionISPT, If(Importe > 0, False, True), Math.Abs(Importe), "", Concepto, 0, Fecha, "") Then TieneError = True
Else
TieneError = True
End If

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.