This commit is contained in:
JPerez
2025-07-08 17:33:28 -07:00
9 changed files with 1243 additions and 1031 deletions

View File

@@ -1518,7 +1518,7 @@ Partial Class Compras_eFacturas
If dt IsNot Nothing Then
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}Logo.png")
Dim params As New List(Of ReportParameter)
@@ -1529,7 +1529,7 @@ Partial Class Compras_eFacturas
params.Add(New ReportParameter("FechaImpresion", Fecha.ToDateTime.ToShortDateString))
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", $"file//:{Imagen.FullName}"))
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else
params.Add(New ReportParameter("LogoPath", ""))
End If

File diff suppressed because it is too large Load Diff

View File

@@ -70,14 +70,26 @@
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 150px;">
<asp:TextBox ID="TxtNumPed" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
ClearMaskOnLostFocus="false"
<ajaxToolkit:MaskedEditExtender
ID="meeTxtPedimento"
runat="server"
TargetControlID="TxtNumPed"
Mask="99--99--9999--9999999"
MaskType="Number"
MaskType="None"
ClearMaskOnLostFocus="false"
InputDirection="LeftToRight"
AcceptNegative="None"
ErrorTooltipEnabled="True" />
<asp:CustomValidator
ID="cvNumPed"
runat="server"
ControlToValidate="TxtNumPed"
ErrorMessage="El número de pedimento está incompleto o tiene un formato incorrecto."
ForeColor="Red"
Display="Dynamic"
ValidationGroup="GrpGuardar"
ClientValidationFunction="validaPedimento" />
<label for="<%= TxtNumPed.ClientID.ToString()%>" style="margin: 0; white-space: nowrap;">Número de Pedimento:</label>
</div>
<table>
@@ -132,6 +144,14 @@
<asp:TextBox ID="TxtTipoCambio" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTETipoCambio" runat="server" TargetControlID="TxtTipoCambio" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtTipoCambio.ClientID.ToString()%>">Tipo de Cambio:</label>
<asp:RequiredFieldValidator
ID="RFVTipoCambio"
runat="server"
ControlToValidate="TxtTipoCambio"
ErrorMessage="El tipo de cambio es obligatorio."
Display="Dynamic"
ForeColor="Red"
ValidationGroup="GrpGuardar" />
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 150px;">
<asp:DropDownList ID="DdlIncoterm" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATIncotermDescripcion" DataValueField="CveIncoterm"></asp:DropDownList>
@@ -842,5 +862,12 @@
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
<script type="text/javascript">
function validaPedimento(sender, args) {
// Regex: 2 dígitos, --, 2 dígitos, --, 4 dígitos, --, 7 dígitos
var regex = /^\d{2}--\d{2}--\d{4}--\d{7}$/;
args.IsValid = regex.test(args.Value);
}
</script>
</asp:Content>

View File

@@ -1010,7 +1010,9 @@ public partial class Export_ExpDetalle : ClsPaginas
DataRow RowExp = DTExportaciones.Rows[0];
string ClienteExportador = DTExportaciones.FiltroPrimeroValor("ClienteExportador");
string DirExportador = DTExportaciones.FiltroPrimeroValor("DirExportador");
string RFCExp = DTExportaciones.FiltroPrimeroValor("RFCExp");
string ClienteImportador = DTExportaciones.FiltroPrimeroValor("ClienteImportador");
string DirImportador = DTExportaciones.FiltroPrimeroValor("DirImportador");
string RFCImp = DTExportaciones.FiltroPrimeroValor("RFCImp");
string IMMEXimp = DTExportaciones.FiltroPrimeroValor("IMMEXimp");
string NumFactura = DTExportaciones.FiltroPrimeroValor("SerieFolio");
@@ -1056,6 +1058,7 @@ public partial class Export_ExpDetalle : ClsPaginas
decimal TotalInc = 0.00m;
decimal TotalDec = 0.00m;
string DescContenedor = DTExportaciones.FiltroPrimeroValor("DescripcionContenedor");
string ContenedorPlaca = DTExportaciones.FiltroPrimeroValor("ContenedorPlaca");
string Proveedor = DTExportaciones.FiltroPrimeroValor("Proveedor");
string SCAC = DTExportaciones.FiltroPrimeroValor("SCAC");
@@ -1073,7 +1076,9 @@ public partial class Export_ExpDetalle : ClsPaginas
para.Add(new ReportParameter("CveExportacion", CveExportacion.ToString()));
para.Add(new ReportParameter("ClienteExportador", ClienteExportador));
para.Add(new ReportParameter("DirExportador", DirExportador));
para.Add(new ReportParameter("RFCExp", RFCExp));
para.Add(new ReportParameter("ClienteImportador", ClienteImportador));
para.Add(new ReportParameter("DirImportador", DirImportador));
para.Add(new ReportParameter("RFCImp", RFCImp));
para.Add(new ReportParameter("IMMEXimp", IMMEXimp));
para.Add(new ReportParameter("NumFactura", NumFactura));
@@ -1125,6 +1130,7 @@ public partial class Export_ExpDetalle : ClsPaginas
para.Add(new ReportParameter("DecOtros", DecOtros.ToString("#,###.####")));
para.Add(new ReportParameter("TotalDec", TotalDec.ToString("#,###.####")));
para.Add(new ReportParameter("DescContenedor", DescContenedor));
para.Add(new ReportParameter("ContenedorPlaca", ContenedorPlaca));
para.Add(new ReportParameter("Proveedor", Proveedor));
para.Add(new ReportParameter("SCAC", SCAC));

View File

@@ -53,6 +53,21 @@
width: 100%;
height: 500px;
}
#<%= GVExportaciones.ClientID %> .btn,
#<%= GVExportaciones.ClientID %> .btn-circle {
display: inline-block !important;
width: auto !important;
min-width: 0 !important;
max-width: none !important;
vertical-align: middle !important;
margin-bottom: 0 !important;
margin-right: 4px;
float: none !important;
clear: none !important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
@@ -148,11 +163,11 @@
</asp:UpdatePanel>
<asp:UpdatePanel ID="upDatosExp" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GVExportaciones" runat="server" data-sort="true" AutoGenerateColumns="False" DataKeyNames="CveExportacion" Width="100%" EmptyDataText="No se encontraron Exportaciones" ToolTip="Exportaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
<asp:GridView ID="GVExportaciones" runat="server" data-sort="true" AutoGenerateColumns="False" DataKeyNames="CveExportacion" Width="100%" EmptyDataText="No se encontraron Exportaciones" ToolTip="Exportaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None" OnRowDataBound="GVExportaciones_RowDataBound" OnRowCreated="GVExportaciones_RowCreated">
<Columns>
<asp:TemplateField HeaderText="Exportación" ItemStyle-HorizontalAlign="Left">
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:HyperLink ID="HlExpDetalle" runat="server" Text='<%# Eval("CveExportacion") %>' NavigateUrl='<%# Eval("CveExportacion", "ExpDetalle.aspx?CveExportacion={0}") %>'>></asp:HyperLink>
<asp:HyperLink ID="HlExpDetalle" runat="server" Text='<%# Eval("CveExportacion") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="Fecha de Ingreso" DataFormatString="{0:d}" />
@@ -224,14 +239,28 @@
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<asp:TemplateField HeaderText="Acciones" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="120px">
<ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="EditarExp_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<ItemTemplate>
<asp:LinkButton ID="LnkEliminar" runat="server" OnClick="EliminarExp_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la Exportación?" data-btn-ok-label="Sí" />
<span style="white-space: nowrap;">
<asp:HyperLink
ID="HlEditar"
runat="server"
CssClass="btn btn-circle btn-sm green"
Text="<i class='fa fa-pencil'></i>"
ToolTip="Editar">
</asp:HyperLink>
&nbsp;
<asp:LinkButton
ID="LnkEliminar"
runat="server"
OnClick="EliminarExp_Click"
CssClass="btn btn-circle btn-sm red"
Text="<i class='icon-trash'></i>"
data-toggle="confirmation"
data-popout="true"
data-original-title="¿Está seguro que desea eliminar la Exportación?"
data-btn-ok-label="Sí" />
</span>
</ItemTemplate>
</asp:TemplateField>
</Columns>

View File

@@ -28,7 +28,7 @@ public partial class Export_RepExportaciones : ClsPaginas
private bool EsImportacion
{
get{ return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); }
get { return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); }
set { ViewState["EsImportacion"] = value; }
}
public string EmptyDataTextPersonalizado { get; set; }
@@ -43,7 +43,7 @@ public partial class Export_RepExportaciones : ClsPaginas
if (Request["Opcion"] != null)
{
if (Request["Opcion"] == "I")
EsImportacion = true;
EsImportacion = true;
}
Page.Title = EsImportacion ? "Importaciones" : "Exportaciones";
@@ -86,7 +86,7 @@ public partial class Export_RepExportaciones : ClsPaginas
}
protected void CargaExportaciones()
{
bool EsExportacion = !EsImportacion;
string SubProyectos = DdlSubProyecto.GetSelectedValuesM();
SubProyectos = SubProyectos == "" ? "-1" : SubProyectos;
@@ -125,4 +125,76 @@ public partial class Export_RepExportaciones : ClsPaginas
Alert("La Exportación se ha eliminado correctamente.");
}
}
}
protected void GVExportaciones_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
var dataItem = (System.Data.DataRowView)e.Row.DataItem;
int cveExportacion = Convert.ToInt32(dataItem["CveExportacion"]);
HyperLink hl = (HyperLink)e.Row.FindControl("HlExpDetalle");
// Usa la bandera EsImportacion de la página
if (EsImportacion)
hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}&Opcion=I";
else
hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}";
// EDITAR
HyperLink hlEditar = (HyperLink)e.Row.FindControl("HlEditar");
if (EsImportacion)
hlEditar.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}&Opcion=I";
else
hlEditar.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}";
// Tipo Exportación
Label lblTipoExp = (Label)e.Row.FindControl("lblTipoExp");
if (lblTipoExp != null)
{
string valor = dataItem["TipoExportacion"].ToString();
switch (valor)
{
case "1":
lblTipoExp.Text = "(IMP) Importación";
break;
case "2":
lblTipoExp.Text = "(EXP) Exportación/retorno";
break;
case "3":
lblTipoExp.Text = "(TRA) Tránsitos";
break;
default:
lblTipoExp.Text = "Desconocido";
break;
}
}
// Estatus
Label lblEstatus = (Label)e.Row.FindControl("lblEstatus");
if (lblEstatus != null)
{
string valor = dataItem["CveExportacionEstatus"].ToString();
switch (valor)
{
case "1":
lblEstatus.Text = "Tránsito";
break;
case "2":
lblEstatus.Text = "Completa";
break;
default:
lblEstatus.Text = "Desconocido";
break;
}
}
}
}
protected void GVExportaciones_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Header)
{
// Cambia el texto del primer encabezado (ajusta el índice si no es la primera columna)
e.Row.Cells[0].Text = EsImportacion ? "Importación" : "Exportación";
}
}
}

View File

@@ -9814,26 +9814,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
script = string.Format("Savexml(\"{0} {1}.xml\", $('.ltlxml').html());", Xmlname, empleado);
//System.IO.FileInfo file = new System.IO.FileInfo(PathXML);
//string mimeType = "text/plain";
//try
//{
// mimeType = MimeMapping.GetMimeMapping(PathXML);
//}
//catch (Exception)
//{
//}
//// Response.Write(path)
//Response.Clear();
//Response.ClearHeaders();
//Response.ClearContent();
//Response.AddHeader("Content-Disposition", $"attachment; filename= {Uri.EscapeDataString(file.Name)}");
//Response.AddHeader("Content-Length", file.Length.ToString());
//Response.ContentType = mimeType;
//Response.Flush();
//Response.TransmitFile(file.FullName);
//Response.End();
}
if (!string.IsNullOrEmpty(PathXMLF) && System.IO.File.Exists(PathXMLF))
{

View File

@@ -4,10 +4,6 @@
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
/* .GVGetMovtoPermanenteRep .headerHide:not(Titulos) th:nth-child(2) {
display: none;
}
*/
.GVGetMovtoPermanenteRep tr:not(.cvetipo0) td .btnhideshow {
display: none;
}
@@ -16,13 +12,6 @@
background-color: #ddd;
}
/*.GVGetMovtoPermanenteRep tr:not(.cvetipo0) td:nth-child(1) {
display: none;
}
.GVGetMovtoPermanenteRep tr:.cvetipo0 td:nth-child(2) {
display: none;
}*/
.GVGetMovtoPermanenteRep tr:not(.cvetipo0) td .lblconcepto {
display: none;
}
@@ -34,16 +23,6 @@
.hidden {
display: none;
}
/* Ocultar las columnas 3 a 9 en filas que no tienen la clase cvetipo0 */
/*.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(3),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(4),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(5),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(6),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(7),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(8),
.GVGetMovtoPermanenteRep tr.cvetipo0 td:nth-child(9) {
display: none;
}*/
.GVGetMovtoPermanenteRep td:nth-child(3),
.GVGetMovtoPermanenteRep td:nth-child(4),

View File

@@ -54,6 +54,17 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
get { return TxtRpdFechaFin.Text; }
set { TxtRpdFechaFin.Text = value; }
}
private DataTable dtmovs
{
get
{
if (ViewState["dtmovs"] == null) { return null; }
else { return (DataTable)ViewState["dtmovs"]; }
}
set { ViewState["dtmovs"] = value; }
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
@@ -148,6 +159,7 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
//string fechaFin = "";
int CvePeriodo = DdlPeriodo.SelectedValue.ToEntero() > 0 ? DdlPeriodo.SelectedValue.ToEntero() : -1;
ObjGetM.GetMovtoPermanenteRepFechas(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto, fechaInicio.ToDateTime().ToString("yyyy-MM-dd"), fechaFin.ToDateTime().ToString("yyyy-MM-dd"), CvePeriodo);
dtmovs = ObjGetM.DtResultados;
GVGetMovtoPermanenteRep.DataSource = ObjGetM.DtResultados;
GVGetMovtoPermanenteRep.DataBind();
@@ -221,14 +233,8 @@ public partial class Nomina_RepMovtosPermanentes : ClsPaginas
protected void LnkFormatoxls_Click(object sender, EventArgs e)
{
using (ClsNominas ObjGetM = new ClsNominas())
{
//string fechaInicio = "";
//string fechaFin = "";
ObjGetM.GetMovtoPermanenteRepFechas(RcvePersonal, UsuarioActual.CveEmpresa, RcveTipo, RcveSaldo, RcveEstatus, RcveConcepto, fechaInicio.ToDateTime().ToString("yyyy-MM-dd"), fechaFin.ToDateTime().ToString("yyyy-MM-dd"));
ExportarExcel(ObjGetM.DtResultados);
}
if(dtmovs != null && dtmovs.Rows.Count >0)
ExportarExcel(dtmovs);
}