- cambios en función de cambios estatus/comprobante
This commit is contained in:
@@ -5606,13 +5606,15 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateVentaLineaAdicional(CveLineaAdicional As Integer, CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
Public Function UpdateVentaLineaAdicional(CveLineaAdicional As Integer, CveVenta As Integer, LineaAdicionalComprobante As String, CveLineaAdicionalEstatus As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_LineasAdicionalesVentaUpdate")
|
DataAdapter("PA_Vta_LineasAdicionalesVentaUpdate")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@LineaAdicionalComprobante", SqlDbType.VarChar).Value = LineaAdicionalComprobante
|
||||||
|
.Add("@CveLineaAdicionalEstatus", SqlDbType.Int).Value = CveLineaAdicionalEstatus
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -128,14 +128,14 @@
|
|||||||
OnRowCommand="GvLAPO_RowCommand"
|
OnRowCommand="GvLAPO_RowCommand"
|
||||||
OnRowDataBound="GvLAPO_RowDataBound">
|
OnRowDataBound="GvLAPO_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Agrupador" HeaderText="Agrupador" />
|
<asp:HyperLinkField DataTextField="Agrupador" HeaderText="Agrupador" />
|
||||||
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
|
<asp:BoundField DataField="LineaAdicional" HeaderText="PO" />
|
||||||
<asp:BoundField DataField="Importe" HeaderText="Importe PO" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="Importe" HeaderText="Importe PO" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="Abreviatura" HeaderText="Mon" />
|
<asp:BoundField DataField="Abreviatura" HeaderText="Mon" />
|
||||||
|
|
||||||
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
|
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
|
||||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="DiasVencimiento" HeaderText="D.Plazo" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="DiasTranscurridos" HeaderText="D.Trans" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="DiasTranscurridos" HeaderText="D.Trans" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="FechaVenta" HeaderText="F. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="FechaVenta" HeaderText="F. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField DataField="FechaVencimientoVenta" HeaderText="F. Venc. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="FechaVencimientoVenta" HeaderText="F. Venc. Venta" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
|||||||
@@ -196,7 +196,6 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
string FileExtension = "-1";
|
string FileExtension = "-1";
|
||||||
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
||||||
string filemove = "";
|
string filemove = "";
|
||||||
FileInfo fiNuevo;
|
|
||||||
FileInfo fiNuevo;
|
FileInfo fiNuevo;
|
||||||
|
|
||||||
DirectoryInfo df = new DirectoryInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\");
|
DirectoryInfo df = new DirectoryInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\");
|
||||||
@@ -247,12 +246,10 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
{
|
{
|
||||||
fiNuevo = new FileInfo(RutaArchivoTemp);
|
fiNuevo = new FileInfo(RutaArchivoTemp);
|
||||||
|
|
||||||
if (fiNuevo.Exists)
|
|
||||||
if (fiNuevo.Exists)
|
if (fiNuevo.Exists)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (File.Exists($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"))
|
|
||||||
if (File.Exists($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"))
|
if (File.Exists($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"))
|
||||||
{
|
{
|
||||||
File.Delete($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}");
|
File.Delete($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}");
|
||||||
@@ -264,7 +261,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
{
|
{
|
||||||
errorCargaComprobante = true;
|
errorCargaComprobante = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!errorCargaComprobante)
|
if (!errorCargaComprobante)
|
||||||
{
|
{
|
||||||
ClsVentas objVentas = new ClsVentas();
|
ClsVentas objVentas = new ClsVentas();
|
||||||
@@ -279,23 +276,22 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!errorCargaComprobante)
|
if (!errorCargaComprobante)
|
||||||
{
|
{
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
Anexo.Text = "[]";
|
|
||||||
Anexo.Text = "[]";
|
Anexo.Text = "[]";
|
||||||
RegistraScript("$('#ModalComprobante').modal('hide');", "");
|
RegistraScript("$('#ModalComprobante').modal('hide');", "");
|
||||||
Alert("Comprobante actualizado correctamente.");
|
Alert("Comprobante actualizado correctamente.");
|
||||||
}
|
}
|
||||||
UpAddComprobancte.Update();
|
UpAddComprobancte.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||||
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToEntero();
|
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToEntero();
|
||||||
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
int CveVenta = GvRow.DataKey("CveVenta").ToEntero();
|
||||||
|
|
||||||
bool errorCambioEstatus = false;
|
bool errorCambioEstatus = false;
|
||||||
|
|
||||||
ClsVentas objVentas = new ClsVentas();
|
ClsVentas objVentas = new ClsVentas();
|
||||||
|
|
||||||
@@ -322,11 +318,8 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
}
|
}
|
||||||
else if(TipoLinea == 2)
|
else if(TipoLinea == 2)
|
||||||
{
|
{
|
||||||
GridView gvTemp = GvLAPO;
|
|
||||||
GridView gvTemp = GvLAPO;
|
GridView gvTemp = GvLAPO;
|
||||||
gvTemp.Columns[8].Visible = false;
|
gvTemp.Columns[8].Visible = false;
|
||||||
}
|
|
||||||
|
|
||||||
gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
|
gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,7 +329,6 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
{
|
{
|
||||||
|
|
||||||
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
|
|
||||||
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
|
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
|
||||||
LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante");
|
LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante");
|
||||||
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
||||||
@@ -355,7 +347,8 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
|||||||
LnkCargarComprobante.Visible = false;
|
LnkCargarComprobante.Visible = false;
|
||||||
LnkDescargaComprobante.Visible = false;
|
LnkDescargaComprobante.Visible = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
if (e.Row.DataKey("CveVenta").ToEntero() > 0 && e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 1)
|
if (e.Row.DataKey("CveVenta").ToEntero() > 0 && e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user