Compras no modificar porcentaje de iva si la Factura no tiene Iva
This commit is contained in:
@@ -47,6 +47,13 @@
|
||||
DataTextField="Temporada" DataValueField="CveTemporada">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate"><asp:Label runat="server" ID="LblSubProyecto"></asp:Label></div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyectoCierreCultivo" runat="server" Width="100%" CssClass="form-control select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -95,15 +102,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList ID="DdlModalSubProyectoCierreCultivo" runat="server" Width="100%" CssClass="form-control select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlSubProyecto" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlModalSubProyectoCierreCultivo" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GpoModalCerrarCultivo"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlModalSubProyectoCierreCultivo.ClientID.ToString()%>"><asp:Label ID="LblMoldalSubProyectoCierreCultivo" runat="server"></asp:Label></label>
|
||||
<i></i>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@ Partial Class Agrupecuaria_CierreCultivo
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub Agrupecuaria_CierreCultivo_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
@@ -39,7 +42,7 @@ Partial Class Agrupecuaria_CierreCultivo
|
||||
UpFiltros.Update()
|
||||
|
||||
|
||||
CargarCentrosDeCosto(Nothing, DdlModalSubProyectoCierreCultivo, Nothing, LblMoldalSubProyectoCierreCultivo, "Seleccione Uno")
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectoCierreCultivo, Nothing, LblSubProyecto, "Seleccione Uno")
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -107,6 +110,8 @@ Partial Class Agrupecuaria_CierreCultivo
|
||||
Dim CvePrePoliza As Integer = -1
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
Dim CveSubProyecto As Integer = DdlSubProyectoCierreCultivo.SelectedValue.ToEntero
|
||||
|
||||
|
||||
Dim ImporteCierre As Decimal = DT_Datos_Cierre.SUMD("Importe")
|
||||
|
||||
|
||||
@@ -18391,8 +18391,17 @@ Partial Class Compras_Compras
|
||||
|
||||
Row("PU") = Math.Round(PU, DecimalesPermitidos)
|
||||
If CargaXml And (Version = "3.3" Or Version = "4.0") Then
|
||||
Row("IVA") = Math.Round(IVA, DecimalesPermitidos)
|
||||
Row("IVAPorcentaje") = PorcentajeIVA
|
||||
|
||||
If CveFactura > 0 And TxtIVA.Text.ToDecimal = 0 Then
|
||||
Row("IVA") = 0
|
||||
Row("IVAPorcentaje") = 0
|
||||
Else
|
||||
Row("IVA") = Math.Round(IVA, DecimalesPermitidos)
|
||||
Row("IVAPorcentaje") = PorcentajeIVA
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Row("RetIVA") = Math.Round(RetIVA, DecimalesPermitidos)
|
||||
Row("RetIVAPorcentaje") = PorcentajeRetIVA
|
||||
Row("RetISR") = Math.Round(RetISR, DecimalesPermitidos)
|
||||
@@ -18401,8 +18410,16 @@ Partial Class Compras_Compras
|
||||
Row("IEPSPSPorcentaje") = PorcentajeIEPS
|
||||
Else
|
||||
'If DdlIVA.SelectedValue.ToDouble = 0 Then Row("IVA") = 0 Else Row("IVA") = Math.Round(IVA * Total, DecimalesPermitidos)
|
||||
Row("IVA") = (IVA * Total).RoundSQL
|
||||
Row("IVAPorcentaje") = IVA
|
||||
|
||||
If CveFactura > 0 And TxtIVA.Text.ToDecimal = 0 Then
|
||||
Row("IVA") = 0
|
||||
Row("IVAPorcentaje") = 0
|
||||
Else
|
||||
Row("IVA") = (IVA * Total).RoundSQL
|
||||
Row("IVAPorcentaje") = IVA
|
||||
End If
|
||||
|
||||
|
||||
Row("RetIVA") = (RetIVA * Total).RoundSQL
|
||||
Row("RetIVAPorcentaje") = RetIVA
|
||||
Row("RetISR") = (RetISR * Total).RoundSQL
|
||||
@@ -18569,8 +18586,15 @@ Partial Class Compras_Compras
|
||||
|
||||
'I f Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then
|
||||
'If DdlIVA.SelectedValue.ToDouble = 0 Then DrPS("IVA") = 0 Else DrPS("IVA") = IVA * Total
|
||||
DrPS("IVA") = (IVA * Total).RoundSQL
|
||||
DrPS("IVAPorcentaje") = IVA
|
||||
|
||||
If CveFactura > 0 And TxtIVA.Text.ToDecimal = 0 Then
|
||||
DrPS("IVA") = 0
|
||||
DrPS("IVAPorcentaje") = 0
|
||||
Else
|
||||
DrPS("IVA") = (IVA * Total).RoundSQL
|
||||
DrPS("IVAPorcentaje") = IVA
|
||||
End If
|
||||
|
||||
DrPS("RetIVA") = (RetIVA * Total).RoundSQL
|
||||
DrPS("RetIVAPorcentaje") = RetIVA
|
||||
DrPS("RetISR") = RetISR * Total
|
||||
|
||||
Reference in New Issue
Block a user