--Sobrante/faltante cobro por caja
This commit is contained in:
@@ -6,6 +6,43 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
div.chksino, span.chksino {
|
||||
border: 1px solid #B8B8B8;
|
||||
max-width: 77px;
|
||||
overflow: hidden;
|
||||
max-height: 28px;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.chksino label::after {
|
||||
content: 'No';
|
||||
padding: 1px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
margin-left: 45px;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
display: inline-block;
|
||||
background: #ececec;
|
||||
color: #666;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.chksino label::before {
|
||||
content: 'Si ';
|
||||
padding: 1px;
|
||||
padding-left: 15px !important;
|
||||
padding-right: 14px !important;
|
||||
font-size: 12px !important;
|
||||
font-weight: normal !important;
|
||||
display: inline-block;
|
||||
background: #428bca;
|
||||
color: #FFF;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.e-big-btn {
|
||||
height: 50px;
|
||||
width: 200px;
|
||||
@@ -644,26 +681,36 @@
|
||||
<ContentTemplate>
|
||||
<div class="chequesie2">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Total:</label>
|
||||
<div class="col-md-3 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
|
||||
<div class="col-md-4" style="display: flex; align-items: center;">
|
||||
<label style="font-weight: bold; font-size: medium;">Total:</label>
|
||||
<div class="input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtImporteContado" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="180px" ReadOnly="true" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" TargetControlID="TxtImporteContado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
</div>
|
||||
<label id="lblCambio" class="col-md-1">Cambio:</label>
|
||||
<div class="col-md-3 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<br />
|
||||
</div>
|
||||
<label id="lblCambio2" class="col-md-1">Sob/falt:</label>
|
||||
<div class="col-md-3 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
<br />
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-md-4" style="display: flex; align-items: center;">
|
||||
<label id="lblCambio" runat="server" style="font-weight: bold; font-size: medium;">Cambio:</label>
|
||||
<div class="input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:HiddenField ID="HdnSobranteFaltante" Value="0" ClientIDMode="Static" runat="server" />
|
||||
<asp:TextBox ID="TxtCambio" CssClass="form-control input-sm " Enabled="false" runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FTBECambio" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8" style="display: flex; align-items: center;">
|
||||
<label style="font-weight: bold; font-size: medium;">Sob/falt:</label>
|
||||
|
||||
<asp:CheckBox ID="ChkSobFaltante" runat="server" ClientIDMode="Static" />
|
||||
<div class="input-icon" style="margin-left: 20px;">
|
||||
<i style="margin: 0px;">$</i>
|
||||
<asp:TextBox ID="TxtFaltante" CssClass="form-control input-sm " runat="server" MaxLength="12" Width="100px" ClientIDMode="Static" Style="text-align: right; font-size: 14px;"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="TxtCambio" FilterType="Custom, Numbers" ValidChars=".," />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1195,8 +1242,8 @@
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="display:flex; justify-content:end; font-size:16px; font-weight: bold;">
|
||||
<span> Total: </span>
|
||||
<div class="col-md-12" style="display: flex; justify-content: end; font-size: 16px; font-weight: bold;">
|
||||
<span>Total: </span>
|
||||
<asp:Label ID="LblTotalAnticipos" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1519,7 +1566,7 @@
|
||||
let totalTransferencia = $get("TxtImporteTransferencia") ? ToDouble($get("TxtImporteTransferencia").value) : 0;
|
||||
let totalCobranza = $get("TxtCxCAplicado") ? ToDouble($get("TxtCxCAplicado").value) : 0;
|
||||
let TotalOtrosContado = 0;
|
||||
debugger;
|
||||
|
||||
let total = totalEfectivo + totalCredito + totalDebito + totalCheque + totalTransferencia;
|
||||
|
||||
if (<%= If(UsuarioActual.Empresa.CveEmpresa = 189, 1, 0)%> == 1) {
|
||||
@@ -1532,12 +1579,26 @@
|
||||
let totalVenta = $get('HdnTotal').value ? ToDouble($get('HdnTotal').value) : 0 + totalCobranza;// - ToDouble($get('HdnTotal').value);
|
||||
|
||||
if (total > totalVenta) {
|
||||
lblCambio.innerHTML = "Cambio:";
|
||||
C_lblCambio.innerHTML = "Cambio:";
|
||||
HdnSobranteFaltante.value = "0";
|
||||
//HdnCambioFaltante.value = "1";
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta);
|
||||
let cambio = total - totalVenta;
|
||||
if (cambio > 1) {
|
||||
$get("TxtFaltante").value = "";
|
||||
$get("ChkSobFaltante").checked = false;
|
||||
$get("TxtCambio").value = FormatoNumero(cambio);
|
||||
|
||||
} else {
|
||||
$get("TxtFaltante").value = FormatoNumero(cambio);
|
||||
$get("ChkSobFaltante").checked = true;
|
||||
$get("TxtCambio").value = FormatoNumero(cambio);
|
||||
}
|
||||
|
||||
} else {
|
||||
lblCambio.innerHTML = "Faltante:";
|
||||
//HdnCambioFaltante.value = "0";
|
||||
C_lblCambio.innerHTML = "Faltante:";
|
||||
HdnSobranteFaltante.value = "1";
|
||||
$get("TxtFaltante").value = "";
|
||||
$get("ChkSobFaltante").checked = false;
|
||||
$get("TxtCambio").value = FormatoNumero(total - totalVenta, 2);
|
||||
}
|
||||
|
||||
@@ -1556,5 +1617,28 @@
|
||||
$('#C_LblDiferenciaCajaBloqueo').val(FormatoNumero(total));
|
||||
}
|
||||
|
||||
function CargaSobranteFaltante() {
|
||||
$('#ChkSobFaltante').change(function () {
|
||||
if (this.checked == true) {
|
||||
if (ToDouble($get("TxtCambio").value) > 1) {
|
||||
alert("El sobrante/faltante no debe ser mayor a 1")
|
||||
} else {
|
||||
$get("TxtFaltante").value = $get("TxtCambio").value;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
$get("TxtFaltante").value = "";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
CargaSobranteFaltante();
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
CargaSobranteFaltante();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
Reference in New Issue
Block a user