Cambios en Vinculacion de IEPS en Compras.

This commit is contained in:
Desarrollo2019
2019-08-20 10:40:15 -07:00
parent 71e6b5fd9b
commit f24e84694b
2 changed files with 57 additions and 46 deletions

View File

@@ -2,7 +2,7 @@
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
<ContentTemplate>
@@ -88,14 +88,14 @@
<li>
<asp:HyperLink ID="HLModalFletes" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#ModalFletes" runat="server"><i class='fa fa-truck'></i> Fletes</asp:HyperLink>
</li>
<li>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:LinkButton ID="LnkCompleplementos" Visible="false" runat="server" OnClick="LnkCompleplementos_Click"><i class='fa fa-money'></i> Complementos Pago</asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
<li>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:LinkButton ID="LnkCompleplementos" Visible="false" runat="server" OnClick="LnkCompleplementos_Click"><i class='fa fa-money'></i> Complementos Pago</asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</li>
<li>
<asp:HyperLink ID="HLModalActualizarTC" NavigateUrl="#" runat="server" Visible="false" data-toggle="modal" data-target="#ModalActualizarTC"><i class="fa fa-usd"></i> Actualizar Tipo Cambio</asp:HyperLink>
@@ -292,7 +292,7 @@
<div class="form-group whitoutcol" style="width: 400px;" id="DivEsNoDeducible" visible="false" runat="server">
<span class="whitoutcol linewhitsize comprasdfleft" style="width: 120px;">¿Es No Deducible?</span>
<div class="whitoutcol whitoutcol comprasdfleftvar">
<asp:CheckBox ID="ChkEsNoDeducible" runat="server" OnCheckedChanged="ChkEsNoDeducible_CheckedChanged1" AutoPostBack="true"/>
<asp:CheckBox ID="ChkEsNoDeducible" runat="server" OnCheckedChanged="ChkEsNoDeducible_CheckedChanged1" AutoPostBack="true" />
</div>
</div>
@@ -611,7 +611,8 @@
<th style="width: 50px">% IVA&nbsp;</th>
<th style="width: 80px">Total&nbsp;</th>
<div id="dvNoDeducible" runat="server" visible="false">
<th style="width: 80px">¿No Deducible?&nbsp;</th></div>
<th style="width: 80px">¿No Deducible?&nbsp;</th>
</div>
<th style="width: 90px">Comandos</th>
</tr>
<tr id="DivReclasifica" class="collapse">
@@ -704,11 +705,11 @@
</asp:TemplateField>
<%-- 9 --%>
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
<%-- 10 --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ControlStyle-Width="100px" visible="false">
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ControlStyle-Width="100px" Visible="false">
<ItemTemplate>
<asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" Checked='<%# If(Eval("NoDeducible").ToString = "", 0, Eval("NoDeducible")) %>' AutoPostBack="true" OnCheckedChanged="ChkEsNoDeduciblePS_CheckedChanged" />
<asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" Checked='<%# If(Eval("NoDeducible").ToString = "", 0, Eval("NoDeducible")) %>' AutoPostBack="true" OnCheckedChanged="ChkEsNoDeduciblePS_CheckedChanged" />
</ItemTemplate>
</asp:TemplateField>
@@ -1436,11 +1437,11 @@
<div id="DivOCV" style="height: 250px; overflow-y: auto;">
<asp:Button Text="" Style="display: none;" ClientIDMode="Static" ID="BtnAlertaPUCero" OnClick="BtnAlertaPUCero_Click" runat="server" />
<asp:HiddenField ID="HdnAlertaPUCero" Value="-1" runat="server" ClientIDMode="Static" />
<asp:GridView runat="server" ID="GvOC1" AutoGenerateColumns="false"
<asp:GridView runat="server" ID="GvOC1" AutoGenerateColumns="false"
GridLines="None" UseAccessibleHeader="true" EmptyDataText="No se encontraron registros." CssClass="table table-striped table-hover Widthall Sortable" RowStyle-HorizontalAlign="Center"
DataKeyNames="CantidadF,FolioREQ,CveProveedorSucursal,PS,CantidadDisponible,IEPSPS,IVA,RetIVA,RetISR,Descuento,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,Cantidad,CveProveedorOC" >
DataKeyNames="CantidadF,FolioREQ,CveProveedorSucursal,PS,CantidadDisponible,IEPSPS,IVA,RetIVA,RetISR,Descuento,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,IEPSPSIVAPorcentaje,Cantidad,CveProveedorOC">
<Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="10%" Visible="false">
<ItemTemplate>
@@ -1460,9 +1461,9 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="UM" DataField="UM" ItemStyle-Width="10%" />
<asp:TemplateField HeaderText="Clasificación <br/> Producto/Servicio" ItemStyle-Width="50%" ItemStyle-HorizontalAlign="Left" >
<asp:TemplateField HeaderText="Clasificación <br/> Producto/Servicio" ItemStyle-Width="50%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<span style="width: 100%; border-bottom: 1px solid gray;text-align:left!important">
<span style="width: 100%; border-bottom: 1px solid gray; text-align: left!important">
<asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion") %>'></asp:Label>
</span>
<br />
@@ -1506,6 +1507,7 @@
</Columns>
</asp:GridView>
</div>
<asp:HiddenField runat="server" ID="HdnIEPSModificadoOC" ClientIDMode="Static" Value="0" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
@@ -1792,18 +1794,21 @@
</div>
</div>
<div class="row" align="right">
<div class="col-md-12 text-right text-small">
<asp:Button Text="Concluir Vinculación" ID="BtnVincularOC" CssClass="btn btn-success" OnClick="BtnVincularOC_Click" ValidationGroup="GrpVincularOC" runat="server" />
</div>
</div>
<br />
<div class="row" align="right">
<div class="col-md-12 text-right text-small">
<asp:Button Text="Vinculación Completa" ID="BtnVincularOCCompleta" CssClass="btn btn-success" ClientIDMode="Static" runat="server" Visible="false" OnClick="BtnVincularOCCompleta_Click" ValidationGroup="GrpVincularOC" runat="server" />
</div>
</div>
<asp:UpdatePanel ID="UpBtnVinculacion" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" align="right">
<div class="col-md-12 text-right text-small">
<asp:Button Text="Concluir Vinculación" ID="BtnVincularOC" CssClass="btn btn-success" OnClick="BtnVincularOC_Click" ValidationGroup="GrpVincularOC" runat="server" />
</div>
</div>
<br />
<div class="row" align="right">
<div class="col-md-12 text-right text-small">
<asp:Button Text="Vinculación Completa" ID="BtnVincularOCCompleta" CssClass="btn btn-success" ClientIDMode="Static" runat="server" Visible="false" OnClick="BtnVincularOCCompleta_Click" ValidationGroup="GrpVincularOC" runat="server" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
@@ -3211,10 +3216,11 @@
<asp:UpdatePanel ID="UpGVServicios" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVServicios" runat="server" AutoGenerateColumns="false"
EmptyDataText="No se encontraron fletes o servicios en la factura" ShowHeaderWhenEmpty="true"
<asp:GridView ID="GVServicios" runat="server" AutoGenerateColumns="false"
EmptyDataText="No se encontraron fletes o servicios en la factura" ShowHeaderWhenEmpty="true"
ToolTip="Listado de Unidades de Medida" CssClass="table table-striped table-advance table-hover Widthall
ScrollAD " data-height="320" Style="text-align: left;" GridLines="None" DataKeyNames="CvePS">
ScrollAD "
data-height="320" Style="text-align: left;" GridLines="None" DataKeyNames="CvePS">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
@@ -4330,7 +4336,7 @@
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UpEsNoDeduciblePS" runat="server" UpdateMode="Conditional" Visible="false">
<ContentTemplate>
@@ -4340,7 +4346,7 @@
<asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" />
</div>
</div>
<br />
<br />
</ContentTemplate>
</asp:UpdatePanel>
<div class="form-group form-md-line-input input-iconright">
@@ -4541,10 +4547,10 @@
<asp:BoundField HeaderText="XML" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" />
<asp:TemplateField Visible="false" HeaderText="Op" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100PX">
<ItemTemplate>
<asp:LinkButton runat="server" ID="LnkDesVincularComplemento" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-chain-broken' aria-hidden='true'></i>" ToolTip="Des Vincular Complemento" OnClick="LnkDesVincularComplemento_Click"
data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea Des Vincular el complemento?" data-btn-ok-label="si" />
<ItemTemplate>
<asp:LinkButton runat="server" ID="LnkDesVincularComplemento" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-chain-broken' aria-hidden='true'></i>" ToolTip="Des Vincular Complemento" OnClick="LnkDesVincularComplemento_Click"
data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea Des Vincular el complemento?" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
@@ -4773,9 +4779,9 @@
<div class="modal-body">
<div class="row">
<div class="col-md-12">
<div class="row" runat="server" id="DivActualizarVincular" visible="false" align="center">
<div class="row" runat="server" id="DivActualizarVincular" visible="false" align="center">
<h4>Los cambios se realizaran al dar click en vincular</h4>
</div>
</div>
<div class="row">
<div class="col-md-3"></div>
<label class="col-md-2" style="margin-top: 5px;">Asignación:</label>
@@ -5368,7 +5374,7 @@
if (Sumatoria > saldoAmortizacion) {
Sumatoria -= ToDouble(txt.value) * ToDouble(jQuery($(txt[0]).parent().parent().children()[7]).text());
txt.value = '';
alert("El Importe no debe de exceder a el saldo.[" + Sumatoria + " " + saldoAmortizacion+"]" );
alert("El Importe no debe de exceder a el saldo.[" + Sumatoria + " " + saldoAmortizacion + "]");
}
$('#C_LbNCInvImporte').text(FormatoNumero(Sumatoria, 2));
}
@@ -5623,6 +5629,9 @@
if ($get("C_Tab_TabOC_LbIEPSOC1")) {
$get("C_Tab_TabOC_LbIEPSOC1").innerText = FormatoNumero(SumaIEPS, 2);
}
$get("HdnIEPSModificadoOC").value = FormatoNumero(SumaIEPS, 2);
if ($get("C_Tab_TabOC_LbIEPSIVAOC1")) {
$get("C_Tab_TabOC_LbIEPSIVAOC1").innerText = FormatoNumero(SumaIEPSIVA, 2);
}

View File

@@ -14242,8 +14242,10 @@ Partial Class Compras_Compras
GvOC1.Columns(0).Visible = False
End If
Dim Cont As Integer = 0
For Each gvr As GridViewRow In GvOC1.Rows
RegistraScript($"CalculaTotalOCEdit('{gvr.DataKey("PS").Replace("'", "")}', {gvr.DataKey("CantidadDisponible").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", "Gv")
RegistraScript($"CalculaTotalOCEdit('{gvr.DataKey("PS").Replace("'", "")}', {gvr.DataKey("CantidadDisponible").ToString.ToDouble}, {gvr.FCTextBox("TxtCantidad").ClientID}, {gvr.FCTextBox("TxtPU").ClientID}, {gvr.FCTextBox("TxtTotalOC1").ClientID}, {gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {gvr.DataKey("IVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IVA").ClientID},{gvr.DataKey("RetIVA").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetIVA").ClientID},{gvr.DataKey("RetISR").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1RetISR").ClientID},{gvr.DataKey("IEPSPS").ToString.ToDouble},{gvr.FCHiddenField("HdnOC1IEPSIVA").ClientID},{gvr.DataKey("Descuento")},{gvr.FCHiddenField("HdnOC1Descuento").ClientID},{gvr.DataKey("IVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetIVAPorcentaje").ToString.ToDouble},{gvr.DataKey("RetISRPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSPorcentaje").ToString.ToDouble},{gvr.DataKey("IEPSPSIVAPorcentaje").ToString.ToDouble});", $"Gv{Cont}")
Cont += 1
Next
UpGvOC1.Update()
@@ -14469,8 +14471,8 @@ Partial Class Compras_Compras
End If
End If
If (LbIEPSOC1.Text.ToDecimal <> LbIEPSOC2.Text.ToDecimal) Then
Alert("Hay una diferencia de IEPS entre la factura y la OC.", TipoMensaje.MsgAdvertencia)
If (HdnIEPSModificadoOC.Value.ToDecimal <> LbIEPSOC2.Text.ToDecimal) Then
Alert($"Hay una diferencia de IEPS entre la factura y la OC. Dif: {HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal}", TipoMensaje.MsgAdvertencia)
Exit Sub
End If