From 08dae1d863cf6c326b8817f58fe1cc6c986cc2f1 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 18 Aug 2021 11:38:10 -0700 Subject: [PATCH 1/4] Aplicacion de NC multiples con aplicacion de IEPS e IVA --- Ventas/Ventas.aspx.vb | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 6213df069..4adede1bd 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6950,7 +6950,8 @@ Partial Class Ventas GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlClasificacion").Enabled = False End If - If GvPS.Rows(e.NewEditIndex).DataKey("CvePromocionDetalle").ToString().ToEntero() > 0 Then + 'SI ES LLANTERA NO DEBE BLOQUEAR EL TEXTBOX + If GvPS.Rows(e.NewEditIndex).DataKey("CvePromocionDetalle").ToString().ToEntero() > 0 AndAlso (Not UsuarioActual.Empresa.Funcionalidad(558) = "1") Then GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").Enabled = False GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").ToolTip = "No se puede editar el descuento porque viene de una promoción" End If @@ -26062,7 +26063,7 @@ Partial Class Ventas Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal), ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal), ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA, - ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA, +ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA, ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR, ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS, PorcentajeIVA = PorcentajeIVA, @@ -26800,12 +26801,14 @@ Partial Class Ventas TmpDT.Columns.Add("TieneProntoPago", GetType(String)) TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal)) End If + Dim FechaFactura As DateTime = Now If AplicaNCMasiva OrElse AplicaNCUsado Then If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then If ObjVentas.DtResultados.Rows.Count > 0 Then Total = ObjVentas.DtResultados()(0)("Total").ToString().ToDecimal SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString().ToDecimal + FechaFactura = ObjVentas.DtResultados()(0)("Fecha").ToString().ToDateTime() End If End If Else @@ -26845,12 +26848,16 @@ Partial Class Ventas End If Dr("ImporteTotal") = importePuTemp.RoundSQL(2) - - - Dim TotalCalculableImpuestosIVA As Decimal = importePuTemp * (1 + Dr("PorcentajeIEPS").ToString().ToDecimal) - Dr("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2) - Dr("ImporteIVA") = ((TotalCalculableImpuestosIVA) * Dr("PorcentajeIVA").ToString().ToDecimal) + + 'A PARTIR DEL 2020 SE CAMBIO EL CALCULO PARA EL IVA CONSIDERANDO EL IEPS + If FechaFactura.Year <= 2019 Then + Dr("ImporteIVA") = (importePuTemp * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2) + Else + Dim TotalCalculableImpuestosIVA As Decimal = importePuTemp * (1 + Dr("PorcentajeIEPS").ToString().ToDecimal) + Dr("ImporteIVA") = ((TotalCalculableImpuestosIVA) * Dr("PorcentajeIVA").ToString().ToDecimal) + End If + Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2) Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2) From 5f3c483f6d38c71b34c8e09647e98087e4df123a Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 18 Aug 2021 11:38:40 -0700 Subject: [PATCH 2/4] Seleccionar todos los estatus de REQ/OC al asignar --- Sistemas/UsuarioDetalle.aspx | 479 ++++++++++++++++++++++++-------- Sistemas/UsuarioDetalle.aspx.vb | 30 +- 2 files changed, 391 insertions(+), 118 deletions(-) diff --git a/Sistemas/UsuarioDetalle.aspx b/Sistemas/UsuarioDetalle.aspx index 182c8df96..74d23f2d8 100644 --- a/Sistemas/UsuarioDetalle.aspx +++ b/Sistemas/UsuarioDetalle.aspx @@ -112,20 +112,20 @@ -   +   - - vpn_lock + + vpn_lock - - lock + + lock - - email + + email - <%----%> + <%----%> @@ -162,27 +162,27 @@ - <%-- - Supervisa: - - - - - - - - - - - Autoriza: - - - - - - - - + <%-- + Supervisa: + + + + + + + + + + + Autoriza: + + + + + + + + --%> Empresa: @@ -212,8 +212,8 @@ - - lock + + lock @@ -369,7 +369,7 @@ -   +   @@ -455,7 +455,7 @@ -   +   @@ -501,6 +501,18 @@ + + + + + + +
+ + + +
+
@@ -522,6 +534,18 @@ + +
+ + + + +
+ + + +
+ @@ -543,6 +567,18 @@ + +
+ + + + +
+ + + +
+ @@ -564,6 +600,18 @@ + +
+ + + + +
+ + + +
+ @@ -585,6 +633,18 @@ + +
+ + + + +
+ + + +
+ @@ -606,6 +666,18 @@ + +
+ + + + +
+ + + +
+ @@ -627,6 +699,18 @@ + +
+ + + + +
+ + + +
+ @@ -648,6 +732,18 @@ + +
+ + + + +
+ + + +
+ @@ -669,6 +765,18 @@ + +
+ + + + +
+ + + +
+ @@ -690,6 +798,18 @@ + +
+ + + + +
+ + + +
+ @@ -723,6 +843,18 @@ + +
+ + + + +
+ + + +
+ @@ -744,6 +876,18 @@ + +
+ + + + +
+ + + +
+ @@ -765,6 +909,18 @@ + +
+ + + + +
+ + + +
+ @@ -786,6 +942,18 @@ + +
+ + + + +
+ + + +
+ @@ -807,6 +975,18 @@ + +
+ + + + +
+ + + +
+ @@ -828,6 +1008,18 @@ + +
+ + + + +
+ + + +
+ @@ -849,6 +1041,18 @@ + +
+ + + + +
+ + + +
+ @@ -870,6 +1074,18 @@ + +
+ + + + +
+ + + +
+ @@ -891,6 +1107,18 @@ + +
+ + + + +
+ + + +
+ @@ -912,6 +1140,18 @@ + +
+ + + + +
+ + + +
+ @@ -1626,7 +1866,7 @@
- Empresa: + Empresa:
@@ -2054,7 +2294,7 @@ -   +   @@ -2415,7 +2655,7 @@