Existencias desde ventas,proveedor y usuario en programcion de recursos,Codigo y PS en kardex horizontal,multiple almacen en RepEntradasSalidas
This commit is contained in:
@@ -6,6 +6,10 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
|
||||
<style>
|
||||
.btn-xs {
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
.nolineheight {
|
||||
line-height: 1;
|
||||
}
|
||||
@@ -131,6 +135,16 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.select2anothertable {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
background-color: white;
|
||||
/*top: 50px;*/ top: 21px;
|
||||
/*max-height: 200px;*/ max-height: 229px;
|
||||
/*background-color: #dcdcdc;*/
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.select2anothertable {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
@@ -648,7 +662,7 @@
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr align="left" id="TrAlmacenAsignado" runat="server" visible="False">
|
||||
<td>
|
||||
<asp:Label runat="server" ToolTip="Almacen Asignado" Font-Bold="true" Text="Almacen A:"></asp:Label>
|
||||
@@ -697,7 +711,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left" id="TrSinExistencia" runat="server" visible="false">
|
||||
<td><b>Sin existencia:</b> </td>
|
||||
<td><b>Sin existencia:</b> </td>
|
||||
<td>
|
||||
<asp:UpdatePanel ID="UpSinExistencia" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -1422,7 +1436,7 @@
|
||||
</td>
|
||||
<td><b>T.C.:</b></td>
|
||||
<td>
|
||||
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static" Readonly ="true"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtTipoCambio" onkeyup="ConvertirDllsPesos();" runat="server" CssClass="form-control input-sm" MaxLength="7" Text="1" Enabled="true" Width="70px" ClientIDMode="Static" ReadOnly="true"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVTipoCambio" runat="server" ControlToValidate="TxtTipoCambio" Display="None" ErrorMessage="El campo <b>''Tipo de Cambio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOTipoCambio" runat="server" HighlightCssClass="vco" TargetControlID="CVTipoCambio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" ID="LblTCValuacion" ToolTip="Última Valuación" Text="" Visible="false"></asp:Label>
|
||||
@@ -5279,7 +5293,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<asp:GridView ID="GvComplementoPagos" DataKeyNames="CveComplementoPago,FolioFiscal,CveIE,RFCReceptor,CvePAC,SerieFolio,CobranzaCorreo,Estatus"
|
||||
<asp:GridView ID="GvComplementoPagos" DataKeyNames="CveComplementoPago,FolioFiscal,CveIE,RFCReceptor,CvePAC,SerieFolio,CobranzaCorreo,Estatus"
|
||||
runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" GridLines="None" data-sort="true">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolio" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
@@ -5287,10 +5301,10 @@
|
||||
|
||||
<asp:BoundField HeaderText="XML" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="PDF" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="StrEstatus" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Estatus" DataField="StrEstatus" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
|
||||
<asp:BoundField HeaderText="Fecha C." DataField="FechaCancelacion" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Reenviar</HeaderTemplate>
|
||||
@@ -5300,11 +5314,11 @@
|
||||
<ItemStyle Width="5%" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cancelar" Visible="false" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<asp:TemplateField HeaderText="Cancelar" Visible="false" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkCancelarComplemetno" Visible="false" OnClick="LnkCancelarComplemetno_Click" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Regenerar"
|
||||
<asp:LinkButton ID="LnkCancelarComplemetno" Visible="false" OnClick="LnkCancelarComplemetno_Click" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Regenerar"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el complemento?" data-btn-ok-label="si"
|
||||
CssClass="btn btn-circle btn-sm red " Text="<i class='fa fa-minus'></i>" />
|
||||
CssClass="btn btn-circle btn-sm red " Text="<i class='fa fa-minus'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -6009,7 +6023,27 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DivModalExistencias" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog rowpadding" tabindex="-1">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 id="hPS" class="modal-title">Existencias</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table id="TbExistenciasPS">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||
@@ -6827,7 +6861,7 @@
|
||||
var div = $('<div class="select2anothertable"></div>');
|
||||
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable').remove();
|
||||
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown').prepend(div);
|
||||
var table = $('<table></table>'); div.append(table);
|
||||
var table = $('<table id="TExistencias"></table>'); div.append(table);
|
||||
var tbody = $('<tbody></tbody>'); table.append(tbody);
|
||||
$(".select2-container--default .select2-results>.select2-results__options").off("scroll", scrollfuncion);
|
||||
$(".select2-container--default .select2-results>.select2-results__options").scroll(scrollfuncion);
|
||||
@@ -6844,11 +6878,73 @@
|
||||
|
||||
var td;
|
||||
for (var key in item) {
|
||||
if (!(key == "text" || key == "id")) { td = $('<td ' + ((item[key] > 0) ? 'style = "font-weight:bold;"' : '') + '>' + item[key] + '</td>'); tr.append(td); }
|
||||
if (!(key == "text" || key == "id")) {
|
||||
if ((item[key] > 0)) {
|
||||
td = $('<td style = "font-weight:bold;" >' + item[key] + '</td>'); tr.append(td);
|
||||
} else {
|
||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(566) %>' == '1') {
|
||||
var buscarAlmacenes = "CargaExistenciasSucursales(" + item.id + ",'" + item.text + "');"
|
||||
td = $('<td>' + item[key] + ' <button type="button" class="btn btn-xs btn-primary" onclick="' + buscarAlmacenes + '">Ver mas existencias</button></td>'); tr.append(td);
|
||||
} else {
|
||||
td = $('<td>' + item[key] + '</td>'); tr.append(td);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
indexd += 1;
|
||||
});
|
||||
}
|
||||
function CargaExistenciasSucursales(id,ps) {
|
||||
$.ajax({
|
||||
url: '/Ashx/SIGWeb.ashx?metodo=getpsalmacen&cveps=' + id,
|
||||
type: 'get',
|
||||
beforeSend: function () {
|
||||
console.log("procesando.....");
|
||||
},
|
||||
success: function (response) {
|
||||
var obj = JSON.parse(response);
|
||||
MostarTablaSucursales(obj, ps);
|
||||
}
|
||||
});
|
||||
}
|
||||
function MostarTablaSucursales(almacenes, ps) {
|
||||
var div = $('<div class="select2anothertable"></div>');
|
||||
|
||||
var table = $('<table style="width: 401px;"></table>');
|
||||
var tbody = $('<tbody></tbody>'); table.append(tbody);
|
||||
|
||||
//div.append(table);
|
||||
|
||||
var indexd = 0;
|
||||
almacenes.forEach(function (item) {
|
||||
if (indexd == 0) {
|
||||
var tr = $('<tr></tr>'); tbody.append(tr);
|
||||
var td1 = $('<th style="font-weight: bold; width: 347px; text-align: center;">Almacen</th>');
|
||||
var td2 = $('<th style="font-weight: bold; width: 181px; text-align: center;">Existencia</th>');
|
||||
tr.append(td1);
|
||||
tr.append(td2);
|
||||
}
|
||||
|
||||
var tr = $('<tr style="text-align: left;"></tr>'); tbody.append(tr);
|
||||
|
||||
for (var key in item) {
|
||||
if (!(key == "almacen" || key == "id")) {
|
||||
var td1 = $('<td style="width: 347px;">' + item["almacen"] + '</td>'); tr.append(td1);
|
||||
var td2 = $('<td style="font-weight: bold; width: 181px; text-align: center;"' + ((item["existencia"] > 0) ? 'style = "font-weight:bold;"' : '') + '>' + item["existencia"] + '</td>'); tr.append(td2);
|
||||
}
|
||||
}
|
||||
indexd += 1;
|
||||
});
|
||||
|
||||
if (almacenes.length > 0) {
|
||||
TbExistenciasPS.innerHTML = table.html();
|
||||
hPS.innerText = "Existencias: " + ps;
|
||||
$("#DivModalExistencias").modal("show");
|
||||
} else {
|
||||
alert("No hay existencias en otros almacenes");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ADSReady() {
|
||||
//MakeSortable();
|
||||
|
||||
Reference in New Issue
Block a user