Cambios Importaciones Exportacion PDF
This commit is contained in:
@@ -5,8 +5,10 @@
|
|||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
Exportación:
|
<span>
|
||||||
<asp:Label runat="server" Text="Exportación" ID="LblExp"></asp:Label>
|
<asp:Label runat="server" ID="LblTipoOperacion"></asp:Label>
|
||||||
|
<asp:Label runat="server" ID="LblCveExportacion"></asp:Label>
|
||||||
|
</span>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
<li id="liImprimir" runat="server">
|
<li id="liImprimir" runat="server">
|
||||||
|
|||||||
@@ -56,16 +56,13 @@ public partial class Export_ExpDetalle : ClsPaginas
|
|||||||
|
|
||||||
LblTipoExp.InnerText = EsImportacion ? "Tipo Importación:" : "Tipo Exportación:";
|
LblTipoExp.InnerText = EsImportacion ? "Tipo Importación:" : "Tipo Exportación:";
|
||||||
|
|
||||||
if (EsImportacion)
|
// Asigna el texto descriptivo
|
||||||
{
|
LblTipoOperacion.Text = EsImportacion ? "Importación: " : "Exportación: ";
|
||||||
LblExp.Text = "Importaciones";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LblExp.Text = "Exportación";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Asigna el número de clave
|
||||||
CveExportacion = !string.IsNullOrEmpty(Request["CveExportacion"]) ? Request["CveExportacion"].ToEntero() : -1;
|
CveExportacion = !string.IsNullOrEmpty(Request["CveExportacion"]) ? Request["CveExportacion"].ToEntero() : -1;
|
||||||
|
LblCveExportacion.Text = CveExportacion > 0 ? CveExportacion.ToString() : "";
|
||||||
|
|
||||||
InicializarValores();
|
InicializarValores();
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
}
|
}
|
||||||
@@ -152,7 +149,7 @@ public partial class Export_ExpDetalle : ClsPaginas
|
|||||||
DTExportaciones = Exportaciones.DtResultados;
|
DTExportaciones = Exportaciones.DtResultados;
|
||||||
if (DTExportaciones.Rows.Count > 0)
|
if (DTExportaciones.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
LblExp.Text = DTExportaciones.FiltroPrimeroValor("CveExportacion");
|
LblCveExportacion.Text = DTExportaciones.FiltroPrimeroValor("CveExportacion");
|
||||||
|
|
||||||
DdlSubProyecto.SelectedValue = DTExportaciones.FiltroPrimeroValor("CveSubProyecto");
|
DdlSubProyecto.SelectedValue = DTExportaciones.FiltroPrimeroValor("CveSubProyecto");
|
||||||
|
|
||||||
@@ -1031,7 +1028,9 @@ public partial class Export_ExpDetalle : ClsPaginas
|
|||||||
int CveEmpresa = UsuarioActual.CveEmpresa;
|
int CveEmpresa = UsuarioActual.CveEmpresa;
|
||||||
DataTable DTExportaciones = new DataTable();
|
DataTable DTExportaciones = new DataTable();
|
||||||
ClsExportaciones Exportaciones = new ClsExportaciones();
|
ClsExportaciones Exportaciones = new ClsExportaciones();
|
||||||
if (Exportaciones.GetExportacion(CveExportacion, CveEmpresa))
|
|
||||||
|
bool EsExportacion = !EsImportacion;
|
||||||
|
if (Exportaciones.GetExportacion(CveExportacion, CveEmpresa, EsExportacion))
|
||||||
{
|
{
|
||||||
DTExportaciones = Exportaciones.DtResultados;
|
DTExportaciones = Exportaciones.DtResultados;
|
||||||
if (DTExportaciones.Rows.Count > 0)
|
if (DTExportaciones.Rows.Count > 0)
|
||||||
@@ -1227,14 +1226,24 @@ public partial class Export_ExpDetalle : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string NombreArchivo = $"Exportacion_{CveExportacion}";
|
string NombreArchivo;
|
||||||
|
string Formato;
|
||||||
|
|
||||||
|
if (EsExportacion)
|
||||||
|
{
|
||||||
|
NombreArchivo = $"Exportacion_{CveExportacion}";
|
||||||
|
Formato = "FormatoExportacion.mrt";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NombreArchivo = $"Importacion_{CveExportacion}";
|
||||||
|
Formato = "FormatoImportacion.mrt";
|
||||||
|
}
|
||||||
string CveVenta = DTExportaciones.FiltroPrimeroValor("CveVenta"); ;
|
string CveVenta = DTExportaciones.FiltroPrimeroValor("CveVenta"); ;
|
||||||
if (CveVenta != "" && CveVenta != "-1")
|
if (EsExportacion && CveVenta != "" && CveVenta != "-1")
|
||||||
{
|
{
|
||||||
NombreArchivo = NumFactura;
|
NombreArchivo = NumFactura;
|
||||||
}
|
}
|
||||||
|
|
||||||
string Formato = "FormatoImportacion.mrt";
|
|
||||||
para.Add(new ReportParameter("Formato", "PDF"));
|
para.Add(new ReportParameter("Formato", "PDF"));
|
||||||
string Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\{UsuarioActual.CveEmpresa}\Formatos\{Formato}";
|
string Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\{UsuarioActual.CveEmpresa}\Formatos\{Formato}";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user