-- reporte de vencimientos
This commit is contained in:
@@ -161,6 +161,7 @@ Public Class ClsClientes
|
||||
Public Property CveAlmacenAlterno As Integer = -1
|
||||
Public Property CveAlmacenConsignacion As Integer = -1
|
||||
Public Property UsaProductoAlterno As Boolean = False
|
||||
Public Property CreditoRegistroFirmas As String
|
||||
Public Property EnDemanda As Boolean = False
|
||||
Public Property EnQuebranto As Boolean = False
|
||||
Public Property GastosEnvio As Decimal = 0
|
||||
@@ -416,8 +417,9 @@ Public Class ClsClientes
|
||||
_CveAlmacenConsignacion = Data(0)("CveAlmacenConsignacion").ToString.ToEntero
|
||||
|
||||
_UsaProductoAlterno = CBool(Data(0)("UsaProductoAlterno"))
|
||||
_EnDemanda = CBool(Data(0)("UsaProductoAlterno"))
|
||||
_EnDemanda = CBool(Data(0)("EnDemanda"))
|
||||
_EnQuebranto = CBool(Data(0)("EnQuebranto"))
|
||||
_CreditoRegistroFirmas = Data(0)("CreditoRegistroFirmas").ToString
|
||||
_GastosEnvio = Data(0)("GastosEnvio").ToString.ToDecimal
|
||||
|
||||
End If
|
||||
@@ -537,7 +539,7 @@ Public Class ClsClientes
|
||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||
Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
||||
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
||||
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional GastosEnvio As Decimal = 0) As Boolean
|
||||
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
|
||||
@@ -671,6 +673,7 @@ Public Class ClsClientes
|
||||
.Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno
|
||||
.Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda
|
||||
.Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto
|
||||
.Add("@CreditoRegistroFirmas", SqlDbType.VarChar).Value = CreditoRegistroFirmas
|
||||
.Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio
|
||||
End With
|
||||
Try
|
||||
@@ -718,7 +721,7 @@ Public Class ClsClientes
|
||||
Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1",
|
||||
Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False,
|
||||
Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha, Optional ComExtCalle As String = "-1", Optional ComExtNumExt As String = "-1", Optional ComExtCP As String = "-1", Optional Genero As Boolean = True, Optional CveAlmacenAsignado As Integer = -1, Optional CveAlmacenAlterno As Integer = -1, Optional CveAlmacenConsignacion As Integer = -1, Optional UsaProductoAlterno As Boolean = False,
|
||||
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional GastosEnvio As Decimal = 0) As Boolean
|
||||
Optional EnDemanda As Boolean = False, Optional EnQuebranto As Boolean = False, Optional CreditoRegistroFirmas As String = "", Optional GastosEnvio As Decimal = 0) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -862,6 +865,7 @@ Public Class ClsClientes
|
||||
.Add("@UsaProductoAlterno", SqlDbType.Bit).Value = UsaProductoAlterno
|
||||
.Add("@EnDemanda", SqlDbType.Bit).Value = EnDemanda
|
||||
.Add("@EnQuebranto", SqlDbType.Bit).Value = EnQuebranto
|
||||
.Add("@CreditoRegistroFirmas", SqlDbType.VarChar).Value = CreditoRegistroFirmas
|
||||
.Add("@GastosEnvio", SqlDbType.SmallMoney).Value = GastosEnvio
|
||||
End With
|
||||
Try
|
||||
|
||||
@@ -541,6 +541,9 @@
|
||||
<asp:BoundField HeaderText="SubTotal Pend" DataField="SubTotalPendiente" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" Visible="false" />
|
||||
<asp:BoundField HeaderText="IVA Pend" DataField="IVAPendiente" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" Visible="false" />
|
||||
<asp:BoundField HeaderText="IEPS Pend" DataField="IEPSPendiente" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" Visible="false" />
|
||||
<asp:BoundField HeaderText="En Quebranto" DataField="EnQuebranto" Visible="false" />
|
||||
<asp:BoundField HeaderText="En Demanda" DataField="EnDemanda" Visible="false" />
|
||||
<asp:BoundField HeaderText="Reg. Firmas" DataField="CreditoRegistroFirmas" Visible="false" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -684,6 +687,15 @@
|
||||
<asp:CheckBox ID="ChkIEPSPend" runat="server" Text=" IEPS Pendiente" Checked="false" /></td>
|
||||
<td style="text-align: left;"></td>
|
||||
</tr>
|
||||
<tr runat="server" id="trEnquebranto" visible="false">
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEnQuebranto" runat="server" Text=" En Quebranto" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEnDemanda" runat="server" Text=" En Demanda" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRegistroFirmas" runat="server" Text=" Registro Firmas " Checked="false" /></td>
|
||||
<td style="text-align: left;"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -419,10 +419,12 @@ Partial Class RepCxCDetalle
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146, 119) Then ChkAnticipos.Visible = True
|
||||
|
||||
|
||||
DdlTieneLineaAdicional.SelectedValueExist(If(Request("TieneLineaAdicional") IsNot Nothing, Request("TieneLineaAdicional").ToString, "-1").ToString)
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
divLineaAdicional1.Visible = True
|
||||
divLineaAdicional2.Visible = True
|
||||
trEnquebranto.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 13 Then
|
||||
@@ -629,6 +631,9 @@ Partial Class RepCxCDetalle
|
||||
ActivaColumna(48, ChkSubTotalPend.Checked)
|
||||
ActivaColumna(49, ChkIVAPend.Checked)
|
||||
ActivaColumna(50, ChkIEPSPend.Checked)
|
||||
ActivaColumna(51, ChkEnQuebranto.Checked)
|
||||
ActivaColumna(52, ChkEnDemanda.Checked)
|
||||
ActivaColumna(53, ChkRegistroFirmas.Checked)
|
||||
|
||||
If SePersonalizo = 1 Then
|
||||
ImgExcelPersonalizado.Visible = True
|
||||
|
||||
@@ -4576,10 +4576,7 @@
|
||||
</div>--%>
|
||||
|
||||
<br />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -4618,15 +4615,28 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-2" >
|
||||
<asp:CheckBox ID="ChkEnQuebranto" runat="server" Text="En Quebranto" />
|
||||
</div>
|
||||
<div class="col-md-2" >
|
||||
<asp:CheckBox ID="ChkEnDemanda" runat="server" Text="En Demanda" />
|
||||
</div>
|
||||
<label class="col-md-1 " style="width: 120px; text-align: right">Registro Firmas:</label>
|
||||
<div class="col-md-2" style="width: 250px">
|
||||
<asp:TextBox ID="TxtNombreFirmas" runat="server" Width="250px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ">
|
||||
<div class=" col-md-12" style="text-align: right!important">
|
||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
|
||||
@@ -4669,10 +4679,7 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -1699,8 +1699,11 @@ Partial Class Clientes
|
||||
' ActivarRegistroAutomatico()
|
||||
'End If
|
||||
|
||||
|
||||
'7eleven
|
||||
ChkEnQuebranto.Checked = ObjClientes.EnQuebranto
|
||||
ChkEnDemanda.Checked = ObjClientes.EnDemanda
|
||||
TxtNombreFirmas.Text = ObjClientes.CreditoRegistroFirmas
|
||||
|
||||
'7eleven
|
||||
TxtProveedor.Text = ObjClientes.SevenEleven_NumProveedor
|
||||
|
||||
'FORD
|
||||
@@ -2668,7 +2671,8 @@ Partial Class Clientes
|
||||
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
|
||||
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
|
||||
NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
|
||||
Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked) Then
|
||||
Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, CveAlmacenAlterno:=DdlAlmacenAlterno.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked,
|
||||
EnQuebranto:=ChkEnQuebranto.Checked, EnDemanda:=ChkEnDemanda.Checked, CreditoRegistroFirmas:=TxtNombreFirmas.Text.Trim) Then
|
||||
|
||||
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then
|
||||
ErrorProceso = True
|
||||
|
||||
@@ -77,13 +77,12 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" >Estatus:</div>
|
||||
<div class="col-md-1 truncate" >Tipo Linea:</div>
|
||||
<div class="col-md-1 ">
|
||||
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<%--<asp:ListItem Text="Registrado" Value="0" ></asp:ListItem> --%>
|
||||
<asp:ListItem Text="Pendiente" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
|
||||
<asp:DropDownList runat="server" ID="DdlTipoLinea" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Pagaré Especial" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="PO" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" runat="server" id="DVAgrupador1" visible="false">Agrupador:</div>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
@@ -66,17 +64,15 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
InicializaValores();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
txtFechaI.Text = NowADS().AddMonths(-1).FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = NowADS().LastDayOfMonth().ToShortDateString();
|
||||
|
||||
DdlClientes.setEsWebService(true);
|
||||
|
||||
DdlClientes.setEsWebService(true);
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
DdlClientes.SelectedValue = "-1";
|
||||
DdlClientes.SelectedText = "Todos";
|
||||
DdlClientes.SelectedValue = "-1";
|
||||
}
|
||||
@@ -89,7 +85,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
private void CargaDatos()
|
||||
{
|
||||
DTDatosGvD = new DataTable();
|
||||
LnkDescargaExcel.Visible = false;
|
||||
LnkDescargaExcel.Visible = false;
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
|
||||
@@ -104,99 +100,17 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
|
||||
UpAcciones.Update();
|
||||
}
|
||||
}
|
||||
objVentas.Dispose();
|
||||
GvD.DataBind();
|
||||
UpLineasAdicionales.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkCargarComprobante_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow) ((LinkButton) sender).NamingContainer;
|
||||
|
||||
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
||||
CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
|
||||
LineaAdicionalComprobante = GvRow.DataKey("LineaAdicionalComprobante").ToString();
|
||||
|
||||
objVentas.Dispose();
|
||||
GvD.DataBind();
|
||||
UpLineasAdicionales.Update();
|
||||
|
||||
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(TipoLinea == 1)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridView gvTemp = GvD;
|
||||
//gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString());
|
||||
gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150);
|
||||
}
|
||||
}
|
||||
|
||||
//gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString());
|
||||
gvTemp.ExportToExcelGembox("RepVencimientos", UsuarioActual, "Rep Vencimientos de líneas", AnchoImagen: 150);
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
|
||||
}
|
||||
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
|
||||
LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante");
|
||||
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
||||
|
||||
if (e.Row.DataKey("CveLineaAdicional")=="")
|
||||
{
|
||||
if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "")
|
||||
{
|
||||
e.Row.CssClass = "SubTotales2";
|
||||
if (e.Row.DataKey("CveLineaAdicional") == "" && e.Row.DataKey("CveCliente") == "" && e.Row.DataKey("CveProveedor") != "")
|
||||
{
|
||||
e.Row.Cells[0].Text = "<a href='/Compras/Proveedores.aspx?CveProveedor="+ e.Row.DBCampo("CveProveedor") + "' >"+ e.Row.DBCampo("Proveedor") +"</a>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.CssClass = "SubTotales";
|
||||
}
|
||||
LnkCambiarEstatus.Visible = false;
|
||||
LnkCargarComprobante.Visible = false;
|
||||
LnkDescargaComprobante.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e.Row.DataKey("CveVenta").ToEntero() > 0 && e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 1)
|
||||
{
|
||||
|
||||
if (UsuarioActual.TienePermisoProceso(356)) LnkCambiarEstatus.Visible = true;
|
||||
LnkCargarComprobante.Visible = true;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("LineaAdicionalComprobante").Length > 0 && e.Row.DataKey("CveVenta").ToEntero() > 0)
|
||||
{
|
||||
FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("LineaAdicionalComprobante")}");
|
||||
|
||||
if (fi.Exists)
|
||||
{
|
||||
LnkDescargaComprobante.Visible = true;
|
||||
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkDescargaComprobante_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
string Comprobante = GvRow.DataKey("LineaAdicionalComprobante");
|
||||
FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{Comprobante}");
|
||||
|
||||
if (fi.Exists)
|
||||
{
|
||||
Response.Clear();
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + fi.Name);
|
||||
Response.AddHeader("Content-Length", fi.Length.ToString());
|
||||
Response.ContentType = "text/octet-stream";
|
||||
Response.Flush();
|
||||
Response.TransmitFile(fi.FullName);
|
||||
Response.End();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user