Correciones en Ventas
This commit is contained in:
@@ -1427,7 +1427,7 @@
|
||||
<td>
|
||||
<asp:TextBox ID="TxtSubTotal2" ClientIDMode="Static" runat="server" BorderStyle="None" Style="text-align: right;" Text="0.00" Width="78px"></asp:TextBox></td>
|
||||
<td>
|
||||
<%-- <asp:LinkButton ID="LkbAgregarComplementos" runat="server" CssClass="btn btn-circle btn-xs gray" Text="<i class='fa fa-bell '></i>"></asp:LinkButton>--%>
|
||||
<%-- <asp:LinkButton ID="LkbAgregarComplementos" runat="server" CssClass="btn btn-circle btn-xs gray" Text="<i class='fa fa-bell '></i>"></asp:LinkButton>--%>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -2723,7 +2723,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</td>
|
||||
<td rowspan="1" colspan="1">
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 450px;">
|
||||
<div class="portlet-title">
|
||||
@@ -7097,6 +7097,7 @@
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkAplicar" runat="server" />
|
||||
<asp:HiddenField ID="HdnPorcentajeIVA" ClientIDMode="Static" runat="server" Value='<%# Eval("PorcentajeIVA").ToString %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
@@ -7111,6 +7112,7 @@
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:HiddenField ID="HdnPU" ClientIDMode="Static" runat="server" Value='<%# Eval("PU").ToString %>' />
|
||||
<asp:Literal ID="TtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -7427,6 +7429,66 @@
|
||||
TxtImporte.value = "";
|
||||
}
|
||||
}
|
||||
function CalculaSaldoRNCChkDetalle(TxtCantidad, CantidadPendiente, ImporteTotal, Chk) {
|
||||
//ImportesRNCCargo
|
||||
let Importe = 0;
|
||||
if (Chk.checked) {
|
||||
let SaldoMaximoUtilizable = ToDouble(HdnSaldoMaximoUsados.value)
|
||||
let ImportesAsignados = 0;
|
||||
|
||||
$('.ImportesRNCDetalle').each(function () {
|
||||
|
||||
if (Chk.id != $(this).find("td").eq(0).find(":checkbox").attr('id')) {
|
||||
let seleccionado = $(this).find("td").eq(0).find(":checkbox").is(':checked');
|
||||
|
||||
if (seleccionado) {
|
||||
let cantidad = ToDouble($(this).find("td").eq(1).find(":text").val());
|
||||
let porcentajeIVA = ToDouble($(this).find("td").eq(0).find(":hidden").val());
|
||||
let precio = ToDouble($(this).find("td").eq(5).find(":hidden").val());
|
||||
|
||||
let totalcalculableImpuestos = (cantidad * precio);
|
||||
let iva = ToDouble((totalcalculableImpuestos * porcentajeIVA).toFixed(2));
|
||||
|
||||
ImportesAsignados += totalcalculableImpuestos + iva;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Importe = SaldoMaximoUtilizable - ImportesAsignados;
|
||||
|
||||
if (Importe > 0) {
|
||||
|
||||
} else {
|
||||
if (SaldoMaximoUtilizable > 0) {
|
||||
Importe = 0;
|
||||
Chk.checked = false;
|
||||
} else {
|
||||
Importe = 0;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Importe = 0;
|
||||
}
|
||||
|
||||
Importe = ToDouble(Importe.toFixed(2));
|
||||
|
||||
if (Importe > 0) {
|
||||
let pu = (ImporteTotal / CantidadPendiente);
|
||||
|
||||
if (pu > 0) {
|
||||
TxtCantidad.value = (Importe / pu).toString();
|
||||
}
|
||||
|
||||
|
||||
}else {
|
||||
TxtCantidad.value = "0";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function LimitaSaldoRNCChk(TxtImporte, Saldo) {
|
||||
//var Importe = 0;
|
||||
|
||||
@@ -8716,21 +8778,21 @@
|
||||
|
||||
if (TotalRem == TotalNC) {
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #04B431";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "";
|
||||
|
||||
} else {
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
|
||||
} else {
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.border = "2px solid #ff0000";
|
||||
document.getElementById('<%= TxtImportesRemisionesNC.ClientID %>').style.color = "#ff0000";
|
||||
document.getElementById('<%= TxtNCImporte.ClientID %>').style.color = "#ff0000";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
function CerrarModalRemNC() {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(344) %>' == '1') {
|
||||
AplicarValidarRNC(true);
|
||||
CompararNC();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user