From 069d344f345f05f5619b315198b6aa1e4f87157d Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 5 May 2021 10:41:14 -0700 Subject: [PATCH 01/47] Compras no bloquear Boton de guardar al solicitar OC --- Compras/Compras.aspx.vb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index bd1247c18..468820bed 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1358,7 +1358,7 @@ Partial Class Compras_Compras If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then If TmpDT.MAX("CvePS").ToEntero > 0 Then - BtnGuardar.Enabled = False + 'BtnGuardar.Enabled = False RegistraScript("$('#ImgBtnBuscarOC').click()") End If End If @@ -4083,9 +4083,15 @@ Partial Class Compras_Compras 'Verifica funcionalidad 128 "Require orden de compra para factura de compra" + Dim EsViatico As Boolean = False + + If RBLPago.SelectedValue.ToEntero = 3 AndAlso RBLContado.SelectedValue.ToEntero = 2 AndAlso TxtNumeroReembolso.Text.Length > 0 AndAlso DdlPersonalReembolso.SelectedValue.ToEntero > 0 Then + EsViatico = True + End If + If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then If UsuarioActual.Empresa.Funcionalidad(128) = "1" And Not UsuarioActual.TienePermisoProceso(213) Then - If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then + If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal And Not EsViatico Then If Not CompraEstaVinculadaOC Then Alert("Debe de vincular una orden de compra para registrar la factura") Exit Sub From 584cca327c478513f618b37ed91496322bcf861f Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 5 May 2021 12:10:49 -0700 Subject: [PATCH 02/47] -- carga de subproyectos --- Contabilidad2/RepEstadoActividades.aspx.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Contabilidad2/RepEstadoActividades.aspx.vb b/Contabilidad2/RepEstadoActividades.aspx.vb index ed556b6a1..22b3119c2 100644 --- a/Contabilidad2/RepEstadoActividades.aspx.vb +++ b/Contabilidad2/RepEstadoActividades.aspx.vb @@ -116,6 +116,10 @@ Partial Class AC_RepEstadoActividades DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString)) End If DdlPeriodo.SelectedValue = Now.Month.ToString + + DdlSubproyecto.datasource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) + DdlSubproyecto.databind + End Sub Private Sub CargaDatos() From 161e2f8877b276483b8827e0d3362f0d3723f491 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 5 May 2021 12:11:15 -0700 Subject: [PATCH 03/47] -- conceptos de descuento de nomina --- AC/RegNomina.aspx | 17 ++++++++++++++--- AC/RegNomina.aspx.vb | 38 +++++++++++++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/AC/RegNomina.aspx b/AC/RegNomina.aspx index 5f660dfe7..db1709f12 100644 --- a/AC/RegNomina.aspx +++ b/AC/RegNomina.aspx @@ -93,12 +93,23 @@ - + + - -
ISPT Servicio Médico:Fonacot:
Crédito al Salario
+ Pensión: + P. Infonavit: + + + ISR Asimilados + C. Sindical + + + + + + diff --git a/AC/RegNomina.aspx.vb b/AC/RegNomina.aspx.vb index 2d6a6cd3d..cc9ed0b49 100644 --- a/AC/RegNomina.aspx.vb +++ b/AC/RegNomina.aspx.vb @@ -373,6 +373,12 @@ Partial Class AC_RegNomina Dim IdCtaCreditoSalario As Integer = 635 Dim IdCtaDevolucionISPT As Integer = 1745 Dim IdCtaMatriz As Integer + Dim IdCtaCuotaSindical As Integer = 644 + Dim IdCtaInfonavit As Integer = 2018 + Dim IdCtaFonacot As Integer = 646 + Dim IdCtaServicioMedico As Integer = 643 + Dim IdCtaPension As Integer = 643 + Dim IdCtaISRAsimilados As Integer = 4442 Dim Importe As Double Dim MsgError As String = "" @@ -564,6 +570,7 @@ Partial Class AC_RegNomina ObjIE.UpdateIEPrePoliza(Fecha, objAC.Folio.ToString, IDPoliza, CvePrePoliza, CveIE, -1) Else + MsgError = "no se pudo agregar el movimiento bancario" TieneError = True End If @@ -586,9 +593,34 @@ Partial Class AC_RegNomina If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaCreditoSalario, False, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True - 'Registro del Mov Devolución - Importe = TxtISPT.Text.ToDouble - TxtCredSalario.Text.ToDouble - If Importe <> 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaDevolucionISPT, If(Importe > 0, False, True), Math.Abs(Importe), "", Concepto, 0, Fecha, "") Then TieneError = True + 'Registro Cuotas Sindicales + Importe = TxtSindical.Text.ToDouble + If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaCuotaSindical, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True + + 'Registro Prestamo infonavit + Importe = txtInfonavit.Text.ToDouble + If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaInfonavit, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True + + 'Registro Fonacot + Importe = txtFonacot.Text.ToDouble + If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaFonacot, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True + + 'Registro Servicio Medico + Importe = txtServicioMedico.Text.ToDouble + If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaServicioMedico, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True + + 'Registro Pensión + Importe = txtPension.Text.ToDouble + If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaPension, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True + + 'Registro ISR Asimilados + Importe = TxtISRAsimilados.Text.ToDouble + If Importe > 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaISRAsimilados, True, Importe, "", Concepto, 0, Fecha, "") Then TieneError = True + + + ''Registro del Mov Devolución + 'Importe = TxtISPT.Text.ToDouble - TxtCredSalario.Text.ToDouble + 'If Importe <> 0 AndAlso Not objAC.AddMovimiento(IDPoliza, IdCtaDevolucionISPT, If(Importe > 0, False, True), Math.Abs(Importe), "", Concepto, 0, Fecha, "") Then TieneError = True Else TieneError = True From 9d5b802d9439b5f76c03c0d0074ec364a8aaeac3 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Wed, 5 May 2021 13:26:20 -0700 Subject: [PATCH 04/47] Poliza BDH --- Empresas/140/Formatos/Polizas.rdlc | 2255 ++++++++++++++++++++++++++++ 1 file changed, 2255 insertions(+) create mode 100644 Empresas/140/Formatos/Polizas.rdlc diff --git a/Empresas/140/Formatos/Polizas.rdlc b/Empresas/140/Formatos/Polizas.rdlc new file mode 100644 index 000000000..ffc1b50d8 --- /dev/null +++ b/Empresas/140/Formatos/Polizas.rdlc @@ -0,0 +1,2255 @@ + + + 0 + + + + System.Data.DataSet + /* Local Connection */ + + 7ef92796-1755-4a85-b80c-8c8266256a94 + + + + + + DataSet1 + /* Local Query */ + + + + Id + System.Int32 + + + Fecha + System.DateTime + + + TipoPoliza + System.String + + + NombreCuenta + System.String + + + CodigoCuenta + System.String + + + Numero + System.Int32 + + + Folio + System.Int32 + + + Referencia + System.String + + + Concepto + System.String + + + ConceptoPoliza + System.String + + + TipoMovto + System.Int32 + + + Cargos + System.String + + + Abonos + System.String + + + SegNeg + System.String + + + Cargo + System.Decimal + + + Abono + System.Decimal + + + Codigo + System.String + + + NombreUsuario + System.String + + + + DataSet1 + C:\inetpub\wwwroot\ADSistemas\Ventas.root\Reportes\DataSet1.xsd + DataTable1 + + + + + + + + + + + + + + + 2.15421cm + + + 2.15421cm + + + 2.15421cm + + + 2.15421cm + + + 2.15421cm + + + 2.15421cm + + + 2.15421cm + + + 2.15421cm + + + 2.15421cm + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + Textbox1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox34 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox25 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox17 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox7 + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Concepto: + + + + =Fields!ConceptoPoliza.Value + + + + + + + Textbox103 + + + 2pt + 2pt + 2pt + 2pt + + + 7 + + + + + + + + + + + + true + true + + + + + Fecha: + + + + =Fields!Fecha.Value + + + + + + + Textbox107 + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + 0.6cm + + + + + true + true + + + + + Referencia + + + + + + + Textbox15 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cuenta + + + + + + + Textbox16 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Concepto + + + + + + + Textbox28 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + Sucursal + + + + + + + Textbox46 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cargos + + + + + + + Textbox52 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Abonos + + + + + + + Textbox66 + + + #3a4173 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.37063cm + + + + + true + + + + + =Fields!Referencia.Value + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + + + + + =Fields!CodigoCuenta.Value + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + =Fields!NombreCuenta.Value + + + + + + + Cuenta1 + + + 1pt + 1pt + 1pt + 1pt + + + 4 + + + + + + + + + true + true + + + + + =Fields!SegNeg.Value + + + + + + + SegNeg + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + + + + + =Fields!Cargo.Value + + + + + + + Cargo + + =iif(Fields!TipoMovto.Value = "1", true, false) + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + + + + + =Fields!Abono.Value + + + + + + + Abono + + =iif(Fields!TipoMovto.Value = "0", true, false) + + + + 1pt + 1pt + 1pt + 1pt + es-MX + + + + + + + + 0.41479cm + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + =Fields!Concepto.Value + + + + + + + Concepto + + + 1pt + 1pt + 1pt + 1pt + + + 4 + + + + + + + + + true + true + + + + + + + + + + + + Textbox6 + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + + Textbox114 + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + + Textbox115 + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + 0.6cm + + + + + true + true + + + + + =Code.IsNewPage(Fields!Id.Value,nothing,nothing) + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + =Fields!NombreUsuario.Value + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + Totales: + + + + + + + Textbox11 + + + + Black + + 1pt + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + =Sum(Fields!Cargo.Value) + + + + + + + Textbox12 + + + + + + 1pt + 1pt + 1pt + 1pt + en-US + + + + + + + + true + true + + + + + =Sum(Fields!Abono.Value) + + + + + + + Abono + + + + + + 1pt + 1pt + 1pt + 1pt + en-US + + + + + + + + + + + + + + + + + + + + + + + + + + + =Fields!Fecha.Value + =Fields!TipoPoliza.Value + =Fields!Numero.Value + =Fields!ConceptoPoliza.Value + + + End + true + + + + =Fields!NombreUsuario.Value + + + + + + =Fields!Folio.Value + + + + + After + + + After + + + After + + + + + + + + + + Before + + + + + + true + DataSet1 + + End + true + + 0.05076cm + 3.18542cm + 19.38789cm + + + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 5.82055cm + + + + + + + + + Impreso de póliza + + + + + + + + + =UCase(Parameters!TipoPoliza.Value) + + + + + + + Textbox4 + 0.19844cm + 2.10635in + 1.6616cm + 9.94376cm + + + 2pt + 2pt + + + + Embedded + Logo + FitProportional + 0.00896cm + 2.5433cm + 4.13cm + 1 + + + + + + + + + + + 0.7827cm + true + true + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Now() + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página: " & Globals!PageNumber + + + + + + + Textbox35 + 0.13103cm + 16.24302cm + 0.46771cm + 2.8175cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario Imprimio: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1.25pt + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 0.5cm + 0.5cm + 0.03cm + + + + + + + Textbox13 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + @@ -747,7 +810,6 @@ 2pt - true @@ -890,6 +952,40 @@ + + + + true + true + + + + + =Fields!Serie.Value + + + + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + @@ -1050,6 +1146,7 @@ + @@ -1069,7 +1166,7 @@ DataSet1 0.17639cm 1.0148cm - 24.37731cm + 24.56252cm @@ -1080,7 +1177,7 @@ 0.67394in @@ -1155,7 +1252,7 @@ Textbox2 1.07625cm 0.52945cm - 24.62205cm + 24.56252cm 1 - - - - - - Textbox3 - 0.90692in - 5.662in - 0.5cm - 2.24597in - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Fecha y hora de emisión - - - - - - - - - - - - - - - - Textbox3 - 0.46414in - 5.662in - 0.5cm - 2.24597in - 1 - - - #c4d79b - 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 - - - - - =Parameters!TipoDocumento.Value - - - - - - - Textbox3 - 0.0412cm - 5.662in - 0.5cm - 2.24597in - 3 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - ECLIPSE DEL NOROESTE SA DE CV - - - - - - - - - R.F.C ENO970305TL4 - - - - - - - - - - - - - - - - Textbox4 - 1.7536in - 0.59155in - 3.86673in - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo2 - FitProportional - 0.2705cm - 0.03093cm - 2.47832cm - 4.42323cm - 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 - - - - - - - - - Av. Alfredo Eguiarte, #268, Local 10, - - - - - - - - - Col.: Jesús García, C.P. 83140 Hermosillo, - - - - - - - - - Sonora, México Tel.: (662) 14-6826 - - - - - - - Textbox10 - 0.51102in - 1.7536in - 0.65513in - 2.01842in - 8 - - true - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - LUGAR DE EXPEDICIÓN: - - - - - - - - - - - - - 83140 - - - - - - - Textbox10 - 0.51102in - 3.77202in - 0.65513in - 1.88998in - 9 - - - Top - - - - true - true - - - - - Nombre - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - P A G A R E con Folio - - - - =Parameters!Serie.Value - - - - - - - - - =Parameters!Folio.Value - - - - Por éste pagare prometo (emos) pagar incondicionalmente a la orden de ECLIPSE DEL NOROESTE SA DE CV, 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 ECLIPSE DEL NOROESTE SA DE CV 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 - - - - 0.29357cm - 0.08375cm - 0cm - 0.57653cm - 1 - - - - - - 0.29357cm - 0.71971cm - 0cm - 0.57653cm - 2 - - - - - - 0.29357cm - 1.35545cm - 0cm - 0.57653cm - 3 - - - - - - 0.29357cm - 1.66152cm - 0cm - 0.57653cm - 4 - - - - - - 0.29357cm - 2.29748cm - 0cm - 0.57653cm - 5 - - - - - - 0.29357cm - 2.93322cm - 0cm - 0.57653cm - 6 - - - - - - 0.29357cm - 3.60266cm - 0cm - 0.57653cm - 7 - - - - - - 0.29357cm - 4.23862cm - 0cm - 0.57653cm - 8 - - - - - - 0.29357cm - 4.87436cm - 0cm - 0.57653cm - 9 - - - - - - 0.29357cm - 5.18043cm - 0cm - 0.57653cm - 10 - - - - - - 0.29357cm - 5.81639cm - 0cm - 0.57653cm - 11 - - - - - - 0.29357cm - 6.45213cm - 0cm - 0.57653cm - 12 - - - - - - 0.29357cm - 7.13239cm - 0cm - 0.57653cm - 13 - - - - - - 0.29357cm - 7.76835cm - 0cm - 0.57653cm - 14 - - - - - - 0.29357cm - 8.40409cm - 0cm - 0.57653cm - 15 - - - - - - 0.29357cm - 8.71016cm - 0cm - 0.57653cm - 16 - - - - - - 0.29357cm - 9.34612cm - 0cm - 0.57653cm - 17 - - - - - - 0.29357cm - 9.98186cm - 0cm - 0.57653cm - 18 - - - - - - 0.29357cm - 14.06281cm - 0cm - 0.57653cm - 19 - - - - - - 0.29357cm - 14.69877cm - 0cm - 0.57653cm - 20 - - - - - - 0.29357cm - 15.33451cm - 0cm - 0.57653cm - 21 - - - - - - 0.29357cm - 15.64058cm - 0cm - 0.57653cm - 22 - - - - - - 0.29357cm - 16.27654cm - 0cm - 0.57653cm - 23 - - - - - - 0.29357cm - 16.91228cm - 0cm - 0.57653cm - 24 - - - - - - 0.29357cm - 10.60588cm - 0cm - 0.57653cm - 25 - - - - - - 0.29357cm - 11.24184cm - 0cm - 0.57653cm - 26 - - - - - - 0.29357cm - 11.87758cm - 0cm - 0.57653cm - 27 - - - - - - 0.29357cm - 12.18365cm - 0cm - 0.57653cm - 28 - - - - - - 0.29357cm - 12.81961cm - 0cm - 0.57653cm - 29 - - - - - - 0.29357cm - 13.45535cm - 0cm - 0.57653cm - 30 - - - - - - 0.29357cm - 18.40663cm - 0cm - 0.57653cm - 31 - - - - - - 0.29357cm - 19.04259cm - 0cm - 0.57653cm - 32 - - - - - - 0.29357cm - 17.74353cm - 0cm - 0.57653cm - 33 - - - - - - true - 21.48868cm - 0.0208cm - 2.10099cm - 20.06179cm - 12 - - = (Parameters!AplicaPagare.Value="0" OrElse Parameters!AplicaPagare.Value="") - - - - - - - - - - 1.27365cm - - - 1.78562cm - - - 2.0584cm - - - 4.44265cm - - - 6.28682cm - - - 1.6882cm - - - 2.43574cm - - - - - 0.52063cm - - - - - true - - - - - Cant. - - - - - - - Textbox34 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad SAT - - - - - - - Textbox2 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Producto SAT - - - - - - - Textbox25 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Descripción - - - - - - - Textbox79 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox1 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - P. Unitario - - - - - - - Textbox84 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - Importe - - - - - - - - - - - - - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.57355cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SATClaveUM.Value - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SATClaveProdServ.Value - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =IIF(Fields!PS.Value="-" OrElse Fields!PS.Value="." OrElse Fields!PS.Value="=" OrElse Fields!PS.Value="--" OrElse Fields!PS.Value="---" OrElse Fields!PS.Value=".." OrElse Fields!PS.Value="/" ,"" & Fields!Obs.Value,Fields!PS.Value & " " & Fields!Obs.Value) - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU1 - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value*Fields!PU.Value - - - - - - - Textbox88 - - - - - - - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - 4.44265cm - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Titulo.Value - - - - - - - - - - - - - - - - - - __________________________________ - - - - - - - - - =Fields!Nombre.Value - - - - - - - - - =Fields!Puesto.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - true - DataSet2 - 1 - - - - - - - - - - - - - 6.28682cm - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Titulo.Value - - - - - - - - - - - - - - - - - - __________________________________ - - - - - - - - - =Fields!Nombre.Value - - - - - - - - - =Fields!Puesto.Value - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - DataSet2 - 2 - - - - - - - - - - true - true - - - - - - - - - - 1pt - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - After - - - - - =Fields!PS.Value Is Nothing - - - - Before - - - Before - - - - DsOC - 4.14415cm - 0.11516cm - 2.29418cm - 19.97108cm - 13 - - - - - - true - - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - External - =Parameters!QR.Value - FitProportional - 0.03128in - 1.3497in - 1.5531in - - - - - - true - true - - - - - Folio Fiscal: - - - - - - - Textbox54 - 0.00077in - 1.63514in - 0.18056in - 4.03672in - 1 - - - - - - - White - - - - - - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. Serie del Certificado del SAT: - - - - - - - Textbox54 - 0.19522in - 1.63514in - 0.18056in - 4.03672in - 2 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha y Hora de certificación: - - - - - - - Textbox54 - 0.39377in - 1.63514in - 0.19444in - 4.03672in - 3 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Certificado del Contribuyente: - - - - - - - Textbox54 - 0.59938in - 1.63514in - 0.19445in - 4.03672in - 4 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaCertificacion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CertificadoContribuyente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales 601; Método de Pago: - - - - =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado", iif( Parameters!MetodoPago.Value = "PUE-Pago en una sola exhibición","PUE","PPD")) - - - - ; Num. Cta Pago: - - - - =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Éste documento es una representacion impresa de un CFDi - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 13.45121cm - 0.04257cm - 3.74574cm - 20.109cm - 15 - - - - - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.57553cm - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - - - - - - - - - - - - =Fields!ImpuestoLocal.Value - - - - 2.45694cm - - - true - true - - - - - =Fields!ImpuestoLocal.Value - - - - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - DataSet1 - 0.04588cm - 14.93861cm - 0.6cm - 5.03247cm - 1 - - - - - - - - - 3.74028cm - - - 11.08915cm - - - - - 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 - - #c4d79b - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - ="SON: " & Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - - - - Textbox127 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Forma de pago: - - - - - - - Textbox130 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #c4d79b - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FormaPago.Value - - - - - - - Textbox131 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Uso CFDI: - - - - - - - Textbox27 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #c4d79b - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!UsoCFDI.Value - - - - - - - Textbox37 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.8cm - - - - - true - true - - - - - Sello digital del CFDI: - - - - - - - Textbox132 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #c4d79b - 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 - - #c4d79b - 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 - - #c4d79b - Middle - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - DsOC - 0.04588cm - 0.03862cm - 6cm - 14.82943cm - 2 - - - - - - - - - 0.74104in - - - 0.57756in - - - 0.67516in - - - - - 0.19645in - - - - - true - true - - - - - Impuesto - - - - - - - Textbox22 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Tasa - - - - - - - Textbox15 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox29 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.14436in - - - - - true - true - - - - - =Fields!Impuesto.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!tasa.Value - - - - - - - UM - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Codigo - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet3 - 0.26817in - 5.86887in - 0.34081in - 1.99376in - 3 - - - - - - true - 6.61207cm - 0.11516cm - 6.80033cm - 20.03641cm - 16 - - - - - - true - true - - - - - Moneda - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - CFDI Relacionados - - - - - - - Textbox5 - 0.11382cm - 0.05336cm - 0.54004cm - 20.00281cm - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo Relación: - - - - - - - Textbox29 - 0.83025cm - 4.33636cm - 0.41981cm - 5.31841cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.42456cm - - - 2.05585cm - - - 3.03631cm - - - 7.7847cm - - - - - 0.44125cm - - - - - true - true - - - - - Folio - - - - - - - Textbox10 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox21 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox11 - - - #c4d79b - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.41479cm - - - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet4 - 1.39643cm - 2.83462cm - 0.85604cm - 15.30142cm - 3 - - - - - - true - true - - - - - VERSION 3.3 - - - - - - - Textbox5 - 2.28775cm - 17.08931cm - 0.6cm - 3.06609cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 17.21106cm - 0.00547cm - 2.97096cm - 20.1554cm - 18 - - =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) - - - - - - - 23.58967cm - - - - - - - Textbox3 - 0.14111cm - 16.12728cm - 0.6cm - 3.95896cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 0.5cm - 1.27cm - + + + + + + Textbox3 + 0.90692in + 5.662in + 0.5cm + 2.24597in + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha y hora de emisión + + + + + + + + + + + + + + + + Textbox3 + 0.46414in + 5.662in + 0.5cm + 2.24597in + 1 + + + #c4d79b + 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 + + + + + =Parameters!TipoDocumento.Value + + + + + + + Textbox3 + 0.0412cm + 5.662in + 0.5cm + 2.24597in + 3 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + ECLIPSE DEL NOROESTE SA DE CV + + + + + + + + + R.F.C ENO970305TL4 + + + + + + + + + + + + + + + + Textbox4 + 1.7536in + 0.59155in + 3.86673in + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + Logo2 + FitProportional + 0.2705cm + 0.03093cm + 2.47832cm + 4.42323cm + 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 + + + + + + + + + Camelia, #346, Col.:Luis Encinas, + + + + + + + + + C.P. 83138 Hermosillo, + + + + + + + + + Sonora, México Tel.: (662) 14-6826 + + + + + + + Textbox10 + 0.51102in + 1.7536in + 0.65513in + 2.01842in + 8 + + true + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + LUGAR DE EXPEDICIÓN: + + + + + + + + + + + + + 83140 + + + + + + + Textbox10 + 0.51102in + 3.77202in + 0.65513in + 1.88998in + 9 + + + Top + + + + true + true + + + + + Nombre + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + P A G A R E con Folio + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + Por éste pagare prometo (emos) pagar incondicionalmente a la orden de ECLIPSE DEL NOROESTE SA DE CV, 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 ECLIPSE DEL NOROESTE SA DE CV 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 + + + + 0.29357cm + 0.08375cm + 0cm + 0.57653cm + 1 + + + + + + 0.29357cm + 0.71971cm + 0cm + 0.57653cm + 2 + + + + + + 0.29357cm + 1.35545cm + 0cm + 0.57653cm + 3 + + + + + + 0.29357cm + 1.66152cm + 0cm + 0.57653cm + 4 + + + + + + 0.29357cm + 2.29748cm + 0cm + 0.57653cm + 5 + + + + + + 0.29357cm + 2.93322cm + 0cm + 0.57653cm + 6 + + + + + + 0.29357cm + 3.60266cm + 0cm + 0.57653cm + 7 + + + + + + 0.29357cm + 4.23862cm + 0cm + 0.57653cm + 8 + + + + + + 0.29357cm + 4.87436cm + 0cm + 0.57653cm + 9 + + + + + + 0.29357cm + 5.18043cm + 0cm + 0.57653cm + 10 + + + + + + 0.29357cm + 5.81639cm + 0cm + 0.57653cm + 11 + + + + + + 0.29357cm + 6.45213cm + 0cm + 0.57653cm + 12 + + + + + + 0.29357cm + 7.13239cm + 0cm + 0.57653cm + 13 + + + + + + 0.29357cm + 7.76835cm + 0cm + 0.57653cm + 14 + + + + + + 0.29357cm + 8.40409cm + 0cm + 0.57653cm + 15 + + + + + + 0.29357cm + 8.71016cm + 0cm + 0.57653cm + 16 + + + + + + 0.29357cm + 9.34612cm + 0cm + 0.57653cm + 17 + + + + + + 0.29357cm + 9.98186cm + 0cm + 0.57653cm + 18 + + + + + + 0.29357cm + 14.06281cm + 0cm + 0.57653cm + 19 + + + + + + 0.29357cm + 14.69877cm + 0cm + 0.57653cm + 20 + + + + + + 0.29357cm + 15.33451cm + 0cm + 0.57653cm + 21 + + + + + + 0.29357cm + 15.64058cm + 0cm + 0.57653cm + 22 + + + + + + 0.29357cm + 16.27654cm + 0cm + 0.57653cm + 23 + + + + + + 0.29357cm + 16.91228cm + 0cm + 0.57653cm + 24 + + + + + + 0.29357cm + 10.60588cm + 0cm + 0.57653cm + 25 + + + + + + 0.29357cm + 11.24184cm + 0cm + 0.57653cm + 26 + + + + + + 0.29357cm + 11.87758cm + 0cm + 0.57653cm + 27 + + + + + + 0.29357cm + 12.18365cm + 0cm + 0.57653cm + 28 + + + + + + 0.29357cm + 12.81961cm + 0cm + 0.57653cm + 29 + + + + + + 0.29357cm + 13.45535cm + 0cm + 0.57653cm + 30 + + + + + + 0.29357cm + 18.40663cm + 0cm + 0.57653cm + 31 + + + + + + 0.29357cm + 19.04259cm + 0cm + 0.57653cm + 32 + + + + + + 0.29357cm + 17.74353cm + 0cm + 0.57653cm + 33 + + + + + + true + 21.48868cm + 0.0208cm + 2.10099cm + 20.06179cm + 12 + + = (Parameters!AplicaPagare.Value="0" OrElse Parameters!AplicaPagare.Value="") + + + + + + + + + + 1.27365cm + + + 1.78562cm + + + 2.0584cm + + + 4.44265cm + + + 6.28682cm + + + 1.6882cm + + + 2.43574cm + + + + + 0.52063cm + + + + + true + + + + + Cant. + + + + + + + Textbox34 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad SAT + + + + + + + Textbox2 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Producto SAT + + + + + + + Textbox25 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Descripción + + + + + + + Textbox79 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox1 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + P. Unitario + + + + + + + Textbox84 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + Importe + + + + + + + + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.57355cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveUM.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =IIF(Fields!PS.Value="-" OrElse Fields!PS.Value="." OrElse Fields!PS.Value="=" OrElse Fields!PS.Value="--" OrElse Fields!PS.Value="---" OrElse Fields!PS.Value=".." OrElse Fields!PS.Value="/" ,"" & Fields!Obs.Value,Fields!PS.Value & " " & Fields!Obs.Value) + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU1 + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + Textbox88 + + + + + + + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 4.44265cm + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Titulo.Value + + + + + + + + + + + + + + + + + + __________________________________ + + + + + + + + + =Fields!Nombre.Value + + + + + + + + + =Fields!Puesto.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + true + DataSet2 + 1 + + + + + + + + + + + + + 6.28682cm + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Titulo.Value + + + + + + + + + + + + + + + + + + __________________________________ + + + + + + + + + =Fields!Nombre.Value + + + + + + + + + =Fields!Puesto.Value + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + DataSet2 + 2 + + + + + + + + + + true + true + + + + + + + + + + 1pt + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + After + + + + + =Fields!PS.Value Is Nothing + + + + Before + + + Before + + + + DsOC + 4.14415cm + 0.11516cm + 2.29418cm + 19.97108cm + 13 + + + + + + true + + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + External + =Parameters!QR.Value + FitProportional + 0.03128in + 1.3497in + 1.5531in + + + + + + true + true + + + + + Folio Fiscal: + + + + + + + Textbox54 + 0.00077in + 1.63514in + 0.18056in + 4.03672in + 1 + + + + + + + White + + + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Serie del Certificado del SAT: + + + + + + + Textbox54 + 0.19522in + 1.63514in + 0.18056in + 4.03672in + 2 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora de certificación: + + + + + + + Textbox54 + 0.39377in + 1.63514in + 0.19444in + 4.03672in + 3 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Certificado del Contribuyente: + + + + + + + Textbox54 + 0.59938in + 1.63514in + 0.19445in + 4.03672in + 4 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaCertificacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CertificadoContribuyente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen General de Ley Personas Morales 601; Método de Pago: + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado", iif( Parameters!MetodoPago.Value = "PUE-Pago en una sola exhibición","PUE","PPD")) + + + + ; Num. Cta Pago: + + + + =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Éste documento es una representacion impresa de un CFDi + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 13.45121cm + 0.04257cm + 3.74574cm + 20.109cm + 15 + + + + + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.57553cm + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.45694cm + + + true + true + + + + + =Fields!ImpuestoLocal.Value + + + + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 0.04588cm + 14.93861cm + 0.6cm + 5.03247cm + 1 + + + + + + + + + 3.74028cm + + + 11.08915cm + + + + + 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 + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + ="SON: " & Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + + + + Textbox127 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Forma de pago: + + + + + + + Textbox130 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + + Textbox131 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + + + true + true + + + + + Uso CFDI: + + + + + + + Textbox27 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!UsoCFDI.Value + + + + + + + Textbox37 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1.8cm + + + + + true + true + + + + + Sello digital del CFDI: + + + + + + + Textbox132 + + + + + 1pt + + + + 1pt + + + + 1pt + + + + 1pt + + #c4d79b + 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 + + #c4d79b + 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 + + #c4d79b + Middle + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + DsOC + 0.04588cm + 0.03862cm + 6cm + 14.82943cm + 2 + + + + + + + + + 0.74104in + + + 0.57756in + + + 0.67516in + + + + + 0.19645in + + + + + true + true + + + + + Impuesto + + + + + + + Textbox22 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tasa + + + + + + + Textbox15 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox29 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.14436in + + + + + true + true + + + + + =Fields!Impuesto.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!tasa.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet3 + 0.26817in + 5.86887in + 0.34081in + 1.99376in + 3 + + + + + + true + 6.61207cm + 0.11516cm + 6.80033cm + 20.03641cm + 16 + + + + + + true + true + + + + + Moneda + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 0.11382cm + 0.05336cm + 0.54004cm + 20.00281cm + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 0.83025cm + 4.33636cm + 0.41981cm + 5.31841cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.42456cm + + + 2.05585cm + + + 3.03631cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox21 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + #c4d79b + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 1.39643cm + 2.83462cm + 0.85604cm + 15.30142cm + 3 + + + + + + true + true + + + + + VERSION 3.3 + + + + + + + Textbox5 + 2.28775cm + 17.08931cm + 0.6cm + 3.06609cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 17.21106cm + 0.00547cm + 2.97096cm + 20.1554cm + 18 + + =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) + + + + + + + 23.58967cm + + + + + + + Textbox3 + 0.14111cm + 16.12728cm + 0.6cm + 3.95896cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + + + + + + + Textbox3 + Tablix2 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Textbox2 + Tablix2 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SubCuenta + + + + + + + Textbox22 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tipo Cuenta + + + + + + + Textbox20 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cta Mayor + + + + + + + Textbox18 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Agrupador SAT + + + + + + + Textbox16 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + + Textbox14 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Dig Agrup + + + + + + + Textbox7 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nom. Ingles + + + + + + + Textbox1 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Concepto + + + + + + + Textbox24 + + + + Black + + + Black + + + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.52063cm + + + + + true + true + + + + + =Fields!CuentaFormato.Value + + + + + + + CuentaFormato + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Nombre.Value + + + + + + + Nombre + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CuentaFormato.Value + + + + + + + CuentaFormato1 + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Switch(Fields!Tipo.Value = "A","Activo Deudora", Fields!Tipo.Value = "B","Activo Acreedora", Fields!Tipo.Value = "C","Pasivo Deudora", Fields!Tipo.Value = "D","Pasivo Acreedora", Fields!Tipo.Value = "E","Capital Deudora", Fields!Tipo.Value = "F","Capital Acreedora", Fields!Tipo.Value = "G","Resultados Deudora", Fields!Tipo.Value = "H","Resultados Acreedora", Fields!Tipo.Value = "I","Estadisticas Deudora", Fields!Tipo.Value = "J","Estadisticas Acredora", Fields!Tipo.Value = "K","Orden Deudora", Fields!Tipo.Value = "L","Orden Acreedora") + + + + + + + Tipo + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Switch(Fields!CtaMayor.Value = "1", "Mayor", Fields!CtaMayor.Value = "2", "No", Fields!CtaMayor.Value = "3", "Titulo", Fields!CtaMayor.Value = "4", "SubTitulo") + + + + + + + CtaMayor + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AgrupadorSAT.Value + + + + + + + AgrupadorSAT + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Moneda.Value + + + + + + + Moneda + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!DigAgrup.Value + + + + + + + DigAgrup + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!NomIdioma.Value + + + + + + + NomIdioma + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ConceptoContable.Value + + + + + + + ConceptoContable + + + =iif((RunningValue(CountDistinct(Fields!Codigo.Value), Sum, "DataSet1") mod 2) = 0, "LightSteelBlue", "White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + true + After + true + + + + + + + true + true + DataSet1 + 0.98834cm + 24.33863cm + + + + + + 0.38911in + + true @@ -1610,7 +1611,49 @@ ReportParameter1 - + + + 2 + 4 + + + 0 + 0 + NombreEmpresa + + + 1 + 0 + FechaInicio + + + 0 + 1 + FechaFin + + + 1 + 1 + UsuarioImprimio + + + 0 + 2 + LogoPath + + + 1 + 2 + Filtros + + + 0 + 3 + FechaImprimio + + + + Cm 40c94aad-a12a-44fb-ab0d-ea36a9656792 \ No newline at end of file From e9b8b6925181d955511d8eef92b37dbdc20f4ca2 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 7 May 2021 10:29:09 -0700 Subject: [PATCH 18/47] aplica anticipos pagados E72,E80 --- App_Code/ClsMovimientos.vb | 11 ++++++----- CxC/RepCxC.aspx | 3 +++ CxC/RepCxC.aspx.vb | 5 ++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index a382bb7e6..35896829d 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -241,7 +241,7 @@ Public Class ClsMovimientos Gpo As Integer, CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, - Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean + Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -273,7 +273,8 @@ Public Class ClsMovimientos .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion - .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente + .Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados End With Try @@ -324,7 +325,7 @@ Public Class ClsMovimientos CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1, - Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1) As Boolean + Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -364,8 +365,8 @@ Public Class ClsMovimientos .Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito .Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda - .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente - + .Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente + .Add("@AplicaAnticiposPagados", SqlDbType.Int).Value = AplicaAnticiposPagados End With Try diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx index 82e7afba0..374b50382 100644 --- a/CxC/RepCxC.aspx +++ b/CxC/RepCxC.aspx @@ -335,6 +335,9 @@ +
+ +
diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index f049dfde1..e625f98bc 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -105,6 +105,7 @@ Partial Class RepCxC CargaCombos() CargaGvPersonalizarRaqngoColumnas() CargaDatos() + If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then ChkAnticipos.visible = True ActivaEnviarEstadoCuenta() If UsuarioActual.CveRol = 1 Or UsuarioActual.TienePermisoProceso(243) Then LnkDescargarSegmentos.Visible = True CreaDataTableColor() @@ -195,12 +196,14 @@ Partial Class RepCxC CveCobranzaEstatus = DdlCobranzaEstatus.SelectedValue.ToEntero CveClienteClasificacion = DdlClienteClasificacion.SelectedValue.ToEntero Dim CveCliente = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1) + Dim AplicaAnticipos As Integer = If(ChkAnticipos.checked, 1, 0) + If ObjMovtos.GetCxC(FechaI, FechaF, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, - TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then + TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=AplicaAnticipos) Then GvDatos.DataSource = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados From de902db308bd1fe1596d837cb731320ef79ba088 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 7 May 2021 10:29:25 -0700 Subject: [PATCH 19/47] - considera ocultar imgE --- Contratos/ContratoObra.aspx.vb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 8573e6e37..9826998e5 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -1679,9 +1679,9 @@ Partial Class Contratos_ContratoObra If e.Row.DBCampo("PermitirEstimacion").ToString = "1" Then ' e.Row.FCCheckBox("CHKPEstimacion").Checked = True End If - If Autorizado Then - e.Row.FCLinkButton("imgE").Visible = False - e.Row.FCLinkButton("imgD").Visible = False + If Autorizado Then + ' e.Row.FCLinkButton("imgE").Visible = False + 'e.Row.FCLinkButton("imgD").Visible = False End If If CveTipoContrato = 25 Then e.Row.Cells(1).Width = Unit.Pixel(10) @@ -2044,8 +2044,8 @@ Partial Class Contratos_ContratoObra ' e.Row.FCCheckBox("CHKPEstimacion").Checked = True End If If Autorizado Then - e.Row.FCLinkButton("imgE").Visible = False - e.Row.FCLinkButton("imgD").Visible = False + 'e.Row.FCLinkButton("imgE").Visible = False + 'e.Row.FCLinkButton("imgD").Visible = False End If End If From 21559c432aeca8ab42f51d85fbc5778ddf4849e3 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 7 May 2021 18:23:28 -0700 Subject: [PATCH 20/47] =?UTF-8?q?--=20correcci=C3=B3n=20de=20foliopoliza?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad/RegPrePolizaS.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index a26732099..c98118d5c 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -735,8 +735,8 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CvePersonal") = drt("CvePersonal") dr("CveClasificacion") = -1 dr("MultipleSubProyecto") = drt("MultipleSubProyecto") - dr("FolioPoliza") = drt("FolioPoliza") - + 'dr("FolioPoliza") = 0 'drt("FolioPoliza") + DtMovimientos.Rows.Add(dr) Next From 81f31130d993bc7f53deaa62efcb8a431c7d3093 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 7 May 2021 21:52:56 -0700 Subject: [PATCH 21/47] ClsAF CveCliente duplciado en parametros RepLicencias --- App_Code/ClsAF.vb | 2 +- Contratos/FacturacionMasiva.aspx.vb | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index 8c9c1da2b..cd7bbc863 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -2604,7 +2604,7 @@ Public Class ClsAF .Add("@FechaVF", SqlDbType.DateTime).Value = FechaVF .Add("@CveDispositivo", SqlDbType.Int).Value = CveDispositivo .Add("@CveCliente", SqlDbType.Int).Value = CveCliente - .Add("@CveCliente", SqlDbType.Int).Value = Estatus + .Add("@Estatus", SqlDbType.Int).Value = Estatus End With Try SqlAdapter.Fill(Data) diff --git a/Contratos/FacturacionMasiva.aspx.vb b/Contratos/FacturacionMasiva.aspx.vb index 7e2e5216f..8deac32ec 100644 --- a/Contratos/FacturacionMasiva.aspx.vb +++ b/Contratos/FacturacionMasiva.aspx.vb @@ -566,16 +566,21 @@ Partial Class Contratos_FacturacionMasiva DtR("Cantidad") = row("CantidadContratada") DtR("CveUM") = row("CveUM") DtR("UM") = row("UM") - DtR("SATClaveUM") = row("SATClaveUnidadMedida") + + DtR("SATClaveUM") = row("SATClaveUM") DtR("CveClasificacion") = row("CveClasificacion") DtR("Clasificacion") = row("Clasificacion") DtR("CvePS") = row("CvePS") DtR("PS") = row("PS") DtR("CodigoPS") = row("CodigoPS") - DtR("SATClaveProdServ") = row("SATClavePS") + + DtR("SATClaveProdServ") = row("SATClaveProdServ") + DtR("NoIdentificacion") = row("NoIdentificacion") + DtR("CveTipoPS") = drPS("CveTipoPS") DtR("CveTipoInvPS") = drPS("Inv_CveMetodoInventario") + DtR("Obs") = TxtObservaciones.Text + " " + row("Observacion").ToString DtR("PU") = row("PU") DtR("IVA") = row("PorcentajeIVA") From 7d9aca44f00383f67c8463262ba9d547acfea9ed Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 8 May 2021 06:06:46 -0700 Subject: [PATCH 22/47] -- cambios de cobro-intermediarios izettle --- Bancos/DepositosCaja.aspx | 39 +++++++++++++++++++------ Bancos/DepositosCaja.aspx.vb | 55 +++++++++++++++++++++++++++--------- 2 files changed, 73 insertions(+), 21 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 445f02eb9..5f0713e77 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -144,10 +144,7 @@ - + + + +
+
+ +
+
+ +
+
+ + + +
+
+ + +
+
+ + +
+
+ + + + +
+
- - - - +
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index b245a4e7d..9e9a43dcb 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -46,19 +46,31 @@ Partial Class Bancos_DepositosCaja DdlSubProyectoDeposito.DataSource = DdlSubProyectos.DataSource DdlSubProyectoDeposito.DataBind() - DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlSubProyectoDeposito.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubProyectoDescuento.DataSource = DdlSubProyectos.DataSource DdlSubProyectoDescuento.DataBind() - DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlSubProyectoDescuento.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2) DdlClasificacion.DataBind() - DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlClasificacion.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlClasificacionDescuento.DataSource = DdlClasificacion.DataSource DdlClasificacionDescuento.DataBind() - DdlSubProyectos.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlClasificacionDescuento.Items.Insert(0, New ListItem("Seleccione", "-1")) + + 'intermediario + DdlProveedorIntermediario.datasource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveProveedor in ({0})", 73343)) + DdlProveedorIntermediario.databind + + DdlClasifIntermediario.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2) + DdlClasifIntermediario.DataBind() + + + DdlSubProyectoIntermediario.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) + DdlSubProyectoIntermediario.DataBind() + End Sub @@ -134,8 +146,11 @@ Partial Class Bancos_DepositosCaja Dim CveSubProyectoDescuento As Integer = -1 Dim CveClasificacion As Integer = -1 Dim CveClasificacionDescuento As Integer = -1 - Dim documentos As String = "Los Depósitos se realizaron exitósamente

" + Dim documentos As String = "Los Depósitos se realizaron exitosamente

" Dim imprimirFolios As String = "" + Dim CveSubProyectoIntermediario As Integer = -1 + Dim CveClasificacionIntermediario As Integer = -1 + If drOrigen IsNot Nothing Then CveMoneda = drOrigen("CveMoneda").ToString.ToEntero IdCuentaBancariaOrigen = drOrigen("IdCtaContable").ToString.ToEntero @@ -172,13 +187,6 @@ Partial Class Bancos_DepositosCaja End If - If IVA <> 0 Then - IVA = CDec(0.16) - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, IVA, DdlClasificacion.SelectedItem.Text, 14, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then - OcurrioError = True - End If - End If - End If If ChkDescuento.Checked Then @@ -189,6 +197,24 @@ Partial Class Bancos_DepositosCaja OcurrioError = True End If End If + + If 1 = 1 Then + + CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero + CveSubProyectoIntermediario = DdlClasificacionIntermediario.SelectedValue.ToEntero + + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + OcurrioError = True + End If + + If IVA <> 0 Then + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, DdlClasificacionIntermediario.SelectedItem.Text, 14, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, ImporteMX:=IVA, CveCuenta:=CveCuentaBancariaOrigen, PorcentajeImpuesto:=0.16D) Then + OcurrioError = True + End If + End If + + End If + Else OcurrioError = True End If @@ -210,17 +236,20 @@ Partial Class Bancos_DepositosCaja FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2) If Not FolioIE > 0 Then OcurrioError = True + Exit For End If CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then OcurrioError = True + Exit For End If 'Asignamos la cuenta Deposito - If Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then + If Not OcurrioError AndAlso Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEDestino, CveIE) Then OcurrioError = True + Exit For End If Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") From 690d0d56f1e65e8a4eb5681171738fcf4d3c34cd Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Sat, 8 May 2021 12:25:45 -0700 Subject: [PATCH 23/47] --- Bancos/DepositosCaja.aspx | 162 +++++++++++++++++++++++++---------- Bancos/DepositosCaja.aspx.vb | 81 +++++++++++++----- 2 files changed, 176 insertions(+), 67 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 445f02eb9..f84f1a279 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -136,7 +136,7 @@
-
+
@@ -144,10 +144,7 @@
- + - -
+
@@ -164,7 +164,7 @@
-
+
@@ -189,7 +189,7 @@
-
+
From fce3c2c6200d2e09549ba0183be5144dcbf16d47 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 11 May 2021 10:51:58 -0700 Subject: [PATCH 29/47] -- regnerar prepoliza, quitar cveempresa119 --- Compras/Compras.aspx.vb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 2c8b5f753..a1754b4d9 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -10586,7 +10586,6 @@ Partial Class Compras_Compras If ObjConta.GetRetCuenta(49, Row2("CveActivoFijo").ToString.ToEntero) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijo").ToString.ToEntero - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContActivoFijoSIG").ToString.ToEntero End If End If @@ -10626,7 +10625,6 @@ Partial Class Compras_Compras If ObjConta.GetRetCuenta(68, GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToString.ToEntero) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero End If End If If importeMovimiento <> 0 Then @@ -10709,7 +10707,7 @@ Partial Class Compras_Compras DtAlmacenes.Dispose() 'QUITA 1-[MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA)] 2-[NC CON PRODUCTOS] - If UsuarioActual.CveEmpresa.Contiene(119) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then + If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then DT = DT.FiltraParametros("CveTipoPS <> 2") End If @@ -10736,10 +10734,8 @@ Partial Class Compras_Compras If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaGastoSIG").ToString.ToEntero Else IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero - CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero End If End If End If From cdeb36f3d1d3bd1214f7436d8ca49ae30ad40fe7 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 11 May 2021 10:52:48 -0700 Subject: [PATCH 30/47] - rowdatabound, que se inserte en subporyectos y tipogastos, valor "-" --- Contabilidad/RegPrePoliza.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 5ada370a1..995cf219e 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -517,13 +517,13 @@ Partial Class ContabilidadC_RegPrePoliza 'Asignamos los Subproyectos e.Row.FCDropDownList("DdlSubProyecto").DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) e.Row.FCDropDownList("DdlSubProyecto").DataBind() - 'e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1")) + e.Row.FCDropDownList("DdlSubProyecto").Items.Insert(0, New ListItem(" - ", "-1")) e.Row.FCDropDownList("DdlSubProyecto").SelectedValueExist(e.Row.DataKey("CveSubProyecto")) 'Asignamos los Tipos de Gasto e.Row.FCDropDownList("DdlTipoGasto").DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa) e.Row.FCDropDownList("DdlTipoGasto").DataBind() - 'e.Row.FCDropDownList("DdlTipoGasto").Items.Insert(0, New ListItem("Sin Asignar", "-1")) + e.Row.FCDropDownList("DdlTipoGasto").Items.Insert(0, New ListItem("Sin Asignar", "-1")) e.Row.FCDropDownList("DdlTipoGasto").SelectedValueExist(e.Row.DataKey("CveTipoGasto")) 'ASignamos las CuentasContables From 365f7b4cd0f5d1db311dc9e09ae3958ba1a170b2 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Wed, 12 May 2021 12:09:49 -0700 Subject: [PATCH 31/47] Agregar el filtro de cliente y el movimiento del almacen --- Acumuladores/RepEntradasUsadosClientes.aspx | 10 +++++++--- Acumuladores/RepEntradasUsadosClientes.aspx.vb | 12 ++++++++---- App_Code/ClsAcumuladores.vb | 4 +++- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx b/Acumuladores/RepEntradasUsadosClientes.aspx index 7b495acc8..d5b839932 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx +++ b/Acumuladores/RepEntradasUsadosClientes.aspx @@ -66,7 +66,10 @@
- +
Cliente:
+
+ +
@@ -124,9 +127,10 @@ - + + - + diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb index e83cfdea4..25e180f3d 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb +++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb @@ -19,6 +19,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes If Not Page.IsPostBack Then CargaCombos() + CargaNombreClientes() End If End Sub @@ -26,8 +27,11 @@ Partial Class Acumuladores_RepEntradasUsadosClientes Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click CargaDatos() + End Sub + Private Sub CargaNombreClientes() + DdlNombre.setEsWebService(True) + DdlNombre.Attributes.Add("data-metodo", "getcliente") End Sub - Public Sub CargaCombos() DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 22) DdlAlmacen.DataBind() @@ -44,11 +48,11 @@ Partial Class Acumuladores_RepEntradasUsadosClientes FechaI = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim.todate, minfecha) FechaF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.Text.Trim.todate, maxfecha) - Dim CveAlmacen As Integer = If(DdlAlmacen.SelectedValue = "", "-1", DdlAlmacen.SelectedValue).ToString.toentero - + Dim CveAlmacen As Integer = If(DdlAlmacen.SelectedValue = "", "-1", DdlAlmacen.SelectedValue).ToString.ToEntero + Dim CveCliente As Integer = If(DdlNombre.SelectedValue = "", "-1", DdlNombre.SelectedValue).ToString.ToEntero Dim Acum As New ClsAcumuladores - If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCliente) Then GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") End If diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index a52ab1a98..365c14035 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -1076,7 +1076,7 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function EntradasUsadosClientesRep(CveAlmacen As Integer, FechaI As Date, FechaF As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function EntradasUsadosClientesRep(CveAlmacen As Integer, FechaI As Date, FechaF As Date, CveUsuario As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1) As Boolean Dim Retorno As Boolean = False 'Data = New DataTable @@ -1088,6 +1088,8 @@ Public Class ClsAcumuladores .Add("@FechaFin", SqlDbType.Date).Value = FechaF .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + End With Try From 92ee2c921879884b2f2fb0d4421c597c5ef9475d Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Wed, 12 May 2021 21:26:50 -0700 Subject: [PATCH 32/47] --- App_Code/ClsPaginas.vb | 1 - App_Code/ClsSucursales.vb | 383 ++ Compras/RepComprasAFDetalle.aspx.vb | 12 +- Contabilidad/FiltraPolizas.aspx.vb | 20 +- Contabilidad/RegPrePoliza.aspx | 3 + Contabilidad/RegPrePoliza.aspx.vb | 96 +- Contabilidad/RegPrePolizaS.aspx | 11 +- Contabilidad/RegPrePolizaS.aspx.vb | 14 +- .../Grales/Formatos/ClienteHistorial.rdlc | 3240 +++++++++-------- Empresas/Grales/Formatos/Cuentas.rdlc | 14 +- .../Grales/Formatos/RepComprasAFDetalle.rdlc | 1765 ++++----- Ventas/Clientes.aspx | 2 +- Ventas/Clientes.aspx.vb | 4 + 13 files changed, 3046 insertions(+), 2519 deletions(-) create mode 100644 App_Code/ClsSucursales.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 4c4d73133..ccb61fddf 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4802,7 +4802,6 @@ Public Class ClsPaginas #End Region #Region "Planeacion" 'PLANEACIÓN - PaginaDict.Add("/Planeacion/CatSucursales.aspx".ToUpper(), 17) PaginaDict.Add("/Planeacion/Sucursal.aspx".ToUpper(), 17) PaginaDict.Add("/Planeacion/CatProyectos.aspx".ToUpper(), 34) PaginaDict.Add("/Planeacion/CatSubProyectos.aspx".ToUpper(), 35) diff --git a/App_Code/ClsSucursales.vb b/App_Code/ClsSucursales.vb new file mode 100644 index 000000000..b7d3f0f00 --- /dev/null +++ b/App_Code/ClsSucursales.vb @@ -0,0 +1,383 @@ +Option Explicit On +Option Strict On + +Imports System.Data +Imports System.Data.SqlClient +Imports Extensiones +Imports System +Imports System.Configuration + +Public Class ClsSucursales + Implements IDisposable + +#Region "Campos" + + 'SQL + Private SqlConexion As SqlConnection + Private SqlAdapter As SqlDataAdapter + Private SqlTransacc As SqlTransaction + Private SqlCommand As SqlCommand + Private Data As DataTable + + Private disposedValue As Boolean = False + + 'Atributos de la clase + Private _Calle As String + Private _NoExt As String + Private _NoInt As String + Private _Colonia As String + Private _Localidad As String + Private _Municipio As String + Private _Estado As String + Private _Pais As String + Private _CP As Integer + 'PARA REGISTRAR CONEXION + Private CveConexion As Integer = 0 +#End Region + +#Region "Propiedades" + Public ReadOnly Property Calle As String + Get + Return _Calle + End Get + End Property + + Public ReadOnly Property NoExt As String + Get + Return _NoExt + End Get + End Property + + Public ReadOnly Property NoInt As String + Get + Return _NoInt + End Get + End Property + + Public ReadOnly Property Colonia As String + Get + Return _Colonia + End Get + End Property + + Public ReadOnly Property Localidad As String + Get + Return _Localidad + End Get + End Property + + Public ReadOnly Property Municipio As String + Get + Return _Municipio + End Get + End Property + + Public ReadOnly Property Estado As String + Get + Return _Estado + End Get + End Property + + Public ReadOnly Property Pais As String + Get + Return _Pais + End Get + End Property + + Public ReadOnly Property CP As Integer + Get + Return _CP + End Get + End Property + + Public ReadOnly Property DtResultados() As DataTable + Get + DtResultados = Data + End Get + End Property +#End Region + + Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) + + If TransaccionCompartida Is Nothing Then + SqlConexion = New SqlConnection + SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString + Try + SqlConexion.Open() + Catch ex As Exception + OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) + End Try + Else + SqlConexion = TransaccionCompartida.Connection + SqlTransacc = TransaccionCompartida + End If + + SqlCommand = New SqlCommand("", SqlConexion) + SqlAdapter = New SqlDataAdapter("", SqlConexion) + ConexionAdd() + End Sub + Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) + With SqlAdapter.SelectCommand + .Parameters.Clear() + .CommandText = StrSQL + .CommandType = TipoComando + End With + If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc + Data = New DataTable + End Sub +#Region "Conexiones" + + Private Sub ConexionAdd() + If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + + Try + 'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo + DataAdapter("PA_Sis_RegistrarConexion") + With SqlAdapter.SelectCommand.Parameters + .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name + .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) + .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output + End With + SqlAdapter.Fill(Data) + CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero + Catch ex As Exception + OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + End If + End Sub + + Private Sub ConexionClose() + If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then + + DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) + Try + SqlAdapter.Fill(Data) + + Catch ex As Exception + OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + CveConexion = 0 + + End If + + End Sub +#End Region + Private Sub DataCommand(pStrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) + With SqlCommand + .Parameters.Clear() + .CommandText = pStrSQL + .CommandType = TipoComando + End With + + If Not SqlTransacc Is Nothing Then SqlCommand.Transaction = SqlTransacc + + End Sub + Public Function IniciaTransacSQL() As SqlTransaction + If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() + Return SqlTransacc + End Function + + Public Sub RollBack() + If SqlTransacc IsNot Nothing Then SqlTransacc.Rollback() + SqlTransacc = Nothing + End Sub + Public Sub Commit() + If SqlTransacc IsNot Nothing Then SqlTransacc.Commit() + SqlTransacc = Nothing + End Sub + + 'Public Function GetSucursalesEmpresa(CveEmpresa As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' Data = New DataTable + ' SqlAdapter = New SqlDataAdapter("PA_GetSucursalesEmpresa", SqlConexion) + ' SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure + + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' End With + + + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As SqlException + ' OnError("Ocurrió un error al consultar las Sucursales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + ' SqlAdapter.Dispose() + ' Return Retorno + 'End Function + + + + + Public Function GetSucursales(Optional CveEmpresa As Integer = -1) As Boolean + Dim Retorno As Boolean = False + Data = New DataTable + SqlAdapter = New SqlDataAdapter("PA_SucursalesGet", SqlConexion) + SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al consultar las Sucursales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + SqlAdapter.Dispose() + Return Retorno + End Function + + + + + Public Function AddSucursal(Sucursal As String, Serie As String, IVA As Double, FormatoFactura As String, CveUsuario As Integer, CveEmpresa As Integer, + Calle As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Municipio As String, Estado As String, Pais As String, CP As String, TipoSucursal As Integer) As Integer + Dim Retorno = -1 + + DataAdapter("PA_SucursalAdd") + + With SqlAdapter.SelectCommand.Parameters + .Add("@Sucursal", SqlDbType.VarChar).Value = Sucursal + .Add("@Serie", SqlDbType.VarChar).Value = Serie + .Add("@IVA", SqlDbType.Float).Value = IVA + .Add("@FormatoFactura", SqlDbType.VarChar).Value = FormatoFactura + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + + .Add("@Calle", SqlDbType.VarChar).Value = Calle + .Add("@NoExt", SqlDbType.VarChar).Value = NoExt + .Add("@NoInt", SqlDbType.VarChar).Value = NoInt + .Add("@Colonia", SqlDbType.VarChar).Value = Colonia + .Add("@Localidad", SqlDbType.VarChar).Value = Localidad + .Add("@Municipio", SqlDbType.VarChar).Value = Municipio + .Add("@Estado", SqlDbType.VarChar).Value = Estado + .Add("@Pais", SqlDbType.VarChar).Value = Pais + .Add("@CP", SqlDbType.VarChar).Value = CP + .Add("@TipoSucursal", SqlDbType.Int).Value = TipoSucursal + .Add("@pCveSucursal", SqlDbType.Int).Direction = ParameterDirection.Output + End With + + Try + SqlAdapter.Fill(Data) + Retorno = SqlAdapter.SelectCommand.Parameters("@pCveSucursal").Value.ToString.ToEntero + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 2627;") Then + Alert("Ya existe una Sucursal con el mismo nombre: " & Sucursal & ".", TipoMensaje.MsgAdvertencia) + Else + Me.OnError("Ocurrió un error al Guardar la Sucursal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + Catch ex As Exception + OnError("Ocurrió un error al Guardar la Sucursal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + SqlAdapter.Dispose() + Return Retorno + End Function + + Public Function UpdateSucursal(Sucursal As String, Serie As String, IVA As Double, FormatoFactura As String, Estatus As Boolean, CveUsuario As Integer, CveSucursal As Integer, + Calle As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Municipio As String, Estado As String, Pais As String, CP As String, TipoSucursal As Integer) As Boolean + Dim Retorno As Boolean = False + Data = New DataTable + SqlAdapter = New SqlDataAdapter("PA_SucursalUpdate", SqlConexion) + SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure + With SqlAdapter.SelectCommand.Parameters + .Add("@Sucursal", SqlDbType.VarChar).Value = Sucursal + .Add("@Serie", SqlDbType.VarChar).Value = Serie + .Add("@IVA", SqlDbType.Float).Value = IVA + .Add("@FormatoFactura", SqlDbType.VarChar).Value = FormatoFactura + .Add("@Estatus", SqlDbType.Bit).Value = If(Estatus, 1, 0) + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveSucursal", SqlDbType.Int).Value = CveSucursal + .Add("@Calle", SqlDbType.VarChar).Value = Calle + .Add("@NoExt", SqlDbType.VarChar).Value = NoExt + .Add("@NoInt", SqlDbType.VarChar).Value = NoInt + .Add("@Colonia", SqlDbType.VarChar).Value = Colonia + .Add("@Localidad", SqlDbType.VarChar).Value = Localidad + .Add("@Municipio", SqlDbType.VarChar).Value = Municipio + .Add("@Estado", SqlDbType.VarChar).Value = Estado + .Add("@Pais", SqlDbType.VarChar).Value = Pais + .Add("@CP", SqlDbType.VarChar).Value = CP + .Add("@TipoSucursal", SqlDbType.Int).Value = TipoSucursal + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 2627;") Then + Alert("Ya existe una Sucursal con el mismo nombre: " & Sucursal & ".", TipoMensaje.MsgAdvertencia) + Else + Me.OnError("Ocurrió un error al guardar los cambios en la Sucursal", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + Catch ex As Exception + OnError("Ocurrió un error al guardar los cambios en la Sucursal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + SqlAdapter.Dispose() + Return Retorno + End Function + + Public Function RemoveSucursal(CveSucursal As Integer) As Boolean + Dim OnError As Boolean = False + SqlAdapter = New SqlDataAdapter("PA_SucursalRemove", SqlConexion) + SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure + With SqlAdapter.SelectCommand.Parameters + .Add("@CveSucursal", SqlDbType.Int).Value = CveSucursal + End With + Data = New DataTable() + Try + SqlAdapter.Fill(Data) + OnError = True + Catch Ex1 As SqlException + If Ex1.Message.Contains("Número: 547;") Then + Alert("La Sucursal no se pudo eliminar por que esta siendo usada por un registro.", TipoMensaje.MsgAdvertencia) + Else + Me.OnError("Ocurrió un error al eliminar la Sucursal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End If + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar la Sucursal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + SqlAdapter.Dispose() + Return OnError + End Function + +#Region "IDisposable Support" + + + ' IDisposable + Protected Overridable Sub Dispose(disposing As Boolean) + If Not Me.disposedValue Then + If disposing Then + ' TODO: dispose managed state (managed objects). + If Not Data Is Nothing Then Data.Dispose() + If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() + If Not SqlCommand Is Nothing Then SqlCommand.Dispose() + If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() + If Not SqlConexion Is Nothing Then SqlConexion.Dispose() + End If + + ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below. + ' TODO: set large fields to null. + End If + Me.disposedValue = True + End Sub + + ' TODO: override Finalize() only if Dispose(disposing As Boolean) above has code to free unmanaged resources. + 'Protected Overrides Sub Finalize() + ' ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. + ' Dispose(False) + ' MyBase.Finalize() + 'End Sub + + ' This code added by Visual Basic to correctly implement the disposable pattern. + Public Sub Dispose() Implements IDisposable.Dispose + ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above. + ConexionClose() + Dispose(True) + GC.SuppressFinalize(Me) + End Sub +#End Region + +End Class diff --git a/Compras/RepComprasAFDetalle.aspx.vb b/Compras/RepComprasAFDetalle.aspx.vb index c75979d6e..1f5ae872f 100644 --- a/Compras/RepComprasAFDetalle.aspx.vb +++ b/Compras/RepComprasAFDetalle.aspx.vb @@ -86,7 +86,6 @@ Partial Class Compras_RepComprasAFDetalle If Not IsPostBack Then CargaCombos() 'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');") - DdlPS.ddl.Visible = False @@ -190,6 +189,17 @@ Partial Class Compras_RepComprasAFDetalle DdlActivoFijo.DataBind() DdlActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1") + If DdlPS.UsaWebService Then + DdlPS.ddlWS.Attributes.Add("data-Estatus", "-1") + DdlPS.ddlWS.Attributes.Add("data-pagina", "Inventarios") + DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue) + + 'DdlClasificacion.AutoPostBack = False + Else + DdlPS.ddl.Items.Add(New ListItem("Seleccione", "-1")) + 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 diff --git a/Contabilidad/FiltraPolizas.aspx.vb b/Contabilidad/FiltraPolizas.aspx.vb index efeb1b6c0..cf6c11e5c 100644 --- a/Contabilidad/FiltraPolizas.aspx.vb +++ b/Contabilidad/FiltraPolizas.aspx.vb @@ -234,7 +234,7 @@ Partial Class Contabilidad_FiltraPolizas Dim ObjCompra As New ClsCompras Dim ObjIE As New ClsBancos() Dim pathPoliza As String = "" - Dim TieneComprobante As Boolean + Dim TieneComprobante As String = "" Tick = DateTime.Now.Ticks.ToString Dim ObjContabilidad As New ClsContabilidad Dim CvePrePoliza As Integer @@ -252,7 +252,7 @@ Partial Class Contabilidad_FiltraPolizas ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza) TieneComprobante = VerificarComprobante(ObjContabilidad.DtResultados) - If TieneComprobante And SinComprobante Then + If TieneComprobante = "" And Not SinComprobante Then Path = ImprimirPolizaPDF(CvePrePoliza) pathPoliza = Path @@ -331,8 +331,8 @@ Partial Class Contabilidad_FiltraPolizas End If Next Else - If Not TieneComprobante Then - PolizasSinComprobante += String.Format("{1} {2}
", TempPolizas.DataKey("CvePrePoliza").ToString, TempPolizas.DataKey("TipoPol").ToString, TempPolizas.DataKey("Folio").ToString) + If TieneComprobante <> "" Then + PolizasSinComprobante += String.Format("{1} {2}
", TieneComprobante, TempPolizas.DataKey("TipoPol").ToString, TempPolizas.DataKey("Folio").ToString) SinComprobante = True End If @@ -381,7 +381,7 @@ Partial Class Contabilidad_FiltraPolizas If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Dim dtVC As DataTable Dim dr As DataRow - dtVC = ObjConta.DtResultados + dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden") dr = dtVC.Rows(0) Dim ruta As String = "" params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) @@ -493,12 +493,12 @@ Partial Class Contabilidad_FiltraPolizas End Sub - Private Function VerificarComprobante(ByVal PrepolizaDetalle As DataTable) As Boolean + Private Function VerificarComprobante(ByVal PrepolizaDetalle As DataTable) As String Dim filtro() As String = {"CveIE", "CveConceptoContable"} Dim Path As String Dim dt As DataTable = PrepolizaDetalle.FiltraParametros("", "", filtro) Dim ObjIE As New ClsBancos() - Dim TieneComprobante As Boolean = False + Dim TieneComprobante As String = "" For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows @@ -506,14 +506,14 @@ Partial Class Contabilidad_FiltraPolizas If ObjIE.DtResultados.Rows.Count > 0 Then Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString) If File.Exists(Path) Then - TieneComprobante = True + TieneComprobante = "" Exit For Else - TieneComprobante = False + TieneComprobante = Row("CveIE").ToString Exit For End If Else - TieneComprobante = False + TieneComprobante = Row("CveIE").ToString Exit For End If End If diff --git a/Contabilidad/RegPrePoliza.aspx b/Contabilidad/RegPrePoliza.aspx index 57d916c51..5f72a908d 100644 --- a/Contabilidad/RegPrePoliza.aspx +++ b/Contabilidad/RegPrePoliza.aspx @@ -80,6 +80,9 @@
  • Cargar Comprobante
  • +
  • + Imprimir Poliza +
  • diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 5ada370a1..91c34414b 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -250,14 +250,16 @@ Partial Class ContabilidadC_RegPrePoliza GvConcepto.Columns(4).Visible = False GvMov.Columns(5).Visible = False End If + LnkExcel.Visible = False + LnkImprimirPoliza.Visible = True If IfNull(Request("Conta"), "").ToString = "1" Then Contabilizar() End If Exit Sub - LnkExcel.Visible = False Else LnkExcel.Visible = True + LnkImprimirPoliza.Visible = False CreaDT() BtnEliminar.Visible = False @@ -1840,21 +1842,21 @@ Partial Class ContabilidadC_RegPrePoliza Next - dt = DtMovimientos.FiltraParametros("", "", filtroComplemento) - For Each Row As DataRow In dt.Rows + + For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows If ObjCompra.GetCompraComplementoPago(-1, UsuarioActual.CveEmpresa, Row("CveIE").ToString.ToEntero) Then If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then - Dim dr As DataRow = ObjCompra.DtResultados.Rows(0) - Dim RFC As String = dr("RFCde").ToString - Dim CveFactura As String = dr("CveFactura").ToString - Console.WriteLine(RFC & CveFactura) - If CveFactura <> "" Then - Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura) - Console.WriteLine(Path) - If File.Exists(Path) Then - Pathpdf.Add(Path) + For Each RowComple As DataRow In ObjCompra.DtResultados.FiltraParametros("", "", {"RFCde", "CveFactura"}).Rows + Dim RFC As String = RowComple.Item("RFCde").ToString + Dim CveFactura As String = RowComple.Item("CveFactura").ToString + If CveFactura <> "" Then + Path = String.Format("{0}Compras\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, RFC, CveFactura) + If File.Exists(Path) Then + Pathpdf.Add(Path) + End If End If - End If + Next + End If End If Next @@ -1889,7 +1891,7 @@ Partial Class ContabilidadC_RegPrePoliza If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Dim dtVC As DataTable Dim dr As DataRow - dtVC = ObjConta.DtResultados + dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden") dr = dtVC.Rows(0) Dim ruta As String = "" params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) @@ -2343,20 +2345,20 @@ Partial Class ContabilidadC_RegPrePoliza For Each Row As DataRow In dt.FiltraParametros("CveConceptoContable = 30").Rows If ObjIE.GetBancosIE(Row("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then - If ObjIE.DtResultados.Rows.Count > 0 Then - Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString) - If File.Exists(Path) Then - TieneComprobante = True - Exit For - Else - TieneComprobante = False - Exit For - End If + If ObjIE.DtResultados.Rows.Count > 0 Then + Path = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString) + If File.Exists(Path) Then + TieneComprobante = True + Exit For Else TieneComprobante = False Exit For End If + Else + TieneComprobante = False + Exit For End If + End If Next ObjIE.Dispose() @@ -2364,5 +2366,53 @@ Partial Class ContabilidadC_RegPrePoliza End Function + Protected Sub LnkImprimirPoliza_Click(sender As Object, e As EventArgs) + ImprimirPolizaPDFRunTime(IdPoliza) + End Sub + Private Function ImprimirPolizaPDFRunTime(IdPoliza As Integer) As String + Dim ObjConta As New ClsContabilidad + 'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa) + + Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)) + Dim params As New List(Of ReportParameter) + Dim Bytes As Byte() = Nothing + + + 'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then + If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then + Dim dtVC As DataTable + Dim dr As DataRow + dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden") + dr = dtVC.Rows(0) + Dim ruta As String = "" + params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString)) + params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString)) + params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString)) + params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString)) + 'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString)) + 'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString)) + params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString)) + params.Add(New ReportParameter("Moneda", "")) + params.Add(New ReportParameter("CodigoPostal", "")) + If UsuarioActual.CveEmpresa = 119 Then + params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre"))) + End If + If UsuarioActual.CveEmpresa = 140 Then + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + End If + If Archivo.Exists Then + ruta = UsuarioActual.Empresa.Ruta & "Formatos/Polizas.rdlc" + Else + ruta = "Empresas/Grales/Formatos/Polizas.rdlc" + End If + ImprimirbytesPDF(StreamPDF(ruta, dtVC, params, "ppoliza"), String.Format("{0}-{1}", TipoPoliza, dr("FolioPoliza").ToString), "PDF", True) + + End If + Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString) + ObjConta.Dispose() + + End Function + End Class diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 434d07f95..858da02e8 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -75,14 +75,14 @@ Crear Complemento de Pago
  • - Imprimir Poliza + Imprimir Poliza
  • - Agregar Concepto + Agregar Concepto
  • @@ -342,7 +342,7 @@
    + DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None"> Cuenta @@ -558,10 +558,11 @@ - + - + + diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 869450e2f..a12253b63 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -232,10 +232,13 @@ Partial Class ContabilidadC_RegPrePolizaS DivTG.Visible = False GvMov.Columns(5).Visible = False End If + Exit Sub Else CreaDT() - BtnEliminar.Visible = False + BtnEliminar.Visible = False + LnkExcel.Visible = True + LnkImprimirPDF.Visible = False End If @@ -466,8 +469,9 @@ Partial Class ContabilidadC_RegPrePolizaS ' row.FCTextBox("TxtCargo").Enabled = False ' row.FCTextBox("TxtAbono").Enabled = False 'Next - End If - + End If + LnkExcel.Visible = False + LnkImprimirPDF.Visible = True Else Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia) BtnEliminar.Visible = False @@ -1362,6 +1366,8 @@ Partial Class ContabilidadC_RegPrePolizaS GvPrePoliza.DataBind() UpPrePoliza.Update() End If + GvPrePoliza.Columns(11).Visible = True + GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True End If End If @@ -2028,7 +2034,7 @@ Partial Class ContabilidadC_RegPrePolizaS If ObjConta.GetPrePolizasDetalle(CvePrePoliza) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Dim dtVC As DataTable Dim dr As DataRow - dtVC = ObjConta.DtResultados + dtVC = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden") dr = dtVC.Rows(0) Dim ruta As String = "" params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) diff --git a/Empresas/Grales/Formatos/ClienteHistorial.rdlc b/Empresas/Grales/Formatos/ClienteHistorial.rdlc index 7a7951ae1..ceec5295f 100644 --- a/Empresas/Grales/Formatos/ClienteHistorial.rdlc +++ b/Empresas/Grales/Formatos/ClienteHistorial.rdlc @@ -1,1593 +1,5 @@ - - - - - - - - 1.20536cm - - - 1.68162cm - - - 1.81391cm - - - 2.23724cm - - - 2.18174cm - - - 2.15786cm - - - 1.81391cm - - - 1.58613cm - - - 1.77963cm - - - 1.3112cm - - - 2.35917cm - - - - - 0.61323cm - - - - - true - true - - - - - Tipo - - - - - - - Textbox37 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Factura - - - - - - - Textbox1 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox3 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - SubTotal - - - - - - - Textbox5 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descuento - - - - - - - Textbox7 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Amortización - - - - - - - Textbox9 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total - - - - - - - Textbox11 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Moneda - - - - - - - Textbox13 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Estatus - - - - - - - Textbox15 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Timbre - - - - - - - Textbox26 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Envío Mail - - - - - - - Textbox17 - - - DimGray - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.48677cm - - - - - true - true - - - - - =Fields!TipoDocto.Value - - - - - - - TipoDocto1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Folio.Value - - - - - - - Folio - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SubTotal.Value - - - - - - - SubTotal1 - - - Silver - 2pt - 2pt - 2pt - 2pt - en-US - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento1 - - - Silver - 2pt - 2pt - 2pt - 2pt - en-US - - - - - - - - true - true - - - - - =Fields!Amortizacion.Value - - - - - - - Amortizacion1 - - - Silver - 2pt - 2pt - 2pt - 2pt - en-US - - - - - - - - true - - - - - =Fields!Total.Value - - - - - - - Total1 - - - Silver - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!Abreviatura.Value - - - - - - - Abreviatura1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!EstatusFactura.Value - - - - - - - EstatusFactura1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SeTimbro.Value - - - - - - - SeTimbro1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!EnvioMail.Value - - - - - - - EnvioMail1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.48677cm - - - - - true - true - - - - - =Fields!TipoDocto.Value - - - - - - - TipoDocto - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Folio.Value - - - - - - - Folio2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SubTotal.Value - - - - - - - SubTotal - - - 2pt - 2pt - 2pt - 2pt - en-US - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!Amortizacion.Value - - - - - - - Amortizacion - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - - - - - =Fields!Total.Value - - - - - - - Total - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - true - true - - - - - =Fields!Abreviatura.Value - - - - - - - Abreviatura - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =Fields!EstatusFactura.Value - - - - - - - EstatusFactura - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SeTimbro.Value - - - - - - - SeTimbro - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!EnvioMail.Value - - - - - - - EnvioMail - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - =Fields!TipoDocto.Value<>"" - - - - - =Fields!TipoDocto.Value="" - - - - - - - true - true - true - true - DataSet1 - 0.31833cm - 0.18357cm - 1.58677cm - 20.12777cm - - - - - - 0.87164in - - - - - - true - true - - - - - =Parameters!NombreEmpresa.Value - - - - - - - Textbox1 - 0.29104cm - 5.15939cm - 0.6cm - 9.70195cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!DireccionEmpresa.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TelefonoEmpresa.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.94396cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.21167cm - 16.35238cm - 0.6cm - 3.95896cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =CDate(now) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0cm - 0cm - 0cm - 0.5cm - 0.13cm - + + + + + + Textbox37 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Factura + + + + + + + Textbox1 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox3 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SubTotal + + + + + + + Textbox5 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descuento + + + + + + + Textbox7 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Amortización + + + + + + + Textbox9 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Textbox11 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Moneda + + + + + + + Textbox13 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Estatus + + + + + + + Textbox15 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Timbre + + + + + + + Textbox26 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Mail + + + + + + + Textbox17 + + + DimGray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.48677cm + + + + + true + true + + + + + =Fields!TipoDocto.Value + + + + + + + TipoDocto1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Folio.Value + + + + + + + Folio + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SubTotal.Value + + + + + + + SubTotal1 + + + Silver + 2pt + 2pt + 2pt + 2pt + en-US + + + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento1 + + + Silver + 2pt + 2pt + 2pt + 2pt + en-US + + + + + + + + true + true + + + + + =Fields!Amortizacion.Value + + + + + + + Amortizacion1 + + + Silver + 2pt + 2pt + 2pt + 2pt + en-US + + + + + + + + true + + + + + =Fields!Total.Value + + + + + + + Total1 + + + Silver + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!Abreviatura.Value + + + + + + + Abreviatura1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!EstatusFactura.Value + + + + + + + EstatusFactura1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SeTimbro.Value + + + + + + + SeTimbro1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!EnvioMail.Value + + + + + + + EnvioMail1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.48677cm + + + + + true + true + + + + + =Fields!TipoDocto.Value + + + + + + + TipoDocto + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Folio.Value + + + + + + + Folio2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SubTotal.Value + + + + + + + SubTotal + + + 2pt + 2pt + 2pt + 2pt + en-US + + + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!Amortizacion.Value + + + + + + + Amortizacion + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + + + + + =Fields!Total.Value + + + + + + + Total + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!Abreviatura.Value + + + + + + + Abreviatura + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!EstatusFactura.Value + + + + + + + EstatusFactura + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SeTimbro.Value + + + + + + + SeTimbro + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!EnvioMail.Value + + + + + + + EnvioMail + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + =Fields!TipoDocto.Value<>"" + + + + + =Fields!TipoDocto.Value="" + + + + + + + true + true + true + true + DataSet1 + 0.00083cm + 0.18357cm + 1.58677cm + 18.459cm + + + + + + 0.62504in + + + + + + true + true + + + + + =Parameters!NombreEmpresa.Value + + + + + + + Textbox1 + 0.32631cm + 0.24248cm + 0.6cm + 18.4001cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Direccion: + + + + + + + + =Parameters!DireccionEmpresa.Value + + + + + + + + Telefono: + + + + =Parameters!TelefonoEmpresa.Value + + + + + + + Textbox2 + 0.92632cm + 0.24248cm + 0.6cm + 18.4001cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cliente: + + + + + + + + =Parameters!Cliente.Value + + + + + + + Textbox2 + 1.57571cm + 0.24248cm + 0.56472cm + 18.4001cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.94396cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.21167cm + 14.68362cm + 0.6cm + 3.95896cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =CDate(now) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0cm + 0cm + 0cm + 0.5cm + 0.13cm + @@ -685,7 +689,7 @@ - CuentaFormato1 + CodigoPadre @@ -776,7 +780,7 @@ - =Fields!AgrupadorSAT.Value + =Fields!Codigo.Value & " - " & Fields!CodigoPadre.Value @@ -971,7 +975,7 @@ true DataSet1 0.98834cm - 24.33863cm + 24.33862cm diff --git a/Empresas/Grales/Formatos/RepComprasAFDetalle.rdlc b/Empresas/Grales/Formatos/RepComprasAFDetalle.rdlc index e449afc9c..1a66132ee 100644 --- a/Empresas/Grales/Formatos/RepComprasAFDetalle.rdlc +++ b/Empresas/Grales/Formatos/RepComprasAFDetalle.rdlc @@ -1,884 +1,5 @@  - - - - - true - true - - - - - =Parameters!AgrupadoPor.Value - HTML - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.84237cm - 0.12912cm - 0cm - 27.46166cm - 1 - - - - - - - - - 2.5cm - - - 7.28398cm - - - 8.01688cm - - - 2.10789cm - - - 2.5cm - - - 2.5cm - - - 2.5cm - - - - - 0.6cm - - - - - true - true - - - - - Serie Folio - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripcion - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Producto - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad M. - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cantidad - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PU - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - =IIF(Fields!Orden.Value.ToString = "0","Silver","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =Fields!Descripcion.Value - - - - - - =IIF(Fields!Orden.Value.ToString = "0","Silver","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =Fields!CodigoPS.Value - - - - - - =IIF(Fields!Orden.Value.ToString = "0","Silver","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - =IIF(Fields!Orden.Value.ToString = "0","Silver","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - PU - - - =IIF(Fields!Orden.Value.ToString = "0","Silver","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - Cantidad - - - =IIF(Fields!Orden.Value.ToString = "0","Silver","White") - 2pt - 2pt - 2pt - 2pt - - - true - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - Total - - - =IIF(Fields!Orden.Value.ToString = "0","Silver","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet1 - 0.9482cm - 0.18203cm - 1.06771cm - 27.40875cm - 2 - - - - - - 0.94992in - - - - - - - Textbox1 - 0.18521cm - 7.02468cm - 0.6cm - 14.02238cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - =Parameters!Titulo.Value - - - - - - - - - - - - - - - - Textbox2 - 1.10271cm - 7.02468cm - 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 - 25.20741cm - 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: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 21cm - 29.7cm - 1cm - 1cm - 0.25cm - 0.25cm - 0.13cm - + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.84237cm + 0.09525cm + 0cm + 25.79479cm + 1 + + + + + + + + + 2.5cm + + + 7.28398cm + + + 8.01688cm + + + 2.10789cm + + + 1.99729cm + + + 1.67979cm + + + 2.20896cm + + + + + 0.6cm + + + + + true + true + + + + + Serie Folio + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripcion + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Producto + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad M. + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PU + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!Descripcion.Value + + + + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!CodigoPS.Value + + + + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + PU + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + Cantidad + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 0.9482cm + 0.09525cm + 1.06771cm + 25.79479cm + 2 + + + + + + 0.94992in + + + + + + + Textbox1 + 0.18521cm + 0.09525cm + 0.6cm + 25.79479cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + =Parameters!Titulo.Value + + + + + + + + + + + + + + + + Textbox2 + 1.10271cm + 0.09525cm + 0.52945cm + 25.79479cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.09525cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 0.76376cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.08291cm + 23.61991cm + 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: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 21cm + 29.7cm + 1cm + 1cm + 0.25cm + 0.25cm + 0.13cm + - ="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) HTML - =Parameters!OrdenCompra.Value + =IIf(Parameters!OrdenCompra.Value = "-1", "", Parameters!OrdenCompra.Value) - =Parameters!OrdenCompra.Value + =IIf(Parameters!OrdenCompra.Value = "-1", "", Parameters!OrdenCompra.Value) - ="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) HTML + + + + + + + =Globals!ExecutionTime + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario Imprimio: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + true true @@ -2960,55 +3051,11 @@ Textbox35 - 0.01763cm - 18.52109cm + 0.00882cm + 18.54098cm 0.50624cm 2.5cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Today - - - - @@ -3646,7 +3693,7 @@ ReportParameter1 - + image/png diff --git a/Empresas/159/Formatos/Factura.rdlc b/Empresas/159/Formatos/Factura.rdlc index 388e49af9..b5ae65114 100644 --- a/Empresas/159/Formatos/Factura.rdlc +++ b/Empresas/159/Formatos/Factura.rdlc @@ -3344,7 +3344,7 @@ - ="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) HTML - ="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) HTML - ="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) HTML - ="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) HTML - ="<b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineacion: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & "<br/<b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) HTML @@ -791,7 +795,7 @@ - AgrupadorSAT + CodigoNombreSAT @@ -803,6 +807,7 @@ 2pt + true From a62940ac3adc85b837cc709552db6877e0b8537c Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Fri, 14 May 2021 10:24:52 -0700 Subject: [PATCH 35/47] modificar list de tipo cliente para que cuadre con clientes.aspx --- Ventas/CatClientes.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/CatClientes.aspx b/Ventas/CatClientes.aspx index 66b98dba9..762d4efb9 100644 --- a/Ventas/CatClientes.aspx +++ b/Ventas/CatClientes.aspx @@ -90,7 +90,7 @@ Todos Frecuente - No Frecuente + Venta Mostrador
    From 49a8e95d3ff8ef1009382c32f40dea368269aa51 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 14 May 2021 11:06:58 -0700 Subject: [PATCH 36/47] cambio de orden de registo de movs de almacen, salida de transito --- Inventarios/TraspasoAlmacen.aspx.vb | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 17e5e4a07..918842776 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1937,16 +1937,16 @@ Partial Class Inventarios_TraspasoAlmacen RealizarMovimientoVirtual = True End If - - 'AGREGAMOS LA SALIDA - CveMovimientoSalidaTransitorio = ObjInventario.AddMovimiento(CveAlmacenSalida, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, - Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, Modulo:="TA/G11") - 'AGREGAMOS LA ENTRADA CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenEntrada, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G1") Folio = ObjInventario.Folio + 'AGREGAMOS LA SALIDA + CveMovimientoSalidaTransitorio = ObjInventario.AddMovimiento(CveAlmacenSalida, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, + Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveAlmacenDestino:=GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/G11") + + If CveMovimientoSalidaTransitorio <= 0 Then TextoError = "No se pudo generar el movimiento de salida correctamente" ErrorMovInv = True @@ -2013,14 +2013,13 @@ Partial Class Inventarios_TraspasoAlmacen Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then - Dim resultado As DataTable = ObjInventario.DtResultados - Dim importe As Decimal = resultado.SUMD("Total").RoundAD + Dim importe As Decimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero Dim tCveConcepto As Integer = 68 - If CveMovimientoSalidaTransitorio = 0 Then - tCveConcepto = 289 - End If + 'If CveMovimientoSalidaTransitorio = 0 Then + ' tCveConcepto = 289 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, tCveConcepto, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalidaTransitorio, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If From cee00da343f882a6d94b4bacc34cef31296e0bca Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 14 May 2021 11:07:40 -0700 Subject: [PATCH 37/47] =?UTF-8?q?-=20se=20cuetna=20refrecia=20a=20variable?= =?UTF-8?q?=20cvecuenta,=20--=20mejora=20iva=20de=20importaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/ProveedoresAbonar.aspx.vb | 314 ++++--------------------------- 1 file changed, 40 insertions(+), 274 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index a80f0bc98..705884ae4 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -974,7 +974,6 @@ Partial Class Bancos_ProveedoresAbonar Dim importeMX As Decimal Dim FechaMovimiento As Date = TxtFechaDocumento.Text.ToDate Dim IdCtaContable As Integer = 0 - Dim CveCuenta As Integer = 0 Dim ConceptoMovimiento As String Dim Referencia As String Dim tipoCambioCompra As Decimal @@ -1003,6 +1002,14 @@ Partial Class Bancos_ProveedoresAbonar End If End If + + Dim DttPlantilla As DataTable = Nothing + If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then + DttPlantilla = ObjMov.DtResultados + End If + + Dim TipoContabilidad As Integer = UsuarioActual.Empresa.TipoContabilidad + 'inserto las compras que voy a pagar For Each gvr As GridViewRow In GvCxP.Rows If gvr.FCCheckBox("Chk").Checked Then @@ -1031,33 +1038,17 @@ Partial Class Bancos_ProveedoresAbonar End If CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero - If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then - For Each Row As DataRow In ObjMov.DtResultados.Rows + 'If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then + If DttPlantilla IsNot Nothing AndAlso DttPlantilla.Rows.Count > 0 Then + For Each Row As DataRow In DttPlantilla.Rows ConceptoContable = Row("CveConcepto").ToString.ToEntero TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False) ImporteMovimiento = 0 IdCtaContable = 0 - CveCuenta = 0 ConceptoMovimiento = $"{HplProveedor.Text} F:{gvr.DataKey("SerieFolio")}" Referencia = gvr.DataKey("SerieFolio").ToString Dim PorcentajeImpuesto As Decimal = 0 - If ConceptoContable.Contiene(14, 19) AndAlso gvr.DataKey("CveCompra").ToEntero > 0 Then - - If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then - If gvr.DataKey("EsImportacion").ToString = "1" Then - EsImportacion = True - If ConceptoContable = 14 Then - ConceptoContable = 287 - Else - ConceptoContable = 288 - End If - Else - EsImportacion = False - End If - End If - - End If Select Case ConceptoContable Case 17 'Pago Proveedores @@ -1096,7 +1087,6 @@ Partial Class Bancos_ProveedoresAbonar IdCtaContable = CtaAcreedor Else IdCtaContable = CtaProveedor - CveCuenta = CveCuentaProveedor End If Else @@ -1105,7 +1095,6 @@ Partial Class Bancos_ProveedoresAbonar ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" IdCtaContable = IdCtaContComplementaria - CveCuenta = CveCuentaProveedorExtranjera If ImporteMovimiento <> 0 AndAlso (UsaComplementariaProveedores Or IdCtaContable > 0) Then 'Cuando tiene complementaria lo dividimos en dos importeMX = ImporteMovimiento If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0.00D, Referencia, CveConceptoComplementaria, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=Math.Round(ImporteMovimiento * tipoCambioCompraValuacion - ImporteMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=ImporteMovimiento, TipoCambio:=tipoCambioCompraValuacion, CveCuenta:=CveCuentaComplementaria) Then @@ -1113,7 +1102,6 @@ Partial Class Bancos_ProveedoresAbonar End If End If IdCtaContable = IdCtaProveedorExtranjera - CveCuenta = CveCuentaProveedorExtranjera End If Case 15 'Ret IVA X Acreditar Honorarios/Serv. Prof. If gvr.DataKey("CveRetIVAConcepto").ToEntero = 1 Then @@ -1145,23 +1133,13 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(307).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(307).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso 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 - 'Conta SIG - If CveCuentaRetIVA <> 0 Then - CveCuenta = CveCuentaRetIVA - Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero - End If - End If - End If End If Case 22 'Ret IVA Acreditable Honorarios/Serv. Prof. If gvr.DataKey("CveRetIVAConcepto").ToEntero = 1 Then @@ -1192,7 +1170,7 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(308).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero End If @@ -1228,23 +1206,13 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(309).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(309).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso 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 - 'Conta SIG - If CveCuentaRetIVA <> 0 Then - CveCuenta = CveCuentaRetIVA - Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero - End If - End If - End If End If Case 184 'Ret IVA Acreditable Fletes P.F. If gvr.DataKey("CveRetIVAConcepto").ToEntero = 2 Then @@ -1275,7 +1243,7 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(310).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(310).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero End If @@ -1311,23 +1279,13 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(311).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(311).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso 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 - 'Conta SIG - If CveCuentaRetIVA <> 0 Then - CveCuenta = CveCuentaRetIVA - Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - If ObjMov.DtResultados.Rows.Count > 0 Then - CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero - End If - End If - End If End If Case 186 'Ret IVA Acreditable Fletes P.M. If gvr.DataKey("CveRetIVAConcepto").ToEntero = 3 Then @@ -1358,7 +1316,7 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(312).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(312).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero End If @@ -1394,7 +1352,7 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(313).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(313).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero End If @@ -1430,7 +1388,7 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(314).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(314).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero End If @@ -1465,7 +1423,7 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero End If @@ -1500,7 +1458,7 @@ Partial Class Bancos_ProveedoresAbonar ElseIf UsuarioActual.Empresa.Funcionalidad(582).ToEntero > 0 Then IdCtaContable = UsuarioActual.Empresa.Funcionalidad(582).ToEntero Else - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero End If @@ -1541,16 +1499,7 @@ Partial Class Bancos_ProveedoresAbonar ' End If ' End If - ' 'Conta SIG - ' If CveCuentaRetISR <> 0 Then - ' CveCuenta = CveCuentaRetISR - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - ' End If - ' End If - ' End If + ' End If 'Case 23 'Ret ISR Acreditable ' If gvr.DataKey("CveRetISRConcepto").ToEntero = 1 Then @@ -1586,16 +1535,7 @@ Partial Class Bancos_ProveedoresAbonar ' End If ' End If - ' 'Conta SIG - ' If CveCuentaRetISR <> 0 Then - ' CveCuenta = CveCuentaRetISR - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - ' End If - ' End If - ' End If + ' End If 'Case 243 'Ret ISR x Acreditar Terceros y Arrendamiento ' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then @@ -1631,16 +1571,7 @@ Partial Class Bancos_ProveedoresAbonar ' End If ' End If - ' 'Conta SIG - ' If CveCuentaRetISR <> 0 Then - ' CveCuenta = CveCuentaRetISR - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - ' End If - ' End If - ' End If + ' End If 'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento ' If gvr.DataKey("CveRetISRConcepto").ToEntero = 2 Then @@ -1676,15 +1607,6 @@ Partial Class Bancos_ProveedoresAbonar ' End If ' End If - ' 'Conta SIG - ' If CveCuentaRetISR <> 0 Then - ' CveCuenta = CveCuentaRetISR - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - ' End If - ' End If ' End If ' End If Case 14 'Iva X Acreditar @@ -1742,83 +1664,21 @@ Partial Class Bancos_ProveedoresAbonar Dim IdCtaIVAXAcreditar As Integer = 0 Dim IdCtaIVAAcreditable As Integer = 0 + If gvr.DataKey("EsImportacion").ToString.contiene("1", "True") Then + ConceptoContable = 287 + End If + If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero End If IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0) - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero - CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditarSIG").ToString.ToEntero End If End If - Case 287 'Iva X Acreditar Importacion - Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then - 'funcionalidad que toma el 100% del pago para acreditamiento de iva - If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then - If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then - ImporteMovimiento = gvr.DataKey("IVA").ToDecimal - importeMX = ImporteMovimiento - ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then - tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal - ImporteMovimiento = gvr.DataKey("IVA").ToDecimal - importeMX = ImporteMovimiento * tipoCambioCompra - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then - ImporteMovimiento = gvr.DataKey("IVA").ToDecimal - importeMX = ImporteMovimiento * tipoCambioCompra - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then - tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal - ImporteMovimiento = gvr.DataKey("IVA").ToDecimal - importeMX = ImporteMovimiento * tipoCambioCompra - End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2) - - If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" - Else - ImporteMovimiento = 0 - importeMX = 0 - End If - Else - ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago - - - If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then - importeMX = ImporteMovimiento - ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then - tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal - importeMX = ImporteMovimiento * tipoCambioCompra - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then - importeMX = ImporteMovimiento * tipoCambioCompra - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then - tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal - importeMX = ImporteMovimiento * tipoCambioCompra - End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) - - If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" - End If - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) - - PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal - Dim IdCtaIVAXAcreditar As Integer = 0 - Dim IdCtaIVAAcreditable As Integer = 0 - - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then - IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero - IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero - End If - IdCtaContable = If(IdCtaIVAXAcreditar > 0, IdCtaIVAXAcreditar, 0) - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero - End If - End If Case 19 'Iva Acreditado Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then @@ -1869,7 +1729,9 @@ Partial Class Bancos_ProveedoresAbonar End If TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) - + If gvr.DataKey("EsImportacion").ToString.contiene("1", "True") Then + ConceptoContable = 288 + End If PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal Dim IdCtaIVAXAcreditar As Integer = 0 @@ -1888,100 +1750,18 @@ Partial Class Bancos_ProveedoresAbonar Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then MsgError = "No se pudo insertar la póliza" Exit For End If End If - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero - CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditableSIG").ToString.ToEntero End If End If - Case 288 'Iva Acreditado - Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then - 'funcionalidad que toma el 100% del pago para acreditamiento de iva - If TotalImporte = gvr.DataKey("Saldo").ToDecimal Then - If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then - ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal - importeMX = ImporteMovimiento - ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then - tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal - ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal - importeMX = gvr.DataKey("IVADeducible").ToDecimal * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then - ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal - importeMX = ImporteMovimiento * tipoCambioCompra - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then - tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal - ImporteMovimiento = gvr.DataKey("IVADeducible").ToDecimal - importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) - End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) - - If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - Else - ImporteMovimiento = 0 - importeMX = 0 - End If - Else - ImporteMovimiento = gvr.DataKey("IVAPorPagar").ToDecimal * PorcentajePago - - If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then - importeMX = ImporteMovimiento - ElseIf CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then - tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal - importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then - importeMX = ImporteMovimiento * tipoCambioCompra - ElseIf CveMoneda = 2 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then - tipoCambioCompra = gvr.DataKey("TipoCambio").ToDecimal - - importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) - End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) - - If TipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{TipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - End If - TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) - - - - PorcentajeImpuesto = gvr.DataKey("PorcentajeIVA").ToDecimal - Dim IdCtaIVAXAcreditar As Integer = 0 - Dim IdCtaIVAAcreditable As Integer = 0 - Dim IdCtaContableNoIVA As Integer = 0 - - If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows.Count > 0 Then - IdCtaIVAXAcreditar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAXAcreditar").ToString.ToEntero - IdCtaIVAAcreditable = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVAAcreditable").ToString.ToEntero - IdCtaContableNoIVA = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("IdCtaIVANoAcreditable").ToString.ToEntero - End If - IdCtaContable = If(IdCtaIVAAcreditable > 0, IdCtaIVAAcreditable, 0) - - 'se registra el iva no acreditable - If gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal > 0 Then - - Dim ImporteNOIVA As Decimal = gvr.DataKey("IVAPorPagarNoDeducible").ToDecimal * PorcentajePago - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, FechaMovimiento, IdCtaContableNoIVA, -1, CveIE, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=ImporteNOIVA, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then - MsgError = "No se pudo insertar la póliza" - Exit For - End If - End If - - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) And Not IdCtaContable > 0 Then - If ObjMov.DtResultados.Rows.Count > 0 Then - IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - CveCuenta = ObjMov.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero - End If - End If Case 25 'IEPS X Acreditar Dim TotalImporte As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal ImporteMovimiento = gvr.DataKey("IEPSPorPagar").ToDecimal * PorcentajePago @@ -2001,10 +1781,9 @@ Partial Class Bancos_ProveedoresAbonar TipoCambioGeneral = tipoCambioCompra If tipoCambioCompra > 1 Then ConceptoMovimiento += $" TC:{tipoCambioCompra} ${ImporteMovimiento.FormatoNumero(2)}" - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero - CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero End If End If Case 26 'IEPS Acreditable @@ -2025,17 +1804,15 @@ Partial Class Bancos_ProveedoresAbonar importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) - If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + If ImporteMovimiento <> 0 AndAlso TipoContabilidad <> 1 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then If ObjMov.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero - CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero End If End If Case 64 'Ganancia If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria 'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) @@ -2074,7 +1851,6 @@ Partial Class Bancos_ProveedoresAbonar 'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - 'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria 'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion) 'TipoCambioGeneral = TCImpuestos '''' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra @@ -2094,7 +1870,6 @@ Partial Class Bancos_ProveedoresAbonar If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria 'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) @@ -2115,7 +1890,6 @@ Partial Class Bancos_ProveedoresAbonar 'Dim IEPS As Decimal = If(TotalImporte = gvr.DataKey("Saldo").ToDecimal AndAlso Math.Abs(Math.Round(gvr.DataKey("IEPSPorPagar").ToDecimal - (gvr.DataKey("IEPS").ToDecimal * PorcentajePago), 2)) <= 0.02, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'If(TotalImporte = gvr.DataKey("Saldo").ToDecimal, gvr.DataKey("IEPSPorPagar").ToDecimal, gvr.DataKey("IEPS").ToDecimal * PorcentajePago) 'IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - 'CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria 'Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompraValuacion) '' si tiene funcionalidad de flucturación con ivas, tomar tipocambioCompra 'If TipoCambioPago > tipoCambioCompra AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then @@ -2167,10 +1941,8 @@ Partial Class Bancos_ProveedoresAbonar ObjCreditos.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero, DdlTarjeta.SelectedValue.ToEntero) If ObjCreditos.DtResultados.Rows.Count > 0 AndAlso (ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero > 0 Or ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjetaSIG").ToString.ToEntero > 0) Then IdCtaContable = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjeta").ToString.ToEntero - CveCuenta = ObjCreditos.DtResultados.Rows(0)("IdCtaContableTarjetaSIG").ToString.ToEntero Else IdCtaContable = IdCuenta - CveCuenta = CveCuentaB End If ImporteMovimiento = TxtImporte.Text.ToDecimal @@ -2205,13 +1977,7 @@ Partial Class Bancos_ProveedoresAbonar idCuentaContabilizacion = 0 End If - 'Conta SIG - If CveCuenta = 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", ConceptoContable))) - CveCuentaContabilizacion = 0 - End If - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveSubProyecto:=CveSubProyecto, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=importeMX, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, Referencia, ConceptoContable, ConceptoMovimiento, FechaMovimiento, IdCtaContable, -1, CveIE, CveSubProyecto:=CveSubProyecto, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=CveProveedor, ImporteMX:=importeMX, ImporteME:=If(TipoCambioPago = 1, 0, ImporteMovimiento), TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then MsgError = "No se pudo insertar la póliza" Exit For End If @@ -3405,7 +3171,7 @@ Partial Class Bancos_ProveedoresAbonar Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, gr.DataKey("SerieFolio").ToString, 14, ConceptoPartida, Now, IdCtaContable:=IdCtaIVAXAcreditar, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IVA, IVA * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, gr.DataKey("SerieFolio").ToString, 14, ConceptoPartida, Now, IdCtaContable:=IdCtaIVAXAcreditar, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, IVA, IVA * If(FuncionalidadFluctuacionImpuestos, TCPago, TCCompra)), PorcentajeImpuesto:=PorcentajeImpuesto) Then MsgError = "Ocurrio un error al saldar el movimiento" End If @@ -3447,11 +3213,11 @@ Partial Class Bancos_ProveedoresAbonar If TCCompra > TCPago Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then MsgError = "Ocurrio un error al saldar el movimiento" End If Else - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), CveCuenta:=CveCuenta, TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 65, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then MsgError = "Ocurrio un error al saldar el movimiento" End If End If From bc63d2c94771ed27592c59c741f030683b00135b Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 May 2021 12:13:26 -0700 Subject: [PATCH 38/47] -- permite eliminar una IE cancelado, siempre y cuando tenga los permisos --- Bancos/IE.aspx.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 5dab27d13..edc4376d0 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1243,7 +1243,6 @@ Partial Class Bancos_IE Else BtnEditar.Visible = False - LnkEliminar.Visible = False LnkCancelarComplemento.Visible = False LnkCancelarComplementoImporte.Visible = False DVGenerarComplementoModal.Visible = False From 0f23ebd0dbf7db430bcd51d62d6f8e532c2f691f Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 May 2021 12:13:51 -0700 Subject: [PATCH 39/47] -- tipopoliza de ingreso --- Bancos/DepositosCaja.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 9eb7eea46..4e578253e 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -170,7 +170,7 @@ Partial Class Bancos_DepositosCaja CveCuentaBancariaDestino = drDestino("IdCtaContableSIG").ToString.ToEntero End If - NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1) If ChkIntermediario.Checked Then From d83556a66dfd85c9ae227e6a8a8c6104820b328a Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 May 2021 18:37:03 -0700 Subject: [PATCH 40/47] =?UTF-8?q?correcci=C3=B3n=20de=20lote/cad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 918842776..303283d94 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1992,7 +1992,7 @@ Partial Class Inventarios_TraspasoAlmacen End If 'MOV, Alm, Transito If gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero > 0 Then - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=tLote, FechaCaducidad:=tFechaCaducidad, CveMovimientoDetalleEntrada:=gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=-3, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then ErrorMovInv = True TextoError = "Ocurrió un error al guardar los movimientos de salida" Exit For From c1670b8c6639fa89ee1ad6ee6092d0bc9e754d45 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 15 May 2021 18:38:25 -0700 Subject: [PATCH 41/47] Registro contable de traspaso --- Inventarios/EntregaAlmacen.aspx.vb | 88 ++++++++++++++++++------------ 1 file changed, 54 insertions(+), 34 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 3bf93937c..a64e7c2db 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -3075,7 +3075,8 @@ Partial Class Inventarios_EntregaAlmacen End If Dim ObjInventario As New ClsInventarios : ObjInventario.IniciaTransacSQL() - Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL()) + Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL()) + Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL()) Dim CveMovimientoSalida As Integer Dim ConceptoMovimiento = 0 Dim FolioSalida As Integer @@ -3221,38 +3222,39 @@ Partial Class Inventarios_EntregaAlmacen TextoError = "Ocurrió un error al generar el movimiento de salida." ErrorMovInv = True End If - End If - + End If + + Dim ValorTraspaso As Decimal = 0 'ENTRADA POR TRASPASO - If Not ErrorMovInv Then - 'sino es transitorio, los transitorios, ya no se hace otro movimiento - If Not ChkTransitorio.Checked Then - ConceptoMovimiento = 27 ' If(ChkTransitorio.Checked, 2, 27) - Almacen2 = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero(), CveAlmacenTraspasoDestino) + If Not ErrorMovInv Then + 'sino es transitorio, los transitorios, ya no se hace otro movimiento + + ConceptoMovimiento = If(ChkTransitorio.Checked, 2, 27) + Almacen2 = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero(), CveAlmacenTraspasoDestino) CveMovimientoEntrada = ObjInventario.AddMovimiento(Almacen2, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenTraspasoDestino, - Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/GT1", CveOP:=CveOP) - FolioEntrada = ObjInventario.Folio - If CveMovimientoEntrada > 0 Then - If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then - Dim CveSeccionAlmacen As Integer = -1 - For Each Dr As DataRow In ObjInventario.DtResultados.Rows + Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/GT1", CveOP:=CveOP) + FolioEntrada = ObjInventario.Folio + If CveMovimientoEntrada > 0 Then + If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then + Dim CveSeccionAlmacen As Integer = -1 + ValorTraspaso = ObjInventario.DtResultados.SUMD("Total").RoundSQL + For Each Dr As DataRow In ObjInventario.DtResultados.Rows + + CveSeccionAlmacen = -3 + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), FechaCaducidad:=Dr("FechaCaducidad").ToString().ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then + ErrorMovInv = True + TextoError = "Ocurrió un error al guardar los movimientos de entrada" + Exit For + End If + Next + End If + Else + TextoError = "Ocurrió un error al generar el movimiento de entrada" + ErrorMovInv = True + End If - CveSeccionAlmacen = -3 - - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), FechaCaducidad:=Dr("FechaCaducidad").ToString().ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then - ErrorMovInv = True - TextoError = "Ocurrió un error al guardar los movimientos de entrada" - Exit For - End If - Next - End If - Else - TextoError = "Ocurrió un error al generar el movimiento de entrada" - ErrorMovInv = True - End If - End If - End If 'MARCA SOLICITUD CON EL MOVIMIENTO GENERADO @@ -3261,18 +3263,18 @@ Partial Class Inventarios_EntregaAlmacen TextoError = "Ocurrió un error al vincular los movimientos con la solicitud de traspaso. Por favor verifique y vuelva a intentar" ErrorMovInv = True End If - End If - + End If + + Dim Fecha As Date = TxtFecha.Text.ToDate 'Paqueterias Guias If RbEntregaInterna.Checked AndAlso Not ErrorMovInv Then - Dim CveEstatus As Integer = 0 ' DdlEstatus.SelectedValue.ToEntero() - Dim Fecha As String = Now.ToString() 'TxtFechaPaqInterna.Text + Dim CveEstatus As Integer = 0 ' DdlEstatus.SelectedValue.ToEntero() Dim FechaEstimada As String = "-1" 'If(TxtFechaEstimada.Text = "", "-1", TxtFechaEstimada.Text) Dim NoCajas As Integer = 0 'TxtNoCajas.Text.ToEntero() Dim Observaciones As String = "" 'TxtObservacionesPaqInterna.Text Dim CvePaqueteria As Integer = GlobalDTPaqueterias(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("CvePaqueteria", "").ToEntero() - Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True) + Dim CvePaqueteriaGuia As Integer = ObjGeneral.AddPaqueteriasGuias(CvePaqueteria, 9, CveEstatus, CveSubProyecto, Fecha.ToShortDateString, "-1", "-1", NoCajas, 0.00, "-1", FechaEstimada, Observaciones, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, EsEntregaInterna:=True) If CvePaqueteriaGuia > 0 Then If CveVentaSurtir > 0 OrElse CveSubProyecto > 0 Then @@ -3286,8 +3288,26 @@ Partial Class Inventarios_EntregaAlmacen ErrorMovInv = True Alert("Error en el paqueteria guia", TipoMensaje.MsgError) End If + End If + + 'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO: + + Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/GT", 53, 0, 0, 1, Fecha, "Traspaso", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If CvePrePolizaTraspaso > 0 Then + + + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then + ErrorMovInv = True + End If + + If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, ValorTraspaso, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=False, ImporteMX:=ValorTraspaso) Then + ErrorMovInv = True + End If + Else + ErrorMovInv = True End If + If Not ErrorMovInv Then ObjInventario.Commit() ObjGeneral.Dispose() From 6078eb9855eaf5c9de60044741079ee5a9c211a7 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Tue, 18 May 2021 02:14:15 -0700 Subject: [PATCH 42/47] --- AF/CatAF.aspx.vb | 11 +- App_Code/ClsContabilidad.vb | 4 +- Bancos/DepositosCaja.aspx | 95 +- Bancos/IE.aspx | 34 +- Bancos/IE.aspx.vb | 60 +- CRM/Acercamiento.aspx | 2 +- Contabilidad/FiltraPolizas.aspx.vb | 9 +- Contabilidad/PlantillasPolizasDetalle.aspx | 17 +- Contabilidad/PlantillasPolizasDetalle.aspx.vb | 22 +- Contabilidad/RegPrePoliza.aspx.vb | 8 +- Contabilidad/RegPrePolizaS.aspx.vb | 98 +- Empresas/Grales/Formatos/RepClientes.rdlc | 2049 +++++++++-------- OC/CatEstatus.aspx | 4 +- OC/OC.aspx | 4 +- OC/RepCotizaciones.aspx | 2 +- OC/RepOC.aspx | 5 +- vwd.webinfo | 4 + 17 files changed, 1239 insertions(+), 1189 deletions(-) diff --git a/AF/CatAF.aspx.vb b/AF/CatAF.aspx.vb index b5e500e31..14a3d44f4 100644 --- a/AF/CatAF.aspx.vb +++ b/AF/CatAF.aspx.vb @@ -458,7 +458,8 @@ Partial Class AF_CatAF Dim params As New List(Of ReportParameter) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - + Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\CatAF.rdlc", UsuarioActual.Empresa.Ruta)) + Dim Ruta As String = "" params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) @@ -468,7 +469,13 @@ Partial Class AF_CatAF Else params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF(String.Format("{0}Formatos\CatAF.rdlc", UsuarioActual.Empresa.Ruta), DtActivosFijos, params, "CatalogoActivosFijos", Formato:=Formato) + + If Archivo.Exists Then + Ruta = UsuarioActual.Empresa.Ruta & "Formatos/CatAF.rdlc" + Else + Ruta = "Empresas/Grales/Formatos/CatAF.rdlc" + End If + ImprimirPDF(Ruta, DtActivosFijos, params, "CatalogoActivosFijos", Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 8b5995aea..a23c60cc3 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -2445,7 +2445,7 @@ Public Class ClsContabilidad End Function Public Function UpdateConta_PlantillasPolizasDetalle(CveConcepto As Integer, TipoMovto As Integer, IdCtaContable As Integer, Orden As Integer, CvePlantillaPolizaDetalle As Integer, CveSubProyecto As Integer, CveProveedor As Integer, - Optional CvePersonal As Integer = -1, Optional PorcentajeImpuesto As Decimal = 0) As Boolean + Optional CvePersonal As Integer = -1, Optional PorcentajeImpuesto As Decimal = 0, Optional CveCuenta As Integer = -1) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Conta_PlantillasPolizasDetalleUpdate") @@ -2460,6 +2460,8 @@ Public Class ClsContabilidad .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@PorcentajeImpuesto", SqlDbType.SmallMoney).Value = PorcentajeImpuesto + .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta + End With Try diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index e3177fe7f..373fb7416 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -41,7 +41,7 @@
    -
    +
    @@ -56,7 +56,7 @@
    -
    +
    @@ -110,7 +110,7 @@
    - +
    @@ -137,27 +137,26 @@
    -
    - -
    -