diff --git a/AC/Reportes/NoIncluir.rdlc b/AC/Reportes/NoIncluir.rdlc
new file mode 100644
index 000000000..418752c04
--- /dev/null
+++ b/AC/Reportes/NoIncluir.rdlc
@@ -0,0 +1,3083 @@
+
+
+ 0
+
+
+
+ System.Data.DataSet
+ /* Local Connection */
+
+ 3560db3f-20af-4776-9f09-85925745c52f
+
+
+
+
+
+ DataSet1
+ /* Local Query */
+
+
+
+ Nombre
+ System.String
+
+
+ ImporteActual
+ System.Int16
+
+
+ ImporteAnterior
+ System.Int16
+
+
+ CtaMayor
+ System.Int16
+
+
+ Orden
+ System.String
+
+
+ Tipo
+ System.String
+
+
+ Sup
+ System.String
+
+
+ Level
+ System.Int16
+
+
+ TipoCuenta
+ System.Int16
+
+
+
+ DataSet1
+ c:\users\caudillo\documents\visual studio 2013\Projects\WebApplication1\WebApplication1\DataSet1.xsd
+ ActivoCirculante
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 6cm
+
+
+ 2.5cm
+
+
+ 2.20896cm
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ ACTIVO CIRCULANTE
+
+
+
+
+
+
+ Textbox7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+ 3
+
+
+
+
+
+
+
+ 0.45cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Nombre.Value
+
+
+
+
+
+
+ Nombre
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteActual.Value
+
+
+
+
+
+
+ ImporteActual
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteAnterior.Value
+
+
+
+
+
+
+ ImporteAnterior
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+
+
+
+
+ TOTAL ACTIVO CIRCULANTE
+
+
+
+
+
+
+ Textbox10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0))
+
+
+
+
+
+
+ ImporteActual1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0))
+
+
+
+
+
+
+ ImporteAnterior1
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+ true
+
+
+
+
+
+
+
+
+ Before
+
+
+
+ DataSet1
+
+
+ =Fields!Tipo.Value
+ In
+
+ =CStr("A,B,C").Split(",")
+
+
+
+ =Fields!Orden.Value
+ Like
+
+ =IIf(Parameters!CveEmpresa.Value = 48, "00011*", "011*")
+
+
+
+ =Fields!Nombre.Value
+ NotEqual
+
+ ACTIVO CIRCULANTE
+
+
+
+ 2.6512cm
+ 0.06568cm
+ 1.65cm
+ 10.70896cm
+
+
+ Verdana
+ 8pt
+
+
+
+
+
+
+ 6cm
+
+
+ 2.5cm
+
+
+ 2.20896cm
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ ACTIVO NO CIRCULANTE
+
+
+
+
+
+
+ Textbox7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+ 3
+
+
+
+
+
+
+
+ 0.45cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Nombre.Value
+
+
+
+
+
+
+ Nombre
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteActual.Value
+
+
+
+
+
+
+ ImporteActual
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteAnterior.Value
+
+
+
+
+
+
+ ImporteAnterior
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ TOTAL ACTIVO NO CIRCULANTE
+
+
+
+
+
+
+ Textbox10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0))
+
+
+
+
+
+
+ ImporteActual1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0))
+
+
+
+
+
+
+ Textbox12
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+ true
+
+
+
+
+
+ Before
+
+
+
+ DataSet1
+
+
+ =Fields!Tipo.Value
+ In
+
+ =CStr("A,B,C").Split(",")
+
+
+
+ =Fields!Orden.Value
+ Like
+
+ =IIf(Parameters!CveEmpresa.Value = 48, "00012*", "012*")
+
+
+
+ =Fields!Nombre.Value
+ NotEqual
+
+ ACTIVO NO CIRCULANTE
+
+
+
+ 4.74417cm
+ 0.06568cm
+ 1.65cm
+ 10.70896cm
+ 1
+
+
+ Verdana
+ 8pt
+
+
+
+
+
+
+ 5.10007cm
+
+
+ 2.1825cm
+
+
+ 2.17523cm
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ PASIVO CIRCULANTE
+
+
+
+
+
+
+ Textbox7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+ 3
+
+
+
+
+
+
+
+ 0.45cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Nombre.Value
+
+
+
+
+
+
+ Nombre
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteActual.Value
+
+
+
+
+
+
+ ImporteActual
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteAnterior.Value
+
+
+
+
+
+
+ ImporteAnterior
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ TOTAL PASIVO CIRCULANTE
+
+
+
+
+
+
+ Textbox10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0))
+
+
+
+
+
+
+ ImporteActual1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0))
+
+
+
+
+
+
+ Textbox12
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+ true
+
+
+
+
+
+ Before
+
+
+
+ DataSet1
+
+
+ =Fields!Tipo.Value
+ Equal
+
+ D
+
+
+
+ =Fields!Nombre.Value
+ NotEqual
+
+ PASIVO CIRCULANTE
+
+
+
+ =Fields!Orden.Value
+ Like
+
+ =IIf(Parameters!CveEmpresa.Value = 48, "00021*", "021*")
+
+
+
+ 2.6512cm
+ 10.88047cm
+ 1.65cm
+ 9.4578cm
+ 2
+
+
+ Verdana
+ 8pt
+
+
+
+
+
+
+ 5.14411cm
+
+
+ 2.1825cm
+
+
+ 2.13119cm
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ PASIVO NO CIRCULANTE
+
+
+
+
+
+
+ Textbox7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+ 3
+
+
+
+
+
+
+
+ 0.45cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Nombre.Value
+
+
+
+
+
+
+ Nombre
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteActual.Value
+
+
+
+
+
+
+ ImporteActual
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteAnterior.Value
+
+
+
+
+
+
+ ImporteAnterior
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ TOTAL PASIVO NO CIRCULANTE
+
+
+
+
+
+
+ Textbox10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0))
+
+
+
+
+
+
+ ImporteActual1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0))
+
+
+
+
+
+
+ Textbox12
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+ true
+
+
+
+
+
+ Before
+
+
+
+ DataSet1
+
+
+ =Fields!Tipo.Value
+ Equal
+
+ D
+
+
+
+ =Fields!Nombre.Value
+ NotEqual
+
+ PASIVO NO CIRCULANTE
+
+
+
+ =Fields!Orden.Value
+ Like
+
+ =IIf(Parameters!CveEmpresa.Value = 48, "00022*", "022*")
+
+
+
+ 4.74417cm
+ 10.88047cm
+ 1.65cm
+ 9.4578cm
+ 3
+
+
+ Verdana
+ 8pt
+
+
+
+ true
+ true
+
+
+
+
+ ACTIVO
+
+
+
+
+
+
+ Textbox28
+ 1.84891cm
+ 0.27028cm
+ 0.6cm
+ 9.7954cm
+ 4
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ PASIVO
+
+
+
+
+
+
+ Textbox28
+ 1.91009cm
+ 10.88047cm
+ 0.6cm
+ 8.40286cm
+ 5
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+ 5.18815cm
+
+
+ 2.13846cm
+
+
+ 2.13119cm
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ CAPITAL CONTABLE
+
+
+
+
+
+
+ Textbox7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+ 3
+
+
+
+
+
+
+
+ 0.45cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Nombre.Value
+
+
+
+
+
+
+ Nombre
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteActual.Value
+
+
+
+
+
+
+ ImporteActual
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteAnterior.Value
+
+
+
+
+
+
+ ImporteAnterior
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ TOTAL CAPITAL
+
+
+
+
+
+
+ Textbox10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0))
+
+
+
+
+
+
+ ImporteActual1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0))
+
+
+
+
+
+
+ Textbox12
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+ true
+
+
+
+
+
+ Before
+
+
+
+ DataSet1
+
+
+ =Fields!Tipo.Value
+ Equal
+
+ F
+
+
+
+ =Fields!Nombre.Value
+ NotEqual
+
+ PATRIMONIO GENERADO
+
+
+
+ =Fields!Nombre.Value
+ NotEqual
+
+ PATRIMONIO CONTRIBUIDO
+
+
+
+ 8.30193cm
+ 10.88047cm
+ 1.65cm
+ 9.4578cm
+ 6
+
+
+ Verdana
+ 8pt
+
+
+
+ true
+ true
+
+
+
+
+ CAPITAL
+
+
+
+
+
+
+ Textbox28
+ 7.52554cm
+ 10.92451cm
+ 0.6cm
+ 9.41376cm
+ 7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Total del Activo
+
+
+
+
+
+
+ Textbox45
+ 11.31317cm
+ 0.27027cm
+ 0.6cm
+ 4.34021cm
+ 8
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Variables!TotalActivoAnterior.Value
+
+
+
+
+
+
+ Textbox45
+ 11.31317cm
+ 7.53381cm
+ 0.6cm
+ 2.72931cm
+ 9
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Variables!TotalActivoActual.Value
+
+
+
+
+
+
+ Textbox45
+ 11.31317cm
+ 4.5752cm
+ 0.6cm
+ 2.95861cm
+ 10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Total CAPITAL
+
+
+
+
+
+
+ Textbox45
+ 10.22837cm
+ 10.88047cm
+ 0.6cm
+ 3.1816cm
+ 11
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Variables!TotalPatrimonioHAnterior.Value + Variables!TotalPatrimonioCAnterior.Value
+
+
+
+
+
+
+ Textbox45
+ 10.22837cm
+ 17.77089cm
+ 0.6cm
+ 2.56738cm
+ 12
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Variables!TotalPatrimonioHActual.Value + Variables!TotalPatrimonioCActual.Value
+
+
+
+
+
+
+ Textbox45
+ 10.22837cm
+ 14.06207cm
+ 0.6cm
+ 3.63827cm
+ 13
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Total Pasivo y Patrimonio
+
+
+
+
+
+
+ Textbox45
+ 11.31317cm
+ 10.26312cm
+ 0.6cm
+ 4.61265cm
+ 14
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Variables!TotalpasivoYHaciendaAnterior.Value
+
+
+
+
+
+
+ Textbox45
+ 11.31317cm
+ 17.64604cm
+ 0.6cm
+ 2.69223cm
+ 15
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Variables!TotalpasivoYHaciendaActual.Value
+
+
+
+
+
+
+ Textbox45
+ 11.31317cm
+ 14.87577cm
+ 0.6cm
+ 2.77027cm
+ 16
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Total del Pasivo:
+
+
+
+
+
+
+ Textbox45
+ 6.57056cm
+ 10.88047cm
+ 0.6cm
+ 3.1816cm
+ 17
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Variables!TotalPasivoAnterior.Value
+
+
+
+
+
+
+ Textbox45
+ 6.57056cm
+ 17.77089cm
+ 0.6cm
+ 2.60266cm
+ 18
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Variables!TotalPasivoActual.Value
+
+
+
+
+
+
+ Textbox45
+ 6.57056cm
+ 14.06207cm
+ 0.6cm
+ 3.63827cm
+ 19
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ =Iif(round(Math.Abs(Variables!TotalActivoAnterior.Value-Variables!TotalpasivoYHaciendaAnterior.Value),2) <.005 AND Round(Math.Abs(Variables!TotalActivoActual.Value-Variables!TotalpasivoYHaciendaActual.Value),2) <.005,"" ,"La suma de los totales estan descuadradas." & round(Math.Abs(Variables!TotalActivoAnterior.Value-Variables!TotalpasivoYHaciendaAnterior.Value),2))
+
+
+
+
+
+
+ Textbox73
+ 12.16237cm
+ 0.74653cm
+ 0.6cm
+ 15.93957cm
+ 20
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ External
+ = Parameters!pImg.Value
+ FitProportional
+ 0.03141cm
+ 0.31432cm
+ 1.5cm
+ 1.5cm
+ 21
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Parameters!pEmp.Value
+
+
+
+
+
+
+
+
+
+
+ Textbox1
+ 0.03141cm
+ 3.40996cm
+ 0.81167cm
+ 12.91455cm
+ 22
+
+ = IIF(First(Fields!Nombre.Value, "DataSet1"),True,False)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ Estado de Situación Financiera al
+
+
+
+ =Parameters!pFechaFin.Value
+
+
+
+
+
+
+ Textbox5
+ 0.89924cm
+ 3.40996cm
+ 0.6cm
+ 12.91455cm
+ 23
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+ ="Fecha Impresión:" & vbcrlf & Format( Globals!ExecutionTime,"dd/MM/yyyy")
+
+
+
+
+
+
+ Textbox8
+ 0.03141cm
+ 16.58113cm
+ 0.81167cm
+ 3.49249cm
+ 24
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+ 6cm
+
+
+ 2.5cm
+
+
+ 2.20896cm
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ ACTIVO DIFERIDO
+
+
+
+
+
+
+ Textbox7
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+ 3
+
+
+
+
+
+
+
+ 0.45cm
+
+
+
+
+ true
+
+
+
+
+ =Fields!Nombre.Value
+
+
+
+
+
+
+ Nombre
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteActual.Value
+
+
+
+
+
+
+ ImporteActual
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Fields!ImporteAnterior.Value
+
+
+
+
+
+
+ ImporteAnterior
+
+ =IIf(Parameters!CveEmpresa.Value = 48,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ TOTAL ACTIVO DIFERIDO
+
+
+
+
+
+
+ Textbox10
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteActual.Value, 0))
+
+
+
+
+
+
+ ImporteActual1
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ =Sum(IIf(Fields!Level.Value < 2, Fields!ImporteAnterior.Value, 0))
+
+
+
+
+
+
+ Textbox12
+
+ =IIf(Parameters!CveEmpresa.Value = 48,False,True)
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ After
+ true
+
+
+
+
+
+ Before
+
+
+
+ DataSet1
+
+
+ =Fields!CtaMayor.Value
+ NotEqual
+
+ 3
+
+
+
+ 6.92554cm
+ 0.06568cm
+ 1.65cm
+ 10.70896cm
+ 25
+
+ =IIf(Parameters!CveEmpresa.Value = 48 Or Parameters!CveEmpresa.Value = 120,True,False)
+
+
+
+ Verdana
+ 8pt
+
+
+
+ 5.1587in
+
+
+ 8.0585in
+
+
+ 0.74083cm
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ Estado de Situación Financiera al
+
+
+
+ =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.27541cm
+ true
+ true
+
+
+ true
+ true
+
+
+
+
+ ="Página " & Globals.PageNumber & " de " & Globals.TotalPages
+
+
+
+ .
+
+
+
+
+
+
+ Textbox3
+ 1.41083cm
+ 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
+ 0.07056cm
+ 10.88047cm
+ 0.99688cm
+ 8.02269cm
+ 2
+
+ = Iif((Globals.PageNumber=Globals.TotalPages) and (Parameters!pFirma1.Value <> ""),false,true)
+
+
+
+
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ 27.94cm
+ 21.59cm
+ 0.5cm
+ 0.5cm
+ 1cm
+ 1cm
+ 0.13cm
+
+
+
+
+
+
+ String
+ true
+ ReportParameter1
+
+
+ String
+ ReportParameter1
+
+
+ String
+ true
+ ReportParameter1
+
+
+ String
+ true
+ ReportParameter1
+
+
+ String
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+ String
+ true
+ true
+ ReportParameter1
+
+
+
+
+ =Sum(iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE", Fields!ImporteActual.Value, 0) , "DataSet1")
+
+
+ =Sum(iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE", Fields!ImporteAnterior.Value, 0), "DataSet1")
+
+
+ =Sum( iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteActual.Value, 0), "DataSet1")
+
+
+ =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" , Fields!ImporteAnterior.Value, 0),"DataSet1")
+ true
+
+
+ =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PATRIMONIO CONTRIBUIDO" , Fields!ImporteActual.Value, 0),"DataSet1")
+
+
+ =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PATRIMONIO GENERADO" , Fields!ImporteActual.Value, 0),"DataSet1")
+
+
+ =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PATRIMONIO CONTRIBUIDO" , Fields!ImporteAnterior.Value, 0),"DataSet1")
+
+
+ =Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "PATRIMONIO GENERADO" , Fields!ImporteAnterior.Value, 0),"DataSet1")
+
+
+ =Variables!TotalPasivoActual.Value+Variables!TotalPatrimonioHActual.Value+Variables!TotalPatrimonioCActual.Value
+
+
+ =Variables!TotalPasivoAnterior.Value+Variables!TotalPatrimonioHAnterior.Value+Variables!TotalPatrimonioCAnterior.Value
+
+
+ Cm
+ 163d4464-e41c-42b9-8827-487ff815b059
+
\ No newline at end of file
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index e3f903e99..c20de80e8 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -789,7 +789,6 @@ Public Class ClsContabilidad
#Region " C O N T A B I L I D A D - P R E P O L I Z A - D E T A L L E "
Public Function GetPlantillaConceptos(CveEmpresa As Integer, CvePlantillaPoliza As Integer) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_GetPlantilla")
@@ -812,7 +811,6 @@ Public Class ClsContabilidad
End Function
Public Function GetPrePolizaOriginal(TipoMovimiento As Integer, CveMovimiento As Integer) As Boolean 'Editado por charlie
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_GetPrePolizaOriginal")
@@ -835,7 +833,6 @@ Public Class ClsContabilidad
End Function
Public Function PrePolizaUnificacion(CvePrePoliza As Integer, CvePrePolizaVieja As Integer) As Boolean 'Editado por charlie
-
Dim Retorno As Boolean = False
SeUnifico = False
@@ -873,9 +870,7 @@ Public Class ClsContabilidad
End Function
Public Function PrePolizaSimplificacion(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
-
Dim Retorno As Boolean = False
-
DataAdapter("PA_Conta_PrePolizasSimplificacion")
With SqlAdapter.SelectCommand.Parameters
@@ -896,7 +891,6 @@ Public Class ClsContabilidad
End Function
Public Function GetCuentaPrePoliza(Concepto As Integer, CveEmpresa As Integer, CvePlantillaPoliza As Integer) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_IdCuentaPrePolizaGet")
@@ -920,7 +914,6 @@ Public Class ClsContabilidad
End Function
Public Function GetRetCuenta(Concepto As Integer, CveGeneral As Integer, Optional CveSubProyecto As Integer = -1) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_RetCuentaGet")
@@ -1233,7 +1226,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
-
Public Function UpdatePrePolizasDetalleBloquear(CvePrePoliza As Integer, Bloquear As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizasDetalleBloquearUpdate")
@@ -1572,7 +1564,6 @@ Public Class ClsContabilidad
End Function
Public Function GetCuentaDobleConta(IdCtaContable As Integer, CveEmpresa As Integer) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_CuentaDobleContaGet")
@@ -1613,7 +1604,6 @@ Public Class ClsContabilidad
End Function
Public Function GetEncabezadoPrePoliza(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_PrePolizaEncabezadoGet")
@@ -1654,7 +1644,6 @@ Public Class ClsContabilidad
End Function
Public Function GetCausacionesValores(CvePrePoliza As Integer) As Boolean 'Editado por charlie
-
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_CausacionesValoresGet")
@@ -3766,7 +3755,7 @@ Public Class ClsContabilidad
End Function
- Public Function GetAnexoCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
+ Public Function GetAnexoCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogoGet")
@@ -3774,7 +3763,7 @@ Public Class ClsContabilidad
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
@@ -3793,8 +3782,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
-
- Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
+ Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet")
@@ -3802,7 +3790,7 @@ Public Class ClsContabilidad
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -3841,7 +3829,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
- 'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0) As Boolean
Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean
Dim Retorno = False
@@ -3947,7 +3934,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
-
Public Function GetFlujoEfectivo2(FechaF As Date, Tipo As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
@@ -3969,7 +3955,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
-
Public Function GetOrigenAplicacion(FechaI As String, FechaF As String, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean
Dim Retorno = False
@@ -4482,20 +4467,19 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetAnexoCatalagoCC(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, Periodo As Integer, CveUsuario As Integer) As Boolean
+ Public Function GetAnexoCatalagoCC(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogoCCGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
- .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
- .Add("@CveSubproyecto", SqlDbType.Int).Value = CveSubproyecto
+ .Add("@FechaI", SqlDbType.Date).Value = FechaI
+ .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Divisor", SqlDbType.Int).Value = Divisor
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
- .Add("@Periodo", SqlDbType.Int).Value = Periodo
-
End With
Try
@@ -4936,25 +4920,6 @@ Public Class ClsContabilidad
Return Retorno
End Function
- 'Public Function GetSaldoCuenta(IdCuenta As Integer, TipoMovto As Integer, Ejercicio As Integer) As Boolean
- ' Dim Retorno As Boolean
-
- ' If TipoMovto = 0 Then
- ' DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 1 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0}", IdCuenta, Ejercicio), CommandType.Text)
- ' Else
- ' DataAdapter(String.Format("SELECT SUM(CASE WHEN TipoMovto = 0 THEN -1 ELSE 1 END * Importe) AS Saldo from Conta_PolizasDetalle CD inner join Conta_Polizas CP on CP.CvePoliza=CD.CvePoliza and year(CP.Fecha)={1} WHERE CveCuenta = {0} ", IdCuenta, Ejercicio), CommandType.Text)
- ' End If
-
- ' Try
- ' SqlAdapter.Fill(Data)
- ' 'Retorno = Math.Round(SqlCommand.ExecuteScalar.ToString.ToDouble, 2)
- ' Retorno = True
- ' Catch ex As Exception
- ' Me.OnError("Ocurrió un error al obtener eL saldo de la cuenta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- ' End Try
-
- ' Return Retorno
- 'End Function
Public Function GetRepPresupuestosEgresosSaldos(Ejercicio As Integer, Fecha As Date, Capitulo As String, CveClasificacion As Integer, CveFuenteFinanciamiento As Integer, CveProgramaOperativo As Integer, CveUnidadAdministrativa As Integer, CveTipoGasto As Integer, Gpo As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_PresupuestosEgresosSaldosRep")
@@ -5603,7 +5568,7 @@ Public Class ClsContabilidad
#End Region
#Region "A N E X O - D E L - C A T A L O G O"
- Public Function GetAnexoCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean
+ Public Function GetAnexoCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AnexoCatalogo")
@@ -5611,7 +5576,7 @@ Public Class ClsContabilidad
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
.Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -5627,7 +5592,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
+ Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_AuxiliarCatalogo")
@@ -5635,7 +5600,7 @@ Public Class ClsContabilidad
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
+ .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
@@ -5677,12 +5642,12 @@ Public Class ClsContabilidad
End Function
#End Region
- Public Function AddSiguienteCuentaHijo(IdCuentaPadre As Integer, NombreCuenta As String, CveEmpresa As Integer, Optional Tipo As String = "A", Optional CuentaMayor As Integer = 2, Optional IdMoneda As Integer = 1, Optional IdAgrupadorSAT As Integer = -1) As Integer
+ Public Function AddSiguienteCuentaHijo(CveCuentaPadre As Integer, NombreCuenta As String, CveEmpresa As Integer, Optional Tipo As String = "A", Optional CuentaMayor As Integer = 2, Optional IdMoneda As Integer = 1, Optional IdAgrupadorSAT As Integer = -1) As Integer
Dim CodigoCuenta As New StringBuilder
Dim Retorno As Integer = -1
Dim Segmentos() As String = Nothing
- If GetCuentas(-1, "-1", -1, CveEmpresa, CvePadre:=IdCuentaPadre) Then
+ If GetCuentas(-1, "-1", -1, CveEmpresa, CvePadre:=CveCuentaPadre) Then
If DtResultados.Rows.Count > 0 Then
'Cuando ya tiene cuentas hijas
@@ -5699,7 +5664,7 @@ Public Class ClsContabilidad
Else
'Cuando es el primero hijo de la cuenta
'obtengo el codigo del padre
- If GetCuentas(IdCuentaPadre, "-1", -1, CveEmpresa) Then
+ If GetCuentas(CveCuentaPadre, "-1", -1, CveEmpresa) Then
Segmentos = Split(DtResultados.MAX("CuentaFormato"), "-")
'recorro para poner el primer digito en el siguiente segmento al que halla tenido valor > 0
For i As Integer = 0 To Segmentos.Length - 1 Step 1
@@ -5718,7 +5683,7 @@ Public Class ClsContabilidad
CodigoCuenta.Append(Segmentos(i)) 'une tokens
Next
- Retorno = AddCuenta(IdCuentaPadre, CodigoCuenta.ToString, NombreCuenta, Tipo, CuentaMayor, 0, IdMoneda, CveAgrupadorSAT:=IdAgrupadorSAT)
+ Retorno = AddCuenta(CveCuentaPadre, CodigoCuenta.ToString, NombreCuenta, Tipo, CuentaMayor, 0, IdMoneda, CveAgrupadorSAT:=IdAgrupadorSAT)
Return Retorno
End Function
@@ -6678,32 +6643,6 @@ Public Class ClsContabilidad
- Public Function GetAnexoCatalogoMensualHorizontal(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean
- Dim Retorno = False
-
- DataAdapter("PA_Conta2_AnexoCatalogoMensualHorizontalGet")
-
- With SqlAdapter.SelectCommand.Parameters
- .Add("@FechaI", SqlDbType.Date).Value = FechaI
- .Add("@FechaF", SqlDbType.Date).Value = FechaF
- .Add("@IdCuentaPadre", SqlDbType.Int).Value = IdCuenta
- .Add("@Tipo", SqlDbType.Int).Value = TipoMovtos
- .Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
- .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
- .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
- .Add("@SAT", SqlDbType.Int).Value = SAT
- End With
-
- Try
- SqlAdapter.Fill(Data)
- Retorno = True
- Catch ex As Exception
- Me.OnError("Ocurrió un error al obtener el Anexo del Catalogo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- End Try
-
- Return Retorno
- End Function
-
Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean
Dim Retorno = False
diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb
index 36e99b747..22faff267 100644
--- a/App_Code/ClsMovimientos.vb
+++ b/App_Code/ClsMovimientos.vb
@@ -116,23 +116,6 @@ Public Class ClsMovimientos
End Sub
#Region "CxC"
- 'Public Function GetCxCCliente(CveCliente As Integer) As Boolean
- ' Dim Retorno As Boolean = False
- ' 'Data = New DataTable
- ' 'SqlAdapter = New SqlDataAdapter("PA_ClienteCxC", SqlConexion)
- ' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
- ' DataAdapter("PA_ClienteCxC")
- ' SqlAdapter.SelectCommand.Parameters.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
-
- ' Try
- ' SqlAdapter.Fill(Data)
- ' Retorno = True
- ' Catch ex As SqlException
- ' OnError("Ocurrió un error al consultar las CxC del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
- ' End Try
-
- ' Return Retorno
- 'End Function
Public Function GetCxCClienteDetalle(CveCliente As Integer, FechaI As String, FechaF As String, CveMoneda As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveClienteSucursal As Integer, Optional TipoDocto As String = "-1", Optional FechaCorte As Date = MaxFecha, Optional FechaVencimientoI As Date = MinFecha, Optional FechaVencimientoF As Date = MaxFecha) As Boolean
Dim Retorno As Boolean = False
diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb
index 744ccdac5..ec2e922cc 100644
--- a/App_Code/ClsRH.vb
+++ b/App_Code/ClsRH.vb
@@ -333,13 +333,14 @@ Public Class ClsRH
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean,
- chkAplicaUtilidades As Boolean, aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer) As Boolean
+ chkAplicaUtilidades As Boolean, aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer, Optional TipoCorto As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_AsistenciasInasistenciasAdd")
With SqlAdapter.SelectCommand.Parameters
- .Add("@Tipo", SqlDbType.VarChar).Value = Tipo
+ .Add("@Tipo", SqlDbType.VarChar).Value = Tipo
+ .Add("@TipoCorto", SqlDbType.VarChar).Value = TipoCorto
.Add("@AplicaFalta", SqlDbType.Bit).Value = AplicaFalta
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
@@ -374,13 +375,14 @@ Public Class ClsRH
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean,
- aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer) As Boolean
+ aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer, Optional TipoCorto As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_RH_AsistenciasInasistenciasUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@Tipo", SqlDbType.VarChar).Value = Tipo
+ .Add("@TipoCorto", SqlDbType.VarChar).Value = TipoCorto
.Add("@AplicaFalta", SqlDbType.Bit).Value = AplicaFalta
.Add("@AplicaAsistencia", SqlDbType.Bit).Value = AplicaAsistencia
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index 19e05fdb1..15c9c695b 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -5016,10 +5016,14 @@ Partial Class Bancos_IE
If ObjIE.UpdateComprobanteIE(Comprobante.Replace("."c, ""), CveIE) Then
Alert("El Comprobante se guardo exitosamente.", TipoMensaje.MsgInformacion)
+ HplComprobante.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta($"OP=IEComprobante&Comprobante={CveIE}.{Comprobante}"))
+ UpDatos.Update()
End If
ObjIE.Dispose()
+
+
End Sub
#End Region
diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx
index 09a6f4be6..005898a30 100644
--- a/Compras/eFacturas.aspx
+++ b/Compras/eFacturas.aspx
@@ -98,18 +98,36 @@
-
-
-
-
-
Folio:
-
-
-
Proveedor:
-
-
-
Fecha I.:
-
+
+
+
+
+
+
+
+
+
+
+
+
+ Folio:
+
+
+
+
+
+
+ Proveedor:
+
+
+
+
+
+
+ Fecha I.:
+
+
+
@@ -121,9 +139,13 @@
-
-
Fecha F.:
-
+
+
+
+ Fecha F.:
+
+
+
@@ -135,9 +157,13 @@
-
-
Estatus:
-
+
+
+
+ Estatus:
+
+
+
@@ -147,40 +173,61 @@
-
-
-
-
+
-
-
+
+
+
+
+
+
-
-
Responsable:
-
-
-
Clasificación:
-
-
-
Tipo Prov:
-
+
+
+
+ Responsable:
+
+
+
+
+
+
+ Clasificación:
+
+
+
+
+
+
+ Tipo Prov:
+
+
+
-
-
Tipo Comprobante
-
+
+
+
+ Tipo Comprobante:
+
+
+
-
-
+
+
+
+
@@ -213,11 +260,13 @@
-
-
-
-
-
+
+
+
+
+
+
@@ -262,7 +311,7 @@
+ ErrorMessage="ERROR: El campo ''Num. Reembolso'' es necesario, por favor ingreselo." ValidationGroup="GrpRegistraCompra">
@@ -287,6 +336,10 @@
+
+
+
@@ -299,6 +352,9 @@
+
+
@@ -308,6 +364,9 @@
+
+
@@ -318,9 +377,10 @@
-
-
-
+
+
+
diff --git a/Compras/eFacturas.aspx.vb b/Compras/eFacturas.aspx.vb
index 1c91c0c4b..783eb8d27 100644
--- a/Compras/eFacturas.aspx.vb
+++ b/Compras/eFacturas.aspx.vb
@@ -2,6 +2,7 @@
Option Explicit On
Imports System.Data
+Imports System.Data.SqlClient
Imports System.Diagnostics
Imports System.Globalization
Imports System.IO
@@ -10,17 +11,17 @@ Imports System.Net.Http
Imports System.Net.Http.Headers
Imports System.Threading
Imports System.Threading.Tasks
+Imports System.Windows.Forms.VisualStyles.VisualStyleElement
Imports System.Xml
Imports ADSistemaLibrary.SatXml
Imports ADSistemaLibrary.SatXml.XmlSatCFDI
-'Imports ADSNetLibrary.SIGAPI.Helpers
Imports ClsPaginas
-'Imports DocumentFormat.OpenXml.Spreadsheet
-'Imports DocumentFormat.OpenXml.Wordprocessing
Imports Extensiones
+Imports HigLabo
+Imports Microsoft.Owin.Security.Provider
Imports Microsoft.Reporting.WebForms
Imports Newtonsoft.Json.Linq
-Imports Telerik.Web.Apoc
+
Partial Class Compras_eFacturas
@@ -5172,8 +5173,8 @@ Partial Class Compras_eFacturas
End Sub
Private Sub CargaClasificaciones()
- DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
- DdlClasificacion.DataBind()
+ 'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
+ 'DdlClasificacion.DataBind()
End Sub
Private Sub CargaPS(CveClasificacion As Integer)
@@ -5181,7 +5182,8 @@ Partial Class Compras_eFacturas
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
- DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
+ 'DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
+ DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
DdlPS.SelectedText = ""
DdlPS.SelectedValue = "-1"
Else
@@ -5244,11 +5246,11 @@ Partial Class Compras_eFacturas
Case "2" ' F y E
DivPersonalReembolso.Visible = True
RfvTxtNumeroReembolso.Enabled = True
- TxtNumeroReembolso.Text = ""
+
Case "6" ' Caja Chica
DivCuentaCajaChicaReembolso.Visible = True
RfvTxtNumeroReembolso.Enabled = True
- TxtNumeroReembolso.Text = ""
+
End Select
UpRegistroFacturas.Update()
@@ -5317,86 +5319,74 @@ Partial Class Compras_eFacturas
Protected Sub BtnGuardarFacturas_Click(sender As Object, e As EventArgs)
+ Dim ErrorProceso As Boolean = False
+ Dim Contador As Integer = 0
+ Dim ErrorProcesoStr As String = ""
+
+
+
+ If Not DdlPS.SelectedValue.ToEntero > 0 Then
+ Alert("Debe seleccionar un producto", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
For Each GvRow As GridViewRow In GvD.Rows
- If GvRow.FCCheckBox("").Checked Then
+ If GvRow.FCCheckBox("chkRegistraFactura").Checked Then
Dim CFDIXmlPath As String = $"{UsuarioActual.Empresa.Ruta}Compras\{GvRow.DataKey("RFCDe")}\{GvRow.DataKey("XML")}"
If Not File.Exists(CFDIXmlPath) Then
+ ErrorProceso = True
Exit For
End If
Dim CompraActual As New Compra2(CFDIXmlPath, Compra2.EnumCargaCompra.DesdeArchivo, GlobalDTTiposGastos(UsuarioActual.CveEmpresa), UsuarioActual)
+ CompraActual.CveFactura = GvRow.DataKey("CveFactura").ToEntero
CompraActual.CveProveedor = GvRow.DataKey("CveProveedor").ToEntero
CompraActual.CveTipoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
- CompraActual.CveEstatusFactura = -1
- CompraActual.CvePrePoliza = -1
+ CompraActual.CveTipoConceptoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
CompraActual.TipoCompra = Compra2.EnumTipoCompra.Sin_definir
CompraActual.IEPSGasto = True
+ CompraActual.Descripcion = TxtDescripcionCompra.Text.Trim
+ CompraActual.NombreProveedor = GvRow.DataKey("NombreProveedor")
+ Dim CvePersonal As Integer = -1 'DdlPersonalReembolso.SelectedValue.ToEntero
+ Dim CveCajachica As Integer = -1 'DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero
- Dim ObjCompras As New ClsCompras
- Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL)
+ If RBLContado.SelectedValue.ToEntero = 6 Then
+ CveCajachica = DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero
+ Else
+ CvePersonal = DdlPersonalReembolso.SelectedValue.ToEntero
+ End If
- Dim ConceptoPoliza As String = String.Format("{0} - {1} - {2}", GvRow.DataKey("NombreProveedor"), GvRow.DataKey("SerieFolio"), "")
-
- CompraActual.CvePrePoliza = ObjConta.AddPrePolizas("eFacturas/Registrar", 1, CompraActual.Total, CompraActual.Total, CompraActual.CveMoneda, CompraActual.Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "", CveTipoPoliza:=3)
-
- CompraActual.ConfiguraRegistroRapidoReembolso(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlCuentaCajaChicaReembolso.SelectedValue.ToEntero, DdlPersonalReembolso.SelectedValue.ToEntero,
- DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero)
-
- 'CompraActual.AddCompra()
+ CompraActual.ConfiguraRegistroRapidoReembolso(DdlPS.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, CveCajachica, CvePersonal,
+ DdlRetIVAConcepto.SelectedValue.ToEntero, DdlRetISRConcepto.SelectedValue.ToEntero, NumeroReembolso:=TxtNumeroReembolso.Text)
+ If CompraActual.AddCompra() Then
+ Contador = Contador + 1
+ Else
+ ErrorProceso = True
+ ErrorProcesoStr = CompraActual.MSG_Error
+ Exit For
+ End If
-
-
- 'If ObjCompras.AddCompra"Fac", TxtDescripcion.Text.Trim, CompraActual.SerieFolio, CompraActual.Folio, CompraActual.FolioSecundario, CompraActual.CveProveedor, CompraActual.SubTotal, CompraActual.Descuentos,
- ' CompraActual.Amortizacion, CompraActual.IVA, CompraActual.RetIVA, CompraActual.RetISR, CompraActual.IEPS, CompraActual.OtrosImpuestos,
- ' CompraActual.Redondeo, CompraActual.Total, CompraActual.Fecha, CompraActual.CveMoneda, CompraActual.TipoCambio, If(CompraActual.FechaPago = Nothing, CompraActual.Fecha, CompraActual.FechaPago), CompraActual.AplicaNotaCredito, CompraActual.Observaciones, CompraActual.CveEstatusFactura,
- ' CompraActual.CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CompraActual.IdPoliza, CveCajaChica:=CompraActual.CveCajaChica, CvePersonal:=CompraActual.CvePersonal, NumeroReembolso:=CompraActual.NumeroReembolso, CveProveedorSucursal:=CompraActual.CveProveedorSucursal,
- ' AplicoPromocion:=CompraActual.AplicoPromocion, PorcentajeIVA:=CompraActual.PorcentajeIVA, CveMetodoPago:=CompraActual.CveMetodoPago, CveRetIVAConcepto:=CompraActual.CveRetIVAConcepto,
- ' CveConceptoContableAlmacen:=CompraActual.CveConceptoContableAlmacen,
- ' CveRetISRConcepto:=CompraActual.CveRetISRConcepto, NoDeducible:=CompraActual.NoDeducible, CveTipoCompra:=CompraActual.CveTipoCompra, TotalOriginal:=CompraActual.TotalOriginal, CveTipoConcepto:=CompraActual.CveTipoConcepto,
- ' EsImportacion:=CompraActual.EsImportacion, CveFactura:=CompraActual.CveFactura, CveSubProyecto:=CompraActual.CveSubProyectoPrincipal, DoctosRelacionados:=CompraActual.DocumentosRelacionadosUUIDSString, CveFolioGarantia:=CompraActual.CveFolioGarantia) Then
-
-
- ' CompraActual.CveCompra = ObjCompras.CveCompra
-
- ' If CompraActual.CveCompra > 0 Then
-
-
- ' 'For Each Row As DataRow In CompraActual.TmpDT.Rows
- ' ' If Not ObjCompras.AddCompraDetalle(CompraActual.CveCompra, Row("CveUM").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, -1, CveAF,
- ' ' Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal, Row("IVA").ToString.ToDecimal, Row("Total").ToString.ToDecimal, Row("Descuento").ToString.ToDecimal,
- ' ' Row("Obs").ToString, Row("CveOrdenCompraDetalle").ToString.ToEntero, TipoRecepcion, Row("CveContrato").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero,
- ' ' AplicaCostoIndirecto:=Row("AplicaCostoIndirecto").ToString.ToEntero, EstatusAlmacen:=Row("EntregaDirecta").ToString.ToEntero, CvePersonal:=CvePersonal,
- ' ' CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal,
- ' ' RetIVA:=Row("RetIVA").ToString.ToDecimal, RetISR:=Row("RetISR").ToString.ToDecimal, IEPSPS:=Row("IEPSPS").ToString.ToDecimal.RoundSQL, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDecimal,
- ' ' IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDecimal, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDecimal, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDecimal,
- ' ' IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDecimal, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDecimal, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False),
- ' ' CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CveCultivoCuadroDetalle:=Row("CveCultivoCuadroDetalle").ToString.ToEntero, CveActivoFijoCompra:=CveAFC) Then
-
- ' ' ErrorDetalles = True
- ' ' Exit For
- ' ' End If
- ' 'Next
-
-
-
- ' End If
-
-
- 'End If
-
-
-
- ObjCompras.RollBack()
End If
Next
+
+ If Not ErrorProceso Then
+ CargaDatos()
+ If Contador > 0 Then
+ Alert($"Se registraron {Contador} Compras")
+ End If
+ Else
+ Alert($"Se registraron {Contador} Compras. error {ErrorProcesoStr}", TipoMensaje.MsgAdvertencia)
+ End If
+
+
+
End Sub
End Class
@@ -5458,7 +5448,7 @@ Public Class Compra2
Public Property TC As Decimal = 1
Public Property SubTotal As Decimal = 0D
Public Property SubTotal2 As Decimal = 0D
- Public Property Descuentos As Decimal = 0D
+ Public Property Descuento As Decimal = 0D
Public Property Total As Decimal = 0D
Public Property Moneda As String = ""
Public Property TipoComprobante As String
@@ -5584,14 +5574,14 @@ Public Class Compra2
Public Property CveMetodoPago As Integer
Public Property MetodoPago As String
- Public Property DocumentosRelacionadosUUIDSList As List(Of String)
+ Public Property DocumentosRelacionadosUUIDSList As List(Of String) = New List(Of String)
Public ReadOnly Property DocumentosRelacionadosUUIDSString As String
Get
Return GeneraStringDoctosRelacionados()
End Get
End Property
- Public Property DocumentosRelacionadosAnticiposUUIDList As List(Of String)
+ Public Property DocumentosRelacionadosAnticiposUUIDList As List(Of String) = New List(Of String)
Public Property TieneAnticiposXML As Boolean = False
Public Property EmisorRFC As String
Public Property ReceptorRFC As String
@@ -5636,7 +5626,7 @@ Public Class Compra2
Public Property TmpDT As DataTable = New DataTable
Public Property SubTotalConceptos As Decimal = 0D
- Private Errores As StringBuilder
+ Private Errores As StringBuilder = New StringBuilder
Public ReadOnly Property MSG_Error As String
Get
@@ -5660,6 +5650,11 @@ Public Class Compra2
Public Property OtrosImpuestosGasto As Boolean = False
Public Property OCVinculada As Boolean = False
Public Property NumNoDed As Integer = 0
+ Public Property CveTipoPoliza As Integer = -1
+ Public Property NombreProveedor As Object
+ Public Property CveCreditoDetalle As Integer = -1
+ Public Property CveIE As Integer = -1
+ Public Property CveCompraAmortizacion As Integer = -1
Public Sub New(XmlFuente As String, OpcionCarga As EnumCargaCompra, DTTiposGastos As DataTable, UsuarioActual As Usuario)
@@ -5752,7 +5747,7 @@ Public Class Compra2
Fecha = ValorXML(nodo, "fecha").ToDate
SubTotal = ValorXML(nodo, "subTotal").ToDecimal
Total = ValorXML(nodo, "total").ToDecimal
- Descuentos = ValorXML(nodo, "descuento").ToDecimal
+ Descuento = ValorXML(nodo, "descuento").ToDecimal
Moneda = ValorXML(nodo, "Moneda")
CveMoneda = GlobalDTMonedas().FiltroPrimeroValor("CveMoneda", $" AbreviaturaSAT = '{Moneda}' ").ToEntero
@@ -5955,8 +5950,8 @@ Public Class Compra2
Next
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
- Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:{0}", ProductosCodigoSATNoPermitidos.ToString)
- Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
+ Errores.AppendLine($"El comprobante contiene productos con código SAT '01010101', revise los productos:{ProductosCodigoSATNoPermitidos.ToString}")
+
End If
Else
GuardaLog($"Error al cargar detalles GetFacturasComparacionXML.")
@@ -5977,19 +5972,22 @@ Public Class Compra2
End If
-
+ Me.PorcentajeIVA = TmpDT.MAX("IVAPorcentaje").ToDecimal
#End Region
End Sub
- Public Function ConfiguraRegistroRapidoReembolso(CvePS As Integer, CveSubProyecto As Integer, CveCajaChica As Integer, CvePersonal As Integer, CveRetIVAConcepto As Integer, CveRetISRConcepto As Integer) As Boolean
+ Public Function ConfiguraRegistroRapidoReembolso(CvePS As Integer, CveSubProyecto As Integer, CveCajaChica As Integer, CvePersonal As Integer, CveRetIVAConcepto As Integer, CveRetISRConcepto As Integer, NumeroReembolso As String) As Boolean
Dim respuesta As Boolean = True
Me.CveSubProyecto = CveSubProyecto
+ Me.CveSubProyectoPrincipal = CveSubProyecto
Me.CveCajaChica = CveCajaChica
Me.CvePersonal = CvePersonal
Me.CveRetIVAConcepto = CveRetIVAConcepto
Me.CveRetISRConcepto = CveRetISRConcepto
+ Me.CveTipoPoliza = 3
+ Me.NumeroReembolso = NumeroReembolso
Dim dRowSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
@@ -6015,32 +6013,40 @@ Public Class Compra2
If respuesta AndAlso IEPS > 0 Then
If Not AgregaIEPSReembolso(CvePS:=CvePS) Then
respuesta = False
+ Else
+ IEPS = 0
End If
End If
- If respuesta Then
+ If Not AjustesValidacion() Then
+ respuesta = False
+ End If
- 'VALIDA IMPORTES
- If Not ValidaTotalesGuardar() Then
- respuesta = False
- End If
+ Return respuesta
- If Not AjustaCombustibles() Then
- respuesta = False
- End If
+ End Function
- If Not AjustaIVA() Then
- respuesta = False
- End If
+ Private Function AjustesValidacion() As Boolean
+ Dim respuesta = True
+ 'VALIDA IMPORTES
+ If Not ValidaTotalesGuardar() Then
+ respuesta = False
+ End If
- If Not AjustaRetIVA() Then
- respuesta = False
- End If
+ If Not AjustaCombustibles() Then
+ respuesta = False
+ End If
- If Not AjustaRetISR() Then
- respuesta = False
- End If
+ If Not AjustaIVA() Then
+ respuesta = False
+ End If
+ If Not AjustaRetIVA() Then
+ respuesta = False
+ End If
+
+ If Not AjustaRetISR() Then
+ respuesta = False
End If
Return respuesta
@@ -6074,7 +6080,7 @@ Public Class Compra2
TempSubTotal = SubTotal
SubTotalOriginal = SubTotal
SubTotal2Original = SubTotal2
- TempDescuentos = Descuentos + Amortizacion
+ TempDescuentos = Descuento + Amortizacion
TempSubTotal2 = TempSubTotal - TempDescuentos
TempIVA = IVA
TempIEPS = IEPS
@@ -6108,7 +6114,7 @@ Public Class Compra2
DiferenciaSubtotales = SubTotal2Original.ToString.ToDecimal - TmpDT.SUM("Total").ToString.ToDecimal
'[IPP] PARCHE: Factura TELMEX para APH 12/ENERO/2018
If CveFactura = 286290 Then
- DiferenciaSubtotales += Descuentos
+ DiferenciaSubtotales += Descuento
End If
If Math.Abs(DiferenciaSubtotales) > 1 And Not CompraNoDeducible = 1 Then 'EsNoDeducible
Errores.AppendLine("Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.")
@@ -6563,6 +6569,9 @@ Public Class Compra2
Errores.AppendLine("Debe seleccionar al menos un impuesto. ")
End If
+
+ CalculaTotales()
+
Return respuesta
End Function
@@ -6635,10 +6644,7 @@ Public Class Compra2
Me.SubTotal = Math.Round(SubTotalIEPS, 2)
Me.SubTotalConceptos = Math.Round(SubTotalIEPS, 2)
- 'If SubTotalR <> SubTotalIEPS Then
- ' Dim IA As Decimal = SubTotalR - SubTotalIEPS
- ' AjustaImporteUltimoConcepto(IA)
- 'End If
+
PSS.Dispose()
End Sub
@@ -6747,7 +6753,7 @@ Public Class Compra2
Row("TipoAF") = -1
Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
Row("EntregaDirecta") = EntregaDirecta
- 'If GlobalDTProductosServiciosEquivalencias(CvePS, CveUM).Rows.Count = 0 Then Row("CveEq") = 1 Else Row("CveEq") = 0
+
Row("NoDeducible") = NoDeducible
@@ -6814,7 +6820,6 @@ Public Class Compra2
Row("CveClasificacionOG") = CveClasificacionOG
End If
- ' CveProgramaOperativo AS Integer = -1, Optional CveUnidadAdministrativa, Optional CveUnidadAdministrativa AS Integer = -1,, Optional CveFuenteFinanciamiento AS Integer = -1, Optional CveTipoGastoAC AS Integer = -1, Optional CveClasificacionOG AS Integer = -1,
'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere
If (CveFactura > 0 Or CveCompra > 0) And IEPS = 0 Then
@@ -6852,11 +6857,8 @@ Public Class Compra2
LocalIVA = If(TmpDT.SUM("IVA") > 0, LocalSubTotalIVA + LocalSubTotalIEPSIVA, 0)
End If
-
- 'If CalculaIVA Then IVA = TxtIVA.Text.ToDouble
LocalDescuentos = TmpDT.SUMD("Descuento")
- '[IPP] SI YA ES COMPRA REGISTRADA NO CONSIDERA LA AMORTIZACIÓN PARA EL CALCULO DE TOTAL
If Not CveCompra > 0 Then
LocalAmortizacion = Me.Amortizacion
End If
@@ -6867,14 +6869,14 @@ Public Class Compra2
Retenciones += LocalRetISR
- LocalSubTotal2 = LocalSubTotal - LocalDescuentos ' - Amortizacion '[IPP] COMENTADO CASO JAM 12653 CON NC 27122 | 23/MAYO/2018
+ LocalSubTotal2 = LocalSubTotal - LocalDescuentos
LocalTotal = LocalSubTotal2 + LocalIVA + LocalIEPSPS - Retenciones
'ASIGNAMOS VALORES A VISTA
If CveCompra > 0 Or CveFactura > 0 Or Me.OCVinculada Then
SubTotal = LocalSubTotal
SubTotal2 = LocalSubTotal2
- Descuentos = LocalDescuentos
+ Descuento = LocalDescuentos
If EsNoDeducible Then
IVA = LocalIVA
@@ -6888,7 +6890,7 @@ Public Class Compra2
SubTotal = LocalSubTotal
SubTotal2 = LocalSubTotal2
IVA = LocalIVA
- Descuentos = LocalDescuentos
+ Descuento = LocalDescuentos
RetIVA = LocalRetIVA
RetISR = LocalRetISR
IEPS = LocalIEPSPS
@@ -6898,39 +6900,10 @@ Public Class Compra2
End If
- 'CUANDO SEA COMPRA, FACTURA O VENGA DE VINCULACIÓN OC NO SE MODIFICAN VALORES
- 'SE VERIFICA SI ALGUN DATO ES DIFERENTE PARA MOSTRAR COLUMNA CON VALORES ORIGINALES
- 'If (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) And Not EsNoDeducible Then
- ' If LocalSubTotal <> SubTotalOriginal Then
- ' OriginalesVisible(True)
- ' LbSubTotalOriginal.Text = SubTotalOriginal.ToString.FormatoNumero(2)
- ' Else
- ' OriginalesVisible(False)
- ' End If
- 'End If
- 'If Not CveCompra > 0 Then 'cuando se está registrando manualmente y se va amortizar
- ' LblSaldoFactura.Text = TxtTotal.Text.FormatoNumero
- ' UpAnticipos.Update()
- 'End If
-
- 'LblRetIVA.Text = If(TxtRetIVA.Text.ToDecimal > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
- 'LblRetISR.Text = If(TxtRetISR.Text.ToDecimal > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
-
- 'IMPORTES DE RESTRICCION
- 'TxtDocumentoImporteFE.Text = LocalTotal.ToString.FormatoNumero(2)
- 'RVDocumentoImporte.MaximumValue = LocalTotal.ToString.FormatoNumero(2)
- 'RVDocumentoImporteFE.MaximumValue = RVDocumentoImporte.MaximumValue
- 'RVDocumentoImporteCaja.MaximumValue = RVDocumentoImporte.MaximumValue
-
- 'CargaRetIVAConcepto()
- 'CargaRetISRConcepto()
Me.NumNoDed = TmpDT.COUNT("CvePS", "NoDeducible = True ")
- 'If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 Then
- ' InicializaAplicaNCFact()
- 'End If
End Sub
@@ -6951,8 +6924,7 @@ Public Class Compra2
End Try
- 'BANDERA
- 'Dim AplicaCalculaTotales = False
+
'DATOS GENERALES
DrPS("Obs") = ""
@@ -7000,73 +6972,14 @@ Public Class Compra2
DrPS("CveCultivoCuadroDetalle") = -1
DrPS("TemporadaCuadro") = ""
- 'RESPETAR VALORES DE LA PANTALLA
- 'IVA = PSRow("IVA").ToString.ToDouble
- 'If IVA = -1 Then
- ' IVA = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero()).FiltroPrimeroValor("IVA").ToDouble
- 'End If
- 'RetIVA = If(PSRow("RetIVA").ToString = "-1", ViewState("RetIVA"), PSRow("RetIVA").ToString).ToString.ToDouble
- 'RetISR = If(PSRow("RetISR").ToString = "-1", ViewState("RetISR"), PSRow("RetISR").ToString).ToString.ToDouble
- 'IEPSPS = If(PSRow("IEPSPorcentaje").ToString = "-1", ViewState("IEPSPS"), PSRow("IEPSPorcentaje").ToString).ToString.ToDouble
- 'IEPSPSIVA = If(PSRow("IEPSGrabaIVA").ToString = "True", PSRow("IEPSPorcentaje").ToString.ToDouble, 0)
+
Else
Errores.AppendLine($"No se encontrol el producto con CvePS {CvePS}")
Respuesta = False
End If
- 'UM
-
- 'TIPO DE GASTO
-
-
-
-
- 'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!!
- 'Dim IVA = (TxtIVAModal.Text.ToDouble / 100)
- 'Dim IVA = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2)
- 'Dim RetISR = (TxtRetISRModal.Text.ToDecimal / 100)
- 'Dim RetIVA = (TxtRetIVAModal.Text.ToDecimal / 100)
- 'Dim IEPSPS = (TxtIEPSModal.Text.ToDecimal / 100)
- 'Dim IEPSPSIVA = 0
-
- 'I f Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then
- 'If DdlIVA.SelectedValue.ToDouble = 0 Then DrPS("IVA") = 0 Else DrPS("IVA") = IVA * Total
-
- 'If CveFactura > 0 And TxtIVA.Text.ToDecimal = 0 Then
- ' DrPS("IVA") = 0
- ' DrPS("IVAPorcentaje") = 0
- 'Else
-
- ' If ActualizarIva Then
- ' DrPS("IVA") = (IVA * Total).RoundSQL
- ' End If
-
- ' DrPS("IVAPorcentaje") = IVA
- 'End If
-
- 'DrPS("RetIVA") = (RetIVA * Total).RoundSQL
- 'DrPS("RetIVAPorcentaje") = RetIVA
- 'DrPS("RetISR") = RetISR * Total
- 'DrPS("RetISRPorcentaje") = RetISR
- 'DrPS("IEPSPS") = (IEPSPS * Total).RoundSQL
- 'DrPS("IEPSPSPorcentaje") = IEPSPS
- 'DrPS("IEPSPSIVA") = (IEPSPSIVA * Total).RoundSQL
- 'DrPS("IEPSPSIVAPorcentaje") = IEPSPSIVA
-
-
-
- 'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere
- 'If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 Then
- ' DrPS("IEPSPS") = 0
- ' DrPS("IEPSPSPorcentaje") = 0
- 'End If
-
-
-
-
- 'AplicaCalculaTotales = True
TmpDT.AcceptChanges()
Return Respuesta
End Function
@@ -7074,19 +6987,6 @@ Public Class Compra2
- 'Private Function AsignarPSReembolso(CvePS As Integer) As Boolean
-
- ' Dim respuesta As Boolean
-
- ' If Not CvePS > 0 Then
- ' Errores.AppendLine("AsignarPSReembolso el CvePS debe de ser matoy a 0,")
- ' Return False
- ' End If
-
-
- ' Return respuesta
-
- 'End Function
Private Sub ValidacionesTotalesXml()
@@ -7106,7 +7006,7 @@ Public Class Compra2
Dim TotalTemp As Decimal = Subtotal2Temp - RetIVATemp - RetISRTemp + Math.Round(IVATemp, 6) + IEPSTemp + OtrosImpuestos - OtrosImpuestosRetenciones
- If Math.Abs(Math.Round(DescuentosTemp, 6) - Math.Round(Descuentos, 6)) > 0.01 Then
+ If Math.Abs(Math.Round(DescuentosTemp, 6) - Math.Round(Descuento, 6)) > 0.01 Then
Msg &= String.Format("- Los descuentos del detalle no coinciden con el descuento general ")
End If
@@ -7133,8 +7033,8 @@ Public Class Compra2
If Msg <> "" Then
Errores.AppendLine($" El comprobante XML presenta las siguientes inconsistencias:{Msg}. ")
Else
- '[IPP] IGUALAMOS VALORES PARA RESPETAR LOS DEL XML EN CASO DE DIF DE 0.01
- DescuentosTemp = Descuentos
+
+ DescuentosTemp = Descuento
IVATemp = TrasladoIVA
TotalTemp = Total
RetIVATemp = RetencionIVA
@@ -7142,87 +7042,20 @@ Public Class Compra2
IEPSTemp = TrasladoIEPS
End If
- If TrasladoIEPS > 0 Or OtrosImpuestos > 0 Then
-
- If OtrosImpuestos > 0 Or TrasladoIEPS > 0 Then
-
- 'If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
- ' 'Si tiene funcionalidad y es Acreedor se muestra modal
- ' If CveTipoProveedor.Contiene(2, 3) Then ' Acreedor
- ' RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
- ' End If
- 'Else
- ' 'Si no tiene funcionalidad y es proveedor se muestra
- ' RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
-
- 'End If
-
- 'Else
- ' RegistraScript("$('#ModalIEPS').modal('show');")
- 'BtnCancelarotrosImpuestos.Visible = True
- End If
+ Me.SubTotal = SubtotalTemp
+ Me.Descuento = DescuentosTemp
+ Me.SubTotal2 = Subtotal2Temp
+ Me.IVA = IVATemp
+ Me.Total = TotalTemp
+ Me.RetIVA = RetIVATemp
+ Me.RetISR = RetISRTemp
+ Me.IEPS = IEPSTemp
- If TrasladoIEPS > 0 Then
- 'ChkIEPS.Visible = True
- 'ChkIEPS.Checked = True
- 'DdlConceptoIEPS.Visible = True
- 'CargaProductos(DdlConceptoIEPS, If(UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero, -1))
- 'LbImporte.Text = "$" + TrasladoIEPS.ToString
- End If
- If OtrosImpuestos > 0 Then
- 'ChkOtrosI.Visible = True
- 'ChkOtrosI.Checked = True
- 'DdlConceptoOI.Visible = True
- 'CargaProductos(DdlConceptoOI, If(UsuarioActual.Empresa.Funcionalidad(305).ToString.ToEntero > 0, UsuarioActual.Empresa.Funcionalidad(305).ToString.ToEntero, -1))
- 'LbImporte2.Text = "$" + OtrosImpuestos.ToString
- End If
- End If
-
- 'TxtSubTotal.Text = SubtotalTemp.FormatoNumero
- 'TxtDescuento.Text = DescuentosTemp.FormatoNumero
- 'TxtSubTotal2.Text = Subtotal2Temp.FormatoNumero
- 'TxtIVA.Text = IVATemp.FormatoNumero
- 'TxtTotal.Text = TotalTemp.FormatoNumero
- 'TxtRetIVA.Text = RetIVATemp.FormatoNumero
- 'TxtRetISR.Text = RetISRTemp.FormatoNumero
- 'TxtIEPS.Text = IEPSTemp.FormatoNumero
-
- 'TrDescuento.Visible = DescuentosTemp > 0
- 'TrIEPS.Visible = IEPSTemp > 0
- 'TrRetIVA.Visible = RetIVATemp > 0
- 'TrRetISR.Visible = RetISRTemp > 0
-
- 'TxtSubTotal.Enabled = False
- 'TxtDescuento.Enabled = False
- 'TxtSubTotal2.Enabled = False
- 'TxtIVA.Enabled = False
- 'TxtTotal.Enabled = False
- 'TxtRetIVA.Enabled = False
- 'TxtRetISR.Enabled = False
- 'TxtIEPS.Enabled = False
-
- 'HfTotalCompra.Value = TotalTemp.ToString
- 'CompraSaldo = TotalTemp
- 'CalculaTotalPorDevengar()
- 'TxtDocumentoImporteFE.Text = TotalTemp.ToString
- 'RVDocumentoImporte.MaximumValue = Math.Round(TotalTemp, 2).ToString
- 'RVDocumentoImporteFE.MaximumValue = RVDocumentoImporte.MaximumValue
- 'RVDocumentoImporteCaja.MaximumValue = RVDocumentoImporte.MaximumValue
- 'TxtDocumentoImporte.Text = TotalTemp.FormatoNumero
- 'TxtDocumentoImporteCaja.Text = TotalTemp.FormatoNumero
- 'TxtOtrosImpuestos.Text = OtrosImpuestos.FormatoNumero
- 'If OtrosImpuestos > 0 Then TrOtrosImpuestos.Visible = True
- 'If OtrosImpuestosRetenciones > 0 Then TrOtrosImpuestos.Visible = True : TxtOtrosImpuestos.Text = (-OtrosImpuestosRetenciones).FormatoNumero
- 'HFDiferenciaCompra.Value = TxtTotal.Text
- 'HdnCompraSaldo.Value = TotalTemp.ToString
CompraSaldo = TotalTemp
- 'LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
- 'LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
- 'ASIGNA VALORES ORIGINALES PARA GUARDAR
AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total)
End Sub
@@ -7241,9 +7074,7 @@ Public Class Compra2
If ImporteAjuste = 0 Then Exit Sub
Dim Amortizacion As Decimal = 0
- 'If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
- ' Amortizacion = LblAmortizacion.Text.ToDecimal
- 'End If
+
If TmpDT.Rows.Count > 0 Then ' si hay movimientos y si esta afectando al total, que se haga el ajuste
Dim Indice As Integer = If(TmpDT.Rows(TmpDT.Rows.Count - 1)("CvePS").ToString = UsuarioActual.Empresa.Funcionalidad(112).ToString, TmpDT.Rows.Count - 2, TmpDT.Rows.Count - 1)
@@ -7267,16 +7098,13 @@ Public Class Compra2
TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU
TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDecimal + ImporteAjuste
TmpDT.Rows(Indice)("IEPSPS") = (TmpDT.Rows(Indice)("Total").ToString.ToDecimal() * TmpDT.Rows(Indice)("IEPSPSPorcentaje").ToString.ToDecimal()).RoundAD(2)
- 'TmpDT.Rows(Indice)("IVA") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal
TmpDT.Rows(Indice)("IVA") = (TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal - TmpDT.Rows(Indice)("Descuento").ToString.ToDecimal) * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal
- 'Row("IEPSPS") = Math.Round(IEPSPS, DecimalesPermitidos)
- 'Row("IEPSPSPorcentaje") = PorcentajeIEPS
TmpDT.AcceptChanges()
End If
SubTotal = TmpDT.SUMD("Total")
If Not EsCarga Then
- Descuentos = TmpDT.SUMD("Descuento")
+ Descuento = TmpDT.SUMD("Descuento")
End If
SubTotalConceptos = SubTotal
@@ -7321,6 +7149,262 @@ Public Class Compra2
End If
End Function
+
+
+
+ Public Function AddCompra() As Boolean
+
+ If Not AjustesValidacion() Then
+ Return False
+ End If
+
+ Dim respuesta As Boolean = True
+
+
+ Dim ObjCompras As New ClsCompras
+ ObjCompras.IniciaTransacSQL()
+
+ If Not AddPrepolizaCabecera(ObjCompras.IniciaTransacSQL()) Then
+ respuesta = False
+ End If
+
+ If respuesta And ObjCompras.AddCompra("Fac", Me.Descripcion, Me.Serie, Me.Folio, Me.FolioSecundario, Me.CveProveedor, Me.SubTotal, Me.Descuento,
+ Me.Amortizacion, Me.IVA, Me.RetIVA, Me.RetISR, Me.IEPS, Me.OtrosImpuestos,
+ Me.Redondeo, Me.Total, Me.Fecha, Me.CveMoneda, Me.TipoCambio, If(Me.FechaPago = Nothing, Me.Fecha, Me.FechaPago), Me.AplicaNotaCredito, Me.Observaciones, Me.CveEstatusFactura,
+ Me.CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Me.IdPoliza, CveCajaChica:=Me.CveCajaChica, CvePersonal:=Me.CvePersonal, NumeroReembolso:=Me.NumeroReembolso, CveProveedorSucursal:=Me.CveProveedorSucursal,
+ AplicoPromocion:=Me.AplicoPromocion, PorcentajeIVA:=Me.PorcentajeIVA, CveMetodoPago:=Me.CveMetodoPago, CveRetIVAConcepto:=Me.CveRetIVAConcepto,
+ CveConceptoContableAlmacen:=Me.CveConceptoContableAlmacen,
+ CveRetISRConcepto:=Me.CveRetISRConcepto, NoDeducible:=Me.NoDeducible, CveTipoCompra:=Me.CveTipoCompra, TotalOriginal:=Me.TotalOriginal, CveTipoConcepto:=Me.CveTipoConcepto,
+ EsImportacion:=Me.EsImportacion, CveFactura:=Me.CveFactura, CveSubProyecto:=Me.CveSubProyectoPrincipal, DoctosRelacionados:=Me.DocumentosRelacionadosUUIDSString, CveFolioGarantia:=Me.CveFolioGarantia) Then
+ Me.CveCompra = ObjCompras.CveCompra
+ Else
+ respuesta = False
+ End If
+
+
+ If respuesta AndAlso Me.CveCompra > 0 Then
+
+ For Each Row As DataRow In Me.TmpDT.Rows
+
+ Dim TipoRecepcion As Integer = -1
+ Dim Referencia = ""
+ Dim EsNoDeducible As Boolean = False
+ Dim CveAF = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 1, Row("CveActivoFijo").ToString.ToEntero, -1)
+ Dim CveAFC = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 2, Row("CveActivoFijo").ToString.ToEntero, -1)
+
+ If Not ObjCompras.AddCompraDetalle(Me.CveCompra, Row("CveUM").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, -1, CveAF,
+ Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal, Row("IVA").ToString.ToDecimal, Row("Total").ToString.ToDecimal, Row("Descuento").ToString.ToDecimal,
+ Row("Obs").ToString, Row("CveOrdenCompraDetalle").ToString.ToEntero, TipoRecepcion, Row("CveContrato").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero,
+ AplicaCostoIndirecto:=Row("AplicaCostoIndirecto").ToString.ToEntero, EstatusAlmacen:=Row("EntregaDirecta").ToString.ToEntero, CvePersonal:=CvePersonal,
+ CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal,
+ RetIVA:=Row("RetIVA").ToString.ToDecimal, RetISR:=Row("RetISR").ToString.ToDecimal, IEPSPS:=Row("IEPSPS").ToString.ToDecimal.RoundSQL, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDecimal,
+ IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDecimal, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDecimal, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDecimal,
+ IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDecimal, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDecimal, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False),
+ CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CveCultivoCuadroDetalle:=Row("CveCultivoCuadroDetalle").ToString.ToEntero, CveActivoFijoCompra:=CveAFC) Then
+
+ respuesta = False
+ Exit For
+ End If
+ Next
+ End If
+
+ If respuesta Then
+ If Not AddPrepolizaDetalles(transaccion:=ObjCompras.IniciaTransacSQL()) Then
+ respuesta = False
+ End If
+ End If
+
+
+ Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL())
+ If respuesta AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
+ If ObjConta.ValorPolizaDescuadre > 0 Then
+ Errores.AppendLine($"eFacturas/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}.")
+ GuardaLogAD($"eFacturas/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
+ respuesta = False
+ End If
+ End If
+
+ If respuesta Then
+ If Not ObjCompras.UpdateCompraFactura(Me.CveCompra, Me.CveFactura, Me.Serie, Me.Folio) Then
+ respuesta = False
+ End If
+ End If
+
+
+ If respuesta Then
+ ObjCompras.Commit()
+ Else
+ ObjCompras.RollBack()
+ End If
+
+ ObjCompras.Dispose()
+
+
+ Return respuesta
+ End Function
+
+
+
+ Private Function AddPrepolizaCabecera(Optional transaccion As SqlTransaction = Nothing) As Boolean
+
+ Dim respuesta As Boolean = False
+
+ Dim ObjConta As ClsContabilidad
+ Dim DisposeClases As Boolean
+
+
+ If transaccion IsNot Nothing Then
+ ObjConta = New ClsContabilidad(transaccion)
+ DisposeClases = False
+ Else
+ ObjConta = New ClsContabilidad
+ DisposeClases = True
+ End If
+
+
+ Dim ConceptoPoliza As String = String.Format("{0} - {1} - {2}", NombreProveedor, SerieFolio, "")
+ Me.CvePrePoliza = ObjConta.AddPrePolizas("eFacturas/Registrar", 1, Me.Total, Me.Total, Me.CveMoneda, Me.Fecha, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, "", CveTipoPoliza:=Me.CveTipoPoliza)
+ respuesta = If(Me.CvePrePoliza > 0, True, False)
+
+
+ If DisposeClases Then
+ ObjConta.Dispose()
+ End If
+
+
+ Return respuesta
+
+ End Function
+
+ Private Function AddPrepolizaDetalles(transaccion As SqlTransaction) As Boolean
+ Dim respuesta As Boolean = True
+
+ Dim ObjConta As ClsContabilidad
+ Dim DisposeClases As Boolean
+
+
+ If transaccion IsNot Nothing Then
+ ObjConta = New ClsContabilidad(transaccion)
+ DisposeClases = False
+ Else
+ ObjConta = New ClsContabilidad
+ DisposeClases = True
+ End If
+
+ Dim Concepto As String = $"{Me.NombreProveedor} {Me.SerieFolio}"
+ Dim Referencia As String = Me.SerieFolio
+
+ 'TC del xml
+
+ '6
+ For Each RowDetalle As DataRow In TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "CveSubProyecto"}).Rows
+
+ Dim importe = TmpDT.SUMD("Total", $" CveClasificacion = {RowDetalle("CveClasificacion").ToString} AND CveSubProyecto = {RowDetalle("CveSubProyecto").ToString}")
+ Dim importeMN = importe * Me.TipoCambio
+
+
+ If importeMN <> 0 Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, Referencia, 6, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=Me.CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(TipoCambio = 1, 0, importe), TipoCambio:=TipoCambio,
+ CveClasificacion:=RowDetalle("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=RowDetalle("CveSubProyecto").ToString().ToEntero(), Contabilizable:=True) Then
+ respuesta = False
+ Exit For
+ End If
+ End If
+
+ Next
+
+ '14
+ If Me.IVA > 0 Then
+ Dim importeMovimiento As Decimal = Me.IVA
+ Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, 14, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=Me.PorcentajeIVA, Contabilizable:=True) Then
+ respuesta = False
+ End If
+
+ End If
+
+ '25
+ If Me.IEPS > 0 Then
+ Dim importeMovimiento As Decimal = Me.IEPS
+ Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, 25, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
+ respuesta = False
+ End If
+
+ End If
+
+
+ If Me.RetIVA > 0 Then
+ Dim importeMovimiento As Decimal = Me.RetIVA
+ Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
+ Dim ret As ConceptosRetenciones = ConceptoPrePolizaRetIVA
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, ret.CveConceptoxAcreditar, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
+ respuesta = False
+ End If
+ End If
+
+ If Me.RetISR > 0 Then
+ Dim importeMovimiento As Decimal = Me.RetISR
+ Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
+ Dim ret As ConceptosRetenciones = ConceptoPrePolizaRetISR
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, ret.CveConceptoxAcreditar, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
+ respuesta = False
+ End If
+ End If
+
+
+ '5
+ If respuesta Then
+
+
+ Dim importeMovimiento As Decimal = Me.Total
+ Dim importeMN As Decimal = importeMovimiento * Me.TipoCambio
+ Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(1, Me.CveMoneda, False, Me.CveTipoConceptoProveedor)
+ Dim ImporteME = importeMovimiento
+
+ Dim UsaComplementaria As Boolean = True
+ If Me.CveMoneda > 1 Then ImporteME = importeMovimiento
+
+ If UsuarioActual.CveEmpresa.Contiene(13, 83) Then 'caso excepcional de complementarias
+ UsaComplementaria = False
+ importeMN = importeMovimiento * Me.TipoCambio
+ Else
+ importeMN = importeMovimiento
+ End If
+
+
+ If respuesta AndAlso Me.CveMoneda > 1 AndAlso UsaComplementaria Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, 0, (importeMovimiento * TipoCambio - importeMovimiento).RoundSQL, ConPreP.CveConceptoComplementario, Referencia, Concepto, -1, CveCompra:=Me.CveCompra, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=Me.CvePersonal, CveCompraAmortizacion:=Me.CveCompraAmortizacion, TipoCambio:=Me.TipoCambio, TipoCambioPago:=1, ImporteME:=ImporteME, CveSubProyecto:=Me.CveSubProyecto) Then
+ respuesta = False
+ End If
+ End If
+
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importeMovimiento, Referencia, ConPreP.CveConcepto, Concepto, Me.Fecha, -1, -1, CveCompra:=CveCompra, CveSubProyecto:=Me.CveSubProyectoPrincipal, CveProveedor:=Me.CveProveedor, CveIE:=Me.CveIE, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(Me.TipoCambio = 1, 0, importeMovimiento), TipoCambio:=Me.TipoCambio, PorcentajeImpuesto:=0, Contabilizable:=True) Then
+ respuesta = False
+ End If
+
+ End If
+
+
+ If DisposeClases Then
+ If respuesta Then
+ ObjConta.Commit()
+ Else
+ ObjConta.RollBack()
+ End If
+
+ ObjConta.Dispose()
+ End If
+
+
+ Return respuesta
+
+ End Function
+
End Class
diff --git a/Contabilidad2/RepAnexoCatalogoCC.aspx b/Contabilidad2/RepAnexoCatalogoCC.aspx
index 0b43246e7..d459f114b 100644
--- a/Contabilidad2/RepAnexoCatalogoCC.aspx
+++ b/Contabilidad2/RepAnexoCatalogoCC.aspx
@@ -63,52 +63,62 @@
-
- Ejercicio:
+
+ Fecha Inicio:
+
+
+
+
+
+
+
-
-
-
-
- Periodo:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ Fecha Fin:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
>
+
+
+
+
+
+
Divisor:
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Contabilidad2/RepAnexoCatalogoCC.aspx.vb b/Contabilidad2/RepAnexoCatalogoCC.aspx.vb
index c2a05511a..acd3de93f 100644
--- a/Contabilidad2/RepAnexoCatalogoCC.aspx.vb
+++ b/Contabilidad2/RepAnexoCatalogoCC.aspx.vb
@@ -95,12 +95,10 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
InicializaValores()
- CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
-
- DdlEjercicio.SelectedValueExist(EjercicioParametro.ToString)
+ CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
+
DdlSubProyecto.SelectedValueExist(SubProyectoParametro.ToString)
- DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
- DdlPeriodo.SelectedValueExist(Periodo)
+ DdlDivisor.SelectedValueExist(DivisorParametro.ToString)
If CveCuenta > 0 Then
@@ -117,46 +115,17 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
#Region " INICIALIZA VALORES "
Private Sub InicializaValores()
CargaCombos()
+ txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
+ txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
End Sub
- Private Sub CargaCombos()
-
- Dim Conta As New ClsContabilidad
- If Conta.GetEjercicios(UsuarioActual.CveEmpresa) Then
- DdlEjercicio.DataSource = Conta.DtResultados
- Else
- DdlEjercicio.DataSource = Nothing
- End If
-
- Dim strGlobal As String = ""
-
- If Conta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
- Dim dr As DataRow = Conta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')")
- If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString
- DdlCuentas.DataSource = Conta.DtResultados
- End If
-
-
- Conta.Dispose()
-
- DdlEjercicio.DataBind()
- DdlEjercicio.SelectedValueExist(Now.Year.ToString)
+ Private Sub CargaCombos()
+ DdlCuentas.DataSource = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa).FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')")
DdlCuentas.DataBind()
- 'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa)
- 'DdlSubProyecto.DataBind()
- 'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
- 'DdlSubProyecto.SelectedValue = "-1"
-
-
-
-
-
End Sub
-
-
#End Region
@@ -177,7 +146,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
DTDatos = New DataTable
Dim Conta As New ClsContabilidad
- If Conta.GetAnexoCatalagoCC(DdlCuentas.SelectedValue.ToEntero, DdlEjercicio.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
+ If Conta.GetAnexoCatalagoCC(DdlCuentas.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlDivisor.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then
DTHeaders = Conta.DSResultados.Tables(0)
DTDatos = Conta.DSResultados.Tables(1)
@@ -279,7 +248,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
End If
If Importe <> 0 Then
- e.Row.Cells(Index).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }"
+ '' pendiente.. ' e.Row.Cells(Index).Text = $"{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }"
End If
Index += 1
@@ -309,7 +278,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
'SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
SbFiltros.AppendFormat("SubProyecto : {0}|", DdlSubProyecto.SelectedItem.Text)
If DdlDivisor.SelectedValue <> "1" Then SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
- SbFiltros.AppendFormat("Ejercicio : {0} Periodo : {1}|", DdlEjercicio.SelectedItem.Text, DdlPeriodo.SelectedItem.Text)
+ 'SbFiltros.AppendFormat("Ejercicio : {0} Periodo : {1}|", DdlEjercicio.SelectedItem.Text, DdlPeriodo.SelectedItem.Text)
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", DatoTituloExtra:="", DatosFiltros:=SbFiltros.ToString())
diff --git a/Empresas/119/Formatos/RepIVAAcreditable.rpt b/Empresas/119/Formatos/RepIVAAcreditable.rpt
index 518015e2d..40d4a2e0d 100644
Binary files a/Empresas/119/Formatos/RepIVAAcreditable.rpt and b/Empresas/119/Formatos/RepIVAAcreditable.rpt differ
diff --git a/OC/OC.aspx b/OC/OC.aspx
index 17223f5e2..1b390939f 100644
--- a/OC/OC.aspx
+++ b/OC/OC.aspx
@@ -1240,12 +1240,12 @@
-