diff --git a/AC/Reportes/RepEstadoActividadesConta2.rdlc b/AC/Reportes/RepEstadoActividadesConta2.rdlc new file mode 100644 index 000000000..bd76638df --- /dev/null +++ b/AC/Reportes/RepEstadoActividadesConta2.rdlc @@ -0,0 +1,1836 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 3560db3f-20af-4776-9f09-85925745c52f + + + + + + DataSet1 + /* Local Query */ + + + + Orden + System.String + + + Nombre + System.String + + + CustLName + System.String + + + ImporteActual + System.Int16 + + + ImporteAcumulado + System.Int16 + + + CtaMayor + System.Int16 + + + Tipo + System.String + + + Sup + System.String + + + PorcentajeActual + System.Decimal + + + PorcentajeAcumulado + System.Decimal + + + + DataSet1 + c:\users\caudillo\documents\visual studio 2013\Projects\WebApplication1\WebApplication1\DataSet1.xsd + ActivoCirculante + + + + + + + + DataSet1 + /* Local Query */ + + + + Orden + System.String + + + Nombre + System.String + + + CustLName + System.String + + + ImporteActual + System.Int16 + + + ImporteAcumulado + System.Int16 + + + CtaMayor + System.Int16 + + + Tipo + System.String + + + Sup + System.String + + + PorcentajeActual + System.Decimal + + + PorcentajeAcumulado + System.Decimal + + + + DataSet2 + c:\users\caudillo\documents\visual studio 2013\Projects\WebApplication1\WebApplication1\DataSet1.xsd + ActivoCirculante + + + + + + + + + + + + + + + 9.16707cm + + + 3.13952cm + + + 1.09771cm + + + 3.13952cm + + + 1.09771cm + + + + + 0.6cm + + + + + true + true + + + + + INGRESOS Y OTROS BENEFICIOS + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Período Actual + + + + + + + Textbox17 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + % + + + + + + + Textbox5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Período Acumulado + + + + + + + Textbox18 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + % + + + + + + + Textbox5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + + ImporteActual + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PorcentajeActual.Value + + + + + + + PorcentajeActual + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + + ImporteAnterior + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PorcentajeAcumulado.Value + + + + + + + PorcentajeAcumulado + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL INGRESOS + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =MAX(IIF(Fields!CtaMayor.Value < 0, Fields!ImporteActual.Value, 0)) + + + + + + + ImporteActual1 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox29 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =MAX(IIF(Fields!CtaMayor.Value < 0, Fields!ImporteAnterior.Value, 0 )) + + + + + + + Textbox12 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox20 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + true + + + + + =(Fields!CtaMayor.Value="-1") + + + + Before + + + + DataSet1 + 0.74371cm + 1.99074cm + 1.65cm + 17.64153cm + + + + + + + + + 9.16707cm + + + 3.13952cm + + + 1.09771cm + + + 3.13952cm + + + 1.09771cm + + + + + 0.6cm + + + + + true + true + + + + + GASTOS Y OTRAS PÉRDIDAS + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Período Actual + + + + + + + Textbox15 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + % + + + + + + + Textbox5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Período Acumulado + + + + + + + Textbox16 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + % + + + + + + + Textbox21 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + + ImporteActual + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PorcentajeActual.Value + + + + + + + PorcentajeActual1 + + + + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + + ImporteAnterior + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PorcentajeAcumulado.Value + + + + + + + PorcentajeAcumulado1 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL GASTOS + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =MAX(IIF(Fields!CtaMayor.Value < 0, Fields!ImporteActual.Value, 0 )) + + + + + + + ImporteActual1 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox30 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =MAX(IIF(Fields!CtaMayor.Value < 0, Fields!ImporteAnterior.Value, 0)) + + + + + + + Textbox12 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox23 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + true + + + + + =(Fields!CtaMayor.Value="-1" AND (Fields!Orden.Value <>"600" AND Fields!Orden.Value <> "700" AND Fields!Orden.Value <> "790" )) + + + + Before + + + + DataSet2 + 3.15418cm + 1.99074cm + 1.65cm + 17.64153cm + 1 + + + + + + true + true + + + + + Resultados del ejercicio(Utilidad o pérdida): + + + + + + + Textbox54 + 5.28849cm + 1.99074cm + 0.49417cm + 9.16707cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!lbTotalActual.Value + + + + + + + Textbox56 + 5.28849cm + 11.19309cm + 0.49417cm + 3.13952cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!lbTotalAnterior.Value + + + + + + + Textbox58 + 5.28849cm + 15.39933cm + 0.49417cm + 3.13952cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 6.51495cm + + + + + + + Textbox8 + 0.06529cm + 16.80162cm + 0.81167cm + 3.13952cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Estado de Resultado + + + + =Parameters!periodo.Value + + + + + + + + + Centro de Costos: + + + + =Parameters!SubProyecto.Value + + + + + + + Textbox5 + 0.71396cm + 2.94324cm + 1.12049cm + 13.85838cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!pEmp.Value + + + + + + + Textbox1 + 0.02577cm + 2.94324cm + 0.54709cm + 13.85838cm + 2 + + =(Globals.PageNumber>1) + + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.06104cm + 1.5cm + 2.94324cm + 3 + + + + + + + + + + + 2.76063cm + true + true + + + true + true + + + + + =Parameters!pFirma1.Value + + + + Textbox2 + 0.49389cm + 10.80759cm + 0.9616cm + 8.02269cm + + = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma2.Value <> ""),false,true) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!pFirma2.Value + + + + Textbox2 + 0.49389cm + 1.24991cm + 0.99688cm + 8.02269cm + 1 + + = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma2.Value <> ""),false,true) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 1.92292cm + 0.62818cm + 0.6cm + 18.2021cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 0.13cm + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + + + + + TOTAL ACTIVO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + In + + =CStr("A,B,C").Split(",") + + + + =Fields!TipoCuenta.Value + Equal + + 1 + + + + 2.6512cm + 0.31432cm + 1.65cm + 10.42504cm + + + Verdana + 8pt + + + + + + + 5.36361cm + + + 2.86585cm + + + 2.19558cm + + + + + 0.6cm + + + + + true + true + + + + + ACTIVO NO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL ACTIVO NO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum( Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + In + + =CStr("A,B,C").Split(",") + + + + =Fields!TipoCuenta.Value + Equal + + 2 + + + + 4.74417cm + 0.31432cm + 1.65cm + 10.42504cm + 1 + + + Verdana + 8pt + + + + + + + 5.21467cm + + + 2.56871cm + + + 1.91058cm + + + + + 0.6cm + + + + + true + true + + + + + PASIVO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL PASIVO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + Equal + + D + + + + =Fields!TipoCuenta.Value + Equal + + 3 + + + + 2.6512cm + 10.77464cm + 1.65cm + 9.69396cm + 2 + + + Verdana + 8pt + + + + + + + 5.21467cm + + + 2.56871cm + + + 1.91058cm + + + + + 0.6cm + + + + + true + true + + + + + PASIVO NO CIRCULANTE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL PASIVO NO CIRCULANTE + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + Equal + + D + + + + =Fields!TipoCuenta.Value + Equal + + 4 + + + + 4.74417cm + 10.77464cm + 1.65cm + 9.69396cm + 3 + + + Verdana + 8pt + + + + true + true + + + + + ACTIVO + + + + + + + Textbox28 + 1.91009cm + 0.31432cm + 0.6cm + 10.46032cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + PASIVO + + + + + + + Textbox28 + 1.91009cm + 10.77464cm + 0.6cm + 9.69395cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.21467cm + + + 2.56871cm + + + 1.91058cm + + + + + 0.6cm + + + + + true + true + + + + + CAPITAL CONTABLE + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL CAPITAL + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!Tipo.Value + Equal + + F + + + + =Fields!TipoCuenta.Value + In + + 5 + 6 + 7 + 8 + + + + 8.30193cm + 10.77464cm + 1.65cm + 9.69396cm + 6 + + + Verdana + 8pt + + + + true + true + + + + + CAPITAL + + + + + + + Textbox28 + 7.52554cm + 10.77464cm + 0.6cm + 9.69395cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total CAPITAL + + + + + + + Textbox45 + 10.22837cm + 10.77464cm + 0.6cm + 4.89717cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPatrimonioHAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPatrimonioHActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total Pasivo y Patrimonio + + + + + + + Textbox45 + 11.12267cm + 10.77464cm + 0.6cm + 4.89717cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalpasivoYHaciendaAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalpasivoYHaciendaActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total del Pasivo: + + + + + + + Textbox45 + 6.57056cm + 10.77464cm + 0.6cm + 5.21467cm + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPasivoAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalPasivoActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Iif( Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2) <.005,"" ,"La suma de los totales estan descuadradas." & Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2)) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.03141cm + 0.31432cm + 1.5cm + 5.36361cm + 18 + + + + + + true + true + + + + + =Parameters!pEmp.Value + + + + + + + Textbox1 + 0.03141cm + 5.67793cm + 0.81167cm + 10.31137cm + 19 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Estado de Situación Financiera + + + + =Parameters!periodo.Value + + + + + + + Textbox5 + 0.89924cm + 5.67793cm + 0.6cm + 10.31137cm + 20 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox8 + 0.07056cm + 15.98931cm + 0.81167cm + 4.47928cm + 21 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 5.36361cm + + + 2.86585cm + + + 2.19558cm + + + + + 0.6cm + + + + + true + true + + + + + ACTIVO DIFERIDO + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.45cm + + + + + true + + + + + =Fields!Nombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + TOTAL ACTIVO DIFERIDO + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteActual.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!ImporteAnterior.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + true + + + + + + Before + + + + DataSet1 + + + =Fields!TipoCuenta.Value + Equal + + 9 + + + + 6.92554cm + 0.31432cm + 1.65cm + 10.42504cm + 22 + + + Verdana + 8pt + + + + true + true + + + + + Total del Activo + + + + + + + Textbox45 + 11.12267cm + 0.31432cm + 0.6cm + 5.36361cm + 23 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalActivoAnterior.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Variables!TotalActivoActual.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 4.88706in + + + + =Parameters!pFechaFin.Value + + + + + + + Textbox5 + 3.454cm + 0.6cm + 12.91455cm + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox8 + 0.02088cm + 16.62517cm + 0.57912cm + 3.49249cm + 1 + + = (Globals.PageNumber=1) + + + + 2pt + 2pt + + + + + + + + + 2.46062cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 1.86062cm + 16.37931cm + 0.6cm + 3.95896cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!pFirma2.Value + + + + Textbox2 + 0.10583cm + 1.71666cm + 0.99688cm + 8.02269cm + 1 + + = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma2.Value <> ""),false,true) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!pFirma1.Value + + + + Textbox2 + 1.46374cm + 6.03938cm + 0.99688cm + 8.02269cm + 2 + + = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma1.Value <> ""),false,true) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + Textbox2 + 0.10582cm + 10.37435cm + 0.99688cm + 8.02269cm + 3 + + =Microsoft.VisualBasic.Interaction.Iif((Globals!PageNumber = Globals!TotalPages) And (Parameters!pFirma1.Value <> ""), False, True) + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 0.13cm + + + + + Moneda: + + + + + + + + =Parameters!MonedaAbreviatura.Value + + + + + Textbox4 0.04117in 5.62784in - 0.99993in + 1.12493in 2.66068in 2 + + + + + Reporte Personal DIM + + + + + + +
  • + Descarga Excel +
  • +
  • + Descarga Archivo +
  • + +
    + + + + +
    + +
    + + + + +
    +
    +
    + + +
    +
    +
    +
    + + +
    + + +
    + + + +
    +
    +
    +
    + +
    +
    +
    + + +
    +
    + + + + + + + + + Mes inicial + + + + + + + + Mes final + + + + + + + + RFC + + + + + + + + CURP + + + + + + + + Apellido
    + paterno +
    + + + +
    + + + Apellido
    + materno +
    + + + +
    + + + Nombre + + + + + + + + Área
    + geográfica +
    + + + +
    + + + Si el patrón
    + realizó
    + cálculo anual +
    + + + +
    + + + Tarifa
    + utilizada del
    + ejercicio +
    + + + +
    + + + Tarifa 1991 + + + + + + + + Proporción
    + del subsidio +
    + + + +
    + + + Sindicalizado + + + + + + + + Si es
    + asimilado a
    + salarios +
    + + + +
    + + + Entidad
    + Federativa +
    + + + +
    + + + RFC otros
    + patrones1 +
    + + + +
    + + + RFC otros
    + patrones2 +
    + + + +
    + + + RFC otros
    + patrones3 +
    + + + +
    + + + RFC otros
    + patrones4 +
    + + + +
    + + + RFC otros
    + patrones5 +
    + + + +
    + + + RFC otros
    + patrones6 +
    + + + +
    + + + RFC otros
    + patrones7 +
    + + + +
    + + + RFC otros
    + patrones8 +
    + + + +
    + + + RFC otros
    + patrones9 +
    + + + +
    + + + RFC otros
    + patrones10 +
    + + + +
    + + + Pagos por
    + separación +
    + + + +
    + + + Asimilados a
    + salarios +
    + + + +
    + + + Pagos del
    + patrón +
    + efectuados
    + a sus trab +
    + + + +
    + + + <%-- + CvePersonal + + + --%> + + + Ingresos
    + totales por
    + pago en
    + parcialidades +
    + + + +
    + + + Monto
    + diario
    + percibido
    + por jubilaciones +
    + + + +
    + + + Cantidad
    + que se
    + hubiera
    + percibido +
    + + + +
    + + + Monto total
    + del pago en
    + una sola
    + exhibición +
    + + + +
    + + + Días + + + + + + + + Ingresos
    + exentos +
    + + + +
    + + + Ingresos
    + gravables +
    + + + +
    + + + Ingresos
    + acumulables +
    + + + +
    + + + Ingresos no
    + acumulables +
    + + + +
    + + + Impuesto
    + retenido +
    + + + +
    + + + Monto total
    + pagado de
    + otros pagos +
    + + + +
    + + + Número de
    + años de
    + servicio +
    + + + +
    + + + Ingresos
    + exentos +
    + + + +
    + + + Ingresos
    + gravados +
    + + + +
    + + + Ingresos
    + acumulables (mes) +
    + + + +
    + + + Impuesto
    + correspondiente
    (mes) +
    + + + +
    + + + Ingresos no
    + acumulables +
    + + + +
    + + + Impuesto
    + retenido +
    + + + +
    + + + + + Becas para
    trabajadores
    (Gravado) +
    + + + +
    + + + Becas para
    trabajadores
    (Exento) +
    + + + +
    + + + + + Sueldos,
    + salarios,
    + rayas y
    + jornales (Gravado) +
    + + + +
    + + + Sueldos,
    + salarios,
    + rayas y
    + jornales (Exento) +
    + + + +
    + + + Gratificación
    anual (Gravado) +
    + + + +
    + + + Gratificación
    + anual (Exento) +
    + + + +
    + + + Viáticos y
    + gastos de
    + viaje
    (Gravado) +
    + + + +
    + + + Viáticos y
    + gastos de
    + viaje
    (Exento) +
    + + + +
    + + + Tiempo
    + extraordinario
    + (Gravado) +
    + + + +
    + + + Tiempo
    + extraordinario
    + (Exento) +
    + + + +
    + + + Prima
    + vacacional
    + (Gravado) +
    + + + +
    + + + Prima
    + vacacional
    + (Exento) +
    + + + +
    + + + Prima
    + dominical
    + (Gravado) +
    + + + +
    + + + Prima
    + dominical
    + (Exento) +
    + + + +
    + + + PTU
    + (Gravado) +
    + + + +
    + + + PTU
    + (Exento) +
    + + + +
    + + + Reembolso
    + de gastos
    + médicos,
    + (Gravado) +
    + + + +
    + + + Reembolso
    + de gastos
    + médicos,
    + (Exento) +
    + + + +
    + + + Fondo de
    + ahorro
    + (Gravado) +
    + + + +
    + + + Fondo de
    + ahorro
    + (Exento) +
    + + + +
    + + + Caja de
    + ahorro
    + (Gravado) +
    + + + +
    + + + Caja de
    + ahorro
    + (Exento) +
    + + + +
    + + + Vales para
    + despensa
    + (Gravado) +
    + + + +
    + + + Vales para
    + despensa
    + (Exento) +
    + + + +
    + + + Ayuda para
    + gastos de
    + funeral
    + (Gravado) +
    + + + +
    + + + Ayuda para
    + gastos de
    + funeral
    + (Exento) +
    + + + +
    + + + Contribuciones
    + a cargo del
    + trab(Gravado) +
    + + + +
    + + + Contribuciones
    + a cargo del
    + trab(Exento) +
    + + + +
    + + + Premios por
    + puntualidad
    + (Gravado) +
    + + + +
    + + + Premios por
    + puntualidad
    + (Exento) +
    + + + +
    + + + Prima de
    + seguro de
    + vida (Gravado) +
    + + + +
    + + + Prima de
    + seguro de
    + vida (Exento) +
    + + + +
    + + + Seguro de
    + gastos médicos
    + mayores
    (Gravado) +
    + + + +
    + + + Seguro de
    + gastos médicos
    + mayores
    (Exento) +
    + + + +
    + + + Vales para
    + restaurante
    + (Gravado) +
    + + + +
    + + + Vales para
    + restaurante +
    + (Exento) +
    + + + +
    + + + Vales para
    + gasolina
    + (Gravado) +
    + + + +
    + + + Vales para
    + gasolina
    + (Exento) +
    + + + +
    + + + Vales para
    + ropa (Gravado) +
    + + + +
    + + + Vales para
    + ropa (Exento) +
    + + + +
    + + + Ayuda para
    + renta(Gravado) +
    + + + +
    + + + Ayuda para
    + renta(Exento) +
    + + + +
    + + + Ayuda para
    + artículos +
    + escolares (Gravado) +
    + + + +
    + + + Ayuda para
    + artículos
    + escolares
    (Exento) +
    + + + +
    + + + Dotación o
    + ayuda para
    + anteojos
    (Gravado) +
    + + + +
    + + + Dotación o
    + ayuda para
    + anteojos
    (Exento) +
    + + + +
    + + + Ayuda para
    + transporte
    (Gravado) +
    + + + +
    + + + Ayuda par
    + a transporte
    (Exento) +
    + + + +
    + + + Cuotas sindicales
    + pagadas patron
    (Gravado) +
    + + + +
    + + + Cuotas sindicales
    + pagadas patron
    (Exento) +
    + + + +
    + + + Subsidios por
    + incapacidad
    (Gravado) +
    + + + +
    + + + Subsidios por
    + incapacidad
    (Exento) +
    + + + +
    + <%--Becas para trabajadores(Gravado) + Becas para trabajadores(Exento)--%> + + + Pagos
    + efectuados
    + por otros
    + empleadores
    + (Gravado) +
    + + + +
    + + + Pagos
    + efectuados
    + por otros
    + empleadores
    + (Exento) +
    + + + +
    + + + Otros
    + ingresos por
    + salarios
    + (Gravado) +
    + + + +
    + + + Otros
    + ingresos por
    + salarios
    + (Exento) +
    + + + +
    + + + Suma del
    + ingreso
    + GRAVADO +
    + + + +
    + + + Suma del
    + ingreso
    + EXENTO +
    + + + +
    + + + + + + Impuesto
    + retenido
    + durante el
    + ejercicio +
    + + + +
    + + + Impuesto
    + retenido por
    + otro(s)
    + patrón(es) +
    + + + +
    + + + Saldo a favor
    + en el ejercicio
    + que declara +
    + que el patrón +
    + compensará durante
    + el siguiente
    + ejercicio +
    + + + +
    + + + Saldo a favor
    + del ejercicio anterior
    + no compensado
    + durante el
    + ejercicio que
    + declara ++ +
    + + + +
    + + + Suma de las
    + cantidades +
    + que por concepto
    + de crédito al +
    + salario le +
    + correspondió +
    + al trabajador +
    + + + +
    + + + Crédito al
    + salario
    + entregado
    + en efectivo +
    + + + +
    + + + Monto total
    + de ingresos
    + obtenidos +
    + Prev Social +
    + + + +
    + + + Exentos +
    + Previsión
    + social +
    + + + +
    + + + Suma de
    ingresos
    por sueldos
    y salarios +
    + + + +
    + + + Monto del
    + impuesto local
    + a los ingresos
    + por sueldos
    + y salarios +
    + + + +
    + + + Monto del
    + subsidio para
    + el empleo
    + entregado en
    + el ejercicio +
    + + + +
    + + + Total de
    + las aportaciones
    + voluntarias
    + deducibles +
    + + + +
    + + + Impuesto
    + conforme a la
    + tarifa anual +
    + + + +
    + + + Monto del
    + subsidio +
    + acreditable +
    + (No aplica) +
    + + + +
    + + + Monto del
    + subsidio no
    + acreditable +
    + (No aplica) +
    + + + +
    + + + Impuesto sobre
    + ingresos
    + acumulables +
    + + + +
    + + + Impuesto sobre
    + ingresos
    + no acumulables +
    + + + +
    + + + Impuesto local
    + a los ingresos
    + por sueldos,
    + salarios +
    + y en general +
    + + + +
    + + + Monto del
    + subsidio para
    + el empleo
    + que le correspondió +
    + al trabajador +
    + durante +
    + el ejercicio +
    + + + +
    + + +
    +
    + + + + + +
    +
    + +
    +
    + + + + + + + + + + + +
    + + + + diff --git a/Nomina/RepPersonalDIM.aspx.vb b/Nomina/RepPersonalDIM.aspx.vb new file mode 100644 index 000000000..d697818ef --- /dev/null +++ b/Nomina/RepPersonalDIM.aspx.vb @@ -0,0 +1,500 @@ +Option Explicit On +Option Strict On + +Imports System.Data +Imports System.Drawing +Imports System.IO +Imports CrystalDecisions.CrystalReports.Engine +Imports Extensiones +Imports GemBox.Spreadsheet +Imports Microsoft.Reporting.WebForms + +Partial Class Nomina_RepPersonalDIM + Inherits ClsPaginas + + Public Property Dt_Datos As DataTable + Get + If ViewState("Dt_Datos") Is Nothing Then + ViewState("Dt_Datos") = New DataTable + End If + Return DirectCast(ViewState("Dt_Datos"), DataTable) + End Get + Set(value As DataTable) + ViewState("Dt_Datos") = value + End Set + + End Property + + Protected Sub Nomina_RepPersonalDIM(sender As Object, e As EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + + CargaEjercicios() + DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual) + + End If + End Sub + + + Private Sub CargaEjercicios() + 'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa) + Dim ClsConta As New ClsContabilidad + If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then + DdlEjercicio.DataSource = ClsConta.DtResultados + Else + DdlEjercicio.DataSource = Nothing + End If + ClsConta.Dispose() + DdlEjercicio.DataBind() + + DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString) + + If DdlEjercicio.Items.Count = 0 Then + DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString)) + End If + + End Sub + + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + CargaDatos() + End Sub + + + Private Sub CargaDatos() + + Dt_Datos = New DataTable + LnkDescargaArchivo.Visible = False + LnkExportar.Visible = False + + Dim ObjNom As New ClsNominas + + + If ObjNom.GetRepPersonalDIM(Ejercicio:=DdlEjercicio.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa) Then + GvDatos.DataSource = ObjNom.DtResultados + Dt_Datos = ObjNom.DtResultados + + If Dt_Datos.Rows.Count > 0 Then + LnkDescargaArchivo.Visible = True + LnkExportar.Visible = True + End If + + + Else + GvDatos.DataSource = Nothing + End If + + ObjNom.Dispose() + + GvDatos.DataBind() + + UpAcciones.Update() + UpGvCargaDatos.Update() + + + End Sub + + +#Region "DESCARGA EXCEL" + + Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click + Imprimir("Excel") + End Sub + + Private Sub Imprimir(Optional reporte As String = "PDF") + + + Dim row As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal) + Dim cell As New TableHeaderCell() + cell.Text = "ANEXO 1 INFORMACION DEL EMPLEADO ->" + cell.ColumnSpan = 28 + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + cell = New TableHeaderCell() + cell.ColumnSpan = 18 + cell.Text = "ANEXO 1 PAGOS POR SEPARACION ->" + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + + cell = New TableHeaderCell() + cell.ColumnSpan = 2 + cell.Text = " ANEXO 1 ASIM SAL-> " + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + + cell = New TableHeaderCell() + cell.ColumnSpan = 58 + cell.Text = "ANEXO 1 PAGOS DEL PATRÓN EFECTUADOS A SUS TRABAJADORES ->" + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + cell = New TableHeaderCell() + cell.ColumnSpan = 19 + cell.Text = "ANEXO 1 IMPUESTO SOBRE LA RENTA (RESUMEN) ->" + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + 'row.BackColor = ColorTranslator.FromHtml("#3AC0F2") + GvDatos.HeaderRow.Parent.Controls.AddAt(0, row) + + ExportToExcelGembox(GvDatos, "RepPersonalDIM", UsuarioActual, "Reporte Personal DIM", "", DatosFiltros:=$"Ejercicio {DdlEjercicio.SelectedItem.Text}") + End Sub + Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control) + End Sub + + Protected Sub LnkDescargaArchivo_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LnkDescargaArchivo.Click + + + Dim contenidoBytes As Byte() = Encoding.UTF8.GetBytes(ConvertirGVATexto()) + + Using memoryStream As New MemoryStream(contenidoBytes) + Response.Clear() + Response.ContentType = "text/plain" + Response.AddHeader("Content-Disposition", $"attachment; filename=RepPersonalDIM{DdlEjercicio.SelectedItem.Text}.txt") + memoryStream.WriteTo(Response.OutputStream) + End Using + + Response.End() + + End Sub + + Public Function ConvertirGVATexto() As String + + Dim sb As New StringBuilder + + Dim countRows As Integer = 1 + For Each GvRow As GridViewRow In GvDatos.Rows + + If Not countRows = 1 Then + For Each cell As TableCell In GvRow.Cells + For Each control As Control In cell.Controls + If TypeOf control Is Label Then + Dim label As Label = DirectCast(control, Label) + sb.Append($"{label.Text.Trim.Replace("True", "1").Replace("False", "0")}|") + End If + Next + Next + sb.AppendLine() + End If + countRows = countRows + 1 + Next + Return sb.ToString + + End Function + +#End Region + + Protected Sub GvDatos_DataBound(sender As Object, e As EventArgs) + + Dim row As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal) + Dim cell As New TableHeaderCell() + cell.Text = "ANEXO 1 INFORMACION DEL EMPLEADO ->" + cell.ColumnSpan = 28 + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + + + cell = New TableHeaderCell() + cell.ColumnSpan = 18 + cell.Text = "ANEXO 1 PAGOS POR SEPARACION ->" + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + + cell = New TableHeaderCell() + cell.ColumnSpan = 2 + cell.Text = " ANEXO 1 ASIM SAL-> " + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + + cell = New TableHeaderCell() + cell.ColumnSpan = 58 + cell.Text = "ANEXO 1 PAGOS DEL PATRÓN EFECTUADOS A SUS TRABAJADORES ->" + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + cell = New TableHeaderCell() + cell.ColumnSpan = 19 + cell.Text = "ANEXO 1 IMPUESTO SOBRE LA RENTA (RESUMEN) ->" + cell.HorizontalAlign = HorizontalAlign.Left + row.Controls.Add(cell) + + 'row.BackColor = ColorTranslator.FromHtml("#3AC0F2") + GvDatos.HeaderRow.Parent.Controls.AddAt(0, row) + + End Sub + + + + + Public Sub ExportToExcelGembox(GridView As GridView, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional DatoTituloExtra As String = "", Optional DatosFiltros As String = "", Optional AnchoImagen As Integer = 100, Optional AlturaImagen As Integer = 100, Optional DTExtra As DataTable = Nothing) + + Dim sw1 As New StringWriter() + Dim htw1 As New HtmlTextWriter(sw1) + GridView.RenderControl(htw1) + + Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault + + Dim htmlStream1 = New MemoryStream(options.Encoding.GetBytes(sw1.ToString())) + + htmlStream1.Position = 0 + Dim sr1 As New StreamReader(htmlStream1) + Dim myStr1 = sr1.ReadToEnd() + sr1.Dispose() + htmlStream1.Dispose() + sw1.Dispose() + + Dim HtmlCompleto As String = myStr1 + + HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "") + + Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto)) + + GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet) + + Dim excel As GemBox.Spreadsheet.ExcelFile + + excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream5, options) + + If Usuario IsNot Nothing Then + + Dim TotalRowHeader As Integer = 6 + Dim TotalRowFooter As Integer = 2 + + + Dim worksheet = excel.Worksheets(0) + worksheet.Rows.InsertEmpty(0, TotalRowHeader) + Dim celdasConTexto = worksheet.GetUsedCellRange(True) + If celdasConTexto Is Nothing Then Exit Sub 'No se recuperaron datos, salir de sin guardar porque soltará error + celdasConTexto.Style.Font.Name = "Calibri Light" + + Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex) + RangoNombreEmpresa.Merged = True + RangoNombreEmpresa.Value = Usuario.Empresa.Empresa + RangoNombreEmpresa.Style.Font.Size = 18 * 20 + RangoNombreEmpresa.Style.Font.Name = "Calibri Light" + RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + + Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex) + RangoTitulo.Merged = True + RangoTitulo.Value = Titulo + RangoTitulo.Style.Font.Size = 20 * 20 + RangoTitulo.Style.Font.Name = "Calibri Light" + RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + If DatoTituloExtra.Length > 0 Then + Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex) + RangoDatoTituloExtra.Merged = True + RangoDatoTituloExtra.Value = DatoTituloExtra + RangoDatoTituloExtra.Style.Font.Size = 20 * 20 + RangoDatoTituloExtra.Style.Font.Name = "Calibri Light" + RangoDatoTituloExtra.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left + RangoDatoTituloExtra.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + End If + + If DatosFiltros.Length > 0 Then + + Dim Arreglo As String() = DatosFiltros.Split("|"c) + worksheet.Rows.InsertEmpty(TotalRowHeader, Arreglo.Count) + For Each TextoFiltro As String In Arreglo + Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex) + RangoDatoTituloExtra.Merged = True + RangoDatoTituloExtra.Value = TextoFiltro + RangoDatoTituloExtra.Style.Font.Size = 12 * 20 + RangoDatoTituloExtra.Style.Font.Name = "Calibri Light" + RangoDatoTituloExtra.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left + RangoDatoTituloExtra.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + TotalRowHeader += 1 + + Next + End If + + ' TotalRowHeader += 2 + + + 'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("A8:AB9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(61, 74, 26), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + 'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("AC8:AT9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(216, 191, 216), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + 'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("AU8:AV9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(59, 131, 189), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + 'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("AW8:DB9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(216, 191, 216), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + 'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("DC8:DS9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 140, 64), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + + worksheet.Cells.GetSubrange("A8:AB9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(218, 247, 166), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + worksheet.Cells.GetSubrange("AC8:AT9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(216, 191, 216), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + worksheet.Cells.GetSubrange("AU8:AV9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(59, 131, 189), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + worksheet.Cells.GetSubrange("AW8:DB9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(216, 191, 216), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + worksheet.Cells.GetSubrange("DC8:DU9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 140, 64), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + worksheet.Cells("DC8").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 140, 64), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + + For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex + + worksheet.Rows(TotalRowHeader).Cells(i).Style.Font.Size = 12 * 20 + worksheet.Rows(TotalRowHeader).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left + worksheet.Rows(TotalRowHeader).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Bottom + + 'worksheet.Rows(TotalRowHeader).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + worksheet.Rows(TotalRowHeader).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(0, 0, 0) + + + worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.Font.Size = 12 * 20 + worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left + worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Bottom + + ' worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) + worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(0, 0, 0) + + If i > 0 Then + Try + worksheet.Columns(i).AutoFit(1) + Catch ex As Exception + End Try + End If + + Next + + Dim IndexEndTable As Integer = GridView.Rows.Count + TotalRowHeader + TotalRowFooter + + worksheet.Rows(IndexEndTable).Cells(1).Value = "Usuario Imprimió" + worksheet.Rows(IndexEndTable + 1).Cells(1).Value = Usuario.Nombre + + worksheet.Rows(IndexEndTable).Cells(3).Value = "Fecha Impresión" + worksheet.Rows(IndexEndTable + 1).Cells(3).Value = DateTime.Now.ToString("dd/MM/yyyy") + + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) + + If Imagen.Exists Then + Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta) + Using sr As New StreamReader(Ruta) + Dim ms As New MemoryStream() + sr.BaseStream.CopyTo(ms) + worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel) + End Using + End If + + + worksheet.Columns(0).Width = 4000 + worksheet.Columns(1).Width = 4000 + worksheet.Columns(2).Width = 5500 + worksheet.Columns(3).Width = 10000 + worksheet.Columns(4).Width = 5000 + worksheet.Columns(5).Width = 5000 + worksheet.Columns(6).Width = 10000 + worksheet.Columns(7).Width = 5000 + + For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex + If I > 7 Then + worksheet.Columns(I).Width = 4500 + End If + Next + + + + If DTExtra IsNot Nothing Then + + Dim NombreTabla As String = "" + + If DTExtra.TableName IsNot Nothing Then + NombreTabla = DTExtra.TableName + End If + + If NombreTabla.Trim = "" Then + NombreTabla = "hoja2" + End If + + 'excel.Worksheets.Add(NombreTabla) + + Dim workbookDTExtra = New ExcelFile + Dim worksheetDTExtra = workbookDTExtra.Worksheets.Add(NombreTabla) + + + worksheetDTExtra.InsertDataTable(DTExtra, + New InsertDataTableOptions() With + { + .ColumnHeaders = True, + .StartRow = 0 + }) + + + + Dim columnCount = worksheetDTExtra.CalculateMaxUsedColumns() + For i As Integer = 0 To columnCount - 1 + worksheetDTExtra.Columns(i).AutoFit(1, worksheetDTExtra.Rows(1), worksheetDTExtra.Rows(worksheetDTExtra.Rows.Count - 1)) + worksheetDTExtra.Cells(0, i).Style.FillPattern.SetSolid(Drawing.ColorTranslator.FromHtml("#4b77be")) + worksheetDTExtra.Cells(0, i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255) + + Next + + + excel.Worksheets.AddCopy(NombreTabla, worksheetDTExtra) + excel.Worksheets(0).Name = Titulo + End If + + + + Dim indexRow As Integer = 8 + Dim indexRowGV As Integer = 0 + Dim cssClassRow As String = "" + + Dim CountRowFiltros As Integer = -1 + If DatosFiltros.Trim.Length > 0 Then + CountRowFiltros = 0 + End If + + For indexRow = 8 To worksheet.Rows.Count - 4 + + Try + cssClassRow = GridView.Rows(indexRowGV).CssClass.Trim() + + Select Case cssClassRow + + Case "Totales" + worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.FillPattern.SetSolid(System.Drawing.ColorTranslator.FromHtml("#67809f")) + worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Weight = 1000 + worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Color = System.Drawing.ColorTranslator.FromHtml("#ddd") + Exit Select + Case "SubTotales2" + worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.FillPattern.SetSolid(System.Drawing.ColorTranslator.FromHtml("#c0c0c0")) + worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Weight = 1000 + worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Color = System.Drawing.ColorTranslator.FromHtml("#000077") + Exit Select + Case "SubTotales" + worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.FillPattern.SetSolid(System.Drawing.ColorTranslator.FromHtml("#dddddd")) + worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Weight = 1000 + worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Color = System.Drawing.ColorTranslator.FromHtml("#67809F") + Exit Select + Case Else + Exit Select + End Select + + Catch ex As Exception + End Try + + indexRowGV += 1 + Next + + + + End If + + excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx") + + + End Sub +End Class + diff --git a/Planeacion/CatSubProyectos.aspx b/Planeacion/CatSubProyectos.aspx index fb428da68..90295d72b 100644 --- a/Planeacion/CatSubProyectos.aspx +++ b/Planeacion/CatSubProyectos.aspx @@ -224,7 +224,7 @@
    - +
    diff --git a/SAT/SolicitudesRecibidasSAT.aspx b/SAT/SolicitudesRecibidasSAT.aspx new file mode 100644 index 000000000..27e0c501d --- /dev/null +++ b/SAT/SolicitudesRecibidasSAT.aspx @@ -0,0 +1,519 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="SolicitudesRecibidasSAT.aspx.vb" Inherits="SAT_SolicitudesRecibidasSAT" %> + + + + + + + + Comparativo compras + + + + + + +
  • + Excel +
  • +
    + + + +
    +
    + + + + + +
    +
    +
    +
    + +
    + + + + + +
    + +
    +
    + + + + + + + + +
    +
    + +
    + <%----%> +
    + + + + + + + + +
    +
    +
    +
    +
    + + +
    +
    + +
    +
    +
    + + +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + <%-- + + + + --%> + + + + + + + + + + + <%-- + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    +
    +
    + + + diff --git a/SAT/SolicitudesRecibidasSAT.aspx.vb b/SAT/SolicitudesRecibidasSAT.aspx.vb new file mode 100644 index 000000000..ed74f3fba --- /dev/null +++ b/SAT/SolicitudesRecibidasSAT.aspx.vb @@ -0,0 +1,276 @@ +Imports Extensiones + +Partial Class SAT_SolicitudesRecibidasSAT + Inherits ClsPaginas + + Public Property clasegrid As String + Get + + If ViewState("clasegrid") Is Nothing Then + Return "" + Else + Return ViewState("clasegrid").ToString() + End If + End Get + Set(ByVal value As String) + ViewState("clasegrid") = value + End Set + End Property + + Public Property fechaInicio As String + Get + + If ViewState("fechaInicio") Is Nothing Then + Return "" + Else + Return ViewState("fechaInicio").ToString() + End If + End Get + Set(ByVal value As String) + ViewState("fechaInicio") = value + End Set + End Property + + Public Property fechaFin As String + Get + + If ViewState("fechaFin") Is Nothing Then + Return "" + Else + Return ViewState("fechaFin").ToString() + End If + End Get + Set(ByVal value As String) + ViewState("fechaFin") = value + End Set + End Property + + Public Property TipoDescarga As Integer + Get + + If ViewState("TipoDescarga") Is Nothing Then + Return 0 + Else + Return ViewState("TipoDescarga").ToString().ToEntero() + End If + End Get + Set(ByVal value As Integer) + ViewState("TipoDescarga") = CInt(value) + End Set + End Property + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + TxtRpdFechaInicio.Text = String.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1)) + TxtRpdFechaFin.Text = String.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth()) + End If + + End Sub + + + Protected Sub LnkDownloadExcel_Click(sender As Object, e As EventArgs) + If TipoDescarga = 1 Then + GvResumen.ExportToExcel2($"Resumen{DateTime.Now.ToString("yyyyMMddhhmmss")}") + End If + + If TipoDescarga = 2 Then + GvDatos.ExportToExcel2($"PorComprobante{DateTime.Now.ToString("yyyyMMddhhmmss")}") + End If + End Sub + Protected Sub GvResumen_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) + If e.Row.RowType = DataControlRowType.DataRow Then + + If e.Row.DataKey("Fecha") = "" Then + e.Row.Attributes.Add("class", "Totales") + End If + If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then + e.Row.Cells(2).Visible = False + End If + If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then + e.Row.Cells(7).Visible = False + End If + End If + + If e.Row.RowType = DataControlRowType.Header Then + e.Row.Cells(1).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(2).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(3).BackColor = System.Drawing.Color.FromName("#3598dc") + If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then + e.Row.Cells(2).Visible = False + End If + e.Row.Cells(4).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(5).BackColor = System.Drawing.Color.FromName("#3598dc") + + e.Row.Cells(6).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(7).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(8).BackColor = System.Drawing.Color.FromName("#C46B06") + If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then + e.Row.Cells(7).Visible = False + End If + e.Row.Cells(9).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(10).BackColor = System.Drawing.Color.FromName("#C46B06") + + + e.Row.Cells(1).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(2).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(3).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(4).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(5).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(6).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(7).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(8).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(9).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(10).ForeColor = System.Drawing.Color.FromName("white") + End If + + End Sub + Protected Sub GvDatos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) + If e.Row.RowType = DataControlRowType.DataRow Then + + If e.Row.DataKey("UUID") = "Totales" Then + e.Row.Font.Bold = True + e.Row.Cells(1).Text = e.Row.DataKey("CountRegistrosSIG") + e.Row.Cells(2).Text = e.Row.DataKey("CountRegistrosSAT") + e.Row.Attributes.Add("class", "Totales") + End If + + If e.Row.DataKey("UUID").ToUpper() <> "TOTALES" Then + Dim SBMsgToolTip As StringBuilder = New StringBuilder() + + If e.Row.DataKey("DifImporte").ToDecimal() <> 0 OrElse (e.Row.DataKey("Abreviatura").ToUpper().Trim() <> e.Row.DataKey("CBTMoneda").ToUpper().Trim()) Then + e.Row.CssClass = "bg-yellow-casablanca bg-font-yellow-casablanca" + End If + + e.Row.Attributes.Add("data-html", "true") + e.Row.Attributes.Add("data-toggle", "tooltip") + e.Row.Attributes.Add("data-placement", "top") + + If e.Row.DataKey("Sistema").ToUpper() = "NO" OrElse e.Row.DataKey("CFDIData").ToUpper() = "NO" Then + + If e.Row.DataKey("Sistema").ToUpper() = "NO" Then + SBMsgToolTip.AppendLine("Comprobante no se encuentra en SIG.
    ") + End If + + If e.Row.DataKey("CFDIData").ToUpper() = "NO" Then + SBMsgToolTip.AppendLine("Comprobante no encontrado.
    ") + End If + Else + + If e.Row.DataKey("DifImporte").ToDecimal() <> 0 Then + SBMsgToolTip.AppendLine($" Diferencia importes {e.Row.DataKey("DifImporte").ToDecimal().ToString("###,###,###.00")}") + End If + + If e.Row.DataKey("Abreviatura").ToUpper().Trim() <> e.Row.DataKey("CBTMoneda").ToUpper().Trim() Then + SBMsgToolTip.AppendLine($"Diferencia en monedas.") + End If + End If + + If SBMsgToolTip.ToString().Length > 0 Then + e.Row.Attributes.Add("title", SBMsgToolTip.ToString()) + End If + + Dim LnkCFDIData As LinkButton = e.Row.FCLinkButton("LnkCFDIData") + + If (e.Row.DataKey("CFDIData").ToUpper() = "SI") Then + ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkCFDIData) + LnkCFDIData.CssClass = "Texto" + Else + LnkCFDIData.PostBackUrl = "#" + End If + End If + + If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then + e.Row.Cells(7).Visible = False + End If + + If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then + e.Row.Cells(14).Visible = False + End If + End If + + If e.Row.RowType = DataControlRowType.Header Then + e.Row.Cells(1).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(2).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(3).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(4).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(5).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(6).BackColor = System.Drawing.Color.FromName("#3598dc") + If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then + e.Row.Cells(7).Visible = false + End If + e.Row.Cells(7).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(8).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(9).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(10).BackColor = System.Drawing.Color.FromName("#3598dc") + e.Row.Cells(11).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(12).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(13).BackColor = System.Drawing.Color.FromName("#C46B06") + If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then + e.Row.Cells(14).Visible = False + End If + e.Row.Cells(14).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(15).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(16).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(17).BackColor = System.Drawing.Color.FromName("#C46B06") + e.Row.Cells(1).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(2).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(3).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(4).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(5).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(6).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(7).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(8).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(9).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(10).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(11).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(12).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(13).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(14).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(15).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(16).ForeColor = System.Drawing.Color.FromName("white") + e.Row.Cells(17).ForeColor = System.Drawing.Color.FromName("white") + End If + End Sub + Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) + DvDatos1.Visible = False + DvDatos2.Visible = False + DVResumen1.Visible = False + DVResumen2.Visible = False + + TipoDescarga = 0 + + LnkDownloadExcel.Visible = False + + If (DdlReporte.SelectedValue.ToEntero() = 1 OrElse DdlReporte.SelectedValue.ToEntero() = 3) Then + DVResumen1.Visible = True + DVResumen2.Visible = True + DvDatos1.Visible = False + DvDatos2.Visible = False + Else + DVResumen1.Visible = False + DVResumen2.Visible = False + DvDatos1.Visible = True + DvDatos2.Visible = True + End If + + Using ObjCompras As New ClsCompras + If ObjCompras.GetRepSATSolicitudesRecibidas(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDate(), TxtRpdFechaFin.Text.ToDate(), DdlReporte.SelectedValue.ToEntero(), -1) Then + If DdlReporte.SelectedValue.ToEntero() = 1 OrElse DdlReporte.SelectedValue.ToEntero() = 3 Then + GvResumen.DataSource = ObjCompras.DtResultados + TipoDescarga = If(ObjCompras.DtResultados.Rows.Count > 0, 1, 0) + LnkDownloadExcel.Visible = True + + ElseIf DdlReporte.SelectedValue.ToEntero() = 2 Then + GvDatos.DataSource = ObjCompras.DtResultados + TipoDescarga = If(ObjCompras.DtResultados.Rows.Count > 0, 2, 0) + LnkDownloadExcel.Visible = True + End If + End If + End Using + + GvResumen.DataBind() + GvDatos.DataBind() + UpDatos.Update() + UpAcciones.Update() + End Sub +End Class diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 0b80dafe3..4b979fb0a 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2332,7 +2332,7 @@ Partial Class Clientes ' Else ' Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError) ' End If - ElseIf HdnTipoDocto.Value = "Cot" Then + ElseIf HdnTipoDocto.Value.Contiene("Cot", "Rem") Then If File.Exists($"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf") Then Dim PDF As String = $"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf" diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index ec9df92c6..2286cfb44 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -1010,7 +1010,7 @@ Partial Class Ventas_ClientesAbonar End If tipoCambioPago = Pago.TCPago - If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal + If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal * Pago.TCPago 'If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then ' EsAnticipoEspecial = True diff --git a/Ventas/RepVentaDetalle.aspx b/Ventas/RepVentaDetalle.aspx index 670edb5c3..c6a069f88 100644 --- a/Ventas/RepVentaDetalle.aspx +++ b/Ventas/RepVentaDetalle.aspx @@ -379,7 +379,7 @@ - + @@ -580,20 +580,18 @@ - - + - + - + - - + @@ -605,8 +603,7 @@ - - + @@ -618,8 +615,7 @@ - - + @@ -630,8 +626,7 @@ - - + @@ -642,8 +637,7 @@ - - + @@ -654,8 +648,7 @@ - - + @@ -665,23 +658,16 @@ - - - + + - - + - - - - -