From 1a914210846cc577d9b7098ca9bf2e845b39068e Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 16 Jan 2023 08:16:19 -0700 Subject: [PATCH 01/55] -- mejora visual --- Ventas/Clientes.aspx | 2 +- Ventas/Clientes.aspx.vb | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 97e44ab27..2f995fb48 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1740,7 +1740,7 @@ - + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index bff2d9844..23ed3e41b 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1050,7 +1050,7 @@ Partial Class Clientes DdlEstadoSAT.DataSource = GlobalDTGralEstados(ClaveSATPais) DdlEstadoSAT.DataBind() - DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlEstadoSAT.Items.Insert(0, New ListItem("-", "-1")) UpDatos.Update() End Sub @@ -1059,11 +1059,11 @@ Partial Class Clientes Dim Dt As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("True", "Nombre") DdlResponsable.DataSource = Dt.FiltraParametros("Estatus = 1", "", {"CveUsuario", "Nombre"}) DdlResponsable.DataBind() - DdlResponsable.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlResponsable.Items.Insert(0, New ListItem("-", "-1")) DdlResponsableSucursal.DataSource = Dt DdlResponsableSucursal.DataBind() - DdlResponsableSucursal.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlResponsableSucursal.Items.Insert(0, New ListItem("-", "-1")) UpAgregarSucursal.Update() UpDatos.Update() @@ -1975,6 +1975,7 @@ Partial Class Clientes DtCxCActivas = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, OrdenVencimiento, FechaVencimiento") GvCxC.DataSource = DtCxCActivas If DtCxCActivas.MAX("LineaAdicional") = "" Then GvCxC.Columns(6).Visible = False + If DtCxCActivas.MAX("CobranzaEstatus") = "" Then GvCxC.Columns(10).Visible = False 'solo tomo los 10 ultimos mas el totalizador general Dim dt As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'") DtHistorialCxC = dt From feaf21e6d4e34b5f1138c2669966116de0b2b4f6 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 16 Jan 2023 15:31:06 -0700 Subject: [PATCH 02/55] -- mejoras --- Ventas/Clientes.aspx | 10 +++----- Ventas/Clientes.aspx.vb | 47 +++++++++-------------------------- Ventas/ClientesAbonar.aspx | 9 +++++++ Ventas/ClientesAbonar.aspx.vb | 22 +++++++--------- 4 files changed, 33 insertions(+), 55 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 2f995fb48..342e0bd09 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -4514,11 +4514,7 @@ - - - - - +
@@ -6686,9 +6682,9 @@
- - + + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 23ed3e41b..26e5d7efc 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -917,7 +917,6 @@ Partial Class Clientes ChecaPermiteCredito() - 'Crea y carga CuentasBancarias - tab:Bancos CargaCuentasBancarias() @@ -939,8 +938,6 @@ Partial Class Clientes TxtFechaICredito.Text = Now.AddYears(-2).ToShortDateString() TxtFechaFCredito.Text = Now.ToShortDateString() - - If UsuarioActual.TienePermisoProceso(257) Then 'Falta agregar proceso DivMapAddSucursal.Visible = True LiLnkAgragarDireccion.Visible = True @@ -950,17 +947,12 @@ Partial Class Clientes MostrarTxtDireccionesClienteEnvio() - - If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa.Contiene(119, 1) AndAlso UsuarioActual.CveRol = 1 Then + If CveCliente > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(705) = "1" AndAlso UsuarioActual.TienePermisoProceso(350) Then CargaCombosLineasAdicionales() TabLineasAdicionales.Visible = True LnkAgregarLineaAdicional.Visible = True GetLineasAdicionales() - - End If - - - + End If End If 'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017 @@ -10338,8 +10330,7 @@ Partial Class Clientes If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then DivRazonSocial2.Attributes.Add("class", "col-md-8") - DVRegimenSociedad.Visible = True - TxtNombreComercial.Enabled = False + DVRegimenSociedad.Visible = True Else TxtNombreComercial.Enabled = True End If @@ -10365,31 +10356,17 @@ Partial Class Clientes - Private Sub CargaCombosLineasAdicionales() - - If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then - DdlProveedorLineaAdicionalModal.setEsWebService(True) - DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores") - DdlProveedorLineaAdicionalModal.SelectedText = "-" - DdlProveedorLineaAdicionalModal.SelectedValue = "-1" - - - - Else - DdlProveedorLineaAdicionalModal.setEsWebService(False) - DdlProveedorLineaAdicionalModal.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - DdlProveedorLineaAdicionalModal.ddl.DataBind() - DdlProveedorLineaAdicionalModal.ddl.Items.Insert(0, New ListItem("-", "-1")) - End If - - - + Private Sub CargaCombosLineasAdicionales() + + DdlProveedorLineaAdicionalModal.setEsWebService(True) + DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores") + DdlProveedorLineaAdicionalModal.SelectedText = "-" + DdlProveedorLineaAdicionalModal.SelectedValue = "-1" + DdlCategoriaLineaAdicionalModal.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa) DdlCategoriaLineaAdicionalModal.DataBind() - DdlCategoriaLineaAdicionalModal.Items.Insert(0, New ListItem("-", "-1")) - - - + DdlCategoriaLineaAdicionalModal.Items.Insert(0, New ListItem("-", "-1")) + End Sub Private Sub GetLineasAdicionales() diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 326731853..07d9c10b3 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -224,6 +224,15 @@
+
+
Préstamo:
+
+ +
+
+ +
+
diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index f295d80c9..d7af7a10b 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -1811,13 +1811,6 @@ Partial Class Ventas_ClientesAbonar If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFacturaDevolucion.Version = "4.0" - - 'If ObjFacturaDevolucion.Cliente Is Nothing Then - ' ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel - 'End If - - 'ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal - 'ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal Else ObjFacturaDevolucion.Version = "3.3" End If @@ -1826,9 +1819,12 @@ Partial Class Ventas_ClientesAbonar ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición" ObjFacturaDevolucion.ClaveMetodoPagoSAT = "PUE" - ObjFacturaDevolucion.CveFormaPago33 = 21 - ObjFacturaDevolucion.FormaPago33 = "30 - Aplicación de anticipos" - ObjFacturaDevolucion.FormaPagoSAT33 = "30" + Dim drtt As DataRow = GlobalDTTipoTransacciones.FiltroPrimero("CveTipoTransaccion =" & DdlTipoTransaccion.SelectedValue) + Dim dra As DataRow = GlobalDTVtaFormaPago.FiltroPrimero("CveFormaPago = " & drtt("CveFormaPago")) + + ObjFacturaDevolucion.CveFormaPago33 = dra("CveFormaPago").ToString + ObjFacturaDevolucion.FormaPago33 = dra("FormaPagoSAT").ToString + ObjFacturaDevolucion.FormaPagoSAT33 = dra("ClaveFormaPagoSAT").ToString ObjFacturaDevolucion.CveSubProyecto = CveSubProyecto ObjFacturaDevolucion.SetSubProyecto() @@ -1840,9 +1836,9 @@ Partial Class Ventas_ClientesAbonar If ObjCliente.GetClientes(ObjFacturaDevolucion.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then If ObjCliente.DtResultados.Rows.Count > 0 Then - ObjFacturaDevolucion.CveUsoCFDI = ObjCliente.CveUsoCFDI - ObjFacturaDevolucion.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) - ObjFacturaDevolucion.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI)) + ObjFacturaDevolucion.CveUsoCFDI = 2 + ObjFacturaDevolucion.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", 2)) + ObjFacturaDevolucion.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", 2)) ObjFacturaDevolucion.DtDetalle = CreaDTDetalleNC() From 9582c37f238d368e2e84b4f2e3b49c69d9d590db Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 16 Jan 2023 19:20:10 -0700 Subject: [PATCH 03/55] mejora warnings --- SiteAngular.aspx.cs | 1 + Ventas/Clientes.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/SiteAngular.aspx.cs b/SiteAngular.aspx.cs index f0fa903ac..c68c01a99 100644 --- a/SiteAngular.aspx.cs +++ b/SiteAngular.aspx.cs @@ -25,6 +25,7 @@ public partial class SiteAngular : System.Web.UI.Page } catch (Exception ex) { + string a = ex.Message; return null; } } diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 26e5d7efc..44b308663 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -10337,7 +10337,7 @@ Partial Class Clientes ' DdlRegimenFiscal.SelectedIndex = -1 Dim dt As DataTable = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal") - Dim Val As String + Dim Val As String = "" If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then 'verifico que sino existe el valor. lo limpie From f37096513f1d5b88b99141e4c7c2b939e43de115 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 17 Jan 2023 10:16:36 -0700 Subject: [PATCH 04/55] -- quitar el log. --- App_Code/ClsPaginas.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 38b6db274..a30cd4ec3 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1475,7 +1475,6 @@ Public Class ClsPaginas Dim ObjSubProyectos As New ClsSubProyectos() If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError) ObjSubProyectos.Dispose() - GuardaLog("Se Cargo GlobalDTProyectosUsuarios") End If If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then From 2a05e0cf572bd10b5c3753e0a52ad721b85a7c8f Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Tue, 17 Jan 2023 10:29:35 -0700 Subject: [PATCH 05/55] Rep OC Proveedores DropDownLost --- OC/RepOC.aspx | 10 ++++++---- OC/RepOC.aspx.vb | 21 ++++++++++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/OC/RepOC.aspx b/OC/RepOC.aspx index 7a1acc1b7..23093ba9d 100644 --- a/OC/RepOC.aspx +++ b/OC/RepOC.aspx @@ -177,11 +177,11 @@
- +
- +
@@ -201,7 +201,7 @@
- +
@@ -242,7 +242,9 @@
- + <%----%> + +
diff --git a/OC/RepOC.aspx.vb b/OC/RepOC.aspx.vb index c3ed79e0f..fca85e652 100644 --- a/OC/RepOC.aspx.vb +++ b/OC/RepOC.aspx.vb @@ -88,6 +88,9 @@ Partial Class RepOC #Region " CARGA COMBOS " + + + Protected Sub CargaProyectos() 'DdlProyectos.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1)) 'DdlProyectos.DataBind() @@ -120,9 +123,17 @@ Partial Class RepOC End Sub Protected Sub CargaProveedores() - ddlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - ddlProveedor.DataBind() - ddlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) + If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then + DdlProveedores.setEsWebService(True) + DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.SelectedText = "Todos" + DdlProveedores.SelectedValue = "-1" + Else + DdlProveedores.setEsWebService(False) + DdlProveedores.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) + DdlProveedores.ddl.DataBind() + DdlProveedores.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + End If End Sub Protected Sub CargaClientes() clintesdiv1.Visible = True @@ -366,7 +377,7 @@ Partial Class RepOC Dim OC As New ClsOC If OC.GetOrdenesCompraRep(DdlTipo.SelectedValue.ToString, DdlProyectos.SelectedValue.ToEntero, DdlSubProyectos.SelectedValue.ToEntero, DDlClasificacion.SelectedValue.ToEntero, - DdlEstatus.SelectedValue.ToEntero, FI, FF, -1, ddlProveedor.SelectedValue.ToEntero, If(txtFolio.Text.ToEntero = 0, -1, txtFolio.Text.ToEntero), ddlUsuario.SelectedValue.ToEntero, + DdlEstatus.SelectedValue.ToEntero, FI, FF, -1, DdlProveedores.SelectedValue.ToEntero, If(txtFolio.Text.ToEntero = 0, -1, txtFolio.Text.ToEntero), ddlUsuario.SelectedValue.ToEntero, If(CheckNoCompleta.Checked, -1, UsuarioActual.CveUsuario), UsuarioActual.Empresa.CveEmpresa, If(DDlPS.SelectedValue = "", -1, DDlPS.SelectedValue.ToEntero), If(CheckNoCompleta.Checked, True, False), ddlcliente.SelectedValue.ToEntero, CveActivoFijo:=DdlActivoFijo.SelectedValue.ToEntero, SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False), CveUsuarioAutorizo:=DdlUsuarioAutorizo.SelectedValue.ToEntero(), CveUsuarioAsignado:=DdlUsuarioAsignado.SelectedValue.ToEntero(), EntregaDirecta:=DdlEntregaDirecta.SelectedValue.ToEntero()) Then @@ -512,7 +523,7 @@ Partial Class RepOC Dim Clasificacion = If(DDlClasificacion.SelectedValue = "-1", "", $" Clasificación: {DDlClasificacion.SelectedItem.Text}") Dim Producto = If(DDlPS.SelectedValue = "-1", "", $" Producto/Servicio: {DDlPS.SelectedText}") Dim Completa As String = If(CheckNoCompleta.Checked = False, "", $" , No completa ") - Dim Proveedor = If(ddlProveedor.SelectedValue = "-1", "", $" Proveedor: {ddlProveedor.SelectedItem.Text}") + Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $" Proveedor: {DdlProveedores.txtText.Value }") Dim Cliente = If(ddlcliente.SelectedValue = "-1", "", $" Cliente: {ddlcliente.SelectedItem.Text}") If DtPorAtender IsNot Nothing AndAlso DtPorAtender.Rows.Count > 0 Then From 3fe6851ef3cce8b4a8cede613877fd5911d59ece Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Tue, 17 Jan 2023 16:15:59 -0700 Subject: [PATCH 06/55] RepCotizaciones se DdlProveedores a dropdown lost --- Bin/GoCfdi.dll | Bin 565248 -> 565760 bytes Empresas/1/Formatos/Factura.rdlc | 6653 ++++++++++++++--------------- OC/RepCotizacionesDetalle.aspx | 11 +- OC/RepCotizacionesDetalle.aspx.vb | 33 +- 4 files changed, 3237 insertions(+), 3460 deletions(-) diff --git a/Bin/GoCfdi.dll b/Bin/GoCfdi.dll index e25ec66283395a05f296e8252da1a882849fc48d..d7ecf5043d35c54d5aa8c884e61036f3d351d5e7 100644 GIT binary patch delta 13127 zcmY-03s_Y}9suw;bI+VJ7ZDEJ2bT*OC?YB<>Q%8&F;Ve_Xs&Vr6%a&SOKK^tY%f=l zw5-)IFSe*?sHo&pnxKi2sgYWen&E27CMp{FNZ0U@?aZ0K#P)sex4-$Hne&=6=YQr7 zc{LsL4s~3yG&Cw|`wRsCHK2|m?W8D#KBNdKqVV3zty6qTD=8Y!T|?0vnKd|@$4T)1f`C` zC^6W8B)t@&@+^XC5)Hhqt~(QP&J1!8BhDOs{GKTc*xA$hu`NZktuX9sxZrbrf* z?NNSt=BUD#mUk#Dsh11u7Sh63vi%D`Uf#}gB1Q5loL58&-^(6uG)2j12Rn!^{2&(J z&91zgEiFCkT3)~pxd3%Q+f5Hp{4$}Ixcw%hl>3g*Fk04q|EHzcl|n@`j`)X3=zXEyk;hHpQhuS(tIvLK>MljORtt_9m2Mg!m3o9O zCtWrTl_sqb8r|-OX@q1e7Fs+*LzAULpr>N6d5ToNR>Wrd7|qF2**c+K?flHsq|@t# z3L?YN45_R{sBygAoFye~a0w>QSZSIiE!-&dQdBsaCyo6`XlnaV^Gnj*QlZpH4b7Jv zn}nvb!(Jd2Z5Aqu-)>qYRc#gW9p2r%QmWZ5RK~8wKc&2Kq47hG`>&PKK1O{11!zlL zxM{squ|ov&laKg+Bpv^k&|}9S(mOzHJ7UZ{T}APze|le3((UE z;pnmCb@b0&AZ!+*L6e>AagPM`oScmjj??9)n~X(fgi|5r-G41pE@+~WZ@C692XC%&U2f!)$c9Zk`FPuFk=-hd#qx9=LIZm%NWxVjhOBWK)7WqH zdQ9Um#$}+PSVIOJ^{t3~k9a)Q(j?*e5@t^~;&pVsL{Mb8qcJ#P9zRNR=p z)$EHS>z`UlLpH$v$Te!F7!y z_I20G=8ib-vWOk&+HCHG+jihE+^EM2Xb$VLVYpdrN%JO4$Q6eF3&B{{y*lIHAvj^O z#-v=)cR?paYbYH1f=01h(FF&9cn9u+p9aOpYD^KJ+GGhu;0d7n{WR1SCxfoAp4ZKV zGk|9!81WokZhAdJWBMD!6o(Ua$8SK)?9iCpRkk`s4l(8$42D8UnF5r#R67Jn|}k{~$MAF-2oc zgy7i08j8kFP|RQ_8i>M0jejsz388&#Fd2+(O?oFq zxd|E?f=fURl46O)A-{;2IYUDUxD?dH2B`74_y)ZH9x&?zye$)F*2QExxnlAmO+T;0)NLgBE)lnJbV|#bAiRUK@l;YUKQX> zD#X*PcQDI;^)`8S<-x1Gg?M(g0VnxzvG*TOuQuZ-KM~~V)o$Db;^|c-Ztxc|o?h+6 zO(r3pUhT(W79pNqeTiE@JiR)McUeV@XIHiOe1H(ou1?@8n=TjP>D6~Q%`SpGz4`%{ zfOvXUkL6$y zi)TBEAue15dA8Hekl#g!XFHl9HbRJJJN^boS0SG5SPgT#3Gr+v$gr=w5YKi(3=utq zc(&8g5Y|(OCp+PWmR>@37t40K8SP16l=eGdG4H|9PY6!~|T0i=E%ML?nmXNEv zhFqT-GG_|D(A{R)X$YGobd;o6sth@Egk;t&_Zy1;Ds-D|dBBkPg3v{_=fzYqX#ipMP=U*4%A7}Rr z%ik2@A7@04b_sRP$g=p#4Q`>Y$Js2wa!9_=q}W$2p>ov{E;s5wBF@lNZU)79#TmNE zu8;x|jAg;@a-yyRls;#XB~oq%y~JKQz2uOkV$0XYEVD$(k3jdm5~RLz;xZ9iIaWaq zIqn^y(C%D$#asobzac?#$Thm$s4G)H8M)Sq;14)K>MtjPGQ8O9NL~f<$Kfbi&Rs9I zysLzxXXHj*ZZuonBgM$gB_fulCP;(ikPSi?$0bOE<$a)CETb4A@7u^@Zghcl*;u*c zBe;l*vCZGo&NTX$WvrsfkO2^5|cL?uMXcxCd-YL5`X^|phey*EK}r1dawX>cdW6b z$|ZY5MNh&8OPZXxS7>tf18JsQ11ip1VVNz@{anQImF<=n<*0pP7oF8A%Y3;-7rXds ziunzBS2eU56KejuoVlOne|-0ECDd5*`6*=(E0SEFZ`bUp&zX%Nn^( zmmBSiIcM1*CmrN5HySpe%Cbp5e@JZU)A^{hRn9#kR2$|*TV=WSNz8$_%2iza{r5C` zZ*P+uAV^u3wq0KOHQ&^YrjKc~l*Hp>oq)lt#Rvk9T*oiaKm6z8~Z*(2`* zr6;7D4$4u-MQm5*ZyC?@88&a_My;|Ev`2BU%1gX!nd6*2i)%h<|eZA?NBU&~KAO zYK3TclxvPvA`QT2qUJF*gE|j%B246F-e>{s!7d^uV?k%rE~y5R3A&SJK?bq_G{gRi zRVEdn*O>@u0!7;2uqq_v7t!Vj`x`E+N|J!VL2fH0D?kn=BdG;>Ti&vI5p+XT3}tFZ zqCtx3U8^_A0X@ako|J*+S_-W`qygk+@+G#LqLmj-YpgDfBm$Q(`jMre3#Ro}e^LXw z&txJkAeVWQ)l8ypiDo=Z7BUO8C2+gdN=iW0OaY`G^rQJxtBq*4MZG&rfi4m+h>m3K zvD(Q3ke8o^f=GU=4p@Upoh~d(VFmX=>GZ>rfJRPt@xbFx7hmS*5E0?NBaTN0Kw3uYGNnv81V0 zH?0#${BQdE&yDW09Zn%dzln4Dx&3`>5@`nA@I7HkBU+1y-SAZcW|2HyZWP1L@Fh|Q zu{B|)fR_oqFShK+uFNaM)~aLH1tdooyP~Y#LQ-=d-haE(?pxm^<_DtUN$rGX35jl% z67Vi5)5Tsn>dFy&os>_XjU^^@&zd~%0Hr0C* zL67wJpBv2!i!*E{nT-5Nzt+WxwvdIO`&~4qrJ!S-oT!YHfX;Q&n94y(NkIWy$stf? zQb(q5h4f)(8>xqwBO@DcBe%HN`;W$DNN5{*1i`s1xSg1P7YFkii)|+%AT1>umy>8v zNQ#8YNgU{EdN%%;q=N3HOXy=V3-sOaY`lZyfzA(?&7Qi zNrEBxkM2&ilQ=*dS%$uo#DY9tPPB_8fi|!laTm!1=LXJjGh^(2jHDJYt?xto-L z#GOF4i7j<;w8^IUixC2(u*Wt^8Ct5eYdqKZ6-CI;ZyN& z-z#kj?~_NKHLOtUi1~qtRuv^0du~i+txjuGYEp8s=ecRD^uso#AxZ`ItY)RYXWEqZ zP?|m0rm<%I4SzQKj1pn+44%#!NN7_!Qpq%U-e;w*x7(CXQc83cP&~6bAW5ke(z|n# z5-f|W##5gp#R1}}Pm;0_#8V%qvI@jgAE#0V8er;WOI8{{6PQvIn~R7>Px$w@r7DS_ zYfMv>rJy;1gKX238qixz)0Gy`6V;UY zG|`r+bX8q?MO5iK-8M&wRi9{%Ek~))~x@j#^%5}NX7*=nc@(5x+ojVS2FlF!8U&)%Et{r8d5_Wf6?oYprLufI)7w71?2ZhOx#Od*_ zeO-wG@vePc$p`VS{j*XG;$8b^r2=#&uxDVi(geE3^otVW@)eE#5!f&AhLQv_+xrFH zR8|O~)mbrtx0G5?151kTDD|y6X1%9GX}lFTI?HbE10_#a0s4g1d#F@_erEL^E48gU zW|ho2-CY7zwb%def93F0q5Z*?Jvzx=$_rJ&(6ov6K90-88e zV=4ztXE7i35NIxo`KWcE*Ty@MuiC_v#@|x~<2A;+5G?EOM4IYt5@+#ge~rloIy%~k z{M0DW>CqZf4Cp78+xV-KK)buQxgNA@A08?v|19NH;VWWI7a;*#D~DKYGbR`*~Y2SHom180mrLL zbrm2!0w$_QL3{-Ki+a9QH?7HPOrWU8N5C|7c_0j{KAlSf)75=?umJHPFhi|v)dA}a z)od3P`3RWxe-Ft_H4|d|A<0&2b%}>$mf8T~56LXG8N?rw*{U3bQ3UUM{3)5OYK&Zb z2%MuvfcOwNhxefevsfSMqnC<4l&i)Ec@k!`(ihv5y4Cz3&qh}2yRA*>duom6zq9dh z*OfMf|5P98(%<5N>(#Je{Q>wq9KzM0s~xudV>`?zUd72l4J!qTT}W?pC78Pl?kA zFcbR*H3rm!X``C!5=0$+yzL*Ur67r2@J(t(s}5KmP~d-_J=qV86` zpBBfDXLhykRUJb5HQB2!g&4mkd({#Uzb1RtCJ?_SpQ|WDw8F2+=PLV|UB9&hExqjf z)UlumOx0?>3m6>K-@aen2XZhSQ161)n+Dly)W}fLOf}ONY9?rvJKZu4en|E1DC)&C9aiH&}5FBB4+H2KjP&(7sYFH<+dcbr{T_uFR=$mant~P+OwAKEnR5?tqhqAO>`@hv3U2deYNAM@LCJY|IW!ZW5 zOKJ;jI@<4nbVa3|Ma9v6$E?@XG+kmIZ+$e!f+*oKG#NJQM zvs)>R5L<3$Z`43)Yt=DpFwN2BMlZ87452j;Tg6T=l(vA9*$IYG+Lg7!C$E#)8Fry* zoIK59JM2y?bQPd)eM;<+RPH8r=*y-x95kX;NrujWRAusWvxlQR# zTI2cKOZ>yHO<@gvH+J2z5AU@GnPwPN@qOG2u1@Vct zv-Ce8KGAme|IYs3^g4_2AJ!;e@bqtb2R7vkp3c#SAimz|95wXOFR8xX=^XV2@%2vU zsTsuAJDsObf%vS@kF+z0&kFrWdxH3^&;{C`i%%@_X`u^r2n5fthx{TP3F2#-F49Dh z!lu?5XcEYeO|3Q1bkN~=_Ja|f4LTjKF})1pssB&(br4Vef1-%4?(_&s);s$_#&z%dJV)EQC*|AL3|O_HTnQFgq{6$iu;P&l*rEhI&BBy>!g0B zW)NQ|)l7pyF24GznT7%R>Z@kjLrCwXztEu&8)k5#U+5^%M1#gO5mcP{X3!0q3@Xc9 z%rrwtZ{;Rk0x`b+^(K86G|a_D(VKKNaBX}xzD3u8%Hkz-i*6Cpo4HM^A;yRM+w`z5 zx4!Q0HvJZ2e1+hz^vshOyW79g1`$L1N4*_%htBG!UnjJ_zbn-I2bKE^UhBTvpBQ(6 zd{aLR@-{{c5V2$?Ut=-InUP`kH^xPa*tVn(g940IpowEQ1lf(H14ZmemvGd<81{_N zJTC=>7;AL7QALL0V(j~@9@Nh;#5huj@?j^$I3C1@oe*OZ=w;URLXBx4K3s(wXM@&{ z*c#N)_>wL+-8$l5Os_+XU;IwSMG)hQk6oRN%S90F9KkXMV^YkY2h+tkUr1lI+{Nh9 z<)*x17voY9L!(CS4vH{F4EeKOU*nTkA0KA>8e{a>6{)c+SG=x6OcvDFWnA2*qQh7! zr0>vSEY~G==rDc;u`SQB#e~Lc(B9|RFI2`OLhKr{<%7n0AvC~2qyfgFSbk`3bZpFZ z%RpnpP$9n5;5nmf;d7j;(Q9K42MssYfXvZTm6664P=CWk6mN_kCbsO#G|IRDgi;O% zjW*VS_Qj7wV~vkM4IX1oe9{v1p<-h2{c&%tzKi-@u7 z6pqr2A)_iEy@sRbm>;n}6zL^-S5Xut1+)L{Ek#zn72k;2KSO1FqrAeR{aEK+QFHO| zm@T!R`2=1KuX(HKzRdm+_D`v7y06x)jePQFE&M=(*>4O>*&nJbWq+MA@%gytwPn-0 zyt3rj(4zKlY{}U1rf+4Vhf>M^IQ)eQtAVcY{~xk4)GF0`ENkff%8+$5UaIu@kUlWr PmI0N1>*!5sWt93qP)VJ= delta 13077 zcmY-04}6W){{Zmwoco;TIhV0#yMK1~CvBP;hRMY+tPG2pk=SK2Y&QGq+v=yN)ZImk zQt_SKDKbLCD&gy2^CzKYtAs=r`(`wnfAQ5w`hCuGKGwcoFTHx7&pGG$cb;?3bM8@i zpl#v4wu|OR?LGW|QwaX4C2b>HD)EGra6&Yh*njc*v8@}naWX=9A18U1#Zk6^T22DM zTmQ{Tg#UU8k1O^l?OV+AL%~Q$FDZUq>7=|{yiIAZykC4qY1=+>JA~j*3jC#nku@ol zq(@kYVx|&uGn0`&V&ffMoB9|jXw5|d zZHf3_t66qP-k`Z}#GDV~f*=V~%7R{GxOx|O&DiyCw4dlCnZA$eU zQcr+fitA0OPxb2H2b8?Gr1tB(gCA7pFOn*maws@jNm(q_Ew0)Yqg4M(>iNFk+d3(; zyzfX3du)=em(s9Q>U_p|+at>I5~-mruh<4FS?@{BonnwNO2Bfd2NJ1$ta1}IwYAkg zPPw*1#=5o)vOlRrtduH>iy>2#YpA*rVfGxQwA3qu#|}e3%?#Td6dDB(u&NcPRJ+#r}!ZJ$FCbTBR1%sz*OtnNqPy#$Hr<+czqO zo29mmxua}RQnpAHXw|{nl$)s3v4iY8l(KCi<|7+|#@i1oH+K+m{33F^Ukv$LnZHvO z{C@mo`?t!zT~ad#{KI}+x%QbF6}&4<)Wr*7<)4ZhBXlXUbbd z{)~3hKb5$zWbnbX7;;Y;C1oCh&`c>FKE?wt@(fg$F}ak`g{FLbt+m8X=o*X#^jra| zK#j7BoX1hu2Z~x6q`W*aNl-m34)5bR*+LPfinzbmIh{~9>Y#b}R8+g+B4;+Lq@B=g z)ZErWOHdlz8A8iZ`Je%X3!U|~%=x9)`hi`gN#96T_BIHkYi3%w^R37 zsgT?+><(IwQYW;qIca>Yj0FX@@Y-Co9QjRNni59&e`N6ShY#DsX{MK3+IRA>L@( z4}(e2yxP%07#umq0HtAUWP(9r=vdTa@F?2Ti73&4+tXZBN|FI8Kvj-YNGx53y4}Md z9q4M*1!#F4y>tWeR4kBgHs#}&Vhzw|7}MMy(usb7F}vFURb%WoX!&vUIL7X_GeAFK zZ0=(o(wUye*qe_Tpeqf1m zJau8rt{I>xjP)PnA>C*PjHM4UKo4UqF3>|BrhPE>NT2~4=*8gI&?$7M!!USupaB|< zv5^pS(@cy_f|#4;V61bFhxDLNVXRM%0eT)|-G_KcPx=bR`VTQcuVL)vu^!TkzI_4u zf6?tM8fyScFqqokAPIC8DzU$Z^rq`k)!onOz3Hc@+U^dB?Ls}3xPtYe`%!ZeZ`k|L zD%9>4=k&hx80vHj2kA>|F39nZKhe!Y5@{UD{YRqlQO0GU%Ec_tnKQiMoH6+M2vOIG=89l*$~uJNRjO@{ZKb0E5h+b$>{`2`&FQ zdh)JRIgFyu(@lSY#Q2v3lYv>3CUbB3iCXiRslFG_Qq}m|gj4O-m^;yIMs{TM5DVC#F~H=qy79#q??$jSrF%)2rTSCuq6M8?GI>RU=&ro2Q^_*-o%!cC3_`?Kmx4J4lJyPPj$w zBqe4$k(PouDKXn=Ynk3zN=$ZQEJ1e4&c7oYXC(FWk85FafE|&UkQgf9U zTQ^IpTWT%qV(VcUoglT0^|K{es(VW%jE}Jmv@Gu{6+b@NHpDW2fK*L#Kif!)`w^*y zt-K3tqbkmbl?kUE#s}!*VlCYS7Ra@|?w$ zF4YbCl9`s}sB>dshHS|mC1ckgd)hX~Qt*V7t)muQ=MFnEtcuIQis`i#}3PmX;LaQ%RQF5e5vb@bFZajy3|?7 zdB9TlPbu*YaM%*?td#f$IAuwgAtk;6&RO_#QsNunyw}o*6yE^9STbhH;BVuW+kUk~ zzbGX>&Td(b&z2G&XG|@8MXKH897muU>y!FwxXTft=FOEFo%FmTN+quf`AE;f$(9bP z8M}tSI30tL-rmkkA)LEvAh?agm_;Iyjn~eQ3Xf+$7#%))`_*+Eg1T1olRg<^N zN;|oiIWpDy9a8?ZRgNsRWT(`a+&jutmG6>Tp0mg?P2Gx`r)_lnQ=Rphi1|o6eTQSF znp7ck_SDDQUsCU){E1QaSJd*|F#i*We=TjFW1bqfM`rzyM%mw1=kJyJclTwEchrJ? z_w}t~nd(z>bQkBsjvR+O7@_x)s*Q=xw zB*wo7Vcg!J#tMQs%+fZhM@;$1#9?)gay9lV8SBu|<@i{wLG?|GvTspS4$D}w`;ud) zs#Zx&N}FWcug*ek&Hmj{t&(apW`4*VQx}=?7MWjl$J8JF_nMaywcDn#XwHCDfxBuy;>q;WIK$1->dV#G0S;@Eu257b>GVKj)%5> zN-aAgCB9uwtCcA6?NX!GqjHrr30l=zT2qb41dwTQ2(TD9?*l=zPN zkD7Q~mh)y$ive!^Uh>OnZhB5lKOwbmNRYEmz59by`+PS&ua=yYT0JDxc|j#VN$pUg zo%L$m8L4-mmMdx{$~P^@c~zbM9~t`zbWP>wrLKFYxt-V5nhTO+^7}b&s55?%5??^K z)JoLM{1oT!YWzhRYtwDC^AEKF6`V8Pc~?!nBxBpAOmW^*vr*!c>o2v!RFV1Y6=wV@ zau)HJcyGQ_VX??Q@lS)?sCK`fkEsD>WporGnnzKvfyoy zjU}PH_O(tsn}za&9BdQn!_bXRC#y&828FQ5YqFM~?3aJQ=be_n?ZAX#;{6LKC%J|#xmCpS#Utd@%9cZ9hG6+QQ}xu zld7Cu*$z`aa??2>pgZF?Ww{f|PN$nCpvvI;uLn!^HgT`BCtGC7M|L?T1SGIpjHSDe zIeW7Q{wu3_&Uh=hAB%5Njq?$<(3FpK4Ve%ynAKqHW9__i2y1gomisEu{YBBh0tJ}^D=Kft4yb}1WBa3A;Nejtim8N_o5w7qV=4zBVmqpt` zo@ME%ws2>jV_8kAa?WBqOu-$6a|n7%~9i9$E&QcNm|I8?3yVU za^MP=vZOmQXU~quoPPE)YAD>9_t>H))i_tO22(!r0~~M->+^>!H^-O|u$HBOVEpru zr=ycC>sYxA@{8>~eFo&K9D6 znUqUEVrx*hCMo12wh8s!pj`Sft3=fdQpm^bxG5O_*1}rHC#(U3|Aw`WPgwKiqfM+4 zW0PRfZ4)#8lvnr^e0*x>r z7B(BT8fNHQ*nE_~g@7V$x1F8YR|}cCswg1Xya> z#b%+Ng0G`pY#u7n3yWu;vE@jyc=j19Ly48G3bqd=R<31NJkT#$DoQ-iFIfgkJkUy3fD#W>t%N7) zrxR$h@uHbL7oO~(kfUr7@sAOy+nS}GW!1#L0a62hYnIx;xc|=ybWmUySOF(QR&bjo z`$s-W2O0Uz5;d(*@vnOlYF*bX)uvS_{yQS|=VqyqTBG7mn+V5hL;tR}v*z}%nh4d7 zYnIqYE1>>ckkwe)EOm%hPW?l(XtMWcv((XAy{RHjr|u5P&PG4;vN zW~0Q^Cqp}c5>p?KR)Z2#ACGno)yvk^HBO6F3XQbY*HKsEeQp+7VQK zXg}AJ8i%!i@vvV5P1KT57hK7%ENvD_3r%)S(l((s+lRR(YxSr@peb6UX4XQkD5G52 z+B2G0a(m!JSH3nMgWCi1T?JaBDIYlr!{1CTMVC3-k>_2rw6{@91LwG2*48v>p=*xD z;im^Na4dsz^R*09MPyB;-?cz{6SdoT)&9D+oKyLUx7&E%^@es03zonz_NJC3e(r@& zp025DTyJS}P;VJ7N3ph~NmrdE+D%hFG7QSSuO+vTqD&) zb#?e*rA(_u{V{wvEz`_l#BZHK9|^o<2IR}JStEYW6nJA|0>l}}#JyUg|075=CO1p0 z)@B9xX*M+N_nW1j(zXWp$3Uw0$7ZP)v}>kB(?0CFq`6v|cgbwpm$d0pX4Af;%|nT% zeMzfEiKhLlR)-Qz`&X?Ibt1G&XoD8t+N_gb1YOqhyvV;odxT!mN>TQ(9-&vYlTu`9 zPGaaa%?LCLl3JJ)-OwVNROP&-%`)X9r{Lk<(JC?aDU|y|BZe&ZE0nvZ8BMBkDtew_ zHfLIQ4deo??2IwYgBE(wj z0m1ULr$el@?n1pV!b1Y}cu3KD4tQX){mU zY#Q$CiMH2SKaLV@uZ!M*5^b-G4nHc2{(<+h%?$0TC!j`x;`IVAGC%Z{ z&~ADe>NU{AdM)aL>($Wiy2~M}(L!Ghb?fP<&Gv<%J@omgL!h4eJ}Kxri$i;d!iSd@54@^m*!yd=}~R8XvVGU6?nre|PKbbR`t<5B|2Rku{HZzy@I}2N- z&qH+vt=22NlB8|xfUpnr29yFfe68Ntq`l5{dh!F}5I*uG-0-shx#8>eB^VPoe1qO- zs)!$eb+wJU(MF!yiELN^)FV*e!7r-iy1Nbbtu^qIYPqUxFG5+O1c6 zkrClN!}jQEq^!mb+N&p`R@(Z7?bBzVc7s0G%TY_hlEe1vb*OEiFZ75gSxbk|VPOaK z(Wn&AL46@=MEIz%L;8Uzugv-^@JszJ1_#?cVU@bOt&B|qeWg!Foes+iJFKrk-2qkU zHB#jB?zv&rdhA1HIg(>64L+u)HfcuKkNOT%K4QSD`?JoY@fBQ6R zdVORj9B?9UKJ;htJToYV{z<&rl$_U1=5;91t4-$DP@-3x!g-u|c(YTR!tE%r*(00B zp~OazY>vwV^5Z>+Cty&#$2mM5CEnv4o{19g@l-woC0^sHyb!e*HYnxt64dG#1GEP9 zb)tvl@d{L3q5-Hhq%$V#1p5--h{`m#ahtkgCVq~h9yZomMU~1XFS>i%I zy0bt28PPR2OI^knb@tB_soR>RuH)66{U;$c@V92ETR8W3dRBb+b@}^P`*^b73yI$R zW{F?(LQ|r@J`naDU)L1V$aj2`sbcOPnH~NeZ$u63kPiy%DylB#BRUj-Tqt+XzRFRa zg!)4f$}_c;-^!U8ev}t_O&0N?iiaHKYf#DXJIqmDiAsTcdz3ez;>?^zyle!mO}SC6 zJR;{9DYHvG$|ssy>}oSMx#iKOXCgM`9p%r(-|w5?u^;6xV>NT&u^;6{sDDDG$M{<) zug3uSQH_&5yyC02!g;?JYR zs?Zt!ijY`X6w5+q_-hzE0WbMk{x(YNX*$bGP#P?))$&qQ5G<|L^7W{LDe!|4{}gpR z#Q^O>iK+k3d_PJ|{eR|FreI-F>@hmWk6}=3F*?UWsI?w-$ z5}T;b^Lr?Z*iA_`&`J<=-aP^n?P*gfx{U!c5O6-&Rm1m;FKB)$tjq-}!R}FkRQtZBJ;Lk~! zt@JWqfU$uV54p@2qefW_(7UMR*)NA*;j2+)*>gb~rOaBc@~<%__P<``-=hY4p%=Z% z&mdQ%(c`H*sF1q{c+=(%k$>UJt*)H@VGP$jYAHDEnVLwTI-zPD_KC^)4zf^WE?OYe7#L8wU!s)}cI;C)Tb*Oy|X=9zVT~O*e2rV*o0OTOuz1FH`1>M#LDf57C>rGSgfNtxb82j*1 z*i2|;1Iz>RU5~;qRMyr~aN4ka&>AU4dbyd>%UWy7N2-Qha`d*wJ|b_v*lO^o)qB9? zQu4yEgW-d${815HO6&;}v?10cR8PxUl431HbpSnP-G?IM4~7r5x(3Q}6)D3>sx=w) zN9+VL+**SgN~*#~Skseb&WAxGt+igHds0>S^4mCc$jWX6cf3S?L zjQgF8x3(D~RK&%5@T4`ylzb1Kw06aqcn>C8d)<%0doaTj4LX&!J4=RP/* Local Query */ - - ImporteIEPS - System.Decimal + + CveOrdenCompraDetalle + System.Int64 - - ImporteIVA - System.Decimal - - - PorcentajeIEPS - System.Decimal - - - PorcentajeIVA - System.Decimal + + CveOrdenCompra + System.Int64 Cantidad @@ -156,6 +148,10 @@ SATClaveUM System.String + + PorcentajeIVA + System.String + CodigoObjetoImpuesto System.String @@ -343,945 +339,159 @@ - - true - - - - - Tipo - - - - - - - Textbox3 - 0.90692in - 5.662in - 0.5cm - 2.24597in - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Fecha y hora de emisión - - - - - - - - - - - - - - - - Textbox3 - 0.46414in - 5.662in - 0.5cm - 2.24597in - 1 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) - - - - - - - Textbox3 - 0.22455in - 5.662in - 0.60856cm - 2.24597in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Folio - - - - - - - Textbox3 - 0.0412cm - 5.662in - 0.5cm - 2.24597in - 3 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - VSH VIGILANCIA Y PROTECCION SA DE CV - - - - - - - - - R.F.C. VVP091222RF5|Reg. Fed. DGSP/122-10/1558|Reg. Est. - - - - =IIF(UCase(Parameters!Sucursal.Value.ToString) ="TIJUANA" or UCase(Parameters!Sucursal.Value.ToString) = "MEXICALI" , "SSP-01PM20120309140", "LSP-R-2010-M-271" ) - - - - - - - - - |www.vsh-seguridad.com|ventas@vsh-seguridad.com| - - - - 0cm - 0cm - - - - Textbox4 - 1.93416in - 0.66099in - 3.62386in - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo - FitProportional - 0.30578cm - 0.03093cm - 2.88998cm - 4.56434cm - 5 - - - - - - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox3 - 0.66099in - 5.662in - 0.25114in - 2.24597in - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!Tipo.Value & Parameters!Ref.Value - - - - - - - Textbox3 - 1.10364in - 5.662in - 0.25635in - 2.24597in - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Domicilio Fiscal - - - - - - - - - Calle Benito Juarez #32, Local 3, Col.: Hermosillo Centro C.P 83000 Hermosillo, Sonora, México Tel.:(662)210-64-00 - - - - - - - Textbox10 - 0.51102in - 1.93416in - 0.65513in - 1.79619in - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Lugar de Expedición - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - Textbox10 - 0.51102in - 3.77202in - 0.65513in - 1.786in - 9 - - - Top - - - - true - true - - - - - Nombre - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad - - - - - - - #4f81bd - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteLugar.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - + - + + External + =Parameters!QR.Value + FitProportional + 0.04167in + 1.37377in + 1.7524in + + + + + true + true true - P A G A R E con Folio + Sello Digital del CFDI: + + + + + + + + + + + + + + + + + + + + + - =Parameters!Serie.Value + VERSION - - + =Parameters!CFDIVersion.Value - - - =Parameters!Folio.Value - - - - Por éste pagare prometo (emos) pagar incondicionalmente a la orden de VSH Vigilancia y Proteccion, S.A de C.V, a su vencimiento el - - - - =Parameters!Vencimiento.Value - - - - , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ - - - - =Parameters!Total.Value - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ). Valor recibido a mi (nuestra) entera satisfacción. la falta de pago de éste documento a su vencimiento dará derecho a VSH Vigilancia y Proteccion, S.A de C.V o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a - - - - =CDATE(Parameters!Fecha.Value).ToString("dd/MM/yyyy") - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre: - - - - =Parameters!ClienteNombre.Value - - - - - - - =Parameters!ClienteDireccion.Value - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Acepto de conformidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Area de Sello y Fecha Recepción - - - - - - - Textbox69 - 1.1706in - 2.94478in - 0.25in - 1.971in - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Éste documento es una representación impresa de un CFDi - - - - - - 2pt - 2pt - 2pt - 2pt - - true - 20.98246cm - 0.01861cm - 7.22972cm - 20.05706cm - 16 - - = (Parameters!AplicaPagare.Value="0" ORelse Parameters!AplicaPagare.Value="") - + 6.32868in + 0.06752in + 1.42169in + 8.23953in - + - 1.50708cm + 0.54014in - 1.53472cm + 0.59111in - 1.63629cm + 0.80359in - 9.22751cm + 0.66404in - 2.19617cm + 2.11562in - 1.8977cm + 0.6863in - 2.0429cm + 0.69852in + + + 0.6403in + + + 0.67895in + + + 0.80447in - 0.52063cm + 0.19645in - + + true true - Cantidad + # Cant. - + + - #4f81bd + + + 2pt + + + + 2pt + + White 2pt 2pt 2pt @@ -1539,70 +596,38 @@ - + true true - UM + Unidad - - - - Textbox14 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Codigo - - - - + + - #4f81bd + + Black + + 2pt + + + Black + + 2pt + 2pt 2pt 2pt @@ -1613,17 +638,17 @@ - + + true true - Descripción + Clave Pr./Se @@ -1632,13 +657,21 @@ - Textbox79 + Textbox29 + - #4f81bd + + Black + + 2pt + + + Black + + 2pt + 2pt 2pt 2pt @@ -1656,11 +689,10 @@ - Obj. Imp. + Clave U. @@ -1672,10 +704,16 @@ Textbox2 + - #4f81bd + + + 2pt + + + + 2pt + 2pt 2pt 2pt @@ -1686,32 +724,40 @@ - + + true true - P. Unitario + Nombre - Textbox84 + Textbox17 + - #4f81bd + + Black + + 2pt + + + Black + + 2pt + 2pt 2pt 2pt @@ -1722,17 +768,105 @@ - + + true true - Importe + Obj. Imp. + + + + + + Textbox26 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Precio + + + + + + + Textbox53 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tasa IVA + @@ -1740,27 +874,110 @@ Center + + Textbox21 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + - + Descto. - - Textbox87 + Textbox23 + - #4f81bd + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SubTotal + + + + + + + Textbox1 + + + + Black + + 2pt + + + Black + + 2pt + 2pt 2pt 2pt @@ -1772,12 +989,13 @@ - 0.4148cm + 0.16561in true + true true @@ -1785,8 +1003,10 @@ =Fields!Cantidad.Value @@ -1798,21 +1018,8 @@ Cantidad1 + - - - - - - - - #4f81bd - - - #4f81bd - 2pt 2pt 2pt @@ -1825,6 +1032,7 @@ true + true true @@ -1832,52 +1040,22 @@ =Fields!UM.Value - - - - - - - - - =Fields!SATClaveUM.Value - - - - UM + - - - - - - - - - - - #4f81bd - 2pt 2pt 2pt @@ -1890,6 +1068,7 @@ true + true true @@ -1897,7 +1076,9 @@ =Fields!SATClaveProdServ.Value @@ -1909,21 +1090,8 @@ SATClaveProdServ + - - - - - - - - - - - #4f81bd - 2pt 2pt 2pt @@ -1934,40 +1102,66 @@ - + true + true true - =Fields!PS.Value & " " & Fields!Obs.Value + =Fields!SATClaveUM.Value + + + + + + SATClaveUM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!PS.Value & IIF(Fields!Obs.Value <> "",System.Environment.NewLine &"Observaciones: ","") & Fields!Obs.Value + + - - - - - - - - - - - #4f81bd - 2pt 2pt 2pt @@ -1987,31 +1181,22 @@ =Fields!CodigoObjetoImpuesto.Value - CodigoObjetoImpuesto + - - - - - - - - - - - #4f81bd - 2pt 2pt 2pt @@ -2024,6 +1209,7 @@ true + true true @@ -2031,20 +1217,19 @@ =Fields!PU.Value - + 2pt @@ -2057,17 +1242,21 @@ - + true + true true - =Fields!Cantidad.Value*Fields!PU.Value + =Fields!PorcentajeIVA.Value @@ -2076,63 +1265,11 @@ - Textbox88 - - - - - - - - - - #4f81bd - - - #4f81bd - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.08406cm - - - - - true - true - - - - - - - - #4f81bd - - 2pt 2pt 2pt @@ -2143,29 +1280,34 @@ - + true + true true - - - - Textbox17 + Descuento1 - - #4f81bd - - 2pt 2pt 2pt @@ -2176,166 +1318,34 @@ - + true + true true - - - - Textbox36 + TiempoEntrega - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - - #4f81bd - - 1pt - 2pt 2pt 2pt @@ -2357,6 +1367,9 @@ + + + @@ -2365,742 +1378,53 @@ After - - - - Before + DsOC - 4.66273cm - 0.11469cm - 1.01949cm - 20.04237cm - 17 + 1.75278in + 0.09836in + 0.36206in + 8.22304in + 1 - + + true true - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - + + + - - - - - - - - - + Black 2pt 2pt 2pt 2pt - - - - External - =Parameters!QR.Value - FitProportional - 0.06275in - 0.02693in - 1.31152in - 1.73765in - - - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: - - - - =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value) - - - - ; Método de Pago: - - - - =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) - - - - ; Num. Cta Pago: - - - - =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 9.32053cm - - - 5.68277cm - - - - - 0.4721cm - - - - - true - true - - - - - Folio Fiscal: - - - - - - - Textbox9 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.52062cm - - - - - true - true - - - - - No. Serie del Certificado del SAT: - - - - - - - Textbox24 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - Fecha y Hora de certificación: - - - - - - - Textbox26 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FechaCertificacion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - Certificado del Contribuyente: - - - - - - - Textbox28 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!CertificadoContribuyente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - CFC - - - - CFDI RELACIONADOS - - - - - - - Textbox35 - - - White - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.41479cm - - - - - true - true - - - - - Tipo Relación: - - - - - - - Textbox37 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox39 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FolioFiscalRelacionado.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - =IIF(Parameters!TipoRelacionTexto.Value = "" OR Parameters!FolioFiscalRelacionado.Value = "", True,False) - - - - - =IIF(Parameters!TipoRelacionTexto.Value = "" OR Parameters!FolioFiscalRelacionado.Value = "", True,False) - - - - - =IIF(Parameters!TipoRelacionTexto.Value = "" OR Parameters!FolioFiscalRelacionado.Value = "", True,False) - - - - - DataSet1 - 0.15938cm - 5.04053cm - 3.33127cm - 15.0033cm - 2 - - - - - - true - 13.17821cm - 0.04629cm - 4.44266cm - 20.04383cm - 19 - - - - true true @@ -3108,7 +1432,1138 @@ - =Parameters!ClienteDatoExtra1.Value + =Parameters!Observaciones.Value + + + + + + + + =iif(Parameters!Kilometraje.Value = "-1", "","Kilometraje: "& Parameters!Kilometraje.Value) + + + + + + + + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + ID2 + FitProportional + 0.15875cm + 1.15361cm + 2.2881cm + 2.75323cm + 4 + + + + + + true + true + + + + + ECONOLLANTAS SERVICIOS Y ACCESORIOS SA DE CV + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en Sucursal: + + + + =Parameters!Sucursal.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =UCase(Parameters!TipoDocumento.Value) + + + + + + + Textbox8 + 18.23008cm + 0.96018cm + 2.79101cm + 7 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) + + + + + + + Textbox8 + 0.97782cm + 18.23008cm + 0.6cm + 2.79101cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora: + + + + + + + + + =Parameters!Fecha.Value + + + + + + + Textbox8 + 1.57782cm + 18.23008cm + 0.86903cm + 2.79101cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + Folio Fiscal: + + + + =Parameters!FolioFiscal.Value + + + + + + + + + Fecha y hora de certificacion: + + + + =Parameters!FechaCertificacion.Value + + + + + + + + + No. de Serie del Certificado del SAT: + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + + Textbox4 + 2.47332cm + 0.28014cm + 1.09007cm + 9.71199cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + No. de Serie del Certificado del CSD: + + + + =Parameters!CertificadoContribuyente.Value + + + + + + + =Parameters!CiudadSucursal.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + =Parameters!ClienteColonia.Value + + + + + + + + =Parameters!ClienteCiudad.Value + + + + + + + + =Parameters!ClienteEstado.Value + + + + CP + + + + =Parameters!ClienteCP.Value + + + + + + + + =Parameters!ClientePais.Value + + + + + + + + + + + =Parameters!ClienteTelefono.Value + + + + + + + + =iif(Parameters!ClienteContactoMail.Value = "","","Correo: ") + + + + =Parameters!ClienteContactoMail.Value + + + + + + + =Parameters!ClienteRFC.Value + + + + + + + =Parameters!RegimenFiscalCodigo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CondicionPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + Esta Póliza cubre cualquier daño que presente la llanta que no esté cubierta por el fabricante, Esta será reemplazada solo si el daño no es reparable, por una llanta nueva igual o equivalente, cargo al cliente el desgaste por el uso que presente la banda de rodamiento, paq. de serv. y póliza nueva. *NO APLICA EN DESGASTE, ROBO O INCENDIO. + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + Sonora: + + + + Rodríguez (662) 213-0388 - Camino del seri (662) 220-3070 - Colosio (662) 260-8088 - Colosio II (662) 118-9939 - Veracruz (662) 210-0041 - Monteverde (662) 688-1512 - Morelos (662) 211-0805 - Palo Verde (662) 436-3254 - Perisur (662) 254-4849 - Portillo (662) 688-5349 - Progreso (662) 310-5781 - Reforma (662) 213-8724 - Sahuaro (662) 216-1471 - Solidaridad (662) 216-0935 - Quiroga (662) 261-0838 - Guaymas (622) 222-2417 - Nogales (631) 319-0093 - San Luis Rio Colorado (653) 596-1799 - Agua Prieta (633) 688-0080 - Caborca (637) 372-4214 - Magdalena (632) 322-4080 - Cananea (645) 332-2040 - Obregón (644) 412-2002 - Obregón II (644) 413-1543 - Obregón III (644) 413-4501 - Navojoa (642) 422-9852 – + + + + Sinaloa: + + + + Mochis (668) 817-0209 - Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Guamúchil (673) 688-0108 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Sanalona (667) 713-6671 - Tres Ríos (667) 211-4696 - La Primavera (667) 304-2060 - Corredor Automotriz (667) 715-5004 - Del Valle (667) 721-5577 - Mazatlán (669) 910-2122 - + + + + Baja California + + + + : Tijuana (664) 622-5221 – Tijuana II (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 - Mexicali II (686) 326 02 79 - Tecate (665) 5212080 - Ensenada (646) 172-4075 – Ensenada II (646) 176-2703 - + + + + Baja California Sur + + + + : La Paz (612) 146-3656 - La Paz II (612) 121-3185 - Los Cabos (624) 688 3552 - San José del Cabo (624) 247-4739 + + + + + + + Textbox4 + 10.20293cm + 0.22108cm + 2.03224cm + 20.79751cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + Embedded + ID3 + FitProportional + 24.6983cm + 0.28014cm + 0.93046cm + 5.37042cm + 17 + + + + + + true + true + + + + + DESCARGA NUESTRA NUEVA APLICACIÓN + + + + + + + Textbox60 + 22.36352cm + 0.28014cm + 0.6882cm + 20.71217cm + 18 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ord. Compra: + + + + =IIf(Parameters!OrdenCompra.Value = "-1", "", Parameters!OrdenCompra.Value) + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo de Comprobante:I + + + + =UCase(Parameters!TipoDocumento.Value) + + + + ,Moneda: + + + + =Parameters!MonedaAbreviatura.Value + + + + , Uso de CFDI: + + + + =Parameters!UsoCFDI.Value + + + + , Forma de Pago: + + + + =Parameters!FormaPago.Value + + + + , Método de Pago: + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) + + + + + + + + + + + + - - - - - 3.15414cm - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.6cm - - - - - true - true - - - - - =Replace(Parameters!Moneda.Value,"Pesos","Peso mexicano") - - - - - - - Textbox47 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - =Fields!ImpuestoLocal.Value - - - - 2.52863cm - - - true - true - - - - - =Fields!ImpuestoLocal.Value - - - - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - 2.52863cm - - - true - true - - - - - Moneda - - - - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - Before - - - - DataSet1 - 5.84097cm - 14.47429cm - 1.2cm - 5.68277cm + + true + true + + + + + Precio Total: + + + + + + + Textbox19 + 5.27553in + 6.21617in + 0.17608in + 0.94607in 21 + 2pt + 2pt + 2pt + 2pt - - - - - - 3.33075cm - - - 10.99712cm - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - - Textbox128 - - - - - - - - - - - - - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - Importe con letra: - - - - - - - Textbox126 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - ="SON: " & Microsoft.VisualBasic.Strings.UCase(Replace(Parameters!ImporteLetra.Value,"M.N.","MXN")) - - - - - - - Textbox127 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Método de pago: - - - - - - - Textbox130 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) - - - - - - - Textbox131 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Forma de pago: - - - - - - - Textbox23 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FormaPago.Value - - - - - - - - - - - Textbox41 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.66668cm - - - - - true - true - - - - - Uso CFDI: - - - - - - - Textbox43 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!UsoCFDI.Value - - - - - - - Textbox44 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.8cm - - - - - true - true - - - - - Sello digital del CFDI: - - - - - - - Textbox132 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SelloCFDI.Value - - - - - - - Textbox133 - - - Top - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.2cm - - - - - true - true - - - - - Sello del SAT: - - - - - - - Textbox134 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SelloSAT.Value - - - - - - - Textbox135 - - - Top - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - Textbox136 - - - - - - - - - - - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - Textbox6 - - - - - - - - - - - - - - 1pt - - Middle - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 5.84097cm - 0.10736cm - 7.26668cm - 14.32787cm + + + true + true + + + + + Descuento: + + + + + + + Textbox19 + 5.4305in + 6.21616in + 0.17608in + 0.94607in 22 + 2pt + 2pt + 2pt + 2pt - + + + true + true + + + + + Sub Total: + + + + + + + Textbox19 + 5.59199in + 6.21616in + 0.17608in + 0.94607in + 23 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IVA: + + + + + + + Textbox19 + 5.76074in + 6.22658in + 0.17608in + 0.94607in + 24 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + T O T A L : + + + + + + + Textbox19 + 5.92637in + 6.237in + 0.19596in + 0.94607in + 25 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal.Value.ToString() = "", "-", Parameters!SubTotal.Value) + + + + + + + Textbox42 + 5.27553in + 7.16224in + 0.17608in + 0.98426in + 26 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Parameters!Descuento.Value.ToString() = "", "-", Parameters!Descuento.Value) + + + + + + + Textbox42 + 5.4305in + 7.16224in + 0.17608in + 0.98425in + 27 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal2.Value.ToString() = "", "-", Parameters!SubTotal2.Value) + + + + + + + Textbox42 + 5.59199in + 7.17266in + 0.17608in + 0.98425in + 28 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Parameters!IVA.Value.ToString() = "", "-", Parameters!IVA.Value) + + + + + + + Textbox42 + 5.76074in + 7.17266in + 0.17608in + 0.98425in + 29 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox42 + 5.92637in + 7.18308in + 0.19596in + 0.98425in + 30 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + www.econollantas.com + 01800 560-6757 + + + + + + + Textbox90 + 1.77125cm + 7.90108cm + 0.78cm + 4.3635cm + 31 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + ** SI LAS LLANTAS NO SON INSTALADAS EN ECONOLLANTAS PIERDE SU GARANTÍA DE FABRICA ** + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Database + =System.Convert.FromBase64String(Parameters!QRDescarga.Value) + image/png + FitProportional + 9.3435in + 6.67743in + 0.6035in + 0.78275in + 34 + + + + + + true + true + + + + + Puedes encontrarla en Appstore o Google play + + + + + + + + + como Econollantas: + + + + + + + Textbox60 + 22.8083cm + 0.28014cm + 1.49135cm + 5.37042cm + 35 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Con tu aplicación el beneficio más + + + + + + + + + importante es poder escanear el código QR de tu póliza y siempre traerla contigo para + + + + + + + + + atenderte + + + + + + + + + MÁS RÁPIDO Y MEJOR. + + + + + + + Textbox60 + 22.8083cm + 7.45145cm + 2.45709cm + 6.56105cm + 38 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Una vez descargada la App utiliza la podrás agregar tu póliza escaneando el código QR + + + + + + + Textbox60 + 22.79852cm + 14.67145cm + 1.46939cm + 6.32076cm + 39 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + PARA UNA OPTIMA DURACIÓN DE SUS LLANTAS, ESTAS DEBEN ALINEARSE, BALANCEARSE Y ROTAR CADA 6 MESES O 1O MIL KILOMETROS. + + + + PARA HACER VÁLIDA UNA RECLAMACIÓN DEBERÁN CUMPLIR CON EL ANTERIOR REQUISITO + + + + + + 2pt + 2pt + 2pt + 2pt + + - + true true @@ -4131,7 +3431,7 @@ @@ -4142,15 +3442,15 @@ Textbox5 - 0.11382cm - 0.05336cm + 0.14926cm + 0.07193cm 0.54004cm - 20.00281cm + 20.7077cm - #4f81bd + Black 2pt 2pt 2pt @@ -4179,7 +3479,7 @@ Textbox29 0.83025cm - 4.33636cm + 4.78817cm 0.41981cm 5.31841cm 1 @@ -4193,7 +3493,7 @@ 2pt - + true true @@ -4212,7 +3512,7 @@ Textbox29 0.83025cm - 9.65477cm + 10.10658cm 0.41981cm 7.14985cm 2 @@ -4226,7 +3526,7 @@ 2pt - + @@ -4248,7 +3548,7 @@ - + true true @@ -4259,7 +3559,7 @@ @@ -4274,7 +3574,7 @@ - #4f81bd + Black 2pt 2pt 2pt @@ -4285,7 +3585,7 @@ - + true true @@ -4296,7 +3596,7 @@ @@ -4311,7 +3611,7 @@ - #4f81bd + Black 2pt 2pt 2pt @@ -4322,7 +3622,7 @@ - + true true @@ -4333,7 +3633,7 @@ @@ -4348,7 +3648,7 @@ - #4f81bd + Black 2pt 2pt 2pt @@ -4359,7 +3659,7 @@ - + true true @@ -4370,7 +3670,7 @@ @@ -4385,7 +3685,7 @@ - #4f81bd + Black 2pt 2pt 2pt @@ -4551,13 +3851,13 @@ After - + DataSet4 1.39643cm - 2.83462cm + 3.28643cm 0.85604cm 15.30142cm 3 @@ -4569,11 +3869,11 @@ true - 17.79725cm - 0.05538cm + 19.97297cm + 0.13424cm 2.25247cm - 20.1554cm - 23 + 20.89818cm + 41 =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) @@ -4583,26 +3883,92 @@ - + true true - VERSION + Acepto ajuste - =Parameters!CFDIVersion.Value + ____________________ + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + LogoLlantas1 + FitProportional + 12.27878cm + 0.20617cm + 0.85359cm + 20.86494cm + 43 + + + + + + true + true + true + + + + + < ** Toda corrección de los datos del comprobante debera efectuarse a más tardar tres dias despues de su expedición. ** > + @@ -4611,12 +3977,12 @@ - Textbox5 - 20.12028cm - 16.52562cm - 0.65292cm - 3.68516cm - 24 + Textbox4 + 9.73684cm + 0.20617cm + 0.44183cm + 20.83436cm + 44 @@ -4627,103 +3993,109 @@ 2pt - - true - true - - - - - Reg.fiscal - - - - - - - #4f81bd - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!RegimenFiscalCodigo.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - 28.21218cm + 25.75074cm + + + + + + + =Globals!ExecutionTime + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario Imprimio: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + true true @@ -4733,6 +4105,7 @@ ="Página " & Globals.PageNumber & " de " & Globals.TotalPages @@ -4742,11 +4115,12 @@ - Textbox3 - 0.10583cm - 16.30721cm - 0.6cm - 3.95896cm + Textbox35 + 0.00882cm + 18.54098cm + 0.50624cm + 2.5cm + 2 @@ -4766,9 +4140,9 @@ 27.94cm 21.59cm - 0.5cm - 0.5cm - 1cm + 0cm + 0cm + 0.5cm 0.5cm 1.27cm + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.84237cm + 0.15558cm + 0cm + 19.84166cm + 1 + + + + + + + + + 5.28731cm + + + 3.31895cm + + + 3.00271cm + + + 2.76458cm + + + 2.31105cm + + + 2.5cm + + + + + 0.6cm + + + + + true + true + + + + + Proveedor + + + + + + + Textbox3 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Banco Nombre + + + + + + + Textbox5 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cuenta + + + + + + + Textbox13 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CLABE + + + + + + + Textbox15 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CIE + + + + + + + Textbox17 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Referencia + + + + + + + Textbox19 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.57354cm + + + + + true + true + + + + + =Fields!RazonSocial.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!BancoNombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cuenta.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CLABE.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CIE.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Referencia.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 1.01876cm + 0.15558cm + 1.17354cm + 19.18461cm + 2 + + + + + + 0.86311in + + + + + + + Textbox1 + 0.18521cm + 3.21468cm + 0.6cm + 14.02238cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE CUENTAS BANCARIAS DE PROVEEDOR + + + + + + + Textbox2 + 1.10271cm + 3.21468cm + 0.52945cm + 14.02238cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 0.76376cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.08291cm + 17.90491cm + 0.68085cm + 2.09233cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox10 + 0.08291cm + 8.20622cm + 0.68085cm + 2.92333cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!ExecutionTime + + + + + + + Textbox11 + 0.08291cm + 11.11544cm + 0.68085cm + 4.32745cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.25cm + 0.25cm + 1cm + 1cm + 0.13cm + @@ -156,7 +159,6 @@
Proyecto:
-
@@ -164,7 +166,6 @@ SubProyecto:
-
@@ -213,144 +214,25 @@ - - - - Factura - - - - - - - - - - SubProyecto - - - - - - - - - ActivoFijo - - - <%----%> - - - - - - - No. Serie - - - - - - - - - Producto - - - - - - - - - - Responsable - - - - - - - - - Horometro/Odometro - - - - - - - - - - Tipo Mantenimiento - - - - - - - - - Clasificación 2 - - - - - - - - - - - - - Unidad de Medida - - - - - - - - - Cantidad - - - - - - - - - PU - - - - - - - - - Total - - - - - - - - - Cuenta - - - - - - + + + + + + + + + + + + + + + + + + - <%-- - --%> diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index 5b19beed7..d6bcbd3a5 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -226,31 +226,7 @@ Partial Class Compras_RepComprasAFDetalle DdlPS.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2")) End If - If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then - DdlProyecto.Visible = False - LblSubProyecto.Text = "Sucursal" - LblProyecto.Visible = False - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then - DdlProyecto.Visible = False - LblSubProyecto.Text = "Proyecto" - LblProyecto.Visible = False - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataBind() - DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 3 Or UsuarioActual.Empresa.Tipo_CentroCosto = 0 Then - LblProyecto.Text = "Proyecto" - - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then - LblProyecto.Text = "Sucursal" - LblSubProyecto.Text = "Proyecto" - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then - LblProyecto.Text = "Proyecto" - LblSubProyecto.Text = "Sucursal" - End If - + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto) End Sub @@ -264,15 +240,19 @@ Partial Class Compras_RepComprasAFDetalle End Sub Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged - CargaSubProyecto() + If DdlProyecto.SelectedValue = "-1" Then + DdlProyecto.Items.Clear() + DdlSubProyecto.Items.Clear() + CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto) + Else + CargaSubProyecto() + End If End Sub Private Sub CargaSubProyecto() - DdlSubProyecto.Items.Clear() - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros(String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue), "SubProyecto") DdlSubProyecto.DataBind() DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - End Sub Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click CargaDatos() From 334f72210a2737771a67c52ba8124496ccdcc366 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 23 Jan 2023 09:05:44 -0700 Subject: [PATCH 35/55] Rep Compras Detalle: Hacer columnas personalizables --- App_Code/modExtensiones.vb | 29 +++++----- Compras/RepComprasAFDetalle.aspx | 89 ++++++++++++++++++++++++++--- Compras/RepComprasAFDetalle.aspx.vb | 48 ++++++++++++---- 3 files changed, 131 insertions(+), 35 deletions(-) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 63ff870df..5fe30068f 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -1650,25 +1650,22 @@ Namespace Extensiones End Function - Public Function GetColumn(ByVal gv As GridView, ByVal name As String) As Integer - Dim index As Integer = 0 - Dim found As Boolean = False - - For Each c As DataControlField In gv.Columns - - If TypeOf c Is BoundField Then - Dim field As BoundField = CType(c, BoundField) - - If name = field.DataField OrElse name = field.SortExpression OrElse name = field.HeaderText Then - found = True - Exit For + Public Function FBColumn(gv As GridView, name As String) As DataControlField + name = name.ToLower + For Each col As DataControlField In gv.Columns + If TypeOf col Is BoundField Then + Dim field As BoundField = CType(col, BoundField) + If field.DataField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then + Return col + End If + ElseIf TypeOf col Is HyperLinkField Then + Dim field As HyperLinkField = CType(col, HyperLinkField) + If field.DataTextField.ToLower = name OrElse field.SortExpression.ToLower = name OrElse field.HeaderText.Trim.ToLower = name Then + Return col End If End If - - index += 1 Next - - Return If(found, index, -1) + Return Nothing End Function diff --git a/Compras/RepComprasAFDetalle.aspx b/Compras/RepComprasAFDetalle.aspx index 2d2fb3f5d..f9bd2e1b4 100644 --- a/Compras/RepComprasAFDetalle.aspx +++ b/Compras/RepComprasAFDetalle.aspx @@ -25,6 +25,13 @@
  • Generar Excel
  • + + +
  • + Personalizar +
  • +
    +
  • Ver Dlls en pesos
  • @@ -153,9 +160,6 @@
    - - -
    Proyecto:
    @@ -213,7 +217,7 @@
    - + @@ -237,10 +241,7 @@
    - - - + + + + + diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index d6bcbd3a5..6be1261bd 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -82,12 +82,13 @@ Partial Class Compras_RepComprasAFDetalle #End Region + Private Personalizado As Boolean = False + Private Sub Compras_RepComprasAFDetalle_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then CargaCombos() 'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');") - - + GvDatos.DataBind(True) Try Dim Fecha, FechaI, FechaF As String @@ -163,9 +164,11 @@ Partial Class Compras_RepComprasAFDetalle End If If UsuarioActual.CveEmpresa = 72 Then - GvDatos.Columns(3).Visible = True + GvDatos.FBColumn("NoSerie").Visible = True End If + UPDatos.Update() + End If End Sub @@ -284,18 +287,12 @@ Partial Class Compras_RepComprasAFDetalle CvePS, Anio.ToEntero, Mes.ToEntero, AnioMes, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then DTDatos = ObjCompras.DtResultados - GvDatos.DataSource = ObjCompras.DtResultados - Else - GvDatos.DataSource = Nothing - DTDatos = Nothing + GvDatos.DataSource = DTDatos End If - ObjCompras.Dispose() - GvDatos.DataBind() - - - + GvDatos.DataBind(True) + UPDatos.Update() End Sub Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound @@ -482,4 +479,31 @@ Partial Class Compras_RepComprasAFDetalle End If End Sub + + Protected Sub PersonalizarColumnas() + GvDatos.FBColumn("SerieFolio").Visible = ChkFactura.Checked + GvDatos.FBColumn("SubProyecto").Visible = ChkSubProyecto.Checked + GvDatos.FBColumn("CodigoAF").Visible = ChkAF.Checked + GvDatos.FBColumn("NoSerie").Visible = ChkNS.Checked + GvDatos.FBColumn("CodigoPS").Visible = ChkPS.Checked + GvDatos.FBColumn("NombreCompleto").Visible = ChkResp.Checked + GvDatos.FBColumn("AFMedida").Visible = ChkMedidaAF.Checked + GvDatos.FBColumn("AFTipoMantenimientoStr").Visible = ChkTipoMant.Checked + GvDatos.FBColumn("TipoActivoFijo").Visible = ChkTipoAF.Checked + GvDatos.FBColumn("SubTipoActivoFijo").Visible = ChkSubTipoAF.Checked + GvDatos.FBColumn("Clasificacion").Visible = ChkClasif.Checked + GvDatos.FBColumn("Clasificacion2").Visible = ChkClasif2.Checked + GvDatos.FBColumn("UnidadMedida").Visible = ChkUM.Checked + GvDatos.FBColumn("Cantidad").Visible = ChkCant.Checked + GvDatos.FBColumn("PU").Visible = ChkPU.Checked + GvDatos.FBColumn("Total").Visible = ChkTotal.Checked + GvDatos.FBColumn("Cuenta").Visible = ChkCuenta.Checked + UPDatos.Update() + End Sub + + Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click + Personalizado = True + PersonalizarColumnas() + End Sub + End Class \ No newline at end of file From efc9e61ff9aace21cb86fe80073d7d81790a5a98 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 23 Jan 2023 09:34:18 -0700 Subject: [PATCH 36/55] =?UTF-8?q?Rep=20Compras=20AF=20Detalle:=20Agregar?= =?UTF-8?q?=20opci=C3=B3n=20Excel=20Personalizado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/RepComprasAFDetalle.aspx | 32 ++++++++++++++++++----------- Compras/RepComprasAFDetalle.aspx.vb | 15 +++++++++----- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Compras/RepComprasAFDetalle.aspx b/Compras/RepComprasAFDetalle.aspx index f9bd2e1b4..98c3f24f4 100644 --- a/Compras/RepComprasAFDetalle.aspx +++ b/Compras/RepComprasAFDetalle.aspx @@ -19,19 +19,20 @@ -
  • - Generar PDF -
  • -
  • - Generar Excel -
  • - + -
  • - Personalizar -
  • -
    -
    +
  • + Generar PDF +
  • +
  • + Generar Excel +
  • +
  • + Personalizar +
  • +
  • + Excel Personalizado +
  • Ver Dlls en pesos
  • @@ -39,6 +40,13 @@ <%-- --%>   + + + + + + +
    diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index 6be1261bd..9077f17ce 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -337,6 +337,9 @@ Partial Class Compras_RepComprasAFDetalle Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click GenerarPDF() End Sub + Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click + GvDatos.ExportToExcel("ComprasDetalle_" + DdlPS.txtValue.Value + Now.ToShortDateString) + End Sub Private Sub GenerarPDF(Optional Formato As String = "PDF") Dim ObjTareas As New ClsOIEventos @@ -349,12 +352,8 @@ Partial Class Compras_RepComprasAFDetalle End If Dim params As New List(Of ReportParameter) - - - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - Dim FechaI, FechaF As String FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text) FechaF = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", "-1", txtFechaF.Text) @@ -367,7 +366,6 @@ Partial Class Compras_RepComprasAFDetalle params.Add(New ReportParameter("FechaFin", FechaF)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) - params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF(RutaPDF, DTDatos, params, "ReporteComprasAFDetalle_" & Now.ToString("yyyyMMddmmss"), Formato:=Formato) @@ -499,6 +497,13 @@ Partial Class Compras_RepComprasAFDetalle GvDatos.FBColumn("Total").Visible = ChkTotal.Checked GvDatos.FBColumn("Cuenta").Visible = ChkCuenta.Checked UPDatos.Update() + + If Personalizado Then + LnkExcelPersonalizado.Visible = True + Else + LnkExcelPersonalizado.Visible = False + End If + UPAcciones.Update() End Sub Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click From c357cba4b9e47ff4714b9fc972fc86e5be2dbb23 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 23 Jan 2023 09:35:03 -0700 Subject: [PATCH 37/55] Rep Entradas Salidas: Corregir filename Excel --- Inventarios/RepEntradasSalidas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/RepEntradasSalidas.aspx.vb b/Inventarios/RepEntradasSalidas.aspx.vb index 72404a554..c8b79970a 100644 --- a/Inventarios/RepEntradasSalidas.aspx.vb +++ b/Inventarios/RepEntradasSalidas.aspx.vb @@ -345,7 +345,7 @@ Partial Class Inventarios_ReporteEntradasSalidas ImprimiReporte("EXCEL") End Sub Private Sub LnkExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles LnkExcelPersonalizado.Click - GvM.ExportToExcel("EntradasSalidas_" + Now.ToShortDateString + ".xls") + GvM.ExportToExcel("EntradasSalidas_" + Now.ToShortDateString) End Sub Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click ImprimiReporte() From 11b90a6367c68d4505fd35ee442a76f700b2bce4 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Mon, 23 Jan 2023 12:00:19 -0700 Subject: [PATCH 38/55] Clientes restriccion Forma de pago ,Portal Proveedores Descarga de comprobantes --- CRM/EmpresaCRM.aspx.cs | 21 ++++++++++----- Contabilidad/RegPrePolizaS.aspx.vb | 5 ++++ PortalProveedor/PortalProveedor.aspx | 3 ++- PortalProveedor/PortalProveedor.aspx.vb | 11 ++++---- Ventas/Clientes.aspx | 3 ++- Ventas/Clientes.aspx.vb | 34 ++++++++++++++++++++++++- 6 files changed, 63 insertions(+), 14 deletions(-) diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 5d694eff3..5b7fb8098 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -292,10 +292,16 @@ public partial class CRM_EmpresaCRM : ClsPaginas CargarTiposEventos(); LimitaFechasAcercamiento(); CargaDatos(); - if (CveEncuestaCRM > 0) - { - CargaDatosTecnicos(); - } + + //if( Request["CveEmpresaCRM"] != null) + //{ + if (CveEncuestaCRM > 0) + { + CargaDatosTecnicos(); + } + // } + + VerificaPermisos(); CargaClasificaciones(); DdlPS.setEsWebService(true); @@ -1476,8 +1482,11 @@ public partial class CRM_EmpresaCRM : ClsPaginas var responseGenericGetDatosTecnicosEmpresaCRM = encuestaService.GetDatosTecnicosEmpresaCRM(new RequestDatosTecnicosEmpresaCRMGet() { CveEmpresa = UsuarioActual.Empresa.CveEmpresa, CveEncuesta = CveEncuestaCRM, CveEncuestaAplicada = CveEncuestaAplicada, CvePregunta = -1 }); if (responseGenericGetDatosTecnicosEmpresaCRM.IsSuccess) { - GvDatosTecnicos.DataSource = responseGenericGetDatosTecnicosEmpresaCRM.Result; - if (responseGenericGetDatosTecnicosEmpresaCRM.Result.Count > 0) + + + var DTTemp = responseGenericGetDatosTecnicosEmpresaCRM.Result.ToDataTable(); + GvDatosTecnicos.DataSource = DTTemp; + if (DTTemp.Rows.Count > 0) { GvDatosTecnicos.Visible = true; } diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 1d39150e5..5325a5a58 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -3228,6 +3228,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim Bytes As Byte() = Nothing Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero + Dim ConceptoPoliza As String = TxtConcepto.Text Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta)) @@ -3257,6 +3258,10 @@ Partial Class ContabilidadC_RegPrePolizaS params.Add(New ReportParameter("CodigoPostal", "")) params.Add(New ReportParameter("UsuarioRegistro", TxtUsuarioElaboro.Text)) + params.Add(New ReportParameter("ConceptoPoliza", ConceptoPoliza)) + + + If Logo.Exists Then diff --git a/PortalProveedor/PortalProveedor.aspx b/PortalProveedor/PortalProveedor.aspx index 4bcd4e740..39c129a0a 100644 --- a/PortalProveedor/PortalProveedor.aspx +++ b/PortalProveedor/PortalProveedor.aspx @@ -325,7 +325,8 @@
    - + diff --git a/PortalProveedor/PortalProveedor.aspx.vb b/PortalProveedor/PortalProveedor.aspx.vb index 6329d75bf..dc4fec606 100644 --- a/PortalProveedor/PortalProveedor.aspx.vb +++ b/PortalProveedor/PortalProveedor.aspx.vb @@ -592,16 +592,17 @@ Partial Class Portal_PortalProveedor Protected Sub GvBancos_comprobante(sender As Object, e As EventArgs) - Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - - Dim Path As String = String.Format("{0}{1}{2}{3}", UsuarioActual.Empresa.Ruta, "IE\", Gvr.FCHiddenField("CveIe").Value, ".png") + Dim Gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + + Dim Path As String = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, Gvr.DataKey("Comprobante")) + Dim Archivo As New System.IO.FileInfo(Path) If Archivo.Exists Then HttpContext.Current.Response.Clear() HttpContext.Current.Response.ClearContent() - HttpContext.Current.Response.ContentType = "application/png" - HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=comprobante.png") + HttpContext.Current.Response.ContentType = "application/png" + HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name)) HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString()) HttpContext.Current.Response.TransmitFile(Path) 'HttpContext.Current.Response.Flush() diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 342e0bd09..6920fa6c9 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1111,7 +1111,8 @@
    - + diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 2b438d38a..0c9c53526 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1656,7 +1656,8 @@ Partial Class Clientes DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString()) DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString()) - DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString()) + 'DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString()) + CargaFormaDePago(ObjClientes.CveFormaPago33) If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal) ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS @@ -10583,5 +10584,36 @@ Partial Class Clientes UpLineaAdicionalmodal.Update() End Sub + + Protected Sub DdlMetodoPago33_SelectedIndexChanged(sender As Object, e As EventArgs) + + CargaFormaDePago(-1) + + End Sub + + Private Sub CargaFormaDePago(Optional CveFormaPago As Integer = -1) + + DdlFormaPago33.Items.Clear() + + If DdlMetodoPago33.SelectedValue.ToEntero = 3 Then + DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago = 20") + Else + DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago <> 20") + End If + + DdlFormaPago33.DataBind() + + If Not DdlMetodoPago33.SelectedValue.ToEntero = 3 Then + DdlFormaPago33.Items.Insert(0, New ListItem("Seleccione uno", "-1")) + End If + + If CveFormaPago > 0 Then + DdlFormaPago33.SelectedValueExist(CveFormaPago) + End If + + UpFiscalContable.Update() + + End Sub + End Class From b9651e8ba69ad059fabfdf7129637c37aba4e995 Mon Sep 17 00:00:00 2001 From: MLopez Date: Mon, 23 Jan 2023 23:07:15 -0700 Subject: [PATCH 39/55] E13 Buscar Cuentas de banco de proveedores en Popup --- App_Code/ClsPaginas.vb | 2 + Bancos/PopUpBuscarCuentasProveedor.aspx | 164 +++++++++++++++++++++ Bancos/PopUpBuscarCuentasProveedor.aspx.vb | 124 ++++++++++++++++ Site.master | 6 + Site.master.vb | 5 +- 5 files changed, 300 insertions(+), 1 deletion(-) create mode 100644 Bancos/PopUpBuscarCuentasProveedor.aspx create mode 100644 Bancos/PopUpBuscarCuentasProveedor.aspx.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ecbcd2ecf..ae6a62790 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4555,6 +4555,7 @@ Public Class ClsPaginas PaginaDict.Add("/Sistemas/CatContrasenia.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/PopUpBuscarClientes.aspx".ToUpper(), -1) PaginaDict.Add("/Compras/PopUpBuscarProveedor.aspx".ToUpper(), -1) + PaginaDict.Add("/Compras/PopUpBuscarCuentasProveedor.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/PopUpImprimir.aspx".ToUpper(), -1) PaginaDict.Add("/Contabilidad/PopUpAuxiliar.aspx".ToUpper(), -1) PaginaDict.Add("/Fiscal/PopUpConfiguracion.aspx".ToUpper(), -1) @@ -4797,6 +4798,7 @@ Public Class ClsPaginas PaginaDict.Add("/Bancos/PopUpBuscaPersonal.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarColectiva.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarProveedor.aspx".ToUpper(), 281) + PaginaDict.Add("/Bancos/PopUpBuscarCuentasProveedor.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarFolioC.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarClientes.aspx".ToUpper(), 281) 'PaginaDict.Add("/Bancos/CatTiposCuenta.aspx".ToUpper(), -1) diff --git a/Bancos/PopUpBuscarCuentasProveedor.aspx b/Bancos/PopUpBuscarCuentasProveedor.aspx new file mode 100644 index 000000000..61cf9512b --- /dev/null +++ b/Bancos/PopUpBuscarCuentasProveedor.aspx @@ -0,0 +1,164 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PopUpBuscarCuentasProveedor.aspx.vb" Inherits="Bancos_PopUpBuscarCuentasProveedor" %> + +<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> + + + + + + + + + + + + + + + +<%----%> + + + + + + + + + + + + + + + + + + +
    Filtros para búsqueda
    Proveedor: + + + + + +
    + +
    +
    +
    + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +<%-- --%> +
    + + + + + diff --git a/Bancos/PopUpBuscarCuentasProveedor.aspx.vb b/Bancos/PopUpBuscarCuentasProveedor.aspx.vb new file mode 100644 index 000000000..48c16f351 --- /dev/null +++ b/Bancos/PopUpBuscarCuentasProveedor.aspx.vb @@ -0,0 +1,124 @@ +Option Explicit On +Option Strict On + +Imports System.Data +Imports Extensiones +Partial Class Bancos_PopUpBuscarCuentasProveedor + Inherits ClsPaginas + +#Region "Propiedades" + Private ReadOnly Property CveProveedor As Integer + Get + Return ViewState("CveProveedor").ToString.ToEntero + End Get + End Property + Private Property DTCuentasBancos As DataTable + Get + Return CType(ViewState("DTCuentasBancos"), DataTable) + End Get + Set(value As DataTable) + ViewState("DTCuentasBancos") = value + End Set + End Property + + +#End Region + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + CType(Me.Master, BaseMasterPage).EsPopup = True + CType(Me.Master, BaseMasterPage).PopupWidth = 780 + RegistraScript("if($get('tdContenido')){$get('tdContenido').style.height='465px'}") + + If Request("CveProveedor") IsNot Nothing AndAlso IsNumeric(Request("CveProveedor")) AndAlso Request("CveProveedor").ToEntero > 0 Then + ViewState("CveProveedor") = Request("CveProveedor") + CargaDatos(CveProveedor) + DdlProveedores.SelectedValue = CveProveedor.ToString + Else + ViewState("CveProveedor") = -1 + End If + + InicializaValores() + + Me.Form.DefaultButton = BtnBuscar.UniqueID + End If + End Sub + Private Sub InicializaValores() + Dim Txt As String = IfNull(Request("Txt"), "").ToString + If Txt <> "" Then LblTitulo.Text = String.Format("Búsqueda de {0}", Txt) + + DdlProveedores.setEsWebService(True) + DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.SelectedText = "Seleccione" + DdlProveedores.SelectedValue = "-1" + DdlProveedores.DataBind() + End Sub + Private Sub CargaDatos(CveProveedor As Integer) + + If ValidarFiltrosSeleccionados() OrElse CveProveedor > 0 Then + CargaCuentasBancarias() + UPDatos.Update() + Else + Alert("Seleccione un proveedor", TipoMensaje.MsgAdvertencia) + End If + End Sub + + Private Sub CargaCuentasBancarias() + 'If CveProveedor <= 0 Then Exit Sub + Dim ObjCuentasBancos As New ClsGenerales + DTCuentasBancos = New DataTable + + If ObjCuentasBancos.GetCuentasDepositos(CveProveedor) Then + DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados) + Else + Alert("No se pudieron cargar las cuentas bancarias. Por favor intente nuevamente.", TipoMensaje.MsgAdvertencia) + ObjCuentasBancos.Dispose() + Exit Sub + End If + + If CveProveedor < 0 Then + 'Alert("No hay proveedor", TipoMensaje.MsgInformacion) + 'TempDTCuentasBancos = DTCuentasBancos + End If + + ObjCuentasBancos.Dispose() + CargaPSGridCuentasBancos() + RecargaGlobalCuentasBancarias() + End Sub + + Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1) + If CveProveedor > 0 Then + Dim ObjCuentasBancos As New ClsGenerales + + If ObjCuentasBancos.GetCuentasDepositos() Then + GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados + End If + ObjCuentasBancos.Dispose() + End If + End Sub + + Private Sub CargaPSGridCuentasBancos() + GvBancosCuentas.DataSource = DTCuentasBancos.FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue}") + GvBancosCuentas.DataBind() + TblBusqueda.Visible = True + UPDatos.Update() + End Sub + + Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click + CargaDatos(DdlProveedores.SelectedValue.ToEntero) + End Sub + + Private Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound + 'If e.Row.RowType = DataControlRowType.DataRow Then + ' If e.Row.DBCampo("CveAlmacen") = "" Then + ' e.Row.CssClass = "Totales" + ' End If + 'End If + End Sub + + Private Function ValidarFiltrosSeleccionados() As Boolean + If DdlProveedores.SelectedValue.ToEntero > 0 Then Return True + Return False + End Function + +End Class diff --git a/Site.master b/Site.master index 0a9eac6db..e21684d8e 100644 --- a/Site.master +++ b/Site.master @@ -194,6 +194,12 @@ Buscar Proveedor +
  • + + + Buscar Cuentas Proveedor + +
  • diff --git a/Site.master.vb b/Site.master.vb index 88c437c73..4db71a563 100644 --- a/Site.master.vb +++ b/Site.master.vb @@ -215,7 +215,10 @@ Partial Class Site 'End Sub Private Sub CargaBuscadores() 'Proveedores - If UsuarioActual.TienePermisoPagina(37) Then tdProv.Visible = True + If UsuarioActual.TienePermisoPagina(37) Then + tdProv.Visible = True + tdProvBancos.Visible = True + End If 'Clientes If UsuarioActual.TienePermisoPagina(26) Then tdCliente.Visible = True From 28beea57e16a99b16d947d4b2a4f08c854f893f9 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 24 Jan 2023 06:34:39 -0700 Subject: [PATCH 40/55] -- mejoras en pagoprepolziaventa ++ clientesabonar. cambio para utilziar pagoprepoliza --- App_Code/ClsBancos.vb | 3 +- App_Code/ClsPaginas.vb | 5 +- Ventas/ClientesAbonar.aspx | 39 +- Ventas/ClientesAbonar.aspx.vb | 852 +++++++++++----------------------- 4 files changed, 298 insertions(+), 601 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 8b60b8ae6..81a6e7ee9 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1466,7 +1466,7 @@ Public Class ClsBancos Public Function AddBancos_IE(CveCuenta As Integer, CveTipoTransaccion As Integer, FechaDocumento As Date, Folio As String, PagueseA As String, Importe As Double, CveMoneda As Integer, TipoCambio As Double, Observaciones As String, NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer, Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1, - Optional Referencia As String = "-1", Optional CveIESustitucion As Integer = -1, Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False, + Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False, Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1) As Integer Dim Retorno As Integer = -1 @@ -1497,7 +1497,6 @@ Public Class ClsBancos .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCuentaTarjeta", SqlDbType.Int).Value = CveCuentaTarjeta .Add("@Referencia", SqlDbType.VarChar).Value = Referencia - .Add("@CveIESustitucion", SqlDbType.Int).Value = CveIESustitucion .Add("@CveCorte", SqlDbType.Int).Value = CveCorte .Add("@CveProveedorIntermediario", SqlDbType.Int).Value = CveProveedorIntermediario .Add("@FueConciliado", SqlDbType.Bit).Value = FueConciliado diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ecbcd2ecf..bfdb02edb 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -10381,7 +10381,8 @@ Public Class ClsPaginas End If If VentaActual.CveMoneda = 1 And Pago.CveMonedaPago <> 1 Then 'factura pesos, pago en dolares - tImportePago = ((Pago.ImportePago * TCValuacionVenta / Pago.TCPago).RoundSQL * Pago.TCPago).RoundSQL + tImportePago = ((Pago.ImportePago * TCValuacionVenta / Pago.TCPago) * Pago.TCPago).RoundSQL + tImporteVenta = (Pago.ImportePago * TCValuacionVenta).RoundSQL ElseIf VentaActual.CveMoneda <> 1 And Pago.CveMonedaPago <> 1 Then 'factura dolares, pago en dolares tImporteVenta = (Pago.ImportePago * TCValuacionVenta).RoundSQL tImportePago = (Pago.ImportePago * TCValuacionPago).RoundSQL @@ -10557,6 +10558,7 @@ Public Class ClsPaginas Dim ConceptoContable, IdCtaContable As Integer Dim TipoMovimiento As Boolean Dim Diferencia As Decimal = 0 + tImportePago +=Pago.ImporteFluctuacionAdicional 'para los casos de aplicación de If tImporteVenta <> tImportePago Then If tImporteVenta < tImportePago Then @@ -10608,6 +10610,7 @@ Public Class ClsPaginas Public Property CveCreditoDetalle As Integer = -1 Public Property AplicaTraslado As Boolean = True Public Property Referencia As String + Public Property ImporteFluctuacionAdicional As Decimal = 0 End Class diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 07d9c10b3..b296b6faa 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -96,7 +96,7 @@
    -
    +
    @@ -114,10 +114,7 @@
    - - - - +
    T.C: @@ -216,22 +213,22 @@
    - - -
    Liquidación:
    +
    - +
    -
    Préstamo:
    - +
    - +
    +
    Intereses: + +
    @@ -820,6 +817,24 @@ Importe = Importe + ToDouble($get('TxtAnticipo').value); } } + if ($get('TxtPrestamoImporte') != null) { + + if ($get('TxtPrestamoImporte').value == '') { + $get('TxtPrestamoImporte').value = 0.00; + } + else { + Importe = Importe - ToDouble($get('TxtPrestamoImporte').value); + } + } + if ($get('TxtPrestamoIntereses') != null) { + + if ($get('TxtPrestamoIntereses').value == '') { + $get('TxtPrestamoIntereses').value = 0.00; + } + else { + Importe = Importe - ToDouble($get('TxtPrestamoIntereses').value); + } + } if ($get('TxtOtrosImportes') != null) { if (pagoMultiple != 0) { diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index d7af7a10b..84a614416 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -69,6 +69,14 @@ Partial Class Ventas_ClientesAbonar ViewState("DtIngresos") = value End Set End Property + Private Property DtPrestamos As DataTable + Get + Return CType(ViewState("DtPrestamos"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtPrestamos") = value + End Set + End Property Private Property IdCuentaBancaria As Integer Get @@ -164,15 +172,6 @@ Partial Class Ventas_ClientesAbonar End Set End Property - 'Private Property CveIESustitucion As Integer - ' Get - ' Return ViewState("CveIESustitucion").ToString.ToEntero - ' End Get - ' Set(value As Integer) - ' ViewState("CveIESustitucion") = value - ' End Set - 'End Property - Private Property CFDIRelacionadoSustitucion As String Get If ViewState("CFDIRelacionadoSustitucion") Is Nothing Then @@ -248,16 +247,11 @@ Partial Class Ventas_ClientesAbonar ViewState("IdCtaContMonedaExtranjeraAnticipo") = 0 ViewState("IdCtaContMonedaComplementariaAnticipo") = 0 - ViewState("CveIESustitucion") = IfNull(Request("CveIESustitucion"), "-1").ToString.ToEntero DdlProveedorIntermediario.setEsWebService(True) DdlProveedorIntermediario.Attributes.Add("data-metodo", "getproveedores") FechaCorteIE = DateTime.Now - 'If CveIESustitucion > 0 Then - ' CargaIESustituir() - 'End If - Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day) Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate @@ -355,7 +349,6 @@ Partial Class Ventas_ClientesAbonar CargaCuentas() CargaTipoTransaccion() - 'TxtFechaDocumento.Text = IIf(CveIESustitucion > 0, FechaCorteIE.ToShortDateString, Now.ToShortDateString).ToString TxtFechaDocumento.Text = Now.ToShortDateString.ToString TxtAboneA.Enabled = False @@ -390,6 +383,7 @@ Partial Class Ventas_ClientesAbonar 'Dim CveClasificacionCol6 As Integer = 21572 'Dim CveClasificacionCol7 As Integer = 21571 divAnticipo.Visible = True + divPrestamo.Visible = True GvCxC.Columns(17).HeaderText = "Comisión
    Venta" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol1).FiltroPrimeroValor("Clasificacion").Substring(0, 10) GvCxC.Columns(18).HeaderText = "Gastos
    Manejo" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol2).FiltroPrimeroValor("Clasificacion").Substring(0, 12) @@ -406,6 +400,7 @@ Partial Class Ventas_ClientesAbonar DvLiquidacion2.Visible = True DtIngresos = CargaIngresos(2) + DtPrestamos = CargaPrestamos(1) End If CargaDatos(tCveMoneda) @@ -422,18 +417,15 @@ Partial Class Ventas_ClientesAbonar Dim FechaI As String = IfNull(Request("FechaI"), "-1") Dim FechaF As String = IfNull(Request("FechaF"), "-1") - 'Dim FechaCorte As Date = IIf(CveIESustitucion > 0, (FechaCorteIE.ToDate).ToShortDateString, DateTime.Now.AddYears(1).ToShortDateString).ToString.ToDate Dim FechaCorte As Date = DateTime.Now.AddYears(1).ToShortDateString.ToString.ToDate Dim SumDescuentoProntoPago As Double = 0.0 - 'If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte, CveIESustitucion:=CveIESustitucion) Then If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte) Then Dim TmpCxCAux As DataTable TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago") GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") - CveMoneda = pCveMoneda End If @@ -799,12 +791,6 @@ Partial Class Ventas_ClientesAbonar '02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR Dim ErrorCancelarIE As Boolean = False - 'If CveIESustitucion > 0 Then - ' ErrorCancelarIE = CancelarIE() - ' If ErrorCancelarIE Then - ' Exit Sub - ' End If - 'End If Dim ObjIE As New ClsBancos() Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL) @@ -856,11 +842,8 @@ Partial Class Ventas_ClientesAbonar Dim CveProvIntermediario As Integer If ChkProveedorIntermediario.Checked Then CveProvIntermediario = If(DdlProveedorIntermediario.SelectedValue.ToEntero <= 0, -1, DdlProveedorIntermediario.SelectedValue.ToEntero) - End If - - 'CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=CveIESustitucion, CveProveedorIntermediario:=CveProvIntermediario) - CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveIESustitucion:=-1, CveProveedorIntermediario:=CveProvIntermediario) + CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveProveedorIntermediario:=CveProvIntermediario) Else If RblTipoPago.SelectedValue.Contiene("3") Then CveIE = DdlIngreso.SelectedValue.ToEntero @@ -878,7 +861,6 @@ Partial Class Ventas_ClientesAbonar filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) End If - 'inserto los movimientos de la conta para abonar al saldo If CvePrePoliza > 0 Then @@ -895,7 +877,6 @@ Partial Class Ventas_ClientesAbonar Dim CveSubProyectoContabilizar As Integer = -1 Dim CveSubProyectoMaximo As Integer = -1 Dim CuentasContablesInvalidas As New StringBuilder - Dim CuentasContablesInvalidasSIG As New StringBuilder Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) Dim TipoCambioFluctuacion As Decimal = 1 Dim FechaUltimaFluctuacion As Date = MinFecha @@ -903,15 +884,41 @@ Partial Class Ventas_ClientesAbonar Dim tFecha As Date = TxtFechaDocumento.Text.ToDate Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha) - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If UltimaFluctuacion.FechaFluctuacion <= tFecha Then - FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion - TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion + Dim ImportePrestamo As Decimal = 0 + Dim TCPrestamo As Decimal = 0 + If TxtPrestamoImporte.Text.ToDecimal <> 0 Then 'amortización del préstamo + ImportePrestamo = TxtPrestamoImporte.Text.ToDecimal + Dim tCveProv As Integer = DtPrestamos.FiltroPrimeroValor("CveProveedor", "CveIE=" & DdlPrestamo.SelectedValue) + Dim tFechaIE As Date = DtPrestamos.FiltroPrimeroValor("FechaDocumento", "CveIE=" & DdlPrestamo.SelectedValue).ToDate + TCPrestamo = DtPrestamos.FiltroPrimeroValor("TipoCambio", "CveIE=" & DdlPrestamo.SelectedValue).ToDecimal + If CveMoneda = 1 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrestamo, ImportePrestamo, 57, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyecto, TipoCambio:=tipoCambioPago, CveProveedor:=tCveProv) Then + MsgError = "No se pudo insertar la póliza" + End If + Else + If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then + If tFechaIE <= UltimaFluctuacion.FechaFluctuacion Then + FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion + TCPrestamo = UltimaFluctuacion.TCFluctuacion + End If + End If + + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrestamo, ImportePrestamo, 349, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyecto, TipoCambio:=TCPrestamo, ImporteME:=ImportePrestamo, CveProveedor:=tCveProv) Then + MsgError = "No se pudo insertar la póliza" + End If + + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrestamo, ((ImportePrestamo * TCPrestamo) - ImportePrestamo).RoundSQL, 350, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyecto, TipoCambio:=TCPrestamo, ImporteME:=ImportePrestamo, CveProveedor:=tCveProv) Then + MsgError = "No se pudo insertar la póliza" + End If End If - End If + + If TxtPrestamoIntereses.Text.ToDecimal <> 0 AndAlso MsgError = "" Then + Dim ImporteIntereses As Decimal = (TxtPrestamoIntereses.Text.ToDecimal * tipoCambioPago).RoundSQL + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteIntereses, ImporteIntereses, 6, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyecto, TipoCambio:=tipoCambioPago, CveClasificacion:=21927) Then + MsgError = "No se pudo insertar la póliza" + End If + End If - If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then - dtConceptos = ObjMov.DtResultados End If 'inserto las ventas que voy a pagar @@ -920,11 +927,52 @@ Partial Class Ventas_ClientesAbonar If gvr.FCCheckBox("Chk").Checked Then Dim ObjFactura As Modelos.Factura = Nothing + Dim EsAnticipoEspecial As Boolean = False If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then ObjFactura = New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa) End If + Dim VentaActual As New Venta + VentaActual.CveVenta = gvr.DataKey("CveVenta").ToEntero + VentaActual.Fecha = gvr.DataKey("Fecha").ToDate + VentaActual.CveCliente = gvr.DataKey("CveCliente").ToEntero + VentaActual.CveMoneda = gvr.DataKey("CveMoneda").ToEntero + VentaActual.SerieFolio = gvr.DataKey("SerieFolio") + VentaActual.ClienteNombre = NombreComercial + VentaActual.TC = gvr.DataKey("TipoCambio").ToDecimal + VentaActual.Total = gvr.DataKey("Original").ToDecimal + VentaActual.IVA = gvr.DataKey("IVA").ToDecimal + VentaActual.IEPS = gvr.DataKey("IEPS").ToDecimal + VentaActual.RetIVA = gvr.DataKey("RetIVA").ToDecimal + VentaActual.RetISR = gvr.DataKey("RetISR").ToDecimal + + VentaActual.PorcentajeIVA = gvr.DataKey("PorcentajeIVA").ToDecimal + VentaActual.UsuarioActual = UsuarioActual + VentaActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero + + 'Importe de pago + Dim Pago As New VentaPago + Pago.Fecha = TxtFechaDocumento.Text.ToDate + Pago.CveIE = CveIE + Pago.CveMonedaPago = CveMoneda + Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal + Pago.ImportePagoVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal + Pago.Referencia = TxtFolio.Text + + If RblTipoPago.SelectedValue = "3" Then Pago.TipoPago = "I" + + 'Tipos de cambio + If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos + Pago.TCPago = TxtTC.Text.ToDecimal + ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES + Pago.TCPago = IIf(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal) + ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES + Pago.TCPago = TxtTCDolares.Text.ToDecimal + End If + tipoCambioPago = Pago.TCPago + + If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then 'Si la venta viene en Pesos y se va a pagar en Pesos tipoCambioPago = 1 @@ -946,531 +994,173 @@ Partial Class Ventas_ClientesAbonar PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal End If + If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then + EsAnticipoEspecial = True + Pago.AplicaTraslado = False + Dim IdCtaContable As Integer = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente) + If VentaActual.CveMoneda = 2 Then IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera) + + If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, VentaActual.SerieFolio, 3, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, VentaActual.SerieFolio, 95, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then + MsgError = "No se pudo insertar la póliza" + End If + Else + MsgError = "No se pudo insertar la póliza" + End If + End If + + If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola + Dim FluctuacionAnticipo As Decimal = 0 + Dim ImporteLiq1 As Decimal = gvr.FCTextBox("TxtLiqCol1").Text.ToDecimal + Dim ImporteLiq2 As Decimal = gvr.FCTextBox("TxtLiqCol2").Text.ToDecimal + Dim ImporteLiq3 As Decimal = gvr.FCTextBox("TxtLiqCol3").Text.ToDecimal + Dim ImporteLiq4 As Decimal = gvr.FCTextBox("TxtLiqCol4").Text.ToDecimal + Dim ImporteLiq5 As Decimal = gvr.FCTextBox("TxtLiqCol5").Text.ToDecimal + Dim ImporteLiq6 As Decimal = gvr.FCTextBox("TxtLiqCol6").Text.ToDecimal + Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal + Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal + Dim ImporteLiq9 As Decimal = gvr.FCTextBox("TxtLiqCol9").Text.ToDecimal + + Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta + Dim CveClasificacionCol2 As Integer = 21916 ' manejo + Dim CveClasificacionCol3 As Integer = 21917 'servicios de inspección + Dim CveClasificacionCol4 As Integer = 21918 ' seguro liquidación + Dim CveClasificacionCol5 As Integer = 21561 ' gastos aduanales mex + Dim CveClasificacionCol6 As Integer = 21920 ' diveros + Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa + Dim CveClasificacionCol8 As Integer = 21211 'material Empaque + Dim CveClasificacionCol9 As Integer = 21207 'Semilla + + Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero + Dim CveConceptoLiquidacion As Integer = 51 + Dim ConceptoPartida As String = gvr.DataKey("SerieFolio") & " " & gvr.FCDropDownList("DdlTG").SelectedItem.Text + + If ImporteLiq1 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq1, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq1 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1, ImporteME:=If(CveMoneda > 1, ImporteLiq1, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq2 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq2 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq3 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq3 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq4 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq4 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq5 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq5 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq6 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq6 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq7 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq7 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq8 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq8 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If ImporteLiq9 <> 0 Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq9, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq9 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol9, ImporteME:=If(CveMoneda > 1, ImporteLiq9, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" : Exit For + End If + End If + + If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero > 0 Then + Dim TCP As Decimal = 0 + Dim FolioPago As String = " " + If DtIngresos IsNot Nothing Then + TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)) + FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) + Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)).ToDate + 'considera fluctuación + If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then + If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then + tTCPFecha = UltimaFluctuacion.FechaFluctuacion + TCP = UltimaFluctuacion.TCFluctuacion + End If + End If + End If + 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo + FluctuacionAnticipo = ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL + MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) + End If + + If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero > 0 Then + Dim TCP As Decimal = 0 + Dim FolioPago As String = " " + If DtIngresos IsNot Nothing Then + TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) + FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) + Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)).ToDate + 'considera fluctuación + If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then + If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then + tTCPFecha = UltimaFluctuacion.FechaFluctuacion + TCP = UltimaFluctuacion.TCFluctuacion + End If + End If + + End If + 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo + FluctuacionAnticipo += ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort2").Text.ToDecimal).RoundSQL + MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) + End If + + If ImportePrestamo <> 0 Then + If TCPrestamo > 0 Then + FluctuacionAnticipo += ((TCPrestamo - tipoCambioPago) * ImportePrestamo).RoundSQL + End If + End If + Pago.ImporteFluctuacionAdicional = FluctuacionAnticipo + End If + + If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + End If + + ' Case 134 'Pago Intermediario + If RblTipoPago.SelectedValue = "2" Then + Dim ImporteMovimiento As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - gvr.FCTextBox("TxtComision").Text.ToDecimal + Dim ImporteMN As Decimal = (ImporteMovimiento * tipoCambioPago).RoundSQL + Dim IdCtaContable As Integer = 0 + + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, VentaActual.SerieFolio, 134, VentaActual.SerieFolio, IdCtaContable, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero) Then + MsgError = "No se pudo insertar la póliza" + End If + End If + 'PARA EMITIR COMPLEMENTO PAGO CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero) SeriesPago.Add(gvr.DataKey("SerieFolio")) - Dim tipoCambioVentaDiferenciaCambiaria As Double = 1 - Dim EsAnticipoEspecial As Boolean = False - If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True - Dim FluctuacionAnticipo As Decimal = 0 - - If dtConceptos IsNot Nothing Then - FluctuacionAnticipo = 0 ' se limpia la fluctuación por cada factura. - For Each Row As DataRow In dtConceptos.Rows - - Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero - Dim TipoMovimiento As Boolean = If(Row("TipoMovto").ToString = "True", True, False) - Dim ImporteMovimiento As Decimal = 0 - Dim ImporteMN As Decimal - Dim FechaMovimiento As Date = TxtFechaDocumento.Text - Dim IdCtaContable As Integer = 0 - Dim ConceptoMovimiento As String = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, NombreComercial, gvr.DataKey("SerieFolio").ToString, TxtFolio.Text.Trim) - Dim Referencia As String = gvr.DataKey("SerieFolio").ToString - Dim CveSubProyecto As Integer = gvr.DataKey("CveSubProyecto").ToEntero - CveSubProyectoContabilizar = -1 - Dim PorcentajeImpuesto As Decimal = 0 - If CveSubProyecto > 0 Then CveSubProyectoMaximo = CveSubProyecto - - Select Case ConceptoContable - Case 2 'Pago Cliente - If gvr.DataKey("CveMoneda").ToEntero > 1 Then ConceptoContable = 292 - - ImporteMovimiento = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal).RoundSQL - ImporteMN = ImporteMovimiento '(ImporteMovimiento * tipoCambioVentaValuacion).RoundSQL - TipoCambioGeneral = tipoCambioVentaValuacion - CveSubProyectoContabilizar = CveSubProyecto - - If gvr.DataKey("CveMoneda").ToEntero = 1 Then - IdCtaContable = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente) - ConceptoContable = If(EsAnticipoEspecial, 3, ConceptoContable) - Else - ConceptoMovimiento += $" TC:{tipoCambioVentaValuacion} ${ImporteMovimiento.FormatoNumero(2)}" - IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaComplementariaAnticipo, IdCtaContComplementaria) - If ImporteMovimiento <> 0 Then - ImporteMN = ImporteMovimiento - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, If(gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158), 226, 207), ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=(ImporteMovimiento * tipoCambioVentaValuacion - ImporteMovimiento).RoundSQL, ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioVentaValuacion) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera) - ConceptoContable = If(EsAnticipoEspecial, 3, ConceptoContable) - End If - - If EsAnticipoEspecial Then - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Referencia, 2, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMN, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Referencia, 95, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMN, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=False) Then - MsgError = "No se pudo insertar la póliza" - End If - Else - MsgError = "No se pudo insertar la póliza" - End If - End If - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola - - Dim ImporteLiq1 As Decimal = gvr.FCTextBox("TxtLiqCol1").Text.ToDecimal - Dim ImporteLiq2 As Decimal = gvr.FCTextBox("TxtLiqCol2").Text.ToDecimal - Dim ImporteLiq3 As Decimal = gvr.FCTextBox("TxtLiqCol3").Text.ToDecimal - Dim ImporteLiq4 As Decimal = gvr.FCTextBox("TxtLiqCol4").Text.ToDecimal - Dim ImporteLiq5 As Decimal = gvr.FCTextBox("TxtLiqCol5").Text.ToDecimal - Dim ImporteLiq6 As Decimal = gvr.FCTextBox("TxtLiqCol6").Text.ToDecimal - Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal - Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal - Dim ImporteLiq9 As Decimal = gvr.FCTextBox("TxtLiqCol9").Text.ToDecimal - - Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta - Dim CveClasificacionCol2 As Integer = 21916 ' manejo - Dim CveClasificacionCol3 As Integer = 21917 'servicios de inspección - Dim CveClasificacionCol4 As Integer = 21918 ' seguro liquidación - Dim CveClasificacionCol5 As Integer = 21561 ' gastos aduanales mex - Dim CveClasificacionCol6 As Integer = 21920 ' diveros - Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa - Dim CveClasificacionCol8 As Integer = 21211 'material Empaque - Dim CveClasificacionCol9 As Integer = 21207 'Semilla - - Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero - Dim CveConceptoLiquidacion As Integer = 51 - Dim ConceptoPartida As String = gvr.DataKey("SerieFolio") & " " & gvr.FCDropDownList("DdlTG").SelectedItem.Text - - If ImporteLiq1 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq1, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq1 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1, ImporteME:=If(CveMoneda > 1, ImporteLiq1, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq2 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq2 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq3 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq3 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq4 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq4 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq5 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq5 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq6 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq6 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq7 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq7 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq8 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq8 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" - Exit For - End If - End If - - If ImporteLiq9 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq9, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq9 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol9, ImporteME:=If(CveMoneda > 1, ImporteLiq9, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" - Exit For - End If - End If - - If gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero > 0 Then - Dim TCP As Decimal = 0 - Dim FolioPago As String = " " - If DtIngresos IsNot Nothing Then - TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)) - FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) - Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)).ToDate - 'considera fluctuación - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then - tTCPFecha = UltimaFluctuacion.FechaFluctuacion - TCP = UltimaFluctuacion.TCFluctuacion - End If - End If - End If - 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo - FluctuacionAnticipo = ((TCP - tipoCambioVentaValuacion) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) - End If - - If gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero > 0 Then - Dim TCP As Decimal = 0 - Dim FolioPago As String = " " - If DtIngresos IsNot Nothing Then - TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) - FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) - Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)).ToDate - 'considera fluctuación - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then - tTCPFecha = UltimaFluctuacion.FechaFluctuacion - TCP = UltimaFluctuacion.TCFluctuacion - End If - End If - - End If - 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo - FluctuacionAnticipo += ((TCP - tipoCambioVentaValuacion) * gvr.FCTextBox("TxtAmort2").Text.ToDecimal).RoundSQL - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, tipoCambioVentaValuacion, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) - End If - - End If - - - - Case 8 'Ret IVA x Trasladar - If EsAnticipoEspecial Then Exit Select - If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then - Exit Select - End If - - ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - 'Conta ContPAQ - If IdCtaContRetIVA <> 0 Then - IdCtaContable = IdCtaContRetIVA - Else - If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - - - Case 313 'Ret Iva Servicios - If EsAnticipoEspecial Then Exit Select - If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then - - ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - 'OBTENER CUENTAS - If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - 'Conta ContPAQ - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - - End If - End If - - End If - - Case 9 'Ret ISR x Trasladar - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - 'Conta ContPAQ - If IdCtaContRetISR <> 0 Then - IdCtaContable = IdCtaContRetISR - Else - If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - End If - End If - End If - End If - - - - Case 13 'Iva por Trasladar - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("IVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal - Dim IdCtaIVAXTrasladar As Integer = 0 - - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then - IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero - End If - - IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - Case 62 'Ret IVA Trasladado - If EsAnticipoEspecial Then Exit Select - If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then - Exit Select - End If - - ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - 'Conta ContPAQ - If IdCtaContRetIVA <> 0 Then - IdCtaContable = IdCtaContRetIVA - Else - If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero - End If - End If - End If - End If - - Case 314 'Ret Iva Servicios Traslado - If EsAnticipoEspecial Then Exit Select - If gvr.DataKey("CveTipoRetencion").ToEntero = 4 Then - - ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - - 'OBTENER CUENTAS - If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - 'Conta ContPAQ - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - End If - End If - End If - - Case 63 'Ret ISR Trasladado - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - 'Conta ContPAQ - If IdCtaContRetISR <> 0 Then - IdCtaContable = IdCtaContRetISR - Else - If ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - End If - End If - End If - End If - - - - Case 61 'Iva Trasladado - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("IVA").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - CveSubProyectoContabilizar = CveSubProyecto - - PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal - Dim IdCtaIVATrasladado As Integer = 0 - - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then - IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero - End If - - IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) - If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - Case 38 'IEPS por trasladar - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("IEPS").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta)).RoundSQL - TipoCambioGeneral = tipoCambioVenta - CveSubProyectoContabilizar = CveSubProyecto - - IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSxTrasladar - Case 39 'IEPS Trasladado - If EsAnticipoEspecial Then Exit Select - - ImporteMovimiento = (gvr.DataKey("IEPS").ToDecimal * PorcentajePago).RoundSQL - ImporteMN = (ImporteMovimiento * tipoCambioVenta).RoundSQL - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - - CveSubProyectoContabilizar = CveSubProyecto - - IdCtaContable = UsuarioActual.Empresa.IdCuentaIEPSTrasladado - Case 64 'Ganancia - If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then - - Dim CveMonedaVenta As Integer = gvr.DataKey("CveMoneda").ToEntero - Dim tImporteVenta, tImportePago As Decimal - Dim Diferencia As Decimal = 0 - ImporteMovimiento = 0 - Dim ImportePago As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal.RoundSQL - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then - ImportePago = ImportePago - gvr.FCTextBox("TxtAmort").Text.ToDecimal - gvr.FCTextBox("TxtAmort2").Text.ToDecimal - End If - - tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) - - If CveMonedaVenta = 1 And CveMoneda <> 1 Then - 'factura pesos, pago en dolares - tImporteVenta = ImportePago - tImportePago = ((ImportePago * tipoCambioVenta / tipoCambioPago).RoundSQL * tipoCambioPago).RoundSQL - ElseIf CveMonedaVenta <> 1 And CveMoneda <> 1 Then - 'factura dolares, pago en dolares - tImporteVenta = (ImportePago * tipoCambioVentaValuacion).RoundSQL - tImportePago = (ImportePago * tipoCambioPago).RoundSQL - ElseIf CveMonedaVenta <> 1 And CveMoneda = 1 Then - 'factura dolares, pago en pesos - tImporteVenta = (ImportePago * tipoCambioVentaValuacion).RoundSQL - tImportePago = (ImportePago * tipoCambioPago).RoundSQL - End If - - 'If FluctuacionAnticipo <> 0 Then - ' tImportePago += FluctuacionAnticipo - 'End If - - If tImporteVenta <> tImportePago Then - If tImporteVenta < tImportePago Then - ConceptoContable = 64 - IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - TipoMovimiento = True - 'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria - Else - ConceptoContable = 65 - IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - TipoMovimiento = False - ' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria - End If - Diferencia = tImporteVenta - tImportePago - - End If - - ' si tiene funcionalidad para que tome el TC de pago, que solo afecta a los impuestos - If FuncionalidadFluctuacionImpuestos Then - Dim TCImpuestos As Decimal = tipoCambioPago - - Diferencia -= (((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IVA - Diferencia -= (((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetIVA - Diferencia -= (((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el RetISR - Diferencia -= (((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioVentaValuacion) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos)) 'Añadimos la diferencia de ganancia en el IEPS - Diferencia = Diferencia.RoundSQL - End If - - ImporteMovimiento = Math.Abs(Diferencia) - ImporteMN = ImporteMovimiento - - - CveSubProyectoContabilizar = CveSubProyecto - Else - ImporteMovimiento = 0 - End If - - - Case 78 'Otros Ingresos - If ChkAjusteOI.Checked Then - ImporteMovimiento = gvr.FCTextBox("TxtComision").Text.ToDecimal - ImporteMN = ImporteMovimiento * tipoCambioPago.RoundSQL - - If gvr.FCTextBox("TxtComision").Text.ToDecimal < 0 Then - TipoMovimiento = False - ImporteMovimiento = ImporteMovimiento * -1 - ImporteMN = ImporteMN * -1 - Else - TipoMovimiento = True - End If - - ImporteMovimiento = ImporteMovimiento.RoundSQL - ImporteMN = ImporteMN.RoundSQL - TipoCambioGeneral = tipoCambioPago - CveSubProyectoContabilizar = CveSubProyecto - - IdCtaContable = UsuarioActual.Empresa.IdCuentaOtrosIngresos - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - End If - - Case 134 'Pago Intermediario - If RblTipoPago.SelectedValue = "2" Then - ImporteMovimiento = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - gvr.FCTextBox("TxtComision").Text.ToDecimal - ImporteMN = Math.Round(ImporteMovimiento * tipoCambioPago, 2) - CveSubProyectoContabilizar = CveSubProyecto - - If tipoCambioVenta > 1 Then ConceptoMovimiento += $" TC:{tipoCambioVenta} ${ImporteMovimiento.FormatoNumero(2)}" - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, ConceptoMovimiento, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, -1, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero, ImporteMX:=ImporteMN) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - ImporteMovimiento = 0 - Case 30 - ImporteMovimiento = 0 - Case Else - ImporteMovimiento = 0 - End Select - - If MsgError <> "" Then - Exit For - End If - - If ImporteMovimiento <> 0 AndAlso MsgError = "" Then - 'Conta ContPAQ - If (IdCtaContable < 1 Or IdCuentaBancaria < 1) AndAlso UsuarioActual.CveEmpresa <> 119 Then - CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) - idCuentaContabilizacion = 0 - End If - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteMN, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=PorcentajeImpuesto) Then - MsgError = "No se pudo insertar la póliza" - Exit For - End If - End If - - Next - - If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then - ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal() - ListaFacturasGenerarNC.Add(ObjFactura) - End If + If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then + ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal() + ListaFacturasGenerarNC.Add(ObjFactura) End If End If @@ -1480,7 +1170,7 @@ Partial Class Ventas_ClientesAbonar CveSubProyectoContabilizar = CveSubProyectoMaximo - If tipoCambioPago > 1 AndAlso CveMoneda = 2 Then + If CveMoneda = 2 Then 'If IdCuentaBancariaComplementaria > 0 Then If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES tipoCambioPago = TxtTCDolares.Text.ToDecimal @@ -1522,11 +1212,8 @@ Partial Class Ventas_ClientesAbonar End If End If - End If - If RblTipoPago.SelectedValue = "3" AndAlso MsgError = "" Then - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, CveIE, TxtImporte.Text.ToDecimal, tipoCambioPago, tipoCambioVenta, -1, TxtObservaciones.Text, DdlIngreso.SelectedItem.Text) End If @@ -1557,7 +1244,6 @@ Partial Class Ventas_ClientesAbonar Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidas)) End If End If - Else MsgError = "No se pudo insertar la póliza" End If @@ -1572,7 +1258,6 @@ Partial Class Ventas_ClientesAbonar For Each Fac As Modelos.Factura In ListaFacturasGenerarNC Dim ListaNC As New List(Of Modelos.Factura) ListaNC.Add(Fac) - Dim Resp = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaNC) If Resp IsNot Nothing AndAlso Resp.Respuesta IsNot Nothing AndAlso Resp.Respuesta.CveVenta > 0 Then @@ -1667,20 +1352,6 @@ Partial Class Ventas_ClientesAbonar MsgError = "Error al Agregar la Póliza de Armonización Contable" End If - 'BITACORA - 'If MsgError = "" Then - - ' If CveIESustitucion > 0 And ComplementoSustitucionGenerado Then - ' If Not ObjEvento.AddEventoBitacora($"Complemento de pago Cancelado por sustitución con Folio
    {TxtFolio.Text}", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIESustitucion) Then - ' MsgError = "Ocurrió un error al agregar la bitacora" - ' End If - ' If Not ObjEvento.AddEventoBitacora($"Complemento de pago Generado por Sustitución de {FolioIECancelado}", "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIE) Then - ' MsgError = "Ocurrió un error al agregar la bitacora" - ' End If - ' End If - - 'End If - Catch ex As Exception MsgError = "Ocurrió un error al guardar el movimiento" OnError("Ocurrió un error al guardar el movimiento", ex) @@ -1718,7 +1389,7 @@ Partial Class Ventas_ClientesAbonar Else If ObjConta IsNot Nothing Then ObjConta.RollBack() ObjIE.RollBack() - Alert(MsgError, TipoMensaje.MsgAdvertencia) + ' Alert(MsgError, TipoMensaje.MsgAdvertencia) End If ObjIE.Dispose() @@ -2398,7 +2069,6 @@ Partial Class Ventas_ClientesAbonar DdlCuenta.SelectedValue = "-1" DdlTipoTransaccion.SelectedValue = "-1" - 'CveIESustitucion = "-1" CFDIRelacionadoSustitucion = "-1" FechaCorteIE = DateTime.Now.ToDate IDPoliza = -1 @@ -2476,7 +2146,21 @@ Partial Class Ventas_ClientesAbonar Deudores.Dispose() DdlIngreso.DataBind() - DdlIngreso.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlIngreso.Items.Insert(0, New ListItem("-", "-1")) + Return dtt + End Function + + Private Function CargaPrestamos(tCveMoneda As Integer) As DataTable + Dim dtt As DataTable = Nothing + Dim Deudores As New ClsMovimientos + If Deudores.GetDocumentosxPagarDetalle(CveCliente, tCveMoneda, 2, UsuarioActual.CveEmpresa) Then + DdlPrestamo.DataSource = Deudores.DtResultados '.FiltraParametros("CveCliente > 0 AND Saldo > 0 AND CveIE > 0") + dtt = Deudores.DtResultados + End If + Deudores.Dispose() + + DdlPrestamo.DataBind() + DdlPrestamo.Items.Insert(0, New ListItem("-", "-1")) Return dtt End Function @@ -2626,8 +2310,6 @@ Partial Class Ventas_ClientesAbonar 'For i = 0 To CveVentas.Count - 1 Dim ObjBancos As New ClsBancos - - 'If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, If(CveIESustitucion > 0, 2, 1), UsuarioActual.CveEmpresa, -1) Then If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then If Not ObjBancos.DtResultados.Rows.Count > 0 Then ObjBancos.Dispose() @@ -2638,8 +2320,6 @@ Partial Class Ventas_ClientesAbonar ObjBancos.IniciaTransacSQL() - - 'If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=If(CveIESustitucion > 0, True, False)) Then If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=False) Then ObjBancos.Commit() ComplementoSustitucionGenerado = True @@ -3025,7 +2705,7 @@ Partial Class Ventas_ClientesAbonar Private Sub DdlIngreso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlIngreso.SelectedIndexChanged 'saco la moneda de la selección - hdnIngresoImporte.Value = 0 + HdnIngresoImporte.Value = 0 If DdlIngreso.SelectedValue.ToEntero > 0 Then Dim Banco As New ClsBancos @@ -3033,7 +2713,7 @@ Partial Class Ventas_ClientesAbonar CveMonedaPago = Banco.CveMoneda Dim Deudores As New ClsMovimientos If Deudores.GetIngresosSaldosDetalle(CveCliente, -1, UsuarioActual.CveEmpresa) Then - hdnIngresoImporte.Value = Deudores.DtResultados.FiltroPrimeroValor("Saldo", String.Format("CveIE = {0}", DdlIngreso.Selectedvalue)) + HdnIngresoImporte.Value = Deudores.DtResultados.FiltroPrimeroValor("Saldo", String.Format("CveIE = {0}", DdlIngreso.SelectedValue)) End If Deudores.Dispose() End If From 4bd614d22ab619cb75350570563f2944e9d42049 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 24 Jan 2023 11:40:26 -0700 Subject: [PATCH 41/55] =?UTF-8?q?--=20mejora=20aplicaci=C3=B3n=20de=20pago?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsPaginas.vb | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index fa71eb52f..acd0e8d9a 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4555,7 +4555,6 @@ Public Class ClsPaginas PaginaDict.Add("/Sistemas/CatContrasenia.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/PopUpBuscarClientes.aspx".ToUpper(), -1) PaginaDict.Add("/Compras/PopUpBuscarProveedor.aspx".ToUpper(), -1) - PaginaDict.Add("/Compras/PopUpBuscarCuentasProveedor.aspx".ToUpper(), -1) PaginaDict.Add("/Ventas/PopUpImprimir.aspx".ToUpper(), -1) PaginaDict.Add("/Contabilidad/PopUpAuxiliar.aspx".ToUpper(), -1) PaginaDict.Add("/Fiscal/PopUpConfiguracion.aspx".ToUpper(), -1) @@ -4798,7 +4797,7 @@ Public Class ClsPaginas PaginaDict.Add("/Bancos/PopUpBuscaPersonal.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarColectiva.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarProveedor.aspx".ToUpper(), 281) - PaginaDict.Add("/Bancos/PopUpBuscarCuentasProveedor.aspx".ToUpper(), 281) + 'PaginaDict.Add("/Bancos/PopUpBuscarCuentasProveedor.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarFolioC.aspx".ToUpper(), 281) PaginaDict.Add("/Bancos/PopUpBuscarClientes.aspx".ToUpper(), 281) 'PaginaDict.Add("/Bancos/CatTiposCuenta.aspx".ToUpper(), -1) @@ -4850,6 +4849,7 @@ Public Class ClsPaginas PaginaDict.Add("/Bancos/ProveedoresCreditos.aspx".ToUpper(), 528) PaginaDict.Add("/Bancos/RepSaldosPeriodo.aspx".ToUpper(), 884) PaginaDict.Add("/Bancos/PrestamoPersonal.aspx".ToUpper(), 890) + PaginaDict.Add("/Bancos/PopUpBuscarCuentasProveedor.aspx".ToUpper(), 679) #End Region #Region "CGame" @@ -4986,9 +4986,6 @@ Public Class ClsPaginas PaginaDict.Add("/Compras/CatTipoGasto.aspx".ToUpper(), 759) - - - #End Region 'CONTABILIDAD @@ -10429,12 +10426,12 @@ Public Class ClsPaginas ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 8, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 62, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 62, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True End If @@ -10444,12 +10441,12 @@ Public Class ClsPaginas ImporteMN = (ImporteMovimiento * VentaActual.TC).RoundSQL If VentaActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 9, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * TCValuacionPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 63, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 63, VentaActual.SerieFolio, Concepto, 0, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True End If @@ -10467,12 +10464,12 @@ Public Class ClsPaginas End If - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 38, VentaActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True 'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 39, VentaActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 39, VentaActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=VentaActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME) Then ErrorMovtos = True End If 'concepto pago From cbcecb6ca1cb8f752f00509feb2b1352dde9c0f0 Mon Sep 17 00:00:00 2001 From: MLopez Date: Tue, 24 Jan 2023 17:03:04 -0700 Subject: [PATCH 42/55] E140 Rep Ventas Autorizaciones Exportar Excel y PDF --- Ventas/RepVentasAutorizaciones.aspx | 10 ++++---- Ventas/RepVentasAutorizaciones.aspx.cs | 35 ++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/Ventas/RepVentasAutorizaciones.aspx b/Ventas/RepVentasAutorizaciones.aspx index f0af1eacd..d8c3d911e 100644 --- a/Ventas/RepVentasAutorizaciones.aspx +++ b/Ventas/RepVentasAutorizaciones.aspx @@ -16,7 +16,7 @@ - <%--
  • +<%--
  • Ver Dlls en pesos
  • @@ -25,13 +25,13 @@ Ver Grafica - + --%>
  • - PDF + Generar PDF
  • - Excel -
  • --%> + Exportar Excel + diff --git a/Ventas/RepVentasAutorizaciones.aspx.cs b/Ventas/RepVentasAutorizaciones.aspx.cs index f230309b6..63655bfe1 100644 --- a/Ventas/RepVentasAutorizaciones.aspx.cs +++ b/Ventas/RepVentasAutorizaciones.aspx.cs @@ -12,12 +12,42 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas get { return DtDatos = (DataTable)ViewState["DtDatos"]; } set { ViewState["DtDatos"] = value; } } + private bool Consultado { + get { return Consultado = (bool)ViewState["Consultado"]; } + set { ViewState["Consultado"] = value; } + } - #endregion - protected void Page_Load(object sender, EventArgs e) + #endregion + + protected void LnkExcel_Click(object sender, EventArgs e) + { + if (Consultado) + { + GvDatos.ExportToExcelG("RepVentasAutorizaciones" + DateTime.Now, "Reporte de Autorizaciones de Ventas", UsuarioActual); + } + else + { + Alert("Por favor realice una consulta primero."); + } + } + + protected void LnkPdf_Click(object sender, EventArgs e) + { + if (Consultado) { + GvDatos.GenerarReportePDF("Reporte de Autorizaciones de Ventas"); + } else { + Alert("Por favor realice una consulta primero."); + } + } + public override void VerifyRenderingInServerForm(System.Web.UI.Control control) + { + } + + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { + Consultado = false; InicializaValores(); } } @@ -45,6 +75,7 @@ public partial class Ventas_RepVentasAutorizaciones : ClsPaginas protected void BtnConsultar_Click(object sender, EventArgs e) { Consulta(); + Consultado = true; } private void Consulta() From 252cd3839653289b83c771924b316b4cdf461d90 Mon Sep 17 00:00:00 2001 From: MLopez Date: Tue, 24 Jan 2023 17:14:25 -0700 Subject: [PATCH 43/55] IndicadorResumen mover Saldo CxP a la izquierda, mejorar texto --- General/RepIndicadorResumen.aspx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/General/RepIndicadorResumen.aspx b/General/RepIndicadorResumen.aspx index 6606fafa5..316e9e246 100644 --- a/General/RepIndicadorResumen.aspx +++ b/General/RepIndicadorResumen.aspx @@ -418,13 +418,17 @@
    +
    +
    +
    +
    - Saldo conjunto de Cuentas por Pagar + Saldo acumulado de Cuentas por Pagar
    @@ -434,6 +438,8 @@
    + +
    From 97b7faa2ea387571fbef042b58370fa00d7008e7 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 24 Jan 2023 19:50:52 -0700 Subject: [PATCH 44/55] --- cambios en round --- App_Code/Modelos.vb | 77 +++------------------------------------------ 1 file changed, 5 insertions(+), 72 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 17861b78e..b388fa640 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2464,7 +2464,7 @@ Namespace Modelos If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementariaClientes) Then importeMX = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * TCCliente - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(TCCliente = 1, 0, importeMovimiento), TipoCambio:=TCCliente, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=(importeMovimiento * TCCliente - importeMovimiento).RoundSQL, ImporteME:=If(TCCliente = 1, 0, importeMovimiento), TipoCambio:=TCCliente, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If @@ -2636,7 +2636,7 @@ Namespace Modelos If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementariaClientes) Then importeMX = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=(importeMovimiento * tipoCambio - importeMovimiento).RoundSQL, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If End If @@ -3452,16 +3452,6 @@ Namespace Modelos End If importeMovimiento = 0 - 'Case 103 'Descuento - ' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. - ' If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then - ' importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) - ' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador - ' FechaMovimiento = ObjFactura.FechaPago - ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - ' IdCtaContable = 0 - ' End If - Case 8 'Ret IVA por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS importeMovimiento = (ObjFactura.RetIVA * ValorMultiplicador) @@ -3490,31 +3480,6 @@ Namespace Modelos End If - Case 313 'Ret Iva Servicios - If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion = 4 Then 'SI TIENE RETENCION DE IVA DE SERVICIOS - importeMovimiento = ObjFactura.RetIVA * ValorMultiplicador - importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador - FechaMovimiento = ObjFactura.FechaPago - CveSubProyectoContabilizar = CveSubProyectoVenta - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" - - If ValorMultiplicador = -1 AndAlso ObjFactura.Alfa3 = "DEV" AndAlso ObjFactura.TipoDocto = "Dev" Then - TipoMovimiento = Not TipoMovimiento - ConceptoContable = 314 - importeMovimiento = importeMovimiento * -1 - importeMX = importeMX * -1 - End If - - 'OBTENER CUENTAS - If ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - 'Conta ContPAQ - IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - End If - End If - - End If - Case 9 'Ret ISR por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then importeMovimiento = (ObjFactura.RetISR * ValorMultiplicador) @@ -3545,7 +3510,7 @@ Namespace Modelos Case 13 'Iva por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then importeMovimiento = (ObjFactura.IVA * ValorMultiplicador) - importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2) + importeMX = (importeMovimiento * tipoCambio * Multiplicador).RoundSQL FechaMovimiento = ObjFactura.FechaPago PorcentajeImpuesto = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal @@ -3564,43 +3529,11 @@ Namespace Modelos If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" End If - 'If ObjFactura.TipoDocto = "Egs" Then - - ' importeMovimiento = ObjFactura.IVA * ValorMultiplicador - ' importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2) - ' FechaMovimiento = ObjFactura.FechaPago - ' PorcentajeImpuesto = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal - - ' If importeMovimiento <> 0 Then - ' 'IVA X TRASLADAR - ' IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) - ' Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString()) - - ' If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=-1, ImporteMX:=importeMX * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto) Then - ' ErrorPrepoliza = True - ' Exit For - ' End If - - ' 'IVA PAGADO - ' IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) - ' Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString()) - - ' If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=-1, ImporteMX:=importeMX * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto) Then - ' ErrorPrepoliza = True - ' Exit For - ' End If - ' End If - - - ' importeMovimiento = 0 - ' importeMX = 0 - 'End If - Case 38 'IEPS por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then importeMovimiento = (ObjFactura.IEPS * ValorMultiplicador) - importeMX = Math.Round(importeMovimiento * tipoCambio * Multiplicador, 2) + importeMX = (importeMovimiento * tipoCambio * Multiplicador).RoundSQL FechaMovimiento = ObjFactura.Fecha CveSubProyectoContabilizar = CveSubProyectoVenta @@ -4290,7 +4223,7 @@ Namespace Modelos If Not OcurrioError Then IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero - ValorInventario = Math.Round(DtCostos.SUM("Total", "").ToDecimal, 2, MidpointRounding.AwayFromZero) + ValorInventario = (DtCostos.SUM("Total", "").ToDecimal).RoundSQL If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then OcurrioError = True End If From d07a1e74295f9306a7dd174299f53a59bc2138ef Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 24 Jan 2023 19:51:30 -0700 Subject: [PATCH 45/55] -- cambio en permiso paginas y acomodo visual de buscadores --- Bancos/PopUpBuscarCuentasProveedor.aspx | 24 ++++++------ Site.master | 52 +++++++++++-------------- Site.master.vb | 7 ++-- 3 files changed, 37 insertions(+), 46 deletions(-) diff --git a/Bancos/PopUpBuscarCuentasProveedor.aspx b/Bancos/PopUpBuscarCuentasProveedor.aspx index 61cf9512b..5100e2023 100644 --- a/Bancos/PopUpBuscarCuentasProveedor.aspx +++ b/Bancos/PopUpBuscarCuentasProveedor.aspx @@ -7,7 +7,7 @@ - + @@ -52,33 +52,33 @@
    -
    +
    - + - + - + - + - + @@ -88,28 +88,28 @@ - + - + - + - + - + diff --git a/Site.master b/Site.master index e21684d8e..c67e7ac23 100644 --- a/Site.master +++ b/Site.master @@ -149,13 +149,7 @@ -
    + diff --git a/OI/CircularDetalleB.aspx.cs b/OI/CircularDetalleB.aspx.cs index 84886f3f2..cb9eb243b 100644 --- a/OI/CircularDetalleB.aspx.cs +++ b/OI/CircularDetalleB.aspx.cs @@ -1,4 +1,5 @@ using System; +using System.Activities.Expressions; using System.Collections.Generic; using System.Data; using System.IO; @@ -8,10 +9,31 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Extensiones; +using Microsoft.Reporting.WebForms.Internal.Soap.ReportingServices2005.Execution; +using MoreLinq; public partial class OI_CircularDetalleB : ClsPaginas { public const string iddivAgregarPara = "iddivAgregarPara"; + enum EnuEnvioTipo { Usuarios,Proveedores,Personal,Clientes } + + + private EnuEnvioTipo EnvioTipo + { + get + { + if (ViewState["EnvioTipo"] == null) + { + ViewState["EnvioTipo"] = EnuEnvioTipo.Usuarios; + } + return (EnuEnvioTipo)ViewState["EnvioTipo"]; + } + set + { + ViewState["EnvioTipo"] =(EnuEnvioTipo) value; + } + } + private DataTable DtUsuarios { get @@ -39,7 +61,11 @@ public partial class OI_CircularDetalleB : ClsPaginas { if (!IsPostBack) { - if(Request["CveCircular"] != null) + + CargaCombos(); + ConsultaCorreos(); + + if (Request["CveCircular"] != null) { CveCircular = Request["CveCircular"].ToString().ToEntero(); } @@ -54,10 +80,14 @@ public partial class OI_CircularDetalleB : ClsPaginas { BtnGuardar.Text = "Guardar"; } - cargarFiltroUsuarios(); + + } } + + + private void CargaDatos() { if (CveCircular > 0) @@ -84,38 +114,162 @@ public partial class OI_CircularDetalleB : ClsPaginas ObjOI.Dispose(); } } - private void cargarFiltroUsuarios() + + + + private void CargaCombos() { DdlRoles.DataSource = get_GlobalDTRoles(UsuarioActual.CveEmpresa); DdlRoles.DataBind(); DdlRoles.Items.Insert(0, new ListItem("Todos", "-1")); - DdlSucursales.DataSource = get_GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa); - DdlSucursales.DataBind(); - DdlSucursales.Items.Insert(0, new ListItem("Todos", "-1")); + CargarCentrosDeCosto(null, DdlSubProyecto, null,LblSubProyecto); + CargarCentrosDeCosto(null, DdlSubProyectoPersonal, null, LblSubProyectoPersonal); + + DdlCveClasificacionProveedor.DataSource = get_GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa); + DdlCveClasificacionProveedor.DataBind(); + DdlCveClasificacionProveedor.Items.Insert(0, new ListItem("Todas", "-1")); + + DdlClasificacion.DataSource = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa); + DdlClasificacion.DataBind(); + DdlClasificacion.Items.Insert(0, new ListItem("Todos", "-1")); + + } + private void ResetCombos() + { + + DdlRoles.SelectedValueExist(-1); + DdlSubProyecto.SelectedValueExist(-1); + DdlCveClasificacionProveedor.SelectedValueExist(-1); + DdlSubProyectoPersonal.SelectedValueExist(-1); + DdlClasificacion.SelectedValueExist(-1); + + RLBTipoEnvioTipo.SelectedValue ="1"; + } - GVUsuarios.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); - GVUsuarios.DataBind(); - UpUsuarios.Update(); + private void ConsultaCorreos() + { + + int intTipoConsulta = 1; + + DVModalFiltrosUsuarios.Visible = false; + DVModalFiltrosProveedores.Visible = false; + DVModalFiltrosPersonal.Visible = false; + DVModalFiltrosCliente.Visible = false; + + switch (RLBTipoEnvioTipo.SelectedValue.ToEntero()) + { + case 1: + DVModalFiltrosUsuarios.Visible = true; + GVUsuarios.Columns[2].Visible = true; + intTipoConsulta = 1; + break; + case 2: + DVModalFiltrosProveedores.Visible = true; + GVUsuarios.Columns[2].Visible = false; + intTipoConsulta = 2; + break; + case 3: + DVModalFiltrosPersonal.Visible = true; + GVUsuarios.Columns[2].Visible = false; + intTipoConsulta = 3; + break; + case 4: + DVModalFiltrosCliente.Visible = true; + GVUsuarios.Columns[2].Visible = false; + intTipoConsulta = 4; + break; + default: + DVModalFiltrosUsuarios.Visible = true; + GVUsuarios.Columns[2].Visible = true; + intTipoConsulta = 1; + break; + } + + ClsOIEventos ObjOI = new ClsOIEventos(); + + if (ObjOI.GetCircularCorreos(intTipoConsulta, UsuarioActual.CveEmpresa,DdlRoles.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(), DdlCveClasificacionProveedor.SelectedValue.ToEntero(), DdlSubProyectoPersonal.SelectedValue.ToEntero(),DdlClasificacion.SelectedValue.ToEntero())) + { + + if (ObjOI.DtResultados.Rows.Count >= 1000) + { + DataTable dt = ObjOI.DtResultados.Clone(); + + foreach (DataRow row in ObjOI.DtResultados.AsEnumerable().Take(2000)) + { + dt.ImportRow(row); + } + + GVUsuarios.DataSource = dt; + + Alert($"{ObjOI.DtResultados.Rows.Count } registros se limito a 2000 registros, se recomienda usar los filtros.", ModExtensiones.TipoMensaje.ToastAdventencia); + } + else + { + GVUsuarios.DataSource = ObjOI.DtResultados; + } + + } + else + { + GVUsuarios.DataSource = null; + } + + + RegistraScript("CveRol = -1; CveSucursal = -1;usuariotext = \"\";"); + + + ObjOI.Dispose(); + GVUsuarios.DataBind(); + UpModalSeleccionCorreos.Update(); + } protected void GVUsuarios_RowDataBound(object sender, GridViewRowEventArgs e) { - if (e.Row.RowType == DataControlRowType.DataRow) + //if (e.Row.RowType == DataControlRowType.DataRow) + //{ + // string CveRol = e.Row.DBCampo("CveRol"); + // string CveSubProyecto = e.Row.DBCampo("CveSubProyecto"); + // e.Row.CssClass = "items"; + // e.Row.Attributes.Add("data-rol", CveRol); + // e.Row.Attributes.Add("data-sucursal", CveRol); + //} + + if(e.Row.RowType == DataControlRowType.Header) { - string CveRol = e.Row.DBCampo("CveRol"); - string CveSubProyecto = e.Row.DBCampo("CveSubProyecto"); - e.Row.CssClass = "items"; - e.Row.Attributes.Add("data-rol", CveRol); - e.Row.Attributes.Add("data-sucursal", CveRol); + switch (RLBTipoEnvioTipo.SelectedValue.ToEntero()) + { + case 1: + e.Row.Cells[1].Text = "Usuario"; + break; + case 2: + e.Row.Cells[1].Text = "Proveedor"; + break; + case 3: + e.Row.Cells[1].Text = "Personal"; + break; + case 4: + e.Row.Cells[1].Text = "Cliente"; + break; + default: + e.Row.Cells[1].Text = "Usuario"; + break; + } } + + + } protected void LnkAgregar_Click(object sender, EventArgs e) { this.RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarPara)); + ResetCombos(); + ConsultaCorreos(); + UpModalSeleccionCorreos.Update(); } @@ -336,5 +490,63 @@ public partial class OI_CircularDetalleB : ClsPaginas return new byte[] { }; } - -} \ No newline at end of file + + + protected void RLBTipoEnvioTipo_SelectedIndexChanged(object sender, EventArgs e) + { + + //switch (RLBTipoEnvioTipo.SelectedValue.ToEntero()) + //{ + // case 1: + // EnvioTipo = EnuEnvioTipo.Usuarios; + // break; + // case 2: + // EnvioTipo = EnuEnvioTipo.Proveedores; + // break; + // case 3: + // EnvioTipo = EnuEnvioTipo.Personal; + // break; + // case 4: + // EnvioTipo = EnuEnvioTipo.Clientes; + // break; + // default: + // EnvioTipo = EnuEnvioTipo.Usuarios; + // break; + //} + + + ConsultaCorreos(); + + + } + + protected void DdlRoles_SelectedIndexChanged(object sender, EventArgs e) + { + ConsultaCorreos(); + } + + protected void DdlSubProyecto_SelectedIndexChanged(object sender, EventArgs e) + { + ConsultaCorreos(); + } + + protected void DdlCveClasificacionProveedor_SelectedIndexChanged(object sender, EventArgs e) + { + ConsultaCorreos(); + } + + protected void DdlSubProyectoPersonal_SelectedIndexChanged(object sender, EventArgs e) + { + ConsultaCorreos(); + } + + protected void DdlClasificacion_SelectedIndexChanged(object sender, EventArgs e) + { + // ConsultaCorreos(); + } + + protected void LnlActualizarCorreos_Click(object sender, EventArgs e) + { + ConsultaCorreos(); + } +} diff --git a/OS/RepServicioDomicilio.aspx.vb b/OS/RepServicioDomicilio.aspx.vb index 33a77efd2..42c9ac8da 100644 --- a/OS/RepServicioDomicilio.aspx.vb +++ b/OS/RepServicioDomicilio.aspx.vb @@ -805,7 +805,7 @@ Partial Class OS_RepServicioDomicilio Dim CveOsDetalle As Integer = HFCveOsDetalle.Value.ToEntero - Dim CveSubProyectoTecnico As Integer = If(DdlTecnicoAsignar.SelectedValue.ToEntero > 0, GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero, -1) + Dim CveSubProyectoTecnico As Integer = If(DdlTecnicoAsignar.SelectedValue.ToEntero > 0, GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0 ").ToEntero, -1) If TipoAccion = OSModalTipoAccion.Asignacion AndAlso Not CveSubProyectoTecnico > 0 Then diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 0c9c53526..b676fa27d 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2747,7 +2747,7 @@ Partial Class Clientes CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text, DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), - CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), + CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(), CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()), @@ -2841,7 +2841,7 @@ Partial Class Clientes CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero(), DdlCorporativo.SelectedValue.ToEntero(), CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero(), CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero(), CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero(), ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero(), CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text, CobranzaCorreo:=TxtCobranzaCorreo.Text.Trim, Horario:=TxtHorario.Text.Trim, PortalFacturacion:=TxtPortalFacturacion.Text.Trim, Documentacion:=TxtDocumentacion.Text.Trim, DiasEspecifico:=TxtDiasEspecifico.Text.Trim, UsuarioPortal:=TxtUsuarioPortalFacturacion.Text, ContraseñaPortal:=TxtContraseñaPortalFacturacion.Text, - DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, + DiasRevision:=DiasRevision, ObservacionRevsion:=TxtObsDiasRevision.Text.Trim, ReferenciaFiscal:=TxtReferenciaFiscal.Text.Trim, Celular:=TxtCelular.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ExtOtros:=TxtExtOtro.Text.Trim, CveUsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero(), CveFormaPago:=DdlFormaPago33.SelectedValue.ToEntero(), CveMetodoPago:=DdlMetodoPago33.SelectedValue.ToEntero(), DesglosaIEPS:=ChkDesglosarIEPS.Checked, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, CveTipoOperacion:=DdlTipoOperacion.SelectedValue.ToEntero(), CvePedimento:=DdlClavePedimento.SelectedValue.ToEntero(), CveIncoterm:=DdlIncoterm.SelectedValue.ToEntero(), CvePais:=DdlPais.SelectedValue.ToEntero(), CveEstado:=DdlEstado.SelectedValue.ToEntero(), CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero(), CveColonia:=DdlColonia.SelectedValue.ToEntero(), CveMotivoTraslado:=IIf(DdlMotivoTraslado.SelectedValue = "-1", "0", DdlMotivoTraslado.SelectedValue).ToString().ToEntero(), NumRegIdTrib:=IIf(TxtNumRegIdTrib.Text = "", "-1", TxtNumRegIdTrib.Text).ToString(), ComExtEstado:=IIf(TxtComExtEstado.Text = "", "-1", TxtComExtEstado.Text).ToString(), ComExtMunicipio:=IIf(TxtComExtMunicipio.Text = "", "-1", TxtComExtMunicipio.Text).ToString(), ComExtColonia:=IIf(TxtComExtColonia.Text = "", "-1", TxtComExtColonia.Text).ToString(), From 980b0e14eb2d738df8712217c1696a36f1dbc26e Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Thu, 26 Jan 2023 16:12:42 -0700 Subject: [PATCH 54/55] Traspaso almacen error en existencia por conversion a entero --- Inventarios/TraspasoAlmacen.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 97ff5f072..e651739bc 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -968,7 +968,7 @@ Partial Class Inventarios_TraspasoAlmacen End If End If - Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero() + Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToDecimal() If Existencia < 0 Then ErrorExistencia = True From a93574b082f7e3b015cbaac17a9267b0e7e20062 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 27 Jan 2023 06:29:34 -0700 Subject: [PATCH 55/55] -- cambios en globalDT --- Acumuladores/CatGarantiasMeses.aspx.vb | 14 +- App_Code/ClsPaginas.vb | 266 +-- App_Code/Modelos.vb | 2292 ++++-------------------- Inventarios/RecepcionUsados.aspx.vb | 18 +- Ventas/PV.aspx.vb | 18 +- 5 files changed, 460 insertions(+), 2148 deletions(-) diff --git a/Acumuladores/CatGarantiasMeses.aspx.vb b/Acumuladores/CatGarantiasMeses.aspx.vb index 0f204a538..190f4dd6c 100644 --- a/Acumuladores/CatGarantiasMeses.aspx.vb +++ b/Acumuladores/CatGarantiasMeses.aspx.vb @@ -72,22 +72,12 @@ Partial Class Acumuladores_CatFoliosGarantia Private Sub CargaCombos() - 'Dim ObjPS As New ClsProductosServicios - - 'If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then - ' DdlMarca.DataSource = ObjPS.DtResultados - ' DdlMarca.DataBind() - ' DdlMarca.Items.Insert(0, New ListItem("Todos", "-1")) - ' DdlMarca.SelectedValue = "-1" - 'End If - 'ObjPS.Dispose() - DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) DdlMarca.DataBind() DdlMarca.Items.Insert(0, New ListItem("Todos", "-1")) DdlMarca.SelectedValue = "-1" - DdlTipoUso.DataSource = GlobalDTAcumTiposUso() + DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUso.DataBind() DdlTipoUso.Items.Insert(0, New ListItem("Todos", "-1")) DdlTipoUso.SelectedValue = "-1" @@ -124,7 +114,7 @@ Partial Class Acumuladores_CatFoliosGarantia DdlMarca.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa) DdlMarcaM.DataBind() - DdlTipoUsoM.DataSource = GlobalDTAcumTiposUso() + DdlTipoUsoM.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUsoM.DataBind() End Sub diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index a730c53b0..30f81f474 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1129,43 +1129,45 @@ Public Class ClsPaginas Application("GlobalDTModulos") = value End Set End Property - Property GlobalDTMonedas() As DataTable + Public Shared Property GlobalDTMonedas() As DataTable Get - GlobalDTMonedas = DirectCast(Application("GlobalDTMonedas"), DataTable) + Dim AppNombre As String = "GlobalDTMonedas" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjMonedas As New ClsMonedas + If ObjMonedas.GetMonedas() Then HttpContext.Current.Application(AppNombre) = ObjMonedas.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + ObjMonedas.Dispose() + End If + GlobalDTMonedas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMonedas") = value + Dim AppNombre As String = "GlobalDTMonedas" + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTMonedasAlias() As DataTable Get - GlobalDTMonedasAlias = DirectCast(Application("GlobalDTMonedasAlias"), DataTable) + Dim AppNombre As String = "GlobalDTMonedasAlias" + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then + Dim ObjMonedas As New ClsMonedas + If ObjMonedas.GetMonedasAlias() Then HttpContext.Current.Application(AppNombre) = ObjMonedas.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + ObjMonedas.Dispose() + End If + GlobalDTMonedasAlias = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTMonedasAlias") = value + Dim AppNombre As String = "GlobalDTMonedasAlias" + HttpContext.Current.Application(AppNombre) = value End Set + End Property - 'Property GlobalDTSucursales(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(Application("GlobalDTSucursales"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " Sucursal", DataViewRowState.CurrentRows) - ' GlobalDTSucursales = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTSucursales = DirectCast(Application("GlobalDTSucursales"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' Application("GlobalDTSucursales") = value - ' End Set - 'End Property - Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable + + + Public Shared Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1, Optional RegimenFiscalReceptor As String = "-1") As DataTable Get Dim AppNombre As String = "GlobalDTSATUsosCFDI" - 'sino existe, recarga los datos - If DirectCast(Application(AppNombre), DataTable) Is Nothing Then + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then Dim ObjGrales As New ClsGenerales - If ObjGrales.GetSATUsosCFDI() Then Application(AppNombre) = ObjGrales.DtResultados + If ObjGrales.GetSATUsosCFDI() Then HttpContext.Current.Application(AppNombre) = ObjGrales.DtResultados ObjGrales.Dispose() End If @@ -1177,40 +1179,40 @@ Public Class ClsPaginas Tipo.AppendFormat("AND RegimenFiscalReceptor LIKE '%{0}%'", RegimenFiscalReceptor) End If - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Tipo.ToString(), " UsoCFDIDescripcion", DataViewRowState.CurrentRows) GlobalDTSATUsosCFDI = Dv.ToTable Dv.Dispose() Else - GlobalDTSATUsosCFDI = DirectCast(Application(AppNombre), DataTable) + GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) Dim AppNombre As String = "GlobalDTSATUsosCFDI" - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property - Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable + Public Shared Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) 'sino existe, recarga los datos - If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then + If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Or (DirectCast(HttpContext.Current.Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(HttpContext.Current.Application(AppNombre), DataTable).Rows.Count = 0) Then Dim ObjUnidadesMedida As New ClsUnidadesMedida() - If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados + If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjUnidadesMedida.DtResultados ObjUnidadesMedida.Dispose() End If If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) GlobalDTUnidadesMedida = Dv.ToTable Dv.Dispose() Else - GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable) + GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If End Get Set(value As DataTable) Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable @@ -4134,30 +4136,45 @@ Public Class ClsPaginas Application(AppNombre) = value End Set End Property - Property GlobalDTAcumTiposDefecto() As DataTable + Public Shared Property GlobalDTAcumTiposDefecto(CveEmpresa As Integer) As DataTable Get - GlobalDTAcumTiposDefecto = DirectCast(Application("GlobalDTAcumTiposDefecto"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTAcumTiposDefecto") = value - End Set - End Property - Property GlobalDTAcumTiposUso() As DataTable - Get - GlobalDTAcumTiposUso = DirectCast(Application("GlobalDTAcumTiposUso"), DataTable) - End Get - Set(value As DataTable) - Application("GlobalDTAcumTiposUso") = value - End Set - End Property + Dim AppNombre As String = String.Format("GlobalDTAcumTiposDefecto-{0}", CveEmpresa) + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjAcumuladores As New ClsAcumuladores() + If ObjAcumuladores.TiposDefectoGet(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAcumuladores.DtResultados + ObjAcumuladores.Dispose() + End If + GlobalDTAcumTiposDefecto = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTAcumTiposDefecto-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set + End Property + Public Shared Property GlobalDTAcumTiposUso(CveEmpresa As Integer) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTAcumTiposUso-{0}", CveEmpresa) + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Dim ObjAcumuladores As New ClsAcumuladores() + If ObjAcumuladores.TiposUsoGet(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAcumuladores.DtResultados + ObjAcumuladores.Dispose() + End If + GlobalDTAcumTiposUso = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) + + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTAcumTiposUso-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value + End Set + End Property Property GlobalDTAcumGarantiasMesesTipoUso(CveEmpresa As Integer, CveMarca As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTAcumGarantiasMesesTipoUso-{0}", CveEmpresa) If Application(AppNombre) Is Nothing Then Dim ObjAcumuladores As New ClsAcumuladores() - If ObjAcumuladores.GarantiasMesesGet(-1, -1) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"}) + If ObjAcumuladores.GarantiasMesesGet(-1, CveEmpresa) Then Application(AppNombre) = ObjAcumuladores.DtResultados.FiltraParametros("", DistinctColumns:={"CveMarca", "CveTipoUso", "TipoUso"}) ObjAcumuladores.Dispose() End If @@ -4192,17 +4209,6 @@ Public Class ClsPaginas End If - 'If CveMarca <> -1 Then - ' Dim Str As StringBuilder = New StringBuilder() - ' If CveMarca <> -1 Then Str.AppendFormat("CveMarca = {0}", CveMarca) - - ' Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTCultivosCuadro = Dv.ToTable - ' Dv.Dispose() - 'Else - - 'End If - GlobalDTCultivosCuadro = DirectCast(Application(AppNombre), DataTable) End Get @@ -4212,79 +4218,23 @@ Public Class ClsPaginas End Set End Property - - - - Property GlobalDTAcumTamaños() As DataTable + Public Shared Property GlobalDTAcumTamaños(CveEmpresa As Integer) As DataTable Get - GlobalDTAcumTamaños = DirectCast(Application("GlobalDTAcumTamaños"), DataTable) + Dim AppNombre As String = String.Format("GlobalDTAcumTamaños-{0}", CveEmpresa) + + If HttpContext.Current.Application(AppNombre) Is Nothing Then + Using ObjAcumuladores As New ClsAcumuladores() + If ObjAcumuladores.TamañoGet(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAcumuladores.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing + End Using + End If + GlobalDTAcumTamaños = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End Get Set(value As DataTable) - Application("GlobalDTAcumTamaños") = value + Dim AppNombre As String = String.Format("GlobalDTAcumTamaños-{0}", CveEmpresa) + HttpContext.Current.Application(AppNombre) = value End Set End Property -#Region "GDT'S RASTREO" - Property GlobalDTDispositivos(CveCliente As Integer) As DataTable - Get - Dim Str As StringBuilder = New StringBuilder() - - If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) - - - If CveCliente <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTDispositivos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTDispositivos = DirectCast(Application("GlobalDTDispositivos"), DataTable) - End If - - End Get - Set(value As DataTable) - Application("GlobalDTDispositivos") = value - End Set - End Property - - Public Sub RecargaGlobalDTDispositivos(GPS As ClsGPS) - If GPS.DispositivosGet(-1, -1, -1, -1) Then - GlobalDTDispositivos(-1) = GPS.DtResultados - End If - End Sub - - Property GlobalDTDispositivosUsuarios(CveCliente As Integer, Optional CveUsuario As Integer = -1) As DataTable - Get - If Application("GlobalDTDispositivosUsuarios") Is Nothing Then - Dim ObjGPS As New ClsGPS - If ObjGPS.DispositivosUsuariosGet(-1, -1, -1, -1, -1) Then - Application("GlobalDTDispositivosUsuarios") = ObjGPS.DtResultados - End If - ObjGPS.Dispose() - End If - - Dim Str As StringBuilder = New StringBuilder() - - If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario) - If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) - - - If CveUsuario <> -1 OrElse CveCliente <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTDispositivosUsuarios = Dv.ToTable - Dv.Dispose() - Else - GlobalDTDispositivosUsuarios = DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable) - End If - - End Get - Set(value As DataTable) - Application("GlobalDTDispositivosUsuarios") = value - End Set - End Property - -#End Region - - Property GlobalDTClientesVendedoresSubProyectos(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable Get @@ -4346,6 +4296,66 @@ Public Class ClsPaginas #End Region +#Region "GDT'S RASTREO" + Property GlobalDTDispositivos(CveCliente As Integer) As DataTable + Get + Dim Str As StringBuilder = New StringBuilder() + + If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) + + + If CveCliente <> -1 Then + Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTDispositivos = Dv.ToTable + Dv.Dispose() + Else + GlobalDTDispositivos = DirectCast(Application("GlobalDTDispositivos"), DataTable) + End If + + End Get + Set(value As DataTable) + Application("GlobalDTDispositivos") = value + End Set + End Property + + Public Sub RecargaGlobalDTDispositivos(GPS As ClsGPS) + If GPS.DispositivosGet(-1, -1, -1, -1) Then + GlobalDTDispositivos(-1) = GPS.DtResultados + End If + End Sub + + Property GlobalDTDispositivosUsuarios(CveCliente As Integer, Optional CveUsuario As Integer = -1) As DataTable + Get + If Application("GlobalDTDispositivosUsuarios") Is Nothing Then + Dim ObjGPS As New ClsGPS + If ObjGPS.DispositivosUsuariosGet(-1, -1, -1, -1, -1) Then + Application("GlobalDTDispositivosUsuarios") = ObjGPS.DtResultados + End If + ObjGPS.Dispose() + End If + + Dim Str As StringBuilder = New StringBuilder() + + If CveUsuario <> -1 Then Str.AppendFormat("CveUsuario = {0}", CveUsuario) + If CveCliente <> -1 Then Str.AppendFormat(" {0} CveCliente = {1}", If(Str.Length > 0, "AND", ""), CveCliente) + + + If CveUsuario <> -1 OrElse CveCliente <> -1 Then + Dim Dv As New DataView(DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTDispositivosUsuarios = Dv.ToTable + Dv.Dispose() + Else + GlobalDTDispositivosUsuarios = DirectCast(Application("GlobalDTDispositivosUsuarios"), DataTable) + End If + + End Get + Set(value As DataTable) + Application("GlobalDTDispositivosUsuarios") = value + End Set + End Property + +#End Region + Public Enum SisParametros As Integer URL = 1 DirectorioSitio = 2 @@ -10515,8 +10525,8 @@ Public Class ClsPaginas If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then ' I N G R E S O S X C O M P R O B A R Dim Ret As New ConceptosRetenciones If UsuarioActual.Empresa.TipoContabilidad = 2 Then - If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero - If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero + 'If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero + 'If Pago.CveMonedaPago > 1 AndAlso ObjConta.GetRetCuenta(207, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero If UsuarioActual.CveEmpresa.Contiene(119) Then If Pago.FechaDocumentoRelacionado.Year <= 2017 Then diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index b388fa640..65ab8a54b 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -498,8 +498,8 @@ Namespace Modelos Me.TipoCambio = 0 Me.ConvertirPesos = False Me.CveMoneda = 1 - Me.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ") - Me.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ") + Me.Moneda = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda} ") + Me.MonedaSAT = ClsPaginas.GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda} ") Me.RefDocto = "" ' Me.CveMesa = -1 Me.Fecha = Now @@ -2146,7 +2146,7 @@ Namespace Modelos For Each drow As DataRow In factura.DtDetalle.Rows If drow("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={drow("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * drow("Cantidad").ToString.ToDecimal() @@ -2212,7 +2212,7 @@ Namespace Modelos If factura.Cliente.EsDistribuidor AndAlso factura.CveConceptoMovimiento = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = ClsPaginas.GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() @@ -7196,7 +7196,7 @@ Namespace Modelos End Sub Public Sub SetMoneda() If CveMoneda > 0 Then - Dim dr As DataRow = GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) + Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) If Not IsNothing(dr) Then Moneda = dr("Moneda").ToString() MonedaSAT = dr("AbreviaturaSAT").ToString() @@ -7212,7 +7212,7 @@ Namespace Modelos End Sub Public Sub SetMoneda(ObjClsPaginas As ClsPaginas) If Not IsNothing(ObjClsPaginas) Then - Dim dr As DataRow = ObjClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) + Dim dr As DataRow = ClsPaginas.GlobalDTMonedas.FiltroPrimero(String.Format("CveMoneda ={0}", CveMoneda)) If Not IsNothing(dr) Then Moneda = dr("Moneda").ToString() MonedaSAT = dr("AbreviaturaSAT").ToString() @@ -7351,14 +7351,7 @@ Namespace Modelos #End Region #Region "G L O B A L - D T" - Property GlobalDTAcumTamaños() As DataTable - Get - GlobalDTAcumTamaños = DirectCast(HttpContext.Current.Application("GlobalDTAcumTamaños"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAcumTamaños") = value - End Set - End Property + Public Property GlobalTipoCambio(Optional Fecha As Date = MinFecha) As Double Get If GlobalTipoCambio <= 0 Then @@ -7407,14 +7400,7 @@ Namespace Modelos End Set End Property - 'Property GlobalValidarCFDI As Boolean - ' Get - ' GlobalValidarCFDI = CBool(HttpContext.Current.Application("GlobalValidarCFDI")) - ' End Get - ' Set(value As Boolean) - ' HttpContext.Current.Application("GlobalValidarCFDI") = value - ' End Set - 'End Property + Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1) As DataTable Get Dim Str As New StringBuilder @@ -7435,90 +7421,6 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTUsuarios") = value End Set End Property - Property GlobalDTNomConceptos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTNomConceptos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTNomConceptos = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNomConceptos") = value - End Set - End Property - Property GlobalDTTiposGastos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTiposGastos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTiposGastos = DirectCast(HttpContext.Current.Application("GlobalDTTiposGastos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposGastos") = value - End Set - End Property - Property GlobalDTMFActividad(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveActividad As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetActividad(CveActividad, CveEmpresa, Estatus) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFActividad = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTActividad") = value - End Set - End Property - Property GlobalDTMFOperador(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveOperador As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetOperador(CveOperador, CveEmpresa, Estatus) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFOperador = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOperador") = value - End Set - End Property - Property GlobalDTMFEstatus(CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CveEstatus As Integer = -1) As DataTable - Get - - Dim dt As DataTable = Nothing - Dim ObjMF As New ClsMF - - If ObjMF.GetEstatus(CveEstatus, Estatus, CveEmpresa) Then - dt = ObjMF.DtResultados - End If - - ObjMF.Dispose() - GlobalDTMFEstatus = dt - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatus") = value - End Set - End Property Property DtFacturaDefault() As DataTable Get DtFacturaDefault = DirectCast(HttpContext.Current.Application("DtFacturaDefault"), DataTable) @@ -7535,162 +7437,6 @@ Namespace Modelos HttpContext.Current.Application("Directorio") = value End Set End Property - Property GlobalDTPSATPS() As DataTable - Get - GlobalDTPSATPS = DirectCast(HttpContext.Current.Application("GlobalDTPSATPS"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPSATPS") = value - End Set - End Property - -#Region "GLOBALES DE SAT COMERCIO EXTERIOR" - - Property GlobalDTClavePedimento() As DataTable - Get - GlobalDTClavePedimento = DirectCast(HttpContext.Current.Application("GlobalDTClavePedimento"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTClavePedimento") = value - End Set - End Property - - Property GlobalDTFraccionArancelaria() As DataTable - Get - GlobalDTFraccionArancelaria = DirectCast(HttpContext.Current.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFraccionArancelaria") = value - End Set - End Property - - Property GlobalDTIncoterm() As DataTable - Get - GlobalDTIncoterm = DirectCast(HttpContext.Current.Application("GlobalDTIncoterm"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTIncoterm") = value - End Set - End Property - - Property GlobalDTTipoOperacion() As DataTable - Get - GlobalDTTipoOperacion = DirectCast(HttpContext.Current.Application("GlobalDTTipoOperacion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoOperacion") = value - End Set - End Property - - Property GlobalDTSATMotivoTraslado() As DataTable - Get - GlobalDTSATMotivoTraslado = DirectCast(HttpContext.Current.Application("GlobalDTSATMotivoTraslado"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSATMotivoTraslado") = value - End Set - End Property - - Property GlobalDTUnidadAduana() As DataTable - Get - GlobalDTUnidadAduana = DirectCast(HttpContext.Current.Application("GlobalDTUnidadAduana"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTUnidadAduana") = value - End Set - End Property - - Property GlobalDTPais() As DataTable - Get - GlobalDTPais = DirectCast(HttpContext.Current.Application("GlobalDTPais"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPais") = value - End Set - End Property - - Property GlobalDTEstado(ClaveSATPais As String) As DataTable - Get - If ClaveSATPais <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable), String.Format("ClaveSATPais = '{0}'", ClaveSATPais), "", DataViewRowState.CurrentRows) - GlobalDTEstado = Dv.ToTable - Dv.Dispose() - Else - GlobalDTEstado = DirectCast(HttpContext.Current.Application("GlobalDTEstado"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstado") = value - End Set - End Property - - Property GlobalDTMunicipio(ClaveSATEstado As String) As DataTable - Get - If ClaveSATEstado <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable), String.Format("ClaveSATEstado = '{0}'", ClaveSATEstado), "", DataViewRowState.CurrentRows) - GlobalDTMunicipio = Dv.ToTable - Dv.Dispose() - Else - GlobalDTMunicipio = DirectCast(HttpContext.Current.Application("GlobalDTMunicipio"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMunicipio") = value - End Set - End Property - - Property GlobalDTColonia(ClaveSATMunicipio As String) As DataTable - Get - If ClaveSATMunicipio <> "-1" Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable), String.Format("ClaveSATMunicipio = '{0}'", ClaveSATMunicipio), "", DataViewRowState.CurrentRows) - GlobalDTColonia = Dv.ToTable - Dv.Dispose() - Else - GlobalDTColonia = DirectCast(HttpContext.Current.Application("GlobalDTColonia"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTColonia") = value - End Set - End Property - -#End Region - - Property GlobalDTPSATUM() As DataTable - Get - GlobalDTPSATUM = DirectCast(HttpContext.Current.Application("GlobalDTPSATUM"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPSATUM") = value - End Set - End Property - Property GlobalDTNomConceptosFunciones() As DataTable - Get - GlobalDTNomConceptosFunciones = DirectCast(HttpContext.Current.Application("GlobalDTNomConceptosFunciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNomConceptosFunciones") = value - End Set - End Property - Property GlobalDTUsuarioResponsable() As DataTable - Get - GlobalDTUsuarioResponsable = DirectCast(HttpContext.Current.Application("GlobalDTUsuarioResponsable"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTUsuarioResponsable") = value - End Set - End Property - Property GlobalDTProveedoresCuentas(CveProveedor As Integer, Estatus As Boolean) As DataTable - Get - GlobalDTProveedoresCuentas = DirectCast(HttpContext.Current.Application("GlobalDTProveedoresCuentas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProveedoresCuentas") = value - End Set - End Property Public ReadOnly Property GlobalDTProductosServiciosEquivalencias(CvePS As Integer, CveUM As Integer, CveEmpresa As Integer) As DataTable Get @@ -7981,82 +7727,7 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTModulos") = value End Set End Property - Property GlobalDTMonedas() As DataTable - Get - GlobalDTMonedas = DirectCast(HttpContext.Current.Application("GlobalDTMonedas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMonedas") = value - End Set - End Property - Property GlobalDTMonedasAlias() As DataTable - Get - GlobalDTMonedasAlias = DirectCast(HttpContext.Current.Application("GlobalDTMonedasAlias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMonedasAlias") = value - End Set - End Property - Property GlobalDTSucursales(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " Sucursal", DataViewRowState.CurrentRows) - GlobalDTSucursales = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSucursales = DirectCast(HttpContext.Current.Application("GlobalDTSucursales"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSucursales") = value - End Set - End Property - Property GlobalDTSATUsosCFDI(Optional EsPersonaFisica As Integer = -1) As DataTable - Get - If EsPersonaFisica <> -1 Then - Dim Tipo As String = "" - If EsPersonaFisica = 1 Then Tipo = "AplicaPersonaFisica = 1" Else Tipo = "AplicaPersonaMoral = 1" - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable), Tipo, " UsoCFDIDescripcion", DataViewRowState.CurrentRows) - GlobalDTSATUsosCFDI = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSATUsosCFDI = DirectCast(HttpContext.Current.Application("GlobalDTSATUsosCFDI"), DataTable) - End If - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTSATUsosCFDI") = value - End Set - End Property - 'Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) - ' GlobalDTUnidadesMedida = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTUnidadesMedida = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedida"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTUnidadesMedida") = value - ' End Set - 'End Property - 'Property GlobalDTUnidadesMedidaAlias(Optional CveEmpresa As Integer = -1) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - ' GlobalDTUnidadesMedidaAlias = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTUnidadesMedidaAlias = DirectCast(HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTUnidadesMedidaAlias") = value - ' End Set - 'End Property Property GlobalDTEstatusOrdenCompra() As DataTable Get GlobalDTEstatusOrdenCompra = DirectCast(HttpContext.Current.Application("GlobalDTEstatusOrdenCompra"), DataTable) @@ -8239,99 +7910,99 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTPrecioListas") = value End Set End Property - Property GlobalDTMesas() As DataTable - Get - GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMesas") = value - End Set - End Property - Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable - Get - GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value - End Set - End Property - Property GlobalDTSubTipoOrdenServicios() As DataTable - Get - GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value - End Set - End Property - Property GlobalDTCaracteristicasOrdenServicios() As DataTable - Get - GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value - End Set - End Property - Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable - Get - GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value - End Set - End Property - Property GlobalDTCaracteristicasOpciones() As DataTable - Get - GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value - End Set - End Property - Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then + 'Property GlobalDTMesas() As DataTable + ' Get + ' GlobalDTMesas = DirectCast(HttpContext.Current.Application("GlobalDTMesas"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTMesas") = value + ' End Set + 'End Property + 'Property GlobalDTTipoOrdenServicios(CveEmpresa As Integer) As DataTable + ' Get + ' GlobalDTTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTTipoOrdenServicios"), DataTable).FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoOrdenServicios") = value + ' End Set + 'End Property + 'Property GlobalDTSubTipoOrdenServicios() As DataTable + ' Get + ' GlobalDTSubTipoOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTSubTipoOrdenServicios") = value + ' End Set + 'End Property + 'Property GlobalDTCaracteristicasOrdenServicios() As DataTable + ' Get + ' GlobalDTCaracteristicasOrdenServicios = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTCaracteristicasOrdenServicios") = value + ' End Set + 'End Property + 'Property GlobalDTOrdenesServiciosCaracteristicas() As DataTable + ' Get + ' GlobalDTOrdenesServiciosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTOrdenesServiciosCaracteristicas") = value + ' End Set + 'End Property + 'Property GlobalDTCaracteristicasOpciones() As DataTable + ' Get + ' GlobalDTCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTCaracteristicasOpciones"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTCaracteristicasOpciones") = value + ' End Set + 'End Property + 'Property GlobalDTTipoCuentasEquipos(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoCuentasEquipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value - End Set - End Property - Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTTipoCuentasEquipos = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTTipoCuentasEquipos = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquipos"), DataTable) + ' End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoCuentasEquipos") = value + ' End Set + 'End Property + 'Property GlobalDTTipoCuentasEquiposCaracteristicas(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value - End Set - End Property - Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTTipoCuentasEquiposCaracteristicas = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTTipoCuentasEquiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas"), DataTable) + ' End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposCaracteristicas") = value + ' End Set + 'End Property + 'Property GlobalDTTipoCuentasEquiposOpciones(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value - End Set - End Property + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTTipoCuentasEquiposOpciones = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTTipoCuentasEquiposOpciones = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones"), DataTable) + ' End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoCuentasEquiposOpciones") = value + ' End Set + 'End Property ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable Get Dim ObjPS As New ClsProductosServicios @@ -8356,48 +8027,48 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTInvMetodosInventario") = value End Set End Property - Property GlobalDTAFCaracteristicasOpciones() As DataTable - Get - GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value - End Set - End Property - Property GlobalDTAFCaracteristicas() As DataTable - Get - GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value - End Set - End Property - Property GlobalDTAFCaracteristicasClasificaciones() As DataTable - Get - GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value - End Set - End Property - Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS) - If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa) + 'Property GlobalDTAFCaracteristicasOpciones() As DataTable + ' Get + ' GlobalDTAFCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTAFCaracteristicasOpciones") = value + ' End Set + 'End Property + 'Property GlobalDTAFCaracteristicas() As DataTable + ' Get + ' GlobalDTAFCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicas"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTAFCaracteristicas") = value + ' End Set + 'End Property + 'Property GlobalDTAFCaracteristicasClasificaciones() As DataTable + ' Get + ' GlobalDTAFCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTAFCaracteristicasClasificaciones") = value + ' End Set + 'End Property + 'Property GlobalDTImpuestosLocales(CvePS As Integer, CveEmpresa As Integer) As DataTable + ' Get + ' Dim Str As New StringBuilder + ' If CvePS > 0 Then Str.AppendFormat("CvePS = {0}", CvePS) + ' If CveEmpresa > 0 Then Str.AppendFormat("{0} CveEmpresa = {1}", If(CvePS > 0, " AND ", ""), CveEmpresa) - If CvePS > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTImpuestosLocales = Dv.ToTable - Dv.Dispose() - Else - GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTImpuestosLocales") = value - End Set - End Property + ' If CvePS > 0 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTImpuestosLocales = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTImpuestosLocales = DirectCast(HttpContext.Current.Application("GlobalDTImpuestosLocales"), DataTable) + ' End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTImpuestosLocales") = value + ' End Set + 'End Property 'Bancos Property GlobalDTBancos() As DataTable Get @@ -8453,65 +8124,65 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTTipoTransacciones") = value End Set End Property - Property GlobalDTEstatusIE() As DataTable - Get - GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusIE") = value - End Set - End Property - Property GlobalDTBancosIE() As DataTable - Get - GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTBancosIE") = value - End Set - End Property - Property GlobalDTTipoCuenta() As DataTable - Get - GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoCuenta") = value - End Set - End Property - 'Fin Bancos + 'Property GlobalDTEstatusIE() As DataTable + ' Get + ' GlobalDTEstatusIE = DirectCast(HttpContext.Current.Application("GlobalDTEstatusIE"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTEstatusIE") = value + ' End Set + 'End Property + 'Property GlobalDTBancosIE() As DataTable + ' Get + ' GlobalDTBancosIE = DirectCast(HttpContext.Current.Application("GlobalDTBancosIE"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTBancosIE") = value + ' End Set + 'End Property + 'Property GlobalDTTipoCuenta() As DataTable + ' Get + ' GlobalDTTipoCuenta = DirectCast(HttpContext.Current.Application("GlobalDTTipoCuenta"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoCuenta") = value + ' End Set + 'End Property + ''Fin Bancos - 'Fin EstadoCIvil - 'TipoPerioso - Property GlobalDTTipoPeriodo() As DataTable - Get - GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoPeriodo") = value - End Set - End Property - 'Fin TipoPeriodo + ''Fin EstadoCIvil + ''TipoPerioso + 'Property GlobalDTTipoPeriodo() As DataTable + ' Get + ' GlobalDTTipoPeriodo = DirectCast(HttpContext.Current.Application("GlobalDTTipoPeriodo"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoPeriodo") = value + ' End Set + 'End Property + ''Fin TipoPeriodo 'Periodos - Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo) - If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTNominasPeriodos = Dv.ToTable - Dv.Dispose() + 'Property GlobalDTNominasPeriodos(CveTipoPeriodo As Integer, CvePeriodo As Integer, CveEmpresa As Integer) As DataTable + ' Get + ' Dim Str As New StringBuilder + ' If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) + ' If CveTipoPeriodo <> -1 Then Str.AppendFormat(" {0} CveTipoPeriodo = {1}", If(Str.Length > 0, "AND", ""), CveTipoPeriodo) + ' If CvePeriodo <> -1 Then Str.AppendFormat(" {0} CvePeriodo = {1}", If(Str.Length > 0, "AND", ""), CvePeriodo) + ' If Str.Length > 0 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + ' GlobalDTNominasPeriodos = Dv.ToTable + ' Dv.Dispose() - Else - GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable) - End If + ' Else + ' GlobalDTNominasPeriodos = DirectCast(HttpContext.Current.Application("GlobalDTNominasPeriodos"), DataTable) + ' End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNominasPeriodos") = value - End Set - End Property + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTNominasPeriodos") = value + ' End Set + 'End Property 'Fin Periodos 'Fin Ruta @@ -8634,78 +8305,78 @@ Namespace Modelos End Set End Property 'EstatusFactura - Property GlobalDTCompEstatusFactura() As DataTable - Get - GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'") - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value - End Set - End Property - Property GlobalDTContratosSecciones() As DataTable - Get - GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContratosSecciones") = value - End Set - End Property - Property GlobalDTContratos() As DataTable - Get - GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContratos") = value - End Set - End Property - Property GlobalDTContratosTipos() As DataTable - Get - GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTContratosTipos") = value - End Set - End Property - Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable) - End If + 'Property GlobalDTCompEstatusFactura() As DataTable + ' Get + ' GlobalDTCompEstatusFactura = DirectCast(HttpContext.Current.Application("GlobalDTCompEstatusFactura"), DataTable).FiltraParametros("Estatus = 'Activo'") + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTCompEstatusFactura") = value + ' End Set + 'End Property + 'Property GlobalDTContratosSecciones() As DataTable + ' Get + ' GlobalDTContratosSecciones = DirectCast(HttpContext.Current.Application("GlobalDTContratosSecciones"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTContratosSecciones") = value + ' End Set + 'End Property + 'Property GlobalDTContratos() As DataTable + ' Get + ' GlobalDTContratos = DirectCast(HttpContext.Current.Application("GlobalDTContratos"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTContratos") = value + ' End Set + 'End Property + 'Property GlobalDTContratosTipos() As DataTable + ' Get + ' GlobalDTContratosTipos = DirectCast(HttpContext.Current.Application("GlobalDTContratosTipos"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTContratosTipos") = value + ' End Set + 'End Property + 'Property GlobalDTTipoAlmacen(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTTipoAlmacen = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTTipoAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTTipoAlmacen"), DataTable) + ' End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoAlmacen") = value - End Set - End Property - Property GlobalDTInvConceptos() As DataTable - Get + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTipoAlmacen") = value + ' End Set + 'End Property + 'Property GlobalDTInvConceptos() As DataTable + ' Get - Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable) + ' Return DirectCast(HttpContext.Current.Application("GlobalDTInvConceptos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTInvConceptos") = value - End Set - End Property - Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTSeccionAlmacen = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable) - End If + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTInvConceptos") = value + ' End Set + 'End Property + 'Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable + ' Get + ' If CveEmpresa <> -1 Then + ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + ' GlobalDTSeccionAlmacen = Dv.ToTable + ' Dv.Dispose() + ' Else + ' GlobalDTSeccionAlmacen = DirectCast(HttpContext.Current.Application("GlobalDTSeccionAlmacen"), DataTable) + ' End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value - End Set - End Property + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTSeccionAlmacen") = value + ' End Set + 'End Property Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTAlmacen-{0}", CveEmpresa) @@ -8771,46 +8442,46 @@ Namespace Modelos HttpContext.Current.Application(AppNombre) = value End Set End Property - Property GlobalDTNom_Periodos() As DataTable - Get - GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTNom_Periodos") = value - End Set - End Property - Property GlobalDTVtaFormaPago() As DataTable - Get - GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaFormaPago") = value - End Set - End Property - Property GlobalDTVtaMetodoPago() As DataTable - Get - GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value - End Set - End Property - Property GlobalDTVtaTiposRelacion() As DataTable - Get - GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value - End Set - End Property - Property GlobalDTTiposDocumentos() As DataTable - Get - GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposDocumentos") = value - End Set - End Property + 'Property GlobalDTNom_Periodos() As DataTable + ' Get + ' GlobalDTNom_Periodos = DirectCast(HttpContext.Current.Application("GlobalDTNom_Periodos"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTNom_Periodos") = value + ' End Set + 'End Property + 'Property GlobalDTVtaFormaPago() As DataTable + ' Get + ' GlobalDTVtaFormaPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaFormaPago"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTVtaFormaPago") = value + ' End Set + 'End Property + 'Property GlobalDTVtaMetodoPago() As DataTable + ' Get + ' GlobalDTVtaMetodoPago = DirectCast(HttpContext.Current.Application("GlobalDTVtaMetodoPago"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTVtaMetodoPago") = value + ' End Set + 'End Property + 'Property GlobalDTVtaTiposRelacion() As DataTable + ' Get + ' GlobalDTVtaTiposRelacion = DirectCast(HttpContext.Current.Application("GlobalDTVtaTiposRelacion"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTVtaTiposRelacion") = value + ' End Set + 'End Property + 'Property GlobalDTTiposDocumentos() As DataTable + ' Get + ' GlobalDTTiposDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTTiposDocumentos"), DataTable) + ' End Get + ' Set(value As DataTable) + ' HttpContext.Current.Application("GlobalDTTiposDocumentos") = value + ' End Set + 'End Property Public ReadOnly Property GlobalTipoCambioUltimaFluctuacion(Optional Fecha As Date = MinFecha) As ClsPaginas.MTipoCambioFluctuacion Get @@ -8847,1008 +8518,6 @@ Namespace Modelos End Get End Property - Property GlobalDTCobranzaEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTCobranzaEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTCobranzaEstatus = DirectCast(HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaCobranzaEstatus") = value - End Set - End Property - - -#Region "***********************************************************************DT EVENTOS****************************************************************************************" - Property GlobalDTTiposEventos() As DataTable - Get - GlobalDTTiposEventos = DirectCast(HttpContext.Current.Application("GlobalDTTiposEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposEventos") = value - End Set - End Property - - Property GlobalDTEventos() As DataTable - Get - GlobalDTEventos = DirectCast(HttpContext.Current.Application("GlobalDTEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEventos") = value - End Set - End Property - - Property GlobalDTOIEventoTarea() As DataTable - Get - GlobalDTOIEventoTarea = DirectCast(HttpContext.Current.Application("GlobalDTOIEventoTarea"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIEventoTarea") = value - End Set - End Property - - Property GlobalDTOIEstatusEventos() As DataTable - Get - GlobalDTOIEstatusEventos = DirectCast(HttpContext.Current.Application("GlobalDTOIEstatusEventos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIEstatusEventos") = value - End Set - End Property -#End Region - -#Region " **********************************************************************DT PROSPECTOS*************************************************************************************" - Property GlobalDTProspectosCaracteristicasClasificaciones() As DataTable - Get - GlobalDTProspectosCaracteristicasClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicasClasificaciones") = value - End Set - End Property - Property GlobalDTProspectosTiposCaracteristicas() As DataTable - Get - GlobalDTProspectosTiposCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosTiposCaracteristicas") = value - End Set - End Property - Property GlobalDTProspectosCaracteristicas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosCaracteristicas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosCaracteristicas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicas") = value - End Set - End Property - - Property GlobalDTProspectosCaracteristicasOpciones() As DataTable - Get - GlobalDTProspectosCaracteristicasOpciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCaracteristicasOpciones") = value - End Set - End Property -#End Region - -#Region "***********************************************************************DT ACTIVOS FIJOS**********************************************************************************" - Property GlobalDTActivoFijos(CveEmpresa As Integer, Optional CveSubTipoActivoFijo As Integer = -1, Optional CveActivoFijo As Integer = -1) As DataTable - Get - Dim dt As DataTable = Nothing - 'Dim Str As New StringBuilder - 'Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - 'If CveSubTipoActivoFijo <> -1 Then Str.AppendFormat(" AND CveSubTipoActivoFijo = {0}", CveSubTipoActivoFijo) - - Dim ObjAF As New ClsAF - 'If ObjAF.GetActivosFijos(CveActivoFijo, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, -1, "-1", -1, -1, -1, -1, -1) Then - If ObjAF.GetActivosFijos(CveActivoFijo, CveEmpresa, "-1", "-1", -1, CveSubTipoActivoFijo, "-1", -1, -1, -1, -1, -1, "", -1) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTActivoFijos = dt - - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTActivoFijos") = value - End Set - End Property - Property GlobalDTEstadoActivoFijo() As DataTable - Get - GlobalDTEstadoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTEstadoActivoFijo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstadoActivoFijo") = value - End Set - End Property - Property GlobalDTMarcaActivoFijo(CveEmpresa As Integer) As DataTable - Get - Dim dt As DataTable = Nothing - - Dim ObjAF As New ClsAF - - If ObjAF.GetMarcasActivosFijos(CveEmpresa) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTMarcaActivoFijo = dt - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMarcaActivoFijo") = value - End Set - End Property - Property GlobalDTModeloActivoFijo(CveEmpresa As Integer, CveMarca As Integer) As DataTable - Get - Dim dt As DataTable = Nothing - - Dim ObjAF As New ClsAF - - If ObjAF.GetModelosActivosFijos(CveEmpresa, CveMarca) Then - dt = ObjAF.DtResultados - End If - - ObjAF.Dispose() - GlobalDTModeloActivoFijo = dt - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTModeloActivoFijo") = value - End Set - End Property - - Property GlobalDTSubTipoActivoFijo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTSubTipoActivoFijo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTSubTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTSubTipoActivoFijo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTSubTipoActivoFijo") = value - End Set - End Property - Property GlobalDTTipoActivoFijo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTTipoActivoFijo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTTipoActivoFijo = DirectCast(HttpContext.Current.Application("GlobalDTTipoActivoFijo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoActivoFijo") = value - End Set - End Property - -#End Region - -#Region "***********************************************************************DT GENERALES**************************************************************************************" - Property GlobalDTGralPaises() As DataTable - Get - GlobalDTGralPaises = DirectCast(HttpContext.Current.Application("GlobalDTGralPaises"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralPaises") = value - End Set - End Property - Property GlobalDTGralEstados(CvePais As Integer) As DataTable - Get - GlobalDTGralEstados = DirectCast(HttpContext.Current.Application("GlobalDTGralEstados"), DataTable).FiltraParametros(String.Format("CvePais ={0}", CvePais)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralEstados") = value - End Set - End Property - Property GlobalDTGralMunicipios(CveEstado As Integer) As DataTable - Get - GlobalDTGralMunicipios = DirectCast(HttpContext.Current.Application("GlobalDTGralMunicipios"), DataTable).FiltraParametros(String.Format("CveEstado ={0}", CveEstado)) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralMunicipios") = value - End Set - End Property - - Property GlobalDTGralPoblaciones() As DataTable - Get - GlobalDTGralPoblaciones = DirectCast(HttpContext.Current.Application("GlobalDTGralPoblaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralPoblaciones") = value - End Set - End Property - Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralCategorias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralCategorias = DirectCast(HttpContext.Current.Application("GlobalDTGralCategorias"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralCategorias") = value - End Set - End Property - Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralCategorias2 = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralCategorias2 = DirectCast(HttpContext.Current.Application("GlobalDTCategorias2"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCategorias2") = value - End Set - End Property - - Property GlobalDTGralEscolaridades() As DataTable - Get - GlobalDTGralEscolaridades = DirectCast(HttpContext.Current.Application("GlobalDTGralEscolaridades"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralEscolaridades") = value - End Set - End Property - - Property GlobalDTGralColectivas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTGralColectivas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTGralColectivas = DirectCast(HttpContext.Current.Application("GlobalDTGralColectivas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGralColectivas") = value - End Set - End Property - -#End Region - -#Region "***********************************************************************DT PROSPECTOS*************************************************************************************" - Property GlobalDTProspectosSupervisores(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSupervisores = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSupervisores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSupervisores"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSupervisores") = value - End Set - End Property - Property GlobalDTProspectosCoordinadores(CveSupervisor As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveSupervisor <> -1 Then Str.AppendFormat(" {0} CveSupervisor = {1}", If(Str.Length > 0, "AND", ""), CveSupervisor) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosCoordinadores = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosCoordinadores = DirectCast(HttpContext.Current.Application("GlobalDTProspectosCoordinadores"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosCoordinadores") = value - End Set - End Property - Property GlobalDTProspectosApoyos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosApoyos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyos") = value - End Set - End Property - Property GlobalDTProspectosClasificaciones(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosClasificaciones = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosClasificaciones = DirectCast(HttpContext.Current.Application("GlobalDTProspectosClasificaciones"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosClasificaciones") = value - End Set - End Property - Property GlobalDTProspectosEventosTipo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosEventosTipo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEventosTipo = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEventosTipo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEventosTipo") = value - End Set - End Property - Property GlobalDTProspectosEvento(CveEventoTipo As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEventoTipo <> -1 Then Str.AppendFormat(" {0} CveEventoTipo = {1}", If(Str.Length > 0, "AND", ""), CveEventoTipo) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEvento = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEvento = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEvento"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEvento") = value - End Set - End Property - Property GlobalDTProspectosEstatus(CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEstatus") = value - End Set - End Property - Property GlobalDTProspectosApoyosTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosApoyosTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value - End Set - End Property - Property GlobalDTProspectosApoyosTipos() As DataTable - Get - GlobalDTProspectosApoyosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosApoyosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosApoyosTipos") = value - End Set - End Property - Property GlobalDTProspectosEncuestas(CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestas") = value - End Set - End Property - Property GlobalDTProspectosEncuestasPreguntas(CveEncuesta As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta) - - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestasPreguntas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestasPreguntas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestasPreguntas") = value - End Set - End Property - Property GlobalDTProspectosEncuestasRespuestas(CvePregunta As Integer, CveEncuesta As Integer, CveEmpresa As Integer) As DataTable - Get - Dim Str As New StringBuilder - If CveEmpresa <> -1 Then Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) - If CveEncuesta <> -1 Then Str.AppendFormat(" {0} CveEncuesta = {1}", If(Str.Length > 0, "AND", ""), CveEncuesta) - If CvePregunta <> -1 Then Str.AppendFormat(" {0} CvePregunta = {1}", If(Str.Length > 0, "AND", ""), CvePregunta) - - - If Str.Length > 0 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) - GlobalDTProspectosEncuestasRespuestas = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTProspectosEncuestasRespuestas = DirectCast(HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosEncuestasRespuestas") = value - End Set - End Property - Property GlobalDTProspectosTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosTipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosTipos") = value - End Set - End Property - -#Region " DT PROSPECTOS SOLICITUDES" - Property GlobalDTProspectosSolicitudes(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudes = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudes = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudes"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudes") = value - End Set - End Property - Property GlobalDTProspectosSolicitudesEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesEstatus = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesEstatus") = value - End Set - End Property - Property GlobalDTProspectosSolicitudesTipos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable) - End If - End Get - - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value - End Set - End Property - 'Property GlobalDTProspectosSolicitudesTipos() As DataTable - ' Get - ' GlobalDTProspectosSolicitudesTipos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTProspectosSolicitudesTipos") = value - ' End Set - 'End Property - Property GlobalDTProspectosSolicitudesApoyos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTProspectosSolicitudesApoyos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTProspectosSolicitudesApoyos = DirectCast(HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTProspectosSolicitudesApoyos") = value - End Set - End Property - -#End Region -#End Region - -#Region "**********************************************DT AMORTIZACIÓN CONTABLE PLAN DE DESARROLLO********************************************************************************" - -#Region "***********************************************************************DT AMORTIZACIÓN CONTABLE*********************************************************************************************" - - Property GlobalDTAC_RubrosIngreso() As DataTable - Get - GlobalDTAC_RubrosIngreso = DirectCast(HttpContext.Current.Application("GlobalDTAC_RubrosIngreso"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_RubrosIngreso") = value - End Set - End Property - Property GlobalDTAC_FuentesRecaudacion(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_FuentesRecaudacion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_FuentesRecaudacion = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesRecaudacion") = value - End Set - End Property - - Property GlobalDTAC_FuentesFinanciamiento() As DataTable - Get - GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value - End Set - End Property - Property GlobalDTAC_OG() As DataTable - Get - GlobalDTAC_OG = DirectCast(HttpContext.Current.Application("GlobalDTAC_OG"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_OG") = value - End Set - End Property - 'Property GlobalDTAC_ClasificadorOG(CveEmpresa As Integer) As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - ' GlobalDTAC_ClasificadorOG = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTAC_ClasificadorOG = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificadorOG"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAC_ClasificadorOG") = value - ' End Set - 'End Property - Property GlobalDTAC_Ubicaciones() As DataTable - Get - GlobalDTAC_Ubicaciones = DirectCast(HttpContext.Current.Application("GlobalDTAC_Ubicaciones"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Ubicaciones") = value - End Set - End Property - Property GlobalDTAC_UnidadesAdministrativas(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_UnidadesAdministrativas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_UnidadesAdministrativas = DirectCast(HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_UnidadesAdministrativas") = value - End Set - End Property - Property GlobalDTAC_ClasificacionFuncional(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionFuncional = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionFuncional = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionFuncional") = value - End Set - End Property - Property GlobalDTAC_ClasificacionGeografica(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionGeografica = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionGeografica = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionGeografica") = value - End Set - End Property - Property GlobalDTAC_Cuentas() As DataTable - Get - GlobalDTAC_Cuentas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Cuentas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Cuentas") = value - End Set - End Property - Property GlobalDTAC_Finalidad() As DataTable - Get - GlobalDTAC_Finalidad = DirectCast(HttpContext.Current.Application("GlobalDTAC_Finalidad"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Finalidad") = value - End Set - End Property - 'Property GlobalDTAC_FuenteFinanciamiento() As DataTable - ' Get - ' GlobalDTAC_FuenteFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento"), DataTable) - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTAC_FuenteFinanciamiento") = value - ' End Set - 'End Property - Property GlobalDTAC_FuentesFinanciamiento(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTAC_FuentesFinanciamiento = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_FuentesFinanciamiento = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamiento") = value - End Set - End Property - Property GlobalDTAC_FuentesFinanciamientoCONAC() As DataTable - Get - GlobalDTAC_FuentesFinanciamientoCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_FuentesFinanciamientoCONAC") = value - End Set - End Property - Property GlobalDTAC_Funcion() As DataTable - Get - GlobalDTAC_Funcion = DirectCast(HttpContext.Current.Application("GlobalDTAC_Funcion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Funcion") = value - End Set - End Property - Property GlobalDTAC_Programas() As DataTable - Get - GlobalDTAC_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_Programas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_Programas") = value - End Set - End Property - Property GlobalDTAC_ProgramasCONAC() As DataTable - Get - GlobalDTAC_ProgramasCONAC = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProgramasCONAC") = value - End Set - End Property - Property GlobalDTAC_ProyectosProceso() As DataTable - Get - GlobalDTAC_ProyectosProceso = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProyectosProceso"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProyectosProceso") = value - End Set - End Property - Property GlobalDTAC_SubFuncion() As DataTable - Get - GlobalDTAC_SubFuncion = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubFuncion"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_SubFuncion") = value - End Set - End Property - Property GlobalDTAC_SubProgramas() As DataTable - Get - GlobalDTAC_SubProgramas = DirectCast(HttpContext.Current.Application("GlobalDTAC_SubProgramas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_SubProgramas") = value - End Set - End Property - Property GlobalDTAC_ClasificacionAdministrativa(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ClasificacionAdministrativa = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ClasificacionAdministrativa = DirectCast(HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ClasificacionAdministrativa") = value - End Set - End Property - Property GlobalDTAC_TipoGasto() As DataTable - Get - GlobalDTAC_TipoGasto = DirectCast(HttpContext.Current.Application("GlobalDTAC_TipoGasto"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_TipoGasto") = value - End Set - End Property - - Property GlobalDTAC_ProgramaOperativo(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_ProgramaOperativo = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_ProgramaOperativo = DirectCast(HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_ProgramaOperativo") = value - End Set - End Property - - Property GlobalDTAC_MatrizIngresos() As DataTable - Get - GlobalDTAC_MatrizIngresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizIngresos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_MatrizIngresos") = value - End Set - End Property - - Property GlobalDTAC_MatrizEgresos() As DataTable - Get - GlobalDTAC_MatrizEgresos = DirectCast(HttpContext.Current.Application("GlobalDTAC_MatrizEgresos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_MatrizEgresos") = value - End Set - End Property - - -#End Region - - Property GlobalDTAC_PD_EjeRector(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_EjeRector = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_EjeRector = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_EjeRector"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_EjeRector") = value - End Set - End Property - - Property GlobalDTAC_PD_Programas(CveEjeRector As Integer) As DataTable - Get - If CveEjeRector <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Programas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Programas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Programas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Programas") = value - End Set - End Property - - Property GlobalDTAC_PD_Estrategias(CveProgramas As Integer) As DataTable - Get - If CveProgramas <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable), String.Format("CvePrograma = {0}", CveProgramas), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Estrategias = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Estrategias = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Estrategias"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Estrategias") = value - End Set - End Property - - Property GlobalDTAC_PD_LineasAccion(CveEstrategias As Integer) As DataTable - Get - If CveEstrategias <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable), String.Format("CveEstrategia = {0}", CveEstrategias), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_LineasAccion = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_LineasAccion = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_LineasAccion") = value - End Set - End Property - - Property GlobalDTAC_PD_Metas(CveLineasAccion As Integer) As DataTable - Get - If CveLineasAccion <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable), String.Format("CveLineaAccion = {0}", CveLineasAccion), "", DataViewRowState.CurrentRows) - GlobalDTAC_PD_Metas = Dv.ToTable - Dv.Dispose() - Else - GlobalDTAC_PD_Metas = DirectCast(HttpContext.Current.Application("GlobalDTAC_PD_Metas"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAC_PD_Metas") = value - End Set - End Property -#End Region - -#Region "***********************************************************************GLOBAL DT ORDENES DE COMPRA***********************************************************************" - - Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable - Get - - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - 'sino existe, recarga los datos - If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then - - Dim ObjOC As New ClsOC - If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, CveEmpresa) Then - HttpContext.Current.Application(AppNombre) = ObjOC.DtResultados - Else - HttpContext.Current.Application(AppNombre) = Nothing - End If - - ObjOC.Dispose() - - End If - - Dim filtro As New StringBuilder - filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) - If CveUsuario > 0 Then - filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) - End If - If Tipo <> "" Then - filtro.AppendFormat(" AND Tipo='{0}'", Tipo) - End If - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) - GlobalDTOCEstatusUsuarios = Dv.ToTable - Dv.Dispose() - - End Get - Set(value As DataTable) - Dim AppNombre As String = String.Format("GlobalDTOCEstatusUsuarios-{0}", CveEmpresa) - HttpContext.Current.Application(AppNombre) = value - End Set - End Property - - - Property GlobalDTOCEstatus(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) - GlobalDTOCEstatus = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOCEstatus = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatus"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOCEstatus") = value - End Set - End Property - - - 'Property GlobalDTOCEstatusUsuarios(CveEmpresa As Integer, Optional CveUsuario As Integer = -1, Optional Tipo As String = "") As DataTable - ' Get - ' If CveEmpresa <> -1 Then - ' Dim filtro As New StringBuilder - ' filtro.AppendFormat("CveEmpresa = {0} ", CveEmpresa) - ' If CveUsuario > 0 Then - ' filtro.AppendFormat(" AND CveUsuario={0} ", CveUsuario) - ' End If - ' If Tipo <> "" Then - ' filtro.AppendFormat(" AND Tipo='{0}'", Tipo) - ' End If - ' Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows) - ' GlobalDTOCEstatusUsuarios = Dv.ToTable - ' Dv.Dispose() - ' Else - ' GlobalDTOCEstatusUsuarios = DirectCast(HttpContext.Current.Application("GlobalDTOCEstatusUsuarios"), DataTable) - ' End If - ' End Get - ' Set(value As DataTable) - ' HttpContext.Current.Application("GlobalDTOCEstatusUsuarios") = value - ' End Set - 'End Property - - -#End Region - -#Region "F I N A N Z A S " - Property GlobalDTFinan_RazonesFinancieras() As DataTable - Get - GlobalDTFinan_RazonesFinancieras = DirectCast(HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTFinan_RazonesFinancieras") = value - End Set - End Property -#End Region #Region "***********************************************************************GLOBAL DT CONTABILIDAD****************************************************************************" @@ -9914,357 +8583,7 @@ Namespace Modelos End Property #End Region -#Region "**********************************************************************GLOBAL DT RH (RECURSOS HUMANOS)********************************************************************" - Property GlobalDTAsistenciaDetalle() As DataTable - Get - GlobalDTAsistenciaDetalle = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciaDetalle"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAsistenciaDetalle") = value - End Set - End Property - Property GlobalDTAsistenciasInasistencias() As DataTable - Get - GlobalDTAsistenciasInasistencias = DirectCast(HttpContext.Current.Application("GlobalDTAsistenciasInasistencias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTAsistenciasInasistencias") = value - End Set - End Property - Property GlobalDTEstatusPersonal() As DataTable - Get - GlobalDTEstatusPersonal = DirectCast(HttpContext.Current.Application("GlobalDTEstatusPersonal"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstatusPersonal") = value - End Set - End Property - Property GlobalDTRHPersonal(CveEmpresa As Integer) As DataTable - Get - Dim ObjPersonal As New ClsRH - ObjPersonal.GetPersonal(-1, CveEmpresa) - GlobalDTRHPersonal = ObjPersonal.DtResultados - ObjPersonal.Dispose() - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRHPersonal") = value - End Set - End Property - - - Property GlobalDTDepartamentos() As DataTable - Get - GlobalDTDepartamentos = DirectCast(HttpContext.Current.Application("GlobalDTDepartamentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDepartamentos") = value - End Set - End Property - Property GlobalDTRHPuestos(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTRHPuestos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTRHPuestos = DirectCast(HttpContext.Current.Application("GlobalDTRHPuestos"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRHPuestos") = value - End Set - End Property - Property GlobalDTEscolaridad() As DataTable - Get - GlobalDTEscolaridad = DirectCast(HttpContext.Current.Application("GlobalDTEscolaridad"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEscolaridad") = value - End Set - End Property - Property GlobalDTEstadoCivil() As DataTable - Get - GlobalDTEstadoCivil = DirectCast(HttpContext.Current.Application("GlobalDTEstadoCivil"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTEstadoCivil") = value - End Set - End Property - Property GlobalDTDocumentos() As DataTable - Get - GlobalDTDocumentos = DirectCast(HttpContext.Current.Application("GlobalDTDocumentos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDocumentos") = value - End Set - End Property - Property GlobalDTGenero() As DataTable - Get - GlobalDTGenero = DirectCast(HttpContext.Current.Application("GlobalDTGenero"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTGenero") = value - End Set - End Property - Property GlobalDTMotivoBaja() As DataTable - Get - GlobalDTMotivoBaja = DirectCast(HttpContext.Current.Application("GlobalDTMotivoBaja"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMotivoBaja") = value - End Set - End Property - Property GlobalDTTiposContrato() As DataTable - Get - GlobalDTTiposContrato = DirectCast(HttpContext.Current.Application("GlobalDTTiposContrato"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTiposContrato") = value - End Set - End Property - Property GlobalDTRutas() As DataTable - Get - GlobalDTRutas = DirectCast(HttpContext.Current.Application("GlobalDTRutas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTRutas") = value - End Set - End Property - Property GlobalDTTurno() As DataTable - Get - GlobalDTTurno = DirectCast(HttpContext.Current.Application("GlobalDTTurno"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTurno") = value - End Set - End Property - Property GlobalDTJornadas() As DataTable - Get - GlobalDTJornadas = DirectCast(HttpContext.Current.Application("GlobalDTJornadas"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTJornadas") = value - End Set - End Property - Property GlobalDTMotivosHorasExtras() As DataTable - Get - GlobalDTMotivosHorasExtras = DirectCast(HttpContext.Current.Application("GlobalDTMotivosHorasExtras"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMotivosHorasExtras") = value - End Set - End Property - Property GlobalDTTipoBuzon() As DataTable - Get - GlobalDTTipoBuzon = DirectCast(HttpContext.Current.Application("GlobalDTTipoBuzon"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTipoBuzon") = value - End Set - End Property -#End Region - -#Region "*********** D T - C O M B U S T I B L E S ***********" - - - - Property GlobalDTCombustibles(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As New StringBuilder - StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCombustibles = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCombustibles = DirectCast(HttpContext.Current.Application("GlobalDTCombustibles"), DataTable) - End If - - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTCombustibles") = value - End Set - End Property - - Property GlobalDTCombustiblesTipos(Optional CveCombustibleTipo As Integer = -1) As DataTable - Get - - If CveCombustibleTipo <> -1 Then - - Dim StrSQL As New StringBuilder - If CveCombustibleTipo <> -1 Then StrSQL.AppendFormat("CveCombustibleTipo = {0}", CveCombustibleTipo) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCombustiblesTipos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTCombustiblesTipos = DirectCast(HttpContext.Current.Application("GlobalDTCombustiblesTipos"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - HttpContext.Current.Application("GlobalDTCombustiblesTipos") = value - End Set - End Property -#End Region - -#Region "*********** D T - M A N T E N I M I E N T O S ***********" - - Property GlobalDTMantenimientosTipos() As DataTable - Get - GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value - End Set - End Property - - Property GlobalDTMantenimientos() As DataTable - Get - GlobalDTMantenimientos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTMantenimientos") = value - End Set - End Property - - Property GlobalDTMantenimientosTipos(Optional CveMantenimientoTipo As Integer = -1) As DataTable - Get - - If CveMantenimientoTipo <> -1 Then - - Dim StrSQL As New StringBuilder - If CveMantenimientoTipo <> -1 Then StrSQL.AppendFormat("CveMantenimientoTipo = {0}", CveMantenimientoTipo) - - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTMantenimientosTipos = Dv.ToTable - Dv.Dispose() - - Else - GlobalDTMantenimientosTipos = DirectCast(HttpContext.Current.Application("GlobalDTMantenimientosTipos"), DataTable) - End If - End Get - Set(ByVal value As DataTable) - - HttpContext.Current.Application("GlobalDTMantenimientosTipos") = value - End Set - End Property - -#End Region - - -#Region "*********** D T - T A L L E R E S ***********" - - Property GlobalDTTalleresTipos() As DataTable - Get - GlobalDTTalleresTipos = DirectCast(HttpContext.Current.Application("GlobalDTTalleresTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTalleresTipos") = value - End Set - End Property - - Property GlobalDTTalleres() As DataTable - Get - GlobalDTTalleres = DirectCast(HttpContext.Current.Application("GlobalDTTalleres"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTTalleres") = value - End Set - End Property - -#End Region - -#Region "*********** D T - D I S T R I B U I D O R E S ***********" - - Property GlobalDTDistribuidoresTipos() As DataTable - Get - GlobalDTDistribuidoresTipos = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidoresTipos"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDistribuidoresTipos") = value - End Set - End Property - - Property GlobalDTDistribuidores() As DataTable - Get - GlobalDTDistribuidores = DirectCast(HttpContext.Current.Application("GlobalDTDistribuidores"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTDistribuidores") = value - End Set - End Property - -#End Region - - - Property GlobalDTOIRevision(CveEmpresa As Integer) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTOIRevision = Dv.ToTable - Dv.Dispose() - Else - GlobalDTOIRevision = DirectCast(HttpContext.Current.Application("GlobalDTOIRevision"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIRevision") = value - End Set - End Property - Property GlobalDTOIAgendaTipo() As DataTable - Get - GlobalDTOIAgendaTipo = DirectCast(HttpContext.Current.Application("GlobalDTOIAgendaTipo"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIAgendaTipo") = value - End Set - End Property - Property GlobalDTOIAgenda() As DataTable - Get - GlobalDTOIAgenda = DirectCast(HttpContext.Current.Application("GlobalDTOIAgenda"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTOIAgenda") = value - End Set - End Property - Property GlobalDTVtaCondicionesEntrega(Optional CveEmpresa As Integer = -1) As DataTable - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTVtaCondicionesEntrega = Dv.ToTable - Dv.Dispose() - Else - GlobalDTVtaCondicionesEntrega = DirectCast(HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTVtaCondicionesEntrega") = value - End Set - End Property - Property GlobalDTPaqueteriaGuiaTipos(CveEmpresa As Integer) As DataTable - - Get - If CveEmpresa <> -1 Then - Dim StrSQL As String = String.Format("CveEmpresa = {0}", CveEmpresa) - Dim Dv As New DataView(DirectCast(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable), StrSQL, "", DataViewRowState.CurrentRows) - GlobalDTPaqueteriaGuiaTipos = Dv.ToTable - Dv.Dispose() - Else - GlobalDTPaqueteriaGuiaTipos = DirectCast(HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos"), DataTable) - End If - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPaqueteriaGuiaTipos") = value - End Set - End Property Property GlobalDTClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasicacionPorcentaje As Integer = -1, Optional CveClasicacion As Integer = -1, Optional PorcentajeIVA As Double = -1) As DataTable @@ -10286,14 +8605,7 @@ Namespace Modelos HttpContext.Current.Application("GlobalDTClasificacionPorcentaje") = value End Set End Property - Property GlobalDTPaqueterias() As DataTable - Get - GlobalDTPaqueterias = DirectCast(HttpContext.Current.Application("GlobalDTPaqueterias"), DataTable) - End Get - Set(value As DataTable) - HttpContext.Current.Application("GlobalDTPaqueterias") = value - End Set - End Property + Public Property CveContratoSecciones As String Public Property CveEstatus As Integer diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 5081269e9..02167a020 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -492,7 +492,7 @@ Partial Class Inventarios_RecepcionUsados Dim CveTamanio As Integer = 1 Dim CveUM As Integer = -1 Dim PU As Decimal = 0 - Dim RowTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={CvePS}") + Dim RowTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo > 0 AND CvePSCargo={CvePS}") Dim CodigoPS As String = "" Dim UnidaMedida As String = "" @@ -1044,8 +1044,8 @@ Partial Class Inventarios_RecepcionUsados End If Dim PU As Decimal = 0 - If GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows.Count > 0 Then - PU = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows(0)("Cargo").ToString.ToDecimal + If GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows.Count > 0 Then + PU = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0 AND CvePSCargo={DdlProducto2.SelectedValue}").Rows(0)("Cargo").ToString.ToDecimal End If AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedItem.Text, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble, PU, @@ -1318,7 +1318,7 @@ Partial Class Inventarios_RecepcionUsados If EsDistribuidor AndAlso RBLOpcion.SelectedValue.ToEntero = 42 AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños().FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($"CveTamaño={Dr("CveTamaño").ToString.ToEntero}") If DrTamanio IsNot Nothing Then Dim Cargo As Decimal = DrTamanio("Cargo").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() Dim Bonificacion As Decimal = DrTamanio("Bonificacion").ToString().ToDecimal() * Dr("Cantidad").ToString.ToDecimal() @@ -2815,7 +2815,7 @@ Partial Class Inventarios_RecepcionUsados IVA = SubTotal * PorcentajeIVA Dim Descuento As Decimal = 0 - Dim ImporteCargo As Decimal = GlobalDTAcumTamaños().FiltroPrimeroValor("Cargo", String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)).ToDecimal() + Dim ImporteCargo As Decimal = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Cargo", String.Format("CveTamaño = {0} ", CveTamaño)).ToDecimal() 'SI ES AJUSTE O GARANTIA SOLO DEBE SUMAR EL IMPORTE DE LA GARANTIA SI NO RECIBIO USADO If RblUsadosAjuste.SelectedValue = "1" AndAlso ImporteCargo <= 0 Then @@ -3207,7 +3207,7 @@ Partial Class Inventarios_RecepcionUsados Protected Sub CargaTipoDeUso() DdlTipoUso.Items.Clear() - DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTipoUso.DataBind() End Sub @@ -3217,7 +3217,7 @@ Partial Class Inventarios_RecepcionUsados End Sub Protected Sub CargaTipoDefecto() - DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto(UsuarioActual.CveEmpresa) DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTipoDefecto.DataBind() End Sub @@ -3259,7 +3259,7 @@ Partial Class Inventarios_RecepcionUsados End If End If - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}") + Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}") If DrCargo IsNot Nothing Then CargoVendido = DrCargo("Cargo").ToString.ToDecimal @@ -3386,7 +3386,7 @@ Partial Class Inventarios_RecepcionUsados If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then CveTamaño = ObjPS.DtResultados.FiltroPrimeroValor("CveTamaño").ToEntero End If - Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)) + Dim drDatos As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveTamaño = {0} ", CveTamaño)) Dim Importe As Decimal = 0 Dim drTamañoPS As DataRow = Nothing diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 2b53dc42e..818a55fb5 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5182,7 +5182,7 @@ Partial Class PV ' End If 'Next If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo = {DdlRecepcionUsados.SelectedValue}") Entregado += (1D * DrTamanio("Cargo").ToString().ToDecimal) UltimoEntregado += (DrTamanio("Cargo").ToString().ToDecimal) @@ -7049,13 +7049,13 @@ Partial Class PV DdlFacturas.Items.Insert(0, New ListItem("Sin Factura", "-1")) - DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoUso.DataSource = GlobalDTAcumTiposUso(UsuarioActual.CveEmpresa) DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") + DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto(UsuarioActual.CveEmpresa) DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - Dim DtTamanios = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo > 0") + Dim DtTamanios = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0") CargaModelos() CargaBCIAjuste() @@ -7448,7 +7448,7 @@ Partial Class PV End If End If - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} And CveTamaño = {CveTamaño}") + Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CveTamaño = {CveTamaño}") If DrCargo IsNot Nothing Then CargoVendido = DrCargo("Cargo").ToString.ToDecimal @@ -7577,7 +7577,7 @@ Partial Class PV If TmpDT.Select($"Consec={ConsecutivoVenta}").Length > 0 Then Dim Dr As DataRow = TmpDT.Select($"Consec={ConsecutivoVenta}")(0) Dim CvePSCargo As Integer = -1 - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").FiltroPrimero("") + Dim DrCargo As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").FiltroPrimero("") If DrCargo IsNot Nothing Then CvePSCargo = DrCargo("CvePSCargo").ToString.ToEntero CargoActual = DrCargo("Cargo").ToString.ToDouble @@ -7875,7 +7875,7 @@ Partial Class PV ' End If 'Next - Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo = {DdlRecepcionUsados.SelectedValue}") If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then TotalCargos += CantidadUsado * DrTamanio("Cargo").ToString().ToDecimal @@ -8039,7 +8039,7 @@ Partial Class PV Dim ListaPScargo As New List(Of MConceptoUsado) - Dim DTTamanios As DataTable = GlobalDTAcumTamaños() + Dim DTTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa) Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"}) @@ -8470,7 +8470,7 @@ Partial Class PV End Sub Protected Sub DdlRecepcionUsados_SelectedIndexChanged(sender As Object, e As EventArgs) If DdlRecepcionUsados.SelectedValue.ToEntero() > 0 Then - Dim DrTamanio As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CvePSCargo = {DdlRecepcionUsados.SelectedValue}") + Dim DrTamanio As DataRow = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltroPrimero($" CvePSCargo = {DdlRecepcionUsados.SelectedValue}") DdlBCIUsado.DataSource = DTBCIUsados.FiltraParametros(String.Format("CveTamaño = {0}", DrTamanio("CveTamaño"))) Else DdlBCIUsado.Items.Clear()