This commit is contained in:
janeth arvizu
2019-08-20 10:54:22 -07:00
2 changed files with 57 additions and 46 deletions

View File

@@ -89,11 +89,11 @@
<asp:HyperLink ID="HLModalFletes" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#ModalFletes" runat="server"><i class='fa fa-truck'></i> Fletes</asp:HyperLink> <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>
<li> <li>
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">
<ContentTemplate> <ContentTemplate>
<asp:LinkButton ID="LnkCompleplementos" Visible="false" runat="server" OnClick="LnkCompleplementos_Click"><i class='fa fa-money'></i> Complementos Pago</asp:LinkButton> <asp:LinkButton ID="LnkCompleplementos" Visible="false" runat="server" OnClick="LnkCompleplementos_Click"><i class='fa fa-money'></i> Complementos Pago</asp:LinkButton>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</li> </li>
@@ -292,7 +292,7 @@
<div class="form-group whitoutcol" style="width: 400px;" id="DivEsNoDeducible" visible="false" runat="server"> <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> <span class="whitoutcol linewhitsize comprasdfleft" style="width: 120px;">¿Es No Deducible?</span>
<div class="whitoutcol whitoutcol comprasdfleftvar"> <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>
</div> </div>
@@ -611,7 +611,8 @@
<th style="width: 50px">% IVA&nbsp;</th> <th style="width: 50px">% IVA&nbsp;</th>
<th style="width: 80px">Total&nbsp;</th> <th style="width: 80px">Total&nbsp;</th>
<div id="dvNoDeducible" runat="server" visible="false"> <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> <th style="width: 90px">Comandos</th>
</tr> </tr>
<tr id="DivReclasifica" class="collapse"> <tr id="DivReclasifica" class="collapse">
@@ -706,9 +707,9 @@
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
<%-- 10 --%> <%-- 10 --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ControlStyle-Width="100px" visible="false"> <asp:TemplateField ItemStyle-HorizontalAlign="Center" ControlStyle-Width="100px" Visible="false">
<ItemTemplate> <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> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -1437,9 +1438,9 @@
<asp:Button Text="" Style="display: none;" ClientIDMode="Static" ID="BtnAlertaPUCero" OnClick="BtnAlertaPUCero_Click" runat="server" /> <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: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" 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> <Columns>
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="10%" Visible="false"> <asp:TemplateField HeaderText="Folio" ItemStyle-Width="10%" Visible="false">
@@ -1460,9 +1461,9 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="UM" DataField="UM" ItemStyle-Width="10%" /> <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> <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> <asp:Label ID="LblClasificacion" runat="server" Text='<%# Eval("Clasificacion") %>'></asp:Label>
</span> </span>
<br /> <br />
@@ -1506,6 +1507,7 @@
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div> </div>
<asp:HiddenField runat="server" ID="HdnIEPSModificadoOC" ClientIDMode="Static" Value="0" />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
@@ -1792,18 +1794,21 @@
</div> </div>
</div> </div>
<asp:UpdatePanel ID="UpBtnVinculacion" runat="server" UpdateMode="Conditional">
<div class="row" align="right"> <ContentTemplate>
<div class="col-md-12 text-right text-small"> <div class="row" align="right">
<asp:Button Text="Concluir Vinculación" ID="BtnVincularOC" CssClass="btn btn-success" OnClick="BtnVincularOC_Click" ValidationGroup="GrpVincularOC" runat="server" /> <div class="col-md-12 text-right text-small">
</div> <asp:Button Text="Concluir Vinculación" ID="BtnVincularOC" CssClass="btn btn-success" OnClick="BtnVincularOC_Click" ValidationGroup="GrpVincularOC" runat="server" />
</div> </div>
<br /> </div>
<div class="row" align="right"> <br />
<div class="col-md-12 text-right text-small"> <div class="row" align="right">
<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 class="col-md-12 text-right text-small">
</div> <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>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div> </div>
</div> </div>
@@ -3214,7 +3219,8 @@
<asp:GridView ID="GVServicios" runat="server" AutoGenerateColumns="false" <asp:GridView ID="GVServicios" runat="server" AutoGenerateColumns="false"
EmptyDataText="No se encontraron fletes o servicios en la factura" ShowHeaderWhenEmpty="true" 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 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> <Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
@@ -4340,7 +4346,7 @@
<asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" /> <asp:CheckBox ID="ChkEsNoDeduciblePS" runat="server" />
</div> </div>
</div> </div>
<br /> <br />
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
@@ -4543,8 +4549,8 @@
<asp:TemplateField Visible="false" HeaderText="Op" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100PX"> <asp:TemplateField Visible="false" HeaderText="Op" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100PX">
<ItemTemplate> <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" <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" /> data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea Des Vincular el complemento?" data-btn-ok-label="si" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -4773,9 +4779,9 @@
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-md-12"> <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> <h4>Los cambios se realizaran al dar click en vincular</h4>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-3"></div> <div class="col-md-3"></div>
<label class="col-md-2" style="margin-top: 5px;">Asignación:</label> <label class="col-md-2" style="margin-top: 5px;">Asignación:</label>
@@ -5368,7 +5374,7 @@
if (Sumatoria > saldoAmortizacion) { if (Sumatoria > saldoAmortizacion) {
Sumatoria -= ToDouble(txt.value) * ToDouble(jQuery($(txt[0]).parent().parent().children()[7]).text()); Sumatoria -= ToDouble(txt.value) * ToDouble(jQuery($(txt[0]).parent().parent().children()[7]).text());
txt.value = ''; 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)); $('#C_LbNCInvImporte').text(FormatoNumero(Sumatoria, 2));
} }
@@ -5623,6 +5629,9 @@
if ($get("C_Tab_TabOC_LbIEPSOC1")) { if ($get("C_Tab_TabOC_LbIEPSOC1")) {
$get("C_Tab_TabOC_LbIEPSOC1").innerText = FormatoNumero(SumaIEPS, 2); $get("C_Tab_TabOC_LbIEPSOC1").innerText = FormatoNumero(SumaIEPS, 2);
} }
$get("HdnIEPSModificadoOC").value = FormatoNumero(SumaIEPS, 2);
if ($get("C_Tab_TabOC_LbIEPSIVAOC1")) { if ($get("C_Tab_TabOC_LbIEPSIVAOC1")) {
$get("C_Tab_TabOC_LbIEPSIVAOC1").innerText = FormatoNumero(SumaIEPSIVA, 2); $get("C_Tab_TabOC_LbIEPSIVAOC1").innerText = FormatoNumero(SumaIEPSIVA, 2);
} }

View File

@@ -14242,8 +14242,10 @@ Partial Class Compras_Compras
GvOC1.Columns(0).Visible = False GvOC1.Columns(0).Visible = False
End If End If
Dim Cont As Integer = 0
For Each gvr As GridViewRow In GvOC1.Rows 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 Next
UpGvOC1.Update() UpGvOC1.Update()
@@ -14469,8 +14471,8 @@ Partial Class Compras_Compras
End If End If
End If End If
If (LbIEPSOC1.Text.ToDecimal <> LbIEPSOC2.Text.ToDecimal) Then If (HdnIEPSModificadoOC.Value.ToDecimal <> LbIEPSOC2.Text.ToDecimal) Then
Alert("Hay una diferencia de IEPS entre la factura y la OC.", TipoMensaje.MsgAdvertencia) Alert($"Hay una diferencia de IEPS entre la factura y la OC. Dif: {HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal}", TipoMensaje.MsgAdvertencia)
Exit Sub Exit Sub
End If End If