--Validacion Tipo Operacion

This commit is contained in:
2025-05-23 19:22:11 -07:00
parent 495e9f85e2
commit c2476adada
2 changed files with 151 additions and 123 deletions

View File

@@ -237,7 +237,7 @@
<asp:Label data-toggle="tooltip" data-placement="top" ToolTip="SubTotal al 8%." runat="server">SubTotal <br/>8%</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("AcredFN", "{0:N2}") %>'></asp:Label>
<asp:Label runat="server" Text='<%# Eval("ActosFN", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%-- <asp:BoundField HeaderText="SubTotal 0%" DataField="valorActosImp0" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />--%>
@@ -318,6 +318,14 @@
<asp:Label runat="server" Text='<%# Eval("ValorIvaNoDeducible08", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label data-toggle="tooltip" data-placement="top" ToolTip="IVA SubTotal Importación No Tangibles 16%." runat="server">SubTotal <br/> Imp. No Tan.16%</asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("ActosImpNotan16", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>

View File

@@ -333,10 +333,11 @@ public partial class Contabilidad_RepIVA : ClsPaginas
protected void LnkTxtDIOT_Click(object sender, EventArgs e)
{
ClsContabilidad Objconta = new ClsContabilidad();
StringBuilder SBDIOT = new StringBuilder();
int Conciliado = DdlTipoMovto.SelectedValue.ToEntero();
using (var Objconta = new ClsContabilidad())
{
if (Objconta.GetRepIVA(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 2, UsuarioActual.CveUsuario, -1, Conciliado, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico))
{
if (txtFechaI.Text.ToDate() < "2024/12/31".ToDate()) // años anteriores al enero 2025
@@ -381,6 +382,20 @@ public partial class Contabilidad_RepIVA : ClsPaginas
//acumula los prov, globales en un solo registro
dtt = AcumularYReemplazar(dtt);
var dtSinTipoOperacion = dtt.FiltraParametros("GrpId = 1 AND ISNULL(TipoOperacion,'') = ''");
if (dtSinTipoOperacion != null && dtSinTipoOperacion.Rows.Count > 0)
{
var SbSinTipo = new StringBuilder();
SbSinTipo.Append("Los siguientes proveedores no tienen especificado el tipo de operación:<br/>");
foreach (DataRow row in dtSinTipoOperacion.Rows)
{
SbSinTipo.AppendFormat("{0}-{1} <br/>", row["RFC"], row["RazonSocial"]);
}
Alert(SbSinTipo.ToString(), TipoMensaje.MsgAdvertencia);
}
else
{
foreach (DataRow Drow in dtt.Rows)
{
SBDIOT.AppendLine(
@@ -446,11 +461,24 @@ public partial class Contabilidad_RepIVA : ClsPaginas
}
Response.Clear();
Response.ClearHeaders();
Response.AppendHeader("Content-Length", SBDIOT.ToString().Length.ToString());
Response.ContentType = "text/plain";
Response.AppendHeader("Content-Disposition", $"attachment;filename=DIOT_{txtFechaI.Text.ToDate().ToString("ddMMyyyy")}_{txtFechaI.Text.ToDate().ToString("ddMMyyyy")}.txt");
Response.Write(SBDIOT.ToString());
Response.End();
}
}
}
Objconta.Dispose();
}
//MemoryStream ms = new MemoryStream();
//TextWriter tw = new StreamWriter(ms, System.Text.Encoding.UTF8);
@@ -469,15 +497,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
//Response.BinaryWrite(bytes);
//Response.End();
Response.Clear();
Response.ClearHeaders();
Response.AppendHeader("Content-Length", SBDIOT.ToString().Length.ToString());
Response.ContentType = "text/plain";
Response.AppendHeader("Content-Disposition", $"attachment;filename=DIOT_{ txtFechaI.Text.ToDate().ToString("ddMMyyyy") }_{txtFechaI.Text.ToDate().ToString("ddMMyyyy") }.txt");
Response.Write(SBDIOT.ToString());
Response.End();
}
static DataTable AcumularYReemplazar(DataTable dt)