--merge cobranza y ventas
This commit is contained in:
@@ -240,52 +240,49 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
End If
|
||||
|
||||
Dim Importe As Decimal = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
|
||||
'AUTORIZACION DE IMPORTE,
|
||||
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
|
||||
If TipoAutorizacion = 1 Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(595).Contiene("1", "2") Then
|
||||
'AUTORIZACION DE IMPORTE,
|
||||
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
|
||||
If TipoAutorizacion = 1 Then
|
||||
Dim SaldoCliente As Decimal = gvRow.DataKey("Saldo").ToDecimal()
|
||||
Dim LimiteCredito As Decimal = gvRow.DataKey("LimiteCredito").ToDecimal()
|
||||
'SI EL LIMITE ES 0, PERMITE AUTORIZAR
|
||||
If LimiteCredito > 0 Then
|
||||
Dim PorcentajeMaximoAutorizar As Decimal = 0.1D
|
||||
|
||||
Dim SaldoCliente As Decimal = gvRow.DataKey("Saldo").ToDecimal()
|
||||
Dim LimiteCredito As Decimal = gvRow.DataKey("LimiteCredito").ToDecimal()
|
||||
'SI EL LIMITE ES 0, PERMITE AUTORIZAR
|
||||
If LimiteCredito > 0 Then
|
||||
Dim PorcentajeMaximoAutorizar As Decimal = 0.1D
|
||||
|
||||
If UsuarioActual.PorcentajeMaximoAutorizacion > 0 Then
|
||||
PorcentajeMaximoAutorizar = (UsuarioActual.PorcentajeMaximoAutorizacion / 100)
|
||||
End If
|
||||
|
||||
Dim ImporteMaximoAutorizar As Decimal = ((LimiteCredito * (1D + PorcentajeMaximoAutorizar)) - SaldoCliente).RoundSQL(2)
|
||||
|
||||
If Importe > ImporteMaximoAutorizar Then
|
||||
Alert($"No se puede autorizar, el importe máximo a autorizar es de {ImporteMaximoAutorizar:N2}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If UsuarioActual.PorcentajeMaximoAutorizacion > 0 Then
|
||||
PorcentajeMaximoAutorizar = (UsuarioActual.PorcentajeMaximoAutorizacion / 100)
|
||||
End If
|
||||
|
||||
Dim ImporteMaximoAutorizar As Decimal = ((LimiteCredito * (1D + PorcentajeMaximoAutorizar)) - SaldoCliente).RoundSQL(2)
|
||||
|
||||
'AUTORIZACION POR DIAS VENCIDOS
|
||||
ElseIf TipoAutorizacion = 2 Then
|
||||
Dim DiasVencidos As Integer = gvRow.DataKey("DiasVencidos").ToEntero()
|
||||
If DiasVencidos > 0 Then
|
||||
Dim DiasVencidosPermitidos As Integer = 5
|
||||
If Importe > ImporteMaximoAutorizar Then
|
||||
Alert($"No se puede autorizar, el importe máximo a autorizar es de {ImporteMaximoAutorizar:N2}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DiasVencidosAutorizacion As Integer = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero()
|
||||
|
||||
If DiasVencidos > DiasVencidosAutorizacion Then
|
||||
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. <br/> Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
'AUTORIZACION POR DIAS VENCIDOS
|
||||
ElseIf TipoAutorizacion = 2 Then
|
||||
Dim DiasVencidos As Integer = gvRow.DataKey("DiasVencidos").ToEntero()
|
||||
If DiasVencidos > 0 Then
|
||||
Dim DiasVencidosPermitidos As Integer = 5
|
||||
|
||||
If UsuarioActual.DiasMaximoAutorizacion > 0 Then
|
||||
DiasVencidosPermitidos = UsuarioActual.DiasMaximoAutorizacion
|
||||
End If
|
||||
Dim DiasVencidosAutorizacion As Integer = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero()
|
||||
|
||||
If DiasVencidosAutorizacion > DiasVencidosPermitidos Then
|
||||
Alert($"No se puede autorizar, la cantidad máxima de días vencidos permitidas es de {DiasVencidosPermitidos:N0}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If DiasVencidos > DiasVencidosAutorizacion Then
|
||||
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. <br/> Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If UsuarioActual.DiasMaximoAutorizacion > 0 Then
|
||||
DiasVencidosPermitidos = UsuarioActual.DiasMaximoAutorizacion
|
||||
End If
|
||||
|
||||
If DiasVencidosAutorizacion > DiasVencidosPermitidos Then
|
||||
Alert($"No se puede autorizar, la cantidad máxima de días vencidos permitidas es de {DiasVencidosPermitidos:N0}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -28,7 +28,7 @@ Partial Class Ventas_CatPromociones
|
||||
End If
|
||||
|
||||
InicializaControles()
|
||||
|
||||
OcultarMostrarInactivar(True)
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
<div class="portlet light xspadding traspasorow bordered" runat="server" visible="false" id="DivCancelacionesPendientes">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1; color: #ff6000;">Cancelaciones en proceso</span>
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1; color: #ff6000;">Cancelaciones en proceso</span>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
@@ -423,11 +423,11 @@
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None" Width="100%">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="25%" />
|
||||
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" ItemStyle-Width="15%" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" ItemStyle-Width="15%" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fecha Solicitud" DataField="FechaCambioEstatus" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Motivo" DataField="MotivoCancelacion" ItemStyle-Width="25%" />
|
||||
<asp:TemplateField ItemStyle-Width="5%">
|
||||
<asp:TemplateField ItemStyle-Width="5%" >
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="BtnValidar" OnClick="BtnValidar_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea verificar la cancelación?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
@@ -444,7 +444,7 @@
|
||||
<div class="col-md-6">
|
||||
<asp:Panel runat="server" ID="PnlContado" DefaultButton="BtnPagar" Visible="false">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="note note-success">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
@@ -465,11 +465,11 @@
|
||||
</b>
|
||||
</div>
|
||||
<div class="col-md-1" style="text-align: right;">
|
||||
<asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" />
|
||||
<asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div>
|
||||
@@ -585,6 +585,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Anticipos:</label><asp:LinkButton ID="ImgAntiPend" Visible="false" OnClick="ImgAntiPend_Click" runat="server" Text=" <i class='fa fa-money' style='font-size: 18px !important; color: #3c763d !important;'></i> " AlternateText="Aplicación de anticipos" Style="cursor: pointer;" />
|
||||
|
||||
</div>
|
||||
<div class="col-md-4 input-icon">
|
||||
<i style="margin: 0px;">$</i>
|
||||
@@ -594,19 +595,19 @@
|
||||
<div class="col-md-6">
|
||||
<label>
|
||||
<asp:UpdatePanel ID="UPPCobranza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:Literal ID="LtlTipoAnticipo" runat="server"></asp:Literal></label>
|
||||
<%--<asp:HiddenField ID="HdnTipoAmortizacion" runat="server" Value="" />--%>
|
||||
<asp:LinkButton ID="LnkCxC" runat="server" CssClass="btn btn-xs btn-success" Text="Cobranza" OnClick="LnkCxC_Click" />
|
||||
|
||||
<asp:Literal ID="LtlTipoAnticipo" runat="server"></asp:Literal></label>
|
||||
<asp:HiddenField ID="HdnTipoAmortizacion" runat="server" Value="" />
|
||||
<asp:LinkButton ID="LnkCxC" runat="server" CssClass="btn btn-xs btn-success" Text="Cobranza" OnClick="LnkCxC_Click" />
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox ID="TxtCxCAplicado" CssClass="form-control input-sm TextBoxAsLabel" runat="server" MaxLength="12" Width="100px" Enabled="false" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCxCAplicado" CssClass="form-control input-sm TextBoxAsLabel" runat="server" MaxLength="12" Width="100px" Enabled="false" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
@@ -640,35 +641,35 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPTotalesContado" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel runat="server" ID="UPPTotalesContado" UpdateMode="Conditional">
|
||||
<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="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>
|
||||
<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>
|
||||
</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>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chequesie2" id="divPagar">
|
||||
@@ -678,7 +679,7 @@
|
||||
<asp:HiddenField ID="HdnCveCliente" runat="server" />
|
||||
<asp:HiddenField ID="HdnPlazoCobranza" runat="server" />
|
||||
<asp:HiddenField ID="HdnVentaCondicionesPago" runat="server" />
|
||||
<asp:HiddenField ID="HdnCveIE" runat="server" />
|
||||
<asp:HiddenField ID="HdnCveIE" runat="server" />
|
||||
<asp:HiddenField ID="HdnTotal" runat="server" ClientIDMode="Static" />
|
||||
<asp:Button ID="BtnPagar" CssClass="btn btn-large btn-success e-big-btn" runat="server" Text="Pagar" />
|
||||
</div>
|
||||
@@ -1183,7 +1184,67 @@
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div style="max-height: 700px; overflow-y: auto;">
|
||||
<div class="row" runat="server" id="divAmortizacionTipo" visible="false">
|
||||
<div class="col-md-4">
|
||||
Tipo Amortización:
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoAmortizacionAnticipo" runat="server" AutoPostBack="true" Width="250px" CssClass="select2me" CausesValidation="true" OnSelectedIndexChanged="DdlTipoAmortizacionAnticipo_SelectedIndexChanged">
|
||||
<asp:ListItem Text="Seleccionar" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Amortización anticipo con nota de crédito" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlTipoAmortizacionAnticipo" runat="server" Display="None" ControlToValidate="DdlTipoAmortizacionAnticipo" InitialValue="-1" ErrorMessage="Debe Seleccionarse un tipo" ValidationGroup="VGAnticiposClientes"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CEDdlTipoAmortizacionAnticipo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlTipoAmortizacionAnticipo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<div class="row" style="text-align: center;" runat="server" id="divAnticipoMsg" visible="false">
|
||||
<asp:Label ID="Label2" runat="server" Text="Se aplicará descuento por el total de las amortizaciones en los productos" CssClass="alert alert-warning" Style="padding: 5px; margin-bottom: 5px; padding-right: 25px;"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="divAmortizacionTipoRelacion" runat="server" visible="false">
|
||||
<div class="col-md-4">
|
||||
Tipo Relación:
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoRelacionAnticipo" runat="server" Width="250px" CssClass="select2me">
|
||||
<asp:ListItem Text="07 - CFDI por aplicación de anticipo" Value="7"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivConceptoNC" runat="server" visible="false">
|
||||
<div class="col-md-4">
|
||||
Concepto:
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlNCPSAnt" runat="server" DataTextField="PSCodigo" DataValueField="CvePS" Width="250px" CssClass="select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVNCPSAnt" runat="server" InitialValue="-1" ControlToValidate="DdlNCPSAnt" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Concepto''</b> es necesario, por favor ingréselo." ValidationGroup="VGAnticiposClientes"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCERFVNCPSAnt" runat="server" HighlightCssClass="vco" TargetControlID="RFVNCPSAnt" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="DivFechaAnticipoCliente" runat="server" visible="false">
|
||||
<b>
|
||||
<label class="col-md-2">Fecha:</label></b>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80% !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAnticipoCliente" runat="server" ClientIDMode="Static" CssClass="form-control" CausesValidation="true" MaxLength="10" AutoPostBack="true" OnTextChanged="TxtFechaAnticipoCliente_TextChanged"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaAnticipoCliente" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAnticipoCliente" runat="server" TargetControlID="TxtFechaAnticipoCliente" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaAnticipoCliente" TargetControlID="TxtFechaAnticipoCliente" PopupButtonID="ImgFechaAnticipoCliente" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CvFechaAnticipoCliente" runat="server" ControlToValidate="TxtFechaAnticipoCliente" Display="None" Operator="DataTypeCheck" Type="Date" ValidationGroup="VGAnticiposClientes" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoFechaAnticipoCliente" runat="server" Enabled="True" HighlightCssClass="vco" TargetControlID="CvFechaAnticipoCliente" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||
<div class="col-md-2">
|
||||
<asp:LinkButton ID="LnkRecargaAnticipos" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-refresh'></i> Actualizar" runat="server" OnClick="LnkRecargaAnticipos_Click" />
|
||||
@@ -1194,13 +1255,6 @@
|
||||
</div>
|
||||
</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>
|
||||
<asp:Label ID="LblTotalAnticipos" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
|
||||
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
|
||||
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos">
|
||||
@@ -1229,12 +1283,6 @@
|
||||
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Tipo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipo" runat="server" Text='<%# Eval("Tipo") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Moneda Venta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -1256,6 +1304,7 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Amort. Ant.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTotalAnticipos" runat="server" ClientIDMode="Static" Text="0.00" Visible="false"></asp:Label>
|
||||
<asp:TextBox ID="TxtAnticipo" CssClass="CSGATxtAnticipo" runat="server" CausesValidation="true" MaxLength="12" Width="76px"></asp:TextBox>
|
||||
<asp:CompareValidator ID="CVAmortAnti" runat="server" ControlToValidate="TxtAnticipo" Display="None" ErrorMessage="El campo <b>''Amortización de Anticipos''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="VGAnticiposClientes"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOAmortAnti" runat="server" HighlightCssClass="vco" TargetControlID="CVAmortAnti" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
@@ -1291,13 +1340,14 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Estados de Cajas
|
||||
<h4 class="modal-title">
|
||||
Estados de Cajas
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12" >
|
||||
|
||||
<asp:GridView ID="GvEstadoCajas" runat="server" AutoGenerateColumns="true" ClientIDMode="Static" EmptyDataText=""
|
||||
OnRowDataBound="GvEstadoCajas_RowDataBound"
|
||||
@@ -1308,9 +1358,9 @@
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%--<asp:Button ID="Button1" runat="server" Text="Aceptar" class="btn btn-primary" ValidationGroup="VGAnticiposClientes" />
|
||||
@@ -1325,81 +1375,81 @@
|
||||
|
||||
<asp:Button ID="BtnEnviarMailCancelacion" runat="server" ClientIDMode="Static" Text="Enviar Mail Cliente" Style="display: none;" OnClick="BtnEnviarMailCancelacion_Click" />
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPCxC" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div id="divCxC" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 700px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label runat="server">Cuentas por cobrar: <asp:Literal ID="Literal1" runat="server"></asp:Literal></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaCxC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCxC','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPCxC" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div id="divCxC" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 700px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label runat="server">Cuentas por cobrar: <asp:Literal ID="Literal1" runat="server"></asp:Literal></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaCxC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCxC','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontró cobranza pendiente del cliente"
|
||||
CssClass=" table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
|
||||
DataKeyNames=" CveVenta,PorcentajeIVA,TipoDocto,CveSubProyecto,CveMoneda,TipoCambio, Fecha,SerieFolio, SubTotal,IVA,Total,IEPS,RetIVA,RetISR, CveCliente,Saldo">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Folio</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFactura" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Moneda Venta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="MonedaVenta" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Moneda</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAbreviatura" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontró cobranza pendiente del cliente"
|
||||
CssClass=" table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
|
||||
DataKeyNames=" CveVenta,PorcentajeIVA,TipoDocto,CveSubProyecto,CveMoneda,TipoCambio, Fecha,SerieFolio, SubTotal,IVA,Total,IEPS,RetIVA,RetISR, CveCliente,Saldo">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Folio</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFactura" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAnticipos" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>Moneda Venta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="MonedaVenta" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Moneda</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAbreviatura" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAplicarCxC" runat="server" Text="Aceptar" class="btn btn-primary" OnClick="BtnAplicarCxC_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAplicarCxC" runat="server" Text="Aceptar" class="btn btn-primary" OnClick="BtnAplicarCxC_Click" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
@@ -1416,6 +1466,8 @@
|
||||
function chkAnt(t, txt, importe, AmorContrato = 0) {
|
||||
let totalAnt = 0;
|
||||
|
||||
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
||||
|
||||
//si es con.nc,es.el.total
|
||||
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
|
||||
|
||||
@@ -1434,12 +1486,8 @@
|
||||
totalAnt = FnSumaValoresAnt();
|
||||
|
||||
if (totalAnt > SaldoCompra) {
|
||||
let valor = FormatoNumero(importe - (totalAnt - SaldoCompra), 2);
|
||||
if (valor == 'NaN') {
|
||||
txt.value = "0.00";
|
||||
} else {
|
||||
txt.value = valor;
|
||||
}
|
||||
txt.value = FormatoNumero(importe - (totalAnt - SaldoCompra), 2);
|
||||
//$get('HdnVentaSaldo').value = 0.00;
|
||||
alert("El Importe no debe de exceder a el saldo");
|
||||
}
|
||||
|
||||
@@ -1460,8 +1508,13 @@
|
||||
|
||||
let Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));// ToDouble($get('TxtSubTotal').value);
|
||||
|
||||
let TipoAnticipo = $('#<%= DdlTipoAmortizacionAnticipo.ClientID %>').val();
|
||||
let importeTxt = parseFloat(txt.value.replace(/,/g, ''));
|
||||
|
||||
if (TipoAnticipo == '4') {
|
||||
Total = ToDouble($get("C_LtlSaldo").value.replace(",", ""));
|
||||
}
|
||||
|
||||
if (isNaN(importeTxt)) {
|
||||
importeTxt = 0;
|
||||
} else {
|
||||
|
||||
@@ -431,11 +431,11 @@
|
||||
<%--19--%>
|
||||
<asp:BoundField HeaderText="Num. Turnos" DataField="NumTurnos" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<%--20--%>
|
||||
<asp:BoundField HeaderText="O.C." DataField="OC_noOrden" ItemStyle-Width="5%" Visible="false" />
|
||||
<asp:BoundField HeaderText="O. C." DataField="OC_noOrden" ItemStyle-Width="5%" Visible="false" />
|
||||
<%--21--%>
|
||||
<asp:BoundField HeaderText="O.C Kg" DataField="OC_Kilogramos" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Kilogramos" DataField="OC_Kilogramos" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--22--%>
|
||||
<asp:BoundField HeaderText="O.C Cantidad" DataField="OC_Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Cantiadad" DataField="OC_Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--23--%>
|
||||
<asp:BoundField HeaderText="Manifiesto" DataField="NoManifiesto" ItemStyle-Width="5%" Visible="false" />
|
||||
</Columns>
|
||||
@@ -481,13 +481,13 @@
|
||||
</tr>
|
||||
<tr runat="server" id="DivMostrarCgame">
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O.C." />
|
||||
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O. C." />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_Kilogramos" runat="server" Text="O.C. Kilogramos" />
|
||||
<asp:CheckBox ID="ChkOC_Kilogramos" runat="server" Text="O. C. Kilogramos" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O.C. Cantidad" />
|
||||
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O. C. Cantiadad" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -78,9 +78,9 @@
|
||||
<asp:LinkButton ID="LnkPErsonalizar" OnClick="LnkPErsonalizar_Click" runat="server"><i class="fa fa-pencil"></i>Personalizar Columnas</asp:LinkButton>
|
||||
<%--<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>--%>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpLnkHP" runat="server" UpdateMode="Conditional">
|
||||
@@ -98,25 +98,23 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGeneraXLS1" OnClick="LnkGeneraXLS1_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 1</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGeneraXLS2" OnClick="LnkGeneraXLS2_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 2</asp:LinkButton>
|
||||
</li>
|
||||
<li id="LiSabana" runat="server" visible="false">
|
||||
<asp:HyperLink ID="HLSabana" NavigateUrl="#" data-toggle="modal" data-target="#DivModalSabana" runat="server"><i class='fa fa-file-excel-o'></i> Ventas por código</asp:HyperLink>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGeneraXLS1" OnClick="LnkGeneraXLS1_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 1</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkGeneraXLS2" OnClick="LnkGeneraXLS2_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generar XLS 2</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" />
|
||||
<asp:PostBackTrigger ControlID="LnkGeneraXLS1" />
|
||||
<asp:PostBackTrigger ControlID="LnkGeneraXLS2" />
|
||||
<asp:PostBackTrigger ControlID="LnkGeneraXLS1" />
|
||||
<asp:PostBackTrigger ControlID="LnkGeneraXLS2" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -146,7 +144,7 @@
|
||||
<asp:ListItem Text="Cotización" Value="Cot"></asp:ListItem>
|
||||
<asp:ListItem Text="Anticipos" Value="Ant"></asp:ListItem>
|
||||
<asp:ListItem Text="Pedido" Value="Ped"></asp:ListItem>
|
||||
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
|
||||
<asp:ListItem Text="Devolucion" Value="Dev"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
<%--<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlTipoComprobante" runat="server" OnSelectedIndexChanged="DdlTipoComprobante_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
@@ -337,8 +335,8 @@
|
||||
<asp:ListItem Text="Sin parte relacionadas" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" visible="false" runat="server" id="DivLblDistr">Distribuidor:</label>
|
||||
<div class="col-md-2" visible="false" runat="server" id="DivDistr">
|
||||
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" Visible="false" runat="server" id="DivLblDistr">Distribuidor:</label>
|
||||
<div class="col-md-2" Visible="false" runat="server" id="DivDistr">
|
||||
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
|
||||
@@ -346,28 +344,28 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblServicioDomicilioFiltro" class="col-md-1 truncate" Visible="false">Servicio Domicilio:</asp:Label>
|
||||
<div class="col-md-2" runat="server" id="DVServicioDomicilio" visible="false">
|
||||
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1">Si</asp:ListItem>
|
||||
<asp:ListItem Value="0">No</asp:ListItem>
|
||||
<div class="col-md-2" runat="server" id="DVServicioDomicilio" Visible="false">
|
||||
<asp:DropDownList ID="DdlServicioDomicilio" CssClass=" form-control input-sm select2me" runat="server" Width="100%" >
|
||||
<asp:ListItem Value ="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1">Si</asp:ListItem>
|
||||
<asp:ListItem Value="0">No</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="LblFacturaGlobal" class="col-md-1 truncate" Visible="false">Factura Global:</asp:Label>
|
||||
<div class="col-md-2" runat="server" id="DivFacturaGlobal" visible="false">
|
||||
<asp:DropDownList ID="DdlFacturaGlobal" CssClass=" form-control input-sm select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1">Solo Globales</asp:ListItem>
|
||||
<asp:ListItem Value="0">Sin Globales</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-2" runat="server" id="DivFacturaGlobal" Visible="false">
|
||||
<asp:DropDownList ID="DdlFacturaGlobal" CssClass=" form-control input-sm select2me" runat="server" Width="100%" >
|
||||
<asp:ListItem Value ="-1">Todos</asp:ListItem>
|
||||
<asp:ListItem Value="1">Solo Globales</asp:ListItem>
|
||||
<asp:ListItem Value="0">Sin Globales</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Relación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Relación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoRelacion" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -401,7 +399,7 @@
|
||||
<%--6--%>
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--7--%>
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
|
||||
<%--8--%>
|
||||
<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--9--%>
|
||||
@@ -424,24 +422,24 @@
|
||||
<asp:BoundField HeaderText="Tot. Mínimo" DataField="MIN_Total" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--18--%>
|
||||
<asp:BoundField HeaderText="Tot. Refacturado" DataField="TotalRefacturado" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
|
||||
|
||||
|
||||
<%--<asp:BoundField HeaderText="Sub. Crédito" DataField="SubTotalCredito" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sub. Contado" DataField="SubTotalContado" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
|
||||
<%--19--%>
|
||||
<asp:TemplateField HeaderText="Sub. Crédito" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCredito" runat="server" Text='<%# Eval("SubtotalCredito", "{0:N0}") %>'></asp:Label>
|
||||
<asp:Label ID="LblCreditoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalCreditoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCredito" runat="server" Text='<%# Eval("SubtotalCredito", "{0:N0}") %>'></asp:Label>
|
||||
<asp:Label ID="LblCreditoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalCreditoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false" ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--20--%>
|
||||
<asp:TemplateField HeaderText="Sub. Contado" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblContado" runat="server" Text='<%# Eval("SubTotalContado", "{0:N0}") %>'></asp:Label>
|
||||
<asp:Label ID="LblContadoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalContadoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblContado" runat="server" Text='<%# Eval("SubTotalContado", "{0:N0}") %>'></asp:Label>
|
||||
<asp:Label ID="LblContadoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalContadoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false" ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -467,91 +465,93 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCantidad" runat="server" Text=" *Cantidad" /></td>
|
||||
<asp:CheckBox ID="ChkCantidad" runat="server" Text=" *Cantidad" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMaxSub" runat="server" Text=" SubTotal Máximo" />
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubtotal" runat="server" Text=" Sub total" /></td>
|
||||
<asp:CheckBox ID="ChkSubtotal" runat="server" Text=" Sub total" /></td>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAVGSub" runat="server" Text=" SubTotal Promedio" />
|
||||
</td>
|
||||
<asp:CheckBox ID="ChkAVGSub" runat="server" Text=" SubTotal Promedio" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescuentos" runat="server" Text=" *Descuentos" /></td>
|
||||
<asp:CheckBox ID="ChkDescuentos" runat="server" Text=" *Descuentos" /></td>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMinSub" runat="server" Text=" SubTotal Mínimo" />
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotal2" runat="server" Text=" *Subtotal 2" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMaxTot" runat="server" Text=" Total Máximo" />
|
||||
</td>
|
||||
<asp:CheckBox ID="ChkMaxTot" runat="server" Text=" Total Máximo" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text=" *IVA" />
|
||||
</td>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAvgTot" runat="server" Text=" Total Promedio" />
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text=" Ret. IVA" />
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text=" Ret. IVA" />
|
||||
|
||||
</td>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMinTot" runat="server" Text=" Total Mínimo" />
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
|
||||
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text=" Ret. ISR" />
|
||||
</td>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="CheckRefacturado" runat="server" Text=" Refacturado" />
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkImpLoc" runat="server" Text=" Impuestos Locales" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkImpLoc" runat="server" Text=" Impuestos Locales" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCredito" runat="server" Text=" Crédito" />
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text=" *Total" />
|
||||
</td>
|
||||
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text=" *Total" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkContado" runat="server" Text=" Contado" />
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
|
||||
|
||||
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text=" *IEPS" Visible="false" />
|
||||
</td>
|
||||
<td style="text-align: left;"></td>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@@ -560,7 +560,7 @@
|
||||
<div class="modal-footer">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="text-align: left">
|
||||
<div class="col-md-6" style="text-align:left">
|
||||
<asp:CheckBox ID="ChkGuardarPersonalizacion" runat="server" Text=" Guarda Personalización" TextAlign="Right" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
@@ -737,108 +737,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="DivModalSabana" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<asp:UpdatePanel runat="server" ID="UpModalSabana" UpdateMode="Conditional" class="modal-content">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label5" runat="server" ClientIDMode="Static" Text="Ventas por código"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-2">Proveedor:</div>
|
||||
<div class="col-md-10">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
Código PS Inicio:
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtCodI" runat="server" CssClass="form-control input-sm" Width="85px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
Código PS Final:
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtCodF" runat="server" CssClass="form-control input-sm" Width="85px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-4 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-8" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="85px" ID="TxtFechaISabana" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaISabana" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEESabanaI" runat="server" TargetControlID="TxtFechaISabana" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaISabana" TargetControlID="TxtFechaISabana" PopupButtonID="LnkFechaISabana" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVSabanaI" runat="server" ControlToValidate="TxtFechaISabana" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="RepSabana"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVSabanaI" runat="server" ControlToValidate="TxtFechaISabana" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="RepSabana"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RFVSabanaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CVSabanaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-4 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-8" style="min-width: 115px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="85px" ID="TxtFechaFSabana" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaFSabana" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MESabanaF" runat="server" TargetControlID="TxtFechaFSabana" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaFSabana" TargetControlID="TxtFechaFSabana" PopupButtonID="LnkFechaFSabana" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVSanabaF" runat="server" ControlToValidate="TxtFechaFSabana" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="RepSabana"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVSabanaF" runat="server" ControlToValidate="TxtFechaFSabana" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="RepSabana"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender7" runat="server" HighlightCssClass="vco" TargetControlID="RFVSanabaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="CVSabanaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGenerarSabana" runat="server" CssClass="btn btn-success" Text="Generar" OnClick="BtnGenerarSabana_Click" ValidationGroup="RepSabana" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="BtnGenerarSabana" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
|
||||
@@ -5,7 +5,6 @@ Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Xml
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
Partial Class Ventas_RepVentas
|
||||
Inherits ClsPaginas
|
||||
@@ -111,16 +110,6 @@ Partial Class Ventas_RepVentas
|
||||
Opcion = "-1"
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.TienePermisoProceso(386) Then
|
||||
LiSabana.Visible = True
|
||||
|
||||
DdlProveedores.setEsWebService(True)
|
||||
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedores.SelectedText = "Todos"
|
||||
DdlProveedores.SelectedValue = "-1"
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 72 AndAlso UsuarioActual.CveUsuario.Contiene(100, 1614, 1517) Then
|
||||
liRepHP.Visible = True
|
||||
End If
|
||||
@@ -253,10 +242,7 @@ Partial Class Ventas_RepVentas
|
||||
DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
TxtFechaISabana.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||
TxtFechaFSabana.Text = NowADS().ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1115,52 +1101,4 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnGenerarSabana_Click(sender As Object, e As EventArgs)
|
||||
Dim DtExcel As DataTable = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetSabanaE189(UsuarioActual.CveEmpresa, TxtFechaISabana.Text.ToDate(), TxtFechaFSabana.Text.ToDate(), DdlProveedores.SelectedValue.ToEntero(), TxtCodI.Text.Trim(), TxtCodF.Text.Trim()) Then
|
||||
DtExcel = ObjVentas.DtResultados.Copy()
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DtExcel IsNot Nothing Then
|
||||
|
||||
'DtExcel.Columns("Codigo").ColumnName = "Código"
|
||||
'DtExcel.Columns("PS").ColumnName = "Producto / Servicio"
|
||||
'DtExcel.Columns("NumeroParte").ColumnName = "Número de parte"
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(578) = "1" Or UsuarioActual.Empresa.Funcionalidad(531) = "1" Or UsuarioActual.Empresa.Funcionalidad(382) = "1" Then '
|
||||
' If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
' DtExcel.Columns("Número de parte").ColumnName = "Código CPK"
|
||||
' End If
|
||||
'Else
|
||||
' DtExcel.Columns.Remove("Número de parte")
|
||||
'End If
|
||||
|
||||
DtExcel.TableName = "Sabana"
|
||||
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim FileExcel As New ExcelFile()
|
||||
|
||||
Dim worksheet As ExcelWorksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0,
|
||||
.StartColumn = 0
|
||||
})
|
||||
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
|
||||
For i As Integer = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
|
||||
FileExcel.Save(Response, "Sabana.xlsx", SaveOptions.XlsxDefault)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user