This commit is contained in:
@@ -37,6 +37,9 @@
|
|||||||
<asp:PostBackTrigger ControlID="LnkAccionesDIOT" />
|
<asp:PostBackTrigger ControlID="LnkAccionesDIOT" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExcel2" OnClick="LnkExcel2_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Generales del proveedor</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
InicializaValores();
|
InicializaValores();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,8 +53,8 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
TCEspecifico = -1;
|
TCEspecifico = -1;
|
||||||
txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}";
|
txtFechaI.Text = $"01/{DateTime.Now.Month}/{DateTime.Now.Year}";
|
||||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||||
|
|
||||||
LnkAccionesDIOT.Visible = true;
|
LnkAccionesDIOT.Visible = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,17 +84,17 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
{
|
{
|
||||||
GvA.DataSource = ObjCont.DtResultados;
|
GvA.DataSource = ObjCont.DtResultados;
|
||||||
DtIVAAcreditable = ObjCont.DtResultados;
|
DtIVAAcreditable = ObjCont.DtResultados;
|
||||||
if (DtIVAAcreditable.FiltraParametros("IVA < 0 OR IEPS < 0 ").Rows.Count > 0)
|
if (DtIVAAcreditable.FiltraParametros("IVA < 0 OR IEPS < 0 ").Rows.Count > 0)
|
||||||
{
|
{
|
||||||
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
|
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
GvIVA2.DataSource = ObjCont.DtResultados;
|
GvIVA2.DataSource = ObjCont.DtResultados;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ObjCont.Dispose();
|
ObjCont.Dispose();
|
||||||
@@ -130,19 +130,19 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
{
|
{
|
||||||
e.Row.CssClass = "Totales";
|
e.Row.CssClass = "Totales";
|
||||||
}
|
}
|
||||||
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0 )
|
if (e.Row.DBCampo("PorcentajeIVA").ToDecimal() > 0)
|
||||||
{
|
{
|
||||||
Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0) );
|
Decimal SubTotal = (e.Row.DBCampo("SubTotal16").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal16").ToDecimal() : (e.Row.DBCampo("SubTotal8").ToDecimal() > 0 ? e.Row.DBCampo("SubTotal8").ToDecimal() : (Decimal)0.0));
|
||||||
|
|
||||||
Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2);
|
Decimal dif = Math.Round(SubTotal * e.Row.DBCampo("PorcentajeIVA").ToDecimal(), 2) - Math.Round(e.Row.DBCampo("IVA").ToDecimal(), 2);
|
||||||
if (dif > 1)
|
if (dif > 1)
|
||||||
{
|
{
|
||||||
e.Row.ForeColor = System.Drawing.Color.Red;
|
e.Row.ForeColor = System.Drawing.Color.Red;
|
||||||
e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";
|
e.Row.Cells[0].Text = e.Row.Cells[0].Text + "Err";
|
||||||
|
|
||||||
e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + e.Row.DBCampo("SubTotal")+ " - IVA:"+ e.Row.DBCampo("IVA");
|
e.Row.ToolTip = "Dif:" + dif.ToString() + "- Sub:" + e.Row.DBCampo("SubTotal") + " - IVA:" + e.Row.DBCampo("IVA");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,6 +155,10 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
{
|
{
|
||||||
Imprimir("EXCEL");
|
Imprimir("EXCEL");
|
||||||
}
|
}
|
||||||
|
protected void LnkExcel2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Imprimir("EXCEL2");
|
||||||
|
}
|
||||||
|
|
||||||
public void Imprimir(String Opcion)
|
public void Imprimir(String Opcion)
|
||||||
{
|
{
|
||||||
@@ -192,11 +196,12 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
DataTable Dt = TT.ActiveTabIndex == 0 ? DtIVATrasladado.Copy() : DtIVAAcreditable.Copy();
|
DataTable Dt = TT.ActiveTabIndex == 0 ? DtIVATrasladado.Copy() : DtIVAAcreditable.Copy();
|
||||||
string Formato = TT.ActiveTabIndex == 0 ? "RepIVA.rpt" : "RepIVAAcreditable.rpt";
|
string Formato = TT.ActiveTabIndex == 0 ? "RepIVA.rpt" : (Opcion == "EXCEL2" ? "RepIVAAcreditable2.rpt" : "RepIVAAcreditable.rpt");
|
||||||
|
Opcion = (Opcion == "EXCEL2" ? "EXCEL" : Opcion);
|
||||||
para.Add(new CrystalParametro("Excel", Formato));
|
para.Add(new CrystalParametro("Excel", Formato));
|
||||||
string Ruta = (ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}");
|
string Ruta = (ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\Grales\Formatos\{Formato}");
|
||||||
Ruta.GuardaLogAD();
|
Ruta.GuardaLogAD();
|
||||||
ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt,para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
ImprimirbytesPDF(ImprimirPDFCrystal(Ruta, Dt, para, "Reporte de IVA", Opcion), "Reporte de IVA", Opcion);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -248,17 +253,17 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
|
|
||||||
foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0)
|
foreach (DataRow Drow in Objconta.DtResultados.FiltraParametros("CveCompra is null and CveProveedor > 0 and SubTotal >= 1 ").Rows) // and(IVA > 1 OR IEPS > 0)
|
||||||
{
|
{
|
||||||
SBDIOT.AppendLine(
|
SBDIOT.AppendLine(
|
||||||
Drow["TipoTercero"].ToString() + "|" +
|
Drow["TipoTercero"].ToString() + "|" +
|
||||||
Drow["TipoOperacion"].ToString() + "|" +
|
Drow["TipoOperacion"].ToString() + "|" +
|
||||||
Drow["RFC"].ToString() +"|"+
|
Drow["RFC"].ToString() + "|" +
|
||||||
Drow["NumeroIDFiscal"].ToString() + "|" +
|
Drow["NumeroIDFiscal"].ToString() + "|" +
|
||||||
Drow["NombreExtranjero"].ToString() +"|"+
|
Drow["NombreExtranjero"].ToString() + "|" +
|
||||||
Drow["PaisResidencia"].ToString() + "|" +
|
Drow["PaisResidencia"].ToString() + "|" +
|
||||||
Drow["Nacionalidad"].ToString() +"|"+
|
Drow["Nacionalidad"].ToString() + "|" +
|
||||||
LV(Drow["valorActos1516"].ToString()) + "|"+
|
LV(Drow["valorActos1516"].ToString()) + "|" +
|
||||||
LV(Drow["valorActos15"].ToString()) + "|" +
|
LV(Drow["valorActos15"].ToString()) + "|" +
|
||||||
LV(Drow["ValorIvaNo1516"].ToString()) +"|"+
|
LV(Drow["ValorIvaNo1516"].ToString()) + "|" +
|
||||||
|
|
||||||
LV(Drow["valorActos1011"].ToString()) + "|" +
|
LV(Drow["valorActos1011"].ToString()) + "|" +
|
||||||
LV(Drow["valorActos10"].ToString()) + "|" +
|
LV(Drow["valorActos10"].ToString()) + "|" +
|
||||||
@@ -270,11 +275,11 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
LV(Drow["ValorIvaNoImp16"].ToString()) + "|" +
|
LV(Drow["ValorIvaNoImp16"].ToString()) + "|" +
|
||||||
|
|
||||||
LV(Drow["valorActosImp10"].ToString()) + "|" +
|
LV(Drow["valorActosImp10"].ToString()) + "|" +
|
||||||
LV(Drow["ValorIvaNoImp10"].ToString()) + "|" +
|
LV(Drow["ValorIvaNoImp10"].ToString()) + "|" +
|
||||||
|
|
||||||
LV(Drow["IvaExentoImpo"].ToString()) + "|"+
|
LV(Drow["IvaExentoImpo"].ToString()) + "|" +
|
||||||
LV(Drow["IVACero"].ToString()) + "|" +
|
LV(Drow["IVACero"].ToString()) + "|" +
|
||||||
LV(Drow["IvaExento"].ToString()) + "|"+
|
LV(Drow["IvaExento"].ToString()) + "|" +
|
||||||
LV(Drow["IvaRetenido"].ToString()) + "|" +
|
LV(Drow["IvaRetenido"].ToString()) + "|" +
|
||||||
LV(Drow["IvaDevoluciones"].ToString()) + "|");
|
LV(Drow["IvaDevoluciones"].ToString()) + "|");
|
||||||
}
|
}
|
||||||
@@ -286,7 +291,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
//TextWriter tw = new StreamWriter(ms, System.Text.Encoding.UTF8);
|
//TextWriter tw = new StreamWriter(ms, System.Text.Encoding.UTF8);
|
||||||
|
|
||||||
//tw.Write(SBDIOT.ToString());
|
//tw.Write(SBDIOT.ToString());
|
||||||
|
|
||||||
//tw.Flush();
|
//tw.Flush();
|
||||||
|
|
||||||
//byte[] bytes = ms.ToArray();
|
//byte[] bytes = ms.ToArray();
|
||||||
@@ -310,7 +315,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
Response.End();
|
Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected string LV(string Valor )
|
protected string LV(string Valor)
|
||||||
{
|
{
|
||||||
return (Valor.ToDecimal() > 0) ? Valor.ToDecimal().ToString().FormatoNumero(0).Replace(",", string.Empty) : "";
|
return (Valor.ToDecimal() > 0) ? Valor.ToDecimal().ToString().FormatoNumero(0).Replace(",", string.Empty) : "";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user