This commit is contained in:
2025-02-17 21:51:51 -07:00
17 changed files with 1679 additions and 131 deletions

View File

@@ -33,6 +33,10 @@
.ajax__tab_xp .ajax__tab_body {
font-size: 12px !important;
}
.addropzone {
min-height: 170px;
}
</style>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
@@ -265,10 +269,10 @@
<div class="col-md-4">
<asp:RadioButtonList ID="RBLContado" runat="server" RepeatDirection="Horizontal" Style="margin: auto" AutoPostBack="True" RepeatColumns="3">
<asp:ListItem Value="6" Selected="True" >Caja Chica</asp:ListItem>
<asp:ListItem Value="2">Viáticos</asp:ListItem>
<asp:ListItem Value="2">Viáticos</asp:ListItem>
<asp:ListItem Value="4">Deudores</asp:ListItem>
</asp:RadioButtonList>
</div>
@@ -295,7 +299,7 @@
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright" style="padding-top:14px">
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%" CssClass="form-control input-sm DdlPS" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" />
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width:100%" CssClass="form-control input-sm DdlPS" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" />
<label for="<%= DdlPS.ClientID.ToString()%>">
Productos / Servicio:<label>
</div>
@@ -334,6 +338,7 @@
</asp:RequiredFieldValidator>
</div>
<asp:LinkButton runat="server" ID="LnlMostarProrateo" OnClick="LnlMostarProrateo_Click" CssClass="btn btn-primary" ><i class="fa fa-percent"></i></asp:LinkButton>
</div>
@@ -352,7 +357,7 @@
</div>
<div class="form-group form-md-line-input input-iconright" id="DivPersonalReembolso" runat="server" visible="false" >
<div class="form-group form-md-line-input input-iconright" id="DivPersonalReembolso" runat="server" visible="false" >
<asp:DropDownList ID="DdlPersonalReembolso" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NombreCompletoNombre" DataValueField="CvePersonal" Width="100%" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
@@ -362,7 +367,87 @@
</asp:RequiredFieldValidator>
</div>
<div class="row" id="DivDeudores" runat="server" visible="false" >
<div class="row" id="RowChkTipoCambio" runat="server">
<div class="col-xs-4">
<asp:CheckBox Text="Pagar con pesos" TextAlign="Right" Visible="false" AutoPostBack="true" ID="ChkPagarPesos" OnCheckedChanged="ChkPagarPesos_CheckedChanged" runat="server" ClientIDMode="Static" />
<asp:CheckBox Text="Pagar con dolares" TextAlign="Right" Visible="false" AutoPostBack="true" ID="ChkPagarDolares" OnCheckedChanged="ChkPagarDolares_CheckedChanged" runat="server" ClientIDMode="Static" />
</div>
</div>
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlDeudor" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" DataTextField="RazonSocialSaldo" DataValueField="ConcatCveIE"
Width="100%" ValidationGroup="GrpGuardar">
</asp:DropDownList>
<label runat="server" id="Label2" for="<%= DdlDeudor.ClientID.ToString()%>">Deudor:</label>
<asp:RequiredFieldValidator ID="RFVDeudores" runat="server" ControlToValidate="DdlDeudor" InitialValue="-1" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Deudor''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpRegistraCompra"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVDeudores" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<asp:UpdatePanel ID="UpDeudores" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDeudores" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,TipoCambio"
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="Chk" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Fecha</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("FechaDocumento", "{0:d}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Folio</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFolio" runat="server" Text='<%# Eval("Folio") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Saldo</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Saldo Abonar</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="LblTotalDeudores" runat="server" ClientIDMode="Static" Text="0.00" Visible="false"></asp:Label>
<asp:TextBox ID="TxtSaldoDeudor" runat="server" CausesValidation="true" MaxLength="12" Width="76px"></asp:TextBox>
<asp:CompareValidator ID="CVAmortAnti" runat="server" ControlToValidate="TxtSaldoDeudor" Display="None" ErrorMessage="El campo <b>''Importe Deudor''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOAmortAnti" runat="server" HighlightCssClass="vco" TargetControlID="CVAmortAnti" Width="300px"></ajax:ValidatorCalloutExtender>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtSaldoMonedaOriginal" runat="server" CausesValidation="true" Enabled="False" MaxLength="12" Width="70px" Text="0.00" Style="text-align: right;" BackColor="Transparent" BorderStyle="None" ForeColor="White"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<HeaderTemplate></HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="LbTipoMoneda" runat="server" Style="text-align: left;" Width="30px" Enabled="False" BackColor="Transparent" BorderStyle="None" ForeColor="White" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
@@ -827,6 +912,162 @@
</asp:UpdatePanel>
<%--PRORRATE INICIO--%>
<div id="DVModalProrrateoGasolina" class="modal ADS fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:UpdatePanel runat="server" ID="UpProrratearTitulo" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label runat="server" id="LblRiruloProrrareo">Prorratear</asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel runat="server" ID="UpModalProrrateoGasolina" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyectoProrrateoGasolina" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<label runat="server" id="Label10" for="<%= DdlSubProyectoProrrateoGasolina.ClientID.ToString()%>">
<asp:Label runat="server" ID="LblSubProyectoProrrateoGasolina"></asp:Label>:
</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrecioProrrateoGasolina" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPSProrateo"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilTxtPrecioProrrateoGasolina" runat="server" TargetControlID="TxtPrecioProrrateoGasolina" FilterType="Custom, Numbers" ValidChars="." />
<asp:RequiredFieldValidator ID="RfvTxtPrecioProrrateoGasolina" runat="server" ControlToValidate="TxtPrecioProrrateoGasolina" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPSProrateo">
</asp:RequiredFieldValidator>
<label for="<%= TxtPrecioProrrateoGasolina.ClientID.ToString()%>">Porcentaje:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblTotalProrrateoGasolina" CssClass="form-control" Text="100%"></asp:Label>
<label for="<%= LblTotalProrrateoGasolina.ClientID.ToString()%>">Porcentaje:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblRestoProrrateoGasolina" CssClass="form-control"></asp:Label>
<label for="<%= LblRestoProrrateoGasolina.ClientID.ToString()%>">% Restante:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12" style="margin-top:10px;text-align:center">
<asp:LinkButton ID="LnkAgregarProrrateoGasolina" OnClick="LnkAgregarProrrateoGasolina_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GprAgregaPSProrateo" > </asp:LinkButton>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-6" style="text-align:right">
<asp:LinkButton runat="server" ID="LnkDecargaPlatilla" OnClick="LnkDecargaPlatilla_Click" CssClass="btn btn-warning"><i class="fa fa-arrow-down" aria-hidden="true"></i> Formato</asp:LinkButton>
</div>
<div class="col-md-6" style="text-align:left">
<asp:Button Text="Agregar" CssClass="btn btn-success" ID="BrnAgregarPlantilla" OnClick="BrnAgregarPlantilla_Click" runat="server" />
</div>
</div>
<div class="row">
<div class="col-md-21" style="margin-left: 5px; margin-right: 5px;">
<asp:TextBox ID="TxtExcel" CssClass="ADSdropzone hidden" Text="" data-maxFile="1" runat="server"></asp:TextBox>
</div>
</div>
</div>
</div>
<div class="row" style="margin-top:10px">
</div>
<div class="row" style="margin-top:10px">
</div>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvProrrateoGasolina" runat="server" AutoGenerateColumns="false" GridLines="none" BorderWidth="0" Width="100%"
DataKeyNames=""
CssClass="table table-striped table-hover table-advance ScrollAD mysmallbtn">
<Columns>
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" />
<asp:BoundField DataField="Subtotal" HeaderText="Subtotal" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
<asp:BoundField DataField="IVA" HeaderText="IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.######}" Visible="false" />
<asp:BoundField DataField="RetIVA" HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
<asp:BoundField DataField="RetISR" HeaderText="RetISR" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00##}" HeaderText="Total" ItemStyle-HorizontalAlign="Right" Visible="false" />
<asp:BoundField DataField="Porcentaje" DataFormatString="{0:#,##0.00##}" HeaderText="%" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:LinkButton ID="LnkEliminarProrrateoGasolina" runat="server" Width="22px"
CssClass="btn btn-circle btn-xs red" OnClick="LnkEliminarProrrateoGasolina_Click"
data-toggle="confirmation"
data-popout="true" data-original-title="¿Seguro que desea eliminar el prorrateo?" data-btn-ok-label="si">
<i style="margin-left:-2px!important" class='icon-trash'></i>
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDecargaPlatilla" />
</Triggers>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button ID="BtnGuardarProrrateoGasolina" OnClick="BtnGuardarProrrateoGasolina_Click" runat="server" Text="Guardar" CssClass="btn btn-primary" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
<%--PRORRATEO FIN--%>
<div id="divDescripcion" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDescripcion" UpdateMode="Conditional">
<ContentTemplate>
@@ -1356,9 +1597,6 @@
<ajax:TabPanel runat="server" HeaderText="Historial" ID="TabHistorial">
<ContentTemplate>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GVSolicitudesHistorial" runat="server" GridLines="None" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False" OnRowDataBound="GVSolicitudesHistorial_RowDataBound"
@@ -1425,26 +1663,11 @@
</asp:GridView>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div>
</div>
@@ -1529,8 +1752,7 @@
</asp:UpdatePanel>
</div>
@@ -1552,9 +1774,173 @@
$('#BtnCargaCompraComplementoTraslado').click();
}
//function VinculacionManual(v) {
// $get("HdnCveIE").value = v;
// $('#BtnVincularManualmente').click();
//}
function CambioTipoMoneda() {
var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares");
AjustaTextboxDeudores();
if (chkPesosBancos) {
CambiaPesosDolares()
} else if (chkDolaresBancos) {
CambiaDolaresPesos()
} else {
CambiaPesosDolares()
}
}
// CAMBIO DOLARES-PESOS
function CambiaPesosDolares() {
debugger;
if ($("#LbImporteME").length) {
if ($("#TxtTipoCambio").length) {
$get('LbImporteME').value = '$ ' + FormatoNumero(ToDouble(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTipoCambio').value)), 2) + ' USD';
} else {
$get('LbImporteME').value = '';
}
}
}
function CambiaDolaresPesos() {
debugger;
if ($("#LbImporteMN").length) {
if ($("#TxtTipoCambio").length) {
$get('LbImporteMN').value = '$ ' + FormatoNumero(ToDouble(ToDouble($get('TxtImporte').value) * ToDouble($get('TxtTipoCambio').value)), 2) + ' MXN';
} else {
$get('LbImporteMN').value = ''
}
}
}
function AjustaTextboxDeudores() {
if (!(($("#C_RBLContado_2") && $("#C_RBLContado_2").is(':checked')) || ($("#C_RBLContado_3") && $("#C_RBLContado_3").is(':checked')) || ($("#C_RBLContado_4") && $("#C_RBLContado_4").is(':checked')))) {
return false;
}
var totalPoints = 0.00;
var TC = 1.00;
if ($get("TxtTipoCambio") && ToDouble($get("TxtTipoCambio").value) > 0) {
TC = ToDouble($get("TxtTipoCambio").value);
}
$('input[name*=TxtSaldoDeudor]').each(function () {
totalPoints += ToDouble($(this).val());
if ($("#LbImporteME").length) {
if ($("#TxtTipoCambio").length) {
$(this).parent().next().children('input[name*=TxtSaldoMonedaOriginal]').val(FormatoNumero(ToDouble($(this).val()) / TC, 2));
} else {
$(this).parent().next().children('input[name*=TxtSaldoMonedaOriginal]').val('0.00');
}
} else if ($("#LbImporteMN").length) {
if ($("#TxtTipoCambio").length) {
$(this).parent().next().children('input[name*=TxtSaldoMonedaOriginal]').val(FormatoNumero(ToDouble($(this).val()) * TC, 2));
} else {
$(this).parent().next().children('input[name*=TxtSaldoMonedaOriginal]').val('0.00');
}
}
});
$get('TxtImporte').value = FormatoNumero(totalPoints, 2);
var chkPesosBancos = $get("ChkPagarPesos");
var chkDolaresBancos = $get("ChkPagarDolares");
if (chkPesosBancos) {
CambiaPesosDolares()
} else if (chkDolaresBancos) {
CambiaDolaresPesos()
} else {
CambiaPesosDolares()
}
}
// ajuste Ingresos x comprobar y Deudores
function ClickDeudorChk(Chk, Obj, total, saldo) {
if ($("#" + Chk.id).is(":checked")) {
$('#' + Obj).val(saldo);
}else{
$('#' + Obj).val("");
}
/*
total = ToDouble(ToDouble(total).toFixed(2));
saldo = ToDouble(ToDouble(saldo).toFixed(2));
var totalTC = total;
var TC = 1.00;
if ($get("TxtTipoCambio") && ToDouble($get("TxtTipoCambio").value) > 0) {
TC = ToDouble($get("TxtTipoCambio").value);
total = total * TC;
}
if ($("#" + Chk.id).is(":checked")) {
$('#' + Obj).attr('disabled', false);
if (ToDouble($get('TxtImporte').value) != total) {
if ((ToDouble($get('TxtImporte').value) + saldo) > total) {
$('#' + Obj).val(saldo - (ToDouble($get('TxtImporte').value) + saldo - total));
$get('TxtImporte').value = (total / TC).toFixed(2)
}
else {
if (total > saldo) {
$('#' + Obj).val(saldo);
}
else {
$('#' + Obj).val(total);
}
if (ToDouble($get('TxtImporte').value) >= total) {
$('#' + Obj).val($get(total - 'TxtImporte').value);
$get('TxtImporte').value = (total / TC).toFixed(2)
} else {
$get('TxtImporte').value = (ToDouble($get('TxtImporte').value) + ToDouble($get(Obj).value) / TC).toFixed(2);
}
}
}
else {
$('#' + Obj).val(0);
}
}
else {
$('#' + Obj).attr('disabled', true);
if (ToDouble($get(Obj).value) > 0) {
$get('TxtImporte').value = ToDouble(ToDouble($get('TxtImporte').value) - ToDouble($get(Obj).value)).toFixed(2);
if ($get('TxtImporte').value < 0) {
$get('TxtImporte').value = 0
}
}
$('#' + Obj).val(0);
}
$('#' + Obj).val(ToDouble($get(Obj).value).toFixed(2));
CambioTipoMoneda();
*/
}
</script>
</asp:Content>

File diff suppressed because it is too large Load Diff