- Aplica Restricción:
+ Aplica Restricción:
@@ -2880,103 +3120,114 @@
-
diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb
index 2ed1f151e..b17cec2e5 100644
--- a/Sistemas/UsuarioDetalle.aspx.vb
+++ b/Sistemas/UsuarioDetalle.aspx.vb
@@ -2473,7 +2473,17 @@ Partial Class Sistemas_UsuarioDetalle
End Sub
#Region "GRIDVIEW"
- Protected Sub GvEstatusUsuariosREQ_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosREQ.RowDataBound
+ Protected Sub GvEstatusUsuariosREQ_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosREQ.RowDataBound
+ If e.Row.RowType = DataControlRowType.Header Then
+ For i As Integer = 2 To GvEstatusUsuariosREQ.Columns.Count - 1
+ Dim CveEstatus As Integer = GvEstatusUsuariosREQ.Columns(i).FooterText.ToEntero
+ Dim idIndex As Integer = i - 1
+ If CveEstatus > -1 Then
+ e.Row.FCLabel($"LblTituloEstatusREQ{idIndex}").Text = GvEstatusUsuariosREQ.Columns(i).HeaderText
+ End If
+ Next
+ End If
+
If e.Row.RowType = DataControlRowType.DataRow Then
Dim tmpT As DataTable = DTEstatusSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto").ToString))
@@ -2487,6 +2497,7 @@ Partial Class Sistemas_UsuarioDetalle
Dim hdnCveEstatusUsuarios As HiddenField = e.Row.FCHiddenField($"hdnCveEstatusUsuarios{idIndex}")
Dim lblSuperior As Label = e.Row.FCLabel($"lblSuperior{idIndex}")
Dim lblLimites As Label = e.Row.FCLabel($"lblLimites{idIndex}")
+ chkEstatus.CssClass = $"chkEstatusREQ{idIndex}"
Dim dtTemp As New DataTable
Dim existenPermisosActuales As Boolean
@@ -2599,7 +2610,18 @@ Partial Class Sistemas_UsuarioDetalle
Next
End If
End Sub
- Protected Sub GvEstatusUsuariosOC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosOC.RowDataBound
+ Protected Sub GvEstatusUsuariosOC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEstatusUsuariosOC.RowDataBound
+
+ If e.Row.RowType = DataControlRowType.Header Then
+ For i As Integer = 2 To GvEstatusUsuariosOC.Columns.Count - 1
+ Dim CveEstatus As Integer = GvEstatusUsuariosOC.Columns(i).FooterText.ToEntero
+ Dim idIndex As Integer = i - 1
+ If CveEstatus > -1 Then
+ e.Row.FCLabel($"LblTituloEstatus{idIndex}").Text = GvEstatusUsuariosOC.Columns(i).HeaderText
+ End If
+ Next
+ End If
+
If e.Row.RowType = DataControlRowType.DataRow Then
Dim tmpT As DataTable = DTEstatusSubProyectos.FiltraParametros(String.Format("CveSubProyecto = {0}", e.Row.DBCampo("CveSubProyecto").ToString))
@@ -2612,8 +2634,8 @@ Partial Class Sistemas_UsuarioDetalle
Dim ImgClasificaciones As LinkButton = e.Row.FCLinkButton($"ImgClasificaciones{idIndex}")
Dim hdnCveEstatusUsuarios As HiddenField = e.Row.FCHiddenField($"hdnCveEstatusUsuarios{idIndex}")
Dim lblSuperior As Label = e.Row.FCLabel($"lblSuperior{idIndex}")
- Dim lblLimites As Label = e.Row.FCLabel($"lblLimites{idIndex}")
-
+ Dim lblLimites As Label = e.Row.FCLabel($"lblLimites{idIndex}")
+ chkEstatus.CssClass = $"chkEstatus{idIndex}"
Dim dtTemp As New DataTable
Dim existenPermisosActuales As Boolean
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index 7f3ac85e9..0513c856d 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -2574,7 +2574,7 @@ Partial Class Clientes
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(),
CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked,
- TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=DdlAdminTrayecto.SelectedValue.ToEntero()) Then
+ TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero())) Then
ViewState("CveCliente") = ObjClientes.CveCliente
@@ -2669,7 +2669,7 @@ Partial Class Clientes
CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(),
ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(),
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
- RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=DdlAdminTrayecto.SelectedValue.ToEntero()) Then
+ RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero())) Then
ObjClientes.LimpiaImpuestosLocales(CveCliente)
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 98631e72a..1196e1bb5 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -6951,7 +6951,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
@@ -26034,7 +26035,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,
@@ -26772,12 +26773,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
@@ -26817,12 +26820,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)