Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1141,6 +1141,7 @@
|
||||
<div class="col-md-6 ">
|
||||
<asp:Button runat="server" ID="btnProrateo" Visible="false" Text="Prorratear" CommandArgument="Compras" CssClass="btn btn-success" />
|
||||
<asp:Button runat="server" ID="btnProrateo2" Visible="false" Text="Prorratear Nomina" CommandArgument="Nomina" CssClass="btn btn-success" />
|
||||
<asp:Button runat="server" ID="BtnProrateoDeducible" Visible="false" Text="Prorratear Deducible" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1408,6 +1408,11 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(360) Then
|
||||
BtnProrateoDeducible.Visible = True
|
||||
End If
|
||||
|
||||
ElseIf Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||
|
||||
ViewState("CveCompra") = Request("CveCompra")
|
||||
@@ -20333,6 +20338,73 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ProratearDeducible()
|
||||
|
||||
|
||||
ChkEsNoDeducible_CheckedChanged1(Nothing, Nothing)
|
||||
|
||||
|
||||
Dim DTProtateo As DataTable = TmpDT.Clone
|
||||
|
||||
|
||||
Dim Consec As Integer = 1
|
||||
|
||||
For Each dRowOriginal As DataRow In TmpDT.Rows
|
||||
|
||||
|
||||
|
||||
Dim dRow91_5 As DataRow = DTProtateo.NewRow
|
||||
Dim dRow8_5 As DataRow = DTProtateo.NewRow
|
||||
|
||||
dRow91_5.ItemArray = dRowOriginal.ItemArray
|
||||
dRow8_5.ItemArray = dRowOriginal.ItemArray
|
||||
|
||||
Dim Mul91_5 As Decimal = 0.915D
|
||||
Dim Mul85 As Decimal = 0.085D
|
||||
|
||||
|
||||
dRow91_5("Consec") = Consec
|
||||
dRow91_5("PU") = dRow91_5("PU").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("IVA") = dRow91_5("IVA").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("RetIVA") = dRow91_5("RetIVA").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("RetISR") = dRow91_5("RetISR").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("IEPSPS") = dRow91_5("IEPSPS").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("IEPSPSIVA") = dRow91_5("IEPSPSIVA").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("Total") = dRow91_5("Total").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("NoDeducible") = 1
|
||||
|
||||
|
||||
dRow8_5("Consec") = Consec + 1
|
||||
dRow8_5("PU") = dRow8_5("PU").ToString.ToDecimal * Mul85
|
||||
dRow8_5("IVA") = dRow8_5("IVA").ToString.ToDecimal * Mul85
|
||||
dRow8_5("RetIVA") = dRow8_5("RetIVA").ToString.ToDecimal * Mul85
|
||||
dRow8_5("RetISR") = dRow8_5("RetISR").ToString.ToDecimal * Mul85
|
||||
dRow8_5("IEPSPS") = dRow8_5("IEPSPS").ToString.ToDecimal * Mul85
|
||||
dRow8_5("IEPSPSIVA") = dRow8_5("IEPSPSIVA").ToString.ToDecimal * Mul85
|
||||
dRow8_5("Total") = dRow8_5("Total").ToString.ToDecimal * Mul85
|
||||
dRow8_5("NoDeducible") = 0
|
||||
|
||||
|
||||
DTProtateo.Rows.Add(dRow91_5)
|
||||
DTProtateo.Rows.Add(dRow8_5)
|
||||
|
||||
Consec = Consec + 2
|
||||
|
||||
Next
|
||||
|
||||
DTProtateo.AcceptChanges()
|
||||
TmpDT = DTProtateo
|
||||
|
||||
BtnProrateoDeducible.Visible = False
|
||||
|
||||
AddPS2(True)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnProrateoDeducible_Click(sender As Object, e As EventArgs) Handles BtnProrateoDeducible.Click
|
||||
ProratearDeducible()
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Reference in New Issue
Block a user