retro 1 Conta: Prorrateo gasolina, como admin, pedir a rene que te lo explique
This commit is contained in:
@@ -5801,11 +5801,12 @@
|
|||||||
CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
|
CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" />
|
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" />
|
||||||
<asp:BoundField DataField="Subtotal" HeaderText="Subtotal" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" />
|
<asp:BoundField DataField="Subtotal" HeaderText="Subtotal" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
|
||||||
<asp:BoundField DataField="IVA" HeaderText="IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.######}" />
|
<asp:BoundField DataField="IVA" HeaderText="IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.######}" Visible="false" />
|
||||||
<asp:BoundField DataField="RetIVA" HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" />
|
<asp:BoundField DataField="RetIVA" HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
|
||||||
<asp:BoundField DataField="RetISR" HeaderText="RetISR" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" />
|
<asp:BoundField DataField="RetISR" HeaderText="RetISR" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
|
||||||
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00##}" HeaderText="Total" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00##}" HeaderText="Total" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="Porcentaje" DataFormatString="{0:#,##0.00##}" HeaderText="%" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:TemplateField HeaderText="Eliminar">
|
<asp:TemplateField HeaderText="Eliminar">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkEliminarProrrateoGasolina" runat="server"
|
<asp:LinkButton ID="LnkEliminarProrrateoGasolina" runat="server"
|
||||||
|
|||||||
@@ -22331,8 +22331,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
#Region "PRORRATEO GASOLINA"
|
#Region "PRORRATEO GASOLINA"
|
||||||
|
|
||||||
|
|
||||||
Property DTProrrateoGasolina As DataTable
|
Property DTProrrateoGasolina As DataTable
|
||||||
Get
|
Get
|
||||||
If ViewState("DTProrrateoGasolina") Is Nothing Then
|
If ViewState("DTProrrateoGasolina") Is Nothing Then
|
||||||
@@ -22362,6 +22360,7 @@ Partial Class Compras_Compras
|
|||||||
TmpDTProrrateoGasolina.Columns.Add("UM", GetType(String))
|
TmpDTProrrateoGasolina.Columns.Add("UM", GetType(String))
|
||||||
TmpDTProrrateoGasolina.Columns.Add("Clasificacion", GetType(String))
|
TmpDTProrrateoGasolina.Columns.Add("Clasificacion", GetType(String))
|
||||||
TmpDTProrrateoGasolina.Columns.Add("PS", GetType(String))
|
TmpDTProrrateoGasolina.Columns.Add("PS", GetType(String))
|
||||||
|
TmpDTProrrateoGasolina.Columns.Add("Porcentaje", GetType(Decimal))
|
||||||
|
|
||||||
|
|
||||||
DTProrrateoGasolina = TmpDTProrrateoGasolina
|
DTProrrateoGasolina = TmpDTProrrateoGasolina
|
||||||
@@ -22517,20 +22516,23 @@ Partial Class Compras_Compras
|
|||||||
nRow("CvePS") = DdlPSProrrateoGasolina.SelectedValue.ToEntero
|
nRow("CvePS") = DdlPSProrrateoGasolina.SelectedValue.ToEntero
|
||||||
nRow("CveSubProyecto") = CveSubProyecto
|
nRow("CveSubProyecto") = CveSubProyecto
|
||||||
nRow("SubProyecto") = SubProyecto
|
nRow("SubProyecto") = SubProyecto
|
||||||
nRow("SubTotal") = subtotalParcial
|
|
||||||
|
|
||||||
If CveFactura > 0 Then
|
If CveFactura > 0 Then
|
||||||
nRow("IVA") = ivaParcial
|
nRow("IVA") = ivaParcial.RoundSQL(4)
|
||||||
nRow("RetIVA") = retIvaParcial
|
nRow("RetIVA") = retIvaParcial.RoundSQL(4)
|
||||||
nRow("RetISR") = retIsrParcial
|
nRow("RetISR") = retIsrParcial.RoundSQL(4)
|
||||||
Else
|
Else
|
||||||
nRow("IVA") = (ivaParcial / subtotalParcial)
|
nRow("IVA") = (ivaParcial / subtotalParcial).RoundSQL(4)
|
||||||
nRow("RetIVA") = (retIvaParcial / subtotalParcial)
|
nRow("RetIVA") = (retIvaParcial / subtotalParcial).RoundSQL(4)
|
||||||
nRow("RetISR") = (retIsrParcial / subtotalParcial)
|
nRow("RetISR") = (retIsrParcial / subtotalParcial).RoundSQL(4)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
nRow("Total") = totalParcialDeseado
|
nRow("SubTotal") = subtotalParcial.RoundSQL(4)
|
||||||
nRow("PorcentajeIVA") = (ivaParcial / subtotalParcial)
|
|
||||||
|
nRow("Total") = totalParcialDeseado.RoundSQL(4)
|
||||||
|
nRow("PorcentajeIVA") = (ivaParcial / subtotalParcial).RoundSQL(4)
|
||||||
|
nRow("Porcentaje") = ((totalParcialDeseado.RoundSQL(4) * 100) / TotalOriginal).RoundSQL(2)
|
||||||
|
|
||||||
|
|
||||||
nRow("CveUM") = CveUM
|
nRow("CveUM") = CveUM
|
||||||
nRow("UM") = UM
|
nRow("UM") = UM
|
||||||
@@ -22547,8 +22549,8 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Function ProrateoCalculaRestante(Optional MostrarMensaje As Boolean = False) As Boolean
|
Function ProrateoCalculaRestante(Optional MostrarMensaje As Boolean = False) As Boolean
|
||||||
|
|
||||||
Dim Acumulado As Decimal = DTProrrateoGasolina.SUM("Total")
|
Dim Acumulado As Decimal = DTProrrateoGasolina.SUM("Total").RoundSQL(2)
|
||||||
Dim Total As Decimal = TxtTotal.Text.ToDecimal
|
Dim Total As Decimal = TxtTotal.Text.ToDecimal.RoundSQL(2)
|
||||||
Dim Respuesta As Boolean = False
|
Dim Respuesta As Boolean = False
|
||||||
|
|
||||||
LblRestoProrrateoGasolina.Text = (Total - Acumulado).ToString("###,###,###.00")
|
LblRestoProrrateoGasolina.Text = (Total - Acumulado).ToString("###,###,###.00")
|
||||||
@@ -22560,7 +22562,7 @@ Partial Class Compras_Compras
|
|||||||
If MostrarMensaje Then
|
If MostrarMensaje Then
|
||||||
|
|
||||||
If Acumulado <> Total Then
|
If Acumulado <> Total Then
|
||||||
Alert($"El importe prorrateado es diferenque del total, Total:{Total.ToString("###,###,###.00")}, Prorrateado:{Acumulado.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia)
|
Alert($"El importe prorrateado es diferente del total, Diferencia: {(Acumulado - Total).Abs()}, Total:{Total.ToString("###,###,###.00")}, Prorrateado:{Acumulado.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user