This commit is contained in:
HECTOR RODRIGUEZ
2021-05-05 19:36:16 -07:00
21 changed files with 614 additions and 66 deletions

View File

@@ -93,12 +93,23 @@
<table><tr><td>ISPT</td>
<td>
<asp:TextBox ID="TxtISPT" runat="server" Width="75px"></asp:TextBox></td>
<td>Servicio Médico:</td><td><asp:TextBox ID="TxtServicioMedico" runat="server" Width="75px"></asp:TextBox></td>
<td>Fonacot:</td><td><asp:TextBox ID="TxtFonacot" runat="server" Width="75px"></asp:TextBox></td>
</tr><tr> <td>Crédito al Salario</td>
<td>
<asp:TextBox ID="TxtCredSalario" runat="server" Width="75px"></asp:TextBox></td>
</tr></table>
<td>Pensión:</td><td><asp:TextBox ID="TxtPension" runat="server" Width="75px"></asp:TextBox></td>
<td>P. Infonavit:</td><td><asp:TextBox ID="TxtInfonavit" runat="server" Width="75px"></asp:TextBox></td>
</tr>
</tr><tr>
<td>ISR Asimilados</td><td> <asp:TextBox ID="TxtISRAsimilados" runat="server" Width="75px"></asp:TextBox></td>
<td>C. Sindical</td>
<td>
<asp:TextBox ID="TxtSindical" runat="server" Width="75px"></asp:TextBox></td>
<td> </td><td> </td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="PnlFiniquito" runat="server" Visible="true">
<table border="0" id="TbIEPersonal" runat="server" Visible="false" >

View File

@@ -373,6 +373,12 @@ Partial Class AC_RegNomina
Dim IdCtaCreditoSalario As Integer = 635
Dim IdCtaDevolucionISPT As Integer = 1745
Dim IdCtaMatriz As Integer
Dim IdCtaCuotaSindical As Integer = 644
Dim IdCtaInfonavit As Integer = 2018
Dim IdCtaFonacot As Integer = 646
Dim IdCtaServicioMedico As Integer = 643
Dim IdCtaPension As Integer = 643
Dim IdCtaISRAsimilados As Integer = 4442
Dim Importe As Double
Dim MsgError As String = ""
@@ -564,6 +570,7 @@ Partial Class AC_RegNomina
ObjIE.UpdateIEPrePoliza(Fecha, objAC.Folio.ToString, IDPoliza, CvePrePoliza, CveIE, -1)
Else
MsgError = "no se pudo agregar el movimiento bancario"
TieneError = True
End If
@@ -586,9 +593,34 @@ Partial Class AC_RegNomina
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaCreditoSalario, False, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
'Registro del Mov Devolución
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
'Registro Cuotas Sindicales
Importe = TxtSindical.Text.ToDouble
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaCuotaSindical, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
'Registro Prestamo infonavit
Importe = txtInfonavit.Text.ToDouble
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaInfonavit, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
'Registro Fonacot
Importe = txtFonacot.Text.ToDouble
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaFonacot, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
'Registro Servicio Medico
Importe = txtServicioMedico.Text.ToDouble
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaServicioMedico, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
'Registro Pensión
Importe = txtPension.Text.ToDouble
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaPension, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
'Registro ISR Asimilados
Importe = TxtISRAsimilados.Text.ToDouble
If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaISRAsimilados, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True
''Registro del Mov Devolución
'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

View File

@@ -215,6 +215,24 @@ Public Class ClsNominas
End Function
Public Function ReportedePercepcionesDeduccionesGet(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean
Dim retorno As Boolean = False
DTSet = New DataSet()
DataAdapter("[PA_RH_ReportedePercepcionesDeducciones]", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@TipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
End With
Try
SqlAdapter.Fill(DTSet)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el reporte de Percepciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function ReportedeincidenciasGET(cveEmpresa As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveTipoPeriodo As Integer) As Boolean
Dim retorno As Boolean = False
DTSet = New DataSet()

View File

@@ -369,7 +369,7 @@
<asp:UpdatePanel ID="UPCompras" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvCxP" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas X Pagar Pendientes"
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal"
DataKeyNames="CveCompra,ImporteProgramo,Saldo,SubTotal,IVA,IVADeducible,IVANoDeducible,IEPS,RetIVA,RetISR,Original,UUID,RFC,CveFactura,SerieFolio,Descripcion,CvePrePoliza,Fecha,EstatusInventario,CveProveedor,TipoCambio, CveMoneda,CveRetIVAConcepto,IVAPorPagar,IVAPorPagarDeducible,IVAPorPagarNoDeducible,IEPSPorPagar,CveRetISRConcepto,PorcentajeIVA,CveTipoConcepto,CveSubProyecto,TotalOriginal,EsImportacion"
Width="100%" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>

View File

@@ -1043,21 +1043,17 @@ Partial Class Bancos_ProveedoresAbonar
Dim PorcentajeImpuesto As Decimal = 0
If ConceptoContable.Contiene(14, 19) AndAlso gvr.DataKey("CveCompra").ToEntero > 0 Then
Dim objcompras As New ClsCompras
objcompras.GetCompras(gvr.DataKey("CveCompra").ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa)
If objcompras.DtResultados IsNot Nothing AndAlso objcompras.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = objcompras.DtResultados.Rows(0)
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
If dr("EsImportacion").ToString = "True" Then
EsImportacion = True
If ConceptoContable = 14 Then
ConceptoContable = 287
Else
ConceptoContable = 288
End If
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
If gvr.DataKey("EsImportacion").ToString = "1" Then
EsImportacion = True
If ConceptoContable = 14 Then
ConceptoContable = 287
Else
EsImportacion = False
ConceptoContable = 288
End If
Else
EsImportacion = False
End If
End If

View File

@@ -1358,7 +1358,7 @@ Partial Class Compras_Compras
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then
If TmpDT.MAX("CvePS").ToEntero > 0 Then
BtnGuardar.Enabled = False
'BtnGuardar.Enabled = False
RegistraScript("$('#ImgBtnBuscarOC').click()")
End If
End If
@@ -4083,9 +4083,15 @@ Partial Class Compras_Compras
'Verifica funcionalidad 128 "Require orden de compra para factura de compra"
Dim EsViatico As Boolean = False
If RBLPago.SelectedValue.ToEntero = 3 AndAlso RBLContado.SelectedValue.ToEntero = 2 AndAlso TxtNumeroReembolso.Text.Length > 0 AndAlso DdlPersonalReembolso.SelectedValue.ToEntero > 0 Then
EsViatico = True
End If
If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then
If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal And Not EsViatico Then
If Not CompraEstaVinculadaOC Then
Alert("Debe de vincular una orden de compra para registrar la factura")
Exit Sub

View File

@@ -848,7 +848,10 @@ Partial Class ContabilidadC_RegPrePoliza
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto")
dr("CveCuenta") = drt("CveCuenta")
dr("FolioPoliza") = drt("FolioPoliza")
If CvePrePoliza > 0 Then
dr("FolioPoliza") = drt("FolioPoliza")
End If
DtMovimientos.Rows.Add(dr)

View File

@@ -658,10 +658,10 @@ Partial Class Contabilidad2_CatCuentas
Case 3
pnlOpcion2.Visible = True
pnlOpcion3.Visible = True
If DdlClasificacion.Items.Count < 2 Then
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind()
End If
'If DdlClasificacion.Items.Count < 2 Then
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind()
'End If
Case 4
pnlOpcion4.Visible = True
Case 5

View File

@@ -116,6 +116,10 @@ Partial Class AC_RepEstadoActividades
DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString))
End If
DdlPeriodo.SelectedValue = Now.Month.ToString
DdlSubproyecto.datasource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubproyecto.databind
End Sub
Private Sub CargaDatos()

View File

@@ -13,7 +13,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
End Sub
Private Sub CargaCombos()
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,12,14,16, 26)")
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,2,12,14,16, 26)")
DdlAlmacen.DataSource = DtAlmacenes
DdlAlmacen.DataBind()

View File

@@ -76,6 +76,9 @@
<asp:LinkButton ID="LnkFormatoRenuncia" OnClick="LnkFormatoRenuncia_Click" runat="server"><i class="fa fa-bell"></i>Formato Finiquito</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID ="LnkFormatoRenuncia" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
@@ -148,7 +151,8 @@
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton ID="LnkCancelar" Visible="false" OnClick="LnkGuardarDatos_Click" ValidationGroup="GrpGuardar" CssClass="btn btn-danger" runat="server">Cancelar</asp:LinkButton>
<asp:LinkButton ID="LnkSimular" OnClick="LnkSimular_Click" ValidationGroup="GrpGuardar" CssClass="btn yellow-gold" runat="server">Simular</asp:LinkButton>
<asp:LinkButton ID="LnkCancelar" Visible="false" OnClick="LnkCancelar_Click" ValidationGroup="GrpGuardarcan" CssClass="btn btn-danger" runat="server">Cancelar</asp:LinkButton>
<asp:LinkButton ID="LnkGuardarDatos" OnClick="LnkGuardarDatos_Click" ValidationGroup="GrpGuardar" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
</div>
</div>
@@ -281,7 +285,7 @@
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>
@@ -352,7 +356,7 @@
<asp:TemplateField HeaderText="Concepto">
<ItemTemplate>
<asp:Label ID="LtlConceptoD" runat="server" Text='<%# Eval("ConceptoD") %>' Style="word-break: break-all;"></asp:Label>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConceptoD_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
<asp:LinkButton ID="LnkConceptoD" OnClick="LnkConcepto_Click" runat="server" Text='<%# Eval("ConceptoD") %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle HorizontalAlign="Left" Width="37%" />
</asp:TemplateField>

View File

@@ -210,8 +210,8 @@ public partial class Nomina_Finiquito : ClsPaginas
}
protected void LnkConcepto_Click(object sender, EventArgs e)
{
int SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
string SRTipoConcepto = ((LinkButton)sender).CommandArgument;
int SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
string SRTipoConcepto = ((LinkButton)sender).CommandArgument;
#region carga conceptos
DataTable dtCon;
if (SRCveConcepto > 0)
@@ -498,6 +498,217 @@ public partial class Nomina_Finiquito : ClsPaginas
protected void LnkFormatoRenuncia_Click(object sender, EventArgs e)
{
DataTable dtper = dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 AND SoloVisible =0");
DataTable dtded = dtConceptos.FiltraParametros("Tipo IN ('D') AND EsPadre = 1 AND SoloVisible =0");
dtper.Columns.Add("BorradoLogico", typeof(int));
dtded.Columns.Add("BorradoLogico", typeof(int));
foreach (DataRow row in dtper.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal)) != 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtper.AcceptChanges();
foreach (DataRow row in dtded.Rows)
{
int BorradoLogico = 0;
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
if (!(dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal)) != 0))
{
BorradoLogico = 1;
}
row["BorradoLogico"] = BorradoLogico;
}
dtded.AcceptChanges();
dtper = dtper.FiltraParametros("BorradoLogico=0");
dtded = dtded.FiltraParametros("BorradoLogico=0");
int maxper = dtper.Rows.Count;
int maxded = dtded.Rows.Count;
int i = 0;
List<NConcepto> lconc = new List<NConcepto>();
for (i = 0; i < maxper || i < maxded; i++)
{
NConcepto nConcepto = new NConcepto();
DataRow row;
if (maxper > i)
{
row = dtper.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
nConcepto.CveConceptoP = CveConcepto;
nConcepto.ConceptoP = Concepto;
nConcepto.NoConceptoP = Codigo;
nConcepto.ImporteP = Importe;
nConcepto.ValorP = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
}
if (maxded > i)
{
row = dtded.Rows[i];
int CveConcepto = row["CveConcepto"].ToString().ToEntero();
string Concepto = row["Concepto"].ToString();
string Codigo = row["Codigo"].ToString();
//bool visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0);
double Importe = dtempleados.SUM(string.Format("[V_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
nConcepto.CveConceptoD = CveConcepto;
nConcepto.ConceptoD = Concepto;
nConcepto.NoConceptoD = Codigo;
nConcepto.ImporteD = Importe;
nConcepto.ValorD = dtempleados.SUM(string.Format("[VAL_{0}]", CveConcepto), string.Format("CvePersonal = {0}", CvePersonal));
}
lconc.Add(nConcepto);
}
lconc.Add(new NConcepto());
NConcepto SubTotales = new NConcepto();
SubTotales.CveConceptoP = 0;
SubTotales.ConceptoP = "Total Percepciones";
SubTotales.EstatusP = -2;
SubTotales.ImporteP = dtempleados.SUM("SumaPercepciones", string.Format("CvePersonal = {0}", CvePersonal));
///Alert(SubTotales.ImporteP.ToString());
SubTotales.CveConceptoD = 0;
SubTotales.ConceptoD = "Total Deducciones";
SubTotales.EstatusD = -2;
SubTotales.ImporteD = dtempleados.SUM("SumaDeducciones", string.Format("CvePersonal = {0}", CvePersonal));
NConcepto Totales = new NConcepto();
Totales.CveConceptoD = 0;
Totales.ConceptoD = "Total";
Totales.EstatusD = -3;
Totales.ImporteD = dtempleados.SUM("Total", string.Format("CvePersonal = {0}", CvePersonal));
lconc.Add(SubTotales);
lconc.Add(Totales);
DataTable dtCon = new DataTable();
dtCon.Columns.Add(new DataColumn("NoConceptoP", typeof(string)));
dtCon.Columns.Add(new DataColumn("ConceptoP", typeof(string)));
dtCon.Columns.Add(new DataColumn("LabelValorP", typeof(string)));
dtCon.Columns.Add(new DataColumn("CveConceptoP", typeof(int)));
dtCon.Columns.Add(new DataColumn("ImporteP", typeof(double)));
dtCon.Columns.Add(new DataColumn("ValorP", typeof(double)));
dtCon.Columns.Add(new DataColumn("EstatusP", typeof(int)));
dtCon.Columns.Add(new DataColumn("isEditedP", typeof(int)));
dtCon.Columns.Add(new DataColumn("isOnlyBisibleP", typeof(int)));
dtCon.Columns.Add(new DataColumn("NoConceptoD", typeof(string)));
dtCon.Columns.Add(new DataColumn("ConceptoD", typeof(string)));
dtCon.Columns.Add(new DataColumn("LabelValorD", typeof(string)));
dtCon.Columns.Add(new DataColumn("CveConceptoD", typeof(int)));
dtCon.Columns.Add(new DataColumn("ImporteD", typeof(double)));
dtCon.Columns.Add(new DataColumn("ValorD", typeof(double)));
dtCon.Columns.Add(new DataColumn("EstatusD", typeof(int)));
dtCon.Columns.Add(new DataColumn("isEditedD", typeof(int)));
dtCon.Columns.Add(new DataColumn("isOnlyBisibleD", typeof(int)));
foreach (NConcepto itc in lconc)
{
DataRow dr = dtCon.NewRow();
dr["NoConceptoP"] = itc.NoConceptoP;
dr["ConceptoP"] = itc.ConceptoP;
dr["LabelValorP"] = itc.LabelValorP;
dr["CveConceptoP"] = itc.CveConceptoP;
dr["ImporteP"] = itc.ImporteP;
dr["ValorP"] = itc.ValorP;
dr["EstatusP"] = itc.EstatusP;
dr["isEditedP"] = itc.isEditedP;
dr["isOnlyBisibleP"] = itc.isOnlyBisibleP;
dr["NoConceptoD"] = itc.NoConceptoD;
dr["ConceptoD"] = itc.ConceptoD;
dr["LabelValorD"] = itc.LabelValorD;
dr["CveConceptoD"] = itc.CveConceptoD;
dr["ImporteD"] = itc.ImporteD;
dr["ValorD"] = itc.ValorD;
dr["EstatusD"] = itc.EstatusD;
dr["isEditedD"] = itc.isEditedD;
dr["isOnlyBisibleD"] = itc.isOnlyBisibleD;
dtCon.Rows.Add(dr);
}
dtCon.AcceptChanges();
List<Microsoft.Reporting.WebForms.ReportDataSource> lrds = new List<Microsoft.Reporting.WebForms.ReportDataSource>();
Microsoft.Reporting.WebForms.ReportDataSource rds = new Microsoft.Reporting.WebForms.ReportDataSource();
rds.Name = "DataSet1";
rds.Value = dtCon;// lconc;
lrds.Add(rds);
List<Microsoft.Reporting.WebForms.ReportParameter> parametros = new List<Microsoft.Reporting.WebForms.ReportParameter>();
string CodigoEmpleado = "";
string NombreCompleto = "";
string RFC = "";
string CURP = "";
string TipoPeriodo = "";
string NSS = "";
string DiasLaborados = "";
string DiasFaltados = "";
string DiasVacaciones = "";
string FechaInicio = "";
string FechaFin = "";
string DiasRetardos = "";
string DiasIncapacidad = "";
string SubProyecto = "";
{
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal));
if (drow != null)
{
DiasLaborados = string.Format("{0}", drow["DiasLaborados"].ToString().ToEntero());
DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero());
DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero());
FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero());
}
}
//string Codigo = "";
using (ClsRH objrh = new ClsRH())
{
if (objrh.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) && objrh.DtResultados.Rows.Count > 0)
{
DataRow drow = objrh.DtResultados.Rows[0];
SubProyecto = drow["SubProyecto"].ToString();
CodigoEmpleado = drow["Codigo"].ToString();
NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString();
CURP = drow["CURP"].ToString();
TipoPeriodo = drow["TipoPeriodo"].ToString();
NSS = drow["NSS"].ToString();
}
}
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasIncapacidad", DiasIncapacidad));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Codigo", CodigoEmpleado));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NombreCompleto", NombreCompleto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("RFC", RFC));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("CURP", ""));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("TipoPeriodo", TipoPeriodo));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("NSS", NSS));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasLaborados", DiasLaborados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasFaltados", DiasFaltados));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasVacaciones", DiasVacaciones));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaInicio", FechaInicio));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaFin", FechaFin));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("DiasRetardos", DiasRetardos));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("Empresa", UsuarioActual.Empresa.Empresa));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("SubProyecto", SubProyecto));
parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("FechaPago", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
string urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, string.Format("Empresas/{0}/Formatos/SobreRecibo.rdlc", UsuarioActual.CveEmpresa));
if (!System.IO.File.Exists(urlfile))
{
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
}
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null);
}
protected void LnkCambiarEmpleado_Click(object sender, EventArgs e)
@@ -868,4 +1079,152 @@ public partial class Nomina_Finiquito : ClsPaginas
}
}
protected void LnkCancelar_Click(object sender, EventArgs e)
{
using (ClsNominas onom = new ClsNominas())
{
if (onom.RemoveFiniquito(CvePersonal, UsuarioActual.CveEmpresa, CvePersonalAltas))
{
Alert("se ha eliminado el proceso de finiquito");
}
}
}
protected void LnkSimular_Click(object sender, EventArgs e)
{
if (LblFechaAlta.Text.ToDate() > TxtFechaBaja.Text.ToDate())
{
Alert("la fecha de baja no puede ser menor a la fecha alta", ModExtensiones.TipoMensaje.MsgAdvertencia);
}
else
{
bool continuar = false;
using (ClsRH ObjPersonal = new ClsRH())
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
{
if (ObjPersonal.UpPersonalAltas(CvePersonal, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), -1, DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
{
DataRow da = ObjPersonal.DtResultados.Rows[0];
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
CvePeriodoFiniquito = da["CvePeriodoFiniquito"].ToString().ToEntero();
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
}
if (continuar)
{
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa);
}
if (continuar)
{ loadsobrerecibo(onom); }
if (continuar)
{
ObjPersonal.RollBack();
}
else
{
ObjPersonal.RollBack();
}
}
}
UPDatos.Update();
}
protected void DdlmcConceptos_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void BtnAceptarMC_Click(object sender, EventArgs e)
{
bool continuar = true;
int CveNomina = 0;
double Total = 0;
int CveMoneda = 1;
int CveMetodoPago = 0;
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
if (CveConcepto > 0 && CvePersonal > 0)
{
decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal();
decimal ImporteGravadoConcepto = TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal();
decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();
using (ClsNominas objNomina = new ClsNominas())
{
objNomina.IniciaTransacSQL();
if (continuar)
{
if (objNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodoIndemnizacion, -1, UsuarioActual.CveEmpresa))
{
if (objNomina.DtResultados.Rows.Count > 0)
{
CveNomina = objNomina.CveNomina;
}
else
{
if (objNomina.AddNom_Nominas(-1, 1, CvePersonal, CvePeriodoIndemnizacion, Total, 0, 0, Total, CveMoneda, 1, CveMetodoPago, DateTime.Now, "Deducciones nómina",
"", "", "", "", 0, 0, 0, new DateTime(), new DateTime(), new DateTime(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, false))
{
CveNomina = objNomina.CveNomina;
}
else
{
continuar = false;
}
}
}
}
if (CveNomina == 0)
{
continuar = false;
}
if (continuar)
{
if (continuar)
{
if (!objNomina.AddUPNom_NominasDetalles(CveNomina, CvePeriodoIndemnizacion, CvePersonal, CveConcepto, ImporteConcepto, ImporteGravadoConcepto, ImporteExentoConcepto, ImporteValor, UsuarioActual.CveUsuario, true))
{
continuar = false;
}
}
}
if (continuar)
{ objNomina.Commit(); }
else
{
objNomina.RollBack();
}
}
if (continuar)
{
using (ClsNominas objNomina = new ClsNominas())
{
loadsobrerecibo(objNomina);
}
Alert("El cambio se ha guardado correctamente.");
}
}
else
{
if (CveConcepto > 0)
{
Alert("Debe seleccionar un empleado.", TipoMensaje.MsgAdvertencia);
}
else
{
Alert("Debe seleccionar un concepto.", TipoMensaje.MsgAdvertencia);
}
}
}
}

View File

@@ -173,6 +173,9 @@
<li>
<asp:LinkButton ID="LnkAsistenciaIncidencias" Visible="true" OnClick="LnkAsistenciaIncidencias_Click" runat="server"><i class="fa fa-check-square"></i>Incidencias asistencia </asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LinkButton2" Visible="true" OnClick="lnkreportepercepciones_Click" runat="server"><i class="fa fa-check-square"></i>Reporte percepciones y deducciones </asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkReporteAcumulados" Visible="true" OnClick="LnkReporteAcumulados_Click" runat="server"><i class="fa fa-line-chart"></i>Reporte acumulados </asp:LinkButton>
</li>
@@ -2045,6 +2048,48 @@
</div>
</div>
<div id="DmodalReportePercepcionesdeducciones" class="modal ADS fade" role="dialog">
<div class="modal-dialog" tabindex="-1">
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Reporte de percepciones y deducciones</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtRIFechaInicio">Fecha Inicio</asp:Label>
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtRpdFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtRpdFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporteInicidencia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtRIFechaFin">Fecha Fin</asp:Label>
<ajax:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="TxtRpdFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtRpdFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporteInicidencia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkrRepPercpDed" OnClick="LnkrRepPercpDed_Click" ValidationGroup="VGReporterepperde" CssClass="btn btn-primary" runat="server">Descargar</asp:LinkButton>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</div>
<div id="DmodalReporteInicidencia" class="modal ADS fade" role="dialog">
<div class="modal-dialog" tabindex="-1">
<div class="modal-content rowpadding">

View File

@@ -1541,15 +1541,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
//SRCvePersonal
if (SRCveConcepto > 0)
{
using (ClsNominas onom =new ClsNominas())
using (ClsNominas onom = new ClsNominas())
{
if(onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado))
if (onom.DeleteNom_NominasDetalles(SRCveConcepto, SRCvePersonal, CvePeriodoSeleccionado))
{
Alert("el importe sera tomado del calculo y no del valor fijo");
}
}
}
}
}
protected void LnkConcepto_Click(object sender, EventArgs e)
{
SRCveConcepto = ((LinkButton)sender).CommandArgument.ToEntero();
@@ -2346,7 +2346,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkImportexCalculo.CommandArgument = LnkImporte.CommandArgument;
LnkImporteDxCalculo.CommandArgument = LnkImporteD.CommandArgument;
LnkImportexCalculo.Visible = isEditedP;
LnkImporteDxCalculo.Visible =isEditedD;
LnkImporteDxCalculo.Visible = isEditedD;
LnkImporte.Text = (CveConcepto > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteP").ToDecimal()) : (CveConceptoPolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
LnkImporteD.Text = (CveConceptoD > 0 ? string.Format("${0:N2}", e.Row.DataKey("ImporteD").ToDecimal()) : (CveConceptoDolgvc > 0 ? "<i class=\"fa fa-plus\"></i>" : ""));
@@ -4803,7 +4803,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
string script = "";// string.Format("SaveCsv(\"MovtosAfil.txt\", '{0}');SaveCsv(\"MovtosmodSalario.txt\", '{1}');SaveCsv(\"movtosBajas.txt\", '{2}');", MovtosAfil.Replace("'", "\\'"), MovtosmodSalario.Replace("'", "\\'"), movtosBajas.Replace("'", "\\'"));
if (ChkSuaAltas.Checked)
{
script= string.Format("{1}SaveCsv(\"MovtosAfil.txt\", '{0}');", MovtosAfil.Replace("'", "\\'"), script);
script = string.Format("{1}SaveCsv(\"MovtosAfil.txt\", '{0}');", MovtosAfil.Replace("'", "\\'"), script);
}
if (ChkSuaBajas.Checked)
{
@@ -5628,14 +5628,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
using (ClsNominas objnom = new ClsNominas())
{
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos = 0;
if (objnom.DtResultados.Rows.Count > 0)
{
CvePrePolizaProvision = objnom.DtResultados.Rows[0]["CvePrePoliza"].ToString().ToEntero();
CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero();
}
if (objnom.Autorizaperiodoconta(CvePeriodoSeleccionado, UsuarioActual.CveEmpresa))
{
int CvePrePolizaProvision = 0; int CvePrePolizaasmilidos = 0;
if (objnom.DtResultados.Rows.Count > 0)
{
CvePrePolizaProvision = objnom.DtResultados.Rows[0]["CvePrePoliza"].ToString().ToEntero();
CvePrePolizaasmilidos = objnom.DtResultados.Rows[0]["CvePrePolizaAsimilables"].ToString().ToEntero();
}
string mensaje = string.Format("La provision a sido autorizada.<br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\">Provision </a><br/><a href=\"../Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}&Tipo=NOMPROV\"> Asimilados</a>", CvePrePolizaProvision, CvePrePolizaasmilidos);
Alert(mensaje);
}
@@ -5764,6 +5764,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
RegistraScript("$('#DmodalReporteInicidencia').modal()");
}
protected void lnkreportepercepciones_Click(object sender, EventArgs e)
{
RegistraScript("$('#DmodalReportePercepcionesdeducciones').modal()");
}
protected void LnkProcesarReporteIncidencia_Click(object sender, EventArgs e)
{
@@ -5864,4 +5868,48 @@ public partial class Nomina_Nomina2 : ClsPaginas
protected void LinkButton1_Click(object sender, EventArgs e)
{
}
protected void LnkrRepPercpDed_Click(object sender, EventArgs e)
{
DateTime fechai = TxtRIFechaInicio.Text.ToDateTime();
DateTime fechaf = TxtRIFechaFin.Text.ToDateTime();
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
using (ClsNominas nom = new ClsNominas())
{
if (nom.ReportedePercepcionesDeduccionesGet(UsuarioActual.CveEmpresa, fechai, fechaf, 4))
{
var libro = wb.AddWorksheet(nom.DTSetResultados.Tables[0], "Percepciones y deducciones");
libro.ColumnsUsed().AdjustToContents();
//ws.Row(1).InsertRowsAbove(1);
}
}
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename=percepciones .xlsx", ""));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
}

View File

@@ -146,6 +146,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Tipo" DataField="Tipo" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="8.5%" />
<asp:TemplateField HeaderText="Descripción" ItemStyle-Width="20%">
<ItemTemplate>
<div class="truncate" style="max-width: 200px;">
@@ -155,18 +156,18 @@
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Proveedor" Target="_blank" DataTextField="Proveedor" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="~/Compras/Proveedores.aspx?CveProveedor={0}" ControlStyle-CssClass="truncate" ItemStyle-Width="20%" />
<asp:BoundField DataField="DetallePS" HeaderText="Detalle Productos / Servicios" ControlStyle-CssClass="Texto" ItemStyle-Font-Size="X-Small" ItemStyle-Width="20%" />
<asp:TemplateField HeaderText="Importe" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Center">
<asp:BoundField DataField="DetallePS" HeaderText="Detalle Productos / Servicios" ControlStyle-CssClass="Texto" ItemStyle-Font-Size="X-Small" />
<asp:TemplateField HeaderText="Importe" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label Text='<%#String.Concat(Eval("Total", "{0:c}"), " ", Eval("MonAbreviatura"))%>' ID="LbImporte" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="5%">
<asp:TemplateField ItemStyle-Width="2.5%">
<ItemTemplate>
<asp:CheckBox runat="server" ID="CheckVincular" ClientIDMode="AutoID" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<asp:TemplateField ItemStyle-Width="2.5%">
<HeaderTemplate>PDF</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplPDF" runat="server" Text="PDF"></asp:HyperLink>

View File

@@ -251,7 +251,7 @@ Partial Class OC_PopUpBuscarReq
GV.Columns(2).Visible = False
End If
e.Row.Cells(5).Text = e.Row.DBCampo("DetallePS").Replace("^", "<br />")
e.Row.Cells(6).Text = e.Row.DBCampo("DetallePS").Replace("^", "<br />")
End If
End Sub

View File

@@ -4,11 +4,11 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.GVCalculosSBC tr th:nth-child(n+6):not(:nth-child(n+10)) {
.GVCalculosSBC tr th:nth-child(n+9):not(:nth-child(n+13)) {
background-color: #a9a9e8 !important;
}
.GVCalculosSBC tr th:nth-child(n+10):not(:nth-child(n+13)) {
.GVCalculosSBC tr th:nth-child(n+13):not(:nth-child(n+16)) {
background-color: #88d6cd !important;
}
</style>
@@ -88,7 +88,7 @@
<ContentTemplate>
<table id="tableheader" style="display: none">
<tr>
<th colspan="5"></th>
<th colspan="8"></th>
<th colspan="4" style="background-color: #a9a9e8 !important;">Actual</th>
<th colspan="3" style="background-color: #88d6cd !important;">Nuevo</th>
<th></th>
@@ -117,9 +117,24 @@
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="NSS">
<asp:TemplateField HeaderText="Antiguedad">
<ItemTemplate>
<asp:Label ID="lblnumeroSS" runat="server" Text='<%# Eval("NumeroSS")%>'> </asp:Label>
<asp:Label ID="lblnumeroSS" runat="server" Text='<%# Eval("Antiguedad")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Días aguinaldo">
<ItemTemplate>
<asp:Label ID="lblDiasAguinaldo" runat="server" Text='<%# Eval("NumDiasAguinaldo")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Días vacaciones">
<ItemTemplate>
<asp:Label ID="lblDiasVacaciones" runat="server" Text='<%# Eval("diasVacaciones")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Prima vacacional">
<ItemTemplate>
<asp:Label ID="LblPrimaVacacional" runat="server" Text='<%# Eval("PorPrimaVacacional","{0:P2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo salario">

View File

@@ -145,14 +145,18 @@ public partial class RH_CalculoSBC : ClsPaginas
{
GVCalculosSBC.ExportToExcel("Salario");
}
if (Tab.ActiveTab == TabSBC)
if (Tab.ActiveTab == TabParteFija)
{
GVCFija.ExportToExcel("Salario");
}
if (Tab.ActiveTab == TabSBC)
if (Tab.ActiveTab == TabParteVariable)
{
GVPV.ExportToExcel("Salario");
}
if (Tab.ActiveTab == TabDetalleParteVariable)
{
GVDetalleParteVariable.ExportToExcel("Salario");
}
}
}

View File

@@ -2936,12 +2936,19 @@ Partial Class RH_Personal
' Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
If ChkEstatusPagoE.Checked Then
'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
If TxtCLABECB.Text.Trim.Length <> 18 And TxtCLABECB.Text.Trim.Length = 0 And Not EsBancomer Then
'CLABE SIEMPRE OBLIGATORIA SI NO ES BANCOMER
If TxtCLABECB.Text.Trim.Length <> 18 AndAlso TxtCLABECB.Text.Trim.Length = 0 AndAlso Not EsBancomer Then
Alert("La CLABE es obligatoria y debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
If TxtCLABECB.Text.Trim.Length <> 0 AndAlso TxtCLABECB.Text.Trim.Length <> 18 Then
Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
'SI CUENTA TIENE ALGO Y BANCO BANCOMER DEBE TENER UNA LOGITUD EXACTA DE 10
If TxtNumeroCuenta.Text.Trim.Length <> 0 AndAlso TxtNumeroCuenta.Text.Trim.Length <> 10 AndAlso EsBancomer Then
@@ -2949,11 +2956,6 @@ Partial Class RH_Personal
Exit Sub
End If
'SI CLABE TIENE ALGO DEBE TENER UNA LOGITUD EXACTA DE 18
If TxtCLABECB.Text.Trim.Length <> 0 AndAlso TxtCLABECB.Text.Trim.Length <> 18 Then
Alert("La CLABE debe tener una longitud de 18 dígitos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
''CUANDO SEA "BBVA" O "BANCOMER" DEBE TENER "CIE" O "CUENTA"

View File

@@ -24196,7 +24196,7 @@ Partial Class Ventas
Dim IdCuentaContableNoDeducible As Integer = 0
Dim SerieFolio As String = LblSerie.Text & "-" & TxtFolio.Text
Dim ConceptoPartida As String = "saldado " & SerieFolio
' Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero()
Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
If CveConceptoDeduccion = 255 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(266).ToEntero()
If CveConceptoDeduccion = 211 Then IdCuentaContableNoDeducible = UsuarioActual.Empresa.Funcionalidad(559).ToEntero()
@@ -24245,11 +24245,11 @@ Partial Class Ventas
Dim ImporteFluctuacion As Decimal = 0
ImporteFluctuacion = Saldo * (TCPago - TCVenta)
If TCPago > TCVenta Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), SerieFolio, 64, ConceptoPartida, FechaPago, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), SerieFolio, 64, ConceptoPartida, FechaPago, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), SerieFolio, 65, ConceptoPartida, FechaPago, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), SerieFolio, 65, ConceptoPartida, FechaPago, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If