From 9182e4c09197af7aa8396797282f145b1d97a078 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sun, 3 Mar 2024 10:31:56 -0700 Subject: [PATCH 1/4] RepChecadorPreAsistencia Correciones --- RH/RepChecadorPreAsistencia.aspx.vb | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/RH/RepChecadorPreAsistencia.aspx.vb b/RH/RepChecadorPreAsistencia.aspx.vb index 7885505c1..636d3956a 100644 --- a/RH/RepChecadorPreAsistencia.aspx.vb +++ b/RH/RepChecadorPreAsistencia.aspx.vb @@ -359,7 +359,19 @@ Partial Class RH_RepChecadorPreAsistencia FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } {filtroturno} " End If - DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto) + 'DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto) + + Dim DtTempPeriodo As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero) + Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate + + Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto).AsEnumerable() + Let Inicio = fila.Field(Of Date)("FechaInicio") + Let FechaFinOriginal = fila.Field(Of Date?)("FechaFin") + Let FechaFin = If(FechaFinOriginal.HasValue, FechaFinOriginal.Value, Now) + Where Inicio <= FechaInicioPeriodoFiltro AndAlso FechaInicioPeriodoFiltro <= FechaFin + Select fila + + DtPersonal = FilasFiltradas.CopyToDataTable() If objRH.ChecadorHorariosGet(-1, 1, UsuarioActual.Empresa.CveEmpresa) Then DTHorarios = objRH.DtResultados @@ -992,6 +1004,18 @@ Partial Class RH_RepChecadorPreAsistencia DTAsistenciasInasistencias = objRH.DtResultados End If + Dim DtTempPeriodo As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero) + Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate + + Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}")).AsEnumerable() + Let Inicio = fila.Field(Of Date)("FechaInicio") + Let FechaFinOriginal = fila.Field(Of Date?)("FechaFin") + Let FechaFin = If(FechaFinOriginal.HasValue, FechaFinOriginal.Value, Now) + Where Inicio <= FechaInicioPeriodoFiltro AndAlso FechaInicioPeriodoFiltro <= FechaFin + Select fila + + 'DtPersonal = FilasFiltradas.CopyToDataTable() + DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}")) dt.Columns.Add("CvePersonal") From bc44998bb25a223b9e10f9d2674ecd6fb269b0dc Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 4 Mar 2024 18:13:21 -0700 Subject: [PATCH 2/4] --Ferretera. Mostrar total con impuestos --- Ventas/Ventas.aspx | 2 +- Ventas/Ventas.aspx.vb | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 25bdaabd5..5a677a9e8 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1386,7 +1386,7 @@ <%--16--%> - + <%--17--%> diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ed75d8147..dfdc87632 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -8835,6 +8835,7 @@ Partial Class Ventas TmpDT.Rows(e.RowIndex)("Descuento") = ObjDescuento.ImporteDescuento TmpDT.Rows(e.RowIndex)("Total") = (Cantidad * PU) TmpDT.Rows(e.RowIndex)("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales) + TmpDT.Rows(e.RowIndex)("ImporteIVA") = (TmpDT.Rows(e.RowIndex)("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales) TmpDT.Rows(e.RowIndex)("ImporteIEPS") = (TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) TmpDT.Rows(e.RowIndex)("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) @@ -8844,6 +8845,8 @@ Partial Class Ventas TmpDT.Rows(e.RowIndex)("PorcentajeRetISR") = ClienteRetISR TmpDT.Rows(e.RowIndex)("CuentaPredial") = CuentaPredial + TmpDT.Rows(e.RowIndex)("TotalConImpuestos") = (TmpDT.Rows(e.RowIndex)("Total").ToString().ToDecimal() - TmpDT.Rows(e.RowIndex)("Descuento").ToString().ToDecimal() + TmpDT.Rows(e.RowIndex)("ImporteIVA").ToString().ToDecimal()).RoundSQL(2) + Dim NumTurnos As Decimal = 0 If UsuarioActual.CveEmpresa.Contiene(7, 122) Then NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal() @@ -16646,6 +16649,7 @@ Partial Class Ventas dr("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) dr("PorcentajeRetIVA") = ClienteRetIVA dr("PorcentajeRetISR") = ClienteRetISR + dr("TotalConImpuestos") = (dr("Total").ToString().ToDecimal() - dr("Descuento").ToString().ToDecimal() + dr("ImporteIVA").ToString().ToDecimal()).RoundSQL(2) Next @@ -18929,6 +18933,8 @@ Partial Class Ventas Row("CvePromocionDetalle") = CvePromocionDetalle Row("Total") = (Cantidad * PU) Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales) + Row("TotalConImpuestos") = (Row("Total").ToString().ToDecimal() - Row("Descuento").ToString().ToDecimal() + Row("ImporteIVA").ToString().ToDecimal()).RoundSQL(2) + Row("SATClaveProdServ") = DrPS("SATClavePS") Row("SATClaveUM") = DrPS("SATClaveUnidadMedida") @@ -19097,6 +19103,7 @@ Partial Class Ventas DrPoliza("TipoDescuento") = HdnTipoDescuento.Value DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU) DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales) + DrPoliza("TotalConImpuestos") = (DrPoliza("Total").ToString().ToDecimal() - DrPoliza("Descuento").ToString().ToDecimal() + DrPoliza("ImporteIVA").ToString().ToDecimal()).RoundSQL(2) DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS") DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida") DrPoliza("CveActivoFijo") = -1 @@ -19234,6 +19241,8 @@ Partial Class Ventas 'USO PARA COMERCIO EXTERIOR TmpDT.Columns.Add("CantidadConversion", GetType(Decimal)) TmpDT.Columns("CantidadConversion").DefaultValue = 0 + + TmpDT.Columns.Add("TotalConImpuestos", GetType(Decimal)) End Sub Private Sub CreaDTmpC() DTmpC = New DataTable @@ -29747,7 +29756,7 @@ Partial Class Ventas Row("Descuento") = Math.Round(Descuento, NumeroDecimales) Row("Total") = Math.Round(Total, NumeroDecimales) Row("TotalImporte") = Math.Round(Total, NumeroDecimales) - + Row("TotalConImpuestos") = (Row("Total").ToString().ToDecimal() - Row("Descuento").ToString().ToDecimal() + Row("ImporteIVA").ToString().ToDecimal()).RoundSQL(2) Row("Serie") = Serie Row("TiempoEntrega") = TiempoEntrega @@ -34715,6 +34724,7 @@ Partial Class Ventas Row("Descuento") = Math.Round(Descuento, 2) Row("Total") = Math.Round(Total, 2) Row("TotalImporte") = Math.Round(Total, 2) + Row("TotalConImpuestos") = (Row("Total").ToString().ToDecimal() - Row("Descuento").ToString().ToDecimal() + Row("ImporteIVA").ToString().ToDecimal()).RoundSQL(2) Row("Serie") = Serie Row("TiempoEntrega") = TiempoEntrega @@ -37454,6 +37464,7 @@ Partial Class Ventas Row("Descuento") = (ObjDescuento.ImporteDescuento).RoundSQL(NumeroDecimales) Row("Total") = (Cantidad * PU) Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales) + Row("TotalConImpuestos") = (Row("Total").ToString().ToDecimal() - Row("Descuento").ToString().ToDecimal() + Row("ImporteIVA").ToString().ToDecimal()).RoundSQL(2) End If Next From 57664c8a9d4b0d3161ef46b4ba9fc2f48d3ccb75 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 4 Mar 2024 18:14:57 -0700 Subject: [PATCH 3/4] --Impresion de libro diario --- Contabilidad2/RepLibroDiario.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Contabilidad2/RepLibroDiario.aspx.vb b/Contabilidad2/RepLibroDiario.aspx.vb index 425085a8f..0f488f8de 100644 --- a/Contabilidad2/RepLibroDiario.aspx.vb +++ b/Contabilidad2/RepLibroDiario.aspx.vb @@ -180,7 +180,7 @@ Partial Class Contabilidad2_RepLibroDiario lista.Add(New CrystalParametro("UsuarioImprimio", UsuarioActual.Nombre)) lista.Add(New CrystalParametro("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) - ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/LibroDiario.rpt"), DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato) + ImprimirbytesPDF(ImprimirPDFCrystal(DirectorioEmpresas + "\Grales\Formatos\LibroDiario.rpt", DtDatos, lista, "LibroDiario", Formato), "LibroDiario", Formato) End Sub #End Region End Class From a4b8095761de82d31d832fb2947d6b8eecb2924e Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Mon, 4 Mar 2024 18:15:47 -0700 Subject: [PATCH 4/4] --Total en 0 si el total es 1 centavo --- Empresas/140/Formatos/Factura.rdlc | 4 ++-- Empresas/140/Formatos/Remision.rdlc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Empresas/140/Formatos/Factura.rdlc b/Empresas/140/Formatos/Factura.rdlc index 495426efa..90554a4fd 100644 --- a/Empresas/140/Formatos/Factura.rdlc +++ b/Empresas/140/Formatos/Factura.rdlc @@ -2321,7 +2321,7 @@ - =Fields!Importe.Value + =IIf(Fields!Importe.Value = 0.01 ,0.00,Fields!Importe.Value) - 21.0638cm + 21.06381cm 0.5327cm diff --git a/Empresas/140/Formatos/Remision.rdlc b/Empresas/140/Formatos/Remision.rdlc index d6b8d4dd0..f3ae0410a 100644 --- a/Empresas/140/Formatos/Remision.rdlc +++ b/Empresas/140/Formatos/Remision.rdlc @@ -1677,7 +1677,7 @@ - =Fields!Importe.Value + =IIf(Fields!Importe.Value = 0.01 ,0.00,Fields!Importe.Value)