From fbbbd025133b73813a522fee40c0c67a7e3ff325 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 14 Aug 2023 19:20:29 -0700 Subject: [PATCH 001/111] =?UTF-8?q?--=20correci=C3=B3n=20de=20fecha=20de?= =?UTF-8?q?=20alta=20en=20el=20env=C3=ADo=20de=20correo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RH/Personal.aspx.vb | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index d0291a9fd..ecdf4d95e 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1914,12 +1914,8 @@ Partial Class RH_Personal Else TxtFechaInicioVac.Text = Now.ToString("dd/MM/yyyy") End If - - TxtFechaFinVac.Text = Now.AddDays(VacDiasDisponibles).ToString("dd/MM/yyyy") - - 'PERSONAL ALTAS If ObjPersonal.GetPersonalAltas(CvePersonal) Then GvPersonalAltas.DataSource = ObjPersonal.DtResultados @@ -2127,13 +2123,9 @@ Partial Class RH_Personal 'If ViewState("CveEstatusOriginal").ToString() <> DdlEstatusPersonal.SelectedValue Then ' 'Manda Mail con bajas 'End If - - Else TieneError = True End If - - 'GUARDA ORGANIGRAMA If Not TieneError Then If Not ObjPersonal.AddUpdatePersonalOrganigrama(CvePersonal, If(DdlSupervisorOrganigrama.SelectedValue.ToEntero() = 0, CvePersonal, DdlSupervisorOrganigrama.SelectedValue.ToEntero())) Then @@ -2164,7 +2156,6 @@ Partial Class RH_Personal End Using CargaDatos() End If - End If GuardarDocumentosFirmaContrato() @@ -2179,7 +2170,7 @@ Partial Class RH_Personal If EnviarCorreoNomina AndAlso DDLUsuarioNomina.SelectedValue.ToEntero > 0 Then 'EnviarCorreoNominista() - EnviarCorreoBajaReingresoNomista(TipoMovimientoRH.Alta) + EnviarCorreoBajaReingresoNominista(TipoMovimientoRH.Alta) End If @@ -7585,7 +7576,7 @@ Partial Class RH_Personal If continuar Then - EnviarCorreoBajaReingresoNomista(If(estatus = 1, TipoMovimientoRH.Reingreso, TipoMovimientoRH.Baja)) + EnviarCorreoBajaReingresoNominista(If(estatus = 1, TipoMovimientoRH.Reingreso, TipoMovimientoRH.Baja)) End If @@ -7741,7 +7732,7 @@ Partial Class RH_Personal Reingreso End Enum - Private Sub EnviarCorreoBajaReingresoNomista(eTipoMovimientoRH As TipoMovimientoRH) + Private Sub EnviarCorreoBajaReingresoNominista(eTipoMovimientoRH As TipoMovimientoRH) Dim CorreoNominista As String = GlobalDTUsuarios(CveUsuario:=DDLUsuarioNomina.SelectedValue.ToEntero).FiltroPrimeroValor("Correo") @@ -7808,7 +7799,7 @@ Partial Class RH_Personal Cuerpo.AppendLine("") Cuerpo.AppendLine($"") - Cuerpo.AppendLine($"") + Cuerpo.AppendLine($"") Cuerpo.AppendLine("
{ If(DdlEmpresaAsignada.SelectedValue.ToEntero > 0, DdlEmpresaAsignada.SelectedItem.Text, UsuarioActual.Empresa.Empresa) }
{ Now.ToShortDateString } { Now.ToShortTimeString }
Notificacion por { TimpoMovimiento } de Nomina
Notificación por { TimpoMovimiento } de Nómina
") Cuerpo.AppendLine("
") @@ -7822,7 +7813,7 @@ Partial Class RH_Personal Cuerpo.AppendLine($"Ruta/Servicio:{ DdlRuta.SelectedItem.Text }") End If - Cuerpo.AppendLine($"Fecha de { TimpoMovimiento }:{ If(eTipoMovimientoRH = TipoMovimientoRH.Alta, Now.ToString("dd/MM/yyyy"), TxtFechaEstatus.Text) }") + Cuerpo.AppendLine($"Fecha de { TimpoMovimiento }:{ If(eTipoMovimientoRH = TipoMovimientoRH.Alta, TxtFechaIngreso.Text.ToDate.ToString("dd/MM/yyyy"), TxtFechaEstatus.Text) }") If eTipoMovimientoRH = TipoMovimientoRH.Baja Then Cuerpo.AppendLine($"Motivo de Baja:{ DdlMotivoBaja.SelectedItem.Text }") From 085941e7aff260d0a79a31c786dd32944467683c Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 14 Aug 2023 19:20:53 -0700 Subject: [PATCH 002/111] =?UTF-8?q?--=20correcci=C3=B3n=20idcuenta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad2/CatCuentasAsignaciones.aspx | 7 +------ Contabilidad2/CatCuentasAsignaciones.aspx.vb | 6 +----- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx b/Contabilidad2/CatCuentasAsignaciones.aspx index 13673cbd0..ad11d6e70 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx +++ b/Contabilidad2/CatCuentasAsignaciones.aspx @@ -141,12 +141,7 @@
-
-
- - - -
+
diff --git a/Contabilidad2/CatCuentasAsignaciones.aspx.vb b/Contabilidad2/CatCuentasAsignaciones.aspx.vb index e4fa615eb..1a163d7a1 100644 --- a/Contabilidad2/CatCuentasAsignaciones.aspx.vb +++ b/Contabilidad2/CatCuentasAsignaciones.aspx.vb @@ -68,10 +68,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones GvGlobal.DataBind() UpDatos.Update() - End Sub - Private Sub CargaDatosModal() DdlConceptoNomina.DataSource = GlobalDTNomConceptos(UsuarioActual.CveEmpresa) DdlConceptoNomina.DataBind() @@ -156,7 +154,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones End If DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion")) DdlAlmacen.SelectedValueExist(GvRow.DataKey("CveAlmacen")) - TxtIdCuentaContable.Text = GvRow.DataKey("IdCuenta") TxtPorcentajeIVA.Text = GvRow.DataKey("PorcentajeIVA") DdlCuentaBancaria.SelectedValueExist(GvRow.DataKey("CveBancoCuenta")) DdlSubProyectos.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero) @@ -310,8 +307,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones DdlClasificacion.SelectedValue = -1 DdlAlmacen.SelectedValue = -1 DdlConceptoNomina.SelectedValue = -1 - DdlCuentaBancaria.SelectedValueExist("-1") - TxtIdCuentaContable.Text = "" + DdlCuentaBancaria.SelectedValueExist("-1") TxtPorcentajeIVA.Text = "" DdlClientes.ddl.DataSource = "" DdlClientes.ddl.DataBind() From d096c384202934f89dda96118465656928c93ef9 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 14 Aug 2023 19:22:48 -0700 Subject: [PATCH 003/111] -- prepolizasdetalle --- General/SaldosIniciales.aspx.vb | 62 +++++++++++++++------------------ 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index ef46fc37a..5706e9f93 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1533,25 +1533,25 @@ Partial Class General_SaldosIniciales If TipoDocto = "NC" Then ConceptoContablePago = 60 'PrePólizaDetalle - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Folio, IIf(TipoDocto = "Fac", 5, 18).ToString().ToEntero(), String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Total, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, Folio, 6, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=SubTotal, CveClasificacion:=CveClasificacion, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Total, IIf(TipoDocto = "Fac", 5, 18).ToString().ToEntero(), Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, SubTotal, 6, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveClasificacion:=CveClasificacion, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For If IVA > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Folio, 14, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=IVA, CveSubProyecto:=Sucursal.ToEntero(), CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeIVA.ToDecimal) Then ErrorCompras = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, IVA, 14, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero(), CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeIVA.ToDecimal) Then ErrorCompras = True : Exit For End If - If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, Folio, 25, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=IEPS, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For + If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, IEPS, 25, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For - If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetIVA, Folio, 15, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetIVA, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For - If RetISR > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetISR, Folio, 16, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=RetISR, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For - If ImpuestosLocales > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImpuestosLocales, Folio, 27, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=ImpuestosLocales, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For + If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetIVA, RetIVA, 15, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For + If RetISR > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetISR, RetISR, 16, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For + If ImpuestosLocales > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImpuestosLocales, ImpuestosLocales, 27, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For 'Saldo If Saldo < Total Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, $"{Folio} SALDO INICIAL", 17, Folio, Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Total - Saldo) Then ErrorCompras = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, $"{Folio} SALDO INICIAL", 95, Folio, Fecha, -1, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=Total - Saldo) Then ErrorCompras = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Total - Saldo, 17, $"{Folio} SALDO INICIAL", Folio, CveCompra:=CveCompra, CveProveedor:=CveProveedor) Then ErrorCompras = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Total - Saldo, 95, $"{Folio} SALDO INICIAL", Folio, CveCompra:=CveCompra, CveProveedor:=CveProveedor) Then ErrorCompras = True : Exit For End If Encontrados = Encontrados + 1 @@ -1714,30 +1714,30 @@ Partial Class General_SaldosIniciales If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaComplementaria = True 'PrePólizaDetalle - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString(), 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero(), PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString(), ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, SubTotal, 4, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, CveSubProyecto:=Sucursal.ToEntero(), PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Total, ConceptoContable, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For If IVA > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString(), 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, IVA, 13, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For End If - 'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString(), 38, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For + 'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString(), 38, String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For If RetIVA > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, Folio.ToString(), 8, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=RetIVA, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, RetIVA, RetIVA, 8, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For End If If ImpuestoLocal > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImpuestoLocal, Folio.ToString(), 27, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImpuestoLocal, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImpuestoLocal, ImpuestoLocal, 27, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, PorcentajeImpuesto:=PorcentajeIVA, Contabilizable:=False) Then ErrorVentas = True : Exit For End If If UsaComplementaria Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total * TipoCambio.ToDecimal - Total, Folio.ToString(), 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal - Total, TipoCambio:=TipoCambio.ToDecimal, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total * TipoCambio.ToDecimal - Total, Total * TipoCambio.ToDecimal - Total, 203, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, TipoCambio:=TipoCambio.ToDecimal, Contabilizable:=False) Then ErrorVentas = True : Exit For End If 'Saldo If Saldo < Total Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Folio.ToString(), ConceptoContablePago, Folio.ToString(), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo, CveVentaAmortizacion:=CveVenta, Contabilizable:=False) Then ErrorVentas = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Folio.ToString(), 95, Folio.ToString(), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total - Saldo, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Total - Saldo, ConceptoContablePago, Folio.ToString(), Folio.ToString(), CveVenta:=CveVenta, CveCliente:=CveCliente, CveVentaAmortizacion:=CveVenta, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Total - Saldo, 95, Folio.ToString(), Folio.ToString(), CveVenta:=CveVenta, CveCliente:=CveCliente, Contabilizable:=False) Then ErrorVentas = True : Exit For End If Else @@ -1745,8 +1745,8 @@ Partial Class General_SaldosIniciales Dim CveIE As Integer = ObjIE.AddBancos_IE(1, 1, Fecha, Folio.ToString(), "", Total, 1, 1, "Anticipo Cliente", "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString(), 30, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False) Then ErrorVentas = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Folio.ToString(), 66, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Total, 30, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False) Then ErrorVentas = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Total, 66, Folio.ToString(), String.Format("{0}-{1}", Serie, Folio), CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False) Then ErrorVentas = True : Exit For End If Encontrados = Encontrados + 1 @@ -2227,7 +2227,7 @@ Partial Class General_SaldosIniciales If YaExiste = False AndAlso Afectable Then If IdCuenta > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", 95, Concepto, Now.ToDate, -1, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, Importe, 95, "", Concepto, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then TieneError = True Reporte.Append(NombreCuenta) NombreCuenta.GuardaLog @@ -2659,8 +2659,8 @@ Partial Class General_SaldosIniciales Dim CveIE As Integer = ObjBancos.AddBancos_IE(CveCuentaBancaria, CveTipoTransaccion, Fecha, FolioStr.ToString(), "", Importe, CveMoneda, TipoCambio, Descripcion, "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, FolioStr.ToString(), 30, FolioStr, Fecha, -1, -1, CveIE:=CveIE, Contabilizable:=False, ImporteMX:=ImporteMX, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, FolioStr.ToString(), 95, FolioStr, Fecha, -1, -1, CveIE:=CveIE, Contabilizable:=False, ImporteMX:=ImporteMX, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, ImporteMX, 30, FolioStr.ToString(), FolioStr, CveIE:=CveIE, Contabilizable:=False, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, ImporteMX, 95, FolioStr.ToString(), FolioStr, CveIE:=CveIE, Contabilizable:=False, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For End If @@ -2787,19 +2787,15 @@ Partial Class General_SaldosIniciales ErrorProceso = True Exit For End If - - Dim CveIE As Integer = ObjBancos.AddBancos_IE(CveCuentaBancaria, 1, Fecha, FolioStr.ToString(), "", Importe, CveMoneda, TipoCambio, Descripcion, "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, FolioStr.ToString(), 30, FolioStr, Fecha, -1, -1, CveIE:=CveIE, CveProveedor:=CveProveedor, Contabilizable:=False, ImporteMX:=ImporteMX, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, FolioStr.ToString(), 10, FolioStr, Fecha, -1, -1, CveIE:=CveIE, CveProveedor:=CveProveedor, Contabilizable:=False, ImporteMX:=ImporteMX, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, ImporteMX, 30, FolioStr.ToString(), FolioStr, CveIE:=CveIE, CveProveedor:=CveProveedor, Contabilizable:=False, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, ImporteMX, 10, FolioStr.ToString(), FolioStr, CveIE:=CveIE, CveProveedor:=CveProveedor, Contabilizable:=False, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For Contador = Contador + 1 Next - - If Not ErrorProceso Then Alert($"Se agregaron {Contador} Anticipos.") ObjBancos.Commit() @@ -2923,8 +2919,8 @@ Partial Class General_SaldosIniciales Dim CveIE As Integer = ObjBancos.AddBancos_IE(CveCuentaBancaria, 3, Fecha, FolioStr.ToString(), "", Importe, CveMoneda, TipoCambio, Descripcion, "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, FolioStr.ToString(), 30, FolioStr, Fecha, -1, -1, CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False, ImporteMX:=ImporteMX, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, FolioStr.ToString(), 66, FolioStr, Fecha, -1, -1, CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False, ImporteMX:=ImporteMX, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Importe, ImporteMX, 30, FolioStr.ToString(), FolioStr, CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, ImporteMX, 66, FolioStr.ToString(), FolioStr, CveIE:=CveIE, CveCliente:=CveCliente, Contabilizable:=False, ImporteME:=ImporteME, TipoCambio:=TipoCambio) Then ErrorProceso = True : Exit For Contador = Contador + 1 Next @@ -3652,8 +3648,8 @@ Partial Class General_SaldosIniciales Dim CveIE As Integer = ObjBancos.AddBancos_IE(CveCuentaBancaria, 3, Fecha, FolioStr.ToString(), "", Saldo, 1, 1, "Saldo Inicial", "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, FolioStr.ToString(), 30, FolioStr, Fecha, -1, -1, CveIE:=CveIE, CvePersonal:=CvePersonal, Contabilizable:=False, ImporteMX:=Saldo) Then ErrorRH = True : Exit For - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, FolioStr.ToString(), 28, FolioStr, Fecha, -1, -1, CveIE:=CveIE, CvePersonal:=CvePersonal, Contabilizable:=False, ImporteMX:=Saldo) Then ErrorRH = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Saldo, Saldo, 30, FolioStr.ToString(), FolioStr, CveIE:=CveIE, CvePersonal:=CvePersonal, Contabilizable:=False) Then ErrorRH = True : Exit For + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, Saldo, 28, FolioStr.ToString(), FolioStr, CveIE:=CveIE, CvePersonal:=CvePersonal, Contabilizable:=False) Then ErrorRH = True : Exit For End If From acb5d18fadd6a6ecc45337f39447d519c0d60850 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 14 Aug 2023 19:23:10 -0700 Subject: [PATCH 004/111] -- double a decimal --- App_Code/ClsBancos.vb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 05c8e5531..dc7db36d4 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -151,9 +151,9 @@ Public Class ClsBancos Public Property Referencia As String Public Property TipoCredito As Integer Public Property Plazo As Integer - Public Property ImporteCredito As Double - Public Property CreditoValor As Double - Public Property TotalFinanciado As Double + Public Property ImporteCredito As Decimal + Public Property CreditoValor As Decimal + Public Property TotalFinanciado As Decimal Public Property Proveedor As String Public Property CveProveedor As Integer Public Property CveTipoCredito As Integer @@ -2434,8 +2434,8 @@ Public Class ClsBancos FacturaSerieFolio = Data.Rows(0)("FacturaSerieFolio").ToString FacturaDescripcion = Data.Rows(0)("FacturaDescripcion").ToString FacturaFecha = Data.Rows(0)("FacturaFecha").ToString.ToDate - CreditoValor = Data.Rows(0)("CreditoValor").ToString.ToDouble - TotalFinanciado = Data.Rows(0)("TotalFinanciado").ToString.ToDouble + CreditoValor = Data.Rows(0)("CreditoValor").ToString.ToDecimal + TotalFinanciado = Data.Rows(0)("TotalFinanciado").ToString.ToDecimal CvePrePoliza = Data.Rows(0)("CvePrePoliza").ToString.ToEntero End If Retorno = True From 1670db7b6a09a0f5735d952d1c75a003a518beb5 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 15 Aug 2023 08:26:42 -0700 Subject: [PATCH 005/111] -- ruta de certificado para timbrado demo --- App_Code/Timbrado.vb | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 2b83f2fa6..44c917a60 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -1256,26 +1256,16 @@ Public Class Timbrado ' Retorno = If(Ret = "", True, False) Case 3 - Retorno = TimbrarFacturaProFactV40(UsuarioActual, Ventas) - - 'Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV) Case 4 - Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial) If Ret <> "" Then MensajeErrorCFDI = Ret Retorno = If(Ret = "", True, False) - Case 5 - Dim Ret As String = TimbrarFacturaPADEv40(Ventas, UsuarioActual, CvePACEspecial) If Ret <> "" Then MensajeErrorCFDI = Ret Retorno = If(Ret = "", True, False) - - End Select - - Return Retorno End Function @@ -1333,8 +1323,8 @@ Public Class Timbrado Clave = "12345678a" EmisorRFC = "EKU9003173C9" EmisorNombre = "ESCUELA KEMPER URGATE" - ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.key" - ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.cer" + ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.key" + ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.cer" UsuarioActual.Empresa.CodigoRegimenFiscal = "601" End If @@ -3095,8 +3085,8 @@ Public Class Timbrado EmisorRFC = "EKU9003173C9" UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE" - ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.key" - ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.cer" + ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.key" + ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.cer" Clave = "12345678a" TimbraProduccion = False @@ -3318,8 +3308,8 @@ Public Class Timbrado EmisorRFC = "EKU9003173C9" UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE" - ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.key" - ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.cer" + ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.key" + ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.cer" Clave = "12345678a" TimbraProduccion = False From 10973f003c2b916ab50c77e4d187d6227e4eff32 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 15 Aug 2023 08:27:32 -0700 Subject: [PATCH 006/111] -- limpieza --- Bancos/ClientesAbonar.aspx.vb | 2845 --------------------------------- 1 file changed, 2845 deletions(-) delete mode 100644 Bancos/ClientesAbonar.aspx.vb diff --git a/Bancos/ClientesAbonar.aspx.vb b/Bancos/ClientesAbonar.aspx.vb deleted file mode 100644 index 84c7e3940..000000000 --- a/Bancos/ClientesAbonar.aspx.vb +++ /dev/null @@ -1,2845 +0,0 @@ -Imports System.Data -Imports Extensiones - -Partial Class Ventas_ClientesAbonar - Inherits ClsPaginas - - -#Region "Propiedades" - Private ReadOnly Property CveCliente As Integer - Get - Return ViewState("CveCliente").ToString.ToEntero - End Get - End Property - Private Property CveMoneda As Integer - Get - Return ViewState("CveMoneda").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("CveMoneda") = value - End Set - End Property - Private Property CveMonedaPago As Integer - Get - Return ViewState("CveMonedaPago").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("CveMonedaPago") = value - End Set - End Property - Private Property CveMonedaFiltro As Integer - Get - Return IfNull(ViewState("CveMonedaFiltro"), "0").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("CveMonedaFiltro") = value - End Set - End Property - Private Property FechaIngreso As Date - Get - Return ViewState("FechaIngreso").ToString.ToDate - End Get - Set(value As Date) - ViewState("FechaIngreso") = value - End Set - End Property - Private Property CveSubProyecto As Integer - Get - Return ViewState("CveSubProyecto").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("CveSubProyecto") = value - End Set - End Property - Private Property CveClienteSucursal As Integer - Get - Return If(IsNothing(ViewState("CveClienteSucursal")), -1, ViewState("CveClienteSucursal").ToString.ToEntero) - End Get - Set(value As Integer) - ViewState("CveClienteSucursal") = value - End Set - End Property - Private Property DTFuenteRecaudacion As DataTable - Get - Return CType(ViewState("DTFuenteRecaudacion"), DataTable) - End Get - Set(value As DataTable) - ViewState("DTFuenteRecaudacion") = value - End Set - End Property - Private Property DtIngresos As DataTable - Get - Return CType(ViewState("DtIngresos"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtIngresos") = value - End Set - End Property - Private Property DtPrestamos As DataTable - Get - Return CType(ViewState("DtPrestamos"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtPrestamos") = value - End Set - End Property - Private Property NombreComercial As String - Get - Return ViewState("NombreComercial").ToString - End Get - Set(value As String) - ViewState("NombreComercial") = value| - End Set - End Property - Private Property Mail As String - Get - If ViewState("Mail") Is Nothing Then - Return "" - Else - Return ViewState("Mail").ToString - End If - End Get - Set(value As String) - ViewState("Mail") = value - End Set - End Property - Private Property CFDIRelacionadoSustitucion As String - Get - If ViewState("CFDIRelacionadoSustitucion") Is Nothing Then - Return "-1" - Else - Return ViewState("CFDIRelacionadoSustitucion").ToString - End If - End Get - Set(value As String) - ViewState("CFDIRelacionadoSustitucion") = value - End Set - End Property - Private Property FechaCorteIE As DateTime - Get - Return ViewState("FechaCorteIE").ToString.ToDateTime - End Get - Set(value As DateTime) - ViewState("FechaCorteIE") = value - End Set - End Property - Private Property IDPoliza As Integer - Get - Return ViewState("IDPoliza").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("IDPoliza") = value - End Set - End Property - Private Property FolioIECancelado As String - Get - If ViewState("FolioIECancelado") Is Nothing Then - Return "-1" - Else - Return ViewState("FolioIECancelado").ToString - End If - End Get - Set(value As String) - ViewState("FolioIECancelado") = value - End Set - End Property - Private Property ComplementoSustitucionGenerado As Boolean - Get - Return CBool(ViewState("ComplementoSustitucionGenerado")) - End Get - Set(value As Boolean) - ViewState("ComplementoSustitucionGenerado") = value - End Set - End Property - Private Property Fecha As Date - Get - Return ViewState("Fecha").ToString.ToDate - End Get - Set(value As Date) - ViewState("Fecha") = value - End Set - End Property -#End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - CveMonedaPago = -1 - If Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente").ToString.ToEntero > 0 Then - ViewState("CveCliente") = Request("CveCliente").ToString.ToEntero - 'ViewState("CveUsuario") = IfNultl(Request("CveUsuario"), "-1").ToStrirowComisionesng.ToEntero - ViewState("CveMonedaFiltro") = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero - ViewState("CveMoneda") = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero - ViewState("FechaI") = IfNull(Request("FechaI"), "-1").ToString.ToEntero - ViewState("FechaE") = IfNull(Request("FechaE"), "-1").ToString.ToEntero - ViewState("CveSubProyecto") = IfNull(Request("CveSubProyecto"), "-1").ToString.ToEntero - ViewState("CveClienteSucursal") = IfNull(Request("CveClienteSucursal"), "-1").ToString.ToEntero - - DdlProveedorIntermediario.setEsWebService(True) - DdlProveedorIntermediario.Attributes.Add("data-metodo", "getproveedores") - DdlProveedorIntermediario.SelectedText = "Seleccione" - DdlProveedorIntermediario.SelectedValue = "-1" - - FechaCorteIE = DateTime.Now - - Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day) - Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate - - If UsuarioActual.Empresa.Funcionalidad(712) = "1" Then - PorletIntermediario.Visible = True - End If - - If CargaCliente(CveCliente, CveMonedaFiltro) Then - - IdCuentaBancaria = 0 - - TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1},-1);", "TxtTotal", 0)) - 'TxtAnticipo.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1},-1);", "null", 0)) - - If CveMoneda > 0 Then LbTipoMoneda.Text = String.Format("Pago en {0}", GlobalDTMonedas.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda)).Rows(0)("Moneda")) - - If CveMoneda = 2 Then - ChkPagarPesos.Visible = True - TxtTC.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - TxtTCDolaresDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - DivTCDolaresDolares.Visible = True - TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") - ElseIf CveMoneda = 1 Then - ChkPagarDolares.Visible = True - TxtTCDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - ElseIf CveMoneda = -1 Then - TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") - TxtTCDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - TxtTC.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - End If - - If UsuarioActual.TienePermisoProceso(209) Or UsuarioActual.TienePermisoProceso(204) Then - HlSaldarCuentasIncobrables.Visible = True - End If - - End If - - If CveMonedaFiltro = -1 Then - ChkPagarPesos.Visible = False - ChkPagarDolares.Visible = False - End If - - RegistraScript($"TipoCambioActual = {GlobalTipoCambio(Fecha).FormatoNumero(4)}") - End If - - RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy") - - - If UsuarioActual.CveEmpresa.Contiene(13, 83, 158) Then - LnkAccionesModalSeleccionLayout.Visible = True - - End If - - End If - - If (CveMonedaFiltro = 2 And ChkPagarPesos.Checked) Then - RegistraScript("document.getElementById('DivTC').style.display = 'block';") - End If - - End Sub - - Private Sub CargaTipoTransaccion() - DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Ing' AND Estatus = 1 ") - DdlTipoTransaccion.DataBind() - DdlTipoTransaccion.Items.Insert(0, New ListItem("Seleccione Tipo Movimiento", "-1")) - RecargaCuentasDepositos() - End Sub - - Private Sub CargaCuentas() - DdlCuenta.Items.Clear() - Dim CveTipoCuenta As Integer = 2 - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then CveTipoCuenta = -1 'que se muestren todas, para empresa acumuladores - - Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=CveTipoCuenta) - - If ChkPagarPesos.Checked Then - dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1)) - RegistraScript("CambiaPesosDolares();") - ElseIf ChkPagarDolares.Checked Then - dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 2)) - RegistraScript("CambiaDolaresPesos();") - Else - If CveMonedaFiltro > 0 Then - dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", CveMonedaFiltro)) - End If - End If - - DdlCuenta.DataSource = dt - DdlCuenta.DataBind() - DdlCuenta.Items.Insert(0, New ListItem("Seleccione cuenta", "-1")) - End Sub - - Private Function CargaCliente(tCveCliente As Integer, tCveMoneda As Integer) As Boolean - Dim Retorno As Boolean = False - Dim ObjCliente As New ClsClientes() - If ObjCliente.GetClientes(tCveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then - If ObjCliente.DtResultados.Rows.Count > 0 Then - Retorno = True - CargaCuentas() - CargaTipoTransaccion() - - TxtFechaDocumento.Text = Now.ToShortDateString.ToString - TxtAboneA.Enabled = False - LbEncabezado.Text = String.Format("{1}", CveCliente, ObjCliente.NombreComercial) - TxtAboneA.Text = ObjCliente.NombreComercial - NombreComercial = ObjCliente.NombreComercial - TxtImporte.Attributes.Add("disabled", "disabled") - If DdlTipoTransaccion.SelectedValue = "1" Then RFVFolio.Enabled = True Else RFVFolio.Enabled = False - Mail = String.Format("{0};{1}", ObjCliente.CobranzaCorreo, ObjCliente.NotificarA) - - If Request("FechaI") IsNot Nothing Then ViewState("FechaI") = Request("FechaI") Else ViewState("FechaI") = "-1" - If Request("FechaF") IsNot Nothing Then ViewState("FechaF") = Request("FechaF") Else ViewState("FechaF") = "-1" - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then - - divAnticipo.Visible = True - divPrestamo.Visible = True - - GvCxC.Columns(17).HeaderText = "Comisión
Venta" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol1).FiltroPrimeroValor("Clasificacion").Substring(0, 10) - GvCxC.Columns(18).HeaderText = "Gastos
Manejo" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol2).FiltroPrimeroValor("Clasificacion").Substring(0, 12) - GvCxC.Columns(19).HeaderText = "Servicio
Inspección" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol3).FiltroPrimeroValor("Clasificacion").Substring(0, 12) - GvCxC.Columns(20).HeaderText = "Seguro" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol4).FiltroPrimeroValor("Clasificacion").Substring(0, 12) - GvCxC.Columns(21).HeaderText = "Aduana
Mex" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol5).FiltroPrimeroValor("Clasificacion").Substring(0, 12) - GvCxC.Columns(22).HeaderText = "Diversos" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol6).FiltroPrimeroValor("Clasificacion").Substring(0, 12) - GvCxC.Columns(23).HeaderText = "Aduana
USA" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12) - GvCxC.Columns(24).HeaderText = "Material
Empaque" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12) - GvCxC.Columns(25).HeaderText = "Semilla" 'GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacionCol7).FiltroPrimeroValor("Clasificacion").Substring(0, 12) - GvCxC.Columns(26).HeaderText = "Total
Gastos" - - DvLiquidacion1.Visible = True - DvLiquidacion2.Visible = True - - DtIngresos = CargaIngresos(2) - DtPrestamos = CargaPrestamos(1) - End If - - CargaDatos(tCveMoneda) - Else - Alert("El Cliente Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia) - End If - End If - ObjCliente.Dispose() - Return Retorno - End Function - - Private Sub CargaDatos(pCveMoneda As Integer) - Dim Mov As New ClsMovimientos - Dim FechaI As String = IfNull(Request("FechaI"), "-1") - Dim FechaF As String = IfNull(Request("FechaF"), "-1") - - Dim FechaCorte As Date = DateTime.Now.AddYears(1).ToShortDateString.ToString.ToDate - - Dim SumDescuentoProntoPago As Double = 0.0 - If Mov.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, FechaI, FechaF, pCveMoneda, CveSubProyecto, UsuarioActual.CveEmpresa, CveClienteSucursal, FechaCorte:=FechaCorte) Then - Dim TmpCxCAux As DataTable - TmpCxCAux = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") - SumDescuentoProntoPago = TmpCxCAux.SUM("DescuentoProntoPago") - - GvCxC.DataSource = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio") - CveMoneda = pCveMoneda - - End If - Mov.Dispose() - GvCxC.DataBind() - - TxtImporte.Text = "" - TxtObservaciones.Text = "" - If SumDescuentoProntoPago > 0.0 Then - GvCxC.Columns(14).Visible = True 'MOSTRAR DESCUENTO PRONTO PAGO - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - GvCxC.Columns(15).Visible = True 'HABILITAR NC - End If - End If - - UPVentas.Update() - End Sub - - Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged - 'recargo la moneda con la que se va a pagar - Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue) - Dim moneda As Integer = 0 - If DdlCuenta.SelectedValue > 0 Then - moneda = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero}").ToEntero - End If - - CveMonedaPago = moneda - - If dr IsNot Nothing Then - If ChkPagarPesos.Checked Then - CveMoneda = 2 - RegistraScript("document.getElementById('DivTC').style.display = 'block';") - RegistraScript("CambiaPesosDolares();") - TxtTC.Attributes.Add("onkeyup", String.Format("FnCambia(0,0,0,0,1,{0});", moneda)) - ElseIf ChkPagarPesos.Checked = False Then - CveMoneda = dr("CveMoneda").ToString.ToEntero - RegistraScript("document.getElementById('DivTC').style.display = 'none';") - RegistraScript("CambiaDolaresPesos();") - TxtTC.Attributes.Add("onkeyup", String.Format("FnCambia(0,0,0,0,1,{0});", moneda)) - End If - - If ChkPagarDolares.Checked Then - CveMoneda = 1 - TxtTCDolares.Attributes.Add("onkeyup", String.Format("FnCambia(0,0,0,0,1,{0});", moneda)) - End If - ValidaCuentaDePagoFormaDePago() - End If - - CargaDatos(CveMoneda) - - - ' si no tiene CveMoneda, o es -1, cuando cambia de cuenta filtra las facturas - If IfNull(Request("CveMoneda"), "-1").ToString.ToEntero = -1 Then - CargaDatos(-1) - - moneda = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero}").ToEntero - If moneda = 1 Then - 'DivTC.Visible = True - DivTCDolares.Visible = False - TxtTC.Attributes.Add("onkeyup", String.Format("FnCambia(0,0,0,0,-1,{0});", moneda)) - ElseIf moneda = 2 Then - 'DivTC.Visible = False - RegistraScript("document.getElementById('DivTC').style.display = 'none';") - DivTCDolares.Visible = True - TxtTCDolares.Attributes.Add("onkeyup", String.Format("FnCambia(0,0,0,0,-1,{0});", moneda)) - End If - End If - - If HdnTipoTransaccion.Value = "Ing" AndAlso UsuarioActual.Empresa.Funcionalidad(505) <> "1" Then - If UsuarioActual.CveEmpresa = 119 Then - Dim ObjFolios As New ClsGralFolios - If ObjFolios.GetFolios("RMF", UsuarioActual.CveEmpresa) Then - Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo'")) - If DT.Rows.Count > 0 Then - TxtFolio.Text = DT.Rows(0)("FActual").ToString.ToEntero - End If - ObjFolios.Dispose() - End If - Else - Dim Folio As Long - Dim Banco As New ClsBancos - Folio = Banco.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero) - Banco.Dispose() - TxtFolio.Text = Folio.ToString - - End If - - Else - TxtFolio.Text = "" - - End If - - - End Sub - - Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged - Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing - If dr IsNot Nothing Then - HdnTipoTransaccion.Value = dr("Tipo").ToString - End If - RecargaCuentasDepositos() - 'CargaCuentas() - ValidaCuentaDePagoFormaDePago() - End Sub - - Protected Sub GvCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxC.RowDataBound - - If e.Row.RowType = DataControlRowType.DataRow Then - Dim moneda As Integer = 0 - If e.Row.RowIndex = 0 Then - e.Row.BackColor = Drawing.Color.LightGray - e.Row.FCDropDownList("DdlTG").Visible = False - e.Row.FCTextBox("TxtLiqCol1").Visible = False - e.Row.FCTextBox("TxtLiqCol2").Visible = False - e.Row.FCTextBox("TxtLiqCol3").Visible = False - e.Row.FCTextBox("TxtLiqCol4").Visible = False - e.Row.FCTextBox("TxtLiqCol5").Visible = False - e.Row.FCTextBox("TxtLiqCol6").Visible = False - e.Row.FCTextBox("TxtLiqCol7").Visible = False - e.Row.FCTextBox("TxtLiqCol8").Visible = False - e.Row.FCTextBox("TxtLiqCol9").Visible = False - e.Row.FCTextBox("TxtLiqColT").Visible = False - e.Row.FCTextBox("TxtAmort").Visible = False - e.Row.FCTextBox("TxtAmort2").Visible = False - e.Row.FCDropDownList("DdlAnti").Visible = False - e.Row.FCDropDownList("DdlAnti2").Visible = False - - End If - If e.Row.RowIndex = 1 Then - e.Row.Cells(0).Width = Unit.Pixel(25) - e.Row.Cells(1).Width = Unit.Pixel(90) - e.Row.Cells(2).Width = Unit.Pixel(70) - e.Row.Cells(3).Width = Unit.Pixel(70) - e.Row.Cells(6).Width = Unit.Pixel(50) - e.Row.Cells(7).Width = Unit.Pixel(70) - e.Row.Cells(8).Width = Unit.Pixel(50) - 'e.Row.Cells(9).Width = Unit.Pixel(90) - 'e.Row.Cells(10).Width = Unit.Pixel(80) - 'e.Row.Cells(11).Width = Unit.Pixel(60) - End If - - e.Row.Cells(9).HorizontalAlign = HorizontalAlign.Right - e.Row.Cells(10).HorizontalAlign = HorizontalAlign.Right - - If e.Row.DBCampo("Saldo").ToDecimal < 0 Then e.Row.Cells(11).ForeColor = Drawing.Color.Red - If e.Row.DBCampo("DiasVencidos").ToDecimal > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(5).ForeColor = Drawing.Color.Red - If e.Row.DBCampo("Original").ToDecimal = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = "" - If e.Row.DBCampo("Abonado").ToDecimal = 0 Then DirectCast(e.Row.FindControl("LtlAbonado"), Literal).Text = "" - If e.Row.DBCampo("Saldo").ToDecimal = 0 Then DirectCast(e.Row.FindControl("LtlSaldo"), Literal).Text = "" - - Select Case RblTipoPago.SelectedValue - Case "1" - If DdlCuenta.SelectedValue > 0 Then - moneda = CveMonedaPago - ElseIf RblTipoPago.SelectedValue = "1" Then - e.Row.FCCheckBox("Chk").Enabled = False - e.Row.FCTextBox("TxtAbonar").Enabled = False - End If - Case "3" - moneda = CveMonedaPago - - End Select - - If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then - e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6},{0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID, e.Row.DBCampo("CveVenta"))) - Else - e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4},{5});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta"))) - End If - - If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then - If e.Row.DBCampo("TipoDocto") = "Rem" Then - e.Row.FCCheckBox("Chk").Visible = False ' que no se pueda pagar si es remisión - e.Row.Cells(0).ToolTip = "El documento es remisión y no se puede realizar el pago" - End If - End If - - - If e.Row.DBCampo("CveVenta").ToEntero > 0 Then - e.Row.FCLiteral("LtlAux").Text = String.Format("Ir", e.Row.DBCampo("CveCliente").ToEntero, e.Row.DBCampo("CveVenta").ToEntero) - e.Row.FCTextBox("TxtAbonar").Attributes.Add("onblur", String.Format("FnCambia({0},this,{1},1,{2},{3});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), CveMonedaFiltro, moneda)) - - If UsuarioActual.Empresa.Funcionalidad(157).ToDecimal <> 0 Then - e.Row.FCTextBox("TxtComision").Attributes.Add("onblur", String.Format("FnLimites({0},this,{1},{2},2);", e.Row.FCCheckBox("Chk").ClientID, -UsuarioActual.Empresa.Funcionalidad(157), UsuarioActual.Empresa.Funcionalidad(157).ToString.ToDecimal)) - e.Row.FCRangeValidator("RVComision").MinimumValue = -UsuarioActual.Empresa.Funcionalidad(157).ToString.ToDecimal - e.Row.FCRangeValidator("RVComision").MaximumValue = UsuarioActual.Empresa.Funcionalidad(157).ToString.ToDecimal - e.Row.FCRangeValidator("RVComision").Enabled = True - Else - e.Row.FCTextBox("TxtComision").Attributes.Add("onblur", String.Format("FnCambia({0},this,{1},2,{2},{3});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo"), CveMonedaFiltro, moneda)) - e.Row.FCRangeValidator("RVComision").MinimumValue = 0.00 - e.Row.FCRangeValidator("RVComision").MaximumValue = e.Row.DBCampo("Saldo") - End If - - If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 AndAlso e.Row.DBCampo("DiasVencidos").ToEntero() <= 5 Then - e.Row.FCCheckBox("ChkGenerarNC").Visible = True - e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta"))) - End If - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then '' si es empresa agrícola - - e.Row.FCDropDownList("DdlTG").DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa) - e.Row.FCDropDownList("DdlTG").DataBind() - - e.Row.FCTextBox("TxtLiqCol1").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}") - e.Row.FCTextBox("TxtLiqCol2").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}") - e.Row.FCTextBox("TxtLiqCol3").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}") - e.Row.FCTextBox("TxtLiqCol4").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}") - e.Row.FCTextBox("TxtLiqCol5").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}") - e.Row.FCTextBox("TxtLiqCol6").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}") - e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}") - e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}") - e.Row.FCTextBox("TxtLiqCol9").Attributes.Add("class", $"ClsSelLiq ClsSelLiqVenta{e.Row.DBCampo("CveVenta")}") - - e.Row.FCTextBox("TxtLiqColT").Attributes.Add("class", $"ClsSelLiqVentaTotal{e.Row.DBCampo("CveVenta")}") - e.Row.FCTextBox("TxtAmort").Attributes.Add("class", $"ClsSelLiqAnt") - e.Row.FCTextBox("TxtAmort2").Attributes.Add("class", $"ClsSelLiqAnt") - - e.Row.FCTextBox("TxtLiqCol1").Attributes.Add("onkeyup", $"SumaLiq (this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtLiqCol2").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtLiqCol3").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtLiqCol4").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtLiqCol5").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtLiqCol6").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtLiqCol7").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtLiqCol8").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtLiqCol9").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtAmort").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - e.Row.FCTextBox("TxtAmort2").Attributes.Add("onkeyup", $"SumaLiq(this,{e.Row.DBCampo("CveVenta")},{CveMonedaFiltro},{ moneda})") - - e.Row.FCDropDownList("DdlAnti").DataSource = DtIngresos - e.Row.FCDropDownList("DdlAnti").DataBind() - e.Row.FCDropDownList("DdlAnti").Items.Insert(0, New ListItem("-", "-1")) - - e.Row.FCDropDownList("DdlAnti2").DataSource = DtIngresos - e.Row.FCDropDownList("DdlAnti2").DataBind() - e.Row.FCDropDownList("DdlAnti2").Items.Insert(0, New ListItem("-", "-1")) - - End If - - Else - e.Row.FCTextBox("TxtAbonar").Visible = False - e.Row.FCTextBox("TxtComision").Visible = False - e.Row.FCCheckBox("Chk").Visible = False - End If - - If e.Row.DBCampo("CveVenta").ToEntero > 0 Then - If e.Row.DataKey("ClaveMetodoPagoSAT") = "PUE" Then - e.Row.FCLiteral("LtlComplemento").Text = "" - End If - Else - e.Row.FCLiteral("LtlComplemento").Visible = False - End If - - End If - End Sub - - Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click - - 'SI ES EMPRESA DE ACUMULADORES DEBE OBLIGAR A SUBIR UN ARCHIVO - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - Dim files = Anexo.getfiles() - If files IsNot Nothing Then - If files.Archivos IsNot Nothing Then - If files.Archivos.Count = 0 Then - Alert("Debe anexar un archivo", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - Else - Alert("Debe anexar un archivo", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - Else - Alert("Debe anexar un archivo", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - End If - - If RblTipoPago.SelectedValue = "1" Then - - Dim ValFechaDocumento As Boolean = False - Dim FoliosFechasValFechaDocumento As New StringBuilder - FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago:
") - - For Each gvRowVal As GridViewRow In GvCxC.Rows - - If gvRowVal.FCCheckBox("Chk").Checked Then - - Dim FechaFactura As Date = gvRowVal.DataKey("Fecha").ToDate - Dim FechaDocumento As Date = TxtFechaDocumento.Text.ToDate - - Dim AnioFactura As Integer = FechaFactura.Year - Dim MesFactura As Integer = FechaFactura.Month - - Dim AnioDocumento As Integer = FechaDocumento.Year - Dim MesDocumento As Integer = FechaDocumento.Month - - If UsuarioActual.Empresa.UsaAC = False Then - If AnioFactura > AnioDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") - ValFechaDocumento = True - ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") - ValFechaDocumento = True - End If - - End If - End If - Next - - If ValFechaDocumento Then - Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia) - Exit Sub - End If - End If - - If Not TxtImporte.Text.ToDecimal > 0 Then - Alert("Debe de llevar un Importe", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - If Not (TxtFolio.Text.Trim <> "" Or RblTipoPago.SelectedValue = "2" Or RblTipoPago.SelectedValue = "3") Then - Alert("Debe de llevar un Folio", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - If TxtPrestamoImporte.Text.ToDecimal <> 0 AndAlso DdlPrestamo.SelectedValue = "-1" Then - Alert("Debe seleccionar un préstamo al especificar un valor.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - 'valida que no exceda lo seleccionado. con el valor del ie - If (RblTipoPago.SelectedValue = "3" AndAlso HdnIngresoImporte.Value.ToDecimal < TxtTotal.Text.ToDecimal) Then - Alert("Importe excedido para la aplicación", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - Dim Cuenta As String = "" - Dim CuentaDeposito As String = "" - - Dim seleccion As Integer = 0 - For Each gvr As GridViewRow In GvCxC.Rows - If gvr.FCCheckBox("Chk").Checked Then - seleccion += 1 - 'si hay liquidación- - If gvr.FCDropDownList("DdlAnti").SelectedValue = "-1" AndAlso gvr.FCTextBox("TxtAmort").Text.ToDecimal <> 0 Then - Alert("Importe de anticipo especificado y no seleccionado. F: " & gvr.DataKey("SerieFolio"), TipoMensaje.MsgAdvertencia) - Exit Sub - End If - End If - Next - - If seleccion = 0 Then - Alert("No ha seleccionado ninguna factura para abonar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - Dim CvePrePoliza As Integer = 0 - Dim IDPoliza As Integer = 0 - Dim FolioPoliza As String = "" - Dim CveIE As Integer = -1 - Dim CveVentasPago As New List(Of Integer) - Dim SeriesPago As New List(Of String) - - Dim MsgError As String = "" - Dim NCGeneradas As New List(Of RespuestaNotaCredrito) - Dim ListaFacturasGenerarNC As New List(Of Modelos.Factura) - - Dim ImporteSeleccionado As Decimal = 0 - - '02-05-2018 MANDAMOS CANCELAR EL COMPLEMENTO A SUSTITUIR - Dim ErrorCancelarIE As Boolean = False - - - Dim ObjIE As New ClsBancos() - Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL) - Dim ObjVentasSaldos As New ClsVentas(ObjIE.IniciaTransacSQL) - Dim ObjEvento As New ClsOIEventos(ObjIE.IniciaTransacSQL) - Dim ObjConta As ClsContPAQi = Nothing - - Try - Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos - Dim filemove As String = "" - Dim Comprobante As String = "" - ComplementoSustitucionGenerado = False - - For Each fileItem As Archivo In filesgral - Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") - filemove = fileItem.filename - Next - - Dim ConceptoPoliza As String = String.Format("{0} {1}", TxtAboneA.Text, TxtObservaciones.Text) - - If DdlCuenta.SelectedValue > 0 Then - CveMoneda = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero}").ToEntero - Else - CveMoneda = IfNull(Request("CveMoneda"), "1").ToString.ToEntero - End If - - CvePrePoliza = ObjMov.AddPrePolizas("Ventas/ClientesAbonar", 11, TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - If RblTipoPago.SelectedValue = "1" Then - Dim CveCuentaDeposito As Integer = 0 - Dim TipoCambio As Decimal = 0 - - If DdlCuentaDeposito.Items.Count > 0 Then - CveCuentaDeposito = DdlCuentaDeposito.SelectedValue.ToEntero - End If - - If CveMoneda = 2 Then - If TxtTCDolares.Visible Then - TipoCambio = TxtTCDolares.Text.ToDecimal - Else - TipoCambio = If(CveMonedaFiltro = -1, TxtTCDolares.Text.ToDecimal, TxtTCDolaresDolares.Text.ToDecimal) 'GlobalTipoCambio(TxtFechaDocumento.Text).ToString.ToDecimal - End If - Else - If TxtTC.Visible Then - TipoCambio = TxtTC.Text.ToDecimal - End If - End If - - Dim CveProvIntermediario As Integer - If ChkProveedorIntermediario.Checked Then - CveProvIntermediario = If(DdlProveedorIntermediario.SelectedValue.ToEntero <= 0, -1, DdlProveedorIntermediario.SelectedValue.ToEntero) - End If - CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text.Trim, TxtImporte.Text.ToDecimal, GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TipoCambio, TxtObservaciones.Text.Trim, "", True, True, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCuentaDeposito:=CveCuentaDeposito, CveProveedorIntermediario:=CveProvIntermediario) - Else - If RblTipoPago.SelectedValue.Contiene("3") Then 'ixc - CveIE = DdlIngreso.SelectedValue.ToEntero - If CveMonedaPago = 2 And Not ChkPagarPesos.Checked Then CveMoneda = 2 - If ChkPagarDolares.Checked Then CveMoneda = 2 - If ChkPagarPesos.Checked Then CveMoneda = 1 - End If - - End If - - If CveIE > 0 OrElse RblTipoPago.SelectedValue.Contiene("2", "3") Then - - 'Guardar archivo - If filemove <> "" Then - filemove.FilesMove(CveIE.ToString, String.Format("{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase:=False) - End If - - 'inserto los movimientos de la conta para abonar al saldo - If CvePrePoliza > 0 Then - - Dim CvePlantillaPoliza As Integer = 11 - Dim alertaContabilizacion As String = "Se enviaron correctamente las siguientes pólizas:

" - Dim idCuentaContabilizacion As Long = 1 - Dim CveCuentaContabilizacion As Long = 1 - Dim dtConceptos As DataTable = Nothing - Dim tipoCambioPago As Decimal - Dim TipoCambioGeneral As Decimal = 1 - Dim CveSubProyectoContabilizar As Integer = -1 - Dim CveSubProyectoMaximo As Integer = -1 - Dim CuentasContablesInvalidas As New StringBuilder - Dim FuncionalidadFluctuacionImpuestos As Boolean = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) - Dim TipoCambioFluctuacion As Decimal = 1 - Dim FechaUltimaFluctuacion As Date = MinFecha - - Dim tFecha As Date = TxtFechaDocumento.Text.ToDate - Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha) - - Dim ImportePrestamo As Decimal = 0 - Dim TCPrestamo As Decimal = 0 - - If CveSubProyectoMaximo <= 0 Then 'sino se seleccionó del combo, busca en el listado el primero - - For Each Gvr As GridViewRow In GvCxC.Rows - If Gvr.FCCheckBox("Chk").Checked Then - CveSubProyectoMaximo = Gvr.DataKey("CveSubProyecto").ToEntero - Exit For - End If - Next - End If - - If TxtPrestamoImporte.Text.ToDecimal <> 0 Then 'amortización del préstamo - ImportePrestamo = TxtPrestamoImporte.Text.ToDecimal - Dim tCveProv As Integer = DtPrestamos.FiltroPrimeroValor("CveProveedor", "CveIE=" & DdlPrestamo.SelectedValue).ToEntero - Dim tFechaIE As Date = DtPrestamos.FiltroPrimeroValor("FechaDocumento", "CveIE=" & DdlPrestamo.SelectedValue).ToDate - TCPrestamo = DtPrestamos.FiltroPrimeroValor("TipoCambio", "CveIE=" & DdlPrestamo.SelectedValue).ToDecimal - If CveMoneda = 1 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrestamo, ImportePrestamo, 57, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyectoMaximo, TipoCambio:=tipoCambioPago, CveProveedor:=tCveProv) Then - MsgError = "No se pudo insertar la póliza" - End If - Else - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If tFechaIE <= UltimaFluctuacion.FechaFluctuacion Then - FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion - TCPrestamo = UltimaFluctuacion.TCFluctuacion - End If - End If - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrestamo, ImportePrestamo, 349, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyectoMaximo, TipoCambio:=TCPrestamo, ImporteME:=ImportePrestamo, CveProveedor:=tCveProv) Then - MsgError = "No se pudo insertar la póliza" - End If - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrestamo, ((ImportePrestamo * TCPrestamo) - ImportePrestamo).RoundSQL, 350, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyectoMaximo, TipoCambio:=TCPrestamo, ImporteME:=ImportePrestamo, CveProveedor:=tCveProv) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - - End If - - If TxtPrestamoIntereses.Text.ToDecimal <> 0 AndAlso MsgError = "" Then - tipoCambioPago = If(TxtTCDolares.Visible, TxtTCDolares.Text.ToDecimal, TxtTCDolaresDolares.Text.ToDecimal) - Dim ImporteIntereses As Decimal = (TxtPrestamoIntereses.Text.ToDecimal * tipoCambioPago).RoundSQL - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteIntereses, ImporteIntereses, 51, TxtFolio.Text, TxtObservaciones.Text, 0, CveIE:=DdlPrestamo.SelectedValue.ToEntero, CveSubProyecto:=CveSubProyectoMaximo, TipoCambio:=tipoCambioPago, CveClasificacion:=21927) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - - 'inserto las ventas que voy a pagar - For Each gvr As GridViewRow In GvCxC.Rows - - If gvr.FCCheckBox("Chk").Checked Then - - Dim ObjFactura As Modelos.Factura = Nothing - Dim EsAnticipoEspecial As Boolean = False - - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - ObjFactura = New Modelos.Factura(UsuarioActual, gvr.DataKey("CveVenta").ToEntero(), UsuarioActual.CveEmpresa) - End If - - Dim VentaActual As New Venta(UsuarioActual) - VentaActual.CveVenta = gvr.DataKey("CveVenta").ToEntero - VentaActual.Fecha = gvr.DataKey("Fecha").ToDate - VentaActual.CveCliente = gvr.DataKey("CveCliente").ToEntero - VentaActual.CveMoneda = gvr.DataKey("CveMoneda").ToEntero - VentaActual.TipoDocto = gvr.DataKey("TipoDocto") - VentaActual.SerieFolio = gvr.DataKey("SerieFolio") - VentaActual.ClienteNombre = NombreComercial - VentaActual.TC = gvr.DataKey("TipoCambio").ToDecimal - VentaActual.Total = gvr.DataKey("Original").ToDecimal - VentaActual.IVA = gvr.DataKey("IVA").ToDecimal - VentaActual.IEPS = gvr.DataKey("IEPS").ToDecimal - VentaActual.RetIVA = gvr.DataKey("RetIVA").ToDecimal - VentaActual.RetISR = gvr.DataKey("RetISR").ToDecimal - - VentaActual.PorcentajeIVA = gvr.DataKey("PorcentajeIVA").ToDecimal - VentaActual.CveSubProyecto = gvr.DataKey("CveSubProyecto").ToEntero - - 'Importe de pago - Dim Pago As New VentaPago - Pago.Fecha = TxtFechaDocumento.Text.ToDate - Pago.CveIE = CveIE - Pago.CveMonedaPago = CveMoneda - Pago.ImportePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - Pago.ImportePagoVenta = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - Pago.Referencia = TxtFolio.Text - - If RblTipoPago.SelectedValue = "3" Then - Pago.TipoPago = "I" - Pago.FechaDocumentoRelacionado = FechaIngreso - End If - - 'Tipos de cambio - If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos - Pago.TCPago = TxtTC.Text.ToDecimal - ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES - Pago.TCPago = IIf(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal) - ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES - Pago.TCPago = TxtTCDolares.Text.ToDecimal - End If - tipoCambioPago = Pago.TCPago - - If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola - Dim FluctuacionAnticipo As Decimal = 0 - Dim ImporteLiq1 As Decimal = gvr.FCTextBox("TxtLiqCol1").Text.ToDecimal - Dim ImporteLiq2 As Decimal = gvr.FCTextBox("TxtLiqCol2").Text.ToDecimal - Dim ImporteLiq3 As Decimal = gvr.FCTextBox("TxtLiqCol3").Text.ToDecimal - Dim ImporteLiq4 As Decimal = gvr.FCTextBox("TxtLiqCol4").Text.ToDecimal - Dim ImporteLiq5 As Decimal = gvr.FCTextBox("TxtLiqCol5").Text.ToDecimal - Dim ImporteLiq6 As Decimal = gvr.FCTextBox("TxtLiqCol6").Text.ToDecimal - Dim ImporteLiq7 As Decimal = gvr.FCTextBox("TxtLiqCol7").Text.ToDecimal - Dim ImporteLiq8 As Decimal = gvr.FCTextBox("TxtLiqCol8").Text.ToDecimal - Dim ImporteLiq9 As Decimal = gvr.FCTextBox("TxtLiqCol9").Text.ToDecimal - - Dim CveClasificacionCol1 As Integer = 21514 'comisiones sobre venta - Dim CveClasificacionCol2 As Integer = 21916 ' manejo - Dim CveClasificacionCol3 As Integer = 21917 'servicios de inspección - Dim CveClasificacionCol4 As Integer = 21918 ' seguro liquidación - Dim CveClasificacionCol5 As Integer = 21561 ' gastos aduanales mex - Dim CveClasificacionCol6 As Integer = 21920 ' diveros - Dim CveClasificacionCol7 As Integer = 21919 'gastos aduanales usa - Dim CveClasificacionCol8 As Integer = 21211 'material Empaque - Dim CveClasificacionCol9 As Integer = 21207 'Semilla - - Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero - Dim CveConceptoLiquidacion As Integer = 51 - Dim ConceptoPartida As String = gvr.DataKey("SerieFolio") & " " & gvr.FCDropDownList("DdlTG").SelectedItem.Text - - If ImporteLiq1 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq1, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq1 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1, ImporteME:=If(CveMoneda > 1, ImporteLiq1, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq2 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq2, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq2 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2, ImporteME:=If(CveMoneda > 1, ImporteLiq2, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq3 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq3, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq3 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3, ImporteME:=If(CveMoneda > 1, ImporteLiq3, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq4 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq4, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq4 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4, ImporteME:=If(CveMoneda > 1, ImporteLiq4, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq5 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq5, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq5 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5, ImporteME:=If(CveMoneda > 1, ImporteLiq5, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq6 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq6, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq6 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6, ImporteME:=If(CveMoneda > 1, ImporteLiq6, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq7 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq7, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq7 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7, ImporteME:=If(CveMoneda > 1, ImporteLiq7, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq8 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq8, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq8 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol8, ImporteME:=If(CveMoneda > 1, ImporteLiq8, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If ImporteLiq9 <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiq9, gvr.DataKey("SerieFolio"), CveConceptoLiquidacion, ConceptoPartida, Now, -1, -1, CveIE, gvr.DataKey("CveVenta").ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiq9 * tipoCambioPago, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol9, ImporteME:=If(CveMoneda > 1, ImporteLiq9, 0), CveTipoGasto:=gvr.FCDropDownList("DdlTG").SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" : Exit For - End If - End If - - If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero > 0 Then - Dim TCP As Decimal = 0 - Dim FolioPago As String = " " - If DtIngresos IsNot Nothing Then - TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)) - FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) - Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti").SelectedValue)).ToDate - 'considera fluctuación - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then - tTCPFecha = UltimaFluctuacion.FechaFluctuacion - TCP = UltimaFluctuacion.TCFluctuacion - End If - End If - End If - 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo - FluctuacionAnticipo = ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort").Text.ToDecimal).RoundSQL - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort").Text.ToDecimal, TCP, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) - End If - - If MsgError = "" AndAlso gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero > 0 Then - Dim TCP As Decimal = 0 - Dim FolioPago As String = " " - If DtIngresos IsNot Nothing Then - TCP = DtIngresos.FiltroPrimeroValor("TipoCambio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) - FolioPago = DtIngresos.FiltroPrimeroValor("Folio", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)) - Dim tTCPFecha As Date = DtIngresos.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE={0}", gvr.FCDropDownList("DdlAnti2").SelectedValue)).ToDate - 'considera fluctuación - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If tTCPFecha <= UltimaFluctuacion.FechaFluctuacion Then - tTCPFecha = UltimaFluctuacion.FechaFluctuacion - TCP = UltimaFluctuacion.TCFluctuacion - End If - End If - - End If - 'se calcula la fluctuación de la aplicación del anticipo, para sumarla en el concepto de fluctuación más abajo - FluctuacionAnticipo += ((TCP - tipoCambioPago) * gvr.FCTextBox("TxtAmort2").Text.ToDecimal).RoundSQL - MsgError = RegistraAmortizacionAnticipo(ObjMov, CvePrePoliza, gvr.FCDropDownList("DdlAnti2").SelectedValue.ToEntero, gvr.FCTextBox("TxtAmort2").Text.ToDecimal, TCP, gvr.DataKey("CveVenta").ToEntero, gvr.DataKey("SerieFolio").ToString, FolioPago) - End If - - If ImportePrestamo <> 0 Then - If TCPrestamo > 0 Then - FluctuacionAnticipo += ((TCPrestamo - tipoCambioPago) * ImportePrestamo).RoundSQL - ImportePrestamo = 0 - End If - End If - Pago.ImporteFluctuacionAdicional = FluctuacionAnticipo - End If - - If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then - MsgError = "No se pudo insertar la póliza" - Exit For - End If - - ' Case 134 'Pago Intermediario - If RblTipoPago.SelectedValue = "2" Then - Dim ImporteMovimiento As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - gvr.FCTextBox("TxtComision").Text.ToDecimal - Dim ImporteMN As Decimal = (ImporteMovimiento * tipoCambioPago).RoundSQL - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 134, VentaActual.SerieFolio, VentaActual.SerieFolio, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - - 'PARA EMITIR COMPLEMENTO PAGO - CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero) - SeriesPago.Add(gvr.DataKey("SerieFolio")) - - - If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then - ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal() - ListaFacturasGenerarNC.Add(ObjFactura) - End If - - End If - Next - - If RblTipoPago.SelectedValue = "1" AndAlso MsgError = "" Then - - CveSubProyectoContabilizar = CveSubProyectoMaximo - - If CveMoneda = 2 Then - 'If IdCuentaBancariaComplementaria > 0 Then - If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES - tipoCambioPago = TxtTCDolares.Text.ToDecimal - ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then - tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal - End If - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtImporte.Text.Trim.ToDecimal, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then - MsgError = "No se pudo insertar la póliza" - End If - - If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), TxtObservaciones.Text, 204, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancariaComplementaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (TxtImporte.Text.Trim.ToDecimal * tipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then - MsgError = "No se pudo insertar la póliza" - End If - - Else - If CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES - tipoCambioPago = TxtTCDolares.Text.ToDecimal - ElseIf CveMoneda = 2 AndAlso CveMonedaFiltro = 2 Then - tipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal - End If - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDecimal, ObjIE.Folio, 30, TxtObservaciones.Text + If(CveMoneda = 2, $" TC:{tipoCambioPago}", ""), TxtFechaDocumento.Text, IdCuentaBancaria, -1, CveIE, -1, -1, CveSubProyectoContabilizar, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, TxtImporte.Text.Trim.ToDecimal * tipoCambioPago, TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 2, TxtImporte.Text.ToDecimal, 0), TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - End If - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola - If TxtAnticipo.Text.ToDecimal <> 0 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtAnticipo.Text.ToDecimal, TxtFolio.Text, 66, TxtObservaciones.Text, Now, -1, -1, CveIE, -1, -1, CveSubProyecto, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=TxtAnticipo.Text.ToDecimal, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=0, ImporteME:=If(CveMoneda > 1, TxtAnticipo.Text.ToDecimal, 0)) Then - MsgError = "No se pudo insertar la póliza" - End If - - If CveMoneda > 1 Then - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtAnticipo.Text.ToDecimal, TxtFolio.Text, 226, TxtObservaciones.Text, Now, -1, -1, CveIE, -1, -1, CveSubProyecto, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=((TxtAnticipo.Text.ToDecimal * tipoCambioPago) - TxtAnticipo.Text.ToDecimal).RoundSQL, TipoCambio:=tipoCambioPago, PorcentajeImpuesto:=0, ImporteME:=If(CveMoneda > 1, TxtAnticipo.Text.ToDecimal, 0)) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - - End If - - End If - - If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then - If Not ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then - MsgError = "No se pudo simplificar los movimientos" - Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError) - End If - End If - - If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then - If ObjMov.ValorPolizaDescuadre > 0 Then - MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia - End If - End If - - 'Conta ContPAQ - If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then - If idCuentaContabilizacion > 0 Then - If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - IDPoliza = ObjMov.ContaIdPoliza - FolioPoliza = ObjMov.ContaFolio - Else - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico") - MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico" - End If - Else - Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidas)) - End If - End If - Else - MsgError = "No se pudo insertar la póliza" - End If - Else - MsgError = "No se insertó el encabezado" - End If - - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso MsgError = "" Then - If MsgError = "" Then - If ListaFacturasGenerarNC.Count > 0 Then - - For Each Fac As Modelos.Factura In ListaFacturasGenerarNC - Dim ListaNC As New List(Of Modelos.Factura) - ListaNC.Add(Fac) - Dim Resp = GenerarNC(ObjIE.IniciaTransacSQL(), ObjConta, ListaNC) - - If Resp IsNot Nothing AndAlso Resp.Respuesta IsNot Nothing AndAlso Resp.Respuesta.CveVenta > 0 Then - NCGeneradas.Add(Resp) - Else - MsgError = "No se pudo generar la nota de crédito" - Exit For - End If - Next - - If MsgError = "" Then - If NCGeneradas.Count <> ListaFacturasGenerarNC.Count Then - MsgError = "No se generaron las notas de crédito seleccionadas" - End If - End If - - End If - End If - End If - - Dim ErrorAC As Boolean = False - - If MsgError = "" Then - If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then - Dim Fecha As Date = TxtFechaDocumento.Text.Trim.ToDate - ObjConta = New ClsContPAQi(UsuarioActual.Empresa) - ObjConta.IniciaTransacSQL() - Dim Facturas As New StringBuilder - - IDPoliza = ObjConta.AddPoliza(1, String.Format("Recaudado: {0}, {1}", TxtAboneA.Text, TxtObservaciones.Text), TxtImporte.Text.ToDecimal, TxtImporte.Text.ToDecimal, UsuarioActual.CveUsuario, Fecha) - FolioPoliza = ObjConta.Folio.ToString - - - Dim ConceptoRenglon As String - If IDPoliza > 0 Then - Dim PorcentajePago As Double = 1 - Dim Total As Double - Dim ObjVentas As New ClsVentas - Dim ImporteOP = 0.0 - Dim IdCuentaOP = -1 - - For Each gvr As GridViewRow In GvCxC.Rows - If gvr.FCCheckBox("Chk").Checked Then - If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = gvr.FCTextBox("TxtAbonar").Text.ToDecimal / gvr.DataKey("Original").ToDecimal Else PorcentajePago = 1 - - If ObjVentas.GetPresupuestosVentas(gvr.DataKey("CveVenta").ToEntero) Then - For Each drt As DataRow In ObjVentas.DtResultados.Rows - Total = drt("TotalPresupuesto").ToString.ToDecimal * PorcentajePago - ConceptoRenglon = String.Format("{0} {1}", gvr.DataKey("SerieFolio"), drt("FuenteRecaudacionRubroIngreso").ToString) - If Total > 0 Then - If Not ObjConta.AddMovimiento(IDPoliza, drt("IdCuentaDevengado").ToString.ToEntero, False, Total, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For : Exit For - - If Not ObjConta.AddMovimiento(IDPoliza, drt("IdCuentaRecaudado").ToString.ToEntero, True, Total, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For : Exit For - End If - - Next - If ErrorAC Then Exit For - - Facturas.AppendFormat(" {0}", gvr.DataKey("SerieFolio")) - End If - - End If - Next - ObjVentas.Dispose() - - 'AFECTAR MATRIZ EGRESOS - ConceptoRenglon = String.Format("Recaudado: {0} - F.{1}", TxtAboneA.Text, Facturas.ToString) - If ObjConta.AddMovimiento(IDPoliza, IdCuentaBancaria, False, TxtImporte.Text.ToDecimal, "", ConceptoRenglon, 0, Fecha, "") Then - If TxtImporte.Text.ToDecimal - ImporteOP > 0 Then - If Not ObjConta.AddMovimiento(IDPoliza, ViewState("CtaCliente").ToString.ToEntero, True, TxtImporte.Text.ToDecimal - ImporteOP, "", ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True - End If - Else - ErrorAC = True - End If - - Else - ErrorAC = True - End If - - If Not ErrorAC Then - ErrorAC = Not ObjConta.AjustaPoliza(IDPoliza) - End If - - If Not ErrorAC Then - ErrorAC = Not ObjIE.UpdateIEPrePoliza(Fecha, FolioPoliza.ToString, IDPoliza, CvePrePoliza, CveIE, 0) - End If - - End If - End If - - If ErrorAC Then - MsgError = "Error al Agregar la Póliza de Armonización Contable" - End If - - Catch ex As Exception - MsgError = "Ocurrió un error al guardar el movimiento" - OnError("Ocurrió un error al guardar el movimiento", ex) - End Try - - If MsgError = "" Then - ObjIE.Commit() - If ObjConta IsNot Nothing Then ObjConta.Commit() - - Dim StrMsg As New StringBuilder - StrMsg.AppendFormat("Abono Registrado Correctamente. Folio {1}
", CveIE, ObjIE.Folio) - - If IDPoliza > 0 Then StrMsg.AppendFormat("Poliza: {1}
", IDPoliza, FolioPoliza) - - Dim TextoComplementoPago = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago) - - For Each RespuestaNotaCredito In NCGeneradas - If RespuestaNotaCredito IsNot Nothing AndAlso RespuestaNotaCredito.Respuesta IsNot Nothing Then - Try - Dim ObjTimbradoNC As New Timbrado - Dim TimbroNC = ObjTimbradoNC.TimbrarFactura(UsuarioActual, RespuestaNotaCredito.ObjFacturaNC) - If Not TimbroNC Then - Alert(ObjTimbradoNC.MensajeErrorCFDI, TipoMensaje.MsgError) - End If - ObjTimbradoNC = Nothing - Catch ex As Exception - OnError("Ocurrió un error al timbrar la NC.", ex) - End Try - StrMsg.AppendFormat("Nota de crédito generada correctamente.

Folio: {1}
", RespuestaNotaCredito.Respuesta.CveVenta, RespuestaNotaCredito.Respuesta.SerieFolio) - End If - Next - Alert($"{StrMsg.ToString}

{TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx""")) - - Else - If ObjConta IsNot Nothing Then ObjConta.RollBack() - ObjIE.RollBack() - Alert(MsgError, TipoMensaje.MsgAdvertencia) - End If - - ObjIE.Dispose() - ObjVentasSaldos.Dispose() - ObjMov.Dispose() - If ObjConta IsNot Nothing Then ObjConta.Dispose() - ObjEvento.Dispose() - - UPVentas.Update() - - If MsgError = "" Then - LimpiaCampos() - End If - - End Sub - - Private Function RegistraAmortizacionAnticipo(ByRef ObjMov As ClsContabilidad, CvePrePoliza As Integer, CveIE As Integer, Importe As Decimal, tipoCambioPago As Decimal, CveVenta As Integer, ReferenciaVenta As String, ReferenciaPago As String) As String - Dim MsgError As String = "" - If CveMonedaPago = 2 Then - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe, ReferenciaVenta, 92, ReferenciaVenta, TxtFechaDocumento.Text, 0, -1, CveIE, CveCliente:=CveCliente, ImporteMX:=Importe, CveVenta:=CveVenta, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then - MsgError = "No se pudo insertar la póliza" - End If - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, If(CveMoneda = 1 AndAlso TxtTC.Visible, Importe / TxtTC.Text.ToDecimal, Importe), ReferenciaVenta, 227, TxtObservaciones.Text + If(TxtTC.Visible, $" TC:{TxtTC.Text}", If(CveMoneda = 2, $" TC:{tipoCambioPago}", "")), TxtFechaDocumento.Text, 0, -1, CveIE, CveCliente:=ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, (Importe * tipoCambioPago) - Importe, Importe), ImporteME:=If(CveMoneda = 2, Importe, 0), CveVenta:=CveVenta, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then - MsgError = "No se pudo insertar la póliza" - End If - - Else - - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Importe, ReferenciaVenta, 92, ReferenciaVenta, TxtFechaDocumento.Text, 0, -1, CveIE, CveCliente:=ViewState("CveCliente").ToString.ToEntero, ImporteMX:=If(CveMoneda = 2, Importe * tipoCambioPago, Importe), ImporteME:=If(CveMoneda = 2, Importe, 0), CveVenta:=CveVenta, TipoCambio:=tipoCambioPago, TipoCambioPago:=tipoCambioPago) Then - MsgError = "No se pudo insertar la póliza" - End If - End If - - Return MsgError - - End Function - -#Region " N O T A - D E - C R E D I T O" - Private Class RespuestaNotaCredrito - Public Property ObjFacturaNC As Modelos.Factura - Public Property Respuesta As Modelos.Factura.MMensajeFactura - End Class - - Private Function GenerarNC(SqlTransaccion As SqlClient.SqlTransaction, ObjConta As ClsContPAQi, ListaVentasGenerarNC As List(Of Modelos.Factura)) As RespuestaNotaCredrito - Dim Retorno As New RespuestaNotaCredrito() - Try - - Dim ObjFacturaDevolucion = New Modelos.Factura(UsuarioActual) - ObjFacturaDevolucion.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML - ObjFacturaDevolucion.CveUsuario = UsuarioActual.CveUsuario - ObjFacturaDevolucion.UsuarioCreo = UsuarioActual.Usuario - - Dim CveSubProyecto As Integer = Me.CveSubProyecto - Dim CveMoneda As Integer = Me.CveMoneda - Dim CveCliente As Integer = Me.CveCliente - - If CveSubProyecto <= 0 Then - CveSubProyecto = ListaVentasGenerarNC(0).CveSubProyecto - End If - - If CveMoneda <= 0 Then - CveMoneda = ListaVentasGenerarNC(0).CveMoneda - End If - - If CveCliente <= 0 Then - CveCliente = ListaVentasGenerarNC(0).CveCliente - End If - - Dim Folio As Integer = -1 - Dim Serie As String = "-1" - - ObjFacturaDevolucion.CveEmpresa = UsuarioActual.CveEmpresa - ObjFacturaDevolucion.TipoCambio = If(Me.CveMoneda = 1, 1, GlobalTipoCambio(Now).FormatoNumero(4).ToDecimal()) - ObjFacturaDevolucion.ConvertirPesos = False - ObjFacturaDevolucion.CveMoneda = CveMoneda - ObjFacturaDevolucion.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", $"CveMoneda = {CveMoneda}") - ObjFacturaDevolucion.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda}") - ObjFacturaDevolucion.Serie = Serie - ObjFacturaDevolucion.Folio = Folio - ObjFacturaDevolucion.Fecha = Now - ObjFacturaDevolucion.CvePrePoliza = -1 - ObjFacturaDevolucion.CveMetodoPago = 0 - ObjFacturaDevolucion.CondicionesPago = 0 ' 0 - Contado, 1 - Credito (CHECAR) - ObjFacturaDevolucion.FormaPago = 0 - - ObjFacturaDevolucion.TipoDocto = "Egs" - ObjFacturaDevolucion.Fecha = Now - - ObjFacturaDevolucion.Version = "4.0" - - ObjFacturaDevolucion.CveMetodoPago33 = 1 - ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición" - ObjFacturaDevolucion.ClaveMetodoPagoSAT = "PUE" - - Dim drtt As DataRow = GlobalDTTipoTransacciones.FiltroPrimero("CveTipoTransaccion =" & DdlTipoTransaccion.SelectedValue) - Dim dra As DataRow = GlobalDTVtaFormaPago.FiltroPrimero("CveFormaPago = " & drtt("CveFormaPago")) - - ObjFacturaDevolucion.CveFormaPago33 = dra("CveFormaPago").ToString - ObjFacturaDevolucion.FormaPago33 = dra("FormaPagoSAT").ToString - ObjFacturaDevolucion.FormaPagoSAT33 = dra("ClaveFormaPagoSAT").ToString - - ObjFacturaDevolucion.CveSubProyecto = CveSubProyecto - ObjFacturaDevolucion.SetSubProyecto() - - ObjFacturaDevolucion.CveCliente = CveCliente - ObjFacturaDevolucion.SetCliente() - - Dim ObjCliente As New ClsClientes - If ObjCliente.GetClientes(ObjFacturaDevolucion.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then - If ObjCliente.DtResultados.Rows.Count > 0 Then - - ObjFacturaDevolucion.CveUsoCFDI = 2 - ObjFacturaDevolucion.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", 2)) - ObjFacturaDevolucion.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", 2)) - - ObjFacturaDevolucion.DtDetalle = CreaDTDetalleNC() - - CargaImpuestos(ObjFacturaDevolucion, ListaVentasGenerarNC, ObjCliente.DesglosaIEPS, ObjCliente.RetIVA, ObjCliente.RetISR) - - End If - End If - - If ObjCliente.GetSucursales(CveCliente) Then - If ObjCliente.DtResultados.Rows.Count > 0 Then - ObjFacturaDevolucion.CveClienteSucursal = If(String.IsNullOrEmpty(ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'")), -1, ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "Estatus = 'Activo'").ToEntero()) - Else - ObjFacturaDevolucion.CveClienteSucursal = -1 - End If - End If - ObjCliente.Dispose() - - ObjFacturaDevolucion.CveTipoRelacion = 1 - ObjFacturaDevolucion.TipoRelacion = "01" - ObjFacturaDevolucion.DtVentasRelacionadas = New DataTable - ObjFacturaDevolucion.DtVentasRelacionadas.Columns.Add("CveVenta", GetType(Integer)) - - Dim Fol As New List(Of String) - For Each Fac In ListaVentasGenerarNC - Fol.Add(Fac.FolioFiscal) - - Dim RowVenta As DataRow = ObjFacturaDevolucion.DtVentasRelacionadas.NewRow - RowVenta("CveVenta") = Fac.CveVenta - - ObjFacturaDevolucion.DtVentasRelacionadas.Rows.Add(RowVenta) - Next - - ObjFacturaDevolucion.UUIDRelacionados = Fol - - Select Case ObjFacturaDevolucion.TipoDocto - Case "Ing" - ObjFacturaDevolucion.TipoDocumento = "Factura" - Case "REM" - ObjFacturaDevolucion.TipoDocumento = "Remision" - Case "Cot" - ObjFacturaDevolucion.TipoDocumento = "Cotizacion" - Case "Egs" - ObjFacturaDevolucion.TipoDocumento = "Nota de Crédito" - Case "Dev" - ObjFacturaDevolucion.TipoDocumento = "Nota de Devolución" - Case Else - ObjFacturaDevolucion.TipoDocumento = "" - End Select - - ObjFacturaDevolucion.FechaPago = Now - - ObjFacturaDevolucion.CveCorte = -1 - 'ObjFacturaDevolucion.CveMesa = -1 - ObjFacturaDevolucion.NumeroPersonas = 0 - ObjFacturaDevolucion.CveContrato = -1 - ObjFacturaDevolucion.DescripcionContrato = "" - ObjFacturaDevolucion.CveClienteSucursal = -1 - ObjFacturaDevolucion.Entrega = "" - ObjFacturaDevolucion.CveAlmacen = -1 - - Dim DtVentasNC = InicializaDTVentasNC() - - Dim TotalImporte As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("TotalImporte") - Dim ImporteIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIVA") - Dim ImporteRetIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetIVA") - Dim ImporteRetISR As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteRetISR") - Dim ImporteIEPS As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("ImporteIEPS") - Dim Descuento As Decimal = ObjFacturaDevolucion.DtDetalle.SUMD("Descuento") - Dim Amortizacion As Decimal = 0 - - Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion) - - 'DETALLES - ObjFacturaDevolucion.SubTotal = TotalImporte - ObjFacturaDevolucion.Descuento = Descuento - ObjFacturaDevolucion.Amortizacion = Amortizacion - ObjFacturaDevolucion.IVA = ImporteIVA - ObjFacturaDevolucion.RetIVA = ImporteRetIVA - ObjFacturaDevolucion.RetISR = ImporteRetISR - ObjFacturaDevolucion.IEPS = ImporteIEPS - ObjFacturaDevolucion.Total = Total - ObjFacturaDevolucion.TotalOtrosConceptos = 0 - - For Each Fac In ListaVentasGenerarNC - Dim Drt = DtVentasNC.NewRow - Drt("CveVenta") = Fac.CveVenta - Drt("Importe") = Fac.DescuentoProntoPago - Drt("FolioFiscal") = Fac.FolioFiscal - DtVentasNC.Rows.Add(Drt) - Next - - DtVentasNC.AcceptChanges() - - ObjFacturaDevolucion.DtVentasNC = DtVentasNC - - ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion, ListaVentasGenerarNC) - - Try - Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=SqlTransaccion, ObjContPaqTransac:=ObjConta) - Retorno.Respuesta = Resp - Catch ex As Exception - OnError("Ocurrió un error al guardar la NC de pronto pago", ex) - Retorno.Respuesta = Nothing - End Try - Retorno.ObjFacturaNC = ObjFacturaDevolucion - - Catch ex As Exception - OnError("Ocurrió un error al generar la NC de pronto pago", ex) - Retorno = Nothing - End Try - - Return Retorno - - End Function - - Private Function PreParaTimbre(Obj As Modelos.Factura, ListaVentasGenerarNC As List(Of Modelos.Factura)) As CFDITimbre - Dim Timbre As New CFDITimbre - Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) - Timbre.Comprobante.Folio = Obj.Folio.ToString() - Timbre.Comprobante.Serie = Obj.Serie - Timbre.Comprobante.Fecha = Obj.FechaCP - Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33 - Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33 - Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT - Timbre.Comprobante.SubTotal = Obj.SubTotal - Timbre.Comprobante.Descuentos = Obj.Descuento - Timbre.Comprobante.Moneda = Obj.MonedaSAT - Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString()) - Timbre.Comprobante.Total = Obj.Total - - Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP - If Timbre.Comprobante.LugarExpedicion = "" Then - Dim aa As String = "no se guardo lugar de expedicion" - aa.GuardaLog() - End If - - Timbre.Comprobante.Confirmacion = "" - - If Obj.FacturarSucursal Then - Timbre.Receptor.RFC = Obj.ClienteSucursal.RFC - Timbre.Receptor.Nombre = Obj.ClienteSucursal.Nombre - Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP - Else - Timbre.Receptor.RFC = Obj.Cliente.RFC - Timbre.Receptor.Nombre = Obj.Cliente.Nombre - Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP - End If - - Timbre.Receptor.RegimenFiscalReceptor = Obj.Cliente.CodigoRegimenFiscal - - Timbre.Receptor.ResidenciaFiscal = "" - Timbre.Receptor.NumeroRegistroTributario = "" - Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI - - If ListaVentasGenerarNC IsNot Nothing Then - Timbre.CFDIRelacionados.UUID.Clear() - - Dim RowTipoRelacion As DataRow = GlobalDTVtaTiposRelacion().FiltroPrimero($"CveTipoRelacion = {Obj.CveTipoRelacion}") - - Timbre.CFDIRelacionados.TipoRelacion = RowTipoRelacion("SATClaveTipoRelacion").ToString() - Timbre.CFDIRelacionados.TipoRelacionTexto = RowTipoRelacion("SATTipoRelacion").ToString() - - For Each Fac In ListaVentasGenerarNC - Timbre.CFDIRelacionados.UUID.Add(Fac.FolioFiscal) - Next - End If - - Dim totSubTotal As Decimal = If(UsuarioActual.Empresa.CvePAC = 3, Obj.DtDetalle.SUMD("Total"), Obj.SubTotal) 'Obj.SubTotal - Dim totIVA As Decimal = Obj.IVA - Dim totRetIVA As Decimal = Obj.RetIVA - Dim totRetISR As Decimal = Obj.RetISR - - Dim i As Integer = 1 - - 'detalles - Dim tPS As String = "" - - For Each drr As DataRow In Obj.DtDetalle.Rows - If drr("PS").ToString().Length = 1 Then - tPS = drr("Obs").ToString() - Else - If drr("PS").ToString().Length = 0 Then - tPS = "" - Else - tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) - End If - End If - - tPS = tPS.Replace("|", " ") - - If tPS.Length >= 1000 Then - Dim tPSRecortado = tPS.Remove(999, tPS.Length - 999) - tPS = tPSRecortado - End If - - 'condicionante, especial - If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto - - Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString().ToDecimal, - .Descripcion = tPS, - .ValorUnitario = drr("PU").ToString().ToDecimal, - .Importe = If(UsuarioActual.Empresa.CvePAC = 3, drr("Total").ToString().ToDecimal.RoundSQL(2), drr("TotalImporte").ToString().ToDecimal), - .Descuento = drr("Descuento").ToString().ToDecimal.RoundSQL(2), - .Unidad = drr("UM").ToString(), - .ClaveUnidad = drr("SATClaveUM").ToString(), - .ClaveProdServ = drr("SATClaveProdServ").ToString(), - .Noidentificacion = drr("Noidentificacion").ToString(), - .CuentaPredial = drr("CuentaPredial").ToString(), - .ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal, - .ObjetoImpuesto = drr("CodigoObjetoImpuesto").ToString()} - 'verifica suma subtotales - If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales - concepto.Importe = totSubTotal - End If - totSubTotal = totSubTotal - concepto.Importe - - 'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura - ' If drr("ImporteIVA").ToString().ToDouble > 0 Then - - 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos, y si la BASE de calculo es mayor a cero - If Timbre.Comprobante.Total > 0 AndAlso concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0 Then - concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(6), .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal}) - End If - - If drr("ImporteIEPS").ToString().ToDouble > 0 Then - concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal}) - End If - - If drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones - concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal}) - End If - - If drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR - concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetISR").ToString().ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal}) - End If - - Timbre.Conceptos.Add(concepto) - i += 1 - Next - - Return Timbre - End Function - - - Private Sub AgregaTempDTNC(ByRef TmpDT As DataTable, CvePS As Integer, PS As String, Codigo As String, CodigoPS As String, CveTipoPS As Integer, CveTipoInvPS As Integer, CveUM As Integer, UM As String, - CveClasificacion As Integer, Clasificacion As String, CveProyecto As Integer, CveSubProyecto As Integer, - Obs As String, Cantidad As Double, PU As Double, PorcentajeIVA As Double, ImporteIVA As Double, PorcentajeRetIVA As Double, ImporteRetIVA As Double, - PorcentajeRetISR As Double, ImporteRetISR As Double, PorcentajeIEPS As Double, ImporteIEPS As Double, TipoDescuento As Integer, Descuento As Double, - Total As Double, Serie As String, TiempoEntrega As String, CvePresupuestoIngreso As Integer, EntregaDirecta As Integer, SATClaveProdServ As String, - SATClaveUM As String, CveContratoDetalle As Integer, CveVentaDetalle As Integer, CveMovimientoDetallePedido As Integer, CveOrdenCompraDetalle As Integer, - CveVentaDetalleRemision As Integer, CveVentaDetalleCotizacion As Integer) - - Dim Row As DataRow = Nothing - Row = TmpDT.NewRow() - - Row("Consec") = TmpDT.Rows.Count + 1 - Row("Orden") = TmpDT.Rows.Count + 1 - - Row("CvePS") = CvePS - Row("PS") = PS - Row("Codigo") = Codigo - Row("CodigoPS") = CodigoPS - Row("CveTipoPS") = CveTipoPS - Row("CveTipoInvPS") = CveTipoInvPS - - Row("CveUM") = CveUM - Row("UM") = UM - - Row("CveClasificacion") = CveClasificacion - Row("Clasificacion") = Clasificacion - Row("CveProyecto") = CveProyecto - Row("Proyecto") = "" - Row("CveSubProyecto") = CveSubProyecto - Row("SubProyecto") = "" - - Row("Obs") = Obs - Row("Cantidad") = Cantidad - Row("PU") = Math.Round(PU, 6) - Row("PorcentajeIVA") = PorcentajeIVA - Row("IVA") = PorcentajeIVA - Row("ImporteIVA") = Math.Round(ImporteIVA, 2) - Row("PorcentajeRetIVA") = PorcentajeRetIVA - Row("ImporteRetIVA") = Math.Round(ImporteRetIVA, 2) - Row("PorcentajeRetISR") = PorcentajeRetISR - Row("ImporteRetISR") = Math.Round(ImporteRetISR, 2) - Row("PorcentajeIEPS") = PorcentajeIEPS - Row("ImporteIEPS") = Math.Round(ImporteIEPS, 2) - Row("IEPS") = Math.Round(ImporteIEPS, 2) - Row("TipoDescuento") = TipoDescuento - Row("Descuento") = Math.Round(Descuento, 2) - Row("Total") = Math.Round(Total, 2) - Row("TotalImporte") = Math.Round(Total, 2) - - Row("Serie") = Serie - Row("TiempoEntrega") = TiempoEntrega - Row("CvePresupuestoIngreso") = CvePresupuestoIngreso - Row("EntregaDirecta") = EntregaDirecta - Row("SATClaveProdServ") = SATClaveProdServ - Row("SATClaveUM") = SATClaveUM - - 'Contratos - Row("CveContratoDetalle") = CveContratoDetalle - Row("CveVentaDetalle") = CveVentaDetalle - Row("CveMovimientoDetallePedido") = CveMovimientoDetallePedido - Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle - Row("CveVentaDetalleRemision") = CveVentaDetalleRemision - Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion - Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") - If DrPS IsNot Nothing Then - Row("CodigoObjetoImpuesto") = DrPS("CodigoObjetoImpuesto") - End If - TmpDT.Rows.Add(Row) - End Sub - - Private Sub CargaImpuestos(ByRef ObjFacturaDevolucion As Modelos.Factura, ListaVentasGenerarNC As List(Of Modelos.Factura), ClienteDesglosaIEPS As Boolean, ClienteRetIVA As Decimal, ClienteRetISR As Decimal) - Dim DtImpuestos As New DataTable - DtImpuestos.Columns.Add("ImportePU", GetType(Decimal)) - DtImpuestos.Columns.Add("ImporteTotal", GetType(Decimal)) - DtImpuestos.Columns.Add("PorcentajeIVA", GetType(Decimal)) - DtImpuestos.Columns.Add("ImporteIVA", GetType(Decimal)) - DtImpuestos.Columns.Add("PorcentajeRetIVA", GetType(Decimal)) - DtImpuestos.Columns.Add("ImporteRetIVA", GetType(Decimal)) - DtImpuestos.Columns.Add("PorcentajeRetISR", GetType(Decimal)) - DtImpuestos.Columns.Add("ImporteRetISR", GetType(Decimal)) - DtImpuestos.Columns.Add("PorcentajeIEPS", GetType(Decimal)) - DtImpuestos.Columns.Add("ImporteIEPS", GetType(Decimal)) - DtImpuestos.Columns.Add("CveSubProyecto", GetType(Integer)) - DtImpuestos.AcceptChanges() - Dim AcumuladoNC As Decimal = 0 - - For Each Fac In ListaVentasGenerarNC - DtImpuestos.Merge(CargaDtImpuestosNC(Fac.CveVenta, Fac.DescuentoProntoPago), True, MissingSchemaAction.Ignore) - Next - - DtImpuestos = CargaTotalesImpuestos(DtImpuestos) - - Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, ObjFacturaDevolucion.CveSubProyecto).Rows(0) - - Dim Cantidad As Decimal = 1 - Dim CveProyecto As Integer = DrSubProyecto("CveProyecto").ToString().ToEntero() - Dim CveSubProyecto = DrSubProyecto("CveSubProyecto").ToString.ToEntero - Dim SubProyecto = DrSubProyecto("SubProyecto").ToString - Dim Proyecto = DrSubProyecto("Proyecto").ToString - - Dim CveSATNC As Integer - Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray()) - Dim NCBonificacion As Integer = 0 - If ArrayNC.Length > 6 Then 'CONCEPTO DE PRONTO PAGO - CveSATNC = ArrayNC(6).ToEntero() - End If - Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("") - - For Each Dr As DataRow In DtImpuestos.Rows - AgregaTempDTNC(ObjFacturaDevolucion.DtDetalle, DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, DrPS("Codigo").ToString, DrPS("PSCodigo").ToString, DrPS("CveTipoPS").ToString.ToEntero, DrPS("Inv_CveMetodoInventario").ToString.ToEntero, - DrPS("CveUM").ToString.ToEntero, DrPS("UnidadMedida").ToString, DrPS("CveClasificacion").ToString.ToEntero, DrPS("Clasificacion").ToString, CveProyecto, CveSubProyecto, - "", Cantidad, Dr("ImportePU").ToString.ToDecimal, Dr("PorcentajeIVA").ToString.ToDecimal, Dr("ImporteIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("ImporteRetIVA").ToString.ToDecimal, - Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("ImporteRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("ImporteIEPS").ToString.ToDecimal, -1, 0.0, Dr("ImporteTotal").ToString.ToDecimal, "", "", -1, -1, - DrPS("SATClavePS").ToString, DrPS("SATClaveUnidadMedida").ToString, -1, -1, -1, -1, -1, -1) - Next - - End Sub - - Private Function CargaDtImpuestosNC(CveVentaNC As Integer, Importe As Decimal) As DataTable - Dim Total As Decimal = 0, SubTotal As Decimal = 0, Saldo As Decimal = 0 - - Dim TmpDT As DataTable = Nothing - Dim ObjVentas As New ClsVentas - - If ObjVentas.GetVentaDetalle(CveVentaNC) Then - TmpDT = ObjVentas.DtResultados - TmpDT.Columns.Add("EntregaDirecta", GetType(Integer)) - TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) - End If - - If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then - If ObjVentas.DtResultados.Rows.Count > 0 Then - Total = ObjVentas.DtResultados()(0)("Total").ToString.ToDecimal - SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString.ToDecimal - End If - End If - ObjVentas.Dispose() - - Dim DtImpuestosLocal = TmpDT.FiltraParametros("", "", {"PorcentajeIVA", "PorcentajeRetIVA", "PorcentajeRetISR", "PorcentajeIEPS", "CveSubProyecto"}).Copy - DtImpuestosLocal.Columns.Add("ImportePU", GetType(Decimal)) - DtImpuestosLocal.Columns.Add("ImporteTotal", GetType(Decimal)) - DtImpuestosLocal.Columns.Add("ImporteIVA", GetType(Decimal)) - DtImpuestosLocal.Columns.Add("ImporteRetIVA", GetType(Decimal)) - DtImpuestosLocal.Columns.Add("ImporteRetISR", GetType(Decimal)) - DtImpuestosLocal.Columns.Add("ImporteIEPS", GetType(Decimal)) - - Dim ImporteReferencia As Decimal = Total - Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100 - Dim FiltroStr As String = "" - Dim ImporteTotalConcepto As Decimal = 0 - For Each Dr As DataRow In DtImpuestosLocal.Rows - FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto")) - ImporteTotalConcepto = Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr)) - - Dr("ImportePU") = ImporteTotalConcepto.RoundSQL(6) - Dr("ImporteTotal") = ImporteTotalConcepto.RoundSQL(2) - - Dr("ImporteIVA") = (ImporteTotalConcepto * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2) - Dr("ImporteRetIVA") = (ImporteTotalConcepto * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2) - Dr("ImporteRetISR") = (ImporteTotalConcepto * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2) - Dr("ImporteIEPS") = (ImporteTotalConcepto * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2) - - 'Dr("ImporteIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIVA", FiltroStr), 2) - 'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2) - 'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2) - 'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2) - - '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal) - Next - 'codigo para ajuste de centavo, si el importe total no cuadra con los totales - Dim difTmp As Decimal = Importe - (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR")) - If Math.Abs(difTmp) >= 0.01 Then - 'asusto la diferencia en el último concepto - Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString.ToDecimal + difTmp - DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado - DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado - End If - 'CARGA FACTURA A LA CUAL SE APLICA LA NC - 'CargaNCDT(CveVentaNC, Importe.ToDecimal) - Return DtImpuestosLocal - End Function - - Private Function CargaTotalesImpuestos(DtImpuestos As DataTable) As DataTable - Dim query = From dr In DtImpuestos - Group By PorcentajeIVA = dr("PorcentajeIVA").ToString.ToDecimal, - PorcentajeRetIVA = dr("PorcentajeRetIVA").ToString.ToDecimal, - PorcentajeRetISR = dr("PorcentajeRetISR").ToString.ToDecimal, - PorcentajeIEPS = dr("PorcentajeIEPS").ToString.ToDecimal - Into x = Group - Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString.ToDecimal), - ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString.ToDecimal), - ImporteIVA = x.Sum(Function(s) Math.Round(s("ImporteIVA").ToString.ToDecimal, 2)), ' Math.Round(s("ImporteIVA").ToString.ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA, - ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString.ToDecimal, 2)),' Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * PorcentajeRetIVA, - ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString.ToDecimal, 2)),' Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * PorcentajeRetISR, - ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString.ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString.ToDecimal, 2)) * PorcentajeIEPS, - PorcentajeIVA = PorcentajeIVA, - PorcentajeRetIVA = PorcentajeRetIVA, - PorcentajeRetISR = PorcentajeRetISR, - PorcentajeIEPS = PorcentajeIEPS - - Return query.QueryToDataTable(False) - End Function - - Protected Function CreaDTDetalleNC() As DataTable - Dim TmpDT = New DataTable - TmpDT.Columns.Add("CveVenta", GetType(Integer)) - TmpDT.Columns.Add("Consec", GetType(Integer)) - TmpDT.Columns.Add("Cantidad", GetType(Decimal)) - TmpDT.Columns.Add("Codigo", GetType(String)) - TmpDT.Columns.Add("CveUM", GetType(Integer)) - TmpDT.Columns.Add("UM", GetType(String)) - TmpDT.Columns.Add("SATClaveUM", GetType(String)) - TmpDT.Columns.Add("CveClasificacion", GetType(Integer)) - TmpDT.Columns.Add("Clasificacion", GetType(String)) - TmpDT.Columns.Add("CvePS", GetType(Integer)) - TmpDT.Columns.Add("PS", GetType(String)) - TmpDT.Columns.Add("CodigoPS", GetType(String)) - TmpDT.Columns.Add("SATClaveProdServ", GetType(String)) - TmpDT.Columns.Add("NoIdentificacion", GetType(String)) - TmpDT.Columns.Add("CveTipoPS", GetType(Integer)) - TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer)) - TmpDT.Columns.Add("Serie", GetType(String)) - TmpDT.Columns.Add("CuentaPredial", GetType(String)) - TmpDT.Columns.Add("Obs", GetType(String)) - TmpDT.Columns.Add("TiempoEntrega", GetType(String)) - TmpDT.Columns.Add("PU", GetType(Decimal)) - TmpDT.Columns.Add("IVA", GetType(Decimal)) - TmpDT.Columns.Add("ImporteIVA", GetType(Decimal)) - TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal)) - TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal)) - TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal)) - TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal)) - TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal)) - TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal)) - TmpDT.Columns.Add("IEPS", GetType(Decimal)) - TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal)) - TmpDT.Columns.Add("Descuento", GetType(Decimal)) - TmpDT.Columns.Add("TipoDescuento", GetType(Integer)) - TmpDT.Columns.Add("TotalImporte", GetType(Decimal)) - TmpDT.Columns.Add("Total", GetType(Decimal)) - 'Para uso del módulo contable - TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) - TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) - TmpDT.Columns.Add("CveProyecto", GetType(Integer)) - TmpDT.Columns.Add("Proyecto", GetType(String)) - TmpDT.Columns.Add("CveSubProyecto", GetType(Integer)) - TmpDT.Columns.Add("SubProyecto", GetType(String)) - TmpDT.Columns.Add("CveVentaDetallePadre", GetType(Integer)) - 'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto - TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer)) - TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer)) - 'Contratos - TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) - 'Remisiones a Facturas - TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer)) - TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer)) - TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer)) - 'Pedido2 a Facturas - TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer)) - TmpDT.Columns.Add("Origen", GetType(Integer)) - 'Ordenes Servicio - TmpDT.Columns.Add("CveOS", GetType(Integer)) - TmpDT.Columns.Add("CveOSDetalle", GetType(Integer)) - TmpDT.Columns.Add("SeFacturara", GetType(Integer)) - TmpDT.Columns.Add("Folio", GetType(Integer)) - TmpDT.Columns.Add("Estatus", GetType(String)) - 'Ordenamiento - TmpDT.Columns.Add("Orden", GetType(Integer)) - TmpDT.Columns.Add("TipoDocto", GetType(String)) - 'OC - TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer)) - TmpDT.Columns.Add("EntregaDirecta", GetType(Integer)) - TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) - TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal)) - TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal)) - TmpDT.Columns.Add("CantidadFacturadaPed2", GetType(Decimal)) - TmpDT.Columns.Add("CantidadInventario", GetType(Decimal)) - TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String)) - TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String)) - TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String)) - TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String)) - TmpDT.Columns.Add("CveTamaño", GetType(Integer)) - TmpDT.Columns.Add("EsCargo", GetType(Boolean)) - TmpDT.Columns.Add("CodigoObjetoImpuesto", GetType(String)) - - Return TmpDT - End Function - Private Function InicializaDTVentasNC() As DataTable - Dim DtVentasNC = New DataTable - DtVentasNC.Columns.Add("CveVenta", GetType(Integer)) - DtVentasNC.Columns.Add("Importe", GetType(Decimal)) - DtVentasNC.Columns.Add("FolioFiscal", GetType(String)) - DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "TC", .DataType = GetType(Decimal), .DefaultValue = 1}) - DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "TCCambioValuacion", .DataType = GetType(Decimal), .DefaultValue = 1}) - DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "CveEstatusFactura", .DataType = GetType(Integer), .DefaultValue = -1}) - - Return DtVentasNC - End Function -#End Region - - - Private Sub LimpiaCampos() - TxtFolio.Text = "" - TxtObservaciones.Text = "" - TxtImporte.Text = "" - TxtTotal.Text = "" - TxtFechaDocumento.Text = Now.ToShortDateString - DdlCuenta.SelectedValue = "-1" - DdlTipoTransaccion.SelectedValue = "-1" - - CFDIRelacionadoSustitucion = "-1" - FechaCorteIE = DateTime.Now.ToDate - IDPoliza = -1 - FolioIECancelado = "" - - Anexo.Text = "" - - If UsuarioActual.Empresa.UsaAC Then - TxtOtrosImportes.Text = "" - UpDatos.Update() - CargaDatos(-1) - Else - UpDatos.Update() - CargaDatos(If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToString.ToEntero > 0, Request("CveMoneda").ToString.ToEntero, -1)) - End If - - End Sub - - Private Sub RblTipoPago_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoPago.SelectedIndexChanged - Select Case RblTipoPago.SelectedValue - Case "1" - DdlProveedorPagoInt.Items.Clear() - DivDatosBancarios.Visible = True - TxtFolio.Enabled = True - divAbonese.Visible = True - divIntermediario.Visible = False - PanelIngresos.Visible = False - Case "3" - ' Ingresos por comprobar - DdlProveedorPagoInt.Items.Clear() - DivDatosBancarios.Visible = False - PanelIngresos.Visible = True - TxtFolio.Enabled = True - divAbonese.Visible = True - divIntermediario.Visible = False - 'filtro primero por los de la moneda - CargaIngresos(CveMonedaFiltro) - - If ChkPagarDolares.Checked Then - CveMonedaPago = 2 - CveMoneda = 1 - TxtTCDolares.Attributes.Add("onkeyup", String.Format("FnCambia(0,0,0,0,1,{0});", 2)) - Else - CveMonedaPago = 1 - End If - CargaDatos(CveMoneda) - Case Else - - divAbonese.Visible = False - Dim ObjProveedores As New ClsCompProveedores - ObjProveedores.GetProveedorProsepago(UsuarioActual.CveEmpresa) - - divIntermediario.Visible = True - DdlProveedorPagoInt.DataSource = ObjProveedores.DtResultados - ObjProveedores.Dispose() - DdlProveedorPagoInt.DataBind() - - DivDatosBancarios.Visible = False - TxtFolio.Enabled = False - PanelIngresos.Visible = False - - End Select - - CargaDatos(CveMoneda) - UpDatos.Update() - End Sub - - Private Function CargaIngresos(tCveMoneda As Integer) As DataTable - Dim dtt As DataTable = Nothing - Dim Deudores As New ClsMovimientos - If Deudores.GetIngresosSaldosDetalle(CveCliente, tCveMoneda, UsuarioActual.CveEmpresa) Then - DdlIngreso.DataSource = Deudores.DtResultados.FiltraParametros("CveCliente > 0 AND Saldo > 0 AND CveIE > 0") - dtt = Deudores.DtResultados.FiltraParametros("CveCliente > 0 AND Saldo > 0 AND CveIE > 0") - End If - Deudores.Dispose() - - DdlIngreso.DataBind() - DdlIngreso.Items.Insert(0, New ListItem("-", "-1")) - Return dtt - End Function - - Private Function CargaPrestamos(tCveMoneda As Integer) As DataTable - Dim dtt As DataTable = Nothing - Dim Deudores As New ClsMovimientos - If Deudores.GetDocumentosxPagarDetalle(CveCliente, tCveMoneda, 2, UsuarioActual.CveEmpresa) Then - DdlPrestamo.DataSource = Deudores.DtResultados '.FiltraParametros("CveCliente > 0 AND Saldo > 0 AND CveIE > 0") - dtt = Deudores.DtResultados - End If - Deudores.Dispose() - - DdlPrestamo.DataBind() - DdlPrestamo.Items.Insert(0, New ListItem("-", "-1")) - Return dtt - End Function - - Protected Sub ChkAjusteOI_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ChkAjusteOI.CheckedChanged - - If ChkAjusteOI.Checked Then - TxtOtrosImportes.Visible = True - TxtTotal.Visible = True - GvCxC.Columns(13).Visible = True - Else - TxtOtrosImportes.Visible = False - TxtTotal.Visible = False - GvCxC.Columns(13).Visible = False - TxtOtrosImportes.Text = "" - TxtTotal.Text = "" - RegistraScript("$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);") - End If - - UpDatos.Update() - UPVentas.Update() - End Sub - -#Region " PAGAR CON PESOS " - Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs) - If ChkPagarPesos.Checked Then - DivTCDolaresDolares.Visible = False - RegistraScript("$get('DivTC').style.display = 'block';") - CargaCuentas() - If RblTipoPago.SelectedValue = "3" Then - CargaIngresos(1) - End If - TxtTC.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - Else - DivTCDolaresDolares.Visible = True - 'RegistraScript("document.getElementById('DivTC').style.display = 'none';") - CargaCuentas() - TxtTCDolaresDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - End If - UpDatos.Update() - - CargaDatos(2) - RegistraScript("CambiaPesosDolares();") - End Sub -#End Region - -#Region "PAGAR CON DOLARES" - Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs) - If ChkPagarDolares.Checked Then - DivTCDolares.Visible = True - CargaCuentas() - If RblTipoPago.SelectedValue = "3" Then - CargaIngresos(2) - RegistraScript("CambiaDolaresPesos();") - End If - TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") - TxtTCDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - Else - DivTCDolares.Visible = False - CargaCuentas() - TxtFechaDocumento.Attributes.Remove("onchange") - End If - UpDatos.Update() - - CargaDatos(1) - RegistraScript("CambiaDolaresPesos();") - End Sub -#End Region - -#Region " CUENTAS DEPOSITOS" - Private Sub CargaCuentasDepositos() - DdlCuentaDeposito.Items.Clear() - If DdlTipoTransaccion.SelectedValue > 0 Then ' transferencias y layout - trCuentaDeposito.Visible = False - - Dim dtc As DataTable = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente) - - If dtc IsNot Nothing Then - If DdlTipoTransaccion.SelectedValue = "9" Then - - DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'") - - If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then - trCuentaDeposito.Visible = True - DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) - Else - BtnIEGuardar.Enabled = False - Alert("El Cliente no tiene ninguna cuenta deposito registrada ante el sistema BBVA BANCOMER", TipoMensaje.MsgAdvertencia) - End If - Else - DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'") - If dtc.Rows.Count >= 1 Then - trCuentaDeposito.Visible = True - DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) - End If - End If - - End If - DdlCuentaDeposito.DataBind() - Else - trCuentaDeposito.Visible = False - DdlCuentaDeposito.Items.Clear() - End If - - UpCuentaDeposito.Update() - UpDatos.Update() - - End Sub - - Private Sub RecargaCuentasDepositos() - - Dim dr As DataRow = GlobalDTTipoTransacciones.FiltroPrimero(String.Format("CveTipoTransaccion = {0}", DdlTipoTransaccion.SelectedValue)) 'Egs o Ing - If dr IsNot Nothing Then - HdnTipoTransaccion.Value = dr("Tipo").ToString - HdnTipoTransaccionAbreviatura.Value = dr("Abreviatura").ToString - End If - CargaCuentasDepositos() - End Sub - Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs) - Dim dtc As DataTable = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) - - If dtc IsNot Nothing AndAlso dtc.Rows.Count = 1 Then - If dtc.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then - TrReferenciaCIE.Visible = True - TxtReferenciaCIE.Text = dtc.Rows(0)("Referencia").ToString - Else - TrReferenciaCIE.Visible = False - End If - End If - - UpCuentaDeposito.Update() - End Sub -#End Region - -#Region " COMPLEMENTOS PAGO " - Private Function EmitirComplementoPago(CveIE As Integer, CveVentas As List(Of Integer), Series As List(Of String)) As String - - If Not UsuarioActual.Empresa.FacturaProduccion Then - Return "" - End If - - If Not ChkComplementoPago.Checked Then - Return "" - End If - - Dim Retorno As New StringBuilder - - 'For i = 0 To CveVentas.Count - 1 - Dim ObjBancos As New ClsBancos - - If ObjBancos.GetComplementoPagosRep(-1, Now.AddYears(-2), Now, CveIE, -1, 1, UsuarioActual.CveEmpresa, -1) Then - If Not ObjBancos.DtResultados.Rows.Count > 0 Then - ObjBancos.Dispose() - Alert("No se generaron complementos de pago porque no hay facturas con método de pago PPD", TipoMensaje.MsgAdvertencia) - Return "" - End If - End If - - ObjBancos.IniciaTransacSQL() - - If ObjBancos.GeneraTimbrePago(CveIE, -1, UsuarioActual, CveCliente, CFDIRelacionado:=CFDIRelacionadoSustitucion, EsRegeneracion:=False) Then - ObjBancos.Commit() - ComplementoSustitucionGenerado = True - - PDFReciboDePagos(-1, -1, ObjBancos.CveComplementoPago, False) - - 'Dim LigaDescargaXML = $"../Empresas/{UsuarioActual.CveEmpresa}/XML/Pag/{ObjBancos.ComplementoSerieFolio}.xml" - 'Dim LigaDescargaPDF = $"../Empresas/{UsuarioActual.CveEmpresa}/PDF/Pag/{ObjBancos.ComplementoSerieFolio}.pdf" - Retorno.AppendFormat(" Complemento de pago {0}
", ObjBancos.ComplementoSerieFolio) - Retorno.AppendFormat("XML    ", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}&CveIE={2}", ObjBancos.ComplementoSerieFolio, ObjBancos.CveComplementoPago, CveIE))) - Retorno.AppendFormat("PDF   ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}&CveIE={2}", ObjBancos.ComplementoSerieFolio, ObjBancos.CveComplementoPago, CveIE))) - - Dim ResultadoMail As Integer - Dim ObjMail As New ClsSisMail() - Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) - LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = $"{UsuarioActual.Empresa.Ruta}\XML\Pag\{ObjBancos.ComplementoSerieFolio}.xml"}) - LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = $"{UsuarioActual.Empresa.Ruta}\PDF\Pag\{ObjBancos.ComplementoSerieFolio}.pdf"}) - - 'Dim Mail As String = "demo@adsistemas.mx" - Dim Asunto As String = "Envío de complemento de pago" - Dim Cuerpo As String = "Complemento de Pago" - - If ObjMail.SendMail(UsuarioActual.Empresa, Mail, Asunto, Cuerpo, "", LSRutasMail) Then - ResultadoMail = 1 - Else - ResultadoMail = 3 - Alert("No se pudo enviar el correo", TipoMensaje.MsgAdvertencia) - End If - Else - ComplementoSustitucionGenerado = False - Retorno.AppendFormat($" Complemento de pago NO generado . {ObjBancos.Mensaje}") - ObjBancos.RollBack() - End If - - ObjBancos.Dispose() - - ' Next - - Return Retorno.ToString - End Function - - -#End Region - -#Region "SALDAR CUENTAS" - - - Private Sub BtnSaldarCuentasIncobrables_Click(sender As Object, e As EventArgs) Handles BtnSaldarCuentasIncobrables.Click - Dim ObjConta As New ClsContabilidad - ObjConta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = 0 - Dim MsgError As String = "" - - 'Dim ObjIE As New ClsBancos - Dim FechaUltimaFluctuacion As Date = MinFecha - Dim TipoCambioFluctuacion As Decimal = 1 - - Dim tFecha As Date = TxtFechaIncobrable.Text.ToDate - Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha) - - If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then - If UltimaFluctuacion.FechaFluctuacion <= tFecha Then - FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion - TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion - End If - End If - - CvePrePoliza = ObjConta.AddPrePolizas("Bancos/ClientesAbonar/SaldarI", 47, 0, 0, 1, TxtFechaIncobrable.Text.ToDate, TxtObsSaldarIncobrable.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - - For Each gr As GridViewRow In GvCxC.Rows - If gr.FCCheckBox("Chk").Checked Then - Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal - Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal - Dim RETIVA As Decimal = gr.DataKey("RetIVA").ToDecimal - Dim SubTotal As Decimal = PorcentajePago * (gr.DataKey("SubTotal").ToDecimal.RoundSQL - gr.DataKey("Descuento").ToDecimal.RoundSQL).RoundSQL - Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal.RoundSQL - Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal.RoundSQL - Dim TCVenta As Decimal = gr.DataKey("TipoCambio").ToDecimal - Dim FechaVenta As Date = gr.DataKey("Fecha").ToDate - Dim tCveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero - Dim TCPago As Decimal = GlobalTipoCambio(TxtFechaIncobrable.Text.ToDate).FormatoNumero(4) - Dim CveConceptoDeduccion As Integer = DdlTipoDeduccion.SelectedValue.ToEntero - - - 'si la fecha del documento es anterior a su ultima fluctuación. toma el Tc de la fluctuacion - If tCveMoneda = 2 Then - If FechaVenta < FechaUltimaFluctuacion Then - TCVenta = TipoCambioFluctuacion - End If - End If - - - 'condicionante - Dim ClienteMovto As Boolean = True - Dim SubtotalMovto As Boolean = False - Dim CveConceptoCliente As Integer = 2 - Dim ImpuestosMovto As Boolean = False - - Dim CveSubProyecto As Integer = gr.DataKey("CveSubProyecto").ToEntero - Dim ConceptoPartida As String = TxtObsSaldarIncobrable.Text.Trim & " " & gr.DataKey("SerieFolio").ToString - - 'If CveConceptoDeduccion = 255 Then 0 = UsuarioActual.Empresa.Funcionalidad(266).ToEntero - 'If CveConceptoDeduccion = 179 Then 0 = UsuarioActual.Empresa.Funcionalidad(559).ToEntero - 'If CveConceptoDeduccion = 263 Then 0 = UsuarioActual.Empresa.Funcionalidad(537).ToEntero - 'If CveConceptoDeduccion = 252 Then 0 = UsuarioActual.Empresa.Funcionalidad(581).ToEntero - 'If CveConceptoDeduccion = 78 Then 0 = UsuarioActual.Empresa.IdCuentaOtrosIngresos - - If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) Then - - ClienteMovto = False : Saldo = Saldo * -1 - ImpuestosMovto = True : IVA = IVA * -1 - - 'RETIVA = RETIVA * -1 - - RETIVA = ((SubTotal * RETIVA / gr.DataKey("SubTotal").ToDecimal.RoundSQL) * -1).RoundSQL(2) - - CveConceptoCliente = 1 - 'falta cuenta incobrable - End If - - Dim UsaComplementaria As Boolean = True - If MsgError = "" Then - - Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(6, tCveMoneda, True, 1) - 'normal - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, Saldo, gr.DataKey("SerieFolio").ToString, ConPreP.CveConcepto, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, 0, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, Saldo), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then - MsgError = "Ocurrio un error al saldar el movimiento" - End If - - If UsaComplementaria AndAlso tCveMoneda = 2 Then - 'complementaria - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, 0, gr.DataKey("SerieFolio").ToString, ConPreP.CveConceptoComplementario, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, 0, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, Saldo, (Saldo * TCVenta) - Saldo).RoundSQL, ImporteME:=Saldo, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then - MsgError = "Ocurrio un error al saldar el movimiento" - End If - End If - - 'fluctuación. - If tCveMoneda = 2 Then - Dim ImporteFluctuacion As Decimal = 0 - ImporteFluctuacion = Saldo * (TCPago - TCVenta) - - If CveSubProyecto <= 0 Then - MsgError = $"No se pudo obtener el sub proyecto de la venta {gr.DataKey("SerieFolio").ToString}" - End If - - If TCPago > TCVenta Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, 0, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) 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, 0, CveIE:=-1, IdSegmentoNegocio:=-1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then - MsgError = "Ocurrio un error al saldar el movimiento" - End If - End If - - 'cuando hay pago en dólares, se ajusta el concepto de subtotal, - SubTotal = (Saldo * TCVenta) + ImporteFluctuacion - (IVA * TCVenta) - (IEPS * TCVenta) - - End If - - - If (IVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And IVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IVA, gr.DataKey("SerieFolio").ToString, 13, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, 0, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IVA, IVA * TCVenta), PorcentajeImpuesto:=gr.DataKey("PorcentajeIVA").ToDecimal, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then - MsgError = "Ocurrio un error al saldar el movimiento" - End If - - If (RETIVA > 0 Or UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122) And RETIVA < 0) AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ClienteMovto, RETIVA, gr.DataKey("SerieFolio").ToString, 8, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, 0, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, RETIVA, RETIVA * TCVenta), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then - MsgError = "Ocurrio un error al saldar el movimiento" - End If - - If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, ImpuestosMovto, IEPS, gr.DataKey("SerieFolio").ToString, 38, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, 0, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=If(CveMonedaFiltro = 1, IEPS, IEPS * TCVenta), TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then - MsgError = "Ocurrio un error al saldar el movimiento" - End If - - 'al gasto,Subtotal - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, SubtotalMovto, SubTotal, gr.DataKey("SerieFolio").ToString, CveConceptoDeduccion, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCuentaContableNoDeducible, -1, CveCliente:=gr.DataKey("CveCliente").ToEntero, CveVenta:=gr.DataKey("CveVenta").ToEntero, ImporteMX:=SubTotal, CveSubProyecto:=CveSubProyecto, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago) Then - MsgError = "Ocurrio un error al saldar el movimiento" - End If - - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then - If ObjConta.ValorPolizaDescuadre > 0 Then - MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia - GuardaLogAD($"Ventas/ClientesAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - Exit For - End If - End If - - End If - End If - Next - - If MsgError = "" Then - 'ObjConta.RollBack() - ObjConta.Commit() - CargaDatos(CveMonedaFiltro) - RegistraScript("$('#ModalSaldarCuentaIncobrable').modal('hide')") - Alert(String.Format("Los movimientos se saldaron correctamente.
Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion) - - Else - ObjConta.RollBack() - Alert(MsgError, TipoMensaje.MsgError) - End If - - BtnSaldarCuentasIncobrables.Visible = False - ObjConta.Dispose() - End Sub - - - Private Sub ValidaCuentaDePagoFormaDePago() - - If Not (DdlTipoTransaccion.SelectedValue.ToEntero > 0 And DdlCuenta.SelectedValue.ToEntero > 0) Then - Exit Sub - End If - - Dim DTTipoTransacciones As DataTable = GlobalDTTipoTransacciones.FiltraParametros($"CveTipoTransaccion={DdlTipoTransaccion.SelectedValue}") - Dim DTCuentas As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveCuenta={DdlCuenta.SelectedValue}") - - Dim ClaveFormaPagoSAT As String = "" - Dim Cuentapago As String = "" - Dim CuentaBeneficiario As String = "" - - - If DTTipoTransacciones.Rows.Count > 0 Then - ClaveFormaPagoSAT = DTTipoTransacciones.Rows(0)("ClaveFormaPagoSAT").ToString - Else - Alert("La forma de pago no tiene una forma de pago SAT", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - If DTCuentas.Rows.Count > 0 Then - CuentaBeneficiario = DTCuentas.Rows(0)("NumCuenta").ToString - Else - Alert("No se pudo encontrar la cuenta", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - - Dim Mensaje As String = "" - Cuentapago = "" - - - Select Case ClaveFormaPagoSAT.ToString - Case "01" - ' no tiene restricciones - Case "02" - If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(11, 18) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." - End If - - If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." - End If - Case "03" - If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10, 16, 18) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." - End If - If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 18)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." - End If - Case "04" - - If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." - End If - - If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." - End If - - Case "05" - If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10, 11, 15, 16, 18, 50) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." - End If - - If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." - End If - Case "06" - If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(10) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." - End If - - CuentaBeneficiario = "" - Case "28" - If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(16) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." - End If - - If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." - End If - Case "29" - If Cuentapago <> "" AndAlso Not Cuentapago.Length.Contiene(15, 16) Then - Mensaje = "La cuenta ordenante no cumple con el formato esperado." - End If - - If CuentaBeneficiario <> "" AndAlso Not (CuentaBeneficiario.Length.Contiene(10, 11, 15, 16, 18, 50)) Then - Mensaje = $"{Mensaje} La Cuenta Beneficiario no cumple con el formato esperado." - End If - - Case Else - - - - End Select - - LblValidaCeuntaTipoTransaccion.Text = Mensaje - - If Not Mensaje.Length = 0 Then - 'Alert(Mensaje, TipoMensaje.MsgAdvertencia) - LblValidaCeuntaTipoTransaccion.Visible = True - Else - LblValidaCeuntaTipoTransaccion.Visible = False - End If - - UpGuardar.Update() - - End Sub - -#End Region - - Protected Sub BtnCambiaTipoMoneda_Click(sender As Object, e As EventArgs) - CambiaTipoMoneda() - End Sub - Private Sub CambiaTipoMoneda() - Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, TxtFechaDocumento.Text.ToDate.Day - 1, TxtFechaDocumento.Text.ToDate.Day) - Fecha = (dia.ToString + "/" + TxtFechaDocumento.Text.ToDate.Month.ToString + "/" + TxtFechaDocumento.Text.ToDate.Year.ToString).ToDate - - If TxtTC.Visible Then - TxtTC.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - End If - - If DivTCDolares.Visible Then - TxtTCDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - End If - - If DivTCDolaresDolares.Visible Then - TxtTCDolaresDolares.Text = GlobalTipoCambio(Fecha).FormatoNumero(4) - End If - - Dim moneda As Integer = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero}").ToEntero - If CveMonedaFiltro = -1 Then - RegistraScript(String.Format("FnCambia(0,0,0,0,-1,{0});", moneda)) - Else - RegistraScript(String.Format("FnCambia(0,0,0,0,1,{0});", moneda)) - End If - - UpDatos.Update() - End Sub - - Private Sub DdlIngreso_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlIngreso.SelectedIndexChanged - 'saco la moneda de la selección - HdnIngresoImporte.Value = 0 - If DdlIngreso.SelectedValue.ToEntero > 0 Then - Dim Banco As New ClsBancos - - If Banco.GetBancosIE(DdlIngreso.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - CveMonedaPago = Banco.CveMoneda - Dim Deudores As New ClsMovimientos - If Deudores.GetIngresosSaldosDetalle(CveCliente, -1, UsuarioActual.CveEmpresa) Then - HdnIngresoImporte.Value = Deudores.DtResultados.FiltroPrimeroValor("Saldo", String.Format("CveIE = {0}", DdlIngreso.SelectedValue)) - TxtTCDolares.Text = Deudores.DtResultados.FiltroPrimeroValor("TipoCambio", String.Format("CveIE = {0}", DdlIngreso.SelectedValue)) - FechaIngreso = Deudores.DtResultados.FiltroPrimeroValor("FechaDocumento", String.Format("CveIE = {0}", DdlIngreso.SelectedValue)) - End If - Deudores.Dispose() - End If - IdCuentaBancariaComplementaria = 0 - Banco.Dispose() - Else - CveMonedaPago = -1 - End If - - - If CveMonedaPago = 1 Then - 'DivTC.Visible = True - DivTCDolares.Visible = False - TxtTC.Attributes.Add("onkeyup", String.Format("FnCambia(0,0,0,0,-1,{0});", CveMonedaPago)) - ElseIf CveMonedaPago = 2 Then - 'DivTC.Visible = False - RegistraScript("document.getElementById('DivTC').style.display = 'none';") - DivTCDolares.Visible = True - TxtTCDolares.Attributes.Add("onkeyup", String.Format("FnCambia(0,0,0,0,-1,{0});", CveMonedaPago)) - End If - - CargaDatos(CveMoneda) - - End Sub - - Private Sub RVTxtFechaDocumento_Init(sender As Object, e As EventArgs) Handles RVTxtFechaDocumento.Init - RVTxtFechaDocumento.MaximumValue = DateTime.Now.ToShortDateString - Calendario.EndDate = DateTime.Now - - End Sub - - -#Region "LIQUIDACION" - - Protected Sub TimTiempo_Tick(sender As Object, e As EventArgs) - Dim a As String = "se recarga para que no pierda sesión el registro puede tardar más de una hora en llenar todos los datos" 'solo para que se ejecute sin que afecte a lo demás - End Sub - - Protected Sub ChkLiquidacion_CheckedChanged(sender As Object, e As EventArgs) - ActivaDesactivaLiquidacion() - End Sub - - Private Sub ActivaDesactivaLiquidacion() - - If ChkLiquidacion.Checked Then - TimTiempo.Enabled = True 'para que no me saque - GvCxC.Columns(4).Visible = False - GvCxC.Columns(5).Visible = False - GvCxC.Columns(6).Visible = False - GvCxC.Columns(7).Visible = False - - '16-24 - GvCxC.Columns(16).Visible = True - GvCxC.Columns(17).Visible = True - GvCxC.Columns(18).Visible = True - GvCxC.Columns(19).Visible = True - GvCxC.Columns(20).Visible = True - GvCxC.Columns(21).Visible = True - GvCxC.Columns(22).Visible = True - GvCxC.Columns(23).Visible = True - GvCxC.Columns(24).Visible = True - GvCxC.Columns(25).Visible = True - GvCxC.Columns(26).Visible = True - GvCxC.Columns(27).Visible = True 'anticipos - GvCxC.Columns(28).Visible = True 'anticipos2 - - GvCxC.Columns(29).Visible = False - GvCxC.Columns(30).Visible = False - - - Else - TimTiempo.Enabled = False - GvCxC.Columns(4).Visible = True - GvCxC.Columns(5).Visible = True - GvCxC.Columns(6).Visible = True - GvCxC.Columns(7).Visible = True - - GvCxC.Columns(16).Visible = False - GvCxC.Columns(17).Visible = False - GvCxC.Columns(18).Visible = False - GvCxC.Columns(19).Visible = False - GvCxC.Columns(20).Visible = False - GvCxC.Columns(21).Visible = False - GvCxC.Columns(22).Visible = False - GvCxC.Columns(23).Visible = False - GvCxC.Columns(24).Visible = False - GvCxC.Columns(25).Visible = False - GvCxC.Columns(26).Visible = False - GvCxC.Columns(27).Visible = False 'anticipos - GvCxC.Columns(28).Visible = False 'anticipos2 - - GvCxC.Columns(29).Visible = True - GvCxC.Columns(30).Visible = True - - End If - - UPVentas.Update() - End Sub - -#End Region - - - - Protected Sub LnkAccionesModalSeleccionLayout_Click(sender As Object, e As EventArgs) - - TxtModalLayoutExcel.Text = "[]" - UpModalSeleccionLayout.Update() - RegistraScript("$('#ModalSeleccionLayout').modal('show');") - - End Sub - - - Protected Sub LnkSeleccionLayout_Click(sender As Object, e As EventArgs) - - Dim ProcesoOK As Boolean = True - Dim CountRegistros As Integer = 0 - Dim TotalSeleccion As Decimal = 0D - - Dim SBNoEncontradosEnLista As New StringBuilder - Dim SBPagoMayorASaldo As New StringBuilder - - If TxtModalLayoutExcel.getfiles().Archivos.Count > 0 Then - Dim file As Archivo = TxtModalLayoutExcel.getfiles().Archivos(0) - Dim Directorio As String = Server.MapPath("~") & file.path - Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV") - - Dim DTExcel As New DataTable - Dim ErrorArchivo = False - Dim ErrorExcel = False - - DTExcel = ReadExcelFile(Directorio + file.filename, True) - - If Not DTExcel.Columns(0).ColumnName.ToUpper = "FOLIO" Then - Alert("El nombre de la primera columna debe ser 'Folio'. Favor de corregirlo", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - If Not DTExcel.Columns(1).ColumnName.ToUpper = "IMPORTE PAGO" Then - Alert("El nombre de la segunda columna debe ser 'Importe Pago'.Favor de corregirlo." & DTExcel.Columns(1).ColumnName, TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then - ChkLiquidacion.Checked = True - ActivaDesactivaLiquidacion() - End If - - For Each Drow As DataRow In DTExcel.Rows - - Dim SerieFolioBusqueda As String = Drow("Folio").ToString.Trim.ToUpper - Dim ImportePago As Decimal = Drow("Importe Pago").ToString.ToDecimal.RoundSQL(2) - Dim SerieFolioEncontrado As Boolean = False - - If ImportePago >= 0 Then - - For Each GvRow As GridViewRow In GvCxC.Rows - - Dim SerieFolioGv As String = GvRow.DataKey("SerieFolio").Trim.ToUpper - - If SerieFolioBusqueda = SerieFolioGv Then - SerieFolioEncontrado = True - Dim SaldoGV As Decimal = GvRow.DataKey("Saldo").ToDecimal - If ImportePago = 0 Then ImportePago = SaldoGV 'si no se especifica cantidad toma la totalidad del saldo - Dim Diferencia As Decimal = SaldoGV - ImportePago - - If Diferencia < 0 Then - - If Math.Abs(Diferencia) > 0.01 Then - SBPagoMayorASaldo.AppendLine($"Factura: {SerieFolioBusqueda} Importe de pago {ImportePago.ToString("###,###,###.00")} es mayor al saldo {SaldoGV.ToString("###,###,###.00")}
") - ProcesoOK = False - Exit For - Else - ImportePago = SaldoGV - End If - End If - - GvRow.FCCheckBox("Chk").Checked = True - GvRow.FCTextBox("TxtAbonar").Text = ImportePago.ToString("###,###,###.00") - - If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then - - GvRow.FCDropDownList("DdlTG").SelectedTextExist(Drow("Tipo").ToString) - GvRow.FCTextBox("TxtLiqCol1").Text = Drow("Comisión").ToString - GvRow.FCTextBox("TxtLiqCol2").Text = Drow("Gastos").ToString - GvRow.FCTextBox("TxtLiqCol3").Text = Drow("Inspeccion").ToString - GvRow.FCTextBox("TxtLiqCol4").Text = Drow("Seguro").ToString - GvRow.FCTextBox("TxtLiqCol5").Text = Drow("AduanaMex").ToString - GvRow.FCTextBox("TxtLiqCol6").Text = Drow("Diversos").ToString - GvRow.FCTextBox("TxtLiqCol7").Text = Drow("AduanaUSA").ToString - GvRow.FCTextBox("TxtLiqCol8").Text = Drow("MaterialEmpaque").ToString - GvRow.FCTextBox("TxtLiqCol9").Text = Drow("Semilla").ToString - - GvRow.FCDropDownList("DdlAnti").SelectedTextLikeIfExist(Drow("FolioAnticipo1").ToString) - GvRow.FCTextBox("TxtAmort").Text = Drow("ImporteAnticipo1").ToString - GvRow.FCDropDownList("DdlAnti2").SelectedTextLikeIfExist(Drow("FolioAnticipo2").ToString) - GvRow.FCTextBox("TxtAmort2").Text = Drow("ImporteAnticipo2").ToString - - End If - - TotalSeleccion = TotalSeleccion + ImportePago - CountRegistros = CountRegistros + 1 - - Exit For - End If - Next - - If Not SerieFolioEncontrado Then - SBNoEncontradosEnLista.AppendLine($"{SerieFolioBusqueda}
") - End If - End If - Next - - Else - Alert("Se debe seleccionar un archivo", TipoMensaje.MsgError) - End If - - If ProcesoOK Then - - Alert($"Facturas seleccionadas: {CountRegistros}
{SBNoEncontradosEnLista.ToString}") - RegistraScript("$('#ModalSeleccionLayout').modal('hide');") - TxtImporte.Text = TotalSeleccion.ToString("###,###,###.00") - - UPVentas.Update() - UpDatos.Update() - Else - - If SBPagoMAyorASaldo.ToString.Length > 0 Then - Alert($"Facturas con pagos mayores a saldo:
{SBPagoMAyorASaldo.ToString}", TipoMensaje.MsgAdvertencia) - End If - - End If - - - End Sub - - 'Public Sub SelectedTextLikeIfExist(ByRef Rbl As RadioButtonList, Value As String) - ' Try - - ' For Each item As ListItem In Rbl.Items - ' If item.Value.Contains(Value) Then - ' item.Selected = True - ' End If - ' Next - ' Catch ex As Exception - - ' End Try - 'End Sub - - Protected Sub LnkDescargaFormato_Click(sender As Object, e As EventArgs) - - Dim Directorio As String = "" - Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\LayoutPagoCliente.xlsx" - If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then - Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\LayoutPagoClienteLiquidacion.xlsx" - End If - - If Not (Directorio = "") Then - - Dim Archivo As New IO.FileInfo(Directorio) - If Archivo.Exists Then - Response.Clear() - Response.ClearHeaders() - Response.ClearContent() - Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name) - Response.AddHeader("Content-Length", Archivo.Length.ToString()) - Response.ContentType = "text/plain" - Response.Flush() - Response.TransmitFile(Archivo.FullName) - Response.End() - End If - End If - - End Sub -End Class From 2ce5b067883fdb1bfff660f10fe7a2a380f039b1 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 15 Aug 2023 08:27:50 -0700 Subject: [PATCH 007/111] -- colorear en rojo negativos --- Contabilidad/RegPrePolizaS.aspx.vb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index a0c34f7f0..89f724e8c 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -562,8 +562,12 @@ Partial Class ContabilidadC_RegPrePolizaS End If End If - TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + e.Row.FCLiteral("TxtCargo").Text.ToDecimal).ToString.FormatoNumero - TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + e.Row.FCLiteral("TxtAbono").Text.ToDecimal).ToString.FormatoNumero + TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + e.Row.DBCampo("Cargo").ToDecimal).ToString.FormatoNumero + TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + e.Row.DBCampo("Abono").ToDecimal).ToString.FormatoNumero + + If e.Row.DBCampo("Cargo").ToDouble < 0 AndAlso e.Row.FCLiteral("TxtCargo") IsNot Nothing Then e.Row.FCLiteral("TxtCargo").Text = String.Format("{0}", e.Row.DBCampo("Cargo").FormatoNumero()) + If e.Row.DBCampo("Abono").ToDouble < 0 AndAlso e.Row.FCLiteral("TxtAbono") IsNot Nothing Then e.Row.FCLiteral("TxtAbono").Text = String.Format("{0}", e.Row.DBCampo("Abono").FormatoNumero()) + Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero From bff5296e6fab911fd71d6869668b1d9b90dd28d6 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 15 Aug 2023 18:24:32 -0700 Subject: [PATCH 008/111] -- nueva columna de FormaPago --- Ventas/RepRecuperacionDetalle.aspx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Ventas/RepRecuperacionDetalle.aspx b/Ventas/RepRecuperacionDetalle.aspx index f71483ccd..a3547b46a 100644 --- a/Ventas/RepRecuperacionDetalle.aspx +++ b/Ventas/RepRecuperacionDetalle.aspx @@ -289,8 +289,7 @@ - - + From d1ffe06d2fb4f8dc8a65dda20120f45889ea423f Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 16 Aug 2023 11:12:28 -0700 Subject: [PATCH 009/111] --actualizar global --- AF/CatMarcas.aspx.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AF/CatMarcas.aspx.vb b/AF/CatMarcas.aspx.vb index 202fe026a..ff2412af5 100644 --- a/AF/CatMarcas.aspx.vb +++ b/AF/CatMarcas.aspx.vb @@ -49,11 +49,12 @@ Partial Class AF_CatMarcas If HdnModalidad.Value = "A" Then If ObjAF.AddMarcasActivosFijos(TxtMarca.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + GlobalDTMarcaActivoFijo(UsuarioActual.CveEmpresa) = Nothing Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If ElseIf HdnModalidad.Value = "U" Then If ObjAF.UpdateMarcasActivosFijos(HdnID.Value.ToEntero, TxtMarca.Text.Trim, Estatus, UsuarioActual.CveEmpresa) Then - + GlobalDTMarcaActivoFijo(UsuarioActual.CveEmpresa) = Nothing Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If End If @@ -85,6 +86,7 @@ Partial Class AF_CatMarcas HdnID.Value = GvRow.DataKey("CveMarcaActivoFijo") UpDatos.Update() If ObjAF.RemoveMarcasActivosFijos(HdnID.Value.ToEntero) Then + GlobalDTMarcaActivoFijo(UsuarioActual.CveEmpresa) = Nothing CargaDatos() Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If From 2f87e29f021018f1b182a7cfaf4420a3d37a0319 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 16 Aug 2023 18:14:20 -0700 Subject: [PATCH 010/111] =?UTF-8?q?-=20bloqueo=20con=20c=C3=B3digo=2001010?= =?UTF-8?q?1=20--=20longitud=20200=20en=20txtdescripci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx | 2 +- Compras/Compras.aspx.vb | 56 +++-------------------------------------- 2 files changed, 5 insertions(+), 53 deletions(-) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index 7960d2da9..f56cf82e1 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -322,7 +322,7 @@
Descripción:
- +
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 4e68296a1..0e2e4d47f 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -15,8 +15,6 @@ Imports MoreLinq Partial Class Compras_Compras Inherits ClsPaginas - - #Region "Propiedades" 'Local @@ -1568,9 +1566,7 @@ Partial Class Compras_Compras Dim RFC As String = "" If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-4), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then - Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador - ViewState("CveTipoProveedor") = dr("CveTipoProveedor").ToString.ToEntero Dim XMLDoc As New XmlDocument @@ -1600,8 +1596,6 @@ Partial Class Compras_Compras If UsuarioActual.CveEmpresa < 2 Then Valida.EsValida = 1 End If - - EnListadoEFOS = Valida.EnListaEFOS If EnListadoEFOS Then @@ -1631,10 +1625,8 @@ Partial Class Compras_Compras Else Alert("Los servicios de validacion de facturas del SAT, no están activados.", TipoMensaje.ToastError, "", 0) End If - UpPSS.Update() - If Validada And Not EnListadoEFOS Then Try XMLDoc.LoadXml(File.ReadAllText(Archivo).Replace("<br>", "").Replace("<", "").Replace("o;?", "")) @@ -1650,23 +1642,19 @@ Partial Class Compras_Compras CreaDTConceptos() CargaComprobanteXML(XMLDoc) - If NuevaValidacionXML = 1 Or (Version = "3.3" Or Version = "4.0") Then + If NuevaValidacionXML = 1 OrElse (Version = "3.3" OrElse Version = "4.0") Then Dim Xml As String Dim nodo As XmlNode = XMLDoc.DocumentElement Dim Version = ValorXML(nodo, "version") - - Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix) Dim cfdVer As String = "" Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable) - If Version = "3.2" Then Prefijo = "cfd" cfdVer = "http://www.sat.gob.mx/cfd/2" ElseIf Version = "3.3" Then cfdVer = "http://www.sat.gob.mx/cfd/3" - Else ' se considera que es la version 4.0 cfdVer = "http://www.sat.gob.mx/cfd/4" End If @@ -1691,10 +1679,8 @@ Partial Class Compras_Compras Xml = Xml.Replace("
", "") 'salto de linea html Xml = Xml.Replace("<br>", "") Xml = Xml.Replace("<", "") - Xml = Xml.Replace("&", "") 'adicional, si hay otros - If ObjeFacturas.GetFacturasComparacionXML(Version, Xml, UsuarioActual.CveEmpresa) Then TmpDT = ObjeFacturas.DtResultados TmpDT.Columns.Add("CveSATPSActualizado") @@ -1716,6 +1702,7 @@ Partial Class Compras_Compras Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) BtnGuardar.Enabled = False + BtnGuardar.ToolTip = "No se permite registrar facturas con conceptos con código '01010101'. Solicite al proveedor un nuevo comprobante." End If End If @@ -1823,11 +1810,8 @@ Partial Class Compras_Compras TmpDT.Columns.Add("Amortizacion", GetType(Decimal)) End If TmpDT.AcceptChanges() - ValidacionesTotalesXml() - Else - 'PRUEBA 'http://rm/Compras/Compras.aspx?CveFactura=122518 Emp: 48 @@ -1841,12 +1825,6 @@ Partial Class Compras_Compras AgregarConceptoIEPS(TrasladoIEPS, UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero) ' TrasladoIEPS = 0 End If - - 'AGREGA IEPS COMO IMPORTE GENERAL - 'If TrasladoIEPS > 0 And Not UsuarioActual.Empresa.Funcionalidad(112).ToString.ToEntero > 0 Then - ' IEPS = TrasladoIEPS - 'End If - 'en otro impuesto lo esta registrando en ajuste en automatico If OtrosImpuestos > 0 Then AjustaUltimoConcepto = True @@ -1862,12 +1840,9 @@ Partial Class Compras_Compras End If Dim SubTotalReal As Decimal = 0 - SubTotalReal = Math.Round(Total + RetencionISR + RetencionIVA - IVA + Descuentos - TrasladoIEPS, 2) ' NO se incluye otros impuestos para ajustar esa cifra - Dim DiferenciaTotales As Decimal = SubTotalReal - Math.Round(SubTotalConceptos, 2) - If DiferenciaTotales <> 0 Then 'Verificamos IEPS y Otros Impuestos 'restricccion general, que si el subtotal de los conceptos no cuadra con Total + RetISR + RetIVA - IVA <> SubTotalConeptos, ajuste al final @@ -1892,12 +1867,9 @@ Partial Class Compras_Compras Row.FCLinkButton("imgE").Visible = False Row.FCLinkButton("imgD").Visible = False Next - End If - End If TrasladoIEPS = 0 : OtrosImpuestos = 0 : SubTotal2 = SubTotal - Else PnlAjusteProductos.Visible = True Dim Porcentaje As Double = If(SubTotalConceptos > 0, Math.Round((SubTotalConceptos - SubTotalReal) / SubTotalConceptos * 100, 2), 0) @@ -1912,8 +1884,6 @@ Partial Class Compras_Compras Next End If End If - - 'Si no hay diferencias pero tenemos descuento, se ofrece la opcion para ajustar el gasto If Descuentos > 0 Then @@ -1933,7 +1903,6 @@ Partial Class Compras_Compras Row.FCLinkButton("imgD").Visible = False Next End If - End If SubTotal2 = SubTotalReal - Descuentos @@ -1946,7 +1915,6 @@ Partial Class Compras_Compras Alert(Msg, TipoMensaje.MsgAdvertencia) BtnGuardar.Enabled = False End If - 'AJUSTAMOS SUBTOTAL EN CASO DE SER DIFERENTE AL SUBTOTAL2 DEL XML (TOTAL - IVA) If SubTotal2 <> SubTotal Then SubTotal = SubTotalConceptos @@ -1978,16 +1946,10 @@ Partial Class Compras_Compras If OtrosImpuestos > 0 Then TrOtrosImpuestos.Visible = True HFDiferenciaCompra.Value = TxtTotal.Text - - 'LblRetIVA.Text = TmpDT.MAX("PorcentajeRetIVA").ToString '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%" - 'LblRetISR.Text = TmpDT.MAX("PorcentajeRetISR").ToString '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3) - 'ASIGNA VALORES ORIGINALES PARA GUARDAR AsignaValoresOriginales(SubTotal, SubTotal2, IVA, RetencionIVA, RetencionISR, Total) End If - - TxtFechaPago.Text = (TxtFecha.Text.ToDate.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString Dim drMon As DataRow = GlobalDTMonedas.FiltroPrimero(String.Format(" (Abreviatura LIKE '%{0}%' OR Moneda LIKE '%{0}%' )", Moneda)) @@ -2003,7 +1965,6 @@ Partial Class Compras_Compras LblMoneda.Text = Moneda LblMoneda.ForeColor = Drawing.Color.Red End If - End If If DdlMoneda.SelectedValue.ToEntero > 1 Then @@ -2017,7 +1978,6 @@ Partial Class Compras_Compras Else TxtFecha.Attributes.Add("onblur", "CambiaFechaTC();") End If - End If If TipoCambio > 0 And DdlMoneda.SelectedValue.ToEntero > 1 Then LblTC.Text = String.Format("TC: {0}", TipoCambio.ToString("N4")) @@ -2031,14 +1991,11 @@ Partial Class Compras_Compras Alert("El xml no contiene la etiqueta 'método de pago', favor de verificar la emisión con el proveedor.", TipoMensaje.MsgAdvertencia) BtnGuardar.Visible = False End If - End If - Else Alert("No se Encontró la Factura", TipoMensaje.MsgAdvertencia) BtnGuardar.Visible = False End If - 'GvPS.DataSource = 'DTConceptos 'GvPS.DataBind() End If @@ -2072,7 +2029,6 @@ Partial Class Compras_Compras If Cambio Then DdlRetIVAConcepto.Items.Clear() - If RFCProv.Length = 13 Then ' personal fisica If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) @@ -2109,7 +2065,6 @@ Partial Class Compras_Compras End If End If UpPS.Update() - End Sub Private Sub CargaRetISRConcepto(Optional Cambio As Boolean = False, Optional DIOTCveTipoOperacion As Integer = -1) If TrRetISR.Visible Then @@ -2133,9 +2088,6 @@ Partial Class Compras_Compras DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2")) DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3")) End If - - - End If UpPS.Update() End Sub @@ -7094,8 +7046,8 @@ Partial Class Compras_Compras If ObjIE.GetCreditos(DdlCredito.SelectedValue.ToEntero, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then CvePrePolizaCredito = ObjConta.AddPrePolizas("Compras/RegistrarCredito", -1, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, 1, TxtFecha.Text.ToDate, "Vinculación crédito con factura", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If ObjConta.AddPrePolizasDetalle(CvePrePolizaCredito, False, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, CveConceptoPago, "", "Vinculación crédito con factura", CveProveedor:=CveProveedor, CveCompra:=CveCompra, CvePrePolizaOriginal:=CvePrePolizaCredito) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaCredito, True, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, 50, "", "Vinculación crédito con factura", CveProveedor:=CveProveedor, CveCompra:=CveCompra, CvePrePolizaOriginal:=CvePrePolizaCredito) Then + If ObjConta.AddPrePolizasDetalle(CvePrePolizaCredito, False, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, CveConceptoPago, "", "Vinculación crédito con factura", CveProveedor:=CveProveedor, CveCompra:=CveCompra) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaCredito, True, ObjIE.TotalFinanciado, ObjIE.TotalFinanciado, 50, "", "Vinculación crédito con factura", CveProveedor:=CveProveedor, CveCompra:=CveCompra) Then ErrorCreditosCompra = True End If Else From c5fdbdcdbe573b374498854dbff1f6809a06020d Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 16 Aug 2023 18:14:32 -0700 Subject: [PATCH 011/111] --visual --- Inventarios/RecepcionAlmacen.aspx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx index cb3cc4163..1699504d8 100644 --- a/Inventarios/RecepcionAlmacen.aspx +++ b/Inventarios/RecepcionAlmacen.aspx @@ -320,7 +320,7 @@
-
+
"> @@ -458,7 +458,7 @@
<%-- GV DATOS --%> -
+
@@ -470,8 +470,6 @@
- - - + From 770144a9ae36cdd7203c718bcb5f88cc10e2748d Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 16 Aug 2023 18:14:59 -0700 Subject: [PATCH 012/111] =?UTF-8?q?--=20agregado=20con=20opci=C3=B3n=20acu?= =?UTF-8?q?mulado=20o=20mes=20seleccionado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contabilidad2/RepEstadoResultadosHorizontal.aspx | 3 +++ Contabilidad2/RepEstadoResultadosHorizontal.aspx.vb | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx index 94f866180..5f9404414 100644 --- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx +++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx @@ -127,6 +127,9 @@
+
+ +

@@ -363,7 +363,7 @@

@@ -475,7 +475,7 @@
@@ -586,7 +586,7 @@
@@ -640,7 +640,7 @@
@@ -691,7 +691,7 @@
@@ -850,7 +850,7 @@
@@ -897,7 +897,7 @@
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 8eb7c37e8..7a0eca2ca 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -869,7 +869,6 @@ Partial Class Bancos_FluctuacionCambiaria Dim cb As CheckBox = gvr.FCCheckBox("ChkGenerarBancos") If cb.Checked Then Total = gvr.DataKey("Fluctuacion").ToDecimal - ' Dim IdCtaComplementaria As Integer = gvr.DataKey("IdCtaAfectable").ToEntero Dim ConceptoReferencia As String = String.Format("{0} - {1} {2}", gvr.DataKey("Banco"), gvr.DataKey("NumCuenta"), MesTCtexto) 'MOVIMIENTO DE FLUCTUACION diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index aeda26840..e2fb8b45c 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1517,7 +1517,6 @@ Partial Class Bancos_IE Folio = Banco.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero) Banco.Dispose() TxtFolio.Text = Folio.ToString - Dim drI As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue)) If drI IsNot Nothing Then @@ -1525,11 +1524,12 @@ Partial Class Bancos_IE Else CargaNotas(-1) End If - - Else TxtFolio.Text = "" End If + If UsuarioActual.CveEmpresa = 140 AndAlso Request("Opcion").ToString = "INGPC" Then + CargaFolioAdicional() + End If Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta={0}", DdlCuenta.SelectedValue)) If dr IsNot Nothing Then @@ -1707,7 +1707,6 @@ Partial Class Bancos_IE If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSSINFACT", "EGSCREDITO") Then dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs' AND Estatus = 1") LtlTitulo.Text = "Egreso Por Comprobar" - RBL.Items.Remove(RBL.Items.FindByValue("C")) ElseIf Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString = "DEV" Then dt = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Ing' AND Estatus = 1 ") @@ -3809,7 +3808,6 @@ Partial Class Bancos_IE DdlPersonal.Visible = False DdlProveedores.Visible = True DdlCliente.Visible = False - CargaFolioAdicional() ElseIf RBL.SelectedValue = "C" Then DdlPersonal.Visible = False DdlProveedores.Visible = False diff --git a/Bancos/OtrosIE.aspx.vb b/Bancos/OtrosIE.aspx.vb index 60cbe0e6a..3dbbe20b7 100644 --- a/Bancos/OtrosIE.aspx.vb +++ b/Bancos/OtrosIE.aspx.vb @@ -214,7 +214,7 @@ Partial Class Bancos_OtrosIE 'SACO LA CLAVE DE LA CUENTA BANCARIA SELECCIONADO If DdlCuenta.SelectedValue.ToEntero > 0 And DRt("CveConcepto").ToString = "30" Then 'DTCuentasContables - Dim DRr As DataRow = DTCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero))) + ' Dim DRr As DataRow = DTCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero))) If DRr IsNot Nothing Then CodigoCuenta = DRr("CuentaFormato").ToString() EsComodin = 1 @@ -463,27 +463,15 @@ Partial Class Bancos_OtrosIE 'saco de la póliza el importe del cheque, que coincida la cuenta contable con la bancaria If DdlCuenta.SelectedValue.ToEntero > 0 Then - Dim DR As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta=" & DdlCuenta.SelectedValue) - If DR IsNot Nothing Then - TxtImporte.Text = DTMovimientos.SUM("Abono", "IdCuenta =" & DR("IdCtaContable").ToString).ToString - UPPDocumento.Update() - End If + 'Dim DR As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta=" & DdlCuenta.SelectedValue) + 'If DR IsNot Nothing Then + ' TxtImporte.Text = DTMovimientos.SUM("Abono", "IdCuenta =" & DR("Id0CtaContable").ToString).ToString + ' UPPDocumento.Update() + 'End If End If End Sub - Private Function IdCuentaBancos(CveCuenta As Integer) As Integer - Dim Retorno As Integer = 0 - 'saco de la póliza el importe del cheque, que coincida la cuenta contable con la bancaria - If CveCuenta > 0 Then - Dim drr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta=" & CveCuenta) - If drr IsNot Nothing Then - Retorno = drr("IdCtaContable").ToString.ToEntero - End If - End If - Return Retorno - End Function - Private Sub CargaCuentasDepositos(CveProveedor As Integer, CveCliente As Integer, CvePersonal As Integer, CveColectiva As Integer) DdlCuentaDeposito.Items.Clear() If DdlTipoTransaccion.SelectedValue = "2" Then diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index 9189f9129..0330a0c2e 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -249,8 +249,8 @@ public partial class Bancos_PagoDeudor : ClsPaginas } } - // DEUDORES - DEUDORES COMPLEMENTARIAIDCtaContableDeudorPrestamo - if (UsaComplementaria) //(IDCtaContableDeudorCompPrestamo > 0) + // DEUDORES - DEUDORES COMPLEMENTARIAI + if (UsaComplementaria) { // DEUDOR COMPLEMENTARIA if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, 0, (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), 256, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero())) diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index 2d4de193c..7e78911fd 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -431,7 +431,7 @@ Partial Class Bancos_PolizaCheque Dim dr As DataRow = DtMovimientos.NewRow If drt("CveNomina").ToString.ToEntero > 0 Then - Dim drr As DataRow = Nothing ' DtCuentasContables.FiltroPrimero(String.Format("Id={0}", If(ObjConta.GetRetCuenta(31, UsuarioActual.CveEmpresa), ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero, -1))) + Dim drr As DataRow = Nothing ' DtCuentasContables.FiltroPrimero(String.Format("Id={0}", If(ObjConta.GetRetCuenta(31, UsuarioActual.CveEmpresa), ObjConta.DtResultados.Rows(0)("Id0CtaContable").ToString.ToEntero, -1))) TipoMovto = 0 CveConcepto = 31 IdCuenta = If(drr IsNot Nothing, drr("Id").ToString.ToEntero, -1) diff --git a/Bancos/PopIECompras.aspx b/Bancos/PopIECompras.aspx index 3a5a0685d..80d0624c6 100644 --- a/Bancos/PopIECompras.aspx +++ b/Bancos/PopIECompras.aspx @@ -300,7 +300,7 @@
- @@ -371,7 +371,7 @@
- diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index f42d31759..2a93043a1 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -222,7 +222,7 @@
- @@ -293,7 +293,7 @@
- diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index ceafe70d7..12c5e546d 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -1325,20 +1325,6 @@ Partial Class Bancos_PopIEVentas MsgError = ObjMov.MensajePolizaDescuadre End If End If - - ''Conta ContPAQ - 'If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then - - ' If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - ' IdPoliza = ObjMov.ContaIdPoliza - ' ' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion) - ' Else - ' Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico") - ' End If - - 'End If - - Else MsgError = "No se pudo insertar la poliza detalle" End If @@ -1358,15 +1344,10 @@ Partial Class Bancos_PopIEVentas StrMsg.Append("El Documento se guardó correctamente.
") 'Alert("El Documento se guardó correctamente.", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();") If TipoTransaccion = "Egs" AndAlso CveIE > 0 Then GeneraChequePDF(CveIE, UsuarioActual.Empresa) - '07-05-2018 - Timbra Complemento de pago Dim TextoComplementoPago As String = "" - If UsuarioActual.CveEmpresa = 119 Then - - StrMsg.AppendFormat("Folio {0}
", ObjIE.Folio) - - End If + StrMsg.AppendFormat("Folio {0}
", ObjIE.Folio) If RBLContado.SelectedValue = "1" And ChkComplementoPago.Checked Then Dim SeriesPago As New List(Of String) @@ -1374,9 +1355,7 @@ Partial Class Bancos_PopIEVentas Dim CveVentas As New List(Of Integer) CveVentas.Add(CveVenta) - TextoComplementoPago = EmitirComplementoPago(CveIE, CveVentas, SeriesPago) - StrMsg.Append($"
{TextoComplementoPago}") End If @@ -1398,8 +1377,6 @@ Partial Class Bancos_PopIEVentas ObjMov.Dispose() ObjCliente.Dispose() - 'CargaVenta(CveVenta) - 'UpDatosVenta.Update() End Sub Private Sub LimpiarTodo() diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs index a72cf7068..ab7330f98 100644 --- a/Bancos/PrestamoPersonal.aspx.cs +++ b/Bancos/PrestamoPersonal.aspx.cs @@ -329,9 +329,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas //CONTABILIZA if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) - { - //if (IDCtaContablePrestamo > 0 && IDCtaContableBancos > 0) - //{ + { if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) { IDPoliza = ObjMov.ContaIdPoliza; @@ -367,14 +365,6 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas { archivo = new System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero())); } - - //if (archivo.Length > 0) - //{ - // if (archivo.Exists) - // { - // Msg.AppendFormat(@"

{1} ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)), String.Format("Imprimir {0}", DdlTipoTransaccion.SelectedItem)); - // } - //} ObjIE.Commit(); @@ -617,9 +607,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas //CONTABILIZA if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) - { - //if (IDCtaContablePrestamo > 0 && IDCtaContableBancosPrestamo > 0) - //{ + { if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) { IDPoliza = ObjMov.ContaIdPoliza; @@ -627,19 +615,7 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas else { Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); - } - //} - //else - //{ - // if (IDCtaContablePrestamo < 1) - // { - // Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Acreedor es invalida", TipoMensaje.MsgAdvertencia); - // } - // if (IDCtaContableBancosPrestamo < 1) - // { - // Alert("No se puede contabilizar la Prepoliza debido a que la cuenta bancaria es invalida", TipoMensaje.MsgAdvertencia); - // } - //} + } } if (MsgError.Equals("")) diff --git a/Bancos/ProductosFinancieros.aspx b/Bancos/ProductosFinancieros.aspx index a1d9317e9..48312c21d 100644 --- a/Bancos/ProductosFinancieros.aspx +++ b/Bancos/ProductosFinancieros.aspx @@ -41,7 +41,7 @@
- +
diff --git a/Bancos/ProductosFinancieros.aspx.vb b/Bancos/ProductosFinancieros.aspx.vb index fe23aa5fe..a4ec195f6 100644 --- a/Bancos/ProductosFinancieros.aspx.vb +++ b/Bancos/ProductosFinancieros.aspx.vb @@ -317,7 +317,7 @@ Partial Class Bancos_ProductosFinancieros Dim CtaCuenta = -1 If DtCuentas.Rows.Count = 1 Then - CtaCuenta = DtCuentas.Rows(0)("IdCtaContable").ToString.ToEntero + CtaCuenta = DtCuentas.Rows(0)("Id0CtaContable").ToString.ToEntero Else ErrorTransaccion = True End If diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 60c465d59..e4442af47 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -135,7 +135,6 @@ Partial Class Bancos_ProveedoresAbonar ViewState("CveProveedorSucursal") = value End Set End Property - Private Property PermiteModificarImporte As Boolean Get Return CType(ViewState("PermiteModificarImporte").ToString, Boolean) @@ -144,11 +143,6 @@ Partial Class Bancos_ProveedoresAbonar ViewState("PermiteModificarImporte") = value End Set End Property - Private ReadOnly Property IdCtaContComplementaria As Integer - Get - Return ViewState("IdCtaContComplementaria").ToString.ToEntero - End Get - End Property Private Property ComprobanteIE As String Get Return ViewState("ComprobanteIE").ToString @@ -859,41 +853,7 @@ Partial Class Bancos_ProveedoresAbonar MsgError = "No se pudo insertar la póliza" End If End If - - 'If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso CveMoneda = 2 AndAlso CveMonedaFiltro = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES - ' 'fluctuación. - ' Dim TCPago = TxtTCDolares.Text.ToDecimal - - ' Dim ImporteFluctuacion As Decimal = 0 '((ImporteSeleccionado / TCPago) - TxtImporte.Text.ToDecimal) - - ' Dim DtPrePoliza As DataTable = Nothing - ' If ObjMov.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then - ' DtPrePoliza = ObjMov.DtResultados.Copy - ' End If - - ' Dim PagoProveedoresME = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 312 AND TipoMovto = 0") - ' Dim Bancos = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 30 AND TipoMovto = 1") - ' Dim BancosComplementaria = DtPrePoliza.SUMD("ImporteMN", "CveConceptoContable = 204 AND TipoMovto = 1") - - ' DtPrePoliza.Dispose() - - ' ImporteFluctuacion = PagoProveedoresME - (Bancos + BancosComplementaria) - - ' If MsgError = "" AndAlso ImporteFluctuacion.RoundSQL() <> 0 Then - ' 'SI EL PAGO DE PROVEEDORES ME ES MAYOR QUE BANCOS METER EL CONCEPTO DE GANANCIA - ' If ImporteFluctuacion > 0 Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Referencia, 64, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then - ' MsgError = "Ocurrio un error al saldar el movimiento" - ' End If - ' ElseIf ImporteFluctuacion < 0 Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Math.Abs(ImporteFluctuacion), Referencia, 65, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then - ' MsgError = "Ocurrio un error al saldar el movimiento" - ' End If - ' End If - ' End If - 'End If - - End If + End If If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then If ObjMov.ValorPolizaDescuadre > 0 Then diff --git a/Bancos/Reembolsos.aspx b/Bancos/Reembolsos.aspx index 680105dca..52d8d61d9 100644 --- a/Bancos/Reembolsos.aspx +++ b/Bancos/Reembolsos.aspx @@ -481,7 +481,7 @@ - + @@ -565,13 +565,7 @@ - - - IdCtaContProveedores - - - - + diff --git a/Bancos/Reembolsos.aspx.vb b/Bancos/Reembolsos.aspx.vb index 8ff5bedad..abdcb9314 100644 --- a/Bancos/Reembolsos.aspx.vb +++ b/Bancos/Reembolsos.aspx.vb @@ -26,14 +26,6 @@ Partial Class Bancos_Reembolsos ViewState("CveMoneda") = value End Set End Property - Private Property IdCuentaBancaria As Integer - Get - Return ViewState("IdCuentaBancaria").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("IdCuentaBancaria") = value - End Set - End Property Private Property Beneficiario As String Get Return ViewState("Beneficiario").ToString @@ -262,7 +254,6 @@ Partial Class Bancos_Reembolsos If dr IsNot Nothing Then CveMoneda = dr("CveMoneda").ToString.ToEntero - IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero End If If HdnTipoTransaccion.Value = "Egs" Then @@ -394,7 +385,6 @@ Partial Class Bancos_Reembolsos If dr IsNot Nothing Then CveMoneda = dr("CveMoneda").ToString.ToEntero - IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero End If ''AC - Poliza Vieja @@ -606,7 +596,7 @@ Partial Class Bancos_Reembolsos 'AFECTAR MATRIZ EGRESOS Total = gvr.FCTextBox("TxtAbonar").Text.ToDouble - If Not ObjAC.AddMovimiento(IDPolizaNueva, gvr.DataKey("IdCtaContProveedores").ToEntero, False, Total, FolioPolizaNueva, ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For + If Not ObjAC.AddMovimiento(IDPolizaNueva, 0, False, Total, FolioPolizaNueva, ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True : Exit For Else ErrorAC = True @@ -651,7 +641,7 @@ Partial Class Bancos_Reembolsos 'registro el movimiento en bancos y su comprobacion If GeneroCheque Then If Not ObjAC.AddMovimiento(IDPolizaVieja, IdCuentaBeneficiario, False, TxtImporteVinculado.Text.ToDouble, FolioPolizaVieja, ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True - If Not ObjAC.AddMovimiento(IDPolizaVieja, IdCuentaBancaria, True, TxtImporteVinculado.Text.ToDouble, FolioPolizaVieja, ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True + If Not ObjAC.AddMovimiento(IDPolizaVieja, 0, True, TxtImporteVinculado.Text.ToDouble, FolioPolizaVieja, ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True End If End If @@ -667,7 +657,7 @@ Partial Class Bancos_Reembolsos 'Poliza NUEVA If Not ErrorAC And IDPolizaNueva > 0 Then ConceptoRenglon = String.Format("Comprobación: {0}", Beneficiario) - If Not ObjAC.AddMovimiento(IDPolizaNueva, IdCuentaBancaria, True, TxtImporte.Text.ToDouble, FolioPolizaNueva, ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True + If Not ObjAC.AddMovimiento(IDPolizaNueva, 0, True, TxtImporte.Text.ToDouble, FolioPolizaNueva, ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True End If If Not ErrorAC And IDPolizaNueva > 0 Then @@ -775,7 +765,6 @@ Partial Class Bancos_Reembolsos If dr IsNot Nothing Then CveMoneda = dr("CveMoneda").ToString.ToEntero - IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero End If Else CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.ToDate, TxtFolio.Text.Trim, TxtAboneA.Text, TxtImporte.Text.ToDouble, CveMoneda, 0.0, TxtObservaciones.Text, "", ChkAbonoCuenta.Checked, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -901,7 +890,7 @@ Partial Class Bancos_Reembolsos Next ConceptoRenglon = String.Format("Pagado: {0}", TxtAboneA.Text) - If Not ObjAC.AddMovimiento(IDPoliza, IdCuentaBancaria, True, TxtImporte.Text.ToDouble, Referencia, ConceptoRenglon, 0, Fecha, "") Then + If Not ObjAC.AddMovimiento(IDPoliza, 0, True, TxtImporte.Text.ToDouble, Referencia, ConceptoRenglon, 0, Fecha, "") Then ErrorAC = True End If @@ -1142,11 +1131,6 @@ Partial Class Bancos_Reembolsos 'recargo la moneda con la que se va a pagar 'Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimero("CveCuenta = " & DdlCuentaDiferencia.SelectedValue) - 'If dr IsNot Nothing Then - ' CveMoneda = dr("CveMoneda").ToString.ToEntero - ' IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero - 'End If - 'If HdnTipoTransaccion.Value = "Egs" Then ' Dim Folio As Long ' Dim Banco As New ClsBancos diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb index 1dbe8f95b..fbf30577c 100644 --- a/Bancos/RepEgresosSinComprobante.aspx.vb +++ b/Bancos/RepEgresosSinComprobante.aspx.vb @@ -300,7 +300,6 @@ Partial Class Bancos_RepEgresosSinComprobante Try For Each gr As GridViewRow In GvPersonal.Rows If gr.FCCheckBox("Chk").Checked Then - Dim IdCtaContPersonal As Integer = 0 Dim CveConceptoContable As Integer Dim TipoMovtoOtIngresos As Boolean = True Dim TipoMovtoConcepto As Boolean = False diff --git a/Bancos/Transferencias.aspx b/Bancos/Transferencias.aspx index 701a2ed2c..612e4b413 100644 --- a/Bancos/Transferencias.aspx +++ b/Bancos/Transferencias.aspx @@ -181,7 +181,7 @@
- + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 0e2e4d47f..34f47fa43 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4735,13 +4735,6 @@ Partial Class Compras_Compras 'INVENTARIOS EN AC Dim ContadorInventario As Integer = GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) - Dim CtaAlmacen As Integer - If ContadorInventario > 0 Then - Dim drr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToString.ToEntero)) - If drr IsNot Nothing Then - CtaAlmacen = drr("IdCtaContable").ToString.ToEntero - End If - End If Dim tTotalIVA, tTotalGral, tDiferenciaIVA, tIVA, tRetIVA, tRetISR As Decimal Dim ipresup As Integer = 0 @@ -5536,7 +5529,6 @@ Partial Class Compras_Compras Dim DT As DataTable = Nothing Dim CuentasContablesInvalidas As New StringBuilder Dim ConceptoPersonal As String = "" - Dim IdCtaIVAXAcreditar As Integer = 0 Dim GuardoConcepto18 As Boolean = False 'Bancos (30) @@ -9741,7 +9733,6 @@ Partial Class Compras_Compras TmpDT.Columns.Add("OtrosGastos", GetType(Decimal)) TmpDT.Columns.Add("Total", GetType(Decimal)) TmpDT.Columns.Add("AsientoContableCompras", GetType(Integer)) - TmpDT.Columns.Add("IdCtaContCompras", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("CveSubProyecto", GetType(Integer)) @@ -19718,7 +19709,7 @@ Partial Class Compras_Compras SBEliminacionCompra.Append($"Capturó: {LblUsuarioCaptura.Text}, ") SBEliminacionCompra.Append($"F Captura: {LitFechCaptura.Text}, ") - SBEliminacionCompra.Append($"Dealles:
") + SBEliminacionCompra.Append($"Detalles:
") For Each dRow As DataRow In TmpDT.Rows SBEliminacionCompra.Append($"-Cantidad: {dRow("Cantidad").ToString.ToDecimal().ToString("###,###,###.00") }, PS: {dRow("PS")}, Obs: {dRow("Obs")}, Sub Proyecto: {dRow("SubProyecto")}, Tipo Gasto: {dRow("TipoGasto")}, IVA: {dRow("IVA").ToString.ToDecimal.ToString("###,###,###.00")}, IEPSPS: {dRow("IEPSPS").ToString.ToDecimal.ToString("###,###,###.00") }
") Next diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 9ecc4b10e..8f69103cf 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -4365,11 +4365,6 @@ Partial Class Compras_Proveedores Dim row As DataRow = dt.Rows(0) CtaCodigo = CStr(row("CtaCodigo")) Codigo = CStr(row("Codigo")) - - 'If Not ObjProveedores.VincularCuentasContables(IdCtaContableProveedores, CtaCodigoProveedores, IdCtaContableAcreedores, CtaCodigoAcreedores, IdCtaContableAnticipos, CtaCodigoAnticipos, IdCtaContableDeudor, CtaCodigoDeudor, IdCtaContableDocsXPagar, CtaCodigoDocsXPagar, CveProveedor) Then - ' TieneError = True - 'End If - Else TieneError = True End If diff --git a/Compras/Reembolsos.aspx b/Compras/Reembolsos.aspx index 21370c79f..05673e9e8 100644 --- a/Compras/Reembolsos.aspx +++ b/Compras/Reembolsos.aspx @@ -412,7 +412,7 @@ - + @@ -494,13 +494,7 @@ - - - IdCtaContProveedores - - - - + diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx index 2aeabc214..ca26d32be 100644 --- a/Compras/ReembolsosComprobaciones.aspx +++ b/Compras/ReembolsosComprobaciones.aspx @@ -320,7 +320,7 @@ + DataKeyNames="CveCompra,FechaCompra,CveProveedor,CveMoneda,Proveedor,SerieFolio,SubTotal,IVA,RetIVA,RetISR,IEPS,Total,TipoCambio,CvePrePoliza,IdPoliza,CveRetIVAConcepto,CveRetISRConcepto,IVAPorcentaje,IVADeducible,IVANoDeducible,CveTipoConcepto,CveSubProyecto,IVAPorPagar,NoDeducible"> @@ -413,13 +413,7 @@ - - - IdCtaContProveedores - - - - + Ot. Ing. diff --git a/Compras/RembolsosSinAsignar.aspx b/Compras/RembolsosSinAsignar.aspx index 9046f41a6..5688091b8 100644 --- a/Compras/RembolsosSinAsignar.aspx +++ b/Compras/RembolsosSinAsignar.aspx @@ -106,7 +106,7 @@ - + diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb index f0016d615..3d81da2ae 100644 --- a/Compras/RepCxPDetalle.aspx.vb +++ b/Compras/RepCxPDetalle.aspx.vb @@ -343,38 +343,8 @@ Partial Class RepCxPDetalle DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) UPFiltros.Update() - End Sub - - Private Function CargaCuentasContables(DT As DataTable) As DataTable - - Dim ObjConpaq As New ClsContPAQi(UsuarioActual.Empresa) - Try - If ObjConpaq.GetCuentas(-1, -1, -1) Then - DTCuentasContables = ObjConpaq.DtResultados - - For Each Proveedor As DataRow In DT.Rows - If Proveedor("IdCtaContProveedores").ToString.ToEntero > 0 Then - - If Not DTCuentasContables.FiltraParametros($"Id = {Proveedor("IdCtaContProveedores").ToString }") Is Nothing Then - Proveedor("Cuenta") = DTCuentasContables.FiltroPrimeroValor("CuentaFormato", $"id = {Proveedor("IdCtaContProveedores").ToString.ToEntero }") - End If - - End If - Next - - DT.AcceptChanges() - Else - DTCuentasContables = New DataTable - End If - Catch ex As Exception - OnError("Ocurrió un error al cargar las cuentas contables", ex) - End Try - ObjConpaq.Dispose() - - Return DT - - End Function - + End Sub + Private Sub CargaDatos() Dim ObjMovtos As New ClsMovimientos() Try @@ -406,15 +376,12 @@ Partial Class RepCxPDetalle TMP_DTDatos.Columns.Add("Cuenta") If DdlGrupo.SelectedValue.ToEntero = 5 And UsuarioActual.Empresa.TipoContabilidad = 2 Then 'cuando es grupo por proveedor, se muestra la cuneta contable - TMP_DTDatos = CargaCuentasContables(TMP_DTDatos) + 'TMP_DTDatos = CargaCuentasContables(TMP_DTDatos) GvDatos.Columns(13).Visible = True Else GvDatos.Columns(13).Visible = False End If - DtDatos = TMP_DTDatos - - GvDatos.DataSource = DtDatos HplProgramar.NavigateUrl = $"/Bancos/RepProgramarRecursos.aspx{HttpContext.Current.Request.Url.PathAndQuery.Replace("/Compras/RepCxPDetalle.aspx", "")}" diff --git a/Compras/RepNotasCredito.aspx b/Compras/RepNotasCredito.aspx index 5c8f0bec3..d7f55adc9 100644 --- a/Compras/RepNotasCredito.aspx +++ b/Compras/RepNotasCredito.aspx @@ -108,7 +108,7 @@ + DataKeyNames="CveCompra,Saldo,CveIE,CveProveedor,CvePersonal,CveMoneda,CveTipoConcepto,TipoCambio,CveSubProyecto,SerieFolio"> diff --git a/Compras/RepRembolsoComprobaciones.aspx b/Compras/RepRembolsoComprobaciones.aspx index b9fe26db5..3b0965312 100644 --- a/Compras/RepRembolsoComprobaciones.aspx +++ b/Compras/RepRembolsoComprobaciones.aspx @@ -159,7 +159,7 @@
- + Compra @@ -242,13 +242,7 @@ - - - IdCtaContProveedores - - - - + diff --git a/Contabilidad/OCDetalleAlmacen.aspx.vb b/Contabilidad/OCDetalleAlmacen.aspx.vb index d9de21e2b..ee6c8e9f5 100644 --- a/Contabilidad/OCDetalleAlmacen.aspx.vb +++ b/Contabilidad/OCDetalleAlmacen.aspx.vb @@ -30,11 +30,8 @@ Partial Class Contabilidad_OCDetalleAlmacen Private Sub CargaDatos() - Dim ObjConta As New ClsContabilidad - - If ObjConta.GetOCDetalleAlmacen(100000D, UsuarioActual.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then @@ -57,10 +54,8 @@ Partial Class Contabilidad_OCDetalleAlmacen End Sub - Protected Sub BtnProcesarRegistros_Click(sender As Object, e As EventArgs) - Dim ObjConta As New ClsContabilidad ObjConta.IniciaTransacSQL() @@ -84,31 +79,20 @@ Partial Class Contabilidad_OCDetalleAlmacen Dim CveCompra As Integer = GvDrow.DataKey("CveCompra").ToString.ToEntero Dim Folio As String = GvDrow.DataKey("Folio").ToString - - Dim CveCuenta176 As Integer = 0 - Dim IdCtaCuenta176 As Integer = 1245 - Dim IdCtaCuenta228 As Integer = 1247 - Dim IdCtaCuenta229 As Integer = 1249 - - Dim CveCuenta177 As Integer = 55294 - Dim IdCtaCuenta177 As Integer = 1148 - Dim Chk As CheckBox = GvDrow.FCCheckBox("Chk") - If Chk IsNot Nothing AndAlso Chk.Checked Then CvePrePoliza = ObjConta.AddPrePolizas(modulo, 74, Diferencia, Diferencia, CveMoneda, Fecha, Referencia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3) GvDrow.Cells(1).Text = CvePrePoliza.ToString mensaje = mensaje & $"CvePrePoliza {CvePrePoliza } OC: {Folio} Importe :{Diferencia}
" - If CvePrePoliza > 0 Then If Cargo > Abono Then - If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Diferencia, Diferencia, 176, Referencia, Referencia, ImporteME:=Diferencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then + If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Diferencia, Diferencia, 176, Referencia, Referencia, ImporteME:=Diferencia, CveCompra:=CveCompra, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then - If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Diferencia, -Diferencia, 177, Referencia, Referencia, CveCompra:=CveCompra, Contabilizable:=1, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then + If (ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Diferencia, -Diferencia, 177, Referencia, Referencia, CveCompra:=CveCompra, CveOC:=CveOC, CveOCDetalle:=CveOCDetalle, CveProveedor:=CveProveedor)) Then ContadorProcesados = ContadorProcesados + 1 Else ErrorProcesamiento = True diff --git a/Contabilidad/RegPoliza.aspx.vb b/Contabilidad/RegPoliza.aspx.vb index 564ecad8c..735828ee6 100644 --- a/Contabilidad/RegPoliza.aspx.vb +++ b/Contabilidad/RegPoliza.aspx.vb @@ -1186,7 +1186,7 @@ Partial Class RegPoliza 'If tCveSub <= 0 AndAlso drt("IdSegNeg").ToString.ToEntero = 0 Then 'toma el primero ' tCveSub = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero 'End If - If ObjConta.AddPrePolizasDetalle(tCvePrePoliza, drt("TipoMovto").ToString = "True", + If ObjConta.AddPrePolizasDetalle2(tCvePrePoliza, drt("TipoMovto").ToString = "True", drt("Importe").ToString.ToDecimal, drt("Concepto").ToString, 299, drt("Concepto").ToString, Now, diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 7ccb3487a..5dfdb2eac 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -1080,11 +1080,11 @@ Partial Class ContabilidadC_RegPrePoliza End If If Importe <> 0 Then - If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero(), gvr.FCTextBox("TxtConcepto").Text, + If ObjMov.AddPrePolizasDetalle2(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero(), gvr.FCTextBox("TxtConcepto").Text, TxtFecha.Text.ToDate(), IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), CveIE:=CveIE, CveProveedor:=CveProveedor, CveCompra:=CveCompra, CvePersonal:=gvr.DataKey("CvePersonal").ToEntero(), CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero(), - ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero(), + CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero(), CveCliente:=gvr.DataKey("CveCliente").ToEntero(), CveVenta:=gvr.DataKey("CveVenta").ToEntero(), TipoCambio:=If(gvr.DataKey("TC").ToString().ToDecimal() > 0, gvr.DataKey("TC").ToString().ToDecimal(), 1), ImporteME:=If(gvr.DataKey("TC").ToString().ToDecimal() > 0, (Importe / (gvr.DataKey("TC").ToString().ToDecimal() - 1)).RoundSQL, 0), PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal(), CveCuenta:=gvr.DataKey("CveCuenta").ToEntero()) Then @@ -1221,8 +1221,7 @@ Partial Class ContabilidadC_RegPrePoliza row.DataKey("CveConceptoContable").ToEntero(), row.FCTextBox("TxtConcepto").Text, Now, row.FCDropDownList("DdlCtaContable").SelectedValue.ToEntero(), 0, CveSubProyecto:=row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), CveTipoGasto:=If(DdlTipoGasto.Visible, row.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero(), row.DataKey("CveTipoGasto").ToEntero()), - ImporteMX:=If(row.FCTextBox("TxtCargo").Text.ToDecimal() <> 0, - row.FCTextBox("TxtCargo").Text.ToDecimal(), row.FCTextBox("TxtAbono").Text.ToDecimal()), CveProveedor:=DdlProveedores.SelectedValue.ToEntero()) Then + CveProveedor:=DdlProveedores.SelectedValue.ToEntero()) Then OcurrioError = True Exit For End If @@ -2260,7 +2259,7 @@ Partial Class ContabilidadC_RegPrePoliza If YaExiste = False Then If IdCuenta > 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then + If Not ObjConta.AddPrePolizasDetalle2(CvePrePoliza, TipoMovto, Importe, "", CveConceptoContable, Concepto, Now.ToDate(), IdCtaContable, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto, CveCuenta:=IdCuenta) Then TieneError = True Exit For End If diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index 421e49bb0..51afa5fbe 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -440,7 +440,7 @@
+ DataKeyNames="CvePrePolizaDetalle,CvePrePoliza,IdMov, CveConceptoContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,Cargo,Abono,CveIE" Width="100%" > Movimiento diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 89f724e8c..e8af9813c 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -398,7 +398,6 @@ Partial Class ContabilidadC_RegPrePolizaS .Add("CveTipoGasto", Type.GetType("System.Int32")) .Add("CvePrePolizaDetalle", Type.GetType("System.Int32")) .Add("CveConceptoContable", Type.GetType("System.Int32")) - .Add("IdCtaContable", Type.GetType("System.Int32")) .Add("ConceptoContable", Type.GetType("System.String")) .Add("CveCuenta", Type.GetType("System.Int32")) .Add("CodigoNombreCuenta", Type.GetType("System.String")) @@ -555,13 +554,6 @@ Partial Class ContabilidadC_RegPrePolizaS If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DataKey("IdCtaContable") <> "" Then - Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", e.Row.DataKey("IdCtaContable"))) - If drr IsNot Nothing Then - e.Row.FCLiteral("DdlCtaContable").Text = drr("CuentaFormato").ToString() + " - " + drr("Nombre").ToString() - End If - End If - TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDecimal + e.Row.DBCampo("Cargo").ToDecimal).ToString.FormatoNumero TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDecimal + e.Row.DBCampo("Abono").ToDecimal).ToString.FormatoNumero @@ -685,18 +677,6 @@ Partial Class ContabilidadC_RegPrePolizaS DdlCuentaContableE.Items.Insert(0, New ListItem("Sin Asignar", "0")) End Sub - Private Function CargaCuentasContpaq(CveCuenta As Integer) As Integer - Dim Retorno As Integer = -1 - If CveCuenta > 0 Then - Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(CveCuenta, "-1", 1, UsuarioActual.CveEmpresa) Then - Retorno = ObjConta.DtResultados.Rows(0)("IdCompaq").ToString.ToEntero - End If - ObjConta.Dispose() - End If - Return Retorno - - End Function Private Sub CargaTiposGasto() DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa) DdlTipoGasto.DataBind() @@ -1006,9 +986,6 @@ Partial Class ContabilidadC_RegPrePolizaS 'inserto las compras que voy a pagarDdlSaldos For Each gvr As GridViewRow In Gv.Rows - 'If gvr.DataKey("IDCuenta").ToEntero > 0 Then - ' IdCtaContable = gvr.DataKey("IDCuenta") - 'End If 'Registra movimieno bancario If gvr.DataKey("CveConceptoContable").ToEntero = 30 AndAlso (gvr.DataKey("ContadoImporte").ToDecimal <> 0 OrElse TipoGrid = 1) Then @@ -1219,7 +1196,7 @@ Partial Class ContabilidadC_RegPrePolizaS End If If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero, - row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, + If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero), CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, @@ -1723,9 +1700,7 @@ Partial Class ContabilidadC_RegPrePolizaS ChkSeguir.Visible = True If DtMovimientos Is Nothing Then CreaDT() - Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero) Dim dr As DataRow = DtMovimientos.NewRow - dr("IdCtaContable") = IdCtaContable dr("CveCuenta") = DdlCuentaContableE.SelectedValue dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text @@ -1791,8 +1766,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If If Rows.Count > 0 Then Dim dr As DataRow = Rows(0) - Dim IdCtaContable As Integer = CargaCuentasContpaq(DdlCuentaContableE.SelectedValue.ToEntero) - dr("IdCtaContable") = IdCtaContable dr("CveCuenta") = DdlCuentaContableE.SelectedValue dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text @@ -1929,7 +1902,6 @@ Partial Class ContabilidadC_RegPrePolizaS If CvePrePoliza > 0 Then Dim dr As DataRow = DtMovimientos.NewRow - dr("IdCtaContable") = -1 'DdlCtaContable.SelectedValue dr("CveCuenta") = DdlCuentaContable.SelectedValue dr("ConceptoContable") = DdlConceptosContables.SelectedItem.Text dr("CveConceptoContable") = DdlConceptosContables.SelectedValue @@ -2307,7 +2279,6 @@ Partial Class ContabilidadC_RegPrePolizaS .TipoTransferencia = "", .CveConceptoContable = row.Item("CveConceptoContable"), .CveSubProyecto = IIf(row.Item("CveSubProyecto").ToString.ToEntero > 0, row.Item("CveSubProyecto"), -1), - .IdCtaContable = IIf(row.Item("IdCtaContable").ToString.ToEntero > 0, row.Item("IdCtaContable"), -1), .CveCuenta = row.Item("CveCuenta") }).QueryToDataTable(True) @@ -2415,7 +2386,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CveSubProyecto As Integer = -1 Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True) Dim CveConceptoContable As Integer = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable ='{0}'", Row("ConceptoAdministrativo").ToString.Trim)).ToEntero ' Row("CveConceptoContable").ToString.ToEntero - 'Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero + Dim CveClasificacion As Integer = -1 Dim CveCuentaExcel As Integer = -1 Dim ObjConta2 As New ClsContabilidad diff --git a/Contratos/FacturacionMasiva.aspx.vb b/Contratos/FacturacionMasiva.aspx.vb index d8277b01f..a39bb1f7b 100644 --- a/Contratos/FacturacionMasiva.aspx.vb +++ b/Contratos/FacturacionMasiva.aspx.vb @@ -83,19 +83,8 @@ Partial Class Contratos_FacturacionMasiva Set(value As Integer) ViewState("CveCicloComercial") = value End Set - End Property - - Private ReadOnly Property IdCtaContRetIVA As Integer - Get - Return ViewState("IdCtaContRetIVA").ToString.ToEntero - End Get End Property - Private ReadOnly Property IdCtaContRetISR As Integer - Get - Return ViewState("IdCtaContRetISR").ToString.ToEntero - End Get - End Property #End Region @@ -358,7 +347,6 @@ Partial Class Contratos_FacturacionMasiva TmpDT.Columns.Add("Total", GetType(Decimal)) 'Para uso del módulo contable TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) - TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer)) TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 9c22e336a..c714d911f 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -3135,25 +3135,7 @@ Partial Class Inventarios_EntregaAlmacen GuardaLogAD($"Inventario/EntregaAlmacen | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") ErrorMovInv = True End If - End If - - 'Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" - - 'If AutoConta And Not ErrorMovInv Then - ' Dim ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa) - - ' If IdCtaContable > 0 Then - ' If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then - ' Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico") - ' ErrorMovInv = True - ' TextoError.AppendFormat("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico") - ' End If - ' Else - ' Alert(String.Format("No se puede contabilizar ya que falta asignación de las cuentas contables"), TipoMensaje.MsgAdvertencia) - ' End If - - ' ObjContPaq.Dispose() - 'End If + End If Else ErrorMovInv = True TextoError.AppendFormat("Ocurrió un Error al ingresar la prepoliza.1") diff --git a/Inventarios/RecepcionDevolucion.aspx.vb b/Inventarios/RecepcionDevolucion.aspx.vb index bb687ac11..0772d3a0e 100644 --- a/Inventarios/RecepcionDevolucion.aspx.vb +++ b/Inventarios/RecepcionDevolucion.aspx.vb @@ -601,7 +601,6 @@ Partial Class Inventarios_RecepcionDevolucion TmpDT.Columns.Add("Total", GetType(Decimal)) 'Para uso del módulo contable TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) - TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer)) TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 8f7c3e088..bd70633e0 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -2708,7 +2708,6 @@ Partial Class Inventarios_RecepcionUsados TmpDT.Columns.Add("Total", GetType(Decimal)) 'Para uso del módulo contable TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) - TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer)) TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) diff --git a/Inventarios/Remanufactura.aspx.vb b/Inventarios/Remanufactura.aspx.vb index f6b5f5806..26cc9aa47 100644 --- a/Inventarios/Remanufactura.aspx.vb +++ b/Inventarios/Remanufactura.aspx.vb @@ -16,18 +16,6 @@ Partial Class Inventarios_Remanufactura ViewState("ErrorList") = value End Set End Property - - Private ReadOnly Property IdCtaContRetIVA As Integer - Get - Return ViewState("IdCtaContRetIVA").ToString.ToEntero - End Get - End Property - - Private ReadOnly Property IdCtaContRetISR As Integer - Get - Return ViewState("IdCtaContRetISR").ToString.ToEntero - End Get - End Property Private Property MensajeAlert As StringBuilder Get Return CType(ViewState("MensajeAlert"), StringBuilder) diff --git a/Nomina/CatConceptos.aspx.vb b/Nomina/CatConceptos.aspx.vb index 6b2659272..b3535e01e 100644 --- a/Nomina/CatConceptos.aspx.vb +++ b/Nomina/CatConceptos.aspx.vb @@ -273,7 +273,6 @@ Partial Class Nomina_CatConceptos Dim CveConceptoContable As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlConceptoContable"), DropDownList).SelectedValue Dim EsRetencion As Boolean = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("ChkRetencion"), CheckBox).Checked Dim CveClasificacion As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlClasificacion"), DropDownList).SelectedValue - Dim IdCtaContable As Integer = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("DdlCtaContable"), DropDownList).SelectedValue If ObjNomina.UpdateConcepto(Codigo, Concepto, Tipo, Formula, Sistema, TipoCalculo, Estado, CveConceptoPadre, CveConcepto, UsuarioActual.CveEmpresa, CveConceptoContable, EsRetencion, CveClasificacion, IdCtaContable) Then GvDatos.EditIndex = -1 diff --git a/Nomina/ConceptoNomina.aspx.cs b/Nomina/ConceptoNomina.aspx.cs index b89504546..812c420ba 100644 --- a/Nomina/ConceptoNomina.aspx.cs +++ b/Nomina/ConceptoNomina.aspx.cs @@ -371,8 +371,8 @@ public partial class Nomina_CatConcepto : ClsPaginas if (EsEditar) { TieneError = !ObjNomina.UpdateConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, CveConcepto, retencion, CveClasificacion, - IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto, - UsuarioActual.CveEmpresa, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB , IdCtaContableB , CveCuentaB, CveConceptoContablePasivo); + CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, CveSATConcepto, + UsuarioActual.CveEmpresa, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB , CveCuentaB, CveConceptoContablePasivo); if (!TieneError) { @@ -403,8 +403,8 @@ public partial class Nomina_CatConcepto : ClsPaginas else { CveConcepto = ObjNomina.AddConcepto(codigo, concepto, tipo, formula, sistema, estado, CveConceptoPadre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, - retencion, CveClasificacion, IdCtaContable, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, - CveSATConcepto, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, IdCtaContableB, CveCuentaB, CveConceptoContablePasivo); + retencion, CveClasificacion, CveTipoGasto, tipoCalculo, CveConceptoContable, AplicaFiniquito, AutomaticoGlobal, Especie, Imprimir, + CveSATConcepto, ctaImporteNegativoProv, contabiliza, CargoOAbono, cveConceptoContableB, CveCuentaB, CveConceptoContablePasivo); diff --git a/Nomina/Nomina.aspx b/Nomina/Nomina.aspx index a5794bbb0..9e38ece92 100644 --- a/Nomina/Nomina.aspx +++ b/Nomina/Nomina.aspx @@ -1365,7 +1365,7 @@ + DataKeyNames="CveMovtoPermanente,CveConcepto,CveCuenta,CvePersonal,Descripcion,TipoDescuento,Valor,VecesAplicar,MontoLimite,FechaInicioAplicacion,Estatus,FechaRegistro"> diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 7f3deaf23..0bf1e6dc0 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -7111,8 +7111,7 @@ public partial class Nomina_Nomina2 : ClsPaginas CcveMovtoPermanente = gvRow.DataKey("CveMovtoPermanente").ToEntero(); int cveConcepto = gvRow.DataKey("CveConcepto").ToEntero(); int cvePersonal = gvRow.DataKey("CvePersonal").ToEntero(); - int CveCuenta = gvRow.DataKey("CveCuenta").ToEntero(); - int IdCtaContable = gvRow.DataKey("IdCtaContable").ToEntero(); + int CveCuenta = gvRow.DataKey("CveCuenta").ToEntero(); string descripcion = gvRow.DataKey("Descripcion"); int tipoDescuento = gvRow.DataKey("TipoDescuento").ToEntero(); double valor = gvRow.DataKey("Valor").ToDouble(); diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index d03538694..62ba9c921 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -3037,8 +3037,8 @@ Partial Class OC_OC ImporteMEComp = (DiferenciaInvOC - ImporteME).RoundSQL() 'COMPLEMENTARIA - 'If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteME, SerieFolio, 232, SerieFolio, Fecha, If(ConceptoSalida = 0, IdCtaContableAlmacen, IdCtaContableRecepcionOCERME), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteME, ImporteME:=ImporteME, CveCuenta:=CveCuentaAlmacen, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMEComp, SerieFolio, 233, SerieFolio, Fecha, IdCtaContableRecepcionOCERComplementaria, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteMEComp, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then + 'If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteME, SerieFolio, 232, SerieFolio, Fecha, If(ConceptoSalida = 0, 0, IdCtaContableRecepcionOCERME), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteME, ImporteME:=ImporteME, CveCuenta:=CveCuentaAlmacen, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMEComp, SerieFolio, 233, SerieFolio, Fecha, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteMEComp, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then ' TieneError = True ' Exit For ' End If @@ -3102,7 +3102,6 @@ Partial Class OC_OC ' DiferenciaInvOC = DtInvOCDiferencias.SUMD("Diferencia", $"CveAlmacen = {CveAlmacen} And CveMovimiento = {CveMovimientoAlmacen} And ConceptoSalida = {ConceptoSalida}") ' TCInvOC = DtInvOCDiferencias.FiltroPrimeroValor("TipoCambioAjuste", $"CveAlmacen = {CveAlmacen} And CveMovimiento = {CveMovimientoAlmacen} And ConceptoSalida = {ConceptoSalida}").ToDecimal - ' IdCtaContableAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DrDiferencias("CveAlmacen").ToString.ToEntero}").ToEntero ' 'MODIFICACIÓN CONCEPTO ' If ConceptoSalida = 0 Then @@ -8207,9 +8206,9 @@ Partial Class OC_OC 'DtInvOC.FiltraParametros($"CvePS > 0 AND CveOrdenCompraDetalle = {GvD.DataKeys("CveOrdenCompraDetalle").ToString}").Copy() 'If CveMonedaOC = 1 Then - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteME, SerieFolio, 228, ConceptoPartida, Fecha, IdCtaContableRecepcionOCME, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteME, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMEComp, SerieFolio, 229, ConceptoPartida, Fecha, IdCtaContableRecepcionOCComplementaria, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteMEComp, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then - ' If DifImporte <> 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DifImporte, SerieFolio, 69, ConceptoPartida, Fecha, IdCtaContable69, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DifImporte, ImporteME:=DifImporte, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle, CveClasificacion:=CveClasificacionCostoOC) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteME, SerieFolio, 228, ConceptoPartida, Fecha, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteME, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMEComp, SerieFolio, 229, ConceptoPartida, Fecha, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=ImporteMEComp, ImporteME:=ImporteME, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle) Then + ' If DifImporte <> 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DifImporte, SerieFolio, 69, ConceptoPartida, Fecha, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DifImporte, ImporteME:=DifImporte, TipoCambio:=TCInvOC, CveOCDetalle:=CveOCDetalle, CveClasificacion:=CveClasificacionCostoOC) Then ' Retorno = False ' Exit For ' End If @@ -8247,22 +8246,6 @@ Partial Class OC_OC ' Dim TipoMoneda As String = ObjInv.DtResultados.FiltroPrimeroValor("CveMoneda") ' Dim ObjConta As New ClsContabilidad - ' Dim IdCtaContableOC As Integer = 0 - ' Dim IdCtaContableOCME As Integer = 0 - ' Dim IdCtaContableOCComplementaria As Integer = 0 - - ' If ObjConta.GetRetCuenta(176, UsuarioActual.CveEmpresa) Then - ' IdCtaContableOC = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero - ' End If - - ' If ObjConta.GetRetCuenta(228, UsuarioActual.CveEmpresa) Then - ' IdCtaContableOCME = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero - ' End If - - ' If ObjConta.GetRetCuenta(229, UsuarioActual.CveEmpresa) Then - ' IdCtaContableOCComplementaria = ObjConta.DtResultados.FiltroPrimeroValor("IdCtaContable").ToEntero - ' End If - ' Dim LugarEntrega = If(txtLugarEntrega.Text.Trim = "", "-1", txtLugarEntrega.Text.Trim) ' LugarEntrega = If(DivLugarEntrega1.Visible, LugarEntrega, If(TxtLugarEntregaDirecta.Visible, TxtLugarEntregaDirecta.Text.Trim, "")) @@ -8287,9 +8270,9 @@ Partial Class OC_OC ' Dim PrimerImporte As Integer = (0 - LblSubTotal.Text.ToDecimal) ' Dim SegundoImporte As Integer = (0 - LblSubTotal.Text.ToDecimal) - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, Now, IdCtaContableOCME, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, Now, IdCtaContableOCComplementaria, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte + SegundoImporte, lblFolio.Text, 176, lblFolio.Text, Now, IdCtaContableOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte + SegundoImporte, lblFolio.Text, 176, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then ' Err = True ' Else ' If Not OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), @@ -8324,9 +8307,9 @@ Partial Class OC_OC ' If CvePrePoliza > 0 Then ' Dim PrimerImporte As Decimal = Decimal.Round(((LblSubTotal.Text.ToDecimal) / TxtTCCambioMoneda.Text.ToDecimal), 2, MidpointRounding.AwayFromZero) ' Dim SegundoImporte As Decimal = LblSubTotal.Text.ToDecimal - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, Now, IdCtaContableOCME, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then - ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, Now, IdCtaContableOCComplementaria, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then - ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, (0 - (PrimerImporte + SegundoImporte)), lblFolio.Text, 176, lblFolio.Text, Now, IdCtaContableOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, PrimerImporte, lblFolio.Text, 228, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SegundoImporte, lblFolio.Text, 229, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, (0 - (PrimerImporte + SegundoImporte)), lblFolio.Text, 176, lblFolio.Text, Now, 0, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacenVenta, CveOC:=CveOrdenCompra) Then ' Err = True ' Else ' If Not OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), diff --git a/OS/RecepcionEntrega.aspx.vb b/OS/RecepcionEntrega.aspx.vb deleted file mode 100644 index a5cfc9fc8..000000000 --- a/OS/RecepcionEntrega.aspx.vb +++ /dev/null @@ -1,1368 +0,0 @@ -Option Strict On -Option Explicit On - -Imports System.Data -Imports Extensiones - -Partial Class Inventarios_RecepcionEntrega - Inherits ClsPaginas - -#Region "PROPIEDADES" - Private Property DtDatos As DataTable - Get - Return CType(ViewState("DtDatos"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - Private Property DtDatosDetalle As DataTable - Get - Return CType(ViewState("DtDatosDetalle"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtDatosDetalle") = value - End Set - End Property - Private Property PSSerieLote As String - Get - Return CType(ViewState("PSSerieLote"), String) - End Get - Set(value As String) - ViewState("PSSerieLote") = value - End Set - End Property - Private Property CveConsecSerieLote As Integer - Get - Return CType(ViewState("CveConsecSerieLote"), Integer) - End Get - Set(value As Integer) - ViewState("CveConsecSerieLote") = value - End Set - End Property - Private Property CvePSSerieLote As Integer - Get - Return CType(ViewState("CvePSSerieLote"), Integer) - End Get - Set(value As Integer) - ViewState("CvePSSerieLote") = value - End Set - End Property - Private Property CveUMSerieLote As Integer - Get - Return CType(ViewState("CveUMSerieLote"), Integer) - End Get - Set(value As Integer) - ViewState("CveUMSerieLote") = value - End Set - End Property - Private Property CveVentaSurtir As Integer - Get - Return CType(ViewState("CveVentaSurtir"), Integer) - End Get - Set(value As Integer) - ViewState("CveVentaSurtir") = value - End Set - End Property - Private Property CveContrato As Integer - Get - Return CType(ViewState("CveContrato"), Integer) - End Get - Set(value As Integer) - ViewState("CveContrato") = value - End Set - End Property - Private Property CveAlmacenTraspasoOrigen As Integer - Get - Return CType(ViewState("CveAlmacenTraspasoOrigen"), Integer) - End Get - Set(value As Integer) - ViewState("CveAlmacenTraspasoOrigen") = value - End Set - End Property - Private Property CveAlmacenTraspasoDestino As Integer - Get - Return CType(ViewState("CveAlmacenTraspasoDestino"), Integer) - End Get - Set(value As Integer) - ViewState("CveAlmacenTraspasoDestino") = value - End Set - End Property - Private Property TipoMovimiento As Integer - Get - Return CType(ViewState("TipoMovimiento"), Integer) - End Get - Set(value As Integer) - ViewState("TipoMovimiento") = value - End Set - End Property - Private Property TipoDocto As String - Get - Return CType(ViewState("TipoDocto"), String) - End Get - Set(value As String) - ViewState("TipoDocto") = value - End Set - End Property - Private Property DtExistencias As DataTable - Get - Return CType(ViewState("DtExistencias"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtExistencias") = value - End Set - End Property - Private Property RowIndexCantidadEspecial As Integer - Get - Return CType(ViewState("RowIndexCantidadEspecial"), Integer) - End Get - Set(value As Integer) - ViewState("RowIndexCantidadEspecial") = value - End Set - End Property - Private Property CantidadEspecialTemp As Decimal - Get - Return CType(ViewState("CantidadEspecialTemp"), Decimal) - End Get - Set(value As Decimal) - ViewState("CantidadEspecialTemp") = value - End Set - End Property - Private Property EsDevolucionVenta As Integer - Get - Return CType(ViewState("EsDevolucionVenta"), Integer) - End Get - Set(value As Integer) - ViewState("EsDevolucionVenta") = value - End Set - End Property - Private Property CveVendedor As Integer - Get - Return CType(ViewState("CveVendedor"), Integer) - End Get - Set(value As Integer) - ViewState("CveVendedor") = value - End Set - End Property - Private Property CveCliente As Integer - Get - Return CType(ViewState("CveCliente"), Integer) - End Get - Set(value As Integer) - ViewState("CveCliente") = value - End Set - End Property - - Private Property CveMovimiento As Integer - Get - Return CType(ViewState("CveMovimiento"), Integer) - End Get - Set(value As Integer) - ViewState("CveMovimiento") = value - End Set - End Property -#End Region - - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not IsPostBack Then - - InicializaValores() - - End If - End Sub - - -#Region " Inicializa Valores " - Private Sub InicializaValores() - CveVendedor = -1 - CveCliente = -1 - - DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) - DdlClientes.DataBind() - DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1")) - - DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) - DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) - DdlAlmacen.SelectedValue = "-1" - DdlAlmacen.DataBind() - DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) - 'DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1")) - - DdlFolio.Items.Insert(0, New ListItem("Seleccione", "-1")) - - TxtFechaPendientes.Text = Now.ToShortDateString - TxtFechaCaducidad.Text = Now.ToShortDateString - TxtFecha.Text = Now.ToShortDateString - - DdlSucursal.DataSource = GlobalDTSucursales.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - DdlSucursal.DataBind() - DdlSucursal.SelectedValueExist(UsuarioActual.CveSucursal.ToString) - If UsuarioActual.TienePermisoProceso(152) Then DdlSucursal.Enabled = False - - CreaDtDetalle() - CargaPendientes() - End Sub - -#End Region - - -#Region " CARGA PENDIENTES POR SURTIR " - Protected Sub DdlCliente_SelectedIndexChanged(sender As Object, e As EventArgs) - CargaFolios() - End Sub - Private Sub CargaFolios() - Dim ObjInventarios As New ClsInventarios - - DdlFolio.Items.Clear() - - If DdlClientes.SelectedValue.ToEntero > 0 Then - If ObjInventarios.VentasPendientesAlmacenGet(DdlClientes.SelectedValue.ToEntero, MinFecha, DdlSucursal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - DdlFolio.DataSource = ObjInventarios.DtResultados - Else - Alert("Ocurrió un error al obtener las Compras pendientes de recibir del proveedor. Por favor vuelva a intentar", TipoMensaje.MsgError) - End If - End If - - ObjInventarios.Dispose() - - DdlFolio.DataBind() - DdlFolio.Items.Insert(0, New ListItem("Seleccione", "-1")) - UpFiltros.Update() - End Sub - Protected Sub TimmerRefresh_Tick(sender As Object, e As EventArgs) - CargaPendientes() - End Sub - Protected Sub BtnConsultarPendientes_Click(sender As Object, e As EventArgs) - CargaPendientes() - End Sub - Private Sub CargaPendientes() - Dim ObjInventarios As New ClsInventarios - Dim DtPendientes As New DataTable - - If ObjInventarios.VentasPendientesAlmacenGet(-1, TxtFechaPendientes.Text.ToDate, DdlSucursal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - DtPendientes = ObjInventarios.DtResultados - 'If DtPendientes.Rows.Count > 0 Then - ' TipoMovimiento = If(DtPendientes.Rows(0)("TipoDocto").ToString.Contiene({"Rem", "Ing"}), 1, 2) - 'End If - Else - DtPendientes = Nothing - Alert("Ocurrió un error al obtener las Compras pendientes de recibir del proveedor. Por favor vuelva a intentar", TipoMensaje.MsgError) - End If - - ObjInventarios.Dispose() - - If DtPendientes IsNot Nothing Then - GVPendientes.DataSource = DtPendientes - End If - - LtActualizado.Text = String.Format("Actualizado: {0}", Now.ToString("H:mm")) - - GVPendientes.DataBind() - UpPendientes.Update() - End Sub - Protected Sub GVPendientes_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GVPendientes.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - e.Row.FCLinkButton("BtnSurtir").CommandArgument = e.Row.DBCampo("CveVenta") - - If e.Row.DBCampo("TipoDocto").ToString.Contiene({"Rem", "Ing", "Ped"}) And e.Row.DBCampo("EsDevolucionVenta").ToString.ToEntero = 0 Then - e.Row.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary " - e.Row.FCLinkButton("BtnSurtir").Text = " Surtir " - Else - e.Row.FCLinkButton("BtnSurtir").CssClass = "btn yellow-gold " - e.Row.FCLinkButton("BtnSurtir").Text = " Recibir" - End If - - End If - End Sub - -#End Region - - -#Region " CARGA VENTA POR SURTIR " - Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs) - If CType(sender, LinkButton).CommandArgument.ToEntero > 0 Then - CargaVentaPorSurtir(CType(sender, LinkButton).CommandArgument.ToEntero) - TimmerRefresh.Enabled = False - End If - End Sub - Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs) - CargaVentaPorSurtir(DdlFolio.SelectedValue.ToEntero) - End Sub - Private Sub CargaVentaPorSurtir(CveVenta As Integer) - LbSurtida.Visible = False - CveContrato = -1 - - Dim ObjInventario As New ClsInventarios - - If ObjInventario.EntregaAlmacenGet(CveVenta) Then - If ObjInventario.DtResultados IsNot Nothing AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then - - - DtDatos = ObjInventario.DtResultados - DtDatos.Columns.Add("Consec", GetType(Integer)) - DtDatos.Columns.Add("CantidadGV", GetType(Double)) - DtDatos.Columns.Add("CantidadTraspaso", GetType(Double)) - Dim Index = 1 - For Each Dr As DataRow In DtDatos.Rows - Dr("Consec") = Index - Index += 1 - Next - - DtDatosDetalle = Nothing - CreaDtDetalle() - - If DtDatos.Rows(0) IsNot Nothing Then - EsDevolucionVenta = DtDatos.Rows(0)("EsDevolucionVenta").ToString.ToEntero - TipoMovimiento = If(DtDatos.Rows(0)("TipoDocto").ToString.Contiene({"Rem", "Ing", "Ped"}) And EsDevolucionVenta = 0, 1, 2) - TipoDocto = DtDatos.Rows(0)("TipoDocto").ToString - LbCliente.Text = DtDatos.Rows(0)("Nombre").ToString - LbFolio.Text = DtDatos.Rows(0)("SerieFolio").ToString - LbOberservaciones.Text = DtDatos.Rows(0)("Observaciones").ToString - CveVentaSurtir = CveVenta - CveAlmacenTraspasoDestino = DtDatos.Rows(0)(If(EsDevolucionVenta = 1, "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString.ToEntero - CveAlmacenTraspasoOrigen = DtDatos.Rows(0)(If(EsDevolucionVenta = 1, "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString.ToEntero - CveContrato = DtDatos.Rows(0)("CveContrato").ToString.ToEntero - CveVendedor = DtDatos.Rows(0)("CveVendedor").ToString.ToEntero - CveCliente = DtDatos.Rows(0)("CveCliente").ToString.ToEntero - - - If DtDatos.SUM("CantidadS") <= 0 Then - GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna" - Else - GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario" - End If - - If CveAlmacenTraspasoDestino > 0 Then - DivTipoCambioAdvertencia.Visible = True - LtTipoCambioAdvertencia.Text = $"Los productos seran Trasladados al Almacen: {GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoDestino}")}" - Else - DivTipoCambioAdvertencia.Visible = False - End If - - DdlAlmacen.Items.Clear() - If CveAlmacenTraspasoOrigen > 0 Then - DdlAlmacen.Items.Insert(0, New ListItem(GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoOrigen}"), CveAlmacenTraspasoOrigen.ToString)) - Else - DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (1,2)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa) - End If - DdlAlmacen.DataBind() - DdlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1")) - DdlAlmacen.SelectedValue = "-1" - DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen) - If CveAlmacenTraspasoOrigen > 0 Then - DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen) - End If - - - TxtFecha.Text = DtDatos.Rows(0)("Fecha").ToString - End If - - If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then - DivCodigoSeriePS.Visible = True - Else - DivCodigoSeriePS.Visible = False - End If - - If TipoMovimiento = 2 Then - Dim Filtro = If(ObjInventario.DtResultados.Rows(0)("TipoDocto").ToString.Contiene({"Ing", "Dev"}), "CveConcepto = 3", "CveConcepto = 9") - If ObjInventario.GetInv_Mov(ObjInventario.DtResultados.Rows(0)("CveVentaPadre").ToString.ToEntero, UsuarioActual.CveEmpresa) Then - DtExistencias = ObjInventario.DtResultados.FiltraParametros($"CvePS Is Not NULL AND {Filtro}") - - If Not DtExistencias.Rows.Count > 0 Then - Alert("La Venta original de la Devolución no tiene salida de Almacén.", TipoMensaje.MsgAdvertencia) - End If - - Else - Alert("Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar.", TipoMensaje.MsgError) - End If - End If - - - Else - Alert("No se encontraron productos pendientes por surtir. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - End If - Else - DtDatos = Nothing - End If - - ObjInventario.Dispose() - UpGenerales.Update() - CargaGvDatos() - End Sub - Private Sub CargaGvDatos() - If DtDatos IsNot Nothing Then - GvDatos.DataSource = DtDatos - End If - - GvDatos.DataBind() - UpDatos.Update() - UpVenta.Update() - End Sub - - Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - If e.Row.DBCampo("Inv_CveMetodoInventario") = "5" Then - e.Row.FCButton("BtnSerieLote").Visible = True - e.Row.FCButton("BtnSerieLote").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PS"), e.Row.DBCampo("CantidadF"), e.Row.DBCampo("Consec")) - e.Row.FCTextBox("TbCantidadF").Enabled = False - e.Row.FCCheckBox("cbInv").Enabled = False - Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count - e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString - 'e.Row.FCTextBox("TbCantidadF").Text = "0" - Else - e.Row.FCButton("BtnSerieLote").Visible = False - e.Row.FCTextBox("TbCantidadF").Enabled = True - e.Row.FCTextBox("TbCantidadF").Attributes.Add("onblur", String.Format("ValidarCantidad(this, {0})", e.Row.DBCampo("CantidadF"))) - End If - - - 'FUNCIONALIDAD PISTOLA DE CODIGOS - If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then - e.Row.FCTextBox("TbCantidadF").Enabled = False - End If - - End If - End Sub -#End Region - - -#Region " AGREGA POR SERIE/LOTE " - Private Sub CreaDtDetalle() - If DtDatosDetalle Is Nothing Then - DtDatosDetalle = New DataTable - DtDatosDetalle.Columns.Add("CveVentaDetalle", GetType(Integer)) - DtDatosDetalle.Columns.Add("Consec", GetType(Integer)) - DtDatosDetalle.Columns.Add("ConsecId", GetType(Integer)) - DtDatosDetalle.Columns.Add("CvePS", GetType(Integer)) - DtDatosDetalle.Columns.Add("PS", GetType(String)) - DtDatosDetalle.Columns.Add("CveUM", GetType(Integer)) - DtDatosDetalle.Columns.Add("SerieLote", GetType(String)) - DtDatosDetalle.Columns.Add("FechaCaducidad", GetType(String)) - DtDatosDetalle.Columns.Add("FueTraspaso", GetType(Integer)) - End If - End Sub - - Private Sub CargaSerie() - - 'RegistraScript("document.getElementById(""TxtSerieLote"").focus();") - - Dim AplicaCaducidad = False - If GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS = {0}", CvePSSerieLote)).Rows(0) IsNot Nothing Then - AplicaCaducidad = If(GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS = {0}", CvePSSerieLote)).Rows(0)("AplicaCaducidad").ToString = "True", True, False) - End If - - If AplicaCaducidad Then - GvSerie.Columns(1).Visible = True - TdCaducidad1.Visible = True - TdCaducidad2.Visible = True - Else - GvSerie.Columns(1).Visible = False - TdCaducidad1.Visible = False - TdCaducidad2.Visible = False - End If - - GvSerie.DataSource = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote), "Consec DESC") - GvSerie.DataBind() - - 'VALIDA QUE SIGA AGREGANDO - If DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote)).Rows.Count = LbCantidad.Text.ToEntero Then - BtnAgregarPS.Enabled = False - Else - BtnAgregarPS.Enabled = True - End If - - 'SERIE LOTE RECOMENDADO - Dim DtSerieLote As New DataTable - If TipoMovimiento = 1 Then - Dim ObjInventarios As New ClsInventarios - If ObjInventarios.SerieLoteRecomendadoGet(CvePSSerieLote, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero) Then - DtSerieLote = ObjInventarios.DtResultados - End If - ObjInventarios.Dispose() - Else - DtSerieLote = DtExistencias.FiltraParametros("SerieLote <> ''") - End If - - Dim DrsRemove As New List(Of DataRow) - - If DtSerieLote.Rows.Count > 0 Then - 'CALCULA YA COMPLETADOS - DtSerieLote.Columns.Add("CantidadSeleccionada", GetType(Integer)) - For Each dr As DataRow In DtSerieLote.Rows - dr("CantidadSeleccionada") = DtDatosDetalle.FiltraParametros(String.Format("Consec = {0} AND SerieLote = '{1}'", CveConsecSerieLote, dr("SerieLote"))).Rows.Count - If dr("CantidadSeleccionada").ToString.ToDecimal = dr("Existencia").ToString.ToDecimal Then - DrsRemove.Add(dr) - End If - Next - - 'ELIMINA YA COMPLETADOS EN PAGINA - For Each dr As DataRow In DrsRemove - DtSerieLote.Rows.Remove(dr) - Next - - If DtSerieLote.Rows.Count > 0 Then - Dim Mensaje As New StringBuilder - Mensaje.AppendFormat("Serie / Lote Recomendado: {0}", DtSerieLote.Rows(0)("SerieLote")) - If AplicaCaducidad Then Mensaje.AppendFormat(", Caducicdad: {0}", DtSerieLote.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString) - LbSerieLoteRecomendado.Text = Mensaje.ToString 'String.Format("Serie / Lote Recomendado: {0}, Caducicdad: {1}", ObjInventarios.DtResultados.Rows(0)("SerieLote"), ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate.ToShortDateString) - Else - LbSerieLoteRecomendado.Text = "No se encontro ningun Serie/Lote." - End If - Else - LbSerieLoteRecomendado.Text = "No se encontro ningun Serie/Lote." - End If - - - - 'SI TIENE SALIDA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD - Dim Contador = 0 - For Each Gvr As GridViewRow In GvDatos.Rows - If Gvr.DataKey("CvePS").ToEntero = CvePSSerieLote Then - Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count - Gvr.FCCheckBox("cbInv").Enabled = False - Gvr.FCCheckBox("cbInv").Checked = True - Gvr.FCTextBox("TbCantidadF").Text = Contador.ToString - End If - Next - - UpDatos.Update() - End Sub - Protected Sub BtnSerieLote_Click(sender As Object, e As EventArgs) - - Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c) - - LbProducto.Text = Argumentos(2) - LbCantidad.Text = Argumentos(3) - - CveConsecSerieLote = Argumentos(4).ToEntero - CvePSSerieLote = Argumentos(0).ToEntero - PSSerieLote = Argumentos(2).ToString - CveUMSerieLote = Argumentos(1).ToEntero - - DivSerie.Visible = True - RegistraScript(String.Format("$('#{0}').modal('show')", DivSerie.ClientID)) - CargaSerie() - UpSerie.Update() - End Sub - - Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) - AgregaSerieLote(TxtSerieLote.Text.Trim, 1) - End Sub - Private Sub AgregaSerieLote(SerieLote As String, Tipo As Integer) - - If SerieLote.Trim = "" Then - Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - If DtDatosDetalle.FiltraParametros($"CvePS = {CvePSSerieLote} AND SerieLote = '{SerieLote}'").Rows.Count > 0 Then - Alert("La SerieLote indicada ya esta registrada. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - TxtSerieLote.Text = "" - Exit Sub - End If - - Dim AplicaCaducidad = False - If GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS = {0}", CvePSSerieLote)).Rows(0) IsNot Nothing Then - AplicaCaducidad = If(GlobalDTProductosServicios(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS = {0}", CvePSSerieLote)).Rows(0)("AplicaCaducidad").ToString = "True", True, False) - End If - - - 'Valida Existencia - If TipoMovimiento = 1 Then - Dim ObjInventarios As New ClsInventarios - Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerieLote, CveUMSerieLote, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=SerieLote, CveVendedor:=CveVendedor, CveCliente:=CveCliente) - If Existencia < 1 Then - Alert($"No hay existencia suficiente del producto ""{PSSerieLote}"" con la SerieLote definida ""{SerieLote}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", "")) - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - ObjInventarios.Dispose() - If Tipo = 1 Then - DivSerie.Visible = True - RegistraScript(String.Format("$('#{0}').modal('show')", DivSerie.ClientID)) - End If - Exit Sub - End If - Else - If DtExistencias IsNot Nothing Then - Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerieLote} AND CveUM = {CveUMSerieLote} AND SerieLote = '{SerieLote}'") - If Existencia < 1 Then - Alert($"No hay existencia suficiente del producto ""{PSSerieLote}"" con la SerieLote definida ""{SerieLote}"". Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", "")) - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - If Tipo = 1 Then - DivSerie.Visible = True - RegistraScript(String.Format("$('#{0}').modal('show')", DivSerie.ClientID)) - End If - Exit Sub - End If - End If - End If - - - Dim Row = DtDatosDetalle.NewRow - - Row("ConsecId") = CveConsecSerieLote - Row("Consec") = DtDatosDetalle.Rows.Count + 1 - Row("PS") = PSSerieLote - Row("CvePS") = CvePSSerieLote - Row("CveUM") = CveUMSerieLote - Row("SerieLote") = SerieLote - Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidad.Text, MinFecha.ToShortDateString) - - DtDatosDetalle.Rows.Add(Row) - RegistraScript("playsonidito('beep-07.wav')") - - If Tipo = 1 Then - TxtSerieLote.Text = "" - TxtFechaCaducidad.Text = Now.ToShortDateString - End If - - CargaSerie() - - End Sub - - Protected Sub GvSerie_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvSerie.RowDeleting - - Dim keySerieLote As String = e.Keys("SerieLote").ToString - Try - For Each dr As DataRow In DtDatosDetalle.Rows - If dr("SerieLote").ToString = keySerieLote Then - dr.Delete() - End If - Next - Catch ex As Exception - - End Try - - DtDatosDetalle.AcceptChanges() - CargaSerie() - - End Sub - -#End Region - - -#Region " AGREGA CON TXT | CODIGO - SERIE " - Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs) - - If TxtCodigoPS.Text = "" Then - Exit Sub - End If - - TdSeriePS.Visible = False - Dim Existe = False - Dim PSTemp = "" - - For Each Gvr As GridViewRow In GvDatos.Rows - If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then - Dim TxtCantidad = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF") - If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then - - - - ''VALIDA EXISTENCIA - If TipoMovimiento = 1 Then - Dim ObjInventario As New ClsInventarios - Dim Existencia = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveCliente:=CveCliente) - ObjInventario.Dispose() - If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then - TxtCodigoPS.Text = "" - Alert($"No hay existencias suficientes del producto: ""{Gvr.DataKey("PS")}"". Solo hay disponibles {Existencia.FormatoNumero} en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);") - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - Exit Sub - End If - Else - If DtExistencias IsNot Nothing Then - Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {Gvr.DataKey("CvePS")} AND CveUM = {Gvr.DataKey("CveUM").ToString.ToEntero}") - If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then - TxtCodigoPS.Text = "" - Alert($"No hay existencias suficientes del producto: ""{Gvr.DataKey("PS")}"". Solo hay disponibles {Existencia.FormatoNumero} en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);") - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - Exit Sub - End If - End If - End If - - If Gvr.DataKey("AplicaSerieLote") = "True" Then - TdSeriePS.Visible = True - TxtSeriePS.Focus() - - CveConsecSerieLote = Gvr.DataKey("Consec").ToString.ToEntero - PSSerieLote = Gvr.DataKey("PS").ToString - CvePSSerieLote = Gvr.DataKey("CvePS").ToEntero - CveUMSerieLote = Gvr.DataKey("CveUM").ToEntero - Exit Sub - End If - - - Dim CantidadEspecial = If(Gvr.DataKey("CveClasificacion").ToString.ToEntero = 17601, True, False) - - If CantidadEspecial Then - RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);") - LtlProductoCantidad.Text = $"{Gvr.DataKey("Codigo")}" - RowIndexCantidadEspecial = Gvr.RowIndex - CantidadEspecialTemp = Gvr.DataKey("CantidadF").ToDecimal - TxtCodigoPS.Text = "" - Exit Sub - Else - TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + 1).ToString.FormatoNumero - TxtCodigoPS.Text = "" - UpDatos.Update() - Exit Sub - End If - - VerificaVentaSurtida() - Exit Sub - End If - - Existe = True - PSTemp = Gvr.DataKey("PS").ToString - 'Alert($"Ya se ha cargado la totalidad del Producto ""{Gvr.DataKey("PS").ToString}"" con el Codigo ""{TxtCodigoPS.Text}"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);") - 'VerificaVentaSurtida() - 'Exit Sub - End If - Next - - VerificaVentaSurtida() - If Existe Then - Alert($"Ya se ha cargado la totalidad del Producto ""{PSTemp}"" con el Codigo ""{TxtCodigoPS.Text}"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);") - Else - Alert($"No se ha encontrado un producto para surtir con el Codigo ""{TxtCodigoPS.Text}"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);") - End If - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - TxtCodigoPS.Text = "" - - End Sub - Private Sub VerificaVentaSurtida() - Dim Surtida = True - - For Each Gvr As GridViewRow In GvDatos.Rows - If Gvr.DataKey("CantidadF").ToDecimal <> Gvr.FCTextBox("TbCantidadF").Text.ToDecimal Then - Surtida = False - Exit Sub - End If - Next - - If Surtida Then - LbSurtida.Visible = True - End If - End Sub - Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs) - AgregaSerieLote(TxtSeriePS.Text.Trim, 2) - - TdSeriePS.Visible = False - TxtSeriePS.Text = "" - TxtCodigoPS.Text = "" - TxtCodigoPS.Focus() - VerificaVentaSurtida() - - End Sub - Protected Sub BtnGuardarCantidadEspecial_Click(sender As Object, e As EventArgs) - AgregaCantidadEspecial() - End Sub - Private Sub AgregaCantidadEspecial() - Dim TxtCantidad = GvDatos.Rows(RowIndexCantidadEspecial).FCTextBox("TbCantidadF") - If CantidadEspecialTemp - TxtCantidadEspecialDiv.Text.ToDecimal - TxtCantidad.Text.ToDecimal >= 0 Then - TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString.FormatoNumero - 'RegistraScript("$('#ModalCantidad').modal('hide');") - RegistraScript("$('#DivCantidadEspecial').hide(200);") - UpDatos.Update() - TxtCodigoPS.Focus() - Else - Alert("La cantidad excede la pendiente por surtir. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);") - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - End If - - TxtCantidadEspecialDiv.Text = "1" - End Sub -#End Region - - -#Region " GUARDAR " - Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) - - 'VALIDA CANTIDAD DE SALIDA - Dim Cantidad = 0.0D - For Each Gvr As GridViewRow In GvDatos.Rows - If Gvr.FCCheckBox("cbInv").Checked AndAlso Gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then - Cantidad = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal - Exit For - End If - Next - - If Not Cantidad > 0 Then - Alert("No se detecto ningun movimiento por hacer. Por favor verifique e intente nuevamente.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - - 'PROCESO , si tiene proceso "X" no lo valida - If Not UsuarioActual.TienePermisoProceso(176) Then - For Each Gvr As GridViewRow In GvDatos.Rows - If Gvr.DataKey("CantidadF").ToDecimal <> Gvr.FCTextBox("TbCantidadF").Text.ToDecimal Then - Alert("En la factura no se han especificado todos los productos a entregar, favor de especificarlos para poder dar salida.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If - Next - End If - - If EsDevolucionVenta = 1 Or TipoDocto.Contiene({"Ped"}) Then - For Each Gvr As GridViewRow In GvDatos.Rows - If Not Gvr.FCCheckBox("cbInv").Checked Or (Gvr.FCCheckBox("cbInv").Checked AndAlso Gvr.FCTextBox("TbCantidadF").Text.ToDecimal <> Gvr.DataKey("CantidadC").ToString.ToDecimal) Then - Alert("Es necesario surtir todos los productos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - Exit Sub - End If - Next - End If - - Dim ObjInventario As New ClsInventarios - Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL()) - Dim ObjVentas As New ClsVentas(ObjInventario.IniciaTransacSQL()) - Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL()) - Dim CveMovimiento As Integer - Dim Folio As Integer - Dim ErrorMovInv As Boolean - Dim DtDetalle As New DataTable - Dim TextoError = "" - - - 'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH - Dim Index = 0 - For Each gvr As GridViewRow In GvDatos.Rows - If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then - DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDouble - End If - Index += 1 - Next - - - 'VALIDA EXISTENCIA 2 - If TipoMovimiento = 1 Then - For Each Dr As DataRow In DtDatos.Rows - If Dr("CantidadGV").ToString.ToDouble > 0 Then - If Dr("AplicaSerieLote").ToString = "True" Then - DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) - For Each Dr1 As DataRow In DtDetalle.Rows - If Not ObjInventario.GetExistenciasPS(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=Dr1("SerieLote").ToString, CveVendedor:=CveVendedor, CveCliente:=CveCliente) >= 1 Then - TextoError += String.Format("No hay existencias suficientes del producto: {0}
", Dr("PS")) - End If - Next - Else - If Not ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveCliente:=CveCliente) >= Dr("CantidadGV").ToString.ToDecimal Then - TextoError += String.Format("No hay existencias suficientes del producto: {0}
", Dr("PS")) - End If - End If - - End If - Next - If TextoError <> "" Then - Alert(TextoError, TipoMensaje.MsgAdvertencia) - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - ObjInventario.RollBack() - ObjInventario.Dispose() - Exit Sub - End If - Else - If DtExistencias IsNot Nothing Then - For Each Dr As DataRow In DtDatos.Rows - If Dr("CantidadGV").ToString.ToDouble > 0 Then - - If Dr("AplicaSerieLote").ToString = "True" Then - DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) - For Each Dr1 As DataRow In DtDetalle.Rows - If Not DtExistencias.SUM("Cantidad", $"CvePS = {Dr1("CvePS").ToString.ToEntero} AND CveUM = {Dr1("CveUM").ToString.ToEntero} AND SerieLote = '{Dr1("SerieLote").ToString}'") >= 1 Then - TextoError += String.Format(" - {0}
", Dr1("PS")) - End If - Next - Else - If Not DtExistencias.SUM("Cantidad", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero}") >= Dr("CantidadGV").ToString.ToDouble Then - TextoError += String.Format(" - {0}
", Dr("PS")) - End If - End If - End If - Next - If TextoError <> "" Then - Alert($" Lo(s) siguiente(s) Productos no tienen existencia suficiente:

{TextoError}", TipoMensaje.MsgAdvertencia) - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - ObjInventario.RollBack() - ObjInventario.Dispose() - Exit Sub - End If - End If - End If - - - - '' COMIENZA: APARTADOS - Dim DtTraspasos As New DataTable - DtTraspasos.Columns.Add("CveAlmacen", GetType(Integer)) - DtTraspasos.Columns.Add("Almacen", GetType(String)) - DtTraspasos.Columns.Add("CveMovimientoSalida", GetType(Integer)) - DtTraspasos.Columns.Add("FolioSalida", GetType(Integer)) - DtTraspasos.Columns.Add("CveMovimientoEntrada", GetType(Integer)) - DtTraspasos.Columns.Add("FolioEntrada", GetType(Integer)) - - Dim DtMovtosDetalle As New DataTable - DtMovtosDetalle.Columns.Add("CveVentaDetalle", GetType(Integer)) - DtMovtosDetalle.Columns.Add("CveMovimientoDetalle1", GetType(Integer)) - DtMovtosDetalle.Columns.Add("CveMovimientoDetalle2", GetType(Integer)) - DtMovtosDetalle.Columns.Add("CveMovimientoDetalle3", GetType(Integer)) - - Dim CveMovimientoSalida = -1, FolioSalida = -1, CveMovimientoEntrada = -1, CveMovimientoEntradaApartado = -1, FolioEntrada = -1 - Dim CantidadPendiente = 0.0 - Dim CantidadSaldo = 0.0 - - - If TipoMovimiento = 1 Then ' SI ES DEVOLUCION NO APLICA APARTADO - ' SALIDA POR TRASPASO DE LOS ALMACENES DE APARTADO - For Each Dr As DataRow In DtDatos.Rows - If Dr("CantidadGV").ToString.ToDouble > 0 Then - - If Dr("AplicaSerieLote").ToString = "True" Then - - DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec"))) - For Each Dr1 As DataRow In DtDetalle.Rows - If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=Dr1("SerieLote").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveCliente:=CveCliente) Then - For Each Dr2 As DataRow In ObjInventario.DtResultados.Rows - - 'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO - CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr2("CveAlmacen")}").ToEntero - - If Not CveMovimientoSalida > 0 Then - CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString.ToEntero, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero) - FolioSalida = ObjInventario.Folio - - If Not CveMovimientoSalida > 0 Then - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar." - Exit For - End If - - Dim DrMovto = DtTraspasos.NewRow - DrMovto("Almacen") = Dr2("Almacen").ToString.ToEntero - DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString.ToEntero - DrMovto("CveMovimientoSalida") = CveMovimientoSalida - DrMovto("FolioSalida") = FolioSalida - DtTraspasos.Rows.Add(DrMovto) - End If - - - CantidadPendiente = 1 - - If ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, SerieLote:=Dr1("SerieLote").ToString) Then - Dim Row = DtMovtosDetalle.NewRow - Row("CveVentaDetalle") = Dr("CveVentaDetalle").ToString.ToEntero - Row("CveMovimientoDetalle1") = ObjInventario.CveMovimientoDetalle - DtMovtosDetalle.Rows.Add(Row) - Else - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar." - Exit For - End If - - DtDatosDetalle.Select($"Consec = {Dr1("Consec")}")(0)("FueTraspaso") = 1 - DtDatosDetalle.Select($"Consec = {Dr1("Consec")}")(0)("CveVentaDetalle") = Dr("CveVentaDetalle") - Dr("CantidadTraspaso") = Dr("CantidadTraspaso").ToString.ToDouble + CantidadPendiente - Exit For - Next - End If - Next - - Else - - If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveCliente:=CveCliente) Then - - CantidadSaldo = Dr("CantidadGV").ToString.ToDouble - - For Each Dr1 As DataRow In ObjInventario.DtResultados.Rows - - 'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO - CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr1("CveAlmacen")}").ToEntero - - If Not CveMovimientoSalida > 0 Then - CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero) - FolioSalida = ObjInventario.Folio - - If Not CveMovimientoSalida > 0 Then - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar." - Exit For - End If - - Dim DrMovto = DtTraspasos.NewRow - DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString.ToEntero - DrMovto("CveMovimientoSalida") = CveMovimientoSalida - DrMovto("FolioSalida") = FolioSalida - DtTraspasos.Rows.Add(DrMovto) - End If - - - CantidadPendiente = If(Dr1("Existencia").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("Existencia").ToString.ToDecimal) - - If ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then - Dim Row = DtMovtosDetalle.NewRow - Row("CveVentaDetalle") = Dr("CveVentaDetalle").ToString.ToEntero - Row("CveMovimientoDetalle1") = ObjInventario.CveMovimientoDetalle - DtMovtosDetalle.Rows.Add(Row) - Else - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar." - Exit For - End If - - CantidadSaldo -= CantidadPendiente - Dr("CantidadTraspaso") = Dr("CantidadTraspaso").ToString.ToDouble + CantidadPendiente - If CantidadSaldo <= 0 Then Exit For - Next - - If ErrorMovInv Then Exit For - - End If - - End If - - End If - Next - - 'ENTRADA POR TRASPASO AL ALMACEN GENERAL - If Not ErrorMovInv Then - For Each Dr1 As DataRow In DtTraspasos.Rows - CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString.ToEntero - - CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente) - FolioEntrada = ObjInventario.Folio - - If Not CveMovimientoEntradaApartado > 0 Then - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar." - Exit For - End If - - Dr1("CveMovimientoEntrada") = CveMovimientoEntradaApartado - Dr1("FolioEntrada") = FolioEntrada - - If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then - For Each Dr As DataRow In ObjInventario.DtResultados.Rows - If ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then - DtMovtosDetalle.Select($"CveMovimientoDetalle1 = {Dr("CveMovimientoDetalle")}")(0)("CveMovimientoDetalle2") = ObjInventario.CveMovimientoDetalle - Else - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar." - Exit For - End If - Next - End If - - If ErrorMovInv Then Exit For - - Next - End If - End If - '' TERMINA: APARTADOS - - - - - Dim ConceptoMovimiento = 3 - ConceptoMovimiento = If(TipoMovimiento = 1, ConceptoMovimiento, 18) - ConceptoMovimiento = If(CveAlmacenTraspasoDestino > 0, 8, ConceptoMovimiento) - - CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino) - Folio = ObjInventario.Folio - - If CveMovimiento > 0 Then - - - 'SACA LO DE TRASPASOS - APARTADO - For Each Dr1 As DataRow In DtTraspasos.Rows - CveMovimientoSalida = Dr1("CveMovimientoEntrada").ToString.ToEntero - If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then - For Each Dr As DataRow In ObjInventario.DtResultados.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=DtMovtosDetalle.Select($"CveMovimientoDetalle2 = {Dr("CveMovimientoDetalle")}")(0)("CveVentaDetalle").ToString.ToEntero) Then - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar." - Exit For - End If - Next - End If - If ErrorMovInv Then Exit For - Next - - - CantidadPendiente = 0.0 - For Each Dr As DataRow In DtDatos.Rows - CantidadPendiente = Dr("CantidadGV").ToString.ToDouble - Dr("CantidadTraspaso").ToString.ToDouble - If CantidadPendiente > 0 Then - Dim PU = 0.0 - - 'SI FUE POR SERIE LOTE - DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec"))) - If DtDetalle.Rows.Count > 0 Then - For Each Dr1 As DataRow In DtDetalle.Rows - If TipoMovimiento = 2 Then - PU = DtExistencias.FiltroPrimero($"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND SerieLote = '{Dr1("SerieLote").ToString}'")("PU").ToString.ToDouble - End If - - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, -1, SerieLote:=Dr1("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar." - Exit For - End If - Next - Else - If TipoMovimiento = 2 Then - PU = DtExistencias.FiltroPrimero($"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero}")("PU").ToString.ToDouble - End If - - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar." - Exit For - End If - End If - - End If - Next - - - If Not ErrorMovInv Then - - - - If CveAlmacenTraspasoDestino > 0 Then ' TRASPASO CUANDO ES REMISION - CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero) - FolioEntrada = ObjInventario.Folio - - If CveMovimientoEntrada <= 0 Then - TextoError = "No se pudo generar el movimiento de entrada correctamente" - ErrorMovInv = True - Else - If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then - For Each Dr As DataRow In ObjInventario.DtResultados.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, 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 - End If - - Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN - Dim DtCostos As DataTable = Nothing - Dim ValorInventario As Decimal = 0 - If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then - DtCostos = ObjInventario.DtResultados - - Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"}) - Dim IdCtaContable As Integer = 0 - If tmpCostos.Rows.Count > 0 Then - - - If ObjVentas.GetVenta(CveVentaSurtir, UsuarioActual.CveEmpresa) Then - Dim CvePrePoliza As Integer = ObjVentas.DtResultados(0)("CvePrePoliza").ToString.ToEntero - Dim Fecha As Date = ObjVentas.DtResultados(0)("Fecha").ToString.ToDate - Dim CveCliente As Integer = ObjVentas.DtResultados(0)("CveCliente").ToString.ToEntero - Dim SerieFolio As String = ObjVentas.DtResultados(0)("SerieFolio").ToString - - 'Se agrega movimiento separado por la cuenta de ventas (ER) - For Each RowInv As DataRow In tmpCostos.Rows - ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal - - - 'Concepto = String.Format("{0} - {1}", Row2("Clasificacion").ToString, Row2("SubProyecto").ToString) - IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - If ValorInventario <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, If(TipoMovimiento = 1, 1, -1) * ValorInventario, SerieFolio, 68, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=If(TipoMovimiento = 1, 1, -1) * ValorInventario) Then - ErrorMovInv = True - End If - If Not ErrorMovInv Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, If(TipoMovimiento = 1, 1, -1) * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=If(TipoMovimiento = 1, 1, -1) * ValorInventario) Then - ErrorMovInv = True - End If - End If - End If - Next - Else - ErrorMovInv = True - TextoError = "Ocurrió un Error al ingresar las prepolizas" - End If - - End If - End If - End If - - - 'DEVOLUCION - If TipoMovimiento = 2 Then - - 'APARTADOS - If ObjInventario.VentasAlmacenApartadosGet(CveVentaSurtir) Then - Dim DtTempApartados = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 9", "CveAlmacen") - Dim CveMovimientoSalidaApartado = -1 - Dim CveAlmacenApartado = -1 - Dim CveAlmacenOrigen = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero) - - For Each Dr As DataRow In DtTempApartados.Rows - - If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then - CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero) - FolioSalida = ObjInventario.Folio - CveAlmacenApartado = Dr("CveAlmacen").ToString.ToEntero - End If - - If CveMovimientoSalidaApartado > 0 Then - Dim DrMovto = DtTraspasos.NewRow - DrMovto("Almacen") = Dr("Almacen").ToString.ToEntero - DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString.ToEntero - DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado - DrMovto("FolioSalida") = FolioSalida - DtTraspasos.Rows.Add(DrMovto) - Else - ErrorMovInv = True - TextoError = "Ocurrió un error al guardar los movimientos de control de apartados" - Exit For - End If - - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then - ErrorMovInv = True - TextoError = "Ocurrió un error al guardar los movimientos de control de apartados" - Exit For - End If - Next - - If Not ErrorMovInv Then - For Each Dr1 As DataRow In DtTraspasos.Rows - CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString.ToEntero - - CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente) - FolioEntrada = ObjInventario.Folio - - If Not CveMovimientoEntradaApartado > 0 Then - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar." - Exit For - End If - - Dr1("CveMovimientoEntrada") = CveMovimientoEntradaApartado - Dr1("FolioEntrada") = FolioEntrada - - If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then - For Each Dr As DataRow In ObjInventario.DtResultados.Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then - ErrorMovInv = True - TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar." - Exit For - End If - Next - End If - - If ErrorMovInv Then Exit For - - Next - End If - - End If - - End If - - End If - - - Else - ErrorMovInv = True - End If - - - If Not ErrorMovInv And EsDevolucionVenta = 1 Then - If Not ObjVentas.UpdateVentasDevolucionAlmacen(2, CveVentaSurtir) Then - TextoError = "Ocurrió un error al hacer la devolucion. Por favor vuelva a intentar." - ErrorMovInv = True - End If - End If - - If Not ErrorMovInv Then - If Not ObjEventos.AddEventoBitacora(String.Format("Venta Surtida en Folio: {1}", CveMovimiento, Folio), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then - ErrorMovInv = True - End If - End If - - If Not ErrorMovInv Then - ObjInventario.Commit() - RegistraScript("playsonidito('beep-07.wav')") - Dim Msg As New StringBuilder - Msg.AppendFormat("Movimiento Salida: {1}", CveMovimiento, Folio) - Msg.AppendFormat("
Imprimir Movimiento ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) - - - 'Msg.AppendFormat("") - 'Dim script As String = "$('#TxtNumeroGuia').val($('#NumeroGuia').val());$('#BtnNumeroGuia').click();" - - If CveMovimientoEntrada > 0 Then - Msg.AppendFormat("

Movimiento Entrada (Traspaso): {1}", CveMovimientoEntrada, FolioEntrada) - Msg.AppendFormat("
Imprimir Movimiento ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) - End If - - - If DtTraspasos.Rows.Count > 0 Then - Msg.AppendFormat("

Movimientos de Control (Apartados):") - For Each Dr As DataRow In DtTraspasos.Rows - Msg.AppendFormat("
Almacén {0} | Salida por Traspaso: {2} | Entrada por Traspaso: {4} ", Dr("Almacen"), Dr("CveMovimientoSalida"), Dr("FolioSalida"), Dr("CveMovimientoEntrada"), Dr("FolioEntrada")) - Next - End If - - Alert(Msg.ToString, TipoMensaje.MsgInformacion) - - Limpia() - CargaPendientes() - Else - Alert(TextoError, TipoMensaje.MsgError) - RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") - ObjInventario.RollBack() - End If - - ObjInventario.Dispose() - End Sub - - Private Sub Limpia() - - 'DATOS DE LA VENTA - LbCantidad.Text = "" - LbCliente.Text = "" - LbOberservaciones.Text = "" - LbFolio.Text = "" - - 'DATOS DEL MOVIMINETO - TxtObservaciones.Text = "" - TxtFecha.Text = Now.ToShortDateString - DdlAlmacen.SelectedValueExist(-1) - CargaFolios() - - 'VARIABLES GENERALES - CveVentaSurtir = -1 - DtDatosDetalle = Nothing - DtDatos = Nothing - - DivTipoCambioAdvertencia.Visible = False - - LbSurtida.Visible = False - TimmerRefresh.Enabled = True - UpGenerales.Update() - CargaGvDatos() - End Sub - - Private Sub BtnNumeroGuia_Click(sender As Object, e As EventArgs) Handles BtnNumeroGuia.Click - Dim Objeto As New ClsInventarios - If Objeto.UpdateMovimientoGuia(TxtGuia.Text, CveMovimiento, UsuarioActual.CveEmpresa) Then - Alert("Se ha guardado correctamente la póliza", TipoMensaje.MsgConfirmacion) - End If - Objeto.Dispose() - End Sub - - -#End Region - - - - -End Class diff --git a/Planeacion/CatSubProyectos.aspx.vb b/Planeacion/CatSubProyectos.aspx.vb index 6dedc434c..91d4523d9 100644 --- a/Planeacion/CatSubProyectos.aspx.vb +++ b/Planeacion/CatSubProyectos.aspx.vb @@ -616,12 +616,12 @@ Partial Class CatSubProyectos NEcuentaInventario = True End If End If - If (idcuentagasto > 0 Or idcuentaanticipo > 0 Or idcuentaInventario > 0) Then - If objsubproyectos.UpdateSubProyectoExcel(UsuarioActual.CveEmpresa, CveClasificacion, CveSubProyecto, idcuentagasto, idcuentaanticipo, idcuentaInventario, namecuentagasto, namecuentaanticipo, namecuentaInventario) Then - Else - resultado = True - End If - End If + 'If (idcuentagasto > 0 Or idcuentaanticipo > 0 Or idcuentaInventario > 0) Then + ' If objsubproyectos.UpdateSubProyectoExcel(UsuarioActual.CveEmpresa, CveClasificacion, CveSubProyecto, idcuentagasto, idcuentaanticipo, idcuentaInventario, namecuentagasto, namecuentaanticipo, namecuentaInventario) Then + ' Else + ' resultado = True + ' End If + 'End If If NEcuentagasto Or NEcuentaanticipo Or NEcuentaInventario Then hayerrorcol = True Dim Row As DataRow = Nothing diff --git a/PortalCliente/PortalCliente.aspx.vb b/PortalCliente/PortalCliente.aspx.vb index 8ed8139da..0e7514c8d 100644 --- a/PortalCliente/PortalCliente.aspx.vb +++ b/PortalCliente/PortalCliente.aspx.vb @@ -823,196 +823,196 @@ Partial Class Ventas_PortalCliente TCFluctuacion = If(UsuarioActual.Empresa.Funcionalidad(159) = "1", TCVenta, TCPago) - 'CONFIGURACION POR CONCEPTO DE PREPOLIZA - Select Case ConceptoContable - Case 2 'PAGO CLIENTE - ImporteMovimiento = ImportePago.RoundSQL() - importeMX = ImportePagoMX.RoundSQL() - TCGeneral = TCVenta + ''CONFIGURACION POR CONCEPTO DE PREPOLIZA + 'Select Case ConceptoContable + ' Case 2 'PAGO CLIENTE + ' ImporteMovimiento = ImportePago.RoundSQL() + ' importeMX = ImportePagoMX.RoundSQL() + ' TCGeneral = TCVenta - If CveMonedaVenta > 1 Then - ConceptoMovimiento += $" TC:{TCPago} ${ImporteMovimiento.FormatoNumero(2)}" + ' If CveMonedaVenta > 1 Then + ' ConceptoMovimiento += $" TC:{TCPago} ${ImporteMovimiento.FormatoNumero(2)}" - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, (importeMX - ImporteMovimiento).RoundSQL(), 207, Referencia, ConceptoMovimiento, CveSubProyecto:=CveSubProyecto, CveCliente:=CveCliente, ImporteME:=ImporteMovimiento, TipoCambio:=TCVenta) Then - TieneError = True - MensajeError.Append("No se pudo insertar el detalle de pago de la póliza
") - Exit For - End If + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, (importeMX - ImporteMovimiento).RoundSQL(), 207, Referencia, ConceptoMovimiento, CveSubProyecto:=CveSubProyecto, CveCliente:=CveCliente, ImporteME:=ImporteMovimiento, TipoCambio:=TCVenta) Then + ' TieneError = True + ' MensajeError.Append("No se pudo insertar el detalle de pago de la póliza
") + ' Exit For + ' End If - End If + ' End If - Case 134 'PAGO INTERMEDIARIO - ImporteMovimiento = ImportePago.RoundSQL() - importeMX = ImportePagoMX.RoundSQL() - CveProveedorContabilizar = CveProveedorIntermediario - If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" + ' Case 134 'PAGO INTERMEDIARIO + ' ImporteMovimiento = ImportePago.RoundSQL() + ' importeMX = ImportePagoMX.RoundSQL() + ' CveProveedorContabilizar = CveProveedorIntermediario + ' If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" - Case 13 'IVA X TRASLADAR - If CveMonedaVenta = 1 Then - ImporteMovimiento = IVAVenta * PorcentajePago - importeMX = ImporteMovimiento - ElseIf CveMonedaVenta = 2 Then - ImporteMovimiento = IVAVenta * PorcentajePago - importeMX = ImporteMovimiento * TCVenta - End If - PorcentajeImpuesto = PorcentajeIVA + ' Case 13 'IVA X TRASLADAR + ' If CveMonedaVenta = 1 Then + ' ImporteMovimiento = IVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento + ' ElseIf CveMonedaVenta = 2 Then + ' ImporteMovimiento = IVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento * TCVenta + ' End If + ' PorcentajeImpuesto = PorcentajeIVA - ImporteMovimiento = ImporteMovimiento.RoundSQL() - importeMX = importeMX.RoundSQL() - TCGeneral = TCVenta + ' ImporteMovimiento = ImporteMovimiento.RoundSQL() + ' importeMX = importeMX.RoundSQL() + ' TCGeneral = TCVenta - If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" + ' If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" - Case 61 'IVA TRASLADADO - If CveMonedaVenta = 1 Then - ImporteMovimiento = IVAVenta * PorcentajePago - importeMX = ImporteMovimiento - ElseIf CveMonedaVenta = 2 Then - ImporteMovimiento = IVAVenta * PorcentajePago - importeMX = ImporteMovimiento * TCFluctuacion - End If - PorcentajeImpuesto = PorcentajeIVA + ' Case 61 'IVA TRASLADADO + ' If CveMonedaVenta = 1 Then + ' ImporteMovimiento = IVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento + ' ElseIf CveMonedaVenta = 2 Then + ' ImporteMovimiento = IVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento * TCFluctuacion + ' End If + ' PorcentajeImpuesto = PorcentajeIVA - ImporteMovimiento = ImporteMovimiento.RoundSQL() - importeMX = importeMX.RoundSQL() - TCGeneral = TCFluctuacion + ' ImporteMovimiento = ImporteMovimiento.RoundSQL() + ' importeMX = importeMX.RoundSQL() + ' TCGeneral = TCFluctuacion - If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" + ' If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" - Case 8 'RETIVA X TRASLADAR - If CveMonedaVenta = 1 Then - ImporteMovimiento = RetIVAVenta * PorcentajePago - importeMX = ImporteMovimiento - ElseIf CveMonedaVenta = 2 Then - ImporteMovimiento = RetIVAVenta * PorcentajePago - importeMX = ImporteMovimiento * TCVenta - End If - PorcentajeImpuesto = PorcentajeRetIVA + ' Case 8 'RETIVA X TRASLADAR + ' If CveMonedaVenta = 1 Then + ' ImporteMovimiento = RetIVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento + ' ElseIf CveMonedaVenta = 2 Then + ' ImporteMovimiento = RetIVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento * TCVenta + ' End If + ' PorcentajeImpuesto = PorcentajeRetIVA - ImporteMovimiento = ImporteMovimiento.RoundSQL() - importeMX = importeMX.RoundSQL() - TCGeneral = TCVenta + ' ImporteMovimiento = ImporteMovimiento.RoundSQL() + ' importeMX = importeMX.RoundSQL() + ' TCGeneral = TCVenta - If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" + ' If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" - Case 62 'RETIVA TRASLADADO - If CveMonedaVenta = 1 Then - ImporteMovimiento = RetIVAVenta * PorcentajePago - importeMX = ImporteMovimiento - ElseIf CveMonedaVenta = 2 Then - ImporteMovimiento = RetIVAVenta * PorcentajePago - importeMX = ImporteMovimiento * TCFluctuacion - End If - PorcentajeImpuesto = PorcentajeRetIVA + ' Case 62 'RETIVA TRASLADADO + ' If CveMonedaVenta = 1 Then + ' ImporteMovimiento = RetIVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento + ' ElseIf CveMonedaVenta = 2 Then + ' ImporteMovimiento = RetIVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento * TCFluctuacion + ' End If + ' PorcentajeImpuesto = PorcentajeRetIVA - ImporteMovimiento = ImporteMovimiento.RoundSQL() - importeMX = importeMX.RoundSQL() - TCGeneral = TCFluctuacion + ' ImporteMovimiento = ImporteMovimiento.RoundSQL() + ' importeMX = importeMX.RoundSQL() + ' TCGeneral = TCFluctuacion - If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" + ' If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" - Case 9 'RETISR X TRASLADAR - If CveMonedaVenta = 1 Then - ImporteMovimiento = RetISRVenta * PorcentajePago - importeMX = ImporteMovimiento - ElseIf CveMonedaVenta = 2 Then - ImporteMovimiento = RetISRVenta * PorcentajePago - importeMX = ImporteMovimiento * TCVenta - End If - PorcentajeImpuesto = PorcentajeRetISR + ' Case 9 'RETISR X TRASLADAR + ' If CveMonedaVenta = 1 Then + ' ImporteMovimiento = RetISRVenta * PorcentajePago + ' importeMX = ImporteMovimiento + ' ElseIf CveMonedaVenta = 2 Then + ' ImporteMovimiento = RetISRVenta * PorcentajePago + ' importeMX = ImporteMovimiento * TCVenta + ' End If + ' PorcentajeImpuesto = PorcentajeRetISR - ImporteMovimiento = ImporteMovimiento.RoundSQL() - importeMX = importeMX.RoundSQL() - TCGeneral = TCVenta + ' ImporteMovimiento = ImporteMovimiento.RoundSQL() + ' importeMX = importeMX.RoundSQL() + ' TCGeneral = TCVenta - If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" + ' If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" - Case 63 'RETISR TRASLADADO - If CveMonedaVenta = 1 Then - ImporteMovimiento = RetIVAVenta * PorcentajePago - importeMX = ImporteMovimiento - ElseIf CveMonedaVenta = 2 Then - ImporteMovimiento = RetIVAVenta * PorcentajePago - importeMX = ImporteMovimiento * TCFluctuacion - End If - PorcentajeImpuesto = PorcentajeRetISR + ' Case 63 'RETISR TRASLADADO + ' If CveMonedaVenta = 1 Then + ' ImporteMovimiento = RetIVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento + ' ElseIf CveMonedaVenta = 2 Then + ' ImporteMovimiento = RetIVAVenta * PorcentajePago + ' importeMX = ImporteMovimiento * TCFluctuacion + ' End If + ' PorcentajeImpuesto = PorcentajeRetISR - ImporteMovimiento = ImporteMovimiento.RoundSQL() - importeMX = importeMX.RoundSQL() - TCGeneral = TCFluctuacion + ' ImporteMovimiento = ImporteMovimiento.RoundSQL() + ' importeMX = importeMX.RoundSQL() + ' TCGeneral = TCFluctuacion - If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" + ' If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" - Case 38 'IEPS X TRASLADAR - If CveMonedaVenta = 1 Then - ImporteMovimiento = IEPSVenta * PorcentajePago - importeMX = ImporteMovimiento - ElseIf CveMonedaVenta = 2 Then - ImporteMovimiento = IEPSVenta * PorcentajePago - importeMX = ImporteMovimiento * TCVenta - End If - PorcentajeImpuesto = PorcentajeIEPS + ' Case 38 'IEPS X TRASLADAR + ' If CveMonedaVenta = 1 Then + ' ImporteMovimiento = IEPSVenta * PorcentajePago + ' importeMX = ImporteMovimiento + ' ElseIf CveMonedaVenta = 2 Then + ' ImporteMovimiento = IEPSVenta * PorcentajePago + ' importeMX = ImporteMovimiento * TCVenta + ' End If + ' PorcentajeImpuesto = PorcentajeIEPS - ImporteMovimiento = ImporteMovimiento.RoundSQL() - importeMX = importeMX.RoundSQL() - TCGeneral = TCVenta + ' ImporteMovimiento = ImporteMovimiento.RoundSQL() + ' importeMX = importeMX.RoundSQL() + ' TCGeneral = TCVenta - If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" + ' If TCVenta > 1 Then ConceptoMovimiento += $" TC:{TCVenta} ${ImporteMovimiento.FormatoNumero(2)}" - Case 39 'IEPS TRASLADADO - If CveMonedaVenta = 1 Then - ImporteMovimiento = IEPSVenta * PorcentajePago - importeMX = ImporteMovimiento - ElseIf CveMonedaVenta = 2 Then - ImporteMovimiento = IEPSVenta * PorcentajePago - importeMX = ImporteMovimiento * TCFluctuacion - End If - PorcentajeImpuesto = PorcentajeIEPS + ' Case 39 'IEPS TRASLADADO + ' If CveMonedaVenta = 1 Then + ' ImporteMovimiento = IEPSVenta * PorcentajePago + ' importeMX = ImporteMovimiento + ' ElseIf CveMonedaVenta = 2 Then + ' ImporteMovimiento = IEPSVenta * PorcentajePago + ' importeMX = ImporteMovimiento * TCFluctuacion + ' End If + ' PorcentajeImpuesto = PorcentajeIEPS - ImporteMovimiento = ImporteMovimiento.RoundSQL() - importeMX = importeMX.RoundSQL() - TCGeneral = TCFluctuacion + ' ImporteMovimiento = ImporteMovimiento.RoundSQL() + ' importeMX = importeMX.RoundSQL() + ' TCGeneral = TCFluctuacion - If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" + ' If TCFluctuacion > 1 Then ConceptoMovimiento += $" TC:{TCFluctuacion} ${ImporteMovimiento.FormatoNumero(2)}" - Case 64 'GANANCIA - Continue For 'SKIPEA - If CveMonedaVenta <> 1 Then - If TCPago > TCVenta AndAlso CveMonedaVenta = 2 Then - ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta) - ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta) - ImporteMovimiento += ((RetIVAVenta * PorcentajePago) * TCFluctuacion) - ((RetIVAVenta * PorcentajePago) * TCVenta) - ImporteMovimiento += ((RetISRVenta * PorcentajePago) * TCFluctuacion) - ((RetISRVenta * PorcentajePago) * TCVenta) - ImporteMovimiento -= ((IEPSVenta * PorcentajePago) * TCFluctuacion) - ((IEPSVenta * PorcentajePago) * TCVenta) - ImporteMovimiento = ImporteMovimiento.RoundSQL().Abs() - importeMX = ImporteMovimiento - End If - End If + ' Case 64 'GANANCIA + ' Continue For 'SKIPEA + ' If CveMonedaVenta <> 1 Then + ' If TCPago > TCVenta AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta) + ' ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta) + ' ImporteMovimiento += ((RetIVAVenta * PorcentajePago) * TCFluctuacion) - ((RetIVAVenta * PorcentajePago) * TCVenta) + ' ImporteMovimiento += ((RetISRVenta * PorcentajePago) * TCFluctuacion) - ((RetISRVenta * PorcentajePago) * TCVenta) + ' ImporteMovimiento -= ((IEPSVenta * PorcentajePago) * TCFluctuacion) - ((IEPSVenta * PorcentajePago) * TCVenta) + ' ImporteMovimiento = ImporteMovimiento.RoundSQL().Abs() + ' importeMX = ImporteMovimiento + ' End If + ' End If - Case 65 'PERDIDA - Continue For 'SKIPEA - If CveMonedaVenta <> 1 Then - If TCPago < TCVenta AndAlso CveMonedaVenta = 2 Then - ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta) - ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta) - ImporteMovimiento += ((RetIVAVenta * PorcentajePago) * TCFluctuacion) - ((RetIVAVenta * PorcentajePago) * TCVenta) - ImporteMovimiento += ((RetISRVenta * PorcentajePago) * TCFluctuacion) - ((RetISRVenta * PorcentajePago) * TCVenta) - ImporteMovimiento -= ((IEPSVenta * PorcentajePago) * TCFluctuacion) - ((IEPSVenta * PorcentajePago) * TCVenta) - ImporteMovimiento = ImporteMovimiento.RoundSQL().Abs() - importeMX = ImporteMovimiento - End If - End If + ' Case 65 'PERDIDA + ' Continue For 'SKIPEA + ' If CveMonedaVenta <> 1 Then + ' If TCPago < TCVenta AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (ImportePago * TCPago) - (ImportePago * TCVenta) + ' ImporteMovimiento -= ((IVAVenta * PorcentajePago) * TCFluctuacion) - ((IVAVenta * PorcentajePago) * TCVenta) + ' ImporteMovimiento += ((RetIVAVenta * PorcentajePago) * TCFluctuacion) - ((RetIVAVenta * PorcentajePago) * TCVenta) + ' ImporteMovimiento += ((RetISRVenta * PorcentajePago) * TCFluctuacion) - ((RetISRVenta * PorcentajePago) * TCVenta) + ' ImporteMovimiento -= ((IEPSVenta * PorcentajePago) * TCFluctuacion) - ((IEPSVenta * PorcentajePago) * TCVenta) + ' ImporteMovimiento = ImporteMovimiento.RoundSQL().Abs() + ' importeMX = ImporteMovimiento + ' End If + ' End If - End Select + 'End Select - 'AGREGA PREPOLIZA DETALLE - If ImporteMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, importeMX, ConceptoContable, Referencia, ConceptoMovimiento, CveVenta:=CveVenta, CveSubProyecto:=CveSubProyecto, CveCliente:=CveCliente, CveProveedor:=CveProveedorContabilizar, TipoCambio:=TCGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then - TieneError = True - MensajeError.Append("No se pudo insertar el detalle de la póliza
") - Exit For - End If - End If + ''AGREGA PREPOLIZA DETALLE + 'If ImporteMovimiento <> 0 Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, importeMX, ConceptoContable, Referencia, ConceptoMovimiento, CveVenta:=CveVenta, CveSubProyecto:=CveSubProyecto, CveCliente:=CveCliente, CveProveedor:=CveProveedorContabilizar, TipoCambio:=TCGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then + ' TieneError = True + ' MensajeError.Append("No se pudo insertar el detalle de la póliza
") + ' Exit For + ' End If + 'End If Next If TieneError Then Exit For @@ -1890,74 +1890,13 @@ Partial Class Ventas_PortalCliente 'El movimiento 1 es el de Venta - 'Conta ContPAQ - 'If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then - ' If IDCtaBeneficiario > 0 And IDCtaContable > 0 Then - ' If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - ' IDPoliza = ObjMov.ContaIdPoliza - ' 'Alert(alertaContabilizacion & ObjMov.AlertaMensaje, ModExtensiones.TipoMensaje.MsgInformacion) - ' Else - ' Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - ' End If - ' Else - ' If IDCtaContable < 1 Then - ' Alert("No se puede contabilizar la Prepoliza debido a que la cuenta de Bancos es invalida", TipoMensaje.MsgAdvertencia) - ' End If - ' If IDCtaBeneficiario < 1 Then - ' Alert("No se puede contabilizar la Prepoliza debido a que las cuenta del Beneficiario es invalida", TipoMensaje.MsgAdvertencia) - ' End If - ' End If - 'End If - - 'If UsuarioActual.Empresa.UsaAC Then - ' Dim ConceptoRenglon, Referencia As String - ' Dim FolioPoliza As Integer - ' Dim Fecha As Date = FechaDoc - ' Dim TipoChq As String = "" - ' Dim Total As Double = TxtImporte.Text.ToDouble - - ' Dim Conta As New ClsContPAQi(UsuarioActual.Empresa) - ' Conta.IniciaTransacSQL() - - ' If CveTipoTransaccion = 1 Then TipoChq = "CHQ" - ' ConceptoRenglon = String.Format("Anticipo {0}", PagueseA) - - ' Dim IDPoliza = Conta.AddPoliza(2, ConceptoRenglon, Total, Total, UsuarioActual.CveUsuario, Fecha, ObjIE.Folio, TipoChq) - - ' If IDPoliza > 0 Then - ' FolioPoliza = Conta.Folio - ' Referencia = ObjIE.Folio - ' ConceptoRenglon = String.Format("Anticipo {0} {1}", PagueseA, TxtObservaciones.Text) - - ' Total = TxtImporte.Text.ToDouble - - ' If Not Conta.AddMovimiento(IDPoliza, IDCtaContable, True, Total, Referencia, ConceptoRenglon, 0, Fecha, "") Then MsgError = "No se insertó el movimiento" - - ' If Not Conta.AddMovimiento(IDPoliza, IDCtaBeneficiario, False, Total, Referencia, ConceptoRenglon, 0, Fecha, "") Then MsgError = "No se insertó el movimiento" - - ' Else - ' MsgError = "No se insertó el encabezado" - ' End If - - ' If MsgError = "" Then - ' Conta.Commit() - - ' Conta.AjustaPoliza(IDPoliza) - ' 'actualizar la conta del IE - ' ObjIE.UpdateIEPrePoliza(Fecha, FolioPoliza.ToString, IDPoliza, CvePrePoliza, CveIE, 0) - ' Else - ' Conta.RollBack() - ' IDPoliza = 0 - ' End If - - ' Conta.Dispose() - 'End If - - 'Notificación de Pago - 'If TxtNotificarA.Text.Trim <> "" And MsgError = "" Then - ' 'NotificacionPago(CveIE, TxtNotificarA.Text.Trim) - ' EnviarCorreoNotificacion(CveIE, TxtNotificarA.Text.Trim, "", UsuarioActual, False) - 'End If + + + 'Notificación de Pago + 'If TxtNotificarA.Text.Trim <> "" And MsgError = "" Then + ' 'NotificacionPago(CveIE, TxtNotificarA.Text.Trim) + ' EnviarCorreoNotificacion(CveIE, TxtNotificarA.Text.Trim, "", UsuarioActual, False) + 'End If Else MsgError = "No se pudo insertar la póliza" End If @@ -2590,8 +2529,7 @@ Partial Class Ventas_PortalCliente TmpDT.Columns.Add("TotalImporte", GetType(Decimal)) TmpDT.Columns.Add("Total", GetType(Decimal)) 'Para uso del módulo contable - TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) - TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer)) + TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) diff --git a/RH/Personal.aspx b/RH/Personal.aspx index f3d3682b6..016ed642c 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -1611,7 +1611,7 @@ + DataKeyNames="CveMovtoPermanente,CveConcepto,CveCuenta,CvePersonal,Descripcion,TipoDescuento,Valor,VecesAplicar,MontoLimite,FechaInicioAplicacion,Estatus,FechaRegistro"> diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index ecdf4d95e..cd7fea4c6 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1753,7 +1753,6 @@ Partial Class RH_Personal DdlDepartamento.SelectedValue = ObjPersonal.CveDepartamento.ToString() DdlSubproyectoZona.SelectedValueExist(ObjPersonal.CveSubproyectoZona) DDLUsuarioNomina.SelectedValueExist(ObjPersonal.CveUsuarioNomina) - 'DdlViaticos.SelectedValue = ObjPersonal.IdCtaContViaticos.ToString() 'For i As Integer = DdlDepartamento.Items.Count - 1 To 1 Step -1 ' If DdlDepartamento.Items(i).Value.Contains(ObjPersonal.CveDepartamento.ToString()) Then @@ -2009,8 +2008,8 @@ Partial Class RH_Personal DdlEstados.SelectedValue.ToEntero(), TxtTelefono.Text.Trim, TxtTelefonoEmergencia.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim, TxtCURP.Text.Trim, TxtCredencialElector.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim, DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(), DdlClienteAsignado.SelectedValue.ToEntero(), DdlSubProyectoAsignado.SelectedValue.ToEntero(), URL, - DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), DdlViaticos.SelectedItem.Text, - DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), TxtBeneficiario.Text.Trim, DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(), + DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), + UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), TxtBeneficiario.Text.Trim, DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(), TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=ChkSindicalizado.Checked, Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(), CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero, CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal) Then @@ -2094,8 +2093,8 @@ Partial Class RH_Personal TxtCURP.Text.Trim, TxtCredencialElector.Text.Trim, TxtNombrePadre.Text.Trim, TxtNombreMadre.Text.Trim, DdlBanco.SelectedValue.ToEntero(), DdlRiesgoPuesto.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero(), DdlClienteAsignado.SelectedValue.ToEntero(), DdlSubProyectoAsignado.SelectedValue.ToEntero(), CvePersonal, - URL, DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), DdlViaticos.SelectedValue.ToEntero(), DdlViaticos.SelectedItem.Text, - DdlPrestamos.SelectedValue.ToEntero(), DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), TxtBeneficiario.Text.Trim, DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(), + URL, DdlSupervisor.SelectedValue.ToEntero(), TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero(), + UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), TxtBeneficiario.Text.Trim, DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(), TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario, CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(), CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero(), EsReserva:=If(chkEsReserva.Checked, 1, 0), @@ -7297,7 +7296,6 @@ Partial Class RH_Personal Dim cveConcepto As Integer = gvRow.DataKey("CveConcepto").ToEntero() Dim cvePersonal As Integer = gvRow.DataKey("CvePersonal").ToEntero() Dim CveCuenta As Integer = gvRow.DataKey("CveCuenta").ToEntero() - Dim IdCtaContable As Integer = gvRow.DataKey("IdCtaContable").ToEntero() Dim descripcion As String = gvRow.DataKey("Descripcion") Dim tipoDescuento As Integer = gvRow.DataKey("TipoDescuento").ToEntero() Dim valor As Double = gvRow.DataKey("Valor").ToDouble() @@ -7326,12 +7324,6 @@ Partial Class RH_Personal TxtFechaAplicacion.Text = $"{fechaInicioAplicacion}" DdlCtaContable.SelectedValueExist("-1") - If DdlCtaContable.DataValueField = "Id" Then - DdlCtaContable.SelectedValueExist(IdCtaContable) - Else - DdlCtaContable.SelectedValueExist(CveCuenta) - End If - ChkEstatus.Checked = estatus RegistraScript("$('#ModalMovtoPermanente').modal()") pnlAddupMovto.Visible = True diff --git a/Sistemas/DefinicionEmpresa.aspx.vb b/Sistemas/DefinicionEmpresa.aspx.vb index 1ec831d97..a27f77352 100644 --- a/Sistemas/DefinicionEmpresa.aspx.vb +++ b/Sistemas/DefinicionEmpresa.aspx.vb @@ -801,28 +801,6 @@ Partial Class Sistemas_DefinicionEmpresa End If - 'CLASIFICACIONES DE IVAS - If DtClasificacionIVA IsNot Nothing OrElse DtClasificacionIVA.Rows.Count > 0 Then - For Each Dr As DataRow In DtClasificacionIVA.Rows - If Not Dr("CveClasificacion").ToString.ToEntero > 0 Then - If Not ObjGral.RemoveClasificacionPorcentaje(Dr("CveClasificacionPorcentaje").ToString.ToEntero) Then - TextoError = "Ocurrió un error al guardar los cambios de la empresa" - End If - ElseIf Dr("CveClasificacionPorcentaje").ToString.ToEntero = 0 Then - If Not ObjGral.AddClasificacionPorcentaje(Dr("CveClasificacion").ToString.ToEntero, Dr("PorcentajeIVA").ToString.ToDouble, - Dr("IdCtaIVAXAcreditar").ToString.ToEntero, Dr("IdCtaIVAAcreditable").ToString.ToEntero, - Dr("IdCtaIVAXTrasladar").ToString.ToEntero, Dr("IdCtaIVATrasladado").ToString.ToEntero, UsuarioActual.CveEmpresa) Then - TextoError = "Ocurrió un error al guardar los cambios de la empresa" - End If - ElseIf Dr("CveClasificacionPorcentaje").ToString.ToEntero > 0 Then - If Not ObjGral.UpdateClasificacionPorcentaje(Dr("CveClasificacionPorcentaje").ToString.ToEntero, Dr("CveClasificacion").ToString.ToEntero, Dr("PorcentajeIVA").ToString.ToDouble, - Dr("IdCtaIVAXAcreditar").ToString.ToEntero, Dr("IdCtaIVAAcreditable").ToString.ToEntero, - Dr("IdCtaIVAXTrasladar").ToString.ToEntero, Dr("IdCtaIVATrasladado").ToString.ToEntero) Then - TextoError = "Ocurrió un error al guardar los cambios de la empresa" - End If - End If - Next - End If 'RECARGA EMPRESA If TextoError = "" Then @@ -837,79 +815,9 @@ Partial Class Sistemas_DefinicionEmpresa Next End If - ' GlobalDTClasificacionPorcentaje(CveEmpresa) = Nothing - End If - 'AGREGAR FUNCIONALIDADES - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 201, DdlProveedores) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 211, DdlClientes) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 208, DdlInventario) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 216, DdlGasto) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 209, DdlBancos) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 205, DdlDeudores) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 202, DdlAcreedores) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 203, DdlDocxPagar) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 212, DdlAnticipoCliente) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 204, DdlAnticipoProveedores) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 218, DdlCaja) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 215, DdlFyE) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 221, DdlActivoFijo) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 246, DdlClientes) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 237, DdlAnticipoCliente) - ''AGREGAR FUNCIONALIDADES - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 232, DdlProveedoresSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 233, DdlClientesSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 239, DdlInventarioSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 240, DdlGastoSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 241, DdlBancosSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 234, DdlDeudoresSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 235, DdlAcreedoresSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 236, DdlDocxPagarSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 237, DdlAnticipoClienteSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 238, DdlAnticipoProveedoresSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 242, DdlCajaSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 243, DdlFyESIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 244, DdlActivoFijoSIG) - - 'TRIGGER - 'If TextoError = "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" Then - - ' If UsuarioActual.Empresa.UsaContabilidad Then - - ' If UsuarioActual.Empresa.TipoContabilidad = 2 Then - ' 'CREA OBJETO EMPRESA - ' If ObjEmpresas.GetEmpresas(TxtCveEmpresa.Text.ToEntero, "-1", "-1", "-1", "-1") Then - ' Dim Empresa As New Empresa - ' Empresa = ObjEmpresas.Empresa - - ' ObjContPAQ = New ClsContPAQi(Empresa) - - ' If ObjContPAQ.Conectado Then - ' 'ADD - ' If BDContPAQ = "" Then - ' If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then - ' TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos" - ' End If - ' End If - - ' 'UPDATE - ' If BDContPAQ <> "" And (BDContPAQ <> TxtBDContPAQi.Text.Trim Or ServerContPAQ <> TxtServerContPAQi.Text.Trim) Then - ' If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then - ' TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos" - ' End If - ' End If - ' Else - ' TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos" - ' End If - ' End If - ' End If - - ' Else - ' Alert("La empresa tiene la información para el uso de contabilidad pero no se tiene activada", TipoMensaje.MsgAdvertencia) - ' End If - 'End If If TextoError = "" Then ObjEmpresas.Commit() @@ -1504,354 +1412,7 @@ Partial Class Sistemas_DefinicionEmpresa #End Region -#Region "TAB CONTABILIDAD - CLASIFICACION DE IVA" - Private Sub ActualizaNombresCuentas() - - - For Each Dr As DataRow In DtClasificacionIVA.Rows - If Dr("IdCtaIVAXAcreditar").ToString.ToEntero > 0 Then - 'Dr("CuentaXAcreditar") = DtCuentas.FiltraParametros($"Id = {Dr("IdCtaIVAXAcreditar").ToString}").Rows(0)("CtaCodigo").ToString - Dr("CuentaXAcreditar") = DtCuentas.FiltroPrimeroValor("CtaCodigo", $"Id = {Dr("IdCtaIVAXAcreditar").ToString}").ToString.ToEntero - End If - If Dr("IdCtaIVAAcreditable").ToString.ToEntero > 0 Then - 'Dr("CuentaAcreditable") = DtCuentas.FiltraParametros($"Id = {Dr("IdCtaIVAAcreditable").ToString}").Rows(0)("CtaCodigo").ToString - Dr("CuentaAcreditable") = DtCuentas.FiltroPrimeroValor("CtaCodigo", $"Id = {Dr("IdCtaIVAAcreditable").ToString}").ToString.ToEntero - End If - If Dr("IdCtaIVAXTrasladar").ToString.ToEntero > 0 Then - 'Dr("CuentaXTrasladar") = DtCuentas.FiltraParametros($"Id = {Dr("IdCtaIVAXTrasladar").ToString}").Rows(0)("CtaCodigo").ToString - Dr("CuentaXTrasladar") = DtCuentas.FiltroPrimeroValor("CtaCodigo", $"Id = {Dr("IdCtaIVAXTrasladar").ToString}").ToString.ToEntero - End If - If Dr("IdCtaIVATrasladado").ToString.ToEntero > 0 Then - 'Dr("CuentaTrasladado") = DtCuentas.FiltraParametros($"Id = {Dr("IdCtaIVATrasladado").ToString}").Rows(0)("CtaCodigo").ToString - Dr("CuentaTrasladado") = DtCuentas.FiltroPrimeroValor("CtaCodigo", $"Id = {Dr("IdCtaIVATrasladado").ToString}").ToString.ToEntero - End If - Next - DtClasificacionIVA.AcceptChanges() - End Sub - 'Private Sub InicializaClasificacionIVA(ObjEmpresas As ClsSisEmpresas) - ' CreaDtClasificacionIVA() - ' CargaCuentasIVA(ObjEmpresas) - ' CargaClasificaciones() - ' CargaClasificacionesIVA() - 'End Sub - 'Private Sub CargaClasificacionesIVA() - ' Dim ObjGral As New ClsGenerales - ' If ObjGral.GetClasificacionPorcentaje(UsuarioActual.CveEmpresa, Opcion:=2) Then - ' DtClasificacionIVA = ObjGral.DtResultados.Copy - ' ActualizaNombresCuentas() - ' GvClasificacionIVA.DataSource = DtClasificacionIVA - ' End If - ' ObjGral.Dispose() - ' GvClasificacionIVA.DataBind() - ' UpClasificacionIVA.Update() - 'End Sub - 'Private Sub CargaClasificaciones() - ' DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - ' DdlClasificacion.DataBind() - ' DdlClasificacion.Items.Insert(0, New ListItem("-", "-1")) - 'End Sub - 'Private Sub CreaDtClasificacionIVA() - ' DtClasificacionIVA = New DataTable - ' DtClasificacionIVA.Columns.Add("CveClasificacionPorcentaje", GetType(Integer)) - ' DtClasificacionIVA.Columns.Add("CveClasificacion", GetType(Integer)) - ' DtClasificacionIVA.Columns.Add("Clasificacion", GetType(String)) - ' DtClasificacionIVA.Columns.Add("PorcentajeIVA", GetType(Double)) - ' DtClasificacionIVA.Columns.Add("CuentaXAcreditar", GetType(String)) - ' DtClasificacionIVA.Columns.Add("IdCtaIVAXAcreditar", GetType(Integer)) - ' DtClasificacionIVA.Columns.Add("CuentaAcreditable", GetType(String)) - ' DtClasificacionIVA.Columns.Add("IdCtaIVAAcreditable", GetType(Integer)) - ' DtClasificacionIVA.Columns.Add("CuentaXTrasladar", GetType(String)) - ' DtClasificacionIVA.Columns.Add("IdCtaIVAXTrasladar", GetType(Integer)) - ' DtClasificacionIVA.Columns.Add("CuentaTrasladado", GetType(String)) - ' DtClasificacionIVA.Columns.Add("IdCtaIVATrasladado", GetType(Integer)) - 'End Sub - 'Private Sub CargaCuentasIVA(ByRef ObjEmpresas As ClsSisEmpresas) - - ' If ObjEmpresas.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then - ' If ObjEmpresas.Empresa.UsaContabilidad And ObjEmpresas.Empresa.TipoContabilidad = 2 Then - - ' 'If ObjEmpresas.Empresa.TipoContabilidad = 2 Then - ' Dim Cuenta As New ClsContPAQi(ObjEmpresas.Empresa) - ' If Cuenta.GetCuentas(-1, "-1", -1) Then - ' DtCuentas = Cuenta.DtResultados - ' End If - ' Cuenta.Dispose() - ' 'End If - - ' Try - ' DdlIVAXAcreditarModal.DataSource = DtCuentas : DdlIVAXAcreditarModal.DataBind() - ' Catch ex As Exception - ' End Try - ' Try - ' DdlIVAAcreditableModal.DataSource = DtCuentas : DdlIVAAcreditableModal.DataBind() - ' Catch ex As Exception - ' End Try - ' Try - ' DdlIVAXTrasladarModal.DataSource = DtCuentas : DdlIVAXTrasladarModal.DataBind() - ' Catch ex As Exception - ' End Try - ' Try - ' DdlIVATrasladadoModal.DataSource = DtCuentas : DdlIVATrasladadoModal.DataBind() - ' Catch ex As Exception - ' End Try - ' End If - - - ' End If - - ' 'ObjEmpresas.Dispose() - ' DdlIVAXAcreditarModal.Items.Insert(0, New ListItem("-", "-1")) - ' DdlIVAAcreditableModal.Items.Insert(0, New ListItem("-", "-1")) - ' DdlIVAXTrasladarModal.Items.Insert(0, New ListItem("-", "-1")) - ' DdlIVATrasladadoModal.Items.Insert(0, New ListItem("-", "-1")) - 'End Sub - 'Protected Sub LnkEliminarClasificacionIVA_Click(sender As Object, e As EventArgs) - ' Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - ' If DtClasificacionIVA.Rows(gvRow.RowIndex)("CveClasificacionPorcentaje").ToString.ToEntero = 0 Then - ' DtClasificacionIVA.Rows(gvRow.RowIndex).Delete() - ' Else - ' DtClasificacionIVA.Rows(gvRow.RowIndex)("CveClasificacion") = -1 - ' End If - ' DtClasificacionIVA.AcceptChanges() - ' GvClasificacionIVA.DataSource = DtClasificacionIVA - ' GvClasificacionIVA.DataBind() - ' UpClasificacionIVA.Update() - 'End Sub - 'Protected Sub LnkAgregarClasificacionIVA_Click(sender As Object, e As EventArgs) - ' LimpiaClasificacionIVA() - ' Modalidad = "A" - ' RegistraScript("$('#DModalClasificacionIVA').modal()") - ' UpModalClasificacionIVA.Update() - 'End Sub - 'Protected Sub LnkEditarClasificacionIVA_Click(sender As Object, e As EventArgs) - ' LimpiaClasificacionIVA() - ' Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - ' Modalidad = "U" - ' Index = gvRow.RowIndex - ' CveClasificacionPorcentaje = gvRow.DataKey("CveClasificacionPorcentaje").ToEntero() - ' DdlClasificacion.SelectedValueExist(gvRow.DataKey("CveClasificacion")) - ' TxtPorcentajeIVA.Text = gvRow.DataKey("PorcentajeIVA") - ' DdlIVAXAcreditarModal.SelectedValueExist(gvRow.DataKey("IdCtaIVAXAcreditar")) - ' DdlIVAAcreditableModal.SelectedValueExist(gvRow.DataKey("IdCtaIVAAcreditable")) - ' DdlIVAXTrasladarModal.SelectedValueExist(gvRow.DataKey("IdCtaIVAXTrasladar")) - ' DdlIVATrasladadoModal.SelectedValueExist(gvRow.DataKey("IdCtaIVATrasladado")) - ' RegistraScript("$('#DModalClasificacionIVA').modal()") - ' UpModalClasificacionIVA.Update() - 'End Sub - - 'Private Sub LimpiaClasificacionIVA() - ' TxtPorcentajeIVA.Text = "" - ' DdlClasificacion.SelectedIndex = 0 - ' DdlIVAXAcreditarModal.SelectedIndex = 0 - ' DdlIVAAcreditableModal.SelectedIndex = 0 - ' DdlIVAXTrasladarModal.SelectedIndex = 0 - ' DdlIVATrasladadoModal.SelectedIndex = 0 - ' UpModalClasificacionIVA.Update() - 'End Sub - - 'Protected Sub BtnClasificacionIVA_Click(sender As Object, e As EventArgs) - ' If Modalidad = "A" Then - ' Dim Row As DataRow = DtClasificacionIVA.NewRow() - ' Row("CveClasificacionPorcentaje") = 0 - ' Row("CveClasificacion") = DdlClasificacion.SelectedValue.ToEntero - ' Row("Clasificacion") = DdlClasificacion.SelectedItem.Text - ' Row("PorcentajeIVA") = TxtPorcentajeIVA.Text.ToDouble - ' Row("CuentaXAcreditar") = DdlIVAXAcreditarModal.SelectedItem.Text - ' Row("IdCtaIVAXAcreditar") = DdlIVAXAcreditarModal.SelectedValue.ToEntero - ' Row("CuentaAcreditable") = DdlIVAAcreditableModal.SelectedItem.Text - ' Row("IdCtaIVAAcreditable") = DdlIVAAcreditableModal.SelectedValue.ToEntero - ' Row("CuentaXTrasladar") = DdlIVAXTrasladarModal.SelectedItem.Text - ' Row("IdCtaIVAXTrasladar") = DdlIVAXTrasladarModal.SelectedValue.ToEntero - ' Row("CuentaTrasladado") = DdlIVATrasladadoModal.SelectedItem.Text - ' Row("IdCtaIVATrasladado") = DdlIVATrasladadoModal.SelectedValue.ToEntero - ' DtClasificacionIVA.Rows.InsertAt(Row, DtClasificacionIVA.Rows.Count) - ' ElseIf Modalidad = "U" Then - ' DtClasificacionIVA.Rows(Index)("CveClasificacion") = DdlClasificacion.SelectedValue.ToEntero - ' DtClasificacionIVA.Rows(Index)("Clasificacion") = DdlClasificacion.SelectedItem.Text - ' DtClasificacionIVA.Rows(Index)("PorcentajeIVA") = TxtPorcentajeIVA.Text.ToDouble - ' DtClasificacionIVA.Rows(Index)("CuentaXAcreditar") = DdlIVAXAcreditarModal.SelectedItem.Text - ' DtClasificacionIVA.Rows(Index)("IdCtaIVAXAcreditar") = DdlIVAXAcreditarModal.SelectedValue.ToEntero - ' DtClasificacionIVA.Rows(Index)("CuentaAcreditable") = DdlIVAAcreditableModal.SelectedItem.Text - ' DtClasificacionIVA.Rows(Index)("IdCtaIVAAcreditable") = DdlIVAAcreditableModal.SelectedValue.ToEntero - ' DtClasificacionIVA.Rows(Index)("CuentaXTrasladar") = DdlIVAXTrasladarModal.SelectedItem.Text - ' DtClasificacionIVA.Rows(Index)("IdCtaIVAXTrasladar") = DdlIVAXTrasladarModal.SelectedValue.ToEntero - ' DtClasificacionIVA.Rows(Index)("CuentaTrasladado") = DdlIVATrasladadoModal.SelectedItem.Text - ' DtClasificacionIVA.Rows(Index)("IdCtaIVATrasladado") = DdlIVATrasladadoModal.SelectedValue.ToEntero - ' End If - ' DtClasificacionIVA.AcceptChanges() - ' ActualizaNombresCuentas() - ' GvClasificacionIVA.DataSource = DtClasificacionIVA - ' GvClasificacionIVA.DataBind() - ' UpClasificacionIVA.Update() - ' RegistraScript("$('#DModalClasificacionIVA').modal('hide')") - 'End Sub - - 'Protected Sub GvClasificacionIVA_RowDataBound(sender As Object, e As GridViewRowEventArgs) - ' If e.Row.RowType = DataControlRowType.DataRow Then - ' If Not e.Row.DBCampo("CveClasificacion").ToEntero > 0 Then - ' e.Row.Visible = False - ' End If - ' End If - 'End Sub - -#End Region - - - - - 'Protected Sub LnkOpenModalDatosFiel_Click(sender As Object, e As EventArgs) - ' TxtFielPass.Text = "" - ' TxtFielArchivoCER.Text = "" - ' TxtFielArchivoKey.Text = "" - ' RegistraScript("$('#ModalUpFiel').modal();") - 'End Sub - - 'Protected Sub LnkUpDatosFiel_Click(sender As Object, e As EventArgs) - ' Dim Password As String = TxtFielPass.Text - ' Dim akey As String - ' Dim acer As String - ' Dim pemkey As String - ' Dim pemcer As String - ' Dim pfxname As String - ' Dim Archivopfx As String - ' Dim Archivokey As Archivo = Nothing - ' Dim Archivocer As Archivo = Nothing - - ' Dim dirbase = "" - ' Dim dirbasepfx = "" - ' If EmpresaEditar IsNot Nothing Then - ' dirbase = String.Format("{0}Certificados\Fiel\", EmpresaEditar.Ruta) - ' dirbasepfx = String.Format("{0}Certificados\", EmpresaEditar.Ruta) - ' Else - ' dirbase = String.Format("{0}Empresas\{1}\Certificados\Fiel\", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa) - ' dirbasepfx = String.Format("{0}Empresas\{1}\Certificados\", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa) - ' End If - - ' If (Not Directory.Exists(dirbase)) Then - ' Directory.CreateDirectory(dirbase) - ' End If - - ' Dim Filesgral As List(Of Archivo) = TxtFielArchivoCER.getfiles().Archivos - ' If Filesgral.Count > 0 Then - ' Archivocer = Filesgral(0) - ' End If - ' Filesgral = TxtFielArchivoKey.getfiles().Archivos - ' If Filesgral.Count > 0 Then - ' Archivokey = Filesgral(0) - ' End If - ' If Not IsNothing(Archivokey) AndAlso Not IsNothing(Archivocer) And Password.Length > 0 Then - ' akey = String.Format("{0}{1}", dirbase, Archivokey.filenameO) - ' If File.Exists(akey) Then - ' File.Delete(akey) - ' End If - ' File.Copy(Archivokey.FileUrl, akey) - ' acer = String.Format("{0}{1}", dirbase, Archivocer.filenameO) - ' If File.Exists(acer) Then - ' File.Delete(acer) - ' End If - ' File.Copy(Archivocer.FileUrl, acer) - ' Archivopfx = Archivokey.filenameO.Substring(0, Archivokey.filenameO.Length - 4) - ' pemkey = String.Format("{0}{1}.pem", dirbase, Archivopfx) - ' pfxname = String.Format("{0}{1}.pfx", dirbasepfx, Archivopfx) - ' pemcer = String.Format("{0}{1}.pem", dirbase, Archivokey.filenameO.Substring(0, Archivocer.filenameO.Length - 4)) - - ' If File.Exists(pemkey) Then - ' File.Delete(pemkey) - ' End If - - ' If File.Exists(pfxname) Then - ' File.Delete(pfxname) - ' End If - - ' If File.Exists(pemcer) Then - ' File.Delete(pemcer) - ' End If - - ' Dim resultado As New StringBuilder - ' resultado.AppendLine("
PAso 1:
") - ' resultado.AppendLine(execCommand({"cd C:\Generar PFX\", String.Format("openssl.exe x509 -inform DER -in ""{0}"" -out ""{1}""", acer, pemcer)})) - ' resultado.AppendLine("
PAso 2:
") - ' resultado.AppendLine(execCommand({"cd C:\Generar PFX\", String.Format("openssl pkcs8 -inform DER -in ""{0}"" -passin pass:""{1}"" -out ""{2}""", akey, Password, pemkey)})) - ' resultado.AppendLine("
Paso 3:
") - ' resultado.AppendLine(execCommand({"cd C:\Generar PFX\", String.Format("openssl pkcs12 -export -out ""{0}"" -inkey ""{1}"" -in ""{2}"" -passout pass:""{3}""", pfxname, pemkey, pemcer, Password)})) - ' resultado.AppendLine("
") - ' 'Alert(resultado.ToString()) - - ' If File.Exists(pemkey) Then - ' File.Delete(pemkey) - ' End If - ' If File.Exists(pemcer) Then - ' File.Delete(pemcer) - ' End If - ' If File.Exists(acer) Then - ' File.Delete(acer) - ' End If - ' If File.Exists(akey) Then - ' File.Delete(akey) - ' End If - ' If File.Exists(Archivocer.FileUrl) Then - ' File.Delete(Archivocer.FileUrl) - ' End If - ' If File.Exists(Archivokey.FileUrl) Then - ' File.Delete(Archivokey.FileUrl) - ' End If - ' If Not File.Exists(pfxname) Then - ' Archivopfx = "" - ' Password = "" - ' End If - ' Dim objempresa As New ClsSisEmpresas - ' objempresa.UpEmpresaFiel(UsuarioActual.CveEmpresa, Password, $"{Archivopfx}.pfx") - ' objempresa.Dispose() - ' lblPassFiel.Text = Password - ' LblPfx.Text = $"{Archivopfx}.pfx" - ' Alert("La Fiel se ha actualizado") - ' UpmodalFiel.Update() - ' RegistraScript("$('#ModalUpFiel').modal('hide');") - ' Else - ' Alert("Favor de llenar todos los campos :
-Contraseña
-Archivo CER
-Archivo KEY", TipoMensaje.MsgAdvertencia) - ' End If - 'End Sub - 'Public Function execCommand(command As String()) As String - - ' Dim proceso As Diagnostics.Process = New Diagnostics.Process() - ' proceso.StartInfo.FileName = "cmd.exe" - ' proceso.StartInfo.CreateNoWindow = True - ' proceso.StartInfo.RedirectStandardInput = True - ' proceso.StartInfo.RedirectStandardOutput = True - ' proceso.StartInfo.UseShellExecute = False - ' proceso.Start() - ' For Each c As String In command - ' proceso.StandardInput.WriteLine(c) - - ' Next - ' proceso.StandardInput.Flush() - ' proceso.StandardInput.Close() - ' proceso.WaitForExit() - ' Return proceso.StandardOutput.ReadToEnd() - 'End Function - 'Private Sub CargaTareasProgramadas() - ' Dim objTP As New ClsTareasProgramadas() - ' ChkDescargaMasivaSat.Checked = False - ' If objTP.GetTareasProgramadas(UsuarioActual.CveEmpresa) AndAlso objTP.DtResultados.Rows.Count > 0 Then - ' ChkDescargaMasivaSat.Checked = (objTP.DtResultados.COUNT("CveTareaProgramada", "CveTareaProgramada=1") > 0) - ' End If - ' objTP.Dispose() - 'End Sub - 'Protected Sub ChkDescargaMasivaSat_CheckedChanged(sender As Object, e As EventArgs) - ' Dim objTP As New ClsTareasProgramadas() - ' If ChkDescargaMasivaSat.Checked Then - ' If objTP.AddTareasProgramadas(UsuarioActual.CveEmpresa, 1, DateTime.Now.ToString("yyyy/MM/dd"), "", 0, "", DateTime.Now.ToString("yyyy/MM/dd"), DateTime.Now.ToString("yyyy/MM/dd"), "", "", 0, 1) Then - ' Alert("La tarea programada de descarga masiva del sat a agregado satisfactoriamente") - ' End If - ' Else - ' If objTP.RemoveTareasProgramadas(1, UsuarioActual.CveEmpresa) Then - ' Alert("La tarea programada de descarga masiva del sat se ha removido satisfactoriamente") - ' End If - ' End If - - ' objTP.Dispose() - 'End Sub Protected Sub LnkRegistrarPAC3_Click(sender As Object, e As EventArgs) If UsuarioActual.CveEmpresa > 0 Then RegistrarPAC3() diff --git a/Sistemas/Empresa.aspx b/Sistemas/Empresa.aspx index 7326a7b7f..c622e5fc5 100644 --- a/Sistemas/Empresa.aspx +++ b/Sistemas/Empresa.aspx @@ -761,501 +761,26 @@
-
-
-
- - Cuentas Contables -
-
-
-
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - -
Cuenta Cambiaria: - - -
Cuenta Perdida Cambiaria: - - -
Cuenta Descuento Venta: - - -
Cuenta Otros Ingresos: - - -
Asiento Contable Compras Contado: -
-
-
+
-
-
-
- - IVAs -
-
-
-
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IVA por Acreditar: - - -
IVA Acreditable: - - -
IVA por Trasladar: - - -
IVA Trasladado - - -
IVA Retenciones: - - -
ISR Circulación: - - -
Dev Sobre Venta: - - -
Impuestos Locales: - - -
IEPS por Acreditar: - - -
IEPS Acreditable: - - -
IEPS por Trasladar: - - -
IEPS Trasladado: - - -
-
-
+
-
-
-
- - CUENTAS PADRES -
-
-
-
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Proveedores: - - -
Clientes: - - -
Inventario: - - -
Gasto: - - -
Bancos: - - -
Deudores: - - -
Acreedores: - - -
Doc. por Pagar: - - -
Anticipo Cliente: - - -
Anticipo Proveedores: - - -
Caja - - -
FyE: - - -
Activo Fijo: - - - -
-
-
- - <%-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Proveedores: - - -
Clientes: - - -
Inventario: - - -
Gasto: - - -
Bancos: - - -
Deudores: - - -
Acreedores: - - -
Doc. por Pagar: - - -
Anticipo Cliente: - - -
Anticipo Proveedores: - - -
Caja - - -
FyE: - - -
Activo Fijo: - - - -
-
-
--%> - - - -
- - -
-
+
-
-
-
- - CLASIFICACIONES DE IVAS -
-
-
-
-
-
- -
-
-
- - -
- -
-
-
- - - - - - - - - - - - - - - -
-
-
-
+
- +
diff --git a/Sistemas/Empresa.aspx.vb b/Sistemas/Empresa.aspx.vb index 79402048a..7fc28addf 100644 --- a/Sistemas/Empresa.aspx.vb +++ b/Sistemas/Empresa.aspx.vb @@ -1,1887 +1,995 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports Extensiones -Imports System.Runtime.InteropServices -Imports System.IO -Imports Microsoft.Reporting.WebForms -Imports Microsoft.Owin.Security.Provider - -Partial Class Sistemas_Empresa - Inherits ClsPaginas - -#Region " PROPIEDADES " - Private ReadOnly Property CveEmpresa As Integer - Get - Return ViewState("CveEmpresa").ToString.ToEntero - End Get - End Property - Private Property DtCuentasContables As Data.DataTable - Get - Return CType(ViewState("DtCuentasContables"), DataTable) - End Get - Set(value As Data.DataTable) - ViewState("DtCuentasContables") = value - End Set - End Property - - Private Property EmpresaEditar As Empresa - Get - Return CType(ViewState("EmpresaEditar"), Empresa) - End Get - Set(value As Empresa) - ViewState("EmpresaEditar") = value - End Set - End Property - Private Property DtCuentasContablesSIG As Data.DataTable - Get - Return CType(ViewState("DtCuentasContablesSIG"), DataTable) - End Get - Set(value As Data.DataTable) - ViewState("DtCuentasContablesSIG") = value - End Set - End Property - - Private Property DtFuncionalidades As Data.DataTable - Get - Return CType(ViewState("DtFuncionalidades"), DataTable) - End Get - Set(value As Data.DataTable) - ViewState("DtFuncionalidades") = value - End Set - End Property - Private Property BDContPAQ As String - Get - BDContPAQ = ViewState("BDContPAQ").ToString - End Get - Set(value As String) - ViewState("BDContPAQ") = value - End Set - End Property - Private Property ServerContPAQ As String - Get - ServerContPAQ = ViewState("ServerContPAQ").ToString - End Get - Set(value As String) - ViewState("ServerContPAQ") = value - End Set - End Property - Public Property DtCuentas As DataTable - Get - Return CType((ViewState("DtCuentas")), DataTable) - End Get - Set(value As DataTable) - ViewState("DtCuentas") = value - End Set - End Property - Public Property DtClasificacionIVA As DataTable - Get - If ViewState("DtClasificacionIVA") Is Nothing Then - ViewState("DtClasificacionIVA") = New DataTable - End If - Return CType((ViewState("DtClasificacionIVA")), DataTable) - End Get - Set(value As DataTable) - ViewState("DtClasificacionIVA") = value - End Set - End Property - Public Property CveClasificacionPorcentaje As Integer - Get - Return CType((ViewState("CveClasificacionPorcentaje")), Integer) - End Get - Set(value As Integer) - ViewState("CveClasificacionPorcentaje") = value - End Set - End Property - Public Property Modalidad As String - Get - Return CType((ViewState("Modalidad")), String) - End Get - Set(value As String) - ViewState("Modalidad") = value - End Set - End Property - Public Property Index As Integer - Get - Return CType((ViewState("Index")), Integer) - End Get - Set(value As Integer) - ViewState("Index") = value - End Set - End Property - - - Public Property TipoContabilidad As Integer - Get - If ViewState("TipoContabilidad") Is Nothing Then - ViewState("TipoContabilidad") = -1 - End If - - Return CType((ViewState("TipoContabilidad")), Integer) - End Get - Set(value As Integer) - ViewState("TipoContabilidad") = value - End Set - End Property - - - - Enum EnumOpActualizaArchivosCer - SinOpcion - KEY - CER - PFX - End Enum - - - Property OpActualizaArchivosCer As EnumOpActualizaArchivosCer - - Get - If ViewState("OpActualizaArchivosCer") Is Nothing Then - ViewState("OpActualizaArchivosCer") = EnumOpActualizaArchivosCer.SinOpcion - End If - - Return DirectCast(ViewState("OpActualizaArchivosCer"), EnumOpActualizaArchivosCer) - - End Get - Set(value As EnumOpActualizaArchivosCer) - ViewState("OpActualizaArchivosCer") = value - End Set - - End Property - -#End Region - - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not IsPostBack Then - - If UsuarioActual.CveRol <> 1 AndAlso (Request("CveEmpresa") IsNot Nothing AndAlso Request("CveEmpresa").ToEntero > 0) Then - - If Not ValidaCveEmpresaUsaurio(UsuarioActual.CveUsuario, Request("CveEmpresa").ToEntero) Then - 'Response.Redirect("../Inicio.aspx") - Alert("No tiene acceso a esta empresa.", TipoMensaje.MsgAdvertencia, "document.location.href = ""../Inicio.aspx""") - Exit Sub - End If - - End If - - CargaDdlPac() - CargaRegimenFiscal() - CargaGridIndicadores() - DtCuentasContables = Nothing - DtFuncionalidades = Nothing - DtCuentas = Nothing - CveClasificacionPorcentaje = 0 - - If (Request("CveEmpresa") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresa")) AndAlso Request("CveEmpresa").ToEntero > 0 AndAlso UsuarioActual.CveRol = 1) OrElse UsuarioActual.CveRol <> 1 Then - ViewState("CveEmpresa") = If(UsuarioActual.CveRol <> 1, UsuarioActual.Empresa.CveEmpresa.ToString, Request("CveEmpresa")) ' Request("CveEmpresa") - ' Session("FileUpload") = CveEmpresa - CargaTareasProgramadas() - CargaDatos() - - 'Configuración de Modalidad Update - TxtTimbres.Enabled = False - LbArchivoKeyDescarga.Visible = True - LbArchivoCerDescarga.Visible = True - LbArchivoPfxDescarga.Visible = True - - 'If LnkArchivoKey.InnerText = "" Then - ' LnkArchivoKey.InnerText = "Reemplazar Archivo Key" - 'End If - 'If LnkArchivoCer.InnerText = "" Then - ' LnkArchivoCer.InnerText = "Reemplazar Archivo Cer" - 'End If - - 'If LnkArchivoPfx.InnerText = "" Then - ' LnkArchivoPfx.InnerText = "Reemplazar Archivo Pfx" - 'End If - BtnGuardar.Text = "Guardar Cambios" - - 'Plantilla Correo - - - Else - 'Configuración de Modalidad Insert - ViewState("CveEmpresa") = -1 - 'TAB.ActiveTabIndex = 1 - BtnEliminar.Visible = False - - End If - ConfiguracionEmpresa() - - End If - End Sub - - Private Function ValidaCveEmpresaUsaurio(CveUsuario As Integer, CveEmpresaValidar As Integer) As Boolean - - Dim Respuesta As Boolean = False - Using ObjEmpresas As New ClsSisEmpresas() - If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario) Then - If ObjEmpresas.DtResultados.FiltraParametros($"CveEmpresa = {CveEmpresaValidar}").Rows.Count = 1 Then - Respuesta = True - End If - End If - End Using - Return Respuesta - - End Function - - Private Sub CargaDatos() - - Dim ObjEmpresas As New ClsSisEmpresas() - If ObjEmpresas.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then - If ObjEmpresas.DtResultados.Rows.Count > 0 Then - Me.EmpresaEditar = ObjEmpresas.Empresa - With ObjEmpresas.Empresa - - 'Campos para Modificación - TxtCveEmpresa.Text = .CveEmpresa.ToString - TxtEmpresa.Text = .Empresa : LtlTitulo.Text = "Consulta de Empresa: " & .Empresa - TxtNombreCorto.Text = .NombreCorto - TxtDireccion.Text = .Direccion - TxtNoExt.Text = .NoExt - TxtNoInt.Text = .NoInt - TxtColonia.Text = .Colonia - TxtCiudad.Text = .Ciudad - TxtEstado.Text = .Estado - TxtCP.Text = .CP.ToString - TxtRFC.Text = .RFC - TxtTelefono.Text = .Telefono - TxtContacto.Text = .Contacto 'Representante legal - TxtMail.Text = .Mail - DdlTipoFacturacion.SelectedValue = .TipoFacturacion - TxtBIUsuario.Text = .BIUsuario - TxtBIContraseña.Text = .BIContraseña - TxtContraseñaKey.Text = .ContraseñaKey - TxtArchivoKey.Text = .ArchivoKey - TxtArchivoCer.Text = .ArchivoCer - TxtArchivoPfx.Text = .ArchivoPfx - ChkEstatus.Checked = .Estatus - TxtFecha.Text = .FechaIng.ToString - TxtCveUsuario.Text = .Usuario - ChkFacturaProduccion.Checked = .FacturaProduccion - TxtSendMail.Text = .SendMail - TxtSendMailPassword.Text = .SendMailPassword - TxtSendMailServer.Text = .SendMailServer - TxtSendMailPort.Text = .SendMailPuerto.ToString - ChkSendMailSSL.Checked = .SendMailSSL - ChkMostrarRetIVA.Checked = .MostrarRetIVA - ChkMostrarRetISR.Checked = .MostrarRetISR - 'TxtRegimen.Text = .Regimen - ChkEstatusFacturacion.Checked = .EstatusFacturacion - TxtTimbres.Text = .Timbres.ToString - ChkUsaContabilidad.Checked = .UsaContabilidad - ChkUsaBancos.Checked = .UsaBancos - ChkUsaVentas.Checked = .UsaVentas - ChkUsaCxC.Checked = .UsaCxC - ChkUsaCompras.Checked = .UsaCompras - ChkUsaInventarios.Checked = .UsaInventarios - ChkUsaRH.Checked = .UsaRH - ChkUsaNomina.Checked = .UsaNomina - ChkUsaOS.Checked = .UsaOS - TxtBDContPAQi.Text = .BDContPAQi - TxtServerContPAQi.Text = .ServerContPAQi - TxtUsrContPAQi.Text = .UsrContPAQi - TxtPwdContPAQi.Text = .PwdContPAQi - TxtBuzon_Mail.Text = .Buzon_Mail - TxtBuzon_Server.Text = .Buzon_Server - TxtBuzon_Puerto.Text = .Buzon_Puerto.ToString - ChkBuzon_SSL.Checked = .Buzon_SSL - TxtBuzon_USR.Text = .Buzon_USR - TxtBuzon_PWD.Text = .Buzon_PWD - TxtMailSoporte.Text = .Soporte_Mail - TxtServidorSoporte.Text = .Soporte_Server - TxtPuertoSoporte.Text = .Soporte_Puerto.ToString - ChkSSLSoporte.Checked = .Soporte_SSL - TxtUsuarioSoporte.Text = .Soporte_USR - DdlProtocoloSoporte.SelectedValue = .Soporte_Tipo - TxtContraseñaSoporte.Text = .Soporte_PWD - DdlCvePac.SelectedValueExist(.CvePAC.ToString) - DdlRegimen.SelectedValue = .CveRegimenFiscal.ToString - TxtCURP.Text = .CURP - TxtImporte.Text.ToDecimal - TxtCIEC.Text = .CIEC - DdlPlataforma.SelectedValue = .CvePlataforma.ToString - ChkUsaAC.Checked = .UsaAC - TxtPorDepreciacion.Text = .PorDepreciacion.ToString - TxtExtension.Text = .Extension - TxtLocalidad.Text = .Localidad - DdlMetodoInventario.SelectedValue = .CveMetodoInventario.ToString - ChkAsientoContable.Checked = .AsientoContableComprasContado - TxtPeriodoActual.Text = .PeriodoActual.ToString - TxtEjercicioActual.Text = .EjercicioActual.ToString - ChkDefaultAsistencias.Checked = .DefaultAsistencias - TxtDiasPermitidos.Text = .DiasPermitidos.ToString - DdlTipoCentroDeCostos.SelectedValue = .Tipo_CentroCosto.ToString - ChkReqCentroCostos.Checked = .RequiereCentroCostos - DdlTerminalTipo.SelectedValue = .PV_TerminalTipo.ToString - TxtImporte.Text = .Importe.ToString - TipoContabilidad = .TipoContabilidad - - TxtPlantillaVenta.Text = .PlantillaMailVenta - TxtAsunto.Text = .AsuntoPlantillaMailVenta - - TxtPlantillaCotizacion.Text = .AsuntoPlantillaMailVentaCotizacion - TxtAsuntoCotizacion.Text = .PlantillaMailVentaCotizacion - - 'NUEVOS - TxtAreaGeografica.Text = .AreaGeografica - DdlProtocolo.Text = .Buzon_Tipo - - 'Fiel - LblPfx.Text = .FielPFX - lblPassFiel.Text = .FielPassword - - 'PARA PROPIEDAD - TRIGGER - BDContPAQ = .BDContPAQi - ServerContPAQ = .ServerContPAQi - - If TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" Then - CargaCuentasContables() - CargaDDLs() - - 'Dim Row As DataRow - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAxAcreditar.ToString)) - 'If Not IsNothing(Row) Then - ' DdlIVAxAcreditar.Items.Add(New ListItem(Row("CtaCodigo").ToString, .IdCuentaIVAxAcreditar.ToString)) - ' DdlIVAxAcreditar.SelectedValue = .IdCuentaIVAxAcreditar.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAAcreditable.ToString)) - 'If Not IsNothing(Row) Then - ' DdlIVAAcreditable.Items.Add(New ListItem(Row("CtaCodigo").ToString, .IdCuentaIVAAcreditable.ToString)) - ' ' DdlIVAAcreditable.SelectedValue = .IdCuentaIVAAcreditable.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAxTrasladar.ToString)) - 'If Not IsNothing(Row) Then - ' DdlIVAxTrasladar.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVAxTrasladar.ToString))("CtaCodigo").ToString, .IdCuentaIVAxTrasladar.ToString)) - ' DdlIVAxTrasladar.SelectedValue = .IdCuentaIVAxTrasladar.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVATrasladado.ToString)) - 'If Not IsNothing(Row) Then - ' DdlIVATrasladado.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIVATrasladado.ToString))("CtaCodigo").ToString, .IdCuentaIVATrasladado.ToString)) - ' DdlIVATrasladado.SelectedValue = .IdCuentaIVATrasladado.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetIVACirculacion.ToString)) - 'If Not IsNothing(Row) Then - ' DdlIVARetenciones.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetIVACirculacion.ToString))("CtaCodigo").ToString, .IdCuentaRetIVACirculacion.ToString)) - ' DdlIVARetenciones.SelectedValue = .IdCuentaRetIVACirculacion.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetISRCirculacion.ToString)) - 'If Not IsNothing(Row) Then - ' DdlISRCirculacion.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaRetISRCirculacion.ToString))("CtaCodigo").ToString, .IdCuentaRetISRCirculacion.ToString)) - ' DdlISRCirculacion.SelectedValue = .IdCuentaRetISRCirculacion.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaPerdidaCambiaria.ToString)) - 'If Not IsNothing(Row) Then - ' DdlCuentaPerdidaCambiaria.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaPerdidaCambiaria.ToString))("CtaCodigo").ToString, .IdCuentaPerdidaCambiaria.ToString)) - ' DdlCuentaPerdidaCambiaria.SelectedValue = .IdCuentaPerdidaCambiaria.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaGananciaCambiaria.ToString)) - 'If Not IsNothing(Row) Then - ' DddlCuentaGananciaCambiaria.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaGananciaCambiaria.ToString))("CtaCodigo").ToString, .IdCuentaGananciaCambiaria.ToString)) - ' DddlCuentaGananciaCambiaria.SelectedValue = .IdCuentaGananciaCambiaria.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaDSV.ToString)) - 'If Not IsNothing(Row) Then - ' DdlDSV.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaDSV.ToString))("CtaCodigo").ToString, .IdCuentaDSV.ToString)) - ' DdlDSV.SelectedValue = .IdCuentaDSV.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaImpuestosLocales.ToString)) - 'If Not IsNothing(Row) Then - ' DdlImpuestosLocales.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaImpuestosLocales.ToString))("CtaCodigo").ToString, .IdCuentaImpuestosLocales.ToString)) - ' DdlImpuestosLocales.SelectedValue = .IdCuentaImpuestosLocales.ToString - 'End If - - - 'NUEVOS DATOS - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxAcreditar.ToString)) - 'If Not IsNothing(Row) Then - ' DdlIEPSxAcreditar.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxAcreditar.ToString))("CtaCodigo").ToString, .IdCuentaIEPSxAcreditar.ToString)) - ' DdlIEPSxAcreditar.SelectedValue = .IdCuentaIEPSxAcreditar.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSAcreditable.ToString)) - 'If Not IsNothing(Row) Then - ' DdlIEPSAcreditable.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSAcreditable.ToString))("CtaCodigo").ToString, .IdCuentaIEPSAcreditable.ToString)) - ' DdlIEPSAcreditable.SelectedValue = .IdCuentaIEPSAcreditable.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxTrasladar.ToString)) - 'If Not IsNothing(Row) Then - ' DdlIEPSxTrasladar.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSxTrasladar.ToString))("CtaCodigo").ToString, .IdCuentaIEPSxTrasladar.ToString)) - ' DdlIEPSxTrasladar.SelectedValue = .IdCuentaIEPSxTrasladar.ToString - 'End If - - 'Row = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSTrasladado.ToString)) - 'If Not IsNothing(Row) Then - ' DdlIEPSTrasladado.Items.Add(New ListItem(DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", .IdCuentaIEPSTrasladado.ToString))("CtaCodigo").ToString, .IdCuentaIEPSTrasladado.ToString)) - ' DdlIEPSTrasladado.SelectedValue = .IdCuentaIEPSTrasladado.ToString - 'End If - - End If - - 'CUENTAS PADRES - ObjEmpresas.GetEmpresasFuncionalidades(CveEmpresa) - DtFuncionalidades = ObjEmpresas.DtResultados - - CargaFuncionalidad(201, DdlProveedores) - CargaFuncionalidad(211, DdlClientes) - CargaFuncionalidad(205, DdlDeudores) - CargaFuncionalidad(202, DdlAcreedores) - CargaFuncionalidad(203, DdlDocxPagar) - CargaFuncionalidad(212, DdlAnticipoCliente) - CargaFuncionalidad(204, DdlAnticipoProveedores) - CargaFuncionalidad(208, DdlInventario) - CargaFuncionalidad(216, DdlGasto) - CargaFuncionalidad(209, DdlBancos) - CargaFuncionalidad(218, DdlCaja) - CargaFuncionalidad(215, DdlFyE) - CargaFuncionalidad(221, DdlActivoFijo) - - 'CargaFuncionalidad(232, DdlProveedoresSIG) - 'CargaFuncionalidad(233, DdlClientesSIG) - 'CargaFuncionalidad(234, DdlDeudoresSIG) - 'CargaFuncionalidad(235, DdlAcreedoresSIG) - 'CargaFuncionalidad(236, DdlDocxPagarSIG) - 'CargaFuncionalidad(237, DdlAnticipoClienteSIG) - 'CargaFuncionalidad(238, DdlAnticipoProveedoresSIG) - 'CargaFuncionalidad(239, DdlInventarioSIG) - 'CargaFuncionalidad(240, DdlGastoSIG) - 'CargaFuncionalidad(241, DdlBancosSIG) - 'CargaFuncionalidad(242, DdlCajaSIG) - 'CargaFuncionalidad(243, DdlFyESIG) - 'CargaFuncionalidad(244, DdlActivoFijoSIG) - - Session("FileUpload") = .Banner - Session("FileUpload") = .ArchivoKey - Session("FileUpload") = .ArchivoCer - Session("FileUpload") = .ArchivoPfx - End With - InicializaClasificacionIVA(ObjEmpresas) - Else - Alert("La Empresa Solicitada no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia) - BtnGuardar.Enabled = False - - End If - End If - - ObjEmpresas.Dispose() - CargarGrupoEmpresas() - UpDatos.Update() - End Sub - Protected Sub CargarGrupoEmpresas() - Dim ObjEmpresas As New ClsSisEmpresas() - - 'Gridview - ObjEmpresas.GetEmpresasGrupos(CveEmpresa) - GVGrupoEmpresas.DataSource = ObjEmpresas.DtResultados - GVGrupoEmpresas.DataBind() - - 'DropdownList Empresas - ObjEmpresas.GetEmpresasGruposNot(CveEmpresa) - DdlEmpresas.Items.Clear() - DdlEmpresas.DataSource = ObjEmpresas.DtResultados - DdlEmpresas.DataBind() - - ObjEmpresas.Dispose() - - updategrupoempresa.Update() - End Sub - Protected Sub LinkButton1_Click(sender As Object, e As EventArgs) Handles AddGrupoEmpresa.Click - - Dim ObjEmpresas As New ClsSisEmpresas() - ObjEmpresas.AddEmpresasGrupos(CveEmpresa, DdlEmpresas.SelectedValue.ToEntero) - ObjEmpresas.Dispose() - CargarGrupoEmpresas() - End Sub - Protected Sub GrupoEmpresas_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GVGrupoEmpresas.RowDeleting - Dim ObjEmpresas As New ClsSisEmpresas() - ObjEmpresas.RemoveEmpresasGrupos(CveEmpresa, CType(GVGrupoEmpresas.Rows(e.RowIndex).FindControl("GVColCVeEmpresa"), HiddenField).Value.ToEntero()) - ObjEmpresas.Dispose() - CargarGrupoEmpresas() - End Sub - Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click - Dim ObjEmpresas As New ClsSisEmpresas - Dim ObjGral As New ClsGenerales() - Dim ObjContPAQ As ClsContPAQi = Nothing - Dim Indicador As New ClsIndicadores(ObjEmpresas.IniciaTransacSQL()) - - Dim TextoError = "" - Dim TextoOK = "" - - If CveEmpresa = -1 Then - If ObjEmpresas.AddEmpresa(TxtCveEmpresa.Text.Trim.ToEntero, TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, - TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim.ToEntero, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim, - DdlTipoFacturacion.SelectedValue, TxtBIUsuario.Text.Trim, TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, - TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", UsuarioActual.CveUsuario, ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, - ChkMostrarRetISR.Checked, "-1", ChkEstatusFacturacion.Checked, TxtSendMail.Text.Trim, TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim, - TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked, ChkUsaVentas.Checked, ChkUsaCxC.Checked, - ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim, TxtServerContPAQi.Text.Trim, - TxtUsrContPAQi.Text.Trim, TxtPwdContPAQi.Text.Trim, TxtBuzon_Mail.Text.Trim, TxtBuzon_Server.Text.Trim, TxtBuzon_Puerto.Text.Trim.ToEntero, ChkBuzon_SSL.Checked, - TxtBuzon_USR.Text.Trim, TxtBuzon_PWD.Text.Trim, DdlProtocolo.SelectedValue, TxtMailSoporte.Text.Trim, TxtServidorSoporte.Text.Trim, TxtPuertoSoporte.Text.Trim.ToEntero, ChkSSLSoporte.Checked, - TxtUsuarioSoporte.Text.Trim, TxtContraseñaSoporte.Text.Trim, DdlProtocoloSoporte.SelectedValue, - "".Trim, TxtAreaGeografica.Text.Trim, - TxtNombreCorto.Text, TxtCURP.Text.Trim, DdlRegimen.SelectedValue.ToEntero, TxtImporte.Text.ToDecimal, TxtCIEC.Text, DdlPlataforma.SelectedValue.ToEntero, ChkUsaAC.Checked, - TxtPorDepreciacion.Text.ToDecimal, TxtExtension.Text, TxtLocalidad.Text, DdlMetodoInventario.SelectedValue.ToEntero, ChkAsientoContable.Checked, TxtPeriodoActual.Text.ToEntero, - TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, DdlTerminalTipo.SelectedValue.ToEntero, CvePAC:=DdlCvePac.SelectedValue.ToEntero - ) Then - - 'Movemos el Archivo Fisicamente - If Session("FileUpload") IsNot Nothing AndAlso Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) Then - Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) - File.Move(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Banners\" & ObjEmpresas.CveEmpresa.ToString & Extension) - - End If - ViewState("CveEmpresa") = ObjEmpresas.CveEmpresa - 'InicializaClasificacionIVA(ObjEmpresas) - TextoOK = "La nueva Empresa se guardó correctamente." - Else - TextoError = "Ocurrió un error al agregar la empresa" - End If - - - - 'Agregar Indicadores - For Each Row As GridViewRow In GvIndicadores.Rows - If Row.DataKey("CveIndicador") <> "" And Row.DataKey("CveEmpresa") = "" Then - If Row.FCCheckBox("chkIndicador").Checked Then - If Not Indicador.AddIndicadorEmpresa(Row.DataKey("CveIndicador").ToEntero, UsuarioActual.CveEmpresa) Then - Exit For - End If - End If - End If - Next - - - - - Else - If ObjEmpresas.UpdateEmpresa(TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim, - TxtCP.Text.Trim.ToEntero, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim, DdlTipoFacturacion.SelectedItem.ToString, TxtBIUsuario.Text.Trim, - TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", ChkEstatus.Checked, - ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, ChkMostrarRetISR.Checked, "-1", ChkEstatusFacturacion.Checked, TxtSendMail.Text.Trim, - TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim, TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked, - ChkUsaVentas.Checked, ChkUsaCxC.Checked, ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim, - TxtServerContPAQi.Text.Trim, TxtUsrContPAQi.Text.Trim, TxtPwdContPAQi.Text.Trim, TxtBuzon_Mail.Text.Trim, TxtBuzon_Server.Text.Trim, TxtBuzon_Puerto.Text.Trim.ToEntero, - ChkBuzon_SSL.Checked, TxtBuzon_USR.Text.Trim, TxtBuzon_PWD.Text.Trim, TxtCveEmpresa.Text.Trim.ToEntero, DdlProtocolo.SelectedValue, - TxtMailSoporte.Text.Trim, TxtServidorSoporte.Text.Trim, TxtPuertoSoporte.Text.Trim.ToEntero, ChkSSLSoporte.Checked, - TxtUsuarioSoporte.Text.Trim, TxtContraseñaSoporte.Text.Trim, DdlProtocoloSoporte.SelectedValue, DdlIVAxAcreditar.SelectedValue.ToEntero, - DdlIVAAcreditable.SelectedValue.ToEntero, DdlIVAxTrasladar.SelectedValue.ToEntero, DdlIVATrasladado.SelectedValue.ToEntero, DdlIVARetenciones.SelectedValue.ToEntero, - DdlISRCirculacion.SelectedValue.ToEntero, DdlCuentaOtrosIngresos.SelectedValue.ToEntero, DdlCuentaDescuentoVenta.SelectedValue.ToEntero, "", TxtAreaGeografica.Text.Trim, DdlCuentaPerdidaCambiaria.SelectedValue.ToEntero, - DddlCuentaGananciaCambiaria.SelectedValue.ToEntero, TxtNombreCorto.Text, TxtCURP.Text.Trim, DdlRegimen.SelectedValue.ToEntero, DdlCvePac.SelectedValue.ToEntero, - TxtImporte.Text.ToDecimal, TxtCIEC.Text, DdlPlataforma.SelectedValue.ToEntero, ChkUsaAC.Checked, - TxtPorDepreciacion.Text.ToDecimal, TxtExtension.Text, TxtLocalidad.Text, DdlMetodoInventario.SelectedValue.ToEntero, ChkAsientoContable.Checked, TxtPeriodoActual.Text.ToEntero, - TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, DdlTerminalTipo.SelectedValue.ToEntero, IdCuentaDSV:=DdlDSV.SelectedValue.ToEntero, - IdCuentaImpuestosLocales:=DdlImpuestosLocales.SelectedValue.ToEntero, IdCuentaIEPSxAcreditar:=DdlIEPSxAcreditar.SelectedValue.ToEntero, IdCuentaIEPSAcreditable:=DdlIEPSAcreditable.SelectedValue.ToEntero, - IdCuentaIEPSxTrasladar:=DdlIEPSxTrasladar.SelectedValue.ToEntero, IdCuentaIEPSTrasladado:=DdlIEPSTrasladado.SelectedValue.ToEntero) Then - - 'Movemos el Archivo Fisicamente - If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) Then - Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) - If File.Exists(Request.PhysicalApplicationPath + "Banners\" & CveEmpresa & Extension) Then - File.Delete(Request.PhysicalApplicationPath + "Banners\" & CveEmpresa & Extension) - File.Move(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Banners\" & CveEmpresa & Extension) - Else - File.Move(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Banners\" & CveEmpresa & Extension) - End If - End If - - TextoOK = "Los cambios de guardaron correctamente." - Else - TextoError = "Ocurrió un error al guardar los cambios de la empresa" - End If - - 'Agregar Indicadores - For Each Row As GridViewRow In GvIndicadores.Rows - If Row.DataKey("CveIndicador") <> "" AndAlso Row.DataKey("CveEmpresa") <> "" And Row.FCCheckBox("chkIndicador").Checked = False Then - If Not Indicador.RemoveIndicadoresEmpresas(Row.DataKey("CveIndicador").ToEntero, UsuarioActual.CveEmpresa) Then - Exit For - End If - End If - - If Row.DataKey("CveIndicador") <> "" And Row.DataKey("CveEmpresa") = "" Then - If Row.FCCheckBox("chkIndicador").Checked Then - If Not Indicador.AddIndicadorEmpresa(Row.DataKey("CveIndicador").ToEntero, UsuarioActual.CveEmpresa) Then - Exit For - End If - End If - End If - Next - - End If - - 'CLASIFICACIONES DE IVAS - If DtClasificacionIVA IsNot Nothing OrElse DtClasificacionIVA.Rows.Count > 0 Then - For Each Dr As DataRow In DtClasificacionIVA.Rows - If Not Dr("CveClasificacion").ToString.ToEntero > 0 Then - If Not ObjGral.RemoveClasificacionPorcentaje(Dr("CveClasificacionPorcentaje").ToString.ToEntero) Then - TextoError = "Ocurrió un error al guardar los cambios de la empresa" - End If - ElseIf Dr("CveClasificacionPorcentaje").ToString.ToEntero = 0 Then - If Not ObjGral.AddClasificacionPorcentaje(Dr("CveClasificacion").ToString.ToEntero, Dr("PorcentajeIVA").ToString.ToDouble, - Dr("IdCtaIVAXAcreditar").ToString.ToEntero, Dr("IdCtaIVAAcreditable").ToString.ToEntero, - Dr("IdCtaIVAXTrasladar").ToString.ToEntero, Dr("IdCtaIVATrasladado").ToString.ToEntero, CveEmpresa) Then - TextoError = "Ocurrió un error al guardar los cambios de la empresa" - End If - ElseIf Dr("CveClasificacionPorcentaje").ToString.ToEntero > 0 Then - If Not ObjGral.UpdateClasificacionPorcentaje(Dr("CveClasificacionPorcentaje").ToString.ToEntero, Dr("CveClasificacion").ToString.ToEntero, Dr("PorcentajeIVA").ToString.ToDouble, - Dr("IdCtaIVAXAcreditar").ToString.ToEntero, Dr("IdCtaIVAAcreditable").ToString.ToEntero, - Dr("IdCtaIVAXTrasladar").ToString.ToEntero, Dr("IdCtaIVATrasladado").ToString.ToEntero) Then - TextoError = "Ocurrió un error al guardar los cambios de la empresa" - End If - End If - Next - End If - - 'RECARGA EMPRESA - If TextoError = "" Then - If ObjEmpresas.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then - GlobalDTEmpresas(CveEmpresa) = Nothing - - 'verifico si existe la carpeta de la empresa, sino la crea - For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows - If Not IO.Directory.Exists(String.Format("{0}\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa"))) Then - IO.Directory.CreateDirectory(String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa"))) - End If - Next - End If - - ' GlobalDTClasificacionPorcentaje(CveEmpresa) = Nothing - - End If - - 'AGREGAR FUNCIONALIDADES - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 201, DdlProveedores) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 211, DdlClientes) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 208, DdlInventario) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 216, DdlGasto) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 209, DdlBancos) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 205, DdlDeudores) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 202, DdlAcreedores) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 203, DdlDocxPagar) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 212, DdlAnticipoCliente) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 204, DdlAnticipoProveedores) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 218, DdlCaja) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 215, DdlFyE) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 221, DdlActivoFijo) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 246, DdlClientes) - If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 237, DdlAnticipoCliente) - - ''AGREGAR FUNCIONALIDADES - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 232, DdlProveedoresSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 233, DdlClientesSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 239, DdlInventarioSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 240, DdlGastoSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 241, DdlBancosSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 234, DdlDeudoresSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 235, DdlAcreedoresSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 236, DdlDocxPagarSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 237, DdlAnticipoClienteSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 238, DdlAnticipoProveedoresSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 242, DdlCajaSIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 243, DdlFyESIG) - 'If TextoError = "" Then TextoError = AgregarFuncionalidad(ObjEmpresas, 244, DdlActivoFijoSIG) - - 'TRIGGER - If TextoError = "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" Then - - If UsuarioActual.Empresa.UsaContabilidad Then - - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - 'CREA OBJETO EMPRESA - If ObjEmpresas.GetEmpresas(TxtCveEmpresa.Text.ToEntero, "-1", "-1", "-1", "-1") Then - Dim Empresa As New Empresa - Empresa = ObjEmpresas.Empresa - - ObjContPAQ = New ClsContPAQi(Empresa) - - If ObjContPAQ.Conectado Then - 'ADD - If BDContPAQ = "" Then - If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then - TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos" - End If - End If - - 'UPDATE - If BDContPAQ <> "" And (BDContPAQ <> TxtBDContPAQi.Text.Trim Or ServerContPAQ <> TxtServerContPAQi.Text.Trim) Then - If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then - TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos" - End If - End If - Else - TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos" - End If - End If - End If - - Else - Alert("La empresa tiene la información para el uso de contabilidad pero no se tiene activada", TipoMensaje.MsgAdvertencia) - End If - End If - - If TextoError = "" Then - ObjEmpresas.Commit() - If ObjContPAQ IsNot Nothing Then ObjContPAQ.Commit() - Alert(TextoOK, TipoMensaje.MsgInformacion, "document.location.href=""/Sistemas/Empresa.aspx?CveEmpresa=" & TxtCveEmpresa.Text.Trim & """;") - Session("FileUpload") = "" - CargaDatos() - UpDatos.Update() - Else - ObjEmpresas.RollBack() - If ObjContPAQ IsNot Nothing Then ObjContPAQ.RollBack() - Alert(TextoError, TipoMensaje.MsgError) - End If - - ObjEmpresas.Dispose() - ObjGral.Dispose() - If ObjContPAQ IsNot Nothing Then ObjContPAQ.Dispose() - End Sub - Private Function AgregarFuncionalidad(ObjEmpresas As ClsSisEmpresas, CveFuncionalidad As Integer, ByRef Ddl As DropDownList) As String - Dim Retorno = "" - - If Not ObjEmpresas.AddUpdateEmpresaFuncionalidades(TxtCveEmpresa.Text.Trim.ToEntero, CveFuncionalidad, Ddl.SelectedValue) Then - Retorno = "Ocurrió un error al vincular la cuenta contable" - End If - - Return Retorno - End Function - Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click - Dim ObjEmpresas As New ClsSisEmpresas - If ObjEmpresas.RemoveEmpresa(CveEmpresa) Then - GlobalDTEmpresas = ObjEmpresas.DtResultados - Alert("La Empresa se Eliminó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Sistemas/Empresa.aspx"";") - End If - ObjEmpresas.Dispose() - End Sub - - 'Nuevo Código - Private Sub CargaCuentasContables(Optional IdCuentaPadre As Integer = -1) - DtCuentasContables = Nothing - - If UsuarioActual.Empresa.UsaContabilidad Then - Dim ObjEmpresa As New ClsSisEmpresas - Dim Empresa As Empresa = Nothing - If ObjEmpresa.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then - - Empresa = ObjEmpresa.Empresa - - If Empresa.TipoContabilidad = 2 Then - Dim ObjContabilidad As New ClsContPAQi(Empresa) - If ObjContabilidad.GetCuentas(-1, "-1", -1, IdPadre:=IdCuentaPadre) Then - DtCuentasContables = ObjContabilidad.DtResultados - End If - ObjContabilidad.Dispose() - End If - - - - End If - ObjEmpresa.Dispose() - End If - End Sub - - Private Sub CargaCuentasContablesSIG(Optional IdCuentaPadre As Integer = -1) - DtCuentasContablesSIG = Nothing - - Dim ObjEmpresa As New ClsSisEmpresas - Dim Empresa As Empresa = Nothing - If ObjEmpresa.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then - Empresa = ObjEmpresa.Empresa - Dim ObjContabilidad As New ClsContabilidad - If ObjContabilidad.GetCuentas(-1, "-1", -1, CveEmpresa, CvePadre:=IdCuentaPadre) Then - DtCuentasContablesSIG = ObjContabilidad.DtResultados - End If - ObjContabilidad.Dispose() - End If - ObjEmpresa.Dispose() - End Sub - - Protected Sub BtnCargarCuentas_Click(sender As Object, e As EventArgs) Handles BtnCargarCuentas.Click - If DtCuentasContables Is Nothing Then - - End If - Dim Seleccionado As String - Select Case HdnCuenta.Value - Case "1" - If DdlIVAxAcreditar.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlIVAxAcreditar.SelectedValue - DdlIVAxAcreditar.Items.Clear() : DdlIVAxAcreditar.Items.Add(New ListItem("Seleccione", "0")) - DdlIVAxAcreditar.DataSource = DtCuentasContables : DdlIVAxAcreditar.DataBind() : DdlIVAxAcreditar.SelectedValueExist(Seleccionado) - DdlIVAxAcreditar.AutoPostBack = False : DdlIVAxAcreditar.Attributes.Remove("onclick") : DdlIVAxAcreditar.CssClass &= " select2me" - Case "2" - If DdlIVAAcreditable.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlIVAAcreditable.SelectedValue - DdlIVAAcreditable.Items.Clear() : DdlIVAAcreditable.Items.Add(New ListItem("Seleccione", "0")) - DdlIVAAcreditable.DataSource = DtCuentasContables : DdlIVAAcreditable.DataBind() : DdlIVAAcreditable.SelectedValue = Seleccionado - DdlIVAAcreditable.AutoPostBack = False : DdlIVAAcreditable.Attributes.Remove("onclick") : DdlIVAAcreditable.CssClass &= " select2me" - Case "3" - If DdlIVAxTrasladar.Attributes("onclick") <> "" Then CargaCuentasContables(-1) - Seleccionado = DdlIVAxTrasladar.SelectedValue - DdlIVAxTrasladar.Items.Clear() : DdlIVAxTrasladar.Items.Add(New ListItem("Seleccione", "0")) - DdlIVAxTrasladar.DataSource = DtCuentasContables : DdlIVAxTrasladar.DataBind() : DdlIVAxTrasladar.SelectedValue = Seleccionado - DdlIVAxTrasladar.AutoPostBack = False : DdlIVAxTrasladar.Attributes.Remove("onclick") : DdlIVAxTrasladar.CssClass &= " select2me" - Case "4" - If DdlIVATrasladado.Attributes("onclick") <> "" Then CargaCuentasContables(-1) - Seleccionado = DdlIVATrasladado.SelectedValue - DdlIVATrasladado.Items.Clear() : DdlIVATrasladado.Items.Add(New ListItem("Seleccione", "0")) - DdlIVATrasladado.DataSource = DtCuentasContables : DdlIVATrasladado.DataBind() : DdlIVATrasladado.SelectedValue = Seleccionado - DdlIVATrasladado.AutoPostBack = False : DdlIVATrasladado.Attributes.Remove("onclick") : DdlIVATrasladado.CssClass &= " select2me" - Case "5" - If DdlIVARetenciones.Attributes("onclick") <> "" Then CargaCuentasContables(-1) - Seleccionado = DdlIVARetenciones.SelectedValue - DdlIVARetenciones.Items.Clear() : DdlIVARetenciones.Items.Add(New ListItem("Seleccione", "0")) - DdlIVARetenciones.DataSource = DtCuentasContables : DdlIVARetenciones.DataBind() : DdlIVARetenciones.SelectedValue = Seleccionado - DdlIVARetenciones.AutoPostBack = False : DdlIVARetenciones.Attributes.Remove("onclick") : DdlIVARetenciones.CssClass &= " select2me" - Case "6" - If DdlISRCirculacion.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlISRCirculacion.SelectedValue - DdlISRCirculacion.Items.Clear() : DdlISRCirculacion.Items.Add(New ListItem("Seleccione", "0")) - DdlISRCirculacion.DataSource = DtCuentasContables : DdlISRCirculacion.DataBind() : DdlISRCirculacion.SelectedValue = Seleccionado - DdlISRCirculacion.AutoPostBack = False : DdlISRCirculacion.Attributes.Remove("onclick") : DdlISRCirculacion.CssClass &= " select2me" - Case "7" - If DdlProveedores.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlProveedores.SelectedValue - DdlProveedores.Items.Clear() : DdlProveedores.Items.Add(New ListItem("Seleccione", "0")) - DdlProveedores.DataSource = DtCuentasContables : DdlProveedores.DataBind() : DdlProveedores.SelectedValueExist(Seleccionado) - DdlProveedores.AutoPostBack = False : DdlProveedores.Attributes.Remove("onclick") : DdlProveedores.CssClass &= " select2me" - Case "8" - If DdlClientes.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlClientes.SelectedValue - DdlClientes.Items.Clear() : DdlClientes.Items.Add(New ListItem("Seleccione", "0")) - DdlClientes.DataSource = DtCuentasContables : DdlClientes.DataBind() : DdlClientes.SelectedValueExist(Seleccionado) - DdlClientes.AutoPostBack = False : DdlClientes.Attributes.Remove("onclick") : DdlClientes.CssClass &= " select2me" - Case "9" - If DdlInventario.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlInventario.SelectedValue - DdlInventario.Items.Clear() : DdlInventario.Items.Add(New ListItem("Seleccione", "0")) - DdlInventario.DataSource = DtCuentasContables : DdlInventario.DataBind() : DdlInventario.SelectedValue = Seleccionado - DdlInventario.AutoPostBack = False : DdlInventario.Attributes.Remove("onclick") : DdlInventario.CssClass &= " select2me" - Case "10" - If DdlGasto.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlGasto.SelectedValue - DdlGasto.Items.Clear() : DdlGasto.Items.Add(New ListItem("Seleccione", "0")) - DdlGasto.DataSource = DtCuentasContables : DdlGasto.DataBind() : DdlGasto.SelectedValue = Seleccionado - DdlGasto.AutoPostBack = False : DdlGasto.Attributes.Remove("onclick") : DdlGasto.CssClass &= " select2me" - Case "11" - If DdlBancos.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlBancos.SelectedValue - DdlBancos.Items.Clear() : DdlBancos.Items.Add(New ListItem("Seleccione", "0")) - DdlBancos.DataSource = DtCuentasContables : DdlBancos.DataBind() : DdlBancos.SelectedValue = Seleccionado - DdlBancos.AutoPostBack = False : DdlBancos.Attributes.Remove("onclick") : DdlBancos.CssClass &= " select2me" - Case "12" - If DdlDeudores.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlDeudores.SelectedValue - DdlDeudores.Items.Clear() : DdlDeudores.Items.Add(New ListItem("Seleccione", "0")) - DdlDeudores.DataSource = DtCuentasContables : DdlDeudores.DataBind() : DdlDeudores.SelectedValue = Seleccionado - DdlDeudores.AutoPostBack = False : DdlDeudores.Attributes.Remove("onclick") : DdlDeudores.CssClass &= " select2me" - Case "13" - If DdlAcreedores.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlAcreedores.SelectedValue - DdlAcreedores.Items.Clear() : DdlAcreedores.Items.Add(New ListItem("Seleccione", "0")) - DdlAcreedores.DataSource = DtCuentasContables : DdlAcreedores.DataBind() : DdlAcreedores.SelectedValue = Seleccionado - DdlAcreedores.AutoPostBack = False : DdlAcreedores.Attributes.Remove("onclick") : DdlAcreedores.CssClass &= " select2me" - Case "14" - If DdlDocxPagar.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlDocxPagar.SelectedValue - DdlDocxPagar.Items.Clear() : DdlDocxPagar.Items.Add(New ListItem("Seleccione", "0")) - DdlDocxPagar.DataSource = DtCuentasContables : DdlDocxPagar.DataBind() : DdlDocxPagar.SelectedValue = Seleccionado - DdlDocxPagar.AutoPostBack = False : DdlDocxPagar.Attributes.Remove("onclick") : DdlDocxPagar.CssClass &= " select2me" - Case "15" - If DdlAnticipoCliente.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlAnticipoCliente.SelectedValue - DdlAnticipoCliente.Items.Clear() : DdlAnticipoCliente.Items.Add(New ListItem("Seleccione", "0")) - DdlAnticipoCliente.DataSource = DtCuentasContables : DdlAnticipoCliente.DataBind() : DdlAnticipoCliente.SelectedValue = Seleccionado - DdlAnticipoCliente.AutoPostBack = False : DdlAnticipoCliente.Attributes.Remove("onclick") : DdlAnticipoCliente.CssClass &= " select2me" - Case "16" - If DdlAnticipoProveedores.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlAnticipoProveedores.SelectedValue - DdlAnticipoProveedores.Items.Clear() : DdlAnticipoProveedores.Items.Add(New ListItem("Seleccione", "0")) - DdlAnticipoProveedores.DataSource = DtCuentasContables : DdlAnticipoProveedores.DataBind() : DdlAnticipoProveedores.SelectedValue = Seleccionado - DdlAnticipoProveedores.AutoPostBack = False : DdlAnticipoProveedores.Attributes.Remove("onclick") : DdlAnticipoProveedores.CssClass &= " select2me" - Case "17" - If DdlCaja.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlCaja.SelectedValue - DdlCaja.Items.Clear() : DdlCaja.Items.Add(New ListItem("Seleccione", "0")) - DdlCaja.DataSource = DtCuentasContables : DdlCaja.DataBind() : DdlCaja.SelectedValue = Seleccionado - DdlCaja.AutoPostBack = False : DdlCaja.Attributes.Remove("onclick") : DdlCaja.CssClass &= " select2me" - Case "18" - If DdlFyE.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlFyE.SelectedValue - DdlFyE.Items.Clear() : DdlFyE.Items.Add(New ListItem("Seleccione", "0")) - DdlFyE.DataSource = DtCuentasContables : DdlFyE.DataBind() : DdlFyE.SelectedValue = Seleccionado - DdlFyE.AutoPostBack = False : DdlFyE.Attributes.Remove("onclick") : DdlFyE.CssClass &= " select2me" - Case "19" - If DddlCuentaGananciaCambiaria.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DddlCuentaGananciaCambiaria.SelectedValue - DddlCuentaGananciaCambiaria.Items.Clear() : DddlCuentaGananciaCambiaria.Items.Add(New ListItem("Seleccione", "0")) - DddlCuentaGananciaCambiaria.DataSource = DtCuentasContables : DddlCuentaGananciaCambiaria.DataBind() : DddlCuentaGananciaCambiaria.SelectedValueExist(Seleccionado) - DddlCuentaGananciaCambiaria.AutoPostBack = False : DddlCuentaGananciaCambiaria.Attributes.Remove("onclick") : DddlCuentaGananciaCambiaria.CssClass &= " select2me" - Case "20" - If DdlCuentaPerdidaCambiaria.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlCuentaPerdidaCambiaria.SelectedValue - DdlCuentaPerdidaCambiaria.Items.Clear() : DdlCuentaPerdidaCambiaria.Items.Add(New ListItem("Seleccione", "0")) - DdlCuentaPerdidaCambiaria.DataSource = DtCuentasContables : DdlCuentaPerdidaCambiaria.DataBind() : DdlCuentaPerdidaCambiaria.SelectedValue = Seleccionado - DdlCuentaPerdidaCambiaria.AutoPostBack = False : DdlCuentaPerdidaCambiaria.Attributes.Remove("onclick") : DdlCuentaPerdidaCambiaria.CssClass &= " select2me" - - 'CUENTAS PADRES - - Case "21" - If DdlProveedores.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlProveedores.SelectedValue - DdlProveedores.Items.Clear() : DdlProveedores.Items.Add(New ListItem("Seleccione", "0")) - DdlProveedores.DataSource = DtCuentasContables : DdlProveedores.DataBind() : DdlProveedores.SelectedValue = Seleccionado - DdlProveedores.AutoPostBack = False : DdlProveedores.Attributes.Remove("onclick") : DdlProveedores.CssClass &= " select2me" - Case "22" - If DdlClientes.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlClientes.SelectedValue - DdlClientes.Items.Clear() : DdlClientes.Items.Add(New ListItem("Seleccione", "0")) - DdlClientes.DataSource = DtCuentasContables : DdlClientes.DataBind() : DdlClientes.SelectedValue = Seleccionado - DdlClientes.AutoPostBack = False : DdlClientes.Attributes.Remove("onclick") : DdlClientes.CssClass &= " select2me" - Case "23" - If DdlInventario.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlInventario.SelectedValue - DdlInventario.Items.Clear() : DdlInventario.Items.Add(New ListItem("Seleccione", "0")) - DdlInventario.DataSource = DtCuentasContables : DdlInventario.DataBind() : DdlInventario.SelectedValue = Seleccionado - DdlInventario.AutoPostBack = False : DdlInventario.Attributes.Remove("onclick") : DdlInventario.CssClass &= " select2me" - Case "24" - If DdlGasto.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlGasto.SelectedValue - DdlGasto.Items.Clear() : DdlGasto.Items.Add(New ListItem("Seleccione", "0")) - DdlGasto.DataSource = DtCuentasContables : DdlGasto.DataBind() : DdlGasto.SelectedValue = Seleccionado - DdlGasto.AutoPostBack = False : DdlGasto.Attributes.Remove("onclick") : DdlGasto.CssClass &= " select2me" - Case "25" - If DdlBancos.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlBancos.SelectedValue - DdlBancos.Items.Clear() : DdlBancos.Items.Add(New ListItem("Seleccione", "0")) - DdlBancos.DataSource = DtCuentasContables : DdlBancos.DataBind() : DdlBancos.SelectedValue = Seleccionado - DdlBancos.AutoPostBack = False : DdlBancos.Attributes.Remove("onclick") : DdlBancos.CssClass &= " select2me" - Case "26" - If DdlDeudores.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlDeudores.SelectedValue - DdlDeudores.Items.Clear() : DdlDeudores.Items.Add(New ListItem("Seleccione", "0")) - DdlDeudores.DataSource = DtCuentasContables : DdlDeudores.DataBind() : DdlDeudores.SelectedValue = Seleccionado - DdlDeudores.AutoPostBack = False : DdlDeudores.Attributes.Remove("onclick") : DdlDeudores.CssClass &= " select2me" - Case "27" - If DdlAcreedores.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlAcreedores.SelectedValue - DdlAcreedores.Items.Clear() : DdlAcreedores.Items.Add(New ListItem("Seleccione", "0")) - DdlAcreedores.DataSource = DtCuentasContables : DdlAcreedores.DataBind() : DdlAcreedores.SelectedValue = Seleccionado - DdlAcreedores.AutoPostBack = False : DdlAcreedores.Attributes.Remove("onclick") : DdlAcreedores.CssClass &= " select2me" - Case "28" - If DdlDocxPagar.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlDocxPagar.SelectedValue - DdlDocxPagar.Items.Clear() : DdlDocxPagar.Items.Add(New ListItem("Seleccione", "0")) - DdlDocxPagar.DataSource = DtCuentasContables : DdlDocxPagar.DataBind() : DdlDocxPagar.SelectedValue = Seleccionado - DdlDocxPagar.AutoPostBack = False : DdlDocxPagar.Attributes.Remove("onclick") : DdlDocxPagar.CssClass &= " select2me" - Case "29" - If DdlAnticipoCliente.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlAnticipoCliente.SelectedValue - DdlAnticipoCliente.Items.Clear() : DdlAnticipoCliente.Items.Add(New ListItem("Seleccione", "0")) - DdlAnticipoCliente.DataSource = DtCuentasContables : DdlAnticipoCliente.DataBind() : DdlAnticipoCliente.SelectedValue = Seleccionado - DdlAnticipoCliente.AutoPostBack = False : DdlAnticipoCliente.Attributes.Remove("onclick") : DdlAnticipoCliente.CssClass &= " select2me" - Case "30" - If DdlAnticipoProveedores.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlAnticipoProveedores.SelectedValue - DdlAnticipoProveedores.Items.Clear() : DdlAnticipoProveedores.Items.Add(New ListItem("Seleccione", "0")) - DdlAnticipoProveedores.DataSource = DtCuentasContables : DdlAnticipoProveedores.DataBind() : DdlAnticipoProveedores.SelectedValue = Seleccionado - DdlAnticipoProveedores.AutoPostBack = False : DdlAnticipoProveedores.Attributes.Remove("onclick") : DdlAnticipoProveedores.CssClass &= " select2me" - Case "31" - If DdlCaja.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlCaja.SelectedValue - DdlCaja.Items.Clear() : DdlCaja.Items.Add(New ListItem("Seleccione", "0")) - DdlCaja.DataSource = DtCuentasContables : DdlCaja.DataBind() : DdlCaja.SelectedValue = Seleccionado - DdlCaja.AutoPostBack = False : DdlCaja.Attributes.Remove("onclick") : DdlCaja.CssClass &= " select2me" - Case "32" - If DdlFyE.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlFyE.SelectedValue - DdlFyE.Items.Clear() : DdlFyE.Items.Add(New ListItem("Seleccione", "0")) - DdlFyE.DataSource = DtCuentasContables : DdlFyE.DataBind() : DdlFyE.SelectedValue = Seleccionado - DdlFyE.AutoPostBack = False : DdlFyE.Attributes.Remove("onclick") : DdlFyE.CssClass &= " select2me" - Case "33" - If DdlActivoFijo.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlActivoFijo.SelectedValue - DdlActivoFijo.Items.Clear() : DdlActivoFijo.Items.Add(New ListItem("Seleccione", "0")) - DdlActivoFijo.DataSource = DtCuentasContables : DdlActivoFijo.DataBind() : DdlActivoFijo.SelectedValue = Seleccionado - DdlActivoFijo.AutoPostBack = False : DdlActivoFijo.Attributes.Remove("onclick") : DdlActivoFijo.CssClass &= " select2me" - Case "34" - If DdlDSV.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlDSV.SelectedValue - DdlDSV.Items.Clear() : DdlDSV.Items.Add(New ListItem("Seleccione", "0")) - DdlDSV.DataSource = DtCuentasContables : DdlDSV.DataBind() : DdlDSV.SelectedValue = Seleccionado - DdlDSV.AutoPostBack = False : DdlDSV.Attributes.Remove("onclick") : DdlDSV.CssClass &= " select2me" - Case "35" - If DdlImpuestosLocales.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlImpuestosLocales.SelectedValue - DdlImpuestosLocales.Items.Clear() : DdlImpuestosLocales.Items.Add(New ListItem("Seleccione", "0")) - DdlImpuestosLocales.DataSource = DtCuentasContables : DdlImpuestosLocales.DataBind() : DdlImpuestosLocales.SelectedValue = Seleccionado - DdlImpuestosLocales.AutoPostBack = False : DdlImpuestosLocales.Attributes.Remove("onclick") : DdlImpuestosLocales.CssClass &= " select2me" - - - 'IEPS - Case "36" - If DdlIEPSxAcreditar.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlIEPSxAcreditar.SelectedValue - DdlIEPSxAcreditar.Items.Clear() : DdlIEPSxAcreditar.Items.Add(New ListItem("Seleccione", "0")) - DdlIEPSxAcreditar.DataSource = DtCuentasContables : DdlIEPSxAcreditar.DataBind() : DdlIEPSxAcreditar.SelectedValue = Seleccionado - DdlIEPSxAcreditar.AutoPostBack = False : DdlIEPSxAcreditar.Attributes.Remove("onclick") : DdlIEPSxAcreditar.CssClass &= " select2me" - - Case "37" - If DdlIEPSAcreditable.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlIEPSAcreditable.SelectedValue - DdlIEPSAcreditable.Items.Clear() : DdlIEPSAcreditable.Items.Add(New ListItem("Seleccione", "0")) - DdlIEPSAcreditable.DataSource = DtCuentasContables : DdlIEPSAcreditable.DataBind() : DdlIEPSAcreditable.SelectedValue = Seleccionado - DdlIEPSAcreditable.AutoPostBack = False : DdlIEPSAcreditable.Attributes.Remove("onclick") : DdlIEPSAcreditable.CssClass &= " select2me" - Case "38" - If DdlIEPSxTrasladar.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlIEPSxTrasladar.SelectedValue - DdlIEPSxTrasladar.Items.Clear() : DdlIEPSxTrasladar.Items.Add(New ListItem("Seleccione", "0")) - DdlIEPSxTrasladar.DataSource = DtCuentasContables : DdlIEPSxTrasladar.DataBind() : DdlIEPSxTrasladar.SelectedValue = Seleccionado - DdlIEPSxTrasladar.AutoPostBack = False : DdlIEPSxTrasladar.Attributes.Remove("onclick") : DdlIEPSxTrasladar.CssClass &= " select2me" - Case "39" - If DdlIEPSTrasladado.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlIEPSTrasladado.SelectedValue - DdlIEPSTrasladado.Items.Clear() : DdlIEPSTrasladado.Items.Add(New ListItem("Seleccione", "0")) - DdlIEPSTrasladado.DataSource = DtCuentasContables : DdlIEPSTrasladado.DataBind() : DdlIEPSTrasladado.SelectedValue = Seleccionado - DdlIEPSTrasladado.AutoPostBack = False : DdlIEPSTrasladado.Attributes.Remove("onclick") : DdlIEPSTrasladado.CssClass &= " select2me" - Case "40" - If DdlCuentaDescuentoVenta.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlCuentaDescuentoVenta.SelectedValue - DdlCuentaDescuentoVenta.Items.Clear() : DdlCuentaDescuentoVenta.Items.Add(New ListItem("Seleccione", "0")) - DdlCuentaDescuentoVenta.DataSource = DtCuentasContables : DdlCuentaDescuentoVenta.DataBind() : DdlCuentaDescuentoVenta.SelectedValue = Seleccionado - DdlCuentaDescuentoVenta.AutoPostBack = False : DdlCuentaDescuentoVenta.Attributes.Remove("onclick") : DdlCuentaDescuentoVenta.CssClass &= " select2me" - Case "41" - If DdlCuentaOtrosIngresos.Attributes("onclick") <> "" Then CargaCuentasContables() - Seleccionado = DdlCuentaOtrosIngresos.SelectedValue - DdlCuentaOtrosIngresos.Items.Clear() : DdlCuentaOtrosIngresos.Items.Add(New ListItem("Seleccione", "0")) - DdlCuentaOtrosIngresos.DataSource = DtCuentasContables : DdlCuentaOtrosIngresos.DataBind() : DdlCuentaOtrosIngresos.SelectedValue = Seleccionado - DdlCuentaOtrosIngresos.AutoPostBack = False : DdlCuentaOtrosIngresos.Attributes.Remove("onclick") : DdlCuentaOtrosIngresos.CssClass &= " select2me" - - - ' 'PADRES SIG - 'Case "42" - ' If DdlProveedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlProveedoresSIG.SelectedValue - ' DdlProveedoresSIG.Items.Clear() : DdlProveedoresSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlProveedoresSIG.DataSource = DtCuentasContablesSIG : DdlProveedoresSIG.DataBind() : DdlProveedoresSIG.SelectedValue = Seleccionado - ' DdlProveedoresSIG.AutoPostBack = False : DdlProveedoresSIG.Attributes.Remove("onclick") : DdlProveedoresSIG.CssClass &= " select2me" - 'Case "43" - ' If DdlClientesSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlClientesSIG.SelectedValue - ' DdlClientesSIG.Items.Clear() : DdlClientesSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlClientesSIG.DataSource = DtCuentasContablesSIG : DdlClientesSIG.DataBind() : DdlClientesSIG.SelectedValue = Seleccionado - ' DdlClientesSIG.AutoPostBack = False : DdlClientesSIG.Attributes.Remove("onclick") : DdlClientesSIG.CssClass &= " select2me" - 'Case "44" - ' If DdlInventarioSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlInventarioSIG.SelectedValue - ' DdlInventarioSIG.Items.Clear() : DdlInventarioSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlInventarioSIG.DataSource = DtCuentasContablesSIG : DdlInventarioSIG.DataBind() : DdlInventarioSIG.SelectedValue = Seleccionado - ' DdlInventarioSIG.AutoPostBack = False : DdlInventarioSIG.Attributes.Remove("onclick") : DdlInventarioSIG.CssClass &= " select2me" - 'Case "45" - ' If DdlGastoSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlGasto.SelectedValue - ' DdlGastoSIG.Items.Clear() : DdlGastoSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlGastoSIG.DataSource = DtCuentasContablesSIG : DdlGastoSIG.DataBind() : DdlGastoSIG.SelectedValue = Seleccionado - ' DdlGastoSIG.AutoPostBack = False : DdlGastoSIG.Attributes.Remove("onclick") : DdlGastoSIG.CssClass &= " select2me" - 'Case "46" - ' If DdlBancosSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlBancosSIG.SelectedValue - ' DdlBancosSIG.Items.Clear() : DdlBancosSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlBancosSIG.DataSource = DtCuentasContablesSIG : DdlBancosSIG.DataBind() : DdlBancosSIG.SelectedValue = Seleccionado - ' DdlBancosSIG.AutoPostBack = False : DdlBancosSIG.Attributes.Remove("onclick") : DdlBancosSIG.CssClass &= " select2me" - 'Case "47" - ' If DdlDeudoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlDeudoresSIG.SelectedValue - ' DdlDeudoresSIG.Items.Clear() : DdlDeudoresSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlDeudoresSIG.DataSource = DtCuentasContablesSIG : DdlDeudoresSIG.DataBind() : DdlDeudoresSIG.SelectedValue = Seleccionado - ' DdlDeudoresSIG.AutoPostBack = False : DdlDeudoresSIG.Attributes.Remove("onclick") : DdlDeudoresSIG.CssClass &= " select2me" - 'Case "48" - ' If DdlAcreedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlAcreedoresSIG.SelectedValue - ' DdlAcreedoresSIG.Items.Clear() : DdlAcreedoresSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlAcreedoresSIG.DataSource = DtCuentasContablesSIG : DdlAcreedoresSIG.DataBind() : DdlAcreedoresSIG.SelectedValue = Seleccionado - ' DdlAcreedoresSIG.AutoPostBack = False : DdlAcreedoresSIG.Attributes.Remove("onclick") : DdlAcreedoresSIG.CssClass &= " select2me" - 'Case "49" - ' If DdlDocxPagarSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlDocxPagarSIG.SelectedValue - ' DdlDocxPagarSIG.Items.Clear() : DdlDocxPagarSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlDocxPagarSIG.DataSource = DtCuentasContablesSIG : DdlDocxPagarSIG.DataBind() : DdlDocxPagarSIG.SelectedValue = Seleccionado - ' DdlDocxPagarSIG.AutoPostBack = False : DdlDocxPagarSIG.Attributes.Remove("onclick") : DdlDocxPagarSIG.CssClass &= " select2me" - 'Case "50" - ' If DdlAnticipoClienteSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlAnticipoClienteSIG.SelectedValue - ' DdlAnticipoClienteSIG.Items.Clear() : DdlAnticipoClienteSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlAnticipoClienteSIG.DataSource = DtCuentasContablesSIG : DdlAnticipoClienteSIG.DataBind() : DdlAnticipoClienteSIG.SelectedValue = Seleccionado - ' DdlAnticipoClienteSIG.AutoPostBack = False : DdlAnticipoClienteSIG.Attributes.Remove("onclick") : DdlAnticipoClienteSIG.CssClass &= " select2me" - 'Case "51" - ' If DdlAnticipoProveedoresSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlAnticipoProveedoresSIG.SelectedValue - ' DdlAnticipoProveedoresSIG.Items.Clear() : DdlAnticipoProveedoresSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlAnticipoProveedoresSIG.DataSource = DtCuentasContablesSIG : DdlAnticipoProveedoresSIG.DataBind() : DdlAnticipoProveedoresSIG.SelectedValue = Seleccionado - ' DdlAnticipoProveedoresSIG.AutoPostBack = False : DdlAnticipoProveedoresSIG.Attributes.Remove("onclick") : DdlAnticipoProveedoresSIG.CssClass &= " select2me" - 'Case "52" - ' If DdlCajaSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlCajaSIG.SelectedValue - ' DdlCajaSIG.Items.Clear() : DdlCajaSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlCajaSIG.DataSource = DtCuentasContablesSIG : DdlCajaSIG.DataBind() : DdlCajaSIG.SelectedValue = Seleccionado - ' DdlCajaSIG.AutoPostBack = False : DdlCajaSIG.Attributes.Remove("onclick") : DdlCajaSIG.CssClass &= " select2me" - 'Case "53" - ' If DdlFyESIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlFyESIG.SelectedValue - ' DdlFyESIG.Items.Clear() : DdlFyESIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlFyESIG.DataSource = DtCuentasContablesSIG : DdlFyESIG.DataBind() : DdlFyESIG.SelectedValue = Seleccionado - ' DdlFyESIG.AutoPostBack = False : DdlFyESIG.Attributes.Remove("onclick") : DdlFyESIG.CssClass &= " select2me" - 'Case "54" - ' If DdlActivoFijoSIG.Attributes("onclick") <> "" Then CargaCuentasContablesSIG() - ' Seleccionado = DdlActivoFijoSIG.SelectedValue - ' DdlActivoFijoSIG.Items.Clear() : DdlActivoFijoSIG.Items.Add(New ListItem("Seleccione", "0")) - ' DdlActivoFijoSIG.DataSource = DtCuentasContablesSIG : DdlActivoFijoSIG.DataBind() : DdlActivoFijoSIG.SelectedValue = Seleccionado - ' DdlActivoFijoSIG.AutoPostBack = False : DdlActivoFijoSIG.Attributes.Remove("onclick") : DdlActivoFijoSIG.CssClass &= " select2me" - - - End Select - - End Sub - Public Sub CargaDDLs() - DdlIVAxAcreditar.AutoPostBack = True - DdlIVAAcreditable.AutoPostBack = True - DdlIVAxTrasladar.AutoPostBack = True - DdlIVATrasladado.AutoPostBack = True - DdlIVARetenciones.AutoPostBack = True - DdlISRCirculacion.AutoPostBack = True - DdlProveedores.AutoPostBack = True - DdlClientes.AutoPostBack = True - DdlInventario.AutoPostBack = True - DdlGasto.AutoPostBack = True - DdlBancos.AutoPostBack = True - DdlDeudores.AutoPostBack = True - DdlAcreedores.AutoPostBack = True - DdlDocxPagar.AutoPostBack = True - DdlAnticipoCliente.AutoPostBack = True - DdlAnticipoProveedores.AutoPostBack = True - DdlCaja.AutoPostBack = True - DdlFyE.AutoPostBack = True - DddlCuentaGananciaCambiaria.AutoPostBack = True - DdlCuentaPerdidaCambiaria.AutoPostBack = True - DdlActivoFijo.AutoPostBack = True - DdlIEPSxAcreditar.AutoPostBack = True - DdlIEPSAcreditable.AutoPostBack = True - DdlIEPSxTrasladar.AutoPostBack = True - DdlIEPSTrasladado.AutoPostBack = True - DdlCuentaDescuentoVenta.AutoPostBack = True - DdlCuentaOtrosIngresos.AutoPostBack = True - - ''CUENTAS PADRES SIG - 'DdlProveedoresSIG.AutoPostBack = True - 'DdlClientesSIG.AutoPostBack = True - 'DdlInventarioSIG.AutoPostBack = True - 'DdlGastoSIG.AutoPostBack = True - 'DdlBancosSIG.AutoPostBack = True - 'DdlDeudoresSIG.AutoPostBack = True - 'DdlAcreedoresSIG.AutoPostBack = True - 'DdlDocxPagarSIG.AutoPostBack = True - 'DdlAnticipoClienteSIG.AutoPostBack = True - 'DdlAnticipoProveedoresSIG.AutoPostBack = True - 'DdlCajaSIG.AutoPostBack = True - 'DdlFyESIG.AutoPostBack = True - 'DdlActivoFijoSIG.AutoPostBack = True - - - DdlIVAxAcreditar.Attributes.Add("onclick", "CargaCuentas(1);") - DdlIVAAcreditable.Attributes.Add("onclick", "CargaCuentas(2);") - DdlIVAxTrasladar.Attributes.Add("onclick", "CargaCuentas(3);") - DdlIVATrasladado.Attributes.Add("onclick", "CargaCuentas(4);") - DdlIVARetenciones.Attributes.Add("onclick", "CargaCuentas(5);") - DdlISRCirculacion.Attributes.Add("onclick", "CargaCuentas(6);") - DdlProveedores.Attributes.Add("onclick", "CargaCuentas(7);") - DdlClientes.Attributes.Add("onclick", "CargaCuentas(8);") - DdlInventario.Attributes.Add("onclick", "CargaCuentas(9);") - DdlGasto.Attributes.Add("onclick", "CargaCuentas(10);") - DdlBancos.Attributes.Add("onclick", "CargaCuentas(11);") - DdlDeudores.Attributes.Add("onclick", "CargaCuentas(12);") - DdlAcreedores.Attributes.Add("onclick", "CargaCuentas(13);") - DdlDocxPagar.Attributes.Add("onclick", "CargaCuentas(14);") - DdlAnticipoCliente.Attributes.Add("onclick", "CargaCuentas(15);") - DdlAnticipoProveedores.Attributes.Add("onclick", "CargaCuentas(16);") - DdlCaja.Attributes.Add("onclick", "CargaCuentas(17);") - DdlFyE.Attributes.Add("onclick", "CargaCuentas(18);") - DddlCuentaGananciaCambiaria.Attributes.Add("onclick", "CargaCuentas(19);") - DdlCuentaPerdidaCambiaria.Attributes.Add("onclick", "CargaCuentas(20);") - DdlActivoFijo.Attributes.Add("onclick", "CargaCuentas(33);") - DdlDSV.Attributes.Add("onclick", "CargaCuentas(34);") - DdlImpuestosLocales.Attributes.Add("onclick", "CargaCuentas(35);") - DdlIEPSxAcreditar.Attributes.Add("onclick", "CargaCuentas(36);") - DdlIEPSAcreditable.Attributes.Add("onclick", "CargaCuentas(37);") - DdlIEPSxTrasladar.Attributes.Add("onclick", "CargaCuentas(38);") - DdlIEPSTrasladado.Attributes.Add("onclick", "CargaCuentas(39);") - DdlCuentaDescuentoVenta.Attributes.Add("onclick", "CargaCuentas(40);") - DdlCuentaOtrosIngresos.Attributes.Add("onclick", "CargaCuentas(41);") - - ''CUENTAS PADRES - 'DdlProveedoresSIG.Attributes.Add("onclick", "CargaCuentas(42);") - 'DdlClientesSIG.Attributes.Add("onclick", "CargaCuentas(43);") - 'DdlInventarioSIG.Attributes.Add("onclick", "CargaCuentas(44);") - 'DdlGastoSIG.Attributes.Add("onclick", "CargaCuentas(45);") - 'DdlBancosSIG.Attributes.Add("onclick", "CargaCuentas(46);") - 'DdlDeudoresSIG.Attributes.Add("onclick", "CargaCuentas(47);") - 'DdlAcreedoresSIG.Attributes.Add("onclick", "CargaCuentas(48);") - 'DdlDocxPagarSIG.Attributes.Add("onclick", "CargaCuentas(49);") - 'DdlAnticipoClienteSIG.Attributes.Add("onclick", "CargaCuentas(50);") - 'DdlAnticipoProveedoresSIG.Attributes.Add("onclick", "CargaCuentas(51);") - 'DdlCajaSIG.Attributes.Add("onclick", "CargaCuentas(52);") - 'DdlFyESIG.Attributes.Add("onclick", "CargaCuentas(53);") - 'DdlActivoFijoSIG.Attributes.Add("onclick", "CargaCuentas(54);") - - UpDatos.Update() - - End Sub - Public Sub CargaFuncionalidad(CveFuncionalidad As Integer, ByRef Ddl As DropDownList) - Dim Dr As DataRow = DtFuncionalidades.FiltroPrimero($"CveFuncionalidad = {CveFuncionalidad}") - If Dr IsNot Nothing Then - Dim DrC As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id = {0} ", Dr("Valor").ToString)) - If Not IsNothing(DrC) Then - Ddl.Items.Add(New ListItem(DrC("CtaCodigo").ToString, Dr("Valor").ToString)) - End If - Ddl.SelectedValue = Dr("Valor").ToString - End If - - - End Sub - Private Sub CargaDdlPac() - Dim Objeto As New ClsSisEmpresas - If Objeto.GetPacs() Then - DdlCvePac.DataSource = Objeto.DtResultados - DdlCvePac.DataBind() - DdlCvePac.Items.Insert(0, New ListItem("Seleccione", "-1")) - End If - Objeto.Dispose() - End Sub - Private Sub CargaRegimenFiscal() - Dim ObjSis As New ClsSisEmpresas - If ObjSis.GetRegimenFiscal(-1) Then - DdlRegimen.DataSource = ObjSis.DtResultados - DdlRegimen.DataBind() - DdlRegimen.Items.Insert(0, New ListItem("Seleccione", "-1")) - End If - ObjSis.Dispose() - End Sub - -#Region "CONFIGURACION EMPRESA" - Private Sub ConfiguracionEmpresa() - If UsuarioActual.CveRol <> 1 Then - TabSistema.Visible = False - BtnCancelar.Visible = False - BtnEliminar.Visible = False - BiInform.Visible = False - End If - If TipoContabilidad = 2 Then - TabContabilidad.Visible = True - End If - End Sub -#End Region - -#Region "TAB - INDICADORES " - Public Sub CargaGridIndicadores() - Dim Objeto As New ClsIndicadores - If Objeto.GetEmpresasIndicadores(UsuarioActual.CveEmpresa) Then - GvIndicadores.DataSource = Objeto.DtResultados - End If - GvIndicadores.DataBind() - Objeto.Dispose() - End Sub - - Private Sub GvIndicadores_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIndicadores.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("CveEmpresa") <> "" Then - e.Row.FCCheckBox("chkIndicador").Checked = True - End If - End If - End Sub - - - -#End Region - -#Region "P L A N T I L L A C O R R E O" - - Private Sub BtnGuardarPlantilla_Click(sender As Object, e As EventArgs) Handles BtnGuardarPlantilla.Click - If UsuarioActual.Empresa.PlantillaMailVenta.Length > 0 Then - - End If - Dim ObjEmpresa As New ClsSisEmpresas() - If ObjEmpresa.UpdatePlantillaMail("AsuntoPlantillaMailVenta", TxtAsunto.Text.Trim, "PlantillaMailVenta", TxtPlantillaVenta.Text.Trim, CveEmpresa) Then - - If ObjEmpresa.UpdatePlantillaMail("AsuntoPlantillaMailVentaCotizacion", TxtAsuntoCotizacion.Text.Trim, "PlantillaMailVentaCotizacion", TxtPlantillaCotizacion.Text.Trim, CveEmpresa) Then - - End If - Alert("La plantilla de mail de ventas se guardó correctamente.", TipoMensaje.MsgInformacion) - - UsuarioActual.Empresa.PlantillaMailVenta = TxtPlantillaVenta.Text.Trim - UsuarioActual.Empresa.AsuntoPlantillaMailVenta = TxtAsunto.Text.Trim - - UsuarioActual.Empresa.AsuntoPlantillaMailVentaCotizacion = TxtPlantillaCotizacion.Text.Trim - UsuarioActual.Empresa.PlantillaMailVentaCotizacion = TxtAsuntoCotizacion.Text.Trim - - 'TxtPlantillaVenta.Text = "" - 'TxtAsunto.Text = "" - End If - ObjEmpresa.Dispose() - Alert(TxtPlantillaVenta.Text.Trim, TipoMensaje.MsgInformacion) - End Sub - - -#End Region - -#Region "TAB CONTABILIDAD - CLASIFICACION DE IVA" - Private Sub ActualizaNombresCuentas() - - 'If Not DtClasificacionIVA.Columns.Contains("CuentaXAcreditar") Then - ' DtClasificacionIVA.Columns.Add("CuentaXAcreditar", GetType(Integer)) - 'End If - 'If Not DtClasificacionIVA.Columns.Contains("CuentaAcreditable") Then - ' DtClasificacionIVA.Columns.Add("CuentaAcreditable", GetType(Integer)) - 'End If - 'If Not DtClasificacionIVA.Columns.Contains("CuentaXTrasladar") Then - ' DtClasificacionIVA.Columns.Add("CuentaXTrasladar", GetType(Integer)) - 'End If - 'If Not DtClasificacionIVA.Columns.Contains("CuentaTrasladado") Then - ' DtClasificacionIVA.Columns.Add("CuentaTrasladado", GetType(Integer)) - 'End If - - For Each Dr As DataRow In DtClasificacionIVA.Rows - If Dr("IdCtaIVAXAcreditar").ToString.ToEntero > 0 Then - 'Dr("CuentaXAcreditar") = DtCuentas.FiltraParametros($"Id = {Dr("IdCtaIVAXAcreditar").ToString}").Rows(0)("CtaCodigo").ToString - Dr("CuentaXAcreditar") = DtCuentas.FiltroPrimeroValor("CtaCodigo", $"Id = {Dr("IdCtaIVAXAcreditar").ToString}").ToString.ToEntero - End If - If Dr("IdCtaIVAAcreditable").ToString.ToEntero > 0 Then - 'Dr("CuentaAcreditable") = DtCuentas.FiltraParametros($"Id = {Dr("IdCtaIVAAcreditable").ToString}").Rows(0)("CtaCodigo").ToString - Dr("CuentaAcreditable") = DtCuentas.FiltroPrimeroValor("CtaCodigo", $"Id = {Dr("IdCtaIVAAcreditable").ToString}").ToString.ToEntero - End If - If Dr("IdCtaIVAXTrasladar").ToString.ToEntero > 0 Then - 'Dr("CuentaXTrasladar") = DtCuentas.FiltraParametros($"Id = {Dr("IdCtaIVAXTrasladar").ToString}").Rows(0)("CtaCodigo").ToString - Dr("CuentaXTrasladar") = DtCuentas.FiltroPrimeroValor("CtaCodigo", $"Id = {Dr("IdCtaIVAXTrasladar").ToString}").ToString.ToEntero - End If - If Dr("IdCtaIVATrasladado").ToString.ToEntero > 0 Then - 'Dr("CuentaTrasladado") = DtCuentas.FiltraParametros($"Id = {Dr("IdCtaIVATrasladado").ToString}").Rows(0)("CtaCodigo").ToString - Dr("CuentaTrasladado") = DtCuentas.FiltroPrimeroValor("CtaCodigo", $"Id = {Dr("IdCtaIVATrasladado").ToString}").ToString.ToEntero - End If - Next - DtClasificacionIVA.AcceptChanges() - End Sub - Private Sub InicializaClasificacionIVA(ObjEmpresas As ClsSisEmpresas) - CreaDtClasificacionIVA() - CargaCuentasIVA(ObjEmpresas) - CargaClasificaciones() - CargaClasificacionesIVA() - End Sub - Private Sub CargaClasificacionesIVA() - Dim ObjGral As New ClsGenerales - If ObjGral.GetClasificacionPorcentaje(CveEmpresa, Opcion:=2) Then - DtClasificacionIVA = ObjGral.DtResultados.Copy - ActualizaNombresCuentas() - GvClasificacionIVA.DataSource = DtClasificacionIVA - End If - ObjGral.Dispose() - GvClasificacionIVA.DataBind() - UpClasificacionIVA.Update() - End Sub - Private Sub CargaClasificaciones() - DdlClasificacion.DataSource = GlobalDTClasificaciones(CveEmpresa) - DdlClasificacion.DataBind() - DdlClasificacion.Items.Insert(0, New ListItem("-", "-1")) - End Sub - Private Sub CreaDtClasificacionIVA() - DtClasificacionIVA = New DataTable - DtClasificacionIVA.Columns.Add("CveClasificacionPorcentaje", GetType(Integer)) - DtClasificacionIVA.Columns.Add("CveClasificacion", GetType(Integer)) - DtClasificacionIVA.Columns.Add("Clasificacion", GetType(String)) - DtClasificacionIVA.Columns.Add("PorcentajeIVA", GetType(Double)) - DtClasificacionIVA.Columns.Add("CuentaXAcreditar", GetType(String)) - DtClasificacionIVA.Columns.Add("IdCtaIVAXAcreditar", GetType(Integer)) - DtClasificacionIVA.Columns.Add("CuentaAcreditable", GetType(String)) - DtClasificacionIVA.Columns.Add("IdCtaIVAAcreditable", GetType(Integer)) - DtClasificacionIVA.Columns.Add("CuentaXTrasladar", GetType(String)) - DtClasificacionIVA.Columns.Add("IdCtaIVAXTrasladar", GetType(Integer)) - DtClasificacionIVA.Columns.Add("CuentaTrasladado", GetType(String)) - DtClasificacionIVA.Columns.Add("IdCtaIVATrasladado", GetType(Integer)) - End Sub - Private Sub CargaCuentasIVA(ByRef ObjEmpresas As ClsSisEmpresas) - - If ObjEmpresas.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then - If ObjEmpresas.Empresa.UsaContabilidad And ObjEmpresas.Empresa.TipoContabilidad = 2 Then - - 'If ObjEmpresas.Empresa.TipoContabilidad = 2 Then - Dim Cuenta As New ClsContPAQi(ObjEmpresas.Empresa) - If Cuenta.GetCuentas(-1, "-1", -1) Then - DtCuentas = Cuenta.DtResultados - End If - Cuenta.Dispose() - 'End If - - Try - DdlIVAXAcreditarModal.DataSource = DtCuentas : DdlIVAXAcreditarModal.DataBind() - Catch ex As Exception - End Try - Try - DdlIVAAcreditableModal.DataSource = DtCuentas : DdlIVAAcreditableModal.DataBind() - Catch ex As Exception - End Try - Try - DdlIVAXTrasladarModal.DataSource = DtCuentas : DdlIVAXTrasladarModal.DataBind() - Catch ex As Exception - End Try - Try - DdlIVATrasladadoModal.DataSource = DtCuentas : DdlIVATrasladadoModal.DataBind() - Catch ex As Exception - End Try - End If - - - End If - - 'ObjEmpresas.Dispose() - DdlIVAXAcreditarModal.Items.Insert(0, New ListItem("-", "-1")) - DdlIVAAcreditableModal.Items.Insert(0, New ListItem("-", "-1")) - DdlIVAXTrasladarModal.Items.Insert(0, New ListItem("-", "-1")) - DdlIVATrasladadoModal.Items.Insert(0, New ListItem("-", "-1")) - End Sub - Protected Sub LnkEliminarClasificacionIVA_Click(sender As Object, e As EventArgs) - Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - If DtClasificacionIVA.Rows(gvRow.RowIndex)("CveClasificacionPorcentaje").ToString.ToEntero = 0 Then - DtClasificacionIVA.Rows(gvRow.RowIndex).Delete() - Else - DtClasificacionIVA.Rows(gvRow.RowIndex)("CveClasificacion") = -1 - End If - DtClasificacionIVA.AcceptChanges() - GvClasificacionIVA.DataSource = DtClasificacionIVA - GvClasificacionIVA.DataBind() - UpClasificacionIVA.Update() - End Sub - Protected Sub LnkAgregarClasificacionIVA_Click(sender As Object, e As EventArgs) - LimpiaClasificacionIVA() - Modalidad = "A" - RegistraScript("$('#DModalClasificacionIVA').modal()") UpModalClasificacionIVA.Update() - End Sub - Protected Sub LnkEditarClasificacionIVA_Click(sender As Object, e As EventArgs) - LimpiaClasificacionIVA() Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - Modalidad = "U" - Index = gvRow.RowIndex - CveClasificacionPorcentaje = gvRow.DataKey("CveClasificacionPorcentaje").ToEntero() DdlClasificacion.SelectedValueExist(gvRow.DataKey("CveClasificacion")) TxtPorcentajeIVA.Text = gvRow.DataKey("PorcentajeIVA") DdlIVAXAcreditarModal.SelectedValueExist(gvRow.DataKey("IdCtaIVAXAcreditar")) DdlIVAAcreditableModal.SelectedValueExist(gvRow.DataKey("IdCtaIVAAcreditable")) DdlIVAXTrasladarModal.SelectedValueExist(gvRow.DataKey("IdCtaIVAXTrasladar")) DdlIVATrasladadoModal.SelectedValueExist(gvRow.DataKey("IdCtaIVATrasladado")) RegistraScript("$('#DModalClasificacionIVA').modal()") UpModalClasificacionIVA.Update() - End Sub - - Private Sub LimpiaClasificacionIVA() - TxtPorcentajeIVA.Text = "" - DdlClasificacion.SelectedIndex = 0 - DdlIVAXAcreditarModal.SelectedIndex = 0 - DdlIVAAcreditableModal.SelectedIndex = 0 - DdlIVAXTrasladarModal.SelectedIndex = 0 - DdlIVATrasladadoModal.SelectedIndex = 0 - UpModalClasificacionIVA.Update() - End Sub - - Protected Sub BtnClasificacionIVA_Click(sender As Object, e As EventArgs) - If Modalidad = "A" Then - Dim Row As DataRow = DtClasificacionIVA.NewRow() - Row("CveClasificacionPorcentaje") = 0 - Row("CveClasificacion") = DdlClasificacion.SelectedValue.ToEntero - Row("Clasificacion") = DdlClasificacion.SelectedItem.Text - Row("PorcentajeIVA") = TxtPorcentajeIVA.Text.ToDouble - Row("CuentaXAcreditar") = DdlIVAXAcreditarModal.SelectedItem.Text - Row("IdCtaIVAXAcreditar") = DdlIVAXAcreditarModal.SelectedValue.ToEntero - Row("CuentaAcreditable") = DdlIVAAcreditableModal.SelectedItem.Text - Row("IdCtaIVAAcreditable") = DdlIVAAcreditableModal.SelectedValue.ToEntero - Row("CuentaXTrasladar") = DdlIVAXTrasladarModal.SelectedItem.Text - Row("IdCtaIVAXTrasladar") = DdlIVAXTrasladarModal.SelectedValue.ToEntero - Row("CuentaTrasladado") = DdlIVATrasladadoModal.SelectedItem.Text - Row("IdCtaIVATrasladado") = DdlIVATrasladadoModal.SelectedValue.ToEntero - DtClasificacionIVA.Rows.InsertAt(Row, DtClasificacionIVA.Rows.Count) - ElseIf Modalidad = "U" Then - DtClasificacionIVA.Rows(Index)("CveClasificacion") = DdlClasificacion.SelectedValue.ToEntero - DtClasificacionIVA.Rows(Index)("Clasificacion") = DdlClasificacion.SelectedItem.Text - DtClasificacionIVA.Rows(Index)("PorcentajeIVA") = TxtPorcentajeIVA.Text.ToDouble - DtClasificacionIVA.Rows(Index)("CuentaXAcreditar") = DdlIVAXAcreditarModal.SelectedItem.Text - DtClasificacionIVA.Rows(Index)("IdCtaIVAXAcreditar") = DdlIVAXAcreditarModal.SelectedValue.ToEntero - DtClasificacionIVA.Rows(Index)("CuentaAcreditable") = DdlIVAAcreditableModal.SelectedItem.Text - DtClasificacionIVA.Rows(Index)("IdCtaIVAAcreditable") = DdlIVAAcreditableModal.SelectedValue.ToEntero - DtClasificacionIVA.Rows(Index)("CuentaXTrasladar") = DdlIVAXTrasladarModal.SelectedItem.Text - DtClasificacionIVA.Rows(Index)("IdCtaIVAXTrasladar") = DdlIVAXTrasladarModal.SelectedValue.ToEntero - DtClasificacionIVA.Rows(Index)("CuentaTrasladado") = DdlIVATrasladadoModal.SelectedItem.Text - DtClasificacionIVA.Rows(Index)("IdCtaIVATrasladado") = DdlIVATrasladadoModal.SelectedValue.ToEntero - End If - DtClasificacionIVA.AcceptChanges() - ActualizaNombresCuentas() - GvClasificacionIVA.DataSource = DtClasificacionIVA - GvClasificacionIVA.DataBind() - UpClasificacionIVA.Update() - RegistraScript("$('#DModalClasificacionIVA').modal('hide')") - End Sub - - Protected Sub GvClasificacionIVA_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - If Not e.Row.DBCampo("CveClasificacion").ToEntero > 0 Then - e.Row.Visible = False - End If - End If - End Sub - -#End Region - - - - - Protected Sub LnkOpenModalDatosFiel_Click(sender As Object, e As EventArgs) - TxtFielPass.Text = "" - TxtFielArchivoCER.Text = "" - TxtFielArchivoKey.Text = "" - RegistraScript("$('#ModalUpFiel').modal();") - End Sub - Protected Sub LnkUpDatosFiel_Click(sender As Object, e As EventArgs) - Dim Password As String = TxtFielPass.Text - Dim akey As String - Dim acer As String - Dim pemkey As String - Dim pemcer As String - Dim pfxname As String - Dim Archivopfx As String - Dim Archivokey As Archivo = Nothing - Dim Archivocer As Archivo = Nothing - - Dim dirbase = "" ' String.Format("{0}Empresas\{1}\Certificados\Fiel\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa")) - Dim dirbasepfx = "" ' String.Format("{0}Empresas\{1}\Certificados\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa")) - If EmpresaEditar IsNot Nothing Then - dirbase = String.Format("{0}Certificados\Fiel\", EmpresaEditar.Ruta) - dirbasepfx = String.Format("{0}Certificados\", EmpresaEditar.Ruta) - Else - dirbase = String.Format("{0}Empresas\{1}\Certificados\Fiel\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa")) - dirbasepfx = String.Format("{0}Empresas\{1}\Certificados\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa")) - End If - - If (Not Directory.Exists(dirbase)) Then - Directory.CreateDirectory(dirbase) - End If - - Dim Filesgral As List(Of Archivo) = TxtFielArchivoCER.getfiles().Archivos - If Filesgral.Count > 0 Then - Archivocer = Filesgral(0) - End If - Filesgral = TxtFielArchivoKey.getfiles().Archivos - If Filesgral.Count > 0 Then - Archivokey = Filesgral(0) - End If - If Not IsNothing(Archivokey) AndAlso Not IsNothing(Archivocer) And Password.Length > 0 Then - akey = String.Format("{0}{1}", dirbase, Archivokey.filenameO) - If File.Exists(akey) Then - File.Delete(akey) - End If - File.Copy(Archivokey.FileUrl, akey) - acer = String.Format("{0}{1}", dirbase, Archivocer.filenameO) - If File.Exists(acer) Then - File.Delete(acer) - End If - File.Copy(Archivocer.FileUrl, acer) - Archivopfx = Archivokey.filenameO.Substring(0, Archivokey.filenameO.Length - 4) - pemkey = String.Format("{0}{1}.pem", dirbase, Archivopfx) - pfxname = String.Format("{0}{1}.pfx", dirbasepfx, Archivopfx) - pemcer = String.Format("{0}{1}.pem", dirbase, Archivokey.filenameO.Substring(0, Archivocer.filenameO.Length - 4)) - - If File.Exists(pemkey) Then - File.Delete(pemkey) - End If - - If File.Exists(pfxname) Then - File.Delete(pfxname) - End If - - If File.Exists(pemcer) Then - File.Delete(pemcer) - End If - - Dim resultado As New StringBuilder - resultado.AppendLine("
PAso 1:
") - resultado.AppendLine(execCommand({"cd C:\Generar PFX\", String.Format("openssl.exe x509 -inform DER -in ""{0}"" -out ""{1}""", acer, pemcer)})) - resultado.AppendLine("
PAso 2:
") - resultado.AppendLine(execCommand({"cd C:\Generar PFX\", String.Format("openssl pkcs8 -inform DER -in ""{0}"" -passin pass:""{1}"" -out ""{2}""", akey, Password, pemkey)})) - resultado.AppendLine("
Paso 3:
") - resultado.AppendLine(execCommand({"cd C:\Generar PFX\", String.Format("openssl pkcs12 -export -out ""{0}"" -inkey ""{1}"" -in ""{2}"" -passout pass:""{3}""", pfxname, pemkey, pemcer, Password)})) - resultado.AppendLine("
") - 'Alert(resultado.ToString()) - - If File.Exists(pemkey) Then - File.Delete(pemkey) - End If - If File.Exists(pemcer) Then - File.Delete(pemcer) - End If - If File.Exists(acer) Then - File.Delete(acer) - End If - If File.Exists(akey) Then - File.Delete(akey) - End If - If File.Exists(Archivocer.FileUrl) Then - File.Delete(Archivocer.FileUrl) - End If - If File.Exists(Archivokey.FileUrl) Then - File.Delete(Archivokey.FileUrl) - End If - If Not File.Exists(pfxname) Then - Archivopfx = "" - Password = "" - End If - Dim objempresa As New ClsSisEmpresas - objempresa.UpEmpresaFiel(ViewState("CveEmpresa").ToString().ToEntero(), Password, $"{Archivopfx}.pfx") - objempresa.Dispose() - lblPassFiel.Text = Password - LblPfx.Text = $"{Archivopfx}.pfx" - Alert("La Fiel se ha actualizado") - UpmodalFiel.Update() - RegistraScript("$('#ModalUpFiel').modal('hide');") - Else - Alert("Favor de llenar todos los campos :
-Contraseña
-Archivo CER
-Archivo KEY", TipoMensaje.MsgAdvertencia) - End If - End Sub - Public Function execCommand(command As String()) As String - - Dim proceso As Diagnostics.Process = New Diagnostics.Process() - proceso.StartInfo.FileName = "cmd.exe" - proceso.StartInfo.CreateNoWindow = True - proceso.StartInfo.RedirectStandardInput = True - proceso.StartInfo.RedirectStandardOutput = True - proceso.StartInfo.UseShellExecute = False - proceso.Start() - For Each c As String In command - proceso.StandardInput.WriteLine(c) - - Next - proceso.StandardInput.Flush() - proceso.StandardInput.Close() - proceso.WaitForExit() - Return proceso.StandardOutput.ReadToEnd() - End Function - Private Sub CargaTareasProgramadas() - Dim objTP As New ClsTareasProgramadas() - ChkDescargaMasivaSat.Checked = False - If objTP.GetTareasProgramadas(ViewState("CveEmpresa").ToString.ToEntero()) AndAlso objTP.DtResultados.Rows.Count > 0 Then - ChkDescargaMasivaSat.Checked = (objTP.DtResultados.COUNT("CveTareaProgramada", "CveTareaProgramada=1") > 0) - End If - objTP.Dispose() - End Sub - Protected Sub ChkDescargaMasivaSat_CheckedChanged(sender As Object, e As EventArgs) - Dim objTP As New ClsTareasProgramadas() - If ChkDescargaMasivaSat.Checked Then - If objTP.AddTareasProgramadas(ViewState("CveEmpresa").ToString.ToEntero(), 1, DateTime.Now.ToString("yyyy/MM/dd"), "", 0, "", DateTime.Now.ToString("yyyy/MM/dd"), DateTime.Now.ToString("yyyy/MM/dd"), "", "", 0, 1) Then - Alert("La tarea programada de descarga masiva del sat a agregado satisfactoriamente") - End If - Else - If objTP.RemoveTareasProgramadas(1, ViewState("CveEmpresa").ToString().ToEntero()) Then - Alert("La tarea programada de descarga masiva del sat se ha removido satisfactoriamente") - End If - End If - - objTP.Dispose() - End Sub - Protected Sub LnkRegistrarPAC3_Click(sender As Object, e As EventArgs) - If Me.CveEmpresa > 0 Then - RegistrarPAC3() - Else - Alert("Debe registrar la empresa para poder registrarla en el PAC", TipoMensaje.MsgAdvertencia) - End If - - End Sub - Private Sub RegistrarPAC3() - Try - - Dim Credenciales As String = "vSGxMFWnNRy/nDoowxqrqw==|Sia123654" - Dim ArchivoLLave As String = String.Format("{0}\Certificados\{1}", EmpresaEditar.Ruta, EmpresaEditar.ArchivoKey) - Dim ArchivoCertificado As String = String.Format("{0}\Certificados\{1}", EmpresaEditar.Ruta, EmpresaEditar.ArchivoCer) - - Dim llaveByte = System.IO.File.ReadAllBytes(ArchivoLLave) - Dim certByte = System.IO.File.ReadAllBytes(ArchivoCertificado) - - Dim RFCEmisor = TxtRFC.Text.Trim() - Dim contrasena = TxtContraseñaKey.Text.Trim() - - Dim conector As New Profact.TimbraCFDI33.Conector(EmpresaEditar.FacturaProduccion) - - If Not EmpresaEditar.FacturaProduccion OrElse EmpresaEditar.CveEmpresa = 1 Then - conector.EstableceCredenciales("mvpNUXmQfK8=") - Else - conector.EstableceCredenciales(Credenciales) - End If - - Dim result = conector.RegistraEmisor(RFCEmisor, certByte, llaveByte, contrasena) - - If result.Exitoso Then - Alert("El emisor se registró correctamente.
" & result.Descripcion) - Else - Alert("Ocurrió un error al registrar el emisor.
" & result.Descripcion & ".
Numero Error: " & result.NumeroError, TipoMensaje.MsgError) - End If - - Catch ex As Exception - OnError("Ocurrió un error al registrar el emisor", ex) - End Try - - End Sub - - - - - - - Protected Sub LnkArchivoKey_Click(sender As Object, e As EventArgs) Handles LnkArchivoKey.Click - TxtCargaImg.getfiles().Archivos = Nothing - TxtCargaImg.Text = "[]" - OpActualizaArchivosCer = EnumOpActualizaArchivosCer.KEY - LblModalCertificadosTitulo.Text = "Archivo KEY" - UpModalCertificados.Update() - RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo")) - End Sub - - Protected Sub LnkArchivoCer_Click(sender As Object, e As EventArgs) Handles LnkArchivoCer.Click - TxtCargaImg.getfiles().Archivos = Nothing - TxtCargaImg.Text = "[]" - OpActualizaArchivosCer = EnumOpActualizaArchivosCer.CER - LblModalCertificadosTitulo.Text = "Archivo CER" - UpModalCertificados.Update() - RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo")) - End Sub - - Protected Sub LnkArchivoPfx_Click(sender As Object, e As EventArgs) Handles LnkArchivoPfx.Click - TxtCargaImg.getfiles().Archivos = Nothing - TxtCargaImg.Text = "[]" - OpActualizaArchivosCer = EnumOpActualizaArchivosCer.PFX - LblModalCertificadosTitulo.Text = "Archivo PFX" - UpModalCertificados.Update() - RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo")) - End Sub - - Protected Sub BtnGuardarArchivo_Click(sender As Object, e As EventArgs) +Option Explicit On +Option Strict On + +Imports System.Data +Imports Extensiones +Imports System.IO + + +Partial Class Sistemas_Empresa + Inherits ClsPaginas + +#Region " PROPIEDADES " + Private ReadOnly Property CveEmpresa As Integer + Get + Return ViewState("CveEmpresa").ToString.ToEntero + End Get + End Property + + Private Property EmpresaEditar As Empresa + Get + Return CType(ViewState("EmpresaEditar"), Empresa) + End Get + Set(value As Empresa) + ViewState("EmpresaEditar") = value + End Set + End Property + + + Private Property DtFuncionalidades As Data.DataTable + Get + Return CType(ViewState("DtFuncionalidades"), DataTable) + End Get + Set(value As Data.DataTable) + ViewState("DtFuncionalidades") = value + End Set + End Property + Private Property BDContPAQ As String + Get + BDContPAQ = ViewState("BDContPAQ").ToString + End Get + Set(value As String) + ViewState("BDContPAQ") = value + End Set + End Property + Private Property ServerContPAQ As String + Get + ServerContPAQ = ViewState("ServerContPAQ").ToString + End Get + Set(value As String) + ViewState("ServerContPAQ") = value + End Set + End Property + Public Property DtCuentas As DataTable + Get + Return CType((ViewState("DtCuentas")), DataTable) + End Get + Set(value As DataTable) + ViewState("DtCuentas") = value + End Set + End Property + Public Property DtClasificacionIVA As DataTable + Get + If ViewState("DtClasificacionIVA") Is Nothing Then + ViewState("DtClasificacionIVA") = New DataTable + End If + Return CType((ViewState("DtClasificacionIVA")), DataTable) + End Get + Set(value As DataTable) + ViewState("DtClasificacionIVA") = value + End Set + End Property + Public Property CveClasificacionPorcentaje As Integer + Get + Return CType((ViewState("CveClasificacionPorcentaje")), Integer) + End Get + Set(value As Integer) + ViewState("CveClasificacionPorcentaje") = value + End Set + End Property + Public Property Modalidad As String + Get + Return CType((ViewState("Modalidad")), String) + End Get + Set(value As String) + ViewState("Modalidad") = value + End Set + End Property + Public Property Index As Integer + Get + Return CType((ViewState("Index")), Integer) + End Get + Set(value As Integer) + ViewState("Index") = value + End Set + End Property + + + Public Property TipoContabilidad As Integer + Get + If ViewState("TipoContabilidad") Is Nothing Then + ViewState("TipoContabilidad") = -1 + End If + + Return CType((ViewState("TipoContabilidad")), Integer) + End Get + Set(value As Integer) + ViewState("TipoContabilidad") = value + End Set + End Property + + + + Enum EnumOpActualizaArchivosCer + SinOpcion + KEY + CER + PFX + End Enum + + + Property OpActualizaArchivosCer As EnumOpActualizaArchivosCer + + Get + If ViewState("OpActualizaArchivosCer") Is Nothing Then + ViewState("OpActualizaArchivosCer") = EnumOpActualizaArchivosCer.SinOpcion + End If + + Return DirectCast(ViewState("OpActualizaArchivosCer"), EnumOpActualizaArchivosCer) + + End Get + Set(value As EnumOpActualizaArchivosCer) + ViewState("OpActualizaArchivosCer") = value + End Set + + End Property + +#End Region + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + + If UsuarioActual.CveRol <> 1 AndAlso (Request("CveEmpresa") IsNot Nothing AndAlso Request("CveEmpresa").ToEntero > 0) Then + + If Not ValidaCveEmpresaUsaurio(UsuarioActual.CveUsuario, Request("CveEmpresa").ToEntero) Then + 'Response.Redirect("../Inicio.aspx") + Alert("No tiene acceso a esta empresa.", TipoMensaje.MsgAdvertencia, "document.location.href = ""../Inicio.aspx""") + Exit Sub + End If + + End If + + CargaDdlPac() + CargaRegimenFiscal() + CargaGridIndicadores() + DtFuncionalidades = Nothing + DtCuentas = Nothing + CveClasificacionPorcentaje = 0 + + If (Request("CveEmpresa") IsNot Nothing AndAlso IsNumeric(Request("CveEmpresa")) AndAlso Request("CveEmpresa").ToEntero > 0 AndAlso UsuarioActual.CveRol = 1) OrElse UsuarioActual.CveRol <> 1 Then + ViewState("CveEmpresa") = If(UsuarioActual.CveRol <> 1, UsuarioActual.Empresa.CveEmpresa.ToString, Request("CveEmpresa")) ' Request("CveEmpresa") + ' Session("FileUpload") = CveEmpresa + CargaTareasProgramadas() + CargaDatos() + + 'Configuración de Modalidad Update + TxtTimbres.Enabled = False + LbArchivoKeyDescarga.Visible = True + LbArchivoCerDescarga.Visible = True + LbArchivoPfxDescarga.Visible = True + + 'If LnkArchivoKey.InnerText = "" Then + ' LnkArchivoKey.InnerText = "Reemplazar Archivo Key" + 'End If + 'If LnkArchivoCer.InnerText = "" Then + ' LnkArchivoCer.InnerText = "Reemplazar Archivo Cer" + 'End If + + 'If LnkArchivoPfx.InnerText = "" Then + ' LnkArchivoPfx.InnerText = "Reemplazar Archivo Pfx" + 'End If + BtnGuardar.Text = "Guardar Cambios" + + 'Plantilla Correo + + + Else + 'Configuración de Modalidad Insert + ViewState("CveEmpresa") = -1 + 'TAB.ActiveTabIndex = 1 + BtnEliminar.Visible = False + + End If + ConfiguracionEmpresa() + + End If + End Sub + + Private Function ValidaCveEmpresaUsaurio(CveUsuario As Integer, CveEmpresaValidar As Integer) As Boolean + + Dim Respuesta As Boolean = False + Using ObjEmpresas As New ClsSisEmpresas() + If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario) Then + If ObjEmpresas.DtResultados.FiltraParametros($"CveEmpresa = {CveEmpresaValidar}").Rows.Count = 1 Then + Respuesta = True + End If + End If + End Using + Return Respuesta + + End Function + + Private Sub CargaDatos() + + Dim ObjEmpresas As New ClsSisEmpresas() + If ObjEmpresas.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then + If ObjEmpresas.DtResultados.Rows.Count > 0 Then + Me.EmpresaEditar = ObjEmpresas.Empresa + With ObjEmpresas.Empresa + + 'Campos para Modificación + TxtCveEmpresa.Text = .CveEmpresa.ToString + TxtEmpresa.Text = .Empresa : LtlTitulo.Text = "Consulta de Empresa: " & .Empresa + TxtNombreCorto.Text = .NombreCorto + TxtDireccion.Text = .Direccion + TxtNoExt.Text = .NoExt + TxtNoInt.Text = .NoInt + TxtColonia.Text = .Colonia + TxtCiudad.Text = .Ciudad + TxtEstado.Text = .Estado + TxtCP.Text = .CP.ToString + TxtRFC.Text = .RFC + TxtTelefono.Text = .Telefono + TxtContacto.Text = .Contacto 'Representante legal + TxtMail.Text = .Mail + DdlTipoFacturacion.SelectedValue = .TipoFacturacion + TxtBIUsuario.Text = .BIUsuario + TxtBIContraseña.Text = .BIContraseña + TxtContraseñaKey.Text = .ContraseñaKey + TxtArchivoKey.Text = .ArchivoKey + TxtArchivoCer.Text = .ArchivoCer + TxtArchivoPfx.Text = .ArchivoPfx + ChkEstatus.Checked = .Estatus + TxtFecha.Text = .FechaIng.ToString + TxtCveUsuario.Text = .Usuario + ChkFacturaProduccion.Checked = .FacturaProduccion + TxtSendMail.Text = .SendMail + TxtSendMailPassword.Text = .SendMailPassword + TxtSendMailServer.Text = .SendMailServer + TxtSendMailPort.Text = .SendMailPuerto.ToString + ChkSendMailSSL.Checked = .SendMailSSL + ChkMostrarRetIVA.Checked = .MostrarRetIVA + ChkMostrarRetISR.Checked = .MostrarRetISR + 'TxtRegimen.Text = .Regimen + ChkEstatusFacturacion.Checked = .EstatusFacturacion + TxtTimbres.Text = .Timbres.ToString + ChkUsaContabilidad.Checked = .UsaContabilidad + ChkUsaBancos.Checked = .UsaBancos + ChkUsaVentas.Checked = .UsaVentas + ChkUsaCxC.Checked = .UsaCxC + ChkUsaCompras.Checked = .UsaCompras + ChkUsaInventarios.Checked = .UsaInventarios + ChkUsaRH.Checked = .UsaRH + ChkUsaNomina.Checked = .UsaNomina + ChkUsaOS.Checked = .UsaOS + TxtBDContPAQi.Text = .BDContPAQi + TxtServerContPAQi.Text = .ServerContPAQi + TxtUsrContPAQi.Text = .UsrContPAQi + TxtPwdContPAQi.Text = .PwdContPAQi + TxtBuzon_Mail.Text = .Buzon_Mail + TxtBuzon_Server.Text = .Buzon_Server + TxtBuzon_Puerto.Text = .Buzon_Puerto.ToString + ChkBuzon_SSL.Checked = .Buzon_SSL + TxtBuzon_USR.Text = .Buzon_USR + TxtBuzon_PWD.Text = .Buzon_PWD + TxtMailSoporte.Text = .Soporte_Mail + TxtServidorSoporte.Text = .Soporte_Server + TxtPuertoSoporte.Text = .Soporte_Puerto.ToString + ChkSSLSoporte.Checked = .Soporte_SSL + TxtUsuarioSoporte.Text = .Soporte_USR + DdlProtocoloSoporte.SelectedValue = .Soporte_Tipo + TxtContraseñaSoporte.Text = .Soporte_PWD + DdlCvePac.SelectedValueExist(.CvePAC.ToString) + DdlRegimen.SelectedValue = .CveRegimenFiscal.ToString + TxtCURP.Text = .CURP + TxtImporte.Text.ToDecimal + TxtCIEC.Text = .CIEC + DdlPlataforma.SelectedValue = .CvePlataforma.ToString + ChkUsaAC.Checked = .UsaAC + TxtPorDepreciacion.Text = .PorDepreciacion.ToString + TxtExtension.Text = .Extension + TxtLocalidad.Text = .Localidad + DdlMetodoInventario.SelectedValue = .CveMetodoInventario.ToString + TxtPeriodoActual.Text = .PeriodoActual.ToString + TxtEjercicioActual.Text = .EjercicioActual.ToString + ChkDefaultAsistencias.Checked = .DefaultAsistencias + TxtDiasPermitidos.Text = .DiasPermitidos.ToString + DdlTipoCentroDeCostos.SelectedValue = .Tipo_CentroCosto.ToString + ChkReqCentroCostos.Checked = .RequiereCentroCostos + DdlTerminalTipo.SelectedValue = .PV_TerminalTipo.ToString + TxtImporte.Text = .Importe.ToString + TipoContabilidad = .TipoContabilidad + + TxtPlantillaVenta.Text = .PlantillaMailVenta + TxtAsunto.Text = .AsuntoPlantillaMailVenta + + TxtPlantillaCotizacion.Text = .AsuntoPlantillaMailVentaCotizacion + TxtAsuntoCotizacion.Text = .PlantillaMailVentaCotizacion + + 'NUEVOS + TxtAreaGeografica.Text = .AreaGeografica + DdlProtocolo.Text = .Buzon_Tipo + + 'Fiel + LblPfx.Text = .FielPFX + lblPassFiel.Text = .FielPassword + + 'PARA PROPIEDAD - TRIGGER + BDContPAQ = .BDContPAQi + ServerContPAQ = .ServerContPAQi + + 'CUENTAS PADRES + ObjEmpresas.GetEmpresasFuncionalidades(CveEmpresa) + DtFuncionalidades = ObjEmpresas.DtResultados + + + Session("FileUpload") = .Banner + Session("FileUpload") = .ArchivoKey + Session("FileUpload") = .ArchivoCer + Session("FileUpload") = .ArchivoPfx + End With + Else + Alert("La Empresa Solicitada no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia) + BtnGuardar.Enabled = False + + End If + End If + + ObjEmpresas.Dispose() + CargarGrupoEmpresas() + UpDatos.Update() + End Sub + Protected Sub CargarGrupoEmpresas() + Dim ObjEmpresas As New ClsSisEmpresas() + + 'Gridview + ObjEmpresas.GetEmpresasGrupos(CveEmpresa) + GVGrupoEmpresas.DataSource = ObjEmpresas.DtResultados + GVGrupoEmpresas.DataBind() + + 'DropdownList Empresas + ObjEmpresas.GetEmpresasGruposNot(CveEmpresa) + DdlEmpresas.Items.Clear() + DdlEmpresas.DataSource = ObjEmpresas.DtResultados + DdlEmpresas.DataBind() + + ObjEmpresas.Dispose() + + updategrupoempresa.Update() + End Sub + Protected Sub LinkButton1_Click(sender As Object, e As EventArgs) Handles AddGrupoEmpresa.Click + + Dim ObjEmpresas As New ClsSisEmpresas() + ObjEmpresas.AddEmpresasGrupos(CveEmpresa, DdlEmpresas.SelectedValue.ToEntero) + ObjEmpresas.Dispose() + CargarGrupoEmpresas() + End Sub + Protected Sub GrupoEmpresas_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GVGrupoEmpresas.RowDeleting + Dim ObjEmpresas As New ClsSisEmpresas() + ObjEmpresas.RemoveEmpresasGrupos(CveEmpresa, CType(GVGrupoEmpresas.Rows(e.RowIndex).FindControl("GVColCVeEmpresa"), HiddenField).Value.ToEntero()) + ObjEmpresas.Dispose() + CargarGrupoEmpresas() + End Sub + Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click + Dim ObjEmpresas As New ClsSisEmpresas + Dim ObjGral As New ClsGenerales() + Dim ObjContPAQ As ClsContPAQi = Nothing + Dim Indicador As New ClsIndicadores(ObjEmpresas.IniciaTransacSQL()) + + Dim TextoError = "" + Dim TextoOK = "" + + If CveEmpresa = -1 Then + If ObjEmpresas.AddEmpresa(TxtCveEmpresa.Text.Trim.ToEntero, TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, + TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim.ToEntero, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim, + DdlTipoFacturacion.SelectedValue, TxtBIUsuario.Text.Trim, TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, + TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", UsuarioActual.CveUsuario, ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, + ChkMostrarRetISR.Checked, "-1", ChkEstatusFacturacion.Checked, TxtSendMail.Text.Trim, TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim, + TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked, ChkUsaVentas.Checked, ChkUsaCxC.Checked, + ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim, TxtServerContPAQi.Text.Trim, + TxtUsrContPAQi.Text.Trim, TxtPwdContPAQi.Text.Trim, TxtBuzon_Mail.Text.Trim, TxtBuzon_Server.Text.Trim, TxtBuzon_Puerto.Text.Trim.ToEntero, ChkBuzon_SSL.Checked, + TxtBuzon_USR.Text.Trim, TxtBuzon_PWD.Text.Trim, DdlProtocolo.SelectedValue, TxtMailSoporte.Text.Trim, TxtServidorSoporte.Text.Trim, TxtPuertoSoporte.Text.Trim.ToEntero, ChkSSLSoporte.Checked, + TxtUsuarioSoporte.Text.Trim, TxtContraseñaSoporte.Text.Trim, DdlProtocoloSoporte.SelectedValue, + "".Trim, TxtAreaGeografica.Text.Trim, + TxtNombreCorto.Text, TxtCURP.Text.Trim, DdlRegimen.SelectedValue.ToEntero, TxtImporte.Text.ToDecimal, TxtCIEC.Text, DdlPlataforma.SelectedValue.ToEntero, ChkUsaAC.Checked, + TxtPorDepreciacion.Text.ToDecimal, TxtExtension.Text, TxtLocalidad.Text, DdlMetodoInventario.SelectedValue.ToEntero, TxtPeriodoActual.Text.ToEntero, + TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, DdlTerminalTipo.SelectedValue.ToEntero, CvePAC:=DdlCvePac.SelectedValue.ToEntero + ) Then + + 'Movemos el Archivo Fisicamente + If Session("FileUpload") IsNot Nothing AndAlso Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) Then + Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) + File.Move(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Banners\" & ObjEmpresas.CveEmpresa.ToString & Extension) + + End If + ViewState("CveEmpresa") = ObjEmpresas.CveEmpresa + 'InicializaClasificacionIVA(ObjEmpresas) + TextoOK = "La nueva Empresa se guardó correctamente." + Else + TextoError = "Ocurrió un error al agregar la empresa" + End If + + + + 'Agregar Indicadores + For Each Row As GridViewRow In GvIndicadores.Rows + If Row.DataKey("CveIndicador") <> "" And Row.DataKey("CveEmpresa") = "" Then + If Row.FCCheckBox("chkIndicador").Checked Then + If Not Indicador.AddIndicadorEmpresa(Row.DataKey("CveIndicador").ToEntero, UsuarioActual.CveEmpresa) Then + Exit For + End If + End If + End If + Next + + + + + Else + If ObjEmpresas.UpdateEmpresa(TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim, + TxtCP.Text.Trim.ToEntero, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim, DdlTipoFacturacion.SelectedItem.ToString, TxtBIUsuario.Text.Trim, + TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", ChkEstatus.Checked, + ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, ChkMostrarRetISR.Checked, "", ChkEstatusFacturacion.Checked, TxtSendMail.Text.Trim, + TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim, TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked, + ChkUsaVentas.Checked, ChkUsaCxC.Checked, ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim, + TxtServerContPAQi.Text.Trim, TxtUsrContPAQi.Text.Trim, TxtPwdContPAQi.Text.Trim, TxtBuzon_Mail.Text.Trim, TxtBuzon_Server.Text.Trim, TxtBuzon_Puerto.Text.Trim.ToEntero, + ChkBuzon_SSL.Checked, TxtBuzon_USR.Text.Trim, TxtBuzon_PWD.Text.Trim, TxtCveEmpresa.Text.Trim.ToEntero, DdlProtocolo.SelectedValue, + TxtMailSoporte.Text.Trim, TxtServidorSoporte.Text.Trim, TxtPuertoSoporte.Text.Trim.ToEntero, ChkSSLSoporte.Checked, + TxtUsuarioSoporte.Text.Trim, TxtContraseñaSoporte.Text.Trim, DdlProtocoloSoporte.SelectedValue, "", TxtAreaGeografica.Text.Trim, + TxtNombreCorto.Text, TxtCURP.Text.Trim, DdlRegimen.SelectedValue.ToEntero, DdlCvePac.SelectedValue.ToEntero, + TxtImporte.Text.ToDecimal, TxtCIEC.Text, DdlPlataforma.SelectedValue.ToEntero, ChkUsaAC.Checked, + TxtPorDepreciacion.Text.ToDecimal, TxtExtension.Text, TxtLocalidad.Text, DdlMetodoInventario.SelectedValue.ToEntero, TxtPeriodoActual.Text.ToEntero, + TxtEjercicioActual.Text.ToEntero, ChkDefaultAsistencias.Checked, TxtDiasPermitidos.Text.ToEntero, DdlTipoCentroDeCostos.SelectedValue.ToEntero, ChkReqCentroCostos.Checked, DdlTerminalTipo.SelectedValue.ToEntero) Then + + 'Movemos el Archivo Fisicamente + If Session("FileUpload").ToString <> String.Empty AndAlso File.Exists(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) Then + Dim Extension As String = Path.GetExtension(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString) + If File.Exists(Request.PhysicalApplicationPath + "Banners\" & CveEmpresa & Extension) Then + File.Delete(Request.PhysicalApplicationPath + "Banners\" & CveEmpresa & Extension) + File.Move(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Banners\" & CveEmpresa & Extension) + Else + File.Move(Request.PhysicalApplicationPath + "Banners\Temp\" & Session("FileUpload").ToString, Request.PhysicalApplicationPath + "Banners\" & CveEmpresa & Extension) + End If + End If + + TextoOK = "Los cambios de guardaron correctamente." + Else + TextoError = "Ocurrió un error al guardar los cambios de la empresa" + End If + + 'Agregar Indicadores + For Each Row As GridViewRow In GvIndicadores.Rows + If Row.DataKey("CveIndicador") <> "" AndAlso Row.DataKey("CveEmpresa") <> "" And Row.FCCheckBox("chkIndicador").Checked = False Then + If Not Indicador.RemoveIndicadoresEmpresas(Row.DataKey("CveIndicador").ToEntero, UsuarioActual.CveEmpresa) Then + Exit For + End If + End If + + If Row.DataKey("CveIndicador") <> "" And Row.DataKey("CveEmpresa") = "" Then + If Row.FCCheckBox("chkIndicador").Checked Then + If Not Indicador.AddIndicadorEmpresa(Row.DataKey("CveIndicador").ToEntero, UsuarioActual.CveEmpresa) Then + Exit For + End If + End If + End If + Next + + End If + + 'RECARGA EMPRESA + If TextoError = "" Then + If ObjEmpresas.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then + GlobalDTEmpresas(CveEmpresa) = Nothing + + 'verifico si existe la carpeta de la empresa, sino la crea + For Each dr As Data.DataRow In ObjEmpresas.DtResultados.Rows + If Not IO.Directory.Exists(String.Format("{0}\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa"))) Then + IO.Directory.CreateDirectory(String.Format("{0}Empresas\{1}", ModExtensiones.DirectorioBaseEmpresas, dr("CveEmpresa"))) + End If + Next + End If + End If + + 'TRIGGER + If TextoError = "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" And TxtBDContPAQi.Text.Trim <> "" Then + + If UsuarioActual.Empresa.UsaContabilidad Then + + If UsuarioActual.Empresa.TipoContabilidad = 2 Then + 'CREA OBJETO EMPRESA + If ObjEmpresas.GetEmpresas(TxtCveEmpresa.Text.ToEntero, "-1", "-1", "-1", "-1") Then + Dim Empresa As New Empresa + Empresa = ObjEmpresas.Empresa + + ObjContPAQ = New ClsContPAQi(Empresa) + + If ObjContPAQ.Conectado Then + 'ADD + If BDContPAQ = "" Then + If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then + TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos" + End If + End If + + 'UPDATE + If BDContPAQ <> "" And (BDContPAQ <> TxtBDContPAQi.Text.Trim Or ServerContPAQ <> TxtServerContPAQi.Text.Trim) Then + If Not ObjContPAQ.TRIGGER(TxtBDContPAQi.Text.Trim) Then + TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos" + End If + End If + Else + TextoError = "Los datos de conexion al servidor de contabilidad son incorrectos" + End If + End If + End If + + Else + Alert("La empresa tiene la información para el uso de contabilidad pero no se tiene activada", TipoMensaje.MsgAdvertencia) + End If + End If + + If TextoError = "" Then + ObjEmpresas.Commit() + If ObjContPAQ IsNot Nothing Then ObjContPAQ.Commit() + Alert(TextoOK, TipoMensaje.MsgInformacion, "document.location.href=""/Sistemas/Empresa.aspx?CveEmpresa=" & TxtCveEmpresa.Text.Trim & """;") + Session("FileUpload") = "" + CargaDatos() + UpDatos.Update() + Else + ObjEmpresas.RollBack() + If ObjContPAQ IsNot Nothing Then ObjContPAQ.RollBack() + Alert(TextoError, TipoMensaje.MsgError) + End If + + ObjEmpresas.Dispose() + ObjGral.Dispose() + If ObjContPAQ IsNot Nothing Then ObjContPAQ.Dispose() + End Sub + Private Function AgregarFuncionalidad(ObjEmpresas As ClsSisEmpresas, CveFuncionalidad As Integer, ByRef Ddl As DropDownList) As String + Dim Retorno = "" + + If Not ObjEmpresas.AddUpdateEmpresaFuncionalidades(TxtCveEmpresa.Text.Trim.ToEntero, CveFuncionalidad, Ddl.SelectedValue) Then + Retorno = "Ocurrió un error al vincular la cuenta contable" + End If + + Return Retorno + End Function + Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click + Dim ObjEmpresas As New ClsSisEmpresas + If ObjEmpresas.RemoveEmpresa(CveEmpresa) Then + GlobalDTEmpresas = ObjEmpresas.DtResultados + Alert("La Empresa se Eliminó correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Sistemas/Empresa.aspx"";") + End If + ObjEmpresas.Dispose() + End Sub + + Private Sub CargaDdlPac() + Dim Objeto As New ClsSisEmpresas + If Objeto.GetPacs() Then + DdlCvePac.DataSource = Objeto.DtResultados + DdlCvePac.DataBind() + DdlCvePac.Items.Insert(0, New ListItem("Seleccione", "-1")) + End If + Objeto.Dispose() + End Sub + Private Sub CargaRegimenFiscal() + Dim ObjSis As New ClsSisEmpresas + If ObjSis.GetRegimenFiscal(-1) Then + DdlRegimen.DataSource = ObjSis.DtResultados + DdlRegimen.DataBind() + DdlRegimen.Items.Insert(0, New ListItem("Seleccione", "-1")) + End If + ObjSis.Dispose() + End Sub + +#Region "CONFIGURACION EMPRESA" + Private Sub ConfiguracionEmpresa() + If UsuarioActual.CveRol <> 1 Then + TabSistema.Visible = False + BtnCancelar.Visible = False + BtnEliminar.Visible = False + BiInform.Visible = False + End If + If TipoContabilidad = 2 Then + TabContabilidad.Visible = True + End If + End Sub +#End Region + +#Region "TAB - INDICADORES " + Public Sub CargaGridIndicadores() + Dim Objeto As New ClsIndicadores + If Objeto.GetEmpresasIndicadores(UsuarioActual.CveEmpresa) Then + GvIndicadores.DataSource = Objeto.DtResultados + End If + GvIndicadores.DataBind() + Objeto.Dispose() + End Sub + + Private Sub GvIndicadores_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvIndicadores.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DBCampo("CveEmpresa") <> "" Then + e.Row.FCCheckBox("chkIndicador").Checked = True + End If + End If + End Sub + + + +#End Region + +#Region "P L A N T I L L A C O R R E O" + + Private Sub BtnGuardarPlantilla_Click(sender As Object, e As EventArgs) Handles BtnGuardarPlantilla.Click + If UsuarioActual.Empresa.PlantillaMailVenta.Length > 0 Then + + End If + Dim ObjEmpresa As New ClsSisEmpresas() + If ObjEmpresa.UpdatePlantillaMail("AsuntoPlantillaMailVenta", TxtAsunto.Text.Trim, "PlantillaMailVenta", TxtPlantillaVenta.Text.Trim, CveEmpresa) Then + + If ObjEmpresa.UpdatePlantillaMail("AsuntoPlantillaMailVentaCotizacion", TxtAsuntoCotizacion.Text.Trim, "PlantillaMailVentaCotizacion", TxtPlantillaCotizacion.Text.Trim, CveEmpresa) Then + + End If + Alert("La plantilla de mail de ventas se guardó correctamente.", TipoMensaje.MsgInformacion) + + UsuarioActual.Empresa.PlantillaMailVenta = TxtPlantillaVenta.Text.Trim + UsuarioActual.Empresa.AsuntoPlantillaMailVenta = TxtAsunto.Text.Trim + + UsuarioActual.Empresa.AsuntoPlantillaMailVentaCotizacion = TxtPlantillaCotizacion.Text.Trim + UsuarioActual.Empresa.PlantillaMailVentaCotizacion = TxtAsuntoCotizacion.Text.Trim + + 'TxtPlantillaVenta.Text = "" + 'TxtAsunto.Text = "" + End If + ObjEmpresa.Dispose() + Alert(TxtPlantillaVenta.Text.Trim, TipoMensaje.MsgInformacion) + End Sub + + +#End Region + + Protected Sub LnkOpenModalDatosFiel_Click(sender As Object, e As EventArgs) + TxtFielPass.Text = "" + TxtFielArchivoCER.Text = "" + TxtFielArchivoKey.Text = "" + RegistraScript("$('#ModalUpFiel').modal();") + End Sub + Protected Sub LnkUpDatosFiel_Click(sender As Object, e As EventArgs) + Dim Password As String = TxtFielPass.Text + Dim akey As String + Dim acer As String + Dim pemkey As String + Dim pemcer As String + Dim pfxname As String + Dim Archivopfx As String + Dim Archivokey As Archivo = Nothing + Dim Archivocer As Archivo = Nothing + + Dim dirbase = "" ' String.Format("{0}Empresas\{1}\Certificados\Fiel\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa")) + Dim dirbasepfx = "" ' String.Format("{0}Empresas\{1}\Certificados\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa")) + If EmpresaEditar IsNot Nothing Then + dirbase = String.Format("{0}Certificados\Fiel\", EmpresaEditar.Ruta) + dirbasepfx = String.Format("{0}Certificados\", EmpresaEditar.Ruta) + Else + dirbase = String.Format("{0}Empresas\{1}\Certificados\Fiel\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa")) + dirbasepfx = String.Format("{0}Empresas\{1}\Certificados\", ModExtensiones.DirectorioBaseEmpresas, ViewState("CveEmpresa")) + End If + + If (Not Directory.Exists(dirbase)) Then + Directory.CreateDirectory(dirbase) + End If + + Dim Filesgral As List(Of Archivo) = TxtFielArchivoCER.getfiles().Archivos + If Filesgral.Count > 0 Then + Archivocer = Filesgral(0) + End If + Filesgral = TxtFielArchivoKey.getfiles().Archivos + If Filesgral.Count > 0 Then + Archivokey = Filesgral(0) + End If + If Not IsNothing(Archivokey) AndAlso Not IsNothing(Archivocer) And Password.Length > 0 Then + akey = String.Format("{0}{1}", dirbase, Archivokey.filenameO) + If File.Exists(akey) Then + File.Delete(akey) + End If + File.Copy(Archivokey.FileUrl, akey) + acer = String.Format("{0}{1}", dirbase, Archivocer.filenameO) + If File.Exists(acer) Then + File.Delete(acer) + End If + File.Copy(Archivocer.FileUrl, acer) + Archivopfx = Archivokey.filenameO.Substring(0, Archivokey.filenameO.Length - 4) + pemkey = String.Format("{0}{1}.pem", dirbase, Archivopfx) + pfxname = String.Format("{0}{1}.pfx", dirbasepfx, Archivopfx) + pemcer = String.Format("{0}{1}.pem", dirbase, Archivokey.filenameO.Substring(0, Archivocer.filenameO.Length - 4)) + + If File.Exists(pemkey) Then + File.Delete(pemkey) + End If + + If File.Exists(pfxname) Then + File.Delete(pfxname) + End If + + If File.Exists(pemcer) Then + File.Delete(pemcer) + End If + + Dim resultado As New StringBuilder + resultado.AppendLine("
PAso 1:
") + resultado.AppendLine(execCommand({"cd C:\Generar PFX\", String.Format("openssl.exe x509 -inform DER -in ""{0}"" -out ""{1}""", acer, pemcer)})) + resultado.AppendLine("
PAso 2:
") + resultado.AppendLine(execCommand({"cd C:\Generar PFX\", String.Format("openssl pkcs8 -inform DER -in ""{0}"" -passin pass:""{1}"" -out ""{2}""", akey, Password, pemkey)})) + resultado.AppendLine("
Paso 3:
") + resultado.AppendLine(execCommand({"cd C:\Generar PFX\", String.Format("openssl pkcs12 -export -out ""{0}"" -inkey ""{1}"" -in ""{2}"" -passout pass:""{3}""", pfxname, pemkey, pemcer, Password)})) + resultado.AppendLine("
") + 'Alert(resultado.ToString()) + + If File.Exists(pemkey) Then + File.Delete(pemkey) + End If + If File.Exists(pemcer) Then + File.Delete(pemcer) + End If + If File.Exists(acer) Then + File.Delete(acer) + End If + If File.Exists(akey) Then + File.Delete(akey) + End If + If File.Exists(Archivocer.FileUrl) Then + File.Delete(Archivocer.FileUrl) + End If + If File.Exists(Archivokey.FileUrl) Then + File.Delete(Archivokey.FileUrl) + End If + If Not File.Exists(pfxname) Then + Archivopfx = "" + Password = "" + End If + Dim objempresa As New ClsSisEmpresas + objempresa.UpEmpresaFiel(ViewState("CveEmpresa").ToString().ToEntero(), Password, $"{Archivopfx}.pfx") + objempresa.Dispose() + lblPassFiel.Text = Password + LblPfx.Text = $"{Archivopfx}.pfx" + Alert("La Fiel se ha actualizado") + UpmodalFiel.Update() + RegistraScript("$('#ModalUpFiel').modal('hide');") + Else + Alert("Favor de llenar todos los campos :
-Contraseña
-Archivo CER
-Archivo KEY", TipoMensaje.MsgAdvertencia) + End If + End Sub + Public Function execCommand(command As String()) As String + + Dim proceso As Diagnostics.Process = New Diagnostics.Process() + proceso.StartInfo.FileName = "cmd.exe" + proceso.StartInfo.CreateNoWindow = True + proceso.StartInfo.RedirectStandardInput = True + proceso.StartInfo.RedirectStandardOutput = True + proceso.StartInfo.UseShellExecute = False + proceso.Start() + For Each c As String In command + proceso.StandardInput.WriteLine(c) + + Next + proceso.StandardInput.Flush() + proceso.StandardInput.Close() + proceso.WaitForExit() + Return proceso.StandardOutput.ReadToEnd() + End Function + Private Sub CargaTareasProgramadas() + Dim objTP As New ClsTareasProgramadas() + ChkDescargaMasivaSat.Checked = False + If objTP.GetTareasProgramadas(ViewState("CveEmpresa").ToString.ToEntero()) AndAlso objTP.DtResultados.Rows.Count > 0 Then + ChkDescargaMasivaSat.Checked = (objTP.DtResultados.COUNT("CveTareaProgramada", "CveTareaProgramada=1") > 0) + End If + objTP.Dispose() + End Sub + Protected Sub ChkDescargaMasivaSat_CheckedChanged(sender As Object, e As EventArgs) + Dim objTP As New ClsTareasProgramadas() + If ChkDescargaMasivaSat.Checked Then + If objTP.AddTareasProgramadas(ViewState("CveEmpresa").ToString.ToEntero(), 1, DateTime.Now.ToString("yyyy/MM/dd"), "", 0, "", DateTime.Now.ToString("yyyy/MM/dd"), DateTime.Now.ToString("yyyy/MM/dd"), "", "", 0, 1) Then + Alert("La tarea programada de descarga masiva del sat a agregado satisfactoriamente") + End If + Else + If objTP.RemoveTareasProgramadas(1, ViewState("CveEmpresa").ToString().ToEntero()) Then + Alert("La tarea programada de descarga masiva del sat se ha removido satisfactoriamente") + End If + End If + + objTP.Dispose() + End Sub + Protected Sub LnkRegistrarPAC3_Click(sender As Object, e As EventArgs) + If Me.CveEmpresa > 0 Then + RegistrarPAC3() + Else + Alert("Debe registrar la empresa para poder registrarla en el PAC", TipoMensaje.MsgAdvertencia) + End If + + End Sub + Private Sub RegistrarPAC3() + Try + + Dim Credenciales As String = "vSGxMFWnNRy/nDoowxqrqw==|Sia123654" + Dim ArchivoLLave As String = String.Format("{0}\Certificados\{1}", EmpresaEditar.Ruta, EmpresaEditar.ArchivoKey) + Dim ArchivoCertificado As String = String.Format("{0}\Certificados\{1}", EmpresaEditar.Ruta, EmpresaEditar.ArchivoCer) + + Dim llaveByte = System.IO.File.ReadAllBytes(ArchivoLLave) + Dim certByte = System.IO.File.ReadAllBytes(ArchivoCertificado) + + Dim RFCEmisor = TxtRFC.Text.Trim() + Dim contrasena = TxtContraseñaKey.Text.Trim() + + Dim conector As New Profact.TimbraCFDI33.Conector(EmpresaEditar.FacturaProduccion) + + If Not EmpresaEditar.FacturaProduccion OrElse EmpresaEditar.CveEmpresa = 1 Then + conector.EstableceCredenciales("mvpNUXmQfK8=") + Else + conector.EstableceCredenciales(Credenciales) + End If + + Dim result = conector.RegistraEmisor(RFCEmisor, certByte, llaveByte, contrasena) + + If result.Exitoso Then + Alert("El emisor se registró correctamente.
" & result.Descripcion) + Else + Alert("Ocurrió un error al registrar el emisor.
" & result.Descripcion & ".
Numero Error: " & result.NumeroError, TipoMensaje.MsgError) + End If + + Catch ex As Exception + OnError("Ocurrió un error al registrar el emisor", ex) + End Try + + End Sub + + + + + + + Protected Sub LnkArchivoKey_Click(sender As Object, e As EventArgs) Handles LnkArchivoKey.Click + TxtCargaImg.getfiles().Archivos = Nothing + TxtCargaImg.Text = "[]" + OpActualizaArchivosCer = EnumOpActualizaArchivosCer.KEY + LblModalCertificadosTitulo.Text = "Archivo KEY" + UpModalCertificados.Update() + RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo")) + End Sub + + Protected Sub LnkArchivoCer_Click(sender As Object, e As EventArgs) Handles LnkArchivoCer.Click + TxtCargaImg.getfiles().Archivos = Nothing + TxtCargaImg.Text = "[]" + OpActualizaArchivosCer = EnumOpActualizaArchivosCer.CER + LblModalCertificadosTitulo.Text = "Archivo CER" + UpModalCertificados.Update() + RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo")) + End Sub + + Protected Sub LnkArchivoPfx_Click(sender As Object, e As EventArgs) Handles LnkArchivoPfx.Click + TxtCargaImg.getfiles().Archivos = Nothing + TxtCargaImg.Text = "[]" + OpActualizaArchivosCer = EnumOpActualizaArchivosCer.PFX + LblModalCertificadosTitulo.Text = "Archivo PFX" + UpModalCertificados.Update() + RegistraScript(String.Format("$('#{0}').modal();", "ModalArchvivo")) + End Sub + + Protected Sub BtnGuardarArchivo_Click(sender As Object, e As EventArgs) Dim FileExtension As String = "-1" Dim filesgral As List(Of Archivo) = TxtCargaImg.getfiles().Archivos - Dim filemove As String = "" - Dim TieneError As Boolean = False - - For Each fileItem As Archivo In filesgral - + Dim filemove As String = "" + Dim TieneError As Boolean = False + + For Each fileItem As Archivo In filesgral + FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") - filemove = fileItem.filename - - Dim Patron As String = "(^\d{1,}-)|(\.\w{1,}$)" - Dim NombreArchivo As String = Regex.Replace(filemove, Patron, "") - - Dim yaExistente As String = String.Format("{0}Empresas\{1}\Certificados\{2}.{3}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, NombreArchivo, FileExtension) - - Dim ArchivoCertificado As String = $"{NombreArchivo}.{FileExtension}" - + filemove = fileItem.filename + + Dim Patron As String = "(^\d{1,}-)|(\.\w{1,}$)" + Dim NombreArchivo As String = Regex.Replace(filemove, Patron, "") + + Dim yaExistente As String = String.Format("{0}Empresas\{1}\Certificados\{2}.{3}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, NombreArchivo, FileExtension) + + Dim ArchivoCertificado As String = $"{NombreArchivo}.{FileExtension}" + If File.Exists(yaExistente) Then - File.Delete(yaExistente) - End If - Try - If filemove <> "" Then - Dim Ruta As String = String.Format("Empresas\{0}\Certificados\", CveEmpresa) - filemove.FilesMove(NombreArchivo, Ruta) - End If - Catch ex As Exception - TieneError = True - End Try - - - If CveEmpresa > 0 AndAlso Not TieneError Then - - Dim ObjEmpresas As New ClsSisEmpresas - - - Dim ArchivoKey As String = "-1" - Dim ArchivoCer As String = "-1" - Dim ArchivoPfx As String = "-1" - - - If OpActualizaArchivosCer = EnumOpActualizaArchivosCer.KEY Then - ArchivoKey = ArchivoCertificado - TxtArchivoKey.Text = ArchivoKey - ElseIf OpActualizaArchivosCer = EnumOpActualizaArchivosCer.CER Then - ArchivoCer = ArchivoCertificado - TxtArchivoCer.Text = ArchivoCer - ElseIf OpActualizaArchivosCer = EnumOpActualizaArchivosCer.PFX Then - ArchivoPfx = ArchivoCertificado - TxtArchivoPfx.Text = ArchivoPfx - End If - - If Not ObjEmpresas.UpdateEmpresasCertificados(ArchivoKey, ArchivoCer, ArchivoPfx, CveEmpresa) Then - TieneError = True - End If - - - ObjEmpresas.Dispose() - - End If - - - - Next - - - - - - If Not TieneError Then - Alert("Certificado cargado con exito") - RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo")) - End If - TxtCargaImg.getfiles().Archivos = Nothing - UpAddArchivo.Update() - - - - - - End Sub - - Protected Sub LbArchivoKeyDescarga_Download(sender As Object, e As EventArgs) Handles LbArchivoKeyDescarga.Click - - Dim NombreArchivo As String = TxtArchivoKey.Text - DescargarArchivo(NombreArchivo) - - End Sub - - Protected Sub LbArchivoCerDescarga_Download(sender As Object, e As EventArgs) Handles LbArchivoCerDescarga.Click - - Dim NombreArchivo As String = TxtArchivoCer.Text - DescargarArchivo(NombreArchivo) - - End Sub - - Protected Sub LbArchivoPfxDescarga_Download(sender As Object, e As EventArgs) Handles LbArchivoPfxDescarga.Click - - Dim NombreArchivo As String = TxtArchivoPfx.Text - DescargarArchivo(NombreArchivo) - - End Sub - - Private Sub DescargarArchivo(NombreArchivo As String) - - Dim FilePath As String = String.Format("{0}Empresas\{1}\Certificados\{2}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, NombreArchivo) - Dim byteArray As Byte() = File.ReadAllBytes(FilePath) - - HttpContext.Current.Response.Clear() - HttpContext.Current.Response.ClearContent() - HttpContext.Current.Response.ContentType = "application/octet-stream" - HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", NombreArchivo)) - HttpContext.Current.Response.AddHeader("Content-Length", byteArray.Length.ToString()) - HttpContext.Current.Response.OutputStream.Write(byteArray, 0, byteArray.Length) - HttpContext.Current.Response.End() - - End Sub - -End Class + File.Delete(yaExistente) + End If + Try + If filemove <> "" Then + Dim Ruta As String = String.Format("Empresas\{0}\Certificados\", CveEmpresa) + filemove.FilesMove(NombreArchivo, Ruta) + End If + Catch ex As Exception + TieneError = True + End Try + + + If CveEmpresa > 0 AndAlso Not TieneError Then + + Dim ObjEmpresas As New ClsSisEmpresas + + + Dim ArchivoKey As String = "-1" + Dim ArchivoCer As String = "-1" + Dim ArchivoPfx As String = "-1" + + + If OpActualizaArchivosCer = EnumOpActualizaArchivosCer.KEY Then + ArchivoKey = ArchivoCertificado + TxtArchivoKey.Text = ArchivoKey + ElseIf OpActualizaArchivosCer = EnumOpActualizaArchivosCer.CER Then + ArchivoCer = ArchivoCertificado + TxtArchivoCer.Text = ArchivoCer + ElseIf OpActualizaArchivosCer = EnumOpActualizaArchivosCer.PFX Then + ArchivoPfx = ArchivoCertificado + TxtArchivoPfx.Text = ArchivoPfx + End If + + If Not ObjEmpresas.UpdateEmpresasCertificados(ArchivoKey, ArchivoCer, ArchivoPfx, CveEmpresa) Then + TieneError = True + End If + + + ObjEmpresas.Dispose() + + End If + + + + Next + + + + + + If Not TieneError Then + Alert("Certificado cargado con exito") + RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalArchvivo")) + End If + TxtCargaImg.getfiles().Archivos = Nothing + UpAddArchivo.Update() + + + + + + End Sub + + Protected Sub LbArchivoKeyDescarga_Download(sender As Object, e As EventArgs) Handles LbArchivoKeyDescarga.Click + + Dim NombreArchivo As String = TxtArchivoKey.Text + DescargarArchivo(NombreArchivo) + + End Sub + + Protected Sub LbArchivoCerDescarga_Download(sender As Object, e As EventArgs) Handles LbArchivoCerDescarga.Click + + Dim NombreArchivo As String = TxtArchivoCer.Text + DescargarArchivo(NombreArchivo) + + End Sub + + Protected Sub LbArchivoPfxDescarga_Download(sender As Object, e As EventArgs) Handles LbArchivoPfxDescarga.Click + + Dim NombreArchivo As String = TxtArchivoPfx.Text + DescargarArchivo(NombreArchivo) + + End Sub + + Private Sub DescargarArchivo(NombreArchivo As String) + + Dim FilePath As String = String.Format("{0}Empresas\{1}\Certificados\{2}", ModExtensiones.DirectorioBaseEmpresas, CveEmpresa, NombreArchivo) + Dim byteArray As Byte() = File.ReadAllBytes(FilePath) + + HttpContext.Current.Response.Clear() + HttpContext.Current.Response.ClearContent() + HttpContext.Current.Response.ContentType = "application/octet-stream" + HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("attachment;filename={0}", NombreArchivo)) + HttpContext.Current.Response.AddHeader("Content-Length", byteArray.Length.ToString()) + HttpContext.Current.Response.OutputStream.Write(byteArray, 0, byteArray.Length) + HttpContext.Current.Response.End() + + End Sub + +End Class diff --git a/Ventas/CatImpuestosLocales.aspx.vb b/Ventas/CatImpuestosLocales.aspx.vb index 90651bd66..9c236d2a6 100644 --- a/Ventas/CatImpuestosLocales.aspx.vb +++ b/Ventas/CatImpuestosLocales.aspx.vb @@ -160,7 +160,7 @@ Partial Class Ventas_CatImpuestosLocales If CveImpuestoLocal = -1 Then If ChkEstatus.Checked Then Estatus = 1 - If ObjVentas.AddImpuestosLocales(TxtImpuesto.Text.Trim, TxtPorcentaje.Text.ToDecimal, TxtOrden.Text.ToEntero, DdlTipoImpuesto.SelectedValue.ToEntero, Estatus, DdlCuentasContables.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) Then + If ObjVentas.AddImpuestosLocales(TxtImpuesto.Text.Trim, TxtPorcentaje.Text.ToDecimal, TxtOrden.Text.ToEntero, DdlTipoImpuesto.SelectedValue.ToEntero, Estatus, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) Then CargaDatos() End If TxtImpuesto.Text = "" @@ -174,10 +174,9 @@ Partial Class Ventas_CatImpuestosLocales Dim Porcentaje As Decimal = TxtPorcentaje.Text.ToDecimal Dim Orden = TxtOrden.Text.ToEntero Dim TipoImpuesto = DdlTipoImpuesto.SelectedValue.ToEntero - Dim IdCtaContable = DdlCuentasContables.SelectedValue.ToEntero If ChkEstatus.Checked Then Estatus = 1 - If Not ObjVentas.UpdateImpuestosLocales(CveImpuestoLocal, Impuesto, Porcentaje, Orden, TipoImpuesto, Estatus, IdCtaContable, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) Then + If Not ObjVentas.UpdateImpuestosLocales(CveImpuestoLocal, Impuesto, Porcentaje, Orden, TipoImpuesto, Estatus, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) Then TieneError = True End If ObjVentas.Dispose() diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index fbd6f8e67..25dc5a555 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -2004,7 +2004,7 @@
- Pago múltiples facturas Pagar múltiples facturas + Pago múltiples facturas Pagar múltiples facturas   diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index da1f3cf15..01eda9474 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -110,15 +110,6 @@ Partial Class Clientes End Set End Property - Private Property IdCtaCompCliente As String - Get - Return If(IsNothing(ViewState("IdCtaCompCliente")), "", ViewState("IdCtaCompCliente").ToString()) - End Get - Set(value As String) - ViewState("IdCtaCompCliente") = value - End Set - End Property - Private Property ArrayDisp As String Get Return If(IsNothing(ViewState("ArrayDisp")), "", ViewState("ArrayDisp").ToString()) @@ -205,7 +196,6 @@ Partial Class Clientes End Set End Property - Private Property DTCobrosRealizados As DataTable Get If ViewState("DTCobrosRealizados") Is Nothing Then @@ -1355,8 +1345,7 @@ Partial Class Clientes DdlCorporativo.DataBind() End Sub Protected Sub CargaCuentasExistentes() - 'SELECTED VALUES - ActivarRegistroAutomatico() + 'SELECTED VALUES HeaderContable.Attributes.Remove("onclick") UpFiscalContable.Update() End Sub @@ -2317,17 +2306,6 @@ Partial Class Clientes End Try End Sub - Private Function AsignaCuentasAutomaticas(ObjClientes As ClsClientes) As Boolean - Dim IdCtaContableClientes As Integer = UsuarioActual.Empresa.Funcionalidad(246).ToEntero() - Dim IdCtaContableAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(319).ToEntero() - Dim IdCtaContableComplementaria As Integer = UsuarioActual.Empresa.Funcionalidad(320).ToEntero() - Dim IdCtaContMonedaExtranjera As Integer = UsuarioActual.Empresa.Funcionalidad(331).ToEntero() - Dim IdCtaContMonedaExtranjeraAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(332).ToEntero() - Dim IdCtaContCompAnticipos As Integer = UsuarioActual.Empresa.Funcionalidad(333).ToEntero() - - Return True - End Function - Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click If UsuarioActual.CveUsuario = 1465 And TxtCodigo.Text.Trim = "" Then Alert("El cliente no se puede registrar sin ingresar un Código.", TipoMensaje.MsgAdvertencia) @@ -2603,10 +2581,6 @@ Partial Class Clientes 'Next GuardarDocumentosClientes() - If Not AsignaCuentasAutomaticas(ObjClientes) Then - ErrorProceso = True - End If - For Each GVR As GridViewRow In GvImpuestosLocales.Rows If GVR.FCCheckBox("ChkDeduccion").Checked Then ObjClientes.AddClienteImpuestosLocales(CveCliente, GVR.DataKey("CveImpuestoLocal").ToEntero()) @@ -2645,8 +2619,6 @@ Partial Class Clientes End If End If - - If ErrorProceso Then ObjClientes.RollBack() Else @@ -3758,14 +3730,11 @@ Partial Class Clientes Private Function AgregarCuentaContable(btn As Button, ddl As DropDownList, ByRef CodigoCuentaAltaCompaq As String, ByRef NombreCuentaCuentaAltaCompaq As String, ByRef IdCuentaAltaCompaq As Integer) As Boolean Dim IdCuentaContable As Integer = -1 Dim CtaCodigo As String = "" - Dim TieneError = False - Dim IdCtaContableClientes As Integer = -1, IdCtaContableAnticipos As Integer = -1, IdCtaContableRetIVA As Integer = -1, IdCtaContableRetISR As Integer = -1 + Dim TieneError = False Dim ProcesoCorrecto As Boolean Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa) - - ObjContaAC.IniciaTransacSQL() Dim CuentaPadre = -1 @@ -3785,8 +3754,6 @@ Partial Class Clientes 'SI EL NOMBRE DEL PROVEEDOR ES MAYOR DE 50 LO CORTAMOS Dim NombreCuenta = If(TxtNombreComercial.Text.Trim.Length > 50, TxtNombreComercial.Text.Trim.Substring(0, 50), TxtNombreComercial.Text.Trim) - - IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(CuentaPadre, NombreCuenta, Tipo:="A", CuentaMayor:=2) NombreCuentaCuentaAltaCompaq = NombreCuenta @@ -3800,21 +3767,8 @@ Partial Class Clientes If dt.Rows.Count = 1 Then Dim row As DataRow = dt.Rows(0) - CtaCodigo = CStr(row("CtaCodigo")) - CodigoCuentaAltaCompaq = CStr(row("Codigo")) - - Select Case btn.CommandArgument.ToString() - Case "Clientes" - IdCtaContableClientes = IdCuentaContable - Case "Anticipos" - IdCtaContableAnticipos = IdCuentaContable - Case "RetIVA" - IdCtaContableRetIVA = IdCuentaContable - Case "RetISR" - IdCtaContableRetISR = IdCuentaContable - End Select - + CodigoCuentaAltaCompaq = CStr(row("Codigo")) Else TieneError = True End If @@ -3823,9 +3777,6 @@ Partial Class Clientes TieneError = True End If - - - If Not TieneError Then ObjContaAC.Commit() 'Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion)) @@ -3889,40 +3840,14 @@ Partial Class Clientes End If End If - - - - Return Respuesta - End Function - - Private Sub ActivarRegistroAutomatico() - - 'Clientes - If DdlCtaContableClientes.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(211).ToEntero() > 0 Then - BtnActivaRegistroClientes.Visible = True - End If - - 'Anticipos - If DdlCtaContableAnticipos.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(212).ToEntero() > 0 Then - BtnActivaRegistroAnticipos.Visible = True - End If - - 'Ret IVA - If DdlCtaContableRetIVA.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(213).ToEntero() > 0 Then - BtnActivaRegistroIVA.Visible = True - End If - - 'Ret ISR - If DdlCtaContableRetISR.SelectedValue.ToEntero() <= 0 And UsuarioActual.Empresa.Funcionalidad(214).ToEntero() > 0 Then - BtnActivaRegistroISR.Visible = True - End If - - End Sub + End Function + + #End Region - + #Region " I M P R I M I R P D F" - + Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs) DdlTipoDocto.ClearSelection() If ChkAntIXCNC.Checked Then @@ -9411,15 +9336,10 @@ Partial Class Clientes Row("Descuento") = Math.Round(Descuento, NumeroDecimales) Row("TipoDescuento") = 0 Row("Total") = (Cantidad * PU) - Row("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales) - 'Row("AsientoContableVentas") = DrPS("AsientoContableVentas") - ' Row("IdCtaContVentas") = IdCtaContable - ' Row("AplicaParaConcepto") = AplicaParaConcepto - + Row("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales) Row("SATClaveProdServ") = DrPS("SATClavePS") Row("SATClaveUM") = DrPS("SATClaveUnidadMedida") - Row("EntregaDirecta") = EntregaDirecta 'Contratos Row("CveContratoDetalle") = CveContratoDetalle @@ -10421,9 +10341,7 @@ Partial Class Clientes Alert("Vendedor Cambiado Correctamente.", TipoMensaje.MsgInformacion, $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}""") End If - End Sub - - + End Sub Private Sub MuestraOcultaGenero() DvGenero.Visible = False diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 429225312..afddeab53 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -15,14 +15,9 @@
  • Saldar Cuentas Incobrables
  • - <%--
  • - Vincular Intermediario -
  • --%> -
  • Cargar Layout
  • -
    @@ -47,7 +42,7 @@ Banco   Ingresos x Comprobar - Pago Intermediario + <%-- Pago Intermediario--%>
    @@ -264,7 +259,7 @@
    -
    +
    Vinculación de intermediarios @@ -297,7 +292,6 @@ -
    @@ -305,7 +299,7 @@ - - + - + - - + + diff --git a/Ventas/RepVentaDetalle.aspx.vb b/Ventas/RepVentaDetalle.aspx.vb index e3c411985..652ed2836 100644 --- a/Ventas/RepVentaDetalle.aspx.vb +++ b/Ventas/RepVentaDetalle.aspx.vb @@ -765,6 +765,19 @@ Partial Class RepVentaDetalle ListPersonalizada.Add("Saldo") End If + + If ChkMetodoPago.Checked Then + ListPersonalizada.Add("MetodoPago") + End If + + If ChkFormaPago.Checked Then + ListPersonalizada.Add("FormaPago") + End If + + If ChkUsoCFDI.Checked Then + ListPersonalizada.Add("UsoCFDI") + End If + If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then 'Alert("Personalizacion guardada") End If @@ -818,6 +831,10 @@ Partial Class RepVentaDetalle ChkFolioFacturacion.Checked = False ChkSaldo.Checked = False + ChkMetodoPago.Checked = False + ChkFormaPago.Checked = False + ChkUsoCFDI.Checked = False + Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c) For Each personalizacion As String In Personalizaciones @@ -930,6 +947,17 @@ Partial Class RepVentaDetalle Case "Saldo" ChkSaldo.Checked = True Exit Select + + Case "MetodoPago" + ChkMetodoPago.Checked = True + Exit Select + Case "FormaPago" + ChkFormaPago.Checked = True + Exit Select + Case "UsoCFDI" + ChkUsoCFDI.Checked = True + Exit Select + Case Else Exit Select End Select @@ -983,6 +1011,9 @@ Partial Class RepVentaDetalle GvDatos.Columns(33).Visible = ChkSaldo.Checked GvDatos.Columns(34).Visible = ChkOrdenCompra.Checked GvDatos.Columns(35).Visible = ChkPedidoContrato.Checked + GvDatos.Columns(36).Visible = ChkMetodoPago.Checked + GvDatos.Columns(37).Visible = ChkFormaPago.Checked + GvDatos.Columns(38).Visible = ChkUsoCFDI.Checked Personalizo = 1 If Personalizo = 1 Then From 27e778884e100948b2108171c4de78f6050c1789 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 24 Aug 2023 18:17:05 -0700 Subject: [PATCH 059/111] =?UTF-8?q?compilaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RH/CatDocumentos.aspx.vb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/RH/CatDocumentos.aspx.vb b/RH/CatDocumentos.aspx.vb index 530066dbc..55bf7dd7f 100644 --- a/RH/CatDocumentos.aspx.vb +++ b/RH/CatDocumentos.aspx.vb @@ -92,7 +92,7 @@ Partial Class RH_CatDocumentos Property Estatus As Boolean Get If ViewState("Estatus") Is Nothing Then - Return 0 + Return False Else Return DirectCast(ViewState("Estatus"), Boolean) End If @@ -220,21 +220,21 @@ Partial Class RH_CatDocumentos Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - CveDocumentacion = GvRow.DataKey("CveDocumentacion") + CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToEntero Documentacion = GvRow.DataKey("Documentacion") DocumentacionFormato = GvRow.DataKey("DocumentacionFormato") - CveDocumentacionTipo = GvRow.DataKey("CveDocumentacionTipo") + CveDocumentacionTipo = GvRow.DataKey("CveDocumentacionTipo").ToEntero DocumentacionTipo = GvRow.DataKey("DocumentacionTipo") - Orden = GvRow.DataKey("Orden") - Estatus = GvRow.DataKey("Estatus") - Requerido = GvRow.DataKey("Requerido") + Orden = GvRow.DataKey("Orden").ToEntero + Estatus = Boolean.Parse(GvRow.DataKey("Estatus")) + Requerido = Boolean.Parse(GvRow.DataKey("Requerido")) Txtdocumentacion.Text = Documentacion - TxtOrden.Text = Orden + TxtOrden.Text = Orden.ToString TxtDiasLimite.Text = GvRow.DataKey("DiasLimite") - ChkAplicaDiasLimite.Checked = GvRow.DataKey("AplicaDiasLimite") - ChkAplicaFechaVencimiento.Checked = GvRow.DataKey("AplicaFechaVencimiento") + ChkAplicaDiasLimite.Checked = Boolean.Parse(GvRow.DataKey("AplicaDiasLimite")) + ChkAplicaFechaVencimiento.Checked = Boolean.Parse(GvRow.DataKey("AplicaFechaVencimiento")) DdlDocumentacionTipo.SelectedValueExist(CveDocumentacionTipo) @@ -306,7 +306,7 @@ Partial Class RH_CatDocumentos Public Sub Remove_ClickDocumentacion(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion") + Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero Dim _documetacionFormato As String = GvRow.DataKey("DocumentacionFormato") @@ -423,7 +423,7 @@ Partial Class RH_CatDocumentos 'Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad") Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato") - Dim separado As Char() = {"."} + Dim separado As Char() = {"."c} Dim array() As String = DocumetacionFormato.Split(separado) Dim extencion As String = "" From 5779bca485aabaa1a3091f8a1473834a18e24c45 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 24 Aug 2023 18:32:03 -0700 Subject: [PATCH 060/111] -- poder desconciliar cuando es caja chica --- App_Code/ClsBancos.vb | 1 + Bancos/IE.aspx | 7 ++----- Bancos/IE.aspx.vb | 26 +++++++++++++++++++++----- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index dc7db36d4..511993a15 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -717,6 +717,7 @@ Public Class ClsBancos Me.CveBanco = Data.Rows(0)("CveBanco").ToString.ToEntero Me.Banco = Data.Rows(0)("Banco").ToString Me.NumCuenta = Data.Rows(0)("NumCuenta").ToString + Me.CveTipoCuenta = Data.Rows(0)("CveTipoCuenta").ToString.ToEntero Me.CveTipoTransaccion = Data.Rows(0)("CveTipoTransaccion").ToString.ToEntero Me.Tipo = Data.Rows(0)("Tipo").ToString Me.TipoTransaccion = Data.Rows(0)("TipoTransaccion").ToString diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 6d21f2776..c87d57e71 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -770,10 +770,7 @@ - --%> - - - + --%> diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index a0101dd2a..bd27d5f85 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1026,6 +1026,8 @@ Partial Class Bancos_IE If UsuarioActual.TienePermisoProceso(154) AndAlso ObjIE.CveUsuario = UsuarioActual.CveUsuario And Not ObjIE.IDPoliza > 0 AndAlso NumComplementos = 0 Then LnkEliminar.Visible = True End If + Else + If UsuarioActual.TienePermisoProceso(80) AndAlso ObjIE.CveTipoCuenta = 1 Then LnkDesconciliar.Visible = True End If If UsuarioActual.TienePermisoProceso(85) AndAlso Not ObjIE.FueConciliado Then LnkCancelar.Visible = True @@ -5681,11 +5683,25 @@ Partial Class Bancos_IE End If - - - - - End Sub + + Protected Sub LnkDesconciliar_Click(sender As Object, e As EventArgs) + Dim ObjIE As New ClsBancos() + ObjIE.IniciaTransacSQL() + Dim OcurrioError As Boolean = False + + If Not ObjIE.UpdateBancos_IEConciliado(False, MinFecha, 0, -1, UsuarioActual.CveUsuario, CveIE) Then + OcurrioError = True + End If + If OcurrioError Then + ObjIE.RollBack() + Alert("No se pudo realizar la desconciliación ", TipoMensaje.MsgAdvertencia) + Else + ObjIE.Commit() + Alert("Los movimientos se desconciliarion correctamente.", TipoMensaje.MsgInformacion) + End If + + ObjIE.Dispose() + End Sub End Class \ No newline at end of file From 8984b01bfe664a254f57b428d8bd0ee71812357a Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 24 Aug 2023 20:54:18 -0700 Subject: [PATCH 061/111] - --- Compras/Compras.aspx.vb | 2 +- Contabilidad/RegPrePolizaS.aspx.vb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 358583201..6307b5aaa 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2539,7 +2539,7 @@ Partial Class Compras_Compras VisualizaEstatusCompraSaldo(dr("TipoDocto").ToString, dr("Saldo").ToString.ToDecimal, dr("Total").ToString.ToDecimal) If dr("IdPoliza").ToString.ToEntero > 0 Then HplCompraContabilizada.Text = "Si" - HplCompraContabilizada.NavigateUrl = String.Format("/Contabilidad/RegPoliza.aspx?IdPoliza={0}", dr("IdPoliza")) + 'HplCompraContabilizada.NavigateUrl = String.Format("/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}", dr("IdPoliza")) LblCompraEstatus.ForeColor = Drawing.Color.Navy trContabilizada.Visible = True If UsuarioActual.TienePermisoProceso(107) Then BtnDescontabilizar.Visible = True diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 311f3a600..a89c16251 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1711,11 +1711,11 @@ Partial Class ContabilidadC_RegPrePolizaS DtMovimientos.Rows.Add(dr) DtMovimientos.AcceptChanges() - If CvePrePoliza > 0 Or CvePrePolizaOrigen > 0 Then - GvPrePoliza.DataSource = DtMovimientos - GvPrePoliza.DataBind() - UpPrePoliza.Visible = True - End If + 'If CvePrePoliza > 0 Or CvePrePolizaOrigen > 0 Then + GvPrePoliza.DataSource = DtMovimientos + GvPrePoliza.DataBind() + UpPrePoliza.Visible = True + 'End If TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero From 7789b60482bc6ceb8306fd227620558baf6d5c83 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 24 Aug 2023 20:55:34 -0700 Subject: [PATCH 062/111] -- --- OC/OC.aspx.vb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index a65ff2d67..408aba4c6 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -3340,11 +3340,9 @@ Partial Class OC_OC HuboError = True End If - - If (Not HuboError) AndAlso objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega, CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, - PorcentajeIVA:=PorIVA.ToDecimal, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, + PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim) Then @@ -8538,7 +8536,7 @@ Partial Class OC_OC Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero) Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100 - AddPS(Cantidad.ToString, CvePS, PS, "", PrecioUnitario, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UM, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, LblCodigo.Text, + AddPS(Cantidad, CvePS, PS, "", PrecioUnitario, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UM, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, LblCodigo.Text, CveActivoFijo, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer, IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero, DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR) @@ -8663,7 +8661,7 @@ Partial Class OC_OC If Cantidad > 0 Then - AddPS(Cantidad.ToString, CvePS, PS, PS, PU, 0, TotalPS, + AddPS(Cantidad, CvePS, PS, PS, PU, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UMAbreviatura, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, Codigo, -1, 0, -1, -1, IdCuentaPorEjercer, IdCuentaComprometido, -1, -1, -1, -1, From 6ac06a9649a0bb38312d061a84a1368b4af72969 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 25 Aug 2023 07:35:45 -0700 Subject: [PATCH 063/111] -- option strict on --- RH/CatEstatusPersonal.aspx.vb | 2 +- RH/CatMotivoBaja.aspx.vb | 2 +- Sistemas/CatDistribuidores.aspx.vb | 2 +- Sistemas/CatModulos.aspx.vb | 6 ++-- Sistemas/CatParametros.aspx.vb | 2 +- Sistemas/CatSesiones.aspx.vb | 2 +- Sistemas/CatTareasProgramadas.aspx.vb | 32 +++++++++++----------- Sistemas/PopUpAddUsuario.aspx.vb | 12 ++++---- Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb | 2 +- Sistemas/Registro.aspx.vb | 2 +- Sistemas/SessionesActivas.aspx.vb | 2 +- Ventas/CatAutorizacionLimites.aspx.vb | 4 +-- Ventas/CatCobranzaEstatus.aspx.vb | 4 +-- Ventas/CatDocumentosClientes.aspx.vb | 28 +++++++++---------- Ventas/CatMetasVendedores.aspx.vb | 8 +++--- Ventas/MetasVendedores.aspx.vb | 6 ++-- Ventas/PuntoVenta.aspx.vb | 2 +- Ventas/RepIngresosDetalle.aspx.vb | 2 +- Ventas/RepVentasMensuales.aspx.vb | 10 +++---- Ventas/RepVentasMensualesDetalle.aspx.vb | 16 +++++------ Ventas/RepVentasResumen.aspx.vb | 6 ++-- 21 files changed, 76 insertions(+), 76 deletions(-) diff --git a/RH/CatEstatusPersonal.aspx.vb b/RH/CatEstatusPersonal.aspx.vb index 845e2274b..2823b5390 100644 --- a/RH/CatEstatusPersonal.aspx.vb +++ b/RH/CatEstatusPersonal.aspx.vb @@ -165,7 +165,7 @@ Partial Class RH_CatEstatusPersonal Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar PersonalEstatTxt.Text = GvRow.DataKey("EstatusPersonal") ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) - CveEstatusPerAEditar = GvRow.DataKey("CveEstatusPersonal") 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating" + CveEstatusPerAEditar = GvRow.DataKey("CveEstatusPersonal").ToEntero 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating" UpDatos.Update() If ViewState("Orden").ToString() <> String.Empty Then diff --git a/RH/CatMotivoBaja.aspx.vb b/RH/CatMotivoBaja.aspx.vb index f8819100a..f79d98cb1 100644 --- a/RH/CatMotivoBaja.aspx.vb +++ b/RH/CatMotivoBaja.aspx.vb @@ -166,7 +166,7 @@ Partial Class RH_CatMotivoBaja Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar MotivoTxt.Text = GvRow.DataKey("MotivoBaja") ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) - CveMotivoBajaAEditar = GvRow.DataKey("CveMotivoBaja") 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating" + CveMotivoBajaAEditar = GvRow.DataKey("CveMotivoBaja").ToEntero 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating" UpDatos.Update() If ViewState("Orden").ToString() <> String.Empty Then diff --git a/Sistemas/CatDistribuidores.aspx.vb b/Sistemas/CatDistribuidores.aspx.vb index 0ac9a52dd..323c6e784 100644 --- a/Sistemas/CatDistribuidores.aspx.vb +++ b/Sistemas/CatDistribuidores.aspx.vb @@ -95,7 +95,7 @@ Partial Class Sistemas_CatDistribuidores Alert("Ocurrió un error al agregar el distribuidor", TipoMensaje.MsgError) End If ElseIf EsEditar = 1 Then - If Plataforma.UpdateDistribuidor(CveDistribuidor, DdlPlataforma.SelectedValue, TxtDistribuidor.Text) Then + If Plataforma.UpdateDistribuidor(CveDistribuidor, DdlPlataforma.SelectedValue.ToEntero, TxtDistribuidor.Text) Then Alert("el distribuidor se editó correctamente", TipoMensaje.MsgInformacion) Else Alert("Ocurrió un error al editar el distribuidor", TipoMensaje.MsgError) diff --git a/Sistemas/CatModulos.aspx.vb b/Sistemas/CatModulos.aspx.vb index e6202457a..f9edb6651 100644 --- a/Sistemas/CatModulos.aspx.vb +++ b/Sistemas/CatModulos.aspx.vb @@ -54,8 +54,8 @@ Partial Class CatModulos UpDatos.Update() End If ElseIf HdnModalidad.Value = "U" Then - If Modulo.UpdateModulo(CboPadres.SelectedValue, TxtDescripcion.Text.Trim(), TxtLiga.Text.Trim(), CboPopUp.SelectedValue, TxtAncho.Text.Trim().ToEntero(), TxtAlto.Text.Trim().ToEntero(), - TxtOrden.Text.Trim().ToEntero(), TxtEstilo.Text.Trim(), CboIncluye.SelectedValue, CboAgrupacion.SelectedValue, UsuarioActual.CveUsuario, HdnID.Value, DdlPlataforma.SelectedValue.ToEntero) Then + If Modulo.UpdateModulo(CboPadres.SelectedValue.ToEntero, TxtDescripcion.Text.Trim(), TxtLiga.Text.Trim(), CboPopUp.SelectedValue, TxtAncho.Text.Trim().ToEntero(), TxtAlto.Text.Trim().ToEntero(), + TxtOrden.Text.Trim().ToEntero(), TxtEstilo.Text.Trim(), CboIncluye.SelectedValue, CboAgrupacion.SelectedValue, UsuarioActual.CveUsuario, HdnID.Value.ToEntero, DdlPlataforma.SelectedValue.ToEntero) Then RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalModulos")) Alert("El Módulo se actualizó correctamente.", TipoMensaje.MsgInformacion) CargaDatos() @@ -117,7 +117,7 @@ Partial Class CatModulos If Modulo.GetModulos(-1, -1, "-1", "-1") Then e.Row.FCDropDownList("B").DataSource = Modulo.DtResultados.FiltraParametros("CvePadre = 0 OR Agrupacion = 'S'") e.Row.FCDropDownList("B").DataBind() - e.Row.FCDropDownList("B").SelectedValue = e.Row.FCLabel("LB").Text.ToEntero + e.Row.FCDropDownList("B").SelectedValue = e.Row.FCLabel("LB").Text End If End If diff --git a/Sistemas/CatParametros.aspx.vb b/Sistemas/CatParametros.aspx.vb index e57d476e6..b99491190 100644 --- a/Sistemas/CatParametros.aspx.vb +++ b/Sistemas/CatParametros.aspx.vb @@ -46,7 +46,7 @@ Partial Class CatParametros Protected Sub LbAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LbAgregar.Click Dim Parametro As New ClsSisParametros - If Parametro.AddParametros(TxtCveParam.Text.ToEntero, TxtDescripcion.Text.Trim, CboModulos.SelectedValue.ToEntero, TxtStrValor1.Text, TxtStrValor2.Text, TxtNumValor1.Text.ToEntero, TxtNumValor2.Text.ToEntero, TxtDTValor1.Text, TxtDTValor2.Text, TxtDTVencimiento.Text, UsuarioActual.CveUsuario) Then + If Parametro.AddParametros(TxtCveParam.Text.ToEntero, TxtDescripcion.Text.Trim, CboModulos.SelectedValue.ToEntero, TxtStrValor1.Text, TxtStrValor2.Text, TxtNumValor1.Text, TxtNumValor2.Text, TxtDTValor1.Text, TxtDTValor2.Text, TxtDTVencimiento.Text, UsuarioActual.CveUsuario) Then TxtDescripcion.Text = "" Alert("El nuevo Parámetro se guardó correctamente.", TipoMensaje.MsgInformacion) diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb index f0e7e95d8..3c2bf4144 100644 --- a/Sistemas/CatSesiones.aspx.vb +++ b/Sistemas/CatSesiones.aspx.vb @@ -545,7 +545,7 @@ Partial Class Sistemas_CatSesiones 'Dim ObjOC As New ClsOC 'If ObjOC.GetEstatusUsuarios(-1, -1, -1, -1, -1) Then Application("GlobalDTOCEstatusUsuarios") = ObjOC.DtResultados Else Application("GlobalDTOCEstatusUsuarios") = Nothing 'ObjOC.Dispose() - GlobalDTOCEstatusUsuarios(UsuarioActual.CveEmpresa, -1, -1) = Nothing + GlobalDTOCEstatusUsuarios(UsuarioActual.CveEmpresa, -1, "-1") = Nothing End Sub 'Compras diff --git a/Sistemas/CatTareasProgramadas.aspx.vb b/Sistemas/CatTareasProgramadas.aspx.vb index 618e68667..30799fbe1 100644 --- a/Sistemas/CatTareasProgramadas.aspx.vb +++ b/Sistemas/CatTareasProgramadas.aspx.vb @@ -120,9 +120,9 @@ Partial Class Sistemas_CatTareasProgramadas LtlTituloModalTareasProgramadas.Text = "Agregar Tarea Programada" BtnAgregarTareasProgramadasModal.Text = "Agregar" - DdlTareaProgra.SelectedValue = -1 + DdlTareaProgra.SelectedValue = "-1" DdlTareaProgra_SelectedIndexChanged(Nothing, Nothing) - DdlEmpresas.SelectedValue = -1 + DdlEmpresas.SelectedValue = "-1" TxtNumerico.Text = "" TxtParametros.Text = "" TxtCorreo.Text = "" @@ -143,16 +143,16 @@ Partial Class Sistemas_CatTareasProgramadas Dim recursividadEnDias = 0 If DdlTipoR.SelectedValue.ToString = "D" Then - recursividadEnDias = TxtNumerico.Text + recursividadEnDias = TxtNumerico.Text.ToEntero ElseIf DdlTipoR.SelectedValue.ToString = "H" Then - recursividadEnHoras = TxtNumerico.Text + recursividadEnHoras = TxtNumerico.Text.ToEntero ElseIf DdlTipoR.SelectedValue.ToString = "M" Then - recursividadEnMinutos = TxtNumerico.Text + recursividadEnMinutos = TxtNumerico.Text.ToEntero End If If Not Actualizar Then - If ObTareasProgra.AddTareasProgramadas(DdlEmpresas.SelectedValue, DdlTareaProgra.SelectedValue, TxtFechaI.Text, "", recursividadEnMinutos, TxtParametros.Text, TxtFechaI.Text, TxtFechaI.Text, TxtCorreo.Text, TxtPlantilla.Text, recursividadEnHoras, recursividadEnDias) Then + If ObTareasProgra.AddTareasProgramadas(DdlEmpresas.SelectedValue.ToEntero, DdlTareaProgra.SelectedValue.ToEntero, TxtFechaI.Text, "", recursividadEnMinutos, TxtParametros.Text, TxtFechaI.Text, TxtFechaI.Text, TxtCorreo.Text, TxtPlantilla.Text, recursividadEnHoras, recursividadEnDias) Then CargadatosGvTareasProgramadas() @@ -168,7 +168,7 @@ Partial Class Sistemas_CatTareasProgramadas If ObTareasProgra.RemoveTareasProgramadas(CveTareaProgramada, CveEmpresa) Then End If - If ObTareasProgra.AddTareasProgramadas(DdlEmpresas.SelectedValue, DdlTareaProgra.SelectedValue, TxtFechaI.Text, "", recursividadEnMinutos, TxtParametros.Text, TxtFechaI.Text, TxtFechaI.Text, TxtCorreo.Text, TxtPlantilla.Text, recursividadEnHoras, recursividadEnDias) Then + If ObTareasProgra.AddTareasProgramadas(DdlEmpresas.SelectedValue.ToEntero, DdlTareaProgra.SelectedValue.ToEntero, TxtFechaI.Text, "", recursividadEnMinutos, TxtParametros.Text, TxtFechaI.Text, TxtFechaI.Text, TxtCorreo.Text, TxtPlantilla.Text, recursividadEnHoras, recursividadEnDias) Then CargadatosGvTareasProgramadas() UpModalTareasProgramadas.Update() @@ -193,9 +193,9 @@ Partial Class Sistemas_CatTareasProgramadas Dim ObTareasProgra As New ClsTareasProgramadas Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim activo As Boolean = 0 - CveTareaProgramada = GvRow.DataKey("CveTareaProgramada") - CveEmpresa = GvRow.DataKey("CveEmpresa") + Dim activo As Boolean = False + CveTareaProgramada = GvRow.DataKey("CveTareaProgramada").ToEntero + CveEmpresa = GvRow.DataKey("CveEmpresa").ToEntero If ObTareasProgra.RemoveTareasProgramadas(CveTareaProgramada, CveEmpresa) Then CargadatosGvTareasProgramadas() @@ -216,13 +216,13 @@ Partial Class Sistemas_CatTareasProgramadas Public Sub Edit_ClickTareasProgramadas(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim activo As Boolean = 0 + Dim activo As Boolean = False LtlTituloModalTareasProgramadas.Text = "Editar Tarea Programada" Actualizar = True - CveTareaProgramada = GvRow.DataKey("CveTareaProgramada") - CveEmpresa = GvRow.DataKey("CveEmpresa") + CveTareaProgramada = GvRow.DataKey("CveTareaProgramada").ToEntero + CveEmpresa = GvRow.DataKey("CveEmpresa").ToEntero DdlTareaProgra.SelectedValueExist(CveTareaProgramada) DdlTareaProgra_SelectedIndexChanged(Nothing, Nothing) @@ -230,13 +230,13 @@ Partial Class Sistemas_CatTareasProgramadas DdlEmpresas.SelectedValueExist(CveEmpresa) If GvRow.DataKey("RecursividadEnMinutos").ToEntero > 0 Then - TxtNumerico.Text = GvRow.DataKey("RecursividadEnMinutos").ToEntero + TxtNumerico.Text = GvRow.DataKey("RecursividadEnMinutos") DdlTipoR.SelectedValue = "M" ElseIf GvRow.DataKey("RecursividadEnHoras").ToEntero > 0 Then - TxtNumerico.Text = GvRow.DataKey("RecursividadEnHoras").ToEntero + TxtNumerico.Text = GvRow.DataKey("RecursividadEnHoras") DdlTipoR.SelectedValue = "H" ElseIf GvRow.DataKey("RecursividadEnDias").ToEntero > 0 Then - TxtNumerico.Text = GvRow.DataKey("RecursividadEnDias").ToEntero + TxtNumerico.Text = GvRow.DataKey("RecursividadEnDias") DdlTipoR.SelectedValue = "D" End If diff --git a/Sistemas/PopUpAddUsuario.aspx.vb b/Sistemas/PopUpAddUsuario.aspx.vb index 45b1b8c0c..795c55902 100644 --- a/Sistemas/PopUpAddUsuario.aspx.vb +++ b/Sistemas/PopUpAddUsuario.aspx.vb @@ -81,14 +81,14 @@ Partial Class Sistemas_PopUpAddUsuario CveProveedor = -1 End If - If UsuarioActual.Empresa.CvePlataforma = 3 AndAlso (ViewState("CveProveedor") > 0 Or ViewState("CveCliente") > 0) Then + If UsuarioActual.Empresa.CvePlataforma = 3 AndAlso (ViewState("CveProveedor").ToString.ToEntero > 0 Or ViewState("CveCliente").ToString.ToEntero > 0) Then CargaDispositivos() CargarNotificaciones() TabApp.Visible = True CargaGridModulosAccesoApp() End If - If UsuarioActual.Empresa.CvePlataforma = 1 AndAlso (ViewState("CveProveedor") > 0 OrElse ViewState("CveCliente") > 0) Then + If UsuarioActual.Empresa.CvePlataforma = 1 AndAlso (ViewState("CveProveedor").ToString.ToEntero > 0 OrElse ViewState("CveCliente").ToString.ToEntero > 0) Then TabVehiculos.Visible = False TabPermisoVehiculos.Visible = False TabNotificaciones.Visible = False @@ -105,9 +105,9 @@ Partial Class Sistemas_PopUpAddUsuario End If 'INICIALIZA CVEPLATAFORMA - If UsuarioActual.Empresa.CvePlataforma = 1 And ViewState("CveCliente") > 0 Then + If UsuarioActual.Empresa.CvePlataforma = 1 And ViewState("CveCliente").ToString.ToEntero > 0 Then ViewState("CvePlataforma") = 6 - ElseIf UsuarioActual.Empresa.CvePlataforma = 1 And ViewState("CveProveedor") > 0 Then + ElseIf UsuarioActual.Empresa.CvePlataforma = 1 And ViewState("CveProveedor").ToString.ToEntero > 0 Then ViewState("CvePlataforma") = 7 Else ViewState("CvePlataforma") = 3 @@ -126,7 +126,7 @@ Partial Class Sistemas_PopUpAddUsuario LtlUsuario.Text = ObjUsuario.DtResultados.Rows(0)("Usuario").ToString() TxtEmail.Text = ObjUsuario.DtResultados.Rows(0)("Correo").ToString() TxtNombre.Text = ObjUsuario.DtResultados.Rows(0)("Nombre").ToString() - ChkEstatus.Checked = ObjUsuario.DtResultados.Rows(0)("Estatus") + ChkEstatus.Checked = ObjUsuario.DtResultados.Rows(0)("Estatus").ToString = "True" If ObjUsuario.DtResultados.Rows(0)("CveRol").ToString.ToEntero = 1200 OrElse ObjUsuario.DtResultados.Rows(0)("CveRol").ToString.ToEntero = 1198 Then BtnDefaultPWD.Visible = True @@ -561,7 +561,7 @@ Partial Class Sistemas_PopUpAddUsuario For Each row As GridViewRow In GVNotificaciones.Rows If row.FCCheckBox("chkCorreo").Checked OrElse row.FCCheckBox("chkVentana").Checked OrElse row.FCCheckBox("chkSMS").Checked OrElse row.FCCheckBox("chkApp").Checked OrElse row.FCCheckBox("chkCampana").Checked Then - If Not ObjNotificaciones.AddUsuariosNotificacion(CveUsuario, row.DataKey("CveNotificacion"), row.FCCheckBox("chkCorreo").Checked, row.FCCheckBox("chkVentana").Checked, row.FCCheckBox("chkSMS").Checked, + If Not ObjNotificaciones.AddUsuariosNotificacion(CveUsuario, row.DataKey("CveNotificacion").ToEntero, row.FCCheckBox("chkCorreo").Checked, row.FCCheckBox("chkVentana").Checked, row.FCCheckBox("chkSMS").Checked, row.FCCheckBox("chkApp").Checked, row.FCCheckBox("chkCampana").Checked) Then HuboError = True End If diff --git a/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb b/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb index 25c34bee9..2cf7edfbc 100644 --- a/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb +++ b/Sistemas/PopUpCambiaUsuarioEmpresa.aspx.vb @@ -49,7 +49,7 @@ Partial Class Sistemas_PopUpCambiaUsuarioEmpresa Dim splitedtext As String() = Request.Url.AbsoluteUri.Replace("http://", "").Replace("https://", "").Split("."c) If Request.Url.AbsoluteUri.Contains("sig.agrojam.com.mx") Then - CveEmpresa = 119 + CveEmpresa = "119" End If If splitedtext.Length > 0 Then diff --git a/Sistemas/Registro.aspx.vb b/Sistemas/Registro.aspx.vb index 09c8e2b5a..a96808ffe 100644 --- a/Sistemas/Registro.aspx.vb +++ b/Sistemas/Registro.aspx.vb @@ -53,7 +53,7 @@ Partial Class Sistemas_Registro Private Property CveEmpresaTemp As Integer Get - CveEmpresaTemp = ViewState("CveEmpresaTemp").ToString + CveEmpresaTemp = ViewState("CveEmpresaTemp").ToString.ToEntero End Get Set(value As Integer) ViewState("CveEmpresaTemp") = value diff --git a/Sistemas/SessionesActivas.aspx.vb b/Sistemas/SessionesActivas.aspx.vb index 71db01552..1dad46c59 100644 --- a/Sistemas/SessionesActivas.aspx.vb +++ b/Sistemas/SessionesActivas.aspx.vb @@ -74,7 +74,7 @@ Partial Class SessionesActivas dtU.Columns.Add("Modulo", System.Type.GetType("System.String")) dtU.Columns.Add("SessionID", System.Type.GetType("System.String")) Dim dtF As DataTable = dtU.Clone - Dim objlist As List(Of ADSSession.ADSSessionObj) = ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.getListasession) + Dim objlist As List(Of ADSSession.ADSSessionObj) = CType(ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.getListasession), List(Of ADSSession.ADSSessionObj)) For Each user As ADSSession.ADSSessionObj In objlist Dim row As DataRow = dtU.FiltroPrimero($"CveUsuario={user.CveUsuario} AND CveEmpresa={user.CveEmpresa}") diff --git a/Ventas/CatAutorizacionLimites.aspx.vb b/Ventas/CatAutorizacionLimites.aspx.vb index a12618ea2..b02c3a4db 100644 --- a/Ventas/CatAutorizacionLimites.aspx.vb +++ b/Ventas/CatAutorizacionLimites.aspx.vb @@ -223,7 +223,7 @@ Partial Class Ventas_CatAutorizacionLimites Dim LimiteCredito = gvRow.DataKey("LimiteCredito").ToDecimal() 'SI EL LIMITE ES 0, PERMITE AUTORIZAR If LimiteCredito > 0 Then - Dim PorcentajeMaximoAutorizar As Decimal = 0.1 + Dim PorcentajeMaximoAutorizar As Decimal = 0.1D If UsuarioActual.PorcentajeMaximoAutorizacion > 0 Then PorcentajeMaximoAutorizar = (UsuarioActual.PorcentajeMaximoAutorizacion / 100) @@ -351,7 +351,7 @@ Partial Class Ventas_CatAutorizacionLimites StrFiltro.AppendFormat("Vendedor: {0}, ", DdlVendedorFiltro.SelectedItem) StrFiltro.AppendFormat("Fecha Inicio: {0}", txtFechaI.Text.ToDate.ToString("dd/MM/yyyy")) 'If txtFechaF.Text <> "" Then StrFiltro.AppendFormat(", Fecha Fin: {0}", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy")) - Dim fechaFin As String = IIf(txtFechaF.Text <> "", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy"), Now.ToString("dd/MM/yyyy")) + Dim fechaFin As String = If(txtFechaF.Text <> "", txtFechaF.Text.ToDate.ToString("dd/MM/yyyy"), Now.ToString("dd/MM/yyyy")) StrFiltro.AppendFormat(", Fecha Fin: {0}", fechaFin) 'Oculta columnas en export sin afectar GridView en página diff --git a/Ventas/CatCobranzaEstatus.aspx.vb b/Ventas/CatCobranzaEstatus.aspx.vb index dd474ce1f..5dbf30f6d 100644 --- a/Ventas/CatCobranzaEstatus.aspx.vb +++ b/Ventas/CatCobranzaEstatus.aspx.vb @@ -50,7 +50,7 @@ Partial Class Vta_CatCobranzaEstatus Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) CveCobranzaEstatus = GvRow.DataKey("CveCobranzaEstatus").ToEntero TxtEstatusCobranza.Text = GvRow.DataKey("CobranzaEstatus").ToString - ChkEstatus.Checked = GvRow.DataKey("Estatus") + ChkEstatus.Checked = GvRow.DataKey("Estatus") = "True" BtnAgregarEstatusCobranza.Text = "Actualizar" UpAddEstatus.Update() RegistraScript(String.Format("$('#{0}').modal();", "divAddEstatusCobranza")) @@ -115,7 +115,7 @@ Partial Class Vta_CatCobranzaEstatus Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) CveCobranzaEstatusTurno = GvRow.DataKey("CveCobranzaEstatusTurno").ToEntero TxtEstatusCobranzaTurno.Text = GvRow.DataKey("CobranzaEstatusTurno").ToString - ChkEstatusTurno.Checked = GvRow.DataKey("Estatus") + ChkEstatusTurno.Checked = GvRow.DataKey("Estatus") = "True" BtnAgregarEstatusCobranzaTurno.Text = "Actualizar" UpAddEstatusTurno.Update() RegistraScript(String.Format("$('#{0}').modal();", "divAddEstatusCobranzaTurno")) diff --git a/Ventas/CatDocumentosClientes.aspx.vb b/Ventas/CatDocumentosClientes.aspx.vb index 6d3fc5254..ffdd31f32 100644 --- a/Ventas/CatDocumentosClientes.aspx.vb +++ b/Ventas/CatDocumentosClientes.aspx.vb @@ -92,7 +92,7 @@ Partial Class Vta_CatDocumentosClientes Property Estatus As Boolean Get If ViewState("Estatus") Is Nothing Then - Return 0 + Return False Else Return DirectCast(ViewState("Estatus"), Boolean) End If @@ -132,7 +132,7 @@ Partial Class Vta_CatDocumentosClientes Property DiasLimite As Integer Get If ViewState("DiasLimite") Is Nothing Then - Return True + Return 1 Else Return DirectCast(ViewState("DiasLimite"), Integer) End If @@ -257,26 +257,26 @@ Partial Class Vta_CatDocumentosClientes Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - CveDocumentacion = GvRow.DataKey("CveDocumentacion") + CveDocumentacion = GvRow.DataKey("CveDocumentacion").ToEntero Documentacion = GvRow.DataKey("Documentacion") DocumentacionFormato = GvRow.DataKey("DocumentacionFormato") - CveDocumentacionTipo = GvRow.DataKey("CveDocumentacionTipo") + CveDocumentacionTipo = GvRow.DataKey("CveDocumentacionTipo").ToEntero DocumentacionTipo = GvRow.DataKey("DocumentacionTipo") - Orden = GvRow.DataKey("Orden") - Estatus = GvRow.DataKey("Estatus") - Requerido = GvRow.DataKey("Requerido") + Orden = GvRow.DataKey("Orden").ToEntero + Estatus = GvRow.DataKey("Estatus") = "True" + Requerido = GvRow.DataKey("Requerido") = "True" DiasLimite = GvRow.DataKey("DiasLimite").ToEntero AplicaDiasLimite = If(GvRow.DataKey("AplicaDiasLimite").ToEntero = 1, True, False) AplicaFechaVencimiento = If(GvRow.DataKey("AplicaFechaVencimiento").ToEntero = 1, True, False) Txtdocumentacion.Text = Documentacion - TxtOrden.Text = Orden + TxtOrden.Text = Orden.ToString DdlDocumentacionTipo.SelectedValueExist(CveDocumentacionTipo) chkEstatus.Checked = Estatus chkRequerido.Checked = Requerido - TxtDiasLimite.Text = DiasLimite + TxtDiasLimite.Text = DiasLimite.ToString ChkAplicaDiasLimite.Checked = AplicaDiasLimite ChkAplicaFechaVencimiento.Checked = AplicaFechaVencimiento @@ -339,7 +339,7 @@ Partial Class Vta_CatDocumentosClientes Public Sub Remove_ClickDocumentacion(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion") + Dim _CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToEntero Dim _documetacionFormato As String = GvRow.DataKey("DocumentacionFormato") @@ -384,7 +384,7 @@ Partial Class Vta_CatDocumentosClientes If ActualizarDocumentacion Then _formato = GuardarArchivo(CveDocumentacion) - If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.CveEmpresa) Then + If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.CveEmpresa) Then RegistraScript(String.Format("$('#{0}').modal('hide');", "divAgregarDocumentacion")) Alert("Documento Actualizado correctamente.", TipoMensaje.MsgInformacion) @@ -392,11 +392,11 @@ Partial Class Vta_CatDocumentosClientes End If Else - If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.CveEmpresa) Then + If objRH.DocumentacionAdd(Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.CveEmpresa) Then CveDocumentacion = objRH.DtResultados(0)(0).ToString.ToEntero _formato = GuardarArchivo(CveDocumentacion) - If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, If(ChkAplicaDiasLimite.Checked, 1, 0), If(ChkAplicaFechaVencimiento.Checked, 1, 0), UsuarioActual.CveEmpresa) Then + If objRH.DocumentacionUpdate(CveDocumentacion, Txtdocumentacion.Text.Trim, _formato, DdlDocumentacionTipo.SelectedValue.ToEntero, _estatus, TxtOrden.Text.ToEntero, _requerido, TxtDiasLimite.Text.ToEntero, ChkAplicaDiasLimite.Checked, ChkAplicaFechaVencimiento.Checked, UsuarioActual.CveEmpresa) Then End If @@ -421,7 +421,7 @@ Partial Class Vta_CatDocumentosClientes Dim _CveDocumentacion As Integer = e.Row.DBCampo("CveDocumentacion").ToString.ToEntero Dim DocumetacionFormato As String = e.Row.DBCampo("DocumentacionFormato").ToString Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad") - Dim separado As Char() = {"."} + Dim separado As Char() = {"."c} Dim array() As String = DocumetacionFormato.Split(separado) Dim extencion As String = "" diff --git a/Ventas/CatMetasVendedores.aspx.vb b/Ventas/CatMetasVendedores.aspx.vb index ebd33afe3..b81da0b6a 100644 --- a/Ventas/CatMetasVendedores.aspx.vb +++ b/Ventas/CatMetasVendedores.aspx.vb @@ -15,7 +15,7 @@ Partial Class CatMetasVendedores Private Property DtDatos() As DataTable Get - Return ViewState("DtDatos") + Return CType(ViewState("DtDatos"), DataTable) End Get Set ViewState("DtDatos") = Value @@ -97,7 +97,7 @@ Partial Class CatMetasVendedores Dim ObjVentas As New ClsVentas If BtnAgregarMetaVendedor.Text = "Agregar" Then - If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero, + If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text.ToDate, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacionSup.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then Alert("Se agregó la meta al vendedor") Else @@ -324,8 +324,8 @@ Partial Class CatMetasVendedores Dim CveClasificacion2 As Integer = DtClasificaciones2.FiltroPrimeroValor("CveClasificacion", String.Format("trim(Clasificacion)='{0}'", row("Clasificación").ToString().TrimStart().TrimEnd())).ToEntero Dim CveMarca As Integer = DtMarcas.FiltroPrimeroValor("CveMarca", String.Format("Marca='{0}'", row("Marca").ToString().TrimStart().TrimEnd())).ToEntero - Dim Mes As Decimal = row("Mes").ToString().ToDecimal() - Dim Anio As Decimal = row("Año").ToString().ToDecimal() + Dim Mes As Integer = row("Mes").ToString().ToEntero() + Dim Anio As Integer = row("Año").ToString().ToEntero() Dim Cantidad As Decimal = row("Cantidad").ToString().ToDecimal() Dim Importe As Decimal = row("Importe").ToString().ToDecimal() diff --git a/Ventas/MetasVendedores.aspx.vb b/Ventas/MetasVendedores.aspx.vb index 7946692a5..181ecb94b 100644 --- a/Ventas/MetasVendedores.aspx.vb +++ b/Ventas/MetasVendedores.aspx.vb @@ -57,7 +57,7 @@ Partial Class MetasVendedores End If Dim ObjVentas As New ClsVentas - If ObjVentas.GetRepMetasVendedores(TxtFechaMes.Text, UsuarioActual.CveEmpresa, DdlVendedorFiltro.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, + If ObjVentas.GetRepMetasVendedores(TxtFechaMes.Text.ToDate, UsuarioActual.CveEmpresa, DdlVendedorFiltro.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificaciones.SelectedValue.ToEntero, DdlClasificacion2.SelectedValue.ToEntero, DdlMarcaFiltro.SelectedValue.ToEntero, DdlSubProyectoFiltro.SelectedValue.ToEntero, CveCliente, DdlDistribuidor.SelectedValue.ToEntero, DdlGrupo.SelectedValue.ToEntero) Then GV.DataSource = ObjVentas.DtResultados @@ -109,7 +109,7 @@ Partial Class MetasVendedores params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Today)) + params.Add(New ReportParameter("FechaImpresion", Today.ToShortDateString)) params.Add(New ReportParameter("SubProyecto", DdlSubProyectoFiltro.SelectedItem.ToString)) params.Add(New ReportParameter("Agente", DdlVendedorFiltro.SelectedItem.ToString)) @@ -124,7 +124,7 @@ Partial Class MetasVendedores params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Today)) + params.Add(New ReportParameter("FechaImpresion", Today.ToShortDateString)) params.Add(New ReportParameter("SubProyecto", DdlSubProyectoFiltro.SelectedItem.ToString)) params.Add(New ReportParameter("Agente", DdlVendedorFiltro.SelectedItem.ToString)) diff --git a/Ventas/PuntoVenta.aspx.vb b/Ventas/PuntoVenta.aspx.vb index 4135adf78..130cf399f 100644 --- a/Ventas/PuntoVenta.aspx.vb +++ b/Ventas/PuntoVenta.aspx.vb @@ -43,7 +43,7 @@ Partial Class Ventas_PuntoVenta ' Return a base 64 encoded string of the Hash value Dim i As Integer For i = 0 To byteHash.Length - 1 - Respuesta = Respuesta + Hex(byteHash(i)).ToString.PadLeft(2, "0") + Respuesta = Respuesta + Hex(byteHash(i)).ToString.PadLeft(2, "0"c) Next Return Respuesta diff --git a/Ventas/RepIngresosDetalle.aspx.vb b/Ventas/RepIngresosDetalle.aspx.vb index c34689dc5..b44298944 100644 --- a/Ventas/RepIngresosDetalle.aspx.vb +++ b/Ventas/RepIngresosDetalle.aspx.vb @@ -75,7 +75,7 @@ Partial Class Ventas_RepIngresosDetalle RsFechaI = If(IsNothing(Request("RsFechaI")), "", Request("RsFechaI").ToString()) RsFechaF = If(IsNothing(Request("RsFechaF")), "", Request("RsFechaF").ToString()) TipoDoc = If(IsNothing(Request("TipoDoc")), "", Request("TipoDoc").ToString()) - CveCuenta = If(IsNothing(Request("CveCuenta")), "", Request("CveCuenta").ToString()) + CveCuenta = If(IsNothing(Request("CveCuenta")), "", Request("CveCuenta").ToString()).ToEntero CveSubProyecto = If(IsNothing(Request("CveSubProyecto")), 0, Request("CveSubProyecto").ToString().ToEntero()) CveConceptoContable = If(IsNothing(Request("CveConceptoContable")), -1, Request("CveConceptoContable").ToString().ToEntero()) TipoAmortizacion = If(IsNothing(Request("TipoAmortizacion")), -1, Request("TipoAmortizacion").ToString().ToEntero()) diff --git a/Ventas/RepVentasMensuales.aspx.vb b/Ventas/RepVentasMensuales.aspx.vb index 758298b81..1032f0974 100644 --- a/Ventas/RepVentasMensuales.aspx.vb +++ b/Ventas/RepVentasMensuales.aspx.vb @@ -50,7 +50,7 @@ Partial Class RepVentasMensuales Private Sub CargaDatos() Dim ObjVentas As New ClsVentas - If ObjVentas.GetRepVentasMensuales(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacionesPS.SelectedValue.ToEntero, + If ObjVentas.GetRepVentasMensuales(UsuarioActual.CveEmpresa, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacionesPS.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlMarca.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero) Then GV.DataSource = ObjVentas.DtResultados DtDatos = ObjVentas.DtResultados @@ -72,7 +72,7 @@ Partial Class RepVentasMensuales params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Today)) + params.Add(New ReportParameter("FechaImpresion", Today.ToShortDateString)) params.Add(New ReportParameter("Modalidad", DdlModalidad.SelectedValue)) ImprimirPDF("Empresas/Grales/Formatos/RepVentasMensuales.rdlc", DtDatos, params, "Rep. Ventas Mensuales", "PDF", RDSName:="DataSet1") @@ -90,10 +90,10 @@ Partial Class RepVentasMensuales CveCliente = e.Row.DataKey("Clave").ToEntero CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero Else - CveSubProyecto = e.Row.DataKey("Clave") + CveSubProyecto = e.Row.DataKey("Clave").ToEntero End If - Dim FechaInicio As Date = TxtFechaI.Text - Dim FechaFin As Date = TxtFechaF.Text + Dim FechaInicio As Date = TxtFechaI.Text.ToDate + Dim FechaFin As Date = TxtFechaF.Text.ToDate Dim CveMarca As Integer = DdlMarca.SelectedValue.ToEntero Dim CveVendedor As Integer = DdlVendedor.SelectedValue.ToEntero Dim URL As String = String.Format("/Ventas/RepVentasMensualesDetalle.aspx?CveCliente={0}&CveSubProyecto={1}&FechaInicio={2}&FechaFin={3}&CveMarca={4}&CveVendedor={5}", diff --git a/Ventas/RepVentasMensualesDetalle.aspx.vb b/Ventas/RepVentasMensualesDetalle.aspx.vb index cbec044cb..62d099ec2 100644 --- a/Ventas/RepVentasMensualesDetalle.aspx.vb +++ b/Ventas/RepVentasMensualesDetalle.aspx.vb @@ -24,12 +24,12 @@ Partial Class RepVentasMensualesDetalle Private Sub CargaDatos() 'URL DE PRUEBA '/Ventas/RepVentasMensualesDetalle.aspx?CveCliente=270821&CveSubProyecto=-1&FechaInicio=2020-02-15&FechaFin=2020-02-20&CveMarca=-1&CveVendedor=-1 - Dim FechaInicio As Date = Request.QueryString("FechaInicio") - Dim FechaFin As Date = Request.QueryString("FechaFin") - Dim CveCliente As Integer = Request.QueryString("CveCliente") - Dim CveSubProyecto As Integer = Request.QueryString("CveSubProyecto") - Dim CveMarca As Integer = Request.QueryString("CveMarca") - Dim CveVendedor As Integer = Request.QueryString("CveVendedor") + Dim FechaInicio As Date = Request.QueryString("FechaInicio").ToDate + Dim FechaFin As Date = Request.QueryString("FechaFin").ToDate + Dim CveCliente As Integer = Request.QueryString("CveCliente").ToEntero + Dim CveSubProyecto As Integer = Request.QueryString("CveSubProyecto").ToEntero + Dim CveMarca As Integer = Request.QueryString("CveMarca").ToEntero + Dim CveVendedor As Integer = Request.QueryString("CveVendedor").ToEntero Dim ObjVentas As New ClsVentas If ObjVentas.GetRepVentasMensualesDetalle(UsuarioActual.CveEmpresa, CveCliente, FechaInicio, FechaFin, CveSubProyecto, CveVendedor, CveMarca) Then @@ -48,8 +48,8 @@ Partial Class RepVentasMensualesDetalle params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("pImg", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Today)) - params.Add(New ReportParameter("Modalidad", 2)) + params.Add(New ReportParameter("FechaImpresion", Today.ToShortDateString)) + params.Add(New ReportParameter("Modalidad", "2")) ImprimirPDF("Empresas/Grales/Formatos/RepVentasMensualesDetalle.rdlc", DtDatos, params, "Rep. Ventas Mensuales", "PDF", RDSName:="DataSet1") End Sub diff --git a/Ventas/RepVentasResumen.aspx.vb b/Ventas/RepVentasResumen.aspx.vb index 70295aff9..a2d9b1d3d 100644 --- a/Ventas/RepVentasResumen.aspx.vb +++ b/Ventas/RepVentasResumen.aspx.vb @@ -84,7 +84,7 @@ Partial Class Ventas_RepVentasResumen Dim ObjVentas As New ClsVentas Dim ObjMovtos As New ClsMovimientos() - If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1, + If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, MinFecha, MaxFecha, -1, -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=1) Then VxP = ObjVentas.DtResultados GvVxP.DataSource = VxP @@ -93,7 +93,7 @@ Partial Class Ventas_RepVentasResumen VxP = Nothing End If - If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1, + If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.ToDate(), TxtFechaF.Text.ToDate(), MinFecha, MaxFecha, -1, -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 10, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=1) Then VxC = ObjVentas.DtResultados GvVxC.DataSource = VxC @@ -103,7 +103,7 @@ Partial Class Ventas_RepVentasResumen VxC = Nothing End If - If ObjMovtos.GetRepRecuperacion(TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, -1, -1, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then + If ObjMovtos.GetRepRecuperacion(TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, -1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, 5, -1, "-1", CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then Datos = ObjVentas.DtResultados GvPxC.DataSource = Datos Else From 0471ee163036e35a01153bf8af404559954cf27f Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 25 Aug 2023 11:55:57 -0700 Subject: [PATCH 064/111] -- limpieza de funciones --- App_Code/ClsContabilidad.vb | 179 +++++++++++++----------------------- 1 file changed, 65 insertions(+), 114 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index d700edb17..4af8d32d9 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5247,142 +5247,93 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + 'Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, CveEmpresa As Integer) As Boolean + ' Dim Retorno = False - DataAdapter("PA_Conta_BalanzaComprobacionPymeGet") + ' DataAdapter("PA_Conta_BalanzaComprobacionPymeGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@FechaI", SqlDbType.Date).Value = FechaI - .Add("@FechaF", SqlDbType.Date).Value = FechaF - .Add("@TipoCuentas", SqlDbType.Int).Value = TipoCuentas - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@FechaI", SqlDbType.Date).Value = FechaI + ' .Add("@FechaF", SqlDbType.Date).Value = FechaF + ' .Add("@TipoCuentas", SqlDbType.Int).Value = TipoCuentas + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - Me.OnError("Ocurrió un error al obtener Balanza de comprobación", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' Me.OnError("Ocurrió un error al obtener Balanza de comprobación", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function 'Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean - Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean - Dim Retorno = False + ' Dim Retorno = False - DataAdapter("PA_EstadoActividadesGet") + ' DataAdapter("PA_EstadoActividadesGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@FechaI", SqlDbType.Date).Value = FechaI - .Add("@FechaF", SqlDbType.Date).Value = FechaF - .Add("@Tipo", SqlDbType.Int).Value = TipoMovtos - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@FechaI", SqlDbType.Date).Value = FechaI + ' .Add("@FechaF", SqlDbType.Date).Value = FechaF + ' .Add("@Tipo", SqlDbType.Int).Value = TipoMovtos + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - Me.OnError("Ocurrió un error al obtener el Estado de Actividades", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' Me.OnError("Ocurrió un error al obtener el Estado de Actividades", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function - Public Function GetEstadoResultadosMensual(ANO As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + 'Public Function GetEstadoResultadosMensual(ANO As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean + ' Dim Retorno = False - DataAdapter("PA_EstadoResultadosMensualPyme") + ' DataAdapter("PA_EstadoResultadosMensualPyme") - With SqlAdapter.SelectCommand.Parameters - .Add("@ANO", SqlDbType.Int).Value = ANO - .Add("@Tipo", SqlDbType.Int).Value = TipoMovtos - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@ANO", SqlDbType.Int).Value = ANO + ' .Add("@Tipo", SqlDbType.Int).Value = TipoMovtos + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - Me.OnError("Ocurrió un error al obtener el Estado de Resultados Mensual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' Me.OnError("Ocurrió un error al obtener el Estado de Resultados Mensual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function - Public Function GetEstadoResultadosAnual(ANO As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + 'Public Function GetEstadoResultadosAnual(ANO As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean + ' Dim Retorno = False - DataAdapter("PA_EstadoResultadosAnualPyme") + ' DataAdapter("PA_EstadoResultadosAnualPyme") - With SqlAdapter.SelectCommand.Parameters - .Add("@ANO", SqlDbType.Int).Value = ANO - .Add("@Tipo", SqlDbType.Int).Value = TipoMovtos - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@ANO", SqlDbType.Int).Value = ANO + ' .Add("@Tipo", SqlDbType.Int).Value = TipoMovtos + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - Me.OnError("Ocurrió un error al obtener el Estado de Resultados Anual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' Me.OnError("Ocurrió un error al obtener el Estado de Resultados Anual", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function #End Region -#Region "A N E X O - D E L - C A T A L O G O" - Public Function GetAnexoCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean - Dim Retorno = False - - DataAdapter("PA_Conta_AnexoCatalogo") - - With SqlAdapter.SelectCommand.Parameters - .Add("@FechaI", SqlDbType.Date).Value = FechaI - .Add("@FechaF", SqlDbType.Date).Value = FechaF - .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta - .Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas - .Add("@Tipo", SqlDbType.Int).Value = TipoMovtos - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - Me.OnError("Ocurrió un error al obtener el Anexo del Catalogo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function - - Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False - - DataAdapter("PA_Conta_AuxiliarCatalogo") - - With SqlAdapter.SelectCommand.Parameters - .Add("@FechaI", SqlDbType.Date).Value = FechaI - .Add("@FechaF", SqlDbType.Date).Value = FechaF - .Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta - .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - Me.OnError("Ocurrió un error al obtener los Movimientos Auxiliares Catalogo", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function -#End Region #Region "Cierre Contable" Public Function GetCuentasCierre(FechaI As Date, FechaF As Date, CveCuentaCierre As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Integer From f2a8fb6122ca639ac9d8859491dcf72feb6f5c74 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 25 Aug 2023 15:45:30 -0700 Subject: [PATCH 065/111] =?UTF-8?q?--=20limpieza=20c=C3=B3digo=20comentado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/modExtensiones.vb | 234 +++++-------------------------------- 1 file changed, 28 insertions(+), 206 deletions(-) diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index f272e12ae..0f5df56a9 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -569,41 +569,30 @@ Namespace Extensiones Select Case pOpcion Case TipoMensaje.MsgInformacion Titulo = "Información" - Img = "I" - 'Img = "" - 'Botones = String.Format("", Plus, JSBtnAceptar) + Img = "I" Botones = "1" Case TipoMensaje.MsgConfirmacion Titulo = "Confirmación" Img = "C" - 'Img = "" - 'Botones = String.Format("", Plus, JSBtnAceptar) Botones = "2" Case TipoMensaje.MsgAdvertencia Titulo = "Advertencia" Img = "A" - 'Img = "" - 'Botones = String.Format("", Plus, JSBtnAceptar) Botones = "1" Case Else Titulo = "Error" Img = "E" - 'Img = "" - 'Botones = String.Format("", Plus, JSBtnAceptar) Botones = "1" End Select Try - - Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page) 'ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), "MuestraAlert('" & Alerta.ToString() & "', '" & Plus & "');", True) ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), String.Format("MuestraAlerta('{0}','{1}','{2}','{3}','{4}');", Titulo, Mensaje, Img, Botones, JSBtnAceptar), True) Pag = Nothing Catch ex As Exception - End Try - 'Alerta = Nothing + End Try End If End Sub @@ -629,29 +618,6 @@ Namespace Extensiones If Fecha <> "" Then Time = String.Format("{0}", Fecha) Return String.Format("
  • {0}{3}
  • ", Time, Tipo, Ico, Mensaje, Link, If(tonewpage, "target=""_blank""", "")) End Function - ' - 'Public Function addindicador(Obj As Object, color As String, icono As String, titulo As String, comentario As String, link As String) As String - ' Try - ' Dim htmlobj = DirectCast(Obj, HtmlGenericControl) - ' color = color.Replace("'", "\'") - ' icono = icono.Replace("'", "\'") - ' titulo = titulo.Replace("'", "\'") - ' comentario = comentario.Replace("'", "\'") - ' link = link.Replace("'", "\'") - ' Dim script As String = " addindicadortext('" & color & "','" & icono & "','" & titulo & "','" & comentario & "','" & link & "',$('#" & htmlobj.ClientID.ToString & "')); " - ' Return script - - ' Catch ex As Exception - ' Return "" - ' End Try - 'End Function - - ' - 'Public Sub updateindicador(Obj As Object, script As String) - ' Dim Pag As Page = DirectCast(System.Web.HttpContext.Current.CurrentHandler, Page) - ' ScriptManager.RegisterStartupScript(Pag, Pag.GetType(), (DateTime.Now.Ticks + 1).ToString(), script, True) - ' Pag = Nothing - 'End Sub #End Region @@ -1813,21 +1779,17 @@ Namespace Extensiones #End Region #Region "Excel PDF" - Public Sub GeneraChequePDF(pCveIE As Integer, tEmpresa As Empresa, Optional IDPoliza As Integer = -1, Optional MuestraAlert As Boolean = True) - - Dim missing As Object = System.Reflection.Missing.Value + Public Sub GeneraChequePDF(pCveIE As Integer, tEmpresa As Empresa, Optional IDPoliza As Integer = -1, Optional MuestraAlert As Boolean = True) + Dim Folio, Observacion, UsuarioRegistro, TextoImporte, PagueseA, Ruta, Banco, NumCuenta, AbonoCuenta, SubProyecto, NotificarA, RefCrediproveedor As String Dim FechaExpedicion As Date = Now - Dim Importe As Double - Dim FormatoCheque As String = "" + Dim Importe As Double Dim tCveEmpresa As Integer = tEmpresa.CveEmpresa - Dim CveTipoTransaccion, CveProveedor, CvePersonal, CveCuentaDeposito As Integer + Dim CveTipoTransaccion, CveProveedor, CvePersonal As Integer Dim ObjIE As New ClsBancos() - Dim tIdPoliza As Integer - Dim DtMovimientosPoliza As DataTable = Nothing - Folio = "" - TextoImporte = "" : Observacion = "" : PagueseA = "" : UsuarioRegistro = "" : Banco = "" : NumCuenta = "" : AbonoCuenta = "" : SubProyecto = "" : NotificarA = "" : RefCrediproveedor = "" - CveProveedor = -1 : CvePersonal = -1 : CveCuentaDeposito = 0 + Dim tIdPoliza As Integer + + Folio = "" Ruta = tEmpresa.Ruta If ObjIE.GetBancosIE(pCveIE, tCveEmpresa) Then @@ -1838,9 +1800,8 @@ Namespace Extensiones Importe = ObjIE.Importe CveTipoTransaccion = ObjIE.CveTipoTransaccion Banco = ObjIE.Banco - NumCuenta = ObjIE.NumCuenta - FormatoCheque = String.Format("Cheques\{0}.xlsm", ObjIE.CveCuenta) - + NumCuenta = ObjIE.NumCuenta + TextoImporte = String.Format("--- {0} ---", Importe.Texto2Letras(ObjIE.CveMoneda)) FechaExpedicion = ObjIE.FechaDocumento Observacion = ObjIE.Observaciones @@ -1849,12 +1810,9 @@ Namespace Extensiones AbonoCuenta = If(ObjIE.EsAbonoEnCuenta, "PARA ABONO EN CUENTA DEL BENEFICIARIO", "") NotificarA = ObjIE.NotificarA tIdPoliza = ObjIE.IDPoliza - If ObjIE.Bancos_IEImpreso(True, pCveIE) Then End If - - End If End If @@ -1888,42 +1846,25 @@ Namespace Extensiones IVA = PreP.DtResultados.SUM("Importe", "CveConceptoContable = 19") ' concepto de IVA - If CveProveedor > 0 Then - 'Dim CveUsuarioResponsable As Integer = 0 - + If CveProveedor > 0 Then + Dim Prov As New ClsCompProveedores If Prov.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, tCveEmpresa) Then If Prov.DtResultados.Rows.Count > 0 Then RFC = Prov.DtResultados.Rows(0)("RFC").ToString - Correo = Prov.DtResultados.Rows(0)("ContactoMail").ToString - ' CveUsuarioResponsable = Prov.DtResultados.Rows(0)("CveUsuarioResponsable").ToString.ToEntero - - - 'Banco = Prov.DtResultados.Rows(0)("BancNombre").ToString - 'NumCuenta = Prov.DtResultados.Rows(0)("BancCuenta").ToString - 'If NumCuenta = "" Then NumCuenta = Prov.DtResultados.Rows(0)("BancCIE").ToString - 'CLABE = Prov.DtResultados.Rows(0)("BancCLABE").ToString - 'If CLABE = "" Then CLABE = Prov.DtResultados.Rows(0)("BancReferencia").ToString - 'NoSucursal = Prov.DtResultados.Rows(0)("BancSucursal").ToString - - ' UsuarioResponsable = Prov.DtResultados.Rows(0)("NotificarA").ToString - - 'If CveUsuarioResponsable > 0 Then - ' Dim Usr As New ClsSisUsuarios - - ' If Usr.GetUsuarios(CveUsuarioResponsable) Then - ' UsuarioResponsable = Usr.DtResultados.FiltroPrimero(String.Format("CveUsuario = {0}", CveUsuarioResponsable))("Correo").ToString - ' End If - - ' Usr.Dispose() - - 'End If + Correo = Prov.DtResultados.Rows(0)("ContactoMail").ToString + 'Banco = Prov.DtResultados.Rows(0)("BancNombre").ToString + 'NumCuenta = Prov.DtResultados.Rows(0)("BancCuenta").ToString + 'If NumCuenta = "" Then NumCuenta = Prov.DtResultados.Rows(0)("BancCIE").ToString + 'CLABE = Prov.DtResultados.Rows(0)("BancCLABE").ToString + 'If CLABE = "" Then CLABE = Prov.DtResultados.Rows(0)("BancReferencia").ToString + 'NoSucursal = Prov.DtResultados.Rows(0)("BancSucursal").ToString + + ' UsuarioResponsable = Prov.DtResultados.Rows(0)("NotificarA").ToString + End If - - End If - Prov.Dispose() End If @@ -1936,135 +1877,16 @@ Namespace Extensiones NumCuenta = RH.DtResultados.Rows(0)("BancoNumCuenta").ToString CLABE = RH.DtResultados.Rows(0)("CLABE").ToString End If - - End If - RH.Dispose() - End If End If End If - PreP.Dispose() - - 'Try - ' 'cuando es transferencia - ' Dim Excel As msExcel.Application = New msExcel.Application() - ' Dim VB_Module As VBComponent = Nothing - ' Excel.Visible = True - ' Excel.ScreenUpdating = True - ' Excel.DisplayAlerts = True - ' FormatoCheque = String.Format("Cheques\Transferencia-{0}.xlsm", ObjIE.CveCuenta) - - ' If Not IO.File.Exists(String.Format("{0}Cheques\", Ruta)) Then IO.Directory.CreateDirectory(String.Format("{0}Cheques\", Ruta)) - - ' If Not IO.File.Exists(String.Format("{0}{1}", Ruta, FormatoCheque)) Then - ' IO.File.Copy(String.Format("{0}Empresas\Grales\Transferencia.xlsm", ModExtensiones.DirectorioBaseEmpresas), String.Format("{0}{1}", Ruta, FormatoCheque), False) - ' End If - - ' Dim ArchivoBase As New System.IO.FileInfo(String.Format("{0}{1}", Ruta, FormatoCheque)) - ' If Not IO.Directory.Exists(String.Format("{0}Formatos\", Ruta)) Then IO.Directory.CreateDirectory(String.Format("{0}Formatos\", Ruta)) - ' ArchivoBase.CopyTo(String.Format("{0}Formatos\Transferencia-{1}.xlsm", Ruta, pCveIE), True) - ' Dim ArchivoTemp As New System.IO.FileInfo(String.Format("{0}Formatos\Transferencia-{1}.xlsm", Ruta, pCveIE)) - - - ' Dim Libro As msExcel.Workbook = Excel.Workbooks.Open(ArchivoTemp.FullName, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing) - ' Libro.Activate() - - ' Dim Hoja As msExcel.Worksheet = CType(Libro.Worksheets(1), Microsoft.Office.Interop.Excel.Worksheet) - ' Hoja.Visible = Microsoft.Office.Interop.Excel.XlSheetVisibility.xlSheetVisible - ' Hoja.Activate() - ' Try - - ' If CveTipoTransaccion = 9 Then Hoja.Range("B1:B1").Value = String.Format("{0}{1}Pago Layout ", Hoja.Range("B1:B1").Value, vbLf) - ' Hoja.Range("G3:G3").Value = String.Format("Folio: {0}", Folio) - ' Hoja.Range("G3:G3").HorizontalAlignment = -4152 'xlRight - ' Hoja.Range("A3:A3").Value = FechaExpedicion.ToString("yyyy-MM-dd") - ' Hoja.Range("A5:A5").Value = PagueseA - ' Hoja.Range("A8:A8").Value = Importe.ToString("N2") - ' Hoja.Range("C8:C8").Value = TextoImporte.ToUpper - ' Hoja.Range("A10:A10").Value = Banco - ' 'Crediproveedor - ' If RefCrediproveedor <> "" Then - ' Hoja.Range("F10:F10").Value = RefCrediproveedor - ' Hoja.Range("F11:F11").Value = "Crediproveedor" - ' End If - ' Hoja.Range("A12:A12").Value = NumCuenta - ' Hoja.Range("D12:D12").Value = NoSucursal - ' Hoja.Range("F12:F12").Value = CLABE - ' Hoja.Range("A15:A15").Value = Observacion - ' Hoja.Range("A19:A19").Value = RFC - ' Hoja.Range("D19:D19").Value = IVA.FormatoNumero - ' Hoja.Range("A21:A21").Value = Correo - ' Hoja.Range("F21:F21").Value = Telefono - ' Hoja.Range("B24:B24").Value = NotificarA - ' Hoja.Range("A26:A26").Value = SubProyecto - ' Hoja.Range("A30:A30").Value = UsuarioRegistro - - ' 'Exportar PDF - ' Dim pdfFileOut As String = String.Format("{0}PDF\Transf-{1}.pdf", Ruta, pCveIE) - ' Dim outputFileName As Object = pdfFileOut - ' Dim fileFormat As msExcel.XlFixedFormatType = msExcel.XlFixedFormatType.xlTypePDF - ' Libro.ExportAsFixedFormat(fileFormat, outputFileName, missing, missing, missing, missing, missing, missing, missing) - ' Catch ex As Exception - ' Dim Msgerr As String = "" - ' Msgerr.Alert(String.Format("Ocurrió un error {0}", ex.Message), TipoMensaje.MsgError) - ' End Try - ' System.Runtime.InteropServices.Marshal.ReleaseComObject(Hoja) - ' Hoja = Nothing - ' Dim saveChanges As Object = msExcel.XlSaveAction.xlDoNotSaveChanges - ' CType(Libro, msExcel._Workbook).Close(saveChanges, missing, missing) - ' System.Runtime.InteropServices.Marshal.ReleaseComObject(Libro) - ' Libro = Nothing - ' Excel.Quit() - ' System.Runtime.InteropServices.Marshal.ReleaseComObject(Excel) - ' Excel = Nothing - ' GC.Collect() - ' GC.WaitForPendingFinalizers() - - ' ArchivoTemp.Delete() - - - ' If MuestraAlert Then - ' Dim Descargas As New StringBuilder() - ' Descargas.AppendFormat("
  • Transferencia
  • ", tCveEmpresa, pCveIE, Now.Ticks) - ' Descargas.AppendFormat("
  • Listado
  • ", pCveIE) - ' If IDPoliza > 0 Then Descargas.AppendFormat("
  • Póliza
  • ", IDPoliza) - ' Dim Msg As String = String.Format("
    El Documento se generó correctamente.


    Descargas:
      {0}
    ", Descargas.ToString) 'TipoMensaje.MsgInformacion - - ' Msg.Alert(Msg, TipoMensaje.MsgInformacion, String.Format("document.location.href=""{0}""", HttpContext.Current.Request.Url.AbsoluteUri)) - ' End If - - - - 'Catch ex As Exception - ' Dim Msg As String = "No se pudo generar el documento." - ' Msg.OnError(Msg, ex, "CveIE=" & pCveIE) - 'End Try - - - End If - - - - 'End If - - - ' RegistraScript("AbrirVentana('/Ventas/PopUpImprimir.aspx?CveVenta=" & If(EsVistaPrevia, UsuarioActual.CveUsuario.ToString, Folio) & "&Ext=PDF', 700, 400, 'N', 'ImpVenta')") - - - End Sub - Private Function GetMacro() As String - Dim SB As New StringBuilder - SB.Append(" Sub AddRow(Row As String) " & vbLf) - SB.Append(" Rows(Row & "":"" & Row).Select " & vbLf) - SB.Append(" Selection.Copy " & vbLf) - SB.Append(" Selection.Insert Shift:=xlDown " & vbLf) - SB.Append(" End Sub ") - Return SB.ToString - End Function - - + PreP.Dispose() + End If + + End Sub + Public Sub ExportToExcel2(GridView As GridView, NombreArchivoXLSX As String) From 4f393581882ab71e044339e0b364b4c618a4104a Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 25 Aug 2023 15:45:49 -0700 Subject: [PATCH 066/111] -- option strict on --- RH/MiPerfil.aspx.vb | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/RH/MiPerfil.aspx.vb b/RH/MiPerfil.aspx.vb index bc0b91c37..8a4cdf9d8 100644 --- a/RH/MiPerfil.aspx.vb +++ b/RH/MiPerfil.aspx.vb @@ -1,13 +1,9 @@ Option Explicit On -Option Strict Off Imports Extensiones -'Imports System.Runtime.InteropServices Imports System.IO -'Imports Word = Microsoft.Office.Interop.Word Imports System.Data Imports Microsoft.Reporting.WebForms -Imports System.Globalization Partial Class RH_MiPerfil Inherits ClsPaginas @@ -41,7 +37,7 @@ Partial Class RH_MiPerfil End Property Private Sub CargaEstados(pCvePais As Integer) - DdlEstados.DataSource = GlobalDTGralEstados(pCvePais) + DdlEstados.DataSource = GlobalDTGralEstados("-1", pCvePais) DdlEstados.DataBind() End Sub @@ -68,7 +64,7 @@ Partial Class RH_MiPerfil If ViewState("JefeInmediato") Is Nothing Then Return "No asignado" Else - Return ViewState("JefeInmediato") + Return ViewState("JefeInmediato").ToString End If End Get Set(value As String) @@ -81,7 +77,7 @@ Partial Class RH_MiPerfil If ViewState("FechaIngreso") Is Nothing Then Return "No asignado" Else - Return ViewState("FechaIngreso") + Return ViewState("FechaIngreso").ToString End If End Get Set(value As String) @@ -94,7 +90,7 @@ Partial Class RH_MiPerfil If ViewState("puestoProp") Is Nothing Then Return "No asignado" Else - Return ViewState("puestoProp") + Return ViewState("puestoProp").ToString End If End Get Set(value As String) @@ -448,7 +444,7 @@ Partial Class RH_MiPerfil TxtTelefonoMarcadoRapido.Text = ObjPersonal.TelefonoMarcadoRapido FechaIngreso = ObjPersonal.FechaIngreso.ToShortDateString - Dim jefeCve As Integer = If(ObjPersonal.CvePersonalPadre = ObjPersonal.CvePersonal, "0", If(ObjPersonal.CvePersonalPadre.ToString = "0", "-1", ObjPersonal.CvePersonalPadre.ToString)) + Dim jefeCve As Integer = If(ObjPersonal.CvePersonalPadre = ObjPersonal.CvePersonal, "0", If(ObjPersonal.CvePersonalPadre.ToString = "0", "-1", ObjPersonal.CvePersonalPadre.ToString)).ToEntero Dim expressionJefe As String = String.Format("CvePersonal = {0}", jefeCve) Dim resultad As DataRow = DTOrganigrama.FiltroPrimero(expressionJefe) If (Not IsNothing(resultad)) Then @@ -462,7 +458,7 @@ Partial Class RH_MiPerfil Dim resultadoPuesto As DataRow = puestosAux.FiltroPrimero(expressionPuesto) If (Not IsNothing(resultad)) Then - puestoProp = resultadoPuesto.Item("Puesto") + puestoProp = resultadoPuesto.Item("Puesto").ToString Else puestoProp = "" End If @@ -682,7 +678,7 @@ Partial Class RH_MiPerfil Row("SerieFolio") = "" End If Next - + Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) @@ -847,7 +843,7 @@ Partial Class RH_MiPerfil Dim Codigo As String = TxtCodigo.Text Dim Departamento As String = DdlDepartamento.SelectedItem.Text Dim JefeInmediatoNombre As String = JefeInmediato - Dim fechaIngreso As Date = Me.FechaIngreso + Dim fechaIngreso As Date = Me.FechaIngreso.ToDate Dim Periodoingreso As Integer = Me.FechaIngreso.ToDate().ToString("MMdd").ToEntero() Dim PeriodoInicio As Integer = GvRow.DataKey("FechaInicio").ToDate().ToString("MMdd").ToEntero() Dim FechaInicio As String = GvRow.DataKey("FechaInicio").ToDateTime().ToString("dd/MM/yyyy") @@ -1199,7 +1195,7 @@ Partial Class RH_MiPerfil Alert("Permiso agregado Actualizado correctamente") End If Dim CorreoSupervisor As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa, DdlSupervisor.SelectedValue.ToEntero).FiltroPrimeroValor("Correo") - VacacionesMandaCorreoSupervisor("Permiso para " & UsuarioActual.Nombre, CorreoSupervisor, VacSupervisorNombre, NombreCompleto, TxtFechaInicioPer.Text, TxtFechaFinPer.Text, "permiso") + VacacionesMandaCorreoSupervisor("Permiso para " & UsuarioActual.Nombre, CorreoSupervisor, VacSupervisorNombre, NombreCompleto, TxtFechaInicioPer.Text.ToDate, TxtFechaFinPer.Text.ToDate, "permiso") RegistraScript("$('#DvPermisos').modal('hide');") End If @@ -1473,8 +1469,8 @@ Partial Class RH_MiPerfil Else For Each RowConcepto As DataRow In DTConceptosDetalles.Rows - Dim CveSolicitudVD As Integer = RowConcepto("CveSolicitudViaticoDetalle") - If (RowConcepto("CveSolicitudViaticoDetalle").ToEntero() = CveSolicitudViaticoDetalle) Then + Dim CveSolicitudVD As Integer = RowConcepto("CveSolicitudViaticoDetalle").ToString.ToEntero + If (RowConcepto("CveSolicitudViaticoDetalle").ToString.ToEntero() = CveSolicitudViaticoDetalle) Then DTConceptosDetalles.Rows.Remove(RowConcepto) ErrorEliminar = False From 0e9ab6685b591a3012d39992e8a632f6a977fc33 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 26 Aug 2023 09:47:44 -0700 Subject: [PATCH 067/111] =?UTF-8?q?--=20proceso=20para=20aplicar=20descuen?= =?UTF-8?q?tos,=20sobre=20la=20factura=20antes=20del=20pago,=20ej,=20para?= =?UTF-8?q?=20c=C3=A1lculo=20de=20descuentos=20como=20pronto=20pago?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/ProveedoresAbonar.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 8499fa339..1c9a4b621 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -316,7 +316,7 @@ Partial Class Bancos_ProveedoresAbonar LnkExcelSolicitud.Visible = True End If - If UsuarioActual.CveRol = 1 Then + If UsuarioActual.TienePermisoProceso(361) Then 'GvCxP.Columns(11).Visible = True chkaplicaDescuento.Visible = True End If From 17ee58fec37f2a3705debd7e6edfbec1825da523 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 26 Aug 2023 09:48:16 -0700 Subject: [PATCH 068/111] -- --- Bancos/Creditos.aspx.vb | 2 +- Contabilidad/RegPrePolizaS.aspx.vb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index eeaedfe75..78af2fbaa 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -830,7 +830,7 @@ Partial Class Bancos_Creditos CveCredito = ObjCredito.AddCreditos(DdlTipoCredito.SelectedValue.ToEntero, TxtReferencia.Text, TxtObservaciones.Text, -1, -1, -1, DdlTipoMoneda.SelectedValue.ToEntero, TxtFechaInicio.Text.ToString.ToDate, FechaVencimiento, TxtTasa.Text.Trim.ToDouble, TxtSobreTasa.Text.Trim.ToDouble, TxtIVA.Text.ToDouble / 100, TxtPlazo.Text.Trim.ToEntero, CveIE, TxtVehiculoValor.Text.ToString.ToDouble, TxtComisionValor.Text.ToString.ToDouble, TxtSeguroMensual.Text.ToString.ToDouble, TxtOtrosGastosValor.Text.ToString.ToDouble, - DdlProveedores.SelectedValue.ToEntero, RBLClasificacionContable.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False), + DdlProveedores.SelectedValue.ToEntero, RBLClasificacionContable.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, AplicaAnticipo:=If(RBLAnticipo.SelectedValue.ToEntero = 1, True, False), CreditoAnticipo:=TxtVehiculoAnticipo.Text.ToDouble, ComisionAnticipo:=TxtComisionAnticipo.Text.ToDouble, SeguroAnticipo:=TxtSeguroAnticipo.Text.ToDouble, OtrosGastosAnticipo:=TxtOtrosGastosAnticipo.Text.ToDouble, FondoGarantia:=TxtFondoGarantia.Text.ToDouble, SeguroValor:=TxtSeguroValor.Text.ToDouble, TipoInteres:=ChkTipoInteres.Checked) If CveCredito > 0 Then For Each gvr As GridViewRow In GvTA.Rows diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index a89c16251..f21a1b024 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1,5 +1,4 @@ -Option Strict Off -Imports System.Data +Imports System.Data 'Imports DocumentFormat.OpenXml Imports Extensiones Imports GemBox.Spreadsheet From ff7e4ddae6528043c14fbad24a3af876dd077f44 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 26 Aug 2023 14:47:12 -0700 Subject: [PATCH 069/111] =?UTF-8?q?Envio=20de=20correo=20clientes=20cotiza?= =?UTF-8?q?ci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index fea5190bd..dcae84dd2 100644 --- a/.gitignore +++ b/.gitignore @@ -283,3 +283,7 @@ vwd.webinfo /BinOLD /App_Data/PublishProfiles/FolderProfile.pubxml /vwd.webinfo +/A/CatEstatusIE.aspx +/A/CatEstatusIE.aspx.vb +/A/a.aspx +/A/a.aspx.vb From f66ea586b598d610acd75114d061c685a45f3494 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Sat, 26 Aug 2023 14:47:37 -0700 Subject: [PATCH 070/111] =?UTF-8?q?Envio=20de=20correo=20clientes=20cotiza?= =?UTF-8?q?ci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CGame/CatHuerta.aspx | 16 +++--- Sistemas/DefinicionEmpresa.aspx | 2 + Sistemas/Empresa.aspx | 2 + Ventas/Clientes.aspx.vb | 90 ++++++++++++++++++++++++--------- Ventas/RepVentaDetalle.aspx | 4 +- Ventas/Ventas.aspx.vb | 64 ++++++++++++++++------- 6 files changed, 127 insertions(+), 51 deletions(-) diff --git a/CGame/CatHuerta.aspx b/CGame/CatHuerta.aspx index 0ad2b82df..1c2590f53 100644 --- a/CGame/CatHuerta.aspx +++ b/CGame/CatHuerta.aspx @@ -71,7 +71,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -116,13 +116,13 @@ - - + + - + - + @@ -162,7 +162,7 @@ -
    +
    diff --git a/Sistemas/DefinicionEmpresa.aspx b/Sistemas/DefinicionEmpresa.aspx index f2f2c74b7..e03c39ea7 100644 --- a/Sistemas/DefinicionEmpresa.aspx +++ b/Sistemas/DefinicionEmpresa.aspx @@ -1017,6 +1017,8 @@
  • {"FechaVencimiento"}
  • {"RazonSocialEmisor"}
  • {"RazonSocialReceptor"}
  • +
  • {"Vigencia"}
  • +
  • {"AtencionA"}

  • diff --git a/Sistemas/Empresa.aspx b/Sistemas/Empresa.aspx index c622e5fc5..b3bd8aec9 100644 --- a/Sistemas/Empresa.aspx +++ b/Sistemas/Empresa.aspx @@ -1418,6 +1418,8 @@
  • {"FechaVencimiento"}
  • {"RazonSocialEmisor"}
  • {"RazonSocialReceptor"}
  • +
  • {"Vigencia"}
  • +
  • {"AtencionA"}

  • diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 31eaef415..6478d2e8f 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2096,7 +2096,7 @@ Partial Class Clientes Dim ObjMail As New ClsSisMail() Dim Ruta As String = UsuarioActual.Empresa.Ruta - Dim Cuerpo As String = TxtBody.Text + Dim Cuerpo As String = TxtBody.Text Dim Asunto As String = "" Dim TipoComprobante = "" Dim Adjunto As String = "" @@ -2132,6 +2132,10 @@ Partial Class Clientes Cuerpo = Cuerpo.Replace("{""Fecha""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Cuerpo = Cuerpo.Replace("{""Total""}", Dr("Total").ToString().FormatoNumero()) Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", Dr("FechaVencimiento").ToString().ToDate().ToShortDateString()) + + Cuerpo = Cuerpo.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) + End If End If @@ -2154,6 +2158,8 @@ Partial Class Clientes Cuerpo = Cuerpo.Replace("{""Fecha""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) Cuerpo = Cuerpo.Replace("{""Total""}", Dr("Total").ToString().FormatoNumero()) Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", Dr("FechaVencimiento").ToString().ToDate().ToShortDateString()) + Cuerpo = Cuerpo.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) End If End If @@ -5516,29 +5522,65 @@ Partial Class Clientes Dr = ObjVenta.DtResultados.Rows(0) End If End If - ObjVenta.Dispose() - - If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then - Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta - Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) - Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) - Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) - Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString()) - If Dr IsNot Nothing Then - Cuerpo = Cuerpo.Replace("{""Fecha""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) - Cuerpo = Cuerpo.Replace("{""Total""}", Dr("Total").ToString().FormatoNumero()) - Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", Dr("FechaVencimiento").ToString().ToDate().ToShortDateString()) - End If - End If - - - If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then - Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta - Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) - Asunto = Asunto.Replace("{""Sucursal""}", HdnSubProyecto2.Value.ToString()) - Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString()) - End If - + ObjVenta.Dispose() + + + If HdnTipoDocto2.Value.ToString() = "Cot" Then + + If UsuarioActual.Empresa.PlantillaMailVentaCotizacion.Trim.Length > 0 Then + Cuerpo = UsuarioActual.Empresa.PlantillaMailVentaCotizacion + Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) + Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) + Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) + Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString()) + If Dr IsNot Nothing Then + Cuerpo = Cuerpo.Replace("{""Fecha""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) + Cuerpo = Cuerpo.Replace("{""Total""}", Dr("Total").ToString().FormatoNumero()) + Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", Dr("FechaVencimiento").ToString().ToDate().ToShortDateString()) + + Cuerpo = Cuerpo.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) + + + End If + End If + + + If UsuarioActual.Empresa.AsuntoPlantillaMailVentaCotizacion.Trim.Length > 0 Then + Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVentaCotizacion + Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) + Asunto = Asunto.Replace("{""Sucursal""}", HdnSubProyecto2.Value.ToString()) + Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString()) + End If + + Else + If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then + Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta + Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) + Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) + Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) + Cuerpo = Cuerpo.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString()) + If Dr IsNot Nothing Then + Cuerpo = Cuerpo.Replace("{""Fecha""}", Dr("Fecha").ToString().ToDate().ToShortDateString()) + Cuerpo = Cuerpo.Replace("{""Total""}", Dr("Total").ToString().FormatoNumero()) + Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", Dr("FechaVencimiento").ToString().ToDate().ToShortDateString()) + Cuerpo = Cuerpo.Replace("{""Vigencia""}", Dr("Vigencia").ToString()) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", Dr("AtencionA").ToString()) + End If + End If + + + If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then + Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta + Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) + Asunto = Asunto.Replace("{""Sucursal""}", HdnSubProyecto2.Value.ToString()) + Asunto = Asunto.Replace("{""SerieFolio""}", HdnSerieFolio2.Value.ToString()) + End If + + End If + + + If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso HdnTipoDocto2.Value.Contiene("Ing", "Egs") Then If File.Exists($"{Ruta}PDF\{HdnTipoDocto2.Value}\{HdnFolioVenta2.Value}.pdf") AndAlso File.Exists($"{Ruta}XML\{HdnTipoDocto2.Value}\{HdnFolioVenta2.Value}.xml") Then Dim PDF As String = $"{Ruta}PDF\{HdnTipoDocto2.Value}\{HdnFolioVenta2.Value}.pdf" diff --git a/Ventas/RepVentaDetalle.aspx b/Ventas/RepVentaDetalle.aspx index 61fae0be3..d2a2fbaf2 100644 --- a/Ventas/RepVentaDetalle.aspx +++ b/Ventas/RepVentaDetalle.aspx @@ -556,7 +556,7 @@ <%-- 36--%> - + @@ -702,7 +702,7 @@
    - + diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 49e7091bb..8923c8ddd 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -10372,14 +10372,16 @@ Partial Class Ventas 'EN EMPRESA DE ACUMULADORES NO DESCARGAR EL PDF If UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then If CveVenta > 0 Then MensajeAlert = New StringBuilder + Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta)) + Dim ArchivoCotizacionMrt As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.mrt", UsuarioActual.Empresa.Ruta)) If Opcion = "Cot" And UsuarioActual.Empresa.Funcionalidad(558) = "1" Then MensajeAlert.AppendFormat("Facturar

    ", CveVenta) End If - If ArchivoCotizacion.Exists Then - MensajeAlert.AppendFormat("
    ", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta))) + If ArchivoCotizacion.Exists Or ArchivoCotizacionMrt.Exists Then + MensajeAlert.AppendFormat("
    ", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0&GUARDAR=1", CveVenta))) Else MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ") End If @@ -20821,23 +20823,51 @@ Partial Class Ventas If TipoDocto = "Cot" Then TipoComprobante = "Cotización" If TipoDocto = "Ant" Then TipoComprobante = "Anticipo" - If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then - Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta - Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) - Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) - Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) - Cuerpo = Cuerpo.Replace("{""Fecha""}", TxtFecha.Text) - Cuerpo = Cuerpo.Replace("{""Total""}", TxtTotal.Text) - Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", TxtFechaPago.Text) - Cuerpo = Cuerpo.Replace("{""SerieFolio""}", SerieFolio) + + If TipoDocto = "Cot" Then + If UsuarioActual.Empresa.PlantillaMailVentaCotizacion.Trim.Length > 0 Then + Cuerpo = UsuarioActual.Empresa.PlantillaMailVentaCotizacion + Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) + Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) + Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) + Cuerpo = Cuerpo.Replace("{""Fecha""}", TxtFecha.Text) + Cuerpo = Cuerpo.Replace("{""Total""}", TxtTotal.Text) + Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", TxtFechaPago.Text) + Cuerpo = Cuerpo.Replace("{""SerieFolio""}", SerieFolio) + Cuerpo = Cuerpo.Replace("{""Vigencia""}", TxtFechaVencimientoCotizacion.Text) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", TxtAtencionA.Text) + End If + + If UsuarioActual.Empresa.AsuntoPlantillaMailVentaCotizacion.Trim.Length > 0 Then + Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVentaCotizacion + Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) + Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text) + Asunto = Asunto.Replace("{""SerieFolio""}", SerieFolio) + End If + + Else + If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then + Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta + Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa) + Cuerpo = Cuerpo.Replace("{""NombreCliente""}", LtlCliente.Text.Trim) + Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante) + Cuerpo = Cuerpo.Replace("{""Fecha""}", TxtFecha.Text) + Cuerpo = Cuerpo.Replace("{""Total""}", TxtTotal.Text) + Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", TxtFechaPago.Text) + Cuerpo = Cuerpo.Replace("{""SerieFolio""}", SerieFolio) + 'Cuerpo = Cuerpo.Replace("{""Vigencia""}", TxtFechaVencimientoCotizacion.Text) + Cuerpo = Cuerpo.Replace("{""AtencionA""}", TxtAtencionA.Text) + End If + + If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then + Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta + Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) + Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text) + Asunto = Asunto.Replace("{""SerieFolio""}", SerieFolio) + End If End If - If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then - Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta - Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante) - Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text) - Asunto = Asunto.Replace("{""SerieFolio""}", SerieFolio) - End If + If Not EnviarFactura Then ResultadoMail = 0 From 31596e8ea2ff981331c9c66f3b91d4cb5ca5e1fc Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 26 Aug 2023 15:40:50 -0700 Subject: [PATCH 071/111] -- idcta de proveedores para emd --- App_Code/ClsCompProveedores.vb | 20 +++- Compras/Proveedores.aspx | 198 +++++++++++++++++---------------- Compras/Proveedores.aspx.vb | 99 +++++++++-------- 3 files changed, 173 insertions(+), 144 deletions(-) diff --git a/App_Code/ClsCompProveedores.vb b/App_Code/ClsCompProveedores.vb index df3a94b11..aee9aab93 100644 --- a/App_Code/ClsCompProveedores.vb +++ b/App_Code/ClsCompProveedores.vb @@ -402,7 +402,9 @@ Public Class ClsCompProveedores CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, Estatus As Boolean, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveProveedor As Integer, Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional CveUsuarioModifico As Integer = -1, Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "", - Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1) As Boolean + Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1, + Optional IdCtaContProveedores As Integer = -1, Optional CtaContProveedores As String = "", Optional IdCtaContExtranjera As Integer = -1, Optional CtaContExtranjera As String = "", Optional IdCtaContComplementaria As Integer = -1, Optional CtaContComplementaria As String = "", + Optional IdCtaContAnticipos As Integer = -1, Optional CtaContAnticipos As String = "", Optional IdCtaContAnticiposExtranjera As Integer = -1, Optional CtaContAnticiposExtranjera As String = "", Optional IdCtaContAnticiposComplementaria As Integer = -1, Optional CtaContAnticiposComplementaria As String = "") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ProveedorUpdate") @@ -456,6 +458,22 @@ Public Class ClsCompProveedores .Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor .Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal + 'Proveedores + .Add("@IdCtaContProveedores", SqlDbType.Int).Value = IdCtaContProveedores + .Add("@CtaContProveedores", SqlDbType.VarChar).Value = CtaContProveedores + .Add("@IdCtaContExtranjera", SqlDbType.Int).Value = IdCtaContExtranjera + .Add("@CtaContExtranjera", SqlDbType.VarChar).Value = CtaContExtranjera + .Add("@IdCtaContComplementaria", SqlDbType.Int).Value = IdCtaContComplementaria + .Add("@CtaContComplementaria", SqlDbType.VarChar).Value = CtaContComplementaria + + 'Anticipos + .Add("@IdCtaContAnticipos", SqlDbType.Int).Value = IdCtaContAnticipos + .Add("@CtaContAnticipos", SqlDbType.VarChar).Value = CtaContAnticipos + .Add("@IdCtaContAnticiposExtranjera", SqlDbType.Int).Value = IdCtaContAnticiposExtranjera + .Add("@CtaContAnticiposExtranjera", SqlDbType.VarChar).Value = CtaContAnticiposExtranjera + .Add("@IdCtaContAnticiposComplementaria", SqlDbType.Int).Value = IdCtaContAnticiposComplementaria + .Add("@CtaContAnticiposComplementaria", SqlDbType.VarChar).Value = CtaContAnticiposComplementaria + End With Try diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index e878fb243..a646652f3 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -931,7 +931,7 @@ - +
    +
    diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index e0b7474a8..1f6399768 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -189,9 +189,9 @@ Partial Class Ventas_ClientesAbonar Dim dia As Integer = If(UsuarioActual.CveEmpresa = 13, Now.Day - 1, Now.Day) Fecha = (dia.ToString + "/" + Now.Month.ToString + "/" + Now.Year.ToString).ToDate - If UsuarioActual.Empresa.Funcionalidad(712) = "1" Then - PorletIntermediario.Visible = True - End If + 'If UsuarioActual.Empresa.Funcionalidad(712) = "1" Then + ' PorletIntermediario.Visible = True + 'End If If CargaCliente(CveCliente, CveMonedaFiltro) Then @@ -441,10 +441,8 @@ Partial Class Ventas_ClientesAbonar Else TxtFolio.Text = "" - End If - End Sub Protected Sub DdlTipoTransaccion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoTransaccion.SelectedIndexChanged @@ -489,9 +487,6 @@ Partial Class Ventas_ClientesAbonar e.Row.Cells(6).Width = Unit.Pixel(50) e.Row.Cells(7).Width = Unit.Pixel(70) e.Row.Cells(8).Width = Unit.Pixel(50) - 'e.Row.Cells(9).Width = Unit.Pixel(90) - 'e.Row.Cells(10).Width = Unit.Pixel(80) - 'e.Row.Cells(11).Width = Unit.Pixel(60) End If e.Row.Cells(9).HorizontalAlign = HorizontalAlign.Right @@ -920,21 +915,6 @@ Partial Class Ventas_ClientesAbonar If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal * If(Pago.CveMonedaPago = VentaActual.CveMoneda, 1, Pago.TCPago) - 'If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then - ' EsAnticipoEspecial = True - ' Pago.AplicaTraslado = False - ' Dim IdCtaContable As Integer = If(EsAnticipoEspecial, IdCtaAnticipo, IdCuentaCliente) - ' If VentaActual.CveMoneda = 2 Then IdCtaContable = If(EsAnticipoEspecial, IdCtaContMonedaExtranjeraAnticipo, IdCtaContMonedaExtranjera) - - ' If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 3, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 95, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveCliente:=ViewState("CveCliente").ToString.ToEntero, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then - ' MsgError = "No se pudo insertar la póliza" - ' End If - ' Else - ' MsgError = "No se pudo insertar la póliza" - ' End If - 'End If - If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso MsgError = "" Then '' si es empresa agrícola Dim FluctuacionAnticipo As Decimal = 0 Dim ImporteLiq1 As Decimal = gvr.FCTextBox("TxtLiqCol1").Text.ToDecimal @@ -1079,15 +1059,14 @@ Partial Class Ventas_ClientesAbonar End If ' Case 134 'Pago Intermediario - If RblTipoPago.SelectedValue = "2" Then - Dim ImporteMovimiento As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - gvr.FCTextBox("TxtComision").Text.ToDecimal - Dim ImporteMN As Decimal = (ImporteMovimiento * tipoCambioPago).RoundSQL - Dim IdCtaContable As Integer = 0 + 'If RblTipoPago.SelectedValue = "2" Then + ' Dim ImporteMovimiento As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal - gvr.FCTextBox("TxtComision").Text.ToDecimal + ' Dim ImporteMN As Decimal = (ImporteMovimiento * tipoCambioPago).RoundSQL - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 134, VentaActual.SerieFolio, VentaActual.SerieFolio, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero) Then - MsgError = "No se pudo insertar la póliza" - End If - End If + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 134, VentaActual.SerieFolio, VentaActual.SerieFolio, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveSubProyecto:=CveSubProyectoContabilizar, CveProveedor:=DdlProveedorPagoInt.SelectedValue.ToEntero) Then + ' MsgError = "No se pudo insertar la póliza" + ' End If + 'End If 'PARA EMITIR COMPLEMENTO PAGO CveVentasPago.Add(gvr.DataKey("CveVenta").ToEntero) @@ -1924,7 +1903,6 @@ Partial Class Ventas_ClientesAbonar TmpDT.Columns.Add("Total", GetType(Decimal)) 'Para uso del módulo contable TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) - TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer)) TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("Proyecto", GetType(String)) diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index 1b1b48cfc..efaae63ff 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -832,7 +832,7 @@
    - + @@ -1752,7 +1752,7 @@ - + @@ -4369,7 +4369,7 @@
    + DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos"> @@ -4495,7 +4495,7 @@ --%> -
    - +
    + +
    + +
    diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 7274f3c51..01e24f94b 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -395,6 +395,7 @@ Partial Class AF_AF If Request("Opt") IsNot Nothing AndAlso IsNumeric(Request("Opt")) Then Tab.ActiveTabIndex = Request("Opt").ToEntero HlEvento.Visible = True HlEvento.NavigateUrl = String.Format("/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveActivoFijo=" & CveActivoFijo & "&TB_iframe=true&height=370&width=600;") + LtlTareaNueva.Text = String.Format(" Tarea", CveActivoFijo) Else ViewState("CveActivoFijo") = -1 diff --git a/App_Code/CalendarEvent.vb b/App_Code/CalendarEvent.vb index 05748e891..f048b5d51 100644 --- a/App_Code/CalendarEvent.vb +++ b/App_Code/CalendarEvent.vb @@ -45,6 +45,15 @@ Public Class CalendarEvent Public Property CveCompra As Integer Public Property SerieFolioCompra As String + Public Property CveVenta As Integer + Public Property SerieFolioVenta As String + Public Property CveActivoFijo As Integer + Public Property AFCodigo As String + + Public Property CveMovimiento As Integer + Public Property MovimientoFolio As String + Public Property CveIE As Integer + Public Property FolioIE As String End Class diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index 56d781b38..6eb47b0ba 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -964,7 +964,8 @@ Public Class ClsOIEventos Optional CveActivoFijo As Integer = -1, Optional CveIE As Integer = -1, Optional CveProspecto As Integer = -1, Optional CveCliente As Integer = -1, Optional CveOS As Integer = -1, Optional CveOC As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveContrato As Integer = -1, Optional CveSubProyecto As Integer = -1, - Optional CveMovimientoAlmacen As Integer = -1, Optional CorreoExterno As String = "", Optional CveTableroLista As Integer = -1, Optional Lugar As String = "", Optional Asistencia As String = "", Optional Duracion As String = "") As Boolean + Optional CveMovimientoAlmacen As Integer = -1, Optional CorreoExterno As String = "", Optional CveTableroLista As Integer = -1, Optional Lugar As String = "", + Optional Asistencia As String = "", Optional Duracion As String = "", Optional CveAcercamiento As Integer = -1) As Boolean Dim retorno As Boolean = False Dim xmlMiembros As System.Xml.Linq.XDocument = Nothing @@ -1026,9 +1027,11 @@ Public Class ClsOIEventos .Add("@Asistencia", SqlDbType.VarChar).Value = Asistencia .Add("@Lugar", SqlDbType.VarChar).Value = Lugar .Add("@CveTableroLista", SqlDbType.VarChar).Value = CveTableroLista - - '.Add("@mailPara", SqlDbType.VarChar).Direction = ParameterDirection.Output - '.Add("@mailBody", SqlDbType.Xml).Direction = ParameterDirection.Output + .Add("@CveAcercamiento", SqlDbType.VarChar).Value = CveAcercamiento + + + '.Add("@mailPara", SqlDbType.VarChar).Direction = ParameterDirection.Output + '.Add("@mailBody", SqlDbType.Xml).Direction = ParameterDirection.Output End With Dim separador As String = "" @@ -2488,12 +2491,14 @@ Public Class ClsOIEventos Optional RecurrenciaTipo As Integer = -1, Optional Frecuencia As Integer = -1, Optional DiasSemana As String = "-1", Optional Dia As Integer = -1, Optional Mes As Integer = -1, Optional RecurrenciaFin As String = "-1", Optional CveTipoEvento As Integer = 2, Optional Importe As Double = -1, Optional CveEmpresaCRM As Integer = -1, Optional CveContactoCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional CveTipoProcesoCRM As Integer = -1, Optional CveEtapaProcesoCRM As Integer = -1, - Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveCompra As Integer = -1) As Boolean + Optional CveSubProyecto As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveCompra As Integer = -1, Optional CveVenta As Integer = -1, Optional CveMovimiento As Integer = -1) As Boolean Dim Retorno As Boolean = False Retorno = AddEvento(CveTipoEvento, CveAgendaTipo, Asunto, Descripcion, Prioridad, CveUsuarioPara, CveUsuarioIng, FechaInicio, FechaFin, -1, -1, "-1", CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveEventoPadre:=CveEventoPadre, RecurrenciaTipo:=RecurrenciaTipo, Frecuencia:=Frecuencia, DiasSemana:=DiasSemana, Dia:=Dia, Mes:=Mes, RecurrenciaFin:=RecurrenciaFin, Importe:=Importe, - CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto, CveCompra:=CveCompra) + CveEmpresaCRM:=CveEmpresaCRM, CveContactoCRM:=CveContactoCRM, CveAcercamientoCRM:=CveAcercamientoCRM, CveTipoProcesoCRM:=CveTipoProcesoCRM, CveEtapaProcesoCRM:=CveEtapaProcesoCRM, CveSubProyecto:=CveSubProyecto, CveCompra:=CveCompra, + CveVenta:=CveVenta, CveMovimientoAlmacen:=CveMovimiento) + Return Retorno End Function diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 6dfb8875c..60ef44198 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -199,6 +199,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.CveCompra = dr("CveCompra").ToString.ToEntero cevent.SerieFolioCompra = dr("SerieFolioCompra").ToString + cevent.CveVenta = dr("CveVenta").ToString.ToEntero + cevent.SerieFolioVenta = dr("SerieFolioVenta").ToString + cevent.CveOS = dr("CveOS").ToString.ToEntero cevent.CveOSDetalle = dr("CveOSDetalle").ToString.ToEntero cevent.CveUsuarioAtendio = dr("CveUsuarioAtendio").ToString.ToEntero @@ -206,6 +209,16 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState cevent.NombreAcercamiento = dr("NombreAcercamiento").ToString + cevent.CveActivoFijo = dr("CveActivoFijo").ToString.ToEntero + cevent.AFCodigo = dr("AFCodigo").ToString + + cevent.CveMovimiento = dr("CveMovimientoAlmacen").ToString.ToEntero + cevent.MovimientoFolio = dr("MovimientoFolio").ToString + + cevent.CveIE = dr("CveIE").ToString.ToEntero + cevent.FolioIE = dr("FolioIE").ToString + + '11/05/2018 - Evento Gasto Recurrente cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero If cevent.CveTipoEvento = 10 Then diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 6e850972f..6d21f2776 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -1038,6 +1038,13 @@
    +
    + + diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index e2fb8b45c..894b41ffd 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -727,6 +727,7 @@ Partial Class Bancos_IE 'ImgAddObs.Attributes.Add("onclick", "javascript:PosicionaObjeto(this.id,'DivEventoBitacora',null,-250,-250); $('#DivEventoBitacora').show(1000); ") HlEvento.Visible = True HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveIE=" & CveIE & "&TB_iframe=true&height=370&width=600;" + LtlTareaNueva.Text = String.Format(" Tarea", CveIE) CargaOCRelacionadas() diff --git a/Bancos/RepProgramarRecursos.aspx.vb b/Bancos/RepProgramarRecursos.aspx.vb index 07f3fd648..4be5153f5 100644 --- a/Bancos/RepProgramarRecursos.aspx.vb +++ b/Bancos/RepProgramarRecursos.aspx.vb @@ -856,12 +856,17 @@ Partial Class Bancos_RepProgramarRecursos Programo = If(DdlUsuarioProgramo.SelectedValue = "-1", "", $" Autorizado Por: {DdlUsuarioProgramo.SelectedItem.Text}") End If + Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") + Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Programadas", If(ChkProgramadas.Checked, 1, 0))) params.Add(New ReportParameter("usuarioProgramo", UsuarioProgramo)) - params.Add(New ReportParameter("Agrupador", DdlAgrupador.SelectedValue)) - params.Add(New ReportParameter("LogoUrl", String.Format("{0}/Empresas/{1}/Logo.png", Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, ""), UsuarioActual.CveEmpresa))) + params.Add(New ReportParameter("Agrupador", DdlAgrupador.SelectedValue)) + + 'params.Add(New ReportParameter("LogoUrl", String.Format("{0}/Empresas/{1}/Logo.png", Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, ""), UsuarioActual.CveEmpresa))) + params.Add(New ReportParameter("LogoUrl", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToShortDateString)) params.Add(New ReportParameter("AgrupadoPor", $"{Programo}{Proveedor}{Clasificacion}{AplicaNC}{TipoProv}{FechaIn}{FechaFn}{FechaInV}{FechaFnV}{Moneda}{Registro}{Responsable}{Estatus}{Proyecto}{SubProyecto}{Comprobacion}")) diff --git a/CRM/Acercamiento.aspx b/CRM/Acercamiento.aspx index 249a0a419..4a287efb1 100644 --- a/CRM/Acercamiento.aspx +++ b/CRM/Acercamiento.aspx @@ -1029,7 +1029,16 @@
  • +
  • + + +
  • + <%--
    diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index ceb7351e6..0962862e8 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -346,6 +346,7 @@ public partial class CRM_Acercamiento : ClsPaginas } CargaCheckLis(); + LtlTareaNueva.Text = String.Format(" Tarea", CveAcercamiento); } CargarPS(); //BtnGuardarAcercamiento.Visible = true; diff --git a/Inicio.aspx b/Inicio.aspx index 125ebff4c..14e960aa7 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -362,7 +362,7 @@ - <%--
    +
    @@ -396,7 +396,7 @@   - + @@ -413,7 +413,8 @@ -
    --%> +
    + <%--
    @@ -1427,9 +1428,9 @@ - +
    -
    +
    @@ -1863,7 +1864,7 @@ } else { $("#CheckRecurrencia").prop('checked', false); } - + //ESCONDE O MUESTRA EL DIV DE LAS OPCIONES DE RECURRENCIA if ($get('CheckRecurrencia').checked) { @@ -1873,15 +1874,18 @@ } //LLAMA EL INDEXCHANGED DEL RADIOBUTTONLIST DE LOS TIPOS DE RECURRENCIA - $("#BtnActualizaAdd").click(); + $("#BtnActualizaAdd").click(); + if (isNaN(event.CveAgendaTipo)) { + $("#DVDdlAgedaTipo").css("display", "none"); + } else { + $("#DVDdlAgedaTipo").css("display", "inline"); + } //Muestra nombre de la empresa si esta tarea sea asigno desde EmpresaCRM - if (event.CveEmpresaCRM > 0 || event.CveAcercamientoCRM > 0 || event.CvePersonal > 0 || event.CveCliente > 0 || event.CveProveedor > 0 || event.CveCompra > 0) { + if (event.CveEmpresaCRM > 0 || event.CveAcercamientoCRM > 0 || event.CvePersonal > 0 || event.CveCliente > 0 || event.CveProveedor > 0 || event.CveCompra > 0 || event.CveVenta > 0 || event.CveActivoFijo || event.CveMovimiento || event.CveMovimiento) { $("#<%=LnkTituloLink.ClientID%>").css("display", ""); - - if (event.CveAcercamientoCRM > 0) { $("#<%=LnkTituloLink.ClientID%>").text("Acercamiento/Oportunidad: " + event.NombreAcercamiento); @@ -1913,10 +1917,42 @@ } + if (event.CveVenta > 0) { + $("#<%=LnkTituloLink.ClientID%>").text("Venta: " + event.SerieFolioVenta); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/Ventas/Ventas.aspx?CveVenta=" + event.CveVenta); + } + + + if (event.CveActivoFijo > 0) { + $("#<%=LnkTituloLink.ClientID%>").text("Activo Fijo: " + event.AFCodigo); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/AF/AF.aspx?CveActivoFijo=" + event.CveActivoFijo); + } + + if (event.CveMovimiento > 0) { + $("#<%=LnkTituloLink.ClientID%>").text("Movimiento: " + event.MovimientoFolio); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/Inventarios/EntradasSalidas.aspx?CveMovimiento=" + event.CveMovimiento); + } + + if (event.CveIE > 0) { + $("#<%=LnkTituloLink.ClientID%>").text("Movimiento: " + event.FolioIE); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/Bancos/IE.aspx?CveIE=" + event.CveIE); + } + - } else { - $("#<%=LnkTituloLink.ClientID%>").css("display", "none") + + } else { + + $("#<%=LnkTituloLink.ClientID%>").css("display", ""); + if (event.CveTipoEvento == 1) { + $("#<%=LnkTituloLink.ClientID%>").text("Tarea: " + event.title); + $("#<%=LnkTituloLink.ClientID%>").attr("href", "/OI/TareaDetalle.aspx?CveTipoEvento=1&CveEvento=" + event.id); + + } else { + $("#<%=LnkTituloLink.ClientID%>").css("display", "none"); + } + + } diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index 84d0393f9..582cf8afb 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -203,7 +203,7 @@ Partial Class Inicio CargaGraficas() End If - 'CargaTareas() + CargaTareas() If UsuarioActual.CveRol = 1 Then divInd.Visible = True CargaSubProyectos() @@ -242,6 +242,11 @@ Partial Class Inicio IniializaDdlsOpcionesAgenda() + + If UsuarioActual.CveEmpresa.Contiene(13, 83) Then + DVTareas.Visible = True + End If + End If End Sub @@ -548,39 +553,41 @@ Partial Class Inicio End Sub - 'Private Sub CargaTareas() - ' Dim ObjProspectos As New ClsOIEventos + Private Sub CargaTareas() + Dim ObjProspectos As New ClsOIEventos - ' Dim FechaI, FechaF As DateTime - ' Dim CveEventoEstatus As Integer = -1 - ' FechaI = Now.AddDays(-180) - ' FechaF = Now - ' If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then + Dim FechaI, FechaF As DateTime + Dim CveEventoEstatus As Integer = -1 + FechaI = Now.AddDays(-180) + FechaF = Now + If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then - ' Dim DT As DataTable = ObjProspectos.DtResultados.Clone + Dim DT As DataTable = ObjProspectos.DtResultados.Clone.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") - ' If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} ", UsuarioActual.CveUsuario))) - ' If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} ", UsuarioActual.CveUsuario))) + If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} AND CveEmpresa = {1}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))) + If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} AND CveEmpresa = {1} ", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))) - ' GvT.DataSource = DT - ' End If - ' ObjProspectos.Dispose() - ' GvT.DataBind() - 'End Sub - 'Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound - ' If e.Row.RowType = DataControlRowType.DataRow Then - ' Select Case UsuarioActual.CveUsuario.ToString - ' Case e.Row.DBCampo("CveUsuarioPara") - ' 'etiqueta de 'asignado' - ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning " - ' e.Row.FCLabel("LblTipo").Text = "por hacer " - ' Case e.Row.DBCampo("CveUsuarioDe") - ' e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" - ' e.Row.FCLabel("LblTipo").Text = "Asigné" - ' End Select - ' End If - 'End Sub + DT = DT.FiltraParametros("Avance < 100", "", {"Asunto", "CveEvento", "CveUsuarioPara", "CveUsuarioDe"}) + GvT.DataSource = DT + End If + + ObjProspectos.Dispose() + GvT.DataBind() + End Sub + Protected Sub GvT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvT.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Select Case UsuarioActual.CveUsuario.ToString + Case e.Row.DBCampo("CveUsuarioPara") + 'etiqueta de 'asignado' + e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-warning " + e.Row.FCLabel("LblTipo").Text = "por hacer " + Case e.Row.DBCampo("CveUsuarioDe") + e.Row.FCLabel("LblTipo").CssClass = "label label-sm label-success" + e.Row.FCLabel("LblTipo").Text = "Asigné" + End Select + End If + End Sub Private Sub MuestraIndicador(DIV As HtmlGenericControl, Color As String, Icono As String, Titulo As String, Comentario As String, Link As String, TitleComentario As String) Dim htmldiv As New StringBuilder htmldiv.AppendFormat("{0}
    ", DIV.InnerHtml, Color, Icono) @@ -1061,9 +1068,9 @@ Partial Class Inicio End Sub #End Region - 'Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged - ' CargaTareas() - 'End Sub + Protected Sub ChkOIAsigne_CheckedChanged(sender As Object, e As EventArgs) Handles ChkOIAsigne.CheckedChanged, ChkOIPorHacer.CheckedChanged + CargaTareas() + End Sub Protected Sub DdlFiltroIndicador_SelectedIndexChanged(sender As Object, e As EventArgs) End Sub diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx index c802f6cb1..1bcacf197 100644 --- a/Inventarios/EntradasSalidas.aspx +++ b/Inventarios/EntradasSalidas.aspx @@ -921,8 +921,15 @@
    -
    - +
    + +
    + +
    diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 7a4a76cd2..9cd866b78 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -416,6 +416,10 @@ Partial Class Inventarios_EntradasSalidas CargaDatos(Request("CveMovimiento").ToString.ToEntero) 'CargaGvPaqueteria() + + LtlTareaNueva.Text = String.Format(" Tarea", CveMovimiento) + HlEvento.Visible = True + HlEvento.NavigateUrl = "/OI/PopUpAgenda.aspx?CveTipoEvento=2&CveMovimiento=" & CveMovimiento & "&TB_iframe=true&height=370&width=600;" Else AsignacionOpcion() SiguienteFolio() diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 62ba9c921..5b3cf7b11 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2555,7 +2555,7 @@ Partial Class OC_OC End If - If TipoOC.ToUpper = "REQ" AndAlso CveEstatusFinalOK = CboE.SelectedValue.ToEntero AndAlso DdlProveedores.SelectedValue.ToEntero <= 0 Then + If TipoOC.ToUpper = "REQ" AndAlso PnlProveedor.Visible AndAlso CveEstatusFinalOK = CboE.SelectedValue.ToEntero AndAlso DdlProveedores.SelectedValue.ToEntero <= 0 Then Alert("Debe seleccionar un proveedor.", TipoMensaje.MsgAdvertencia) TieneError = True End If diff --git a/OI/PopUpAgenda.aspx.vb b/OI/PopUpAgenda.aspx.vb index 11d980faf..0b5f58b89 100644 --- a/OI/PopUpAgenda.aspx.vb +++ b/OI/PopUpAgenda.aspx.vb @@ -338,6 +338,14 @@ Partial Class OI_PopUpAgenda CargaCompra(CveCompra:=Request("CveCompra").ToEntero) End If + If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then + CargaVenta(CveVenta:=Request("CveVenta").ToEntero) + End If + + If Request("CveMovimiento") IsNot Nothing AndAlso IsNumeric(Request("CveMovimiento")) AndAlso Request("CveMovimiento").ToEntero > 0 Then + CargaMovimiento(CveMovimiento:=Request("CveMovimiento").ToEntero) + End If + If Request("CveEvento") IsNot Nothing AndAlso IsNumeric(Request("CveEvento")) AndAlso Request("CveEvento").ToEntero > 0 Then @@ -640,6 +648,7 @@ Partial Class OI_PopUpAgenda Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa + '----------------------------------------- Dim CveAgendaTipo As Integer = DdlAgendaTipo.SelectedValue.ToEntero Dim Prioridad As Integer @@ -697,6 +706,16 @@ Partial Class OI_PopUpAgenda CveCompra = Request("CveCompra").ToEntero End If + Dim CveVenta As Integer = -1 + If Request("CveVenta") IsNot Nothing AndAlso IsNumeric(Request("CveVenta")) AndAlso Request("CveVenta").ToEntero > 0 Then + CveVenta = Request("CveVenta").ToEntero + End If + + Dim CveMovimiento As Integer = -1 + If Request("CveMovimiento") IsNot Nothing AndAlso IsNumeric(Request("CveMovimiento")) AndAlso Request("CveMovimiento").ToEntero > 0 Then + CveMovimiento = Request("CveMovimiento").ToEntero + End If + '------------------------------------------ 'Recorrro Grid para obtener el usuario PARA For Each RowPara As GridViewRow In GVUsuarios.Rows @@ -723,7 +742,7 @@ Partial Class OI_PopUpAgenda Alert("La Nueva Tarea se guardó correctamente.", TipoMensaje.MsgInformacion) End If ElseIf CveTipoEvento = 2 Then - If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra) Then + If ObjEventos.AddEventoAgenda(CveAgendaTipo, Asunto, Descripcion, Prioridad, FechaInicio.ToDateTime, FechaFin.ToDateTime, CveUsuarioIng, CveEmpresa, CveActivoFijo, CveIE, CveProspecto, CveCliente, CveOS, CveOC, CvePersonal, CveProveedor, CveCompra:=CveCompra, CveVenta:=CveVenta, CveMovimiento:=CveMovimiento) Then Alert("La Nueva Agenda se guardó correctamente.", TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();") End If ElseIf CveTipoEvento = 3 Then @@ -1313,6 +1332,29 @@ Partial Class OI_PopUpAgenda objCompra.Dispose() End Sub + Private Sub CargaVenta(CveVenta As Integer) + + Dim objVenta As New ClsVentas + + If objVenta.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then + Dim dr As DataRow = objVenta.DtResultados.Rows(0) + LtlAgenda.Text = $" Venta: {dr("SerieFolio").ToString}" + End If + objVenta.Dispose() + + End Sub + + Private Sub CargaMovimiento(CveMovimiento As Integer) + Dim objMovimientos As New ClsInventarios + + If objMovimientos.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) Then + Dim dr As DataRow = objMovimientos.DtResultados.Rows(0) + LtlAgenda.Text = $" Folio: {objMovimientos.Folio.ToString}" + End If + objMovimientos.Dispose() + + End Sub + #End Region End Class diff --git a/OI/Proyecto.aspx b/OI/Proyecto.aspx index 19fdbee92..cb69ff67e 100644 --- a/OI/Proyecto.aspx +++ b/OI/Proyecto.aspx @@ -141,14 +141,63 @@
    -
    + <%--
    Para: +
    --%> + + +
    +
    + + + + + + Para + + + <%----%> + + + + + + + C. C. Para +
    + <%-- + --%> +
    + + + +
    + + Usuario + + + + + + Rol + + + + +
    +
    + +
    + +
    diff --git a/OI/Proyecto.aspx.cs b/OI/Proyecto.aspx.cs index ae7236837..ffa7f1c65 100644 --- a/OI/Proyecto.aspx.cs +++ b/OI/Proyecto.aspx.cs @@ -15,8 +15,10 @@ public partial class OI_Proyecto : ClsPaginas public int RCveEventoB { get { return ViewState["RCveEventoB"] != null ? ViewState["RCveEventoB"].ToString().ToEntero() : 0; } set { ViewState["RCveEventoB"] = value; } } public int Folio { get { return ViewState["Folio"] != null ? ViewState["Folio"].ToString().ToEntero() : 0; } set { ViewState["Folio"] = value; } } public decimal Avance { get { return ViewState["Avance"] != null ? ViewState["Avance"].ToString().ToEntero() : 0; } set { ViewState["Avance"] = value; } } + public int CveUsuarioPara { get { return ViewState["CveUsuarioPara"].ToString().ToEntero(); } set { ViewState["CveUsuarioPara"] = value; } } public int CveUsuarioDe { get { return ViewState["CveUsuarioDe"].ToString().ToEntero(); } set { ViewState["CveUsuarioDe"] = value; } } + public List LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List(); } return (List)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } } public List LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List(); } return (List)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } } @@ -25,6 +27,9 @@ public partial class OI_Proyecto : ClsPaginas { if (!IsPostBack) { + CveUsuarioPara = 0; + CveUsuarioDe = 0; + if (Request["CveEvento"] != null) { RCveEvento = Request["CveEvento"].ToString().ToEntero(); @@ -34,13 +39,15 @@ public partial class OI_Proyecto : ClsPaginas loadEvento(); } - DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); ; - DdlPara.DataBind(); - DdlPara.Items.Insert(0, new ListItem("Seleccione", "-1")); + //DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); ; + //DdlPara.DataBind(); + //DdlPara.Items.Insert(0, new ListItem("Seleccione", "-1")); DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario)); DdlTema.DataBind(); DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1")); + + } } @@ -77,6 +84,9 @@ public partial class OI_Proyecto : ClsPaginas protected void LnkNewProyecto_Click(object sender, EventArgs e) { + + SetUsuarios(); + RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); RCveEventoB = RCveEvento; } @@ -87,7 +97,36 @@ public partial class OI_Proyecto : ClsPaginas int cveUsuarioDe = UsuarioActual.CveUsuario; List listaCCP = new List(); - int cveUsuarioPara = DdlPara.SelectedValue.ToEntero(); + int cveUsuarioPara = -1; + + //int cveUsuarioDe = UsuarioActual.CveUsuario; + //List listaCCP = new List(); + //int cveUsuarioPara = -1; + string Nombrepara = ""; + string Nombrede = ""; + foreach (GridViewRow gvRow in GVUsuariosB.Rows) + { + if (gvRow.RowType == DataControlRowType.DataRow) + { + int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); + CheckBox chkpara = gvRow.FCCheckBox("ChkPara"); + CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); + if (CveUsuario == cveUsuarioDe) + { + Nombrede = gvRow.DataKey("Nombre").ToString(); + } + if (chkpara.Checked) + { + cveUsuarioPara = CveUsuario; + Nombrepara = gvRow.DataKey("Nombre").ToString(); + } + if (chkCCpara.Checked) + { + listaCCP.Add(CveUsuario); + //cveUsuarioDe = CveUsuario; + } + } + } OITipoEventos cveTipoEvento = OITipoEventos.Proyecto; string asunto = TxtAsunto.Text; @@ -213,11 +252,107 @@ public partial class OI_Proyecto : ClsPaginas } - protected void BtnopenmodalClickGant_Click(object sender, EventArgs e) { RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarProyecto)); RCveEventoB = txtCveEvento.Text.ToEntero(); } + + + + protected void GVUsuariosB_RowDataBound(object sender, GridViewRowEventArgs e) + { + if (e.Row.RowType == DataControlRowType.DataRow) + { + string CveRol = e.Row.DBCampo("CveRol"); + //string CveSubProyecto = e.Row.DBCampo("CveSubProyecto"); + e.Row.CssClass = "items"; + //e.Row.Attributes.Add("data-rol", CveRol); + //e.Row.Attributes.Add("data-sucursal", CveRol); + } + + } + private void SetUsuarios() + { + + + string[] FiltroAD = { "CveUsuario", "Usuario", "Nombre", "Contraseña", "CveEmpresa", "Rol", "Correo", "Empresa", "CveRol" }; + GVUsuariosB.DataSource = get_GlobalDTUsuarios().FiltraParametros(String.Format("CveEmpresa = {0} AND Estatus =1", UsuarioActual.CveEmpresa), "Nombre ASC", FiltroAD); + GVUsuariosB.DataBind(); + + StringBuilder StrPara = new StringBuilder(); + StringBuilder StrDeUser = new StringBuilder(); + StringBuilder StrCCPara = new StringBuilder(); + + foreach (GridViewRow gvRow in GVUsuariosB.Rows) + { + + if (gvRow.RowType == DataControlRowType.DataRow) + { + int CveUsuario = gvRow.DataKey("CveUsuario").ToString().ToEntero(); + CheckBox chkpara = gvRow.FCCheckBox("ChkPara"); + CheckBox chkCCpara = gvRow.FCCheckBox("ChkCCP"); + chkpara.Checked = false; + chkCCpara.Checked = false; + + if (true) + { + chkpara.Enabled = true; + chkCCpara.Enabled = true; + if (CveUsuario == UsuarioActual.CveUsuario) + { + chkCCpara.Checked = true; + chkCCpara.Enabled = false; + } + } + else + { + + chkpara.Enabled = false; + chkCCpara.Enabled = false; + } + string palomitavisto = ""; + string palomitasinver = ""; + if (CveUsuario == UsuarioActual.CveUsuario || CveUsuario.Contiene(LcveuserVisto.ToArray())) + { + palomitavisto = palomitasinver; + palomitasinver = ""; + } + if ((CveUsuario == CveUsuarioPara) || (CveUsuario == CveUsuarioDe)) + { + if (CveUsuario == CveUsuarioPara) + { + chkpara.Checked = true; + StrPara.AppendFormat("{3}{2}\"{0}\"", gvRow.DataKey("Nombre").ToString(), gvRow.DataKey("Correo").ToString(), palomitavisto, palomitasinver); + } + if (CveUsuario == CveUsuarioDe) + { + chkCCpara.Checked = true; + StrDeUser.AppendFormat("{3}{2}\"{0}\"", gvRow.DataKey("Nombre").ToString(), gvRow.DataKey("Correo").ToString(), palomitavisto, palomitasinver); + } + } + else if (CveUsuario.Contiene(LCveUsuarioCCP.ToArray())) + { + chkCCpara.Checked = true; + StrCCPara.AppendFormat("{3}{2}\"{0}\"; ", gvRow.DataKey("Nombre").ToString(), gvRow.DataKey("Correo").ToString(), palomitavisto, palomitasinver); + } + } + } + //LtlPara.Text = StrPara.ToString(); + //LtlDeUser.Text = StrDeUser.ToString(); + int longitud = StrCCPara.ToString().Length; + if (longitud > 0) + { + //LtlCCPara.Text = string.Format("{0} ", StrCCPara.ToString().Substring(0, longitud - 9)); + + } + else + { + //LtlCCPara.Text = ""; + } + + UpModalProyecto.Update(); + + } } \ No newline at end of file diff --git a/OI/RepProyectos.aspx.cs b/OI/RepProyectos.aspx.cs index eb39fbe13..db1f74b1b 100644 --- a/OI/RepProyectos.aspx.cs +++ b/OI/RepProyectos.aspx.cs @@ -16,7 +16,7 @@ public partial class OI_RepProyectos : ClsPaginas if (!IsPostBack) { - DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Rol ASC"); ; + DdlPara.DataSource = get_GlobalDTUsuarios(CveEmpresa: UsuarioActual.CveEmpresa).FiltraParametros("Estatus =1 ", "Nombre ASC"); ; DdlPara.DataBind(); DdlPara.Items.Insert(0, new ListItem("Seleccione uno", "-1")); diff --git a/OI/RepTareas.aspx b/OI/RepTareas.aspx index c0b51ef60..7577af0fb 100644 --- a/OI/RepTareas.aspx +++ b/OI/RepTareas.aspx @@ -12,9 +12,23 @@ -
  • - Nueva Tarea -
  • + + + + + +
  • + Nueva Tarea +
  • +
  • + Excel +
  • + +
    + + + +
    Reporte de Tareas @@ -25,94 +39,89 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Fecha Inicio de: -
    - - - - -
    - - - - - - -
    Fecha Inicio a: - -
    - - - - -
    - - - - - - -
    Estatus: - + + +
    +
    +
    + +
    +
    + +
    + +
    + Fecha Inicio: +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Fin: +
    +
    +
    + + + + +
    + + + + + + +
    + +
    Estatus:
    +
    + -
    Tema: - - - - - - - - -
    Fecha Fin de: -
    - - - -
    - - -
    Fecha Fin A: - -
    - - - - +
    Tema:
    +
    + + + +
    - - -
    + +
    - +
    + +
    +
    + +
    + + + + + + + + + + +
    @@ -209,22 +218,11 @@
    -
    - - - - - - - <%--Comentado 24 Noviembre, paso a segundo termino--%> - <%----%> - -
    - - - - - - - -
    - + +
    +
    +
    + @@ -240,165 +238,67 @@
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - - <%----%> - - <%----%> - - - <%----%> - - - - <%----%> - - -
    - - Folio - - - - - De - - - - - Asunto - - - - - Comentario - - - - - Prioridad - - - - - Tema - - - - - Fecha Inicio - - - - - Fecha Fin - - - - - Orden - - - - - Tema - - - - - Fecha - - - - - Estatus - - - - - Empresa - - -
    +
    + - - - - - - - - - - - - - - - - - - <%-- - - - - --%> - - - - - - <%-- - - - - --%> - - - - - - - - - - - <%-- - - - - --%> - - - - - - - - - - - - - - - - <%-- - - - - --%> - - - - + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    @@ -417,136 +317,77 @@ " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
    - - - - - - - - - <%----%> - - - - - - - -
    - - Folio - - - - - - - - - - - - - - - - - - - - - - - - - Fecha Inicio - - - - - Fecha Fin - - - - - - - - - - - - - - -
    + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - <%-- - - - - --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + @@ -562,126 +403,71 @@
    " style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    - - - - - - - - <%-- --%> + - - - - - - - - -
    - - - - - - A Quién - - - - Asunto - - - - Prioridad - - - - Orden - - - - Fecha Inicio - - - - - Fecha Fin - - - - - Tema - - - - Fecha - - - - Estatus - -
    - - + - + + +
    +
    + - + - + - + - + - - <%-- - - - - --%> - + + - + - + - + - + - - - + +
    +
    + + + +
    @@ -691,51 +477,13 @@
    -
    -
    -
    - Vista Previa - - - - -
    -
    -
    + + + + + + + - - - - - - Textbox14 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox9 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox1 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cantidad - - - - - - - Textbox10 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox18 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - LightGrey - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.9175cm - - - - - true - true - - - - - Código - - - - - - - Textbox15 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Articulos - - - - - - - Textbox2 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Proveedor - - - - - - - Textbox5 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Exist. Inicial - - - - - - - Textbox4 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Entradas - - - - - - - Textbox7 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Exist. - - - - - - - - - Final - - - - - - - Textbox16 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Saldo Inicial - - - - - - - Textbox19 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Entradas - - - - - - - Textbox22 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Saldo Final - - - - - - - Textbox28 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - LightGrey - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.40421cm - - - - - true - - - - - =Fields!Codigo.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - true - - - - - - true - true - - - - - =Fields!RazonSocial.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SaldoIniCant.Value = "0", "-", Fields!SaldoIniCant.Value) - - - - - - - SaldoInitCant - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!EntradaCant.Value = "0", "-", Fields!EntradaCant.Value) - - - - - - - EntradaCant - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SaldoFCant.Value = "0", "-", Fields!SaldoFCant.Value) - - - - - - - SaldoFCant - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SaldoIniImp.Value = "0", "-", Fields!SaldoIniImp.Value) - - - - - - - SaldoIniImp - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!EntradaImp.Value = "0", "-", Fields!EntradaImp.Value) - - - - - - - EntradaImp - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SaldoFImp.Value = "0", "-", Fields!SaldoFImp.Value) - - - - - - - SaldoFImp - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SaldoInitCant.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!EntradaCant.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SaldoFCant.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SaldoIniImp.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!EntradaImp.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SaldoFImp.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - After - true - true - - - After - true - true - - - - - - - true - - Before - - - - DataSet1 - 0.20849cm - 0.00415cm - 2.52171cm - 20.90254cm - - - - - - 1.16692in - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE ENTRADAS - - - - - - - - - - - - - - - - Textbox2 - 1.13799cm - 2.78201cm - 0.52945cm - 18.12468cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - = Parameters!pImg.Value - FitProportional - 0.01325cm - 2.22362cm - 2.33715cm - 2 - - - - - - true - true - - - - - =Parameters!AgrupadoPor.Value - HTML - - - 2pt - 2pt - 2pt - 2pt - - - - 3.1764cm - 0cm - 20.90669cm - 4 - - - - - - - - - - - 0.727cm - true - true - - - true - true - - - - - ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.28575cm - 15.06595cm - 0.44125cm - 5.51625cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - Textbox8 - 0.28575cm - 0.6059cm - 0.44125cm - 1.60042cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - - Textbox9 - 0.28575cm - 2.15023cm - 0.44125cm - 5.14936cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - Textbox10 - 0.28575cm - 7.47001cm - 0.44125cm - 2.92333cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - - Textbox11 - 0.28575cm - 10.37923cm - 0.44125cm - 4.32745cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.127cm - 0cm - 20.90669cm - 5 - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox14 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox9 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox1 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad + + + + + + + Textbox10 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox18 + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + LightGrey + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + 3 + true + + + + + + + + 0.9175cm + + + + + true + true + + + + + Código + + + + + + + Textbox15 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Articulos + + + + + + + Textbox2 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Proveedor + + + + + + + Textbox5 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist. Inicial + + + + + + + Textbox4 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Entradas + + + + + + + Textbox7 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist. + + + + + + + + + Final + + + + + + + Textbox16 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo Inicial + + + + + + + Textbox19 + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Entradas + + + + + + + Textbox22 + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo Final + + + + + + + Textbox28 + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + LightGrey + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.40421cm + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!RazonSocial.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoIniCant.Value = "0", "-", Fields!SaldoIniCant.Value) + + + + + + + SaldoInitCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!EntradaCant.Value = "0", "-", Fields!EntradaCant.Value) + + + + + + + EntradaCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoFCant.Value = "0", "-", Fields!SaldoFCant.Value) + + + + + + + SaldoFCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoIniImp.Value = "0", "-", Fields!SaldoIniImp.Value) + + + + + + + SaldoIniImp + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!EntradaImp.Value = "0", "-", Fields!EntradaImp.Value) + + + + + + + EntradaImp + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoFImp.Value = "0", "-", Fields!SaldoFImp.Value) + + + + + + + SaldoFImp + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoInitCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!EntradaCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoFCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoIniImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!EntradaImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoFImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + After + true + true + + + + + + + true + + Before + + + + DataSet1 + 0.20849cm + 0.00415cm + 2.52171cm + 20.90254cm + + + + + + 1.16692in + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE ENTRADAS + + + + + + + + + + + + + + + + Textbox2 + 1.13799cm + 2.78201cm + 0.52945cm + 18.12468cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.01325cm + 2.22362cm + 2.33715cm + 2 + + + + + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + 2pt + 2pt + 2pt + 2pt + + + + 3.1764cm + 0cm + 20.90669cm + 4 + + + + + + + + + + + 0.727cm + true + true + + + true + true + + + + + ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.28575cm + 15.06595cm + 0.44125cm + 5.51625cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + Textbox8 + 0.28575cm + 0.6059cm + 0.44125cm + 1.60042cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + + Textbox9 + 0.28575cm + 2.15023cm + 0.44125cm + 5.14936cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox10 + 0.28575cm + 7.47001cm + 0.44125cm + 2.92333cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + Textbox11 + 0.28575cm + 10.37923cm + 0.44125cm + 4.32745cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.127cm + 0cm + 20.90669cm + 5 + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - - - - - - Textbox1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox9 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox10 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox5 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PRIMER CONTEO - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 5 - - - - - - - - - - true - true - - - - - - - - - - - - Textbox14 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.04979cm - - - - - true - true - - - - - Proveedor - - - - - - - Textbox18 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox20 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox23 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Existencia - - - - - - - Textbox25 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad - - - - - - - - - Medida - - - - - - - Textbox4 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Buen estado - - - - - - - Textbox27 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Mal estado (vendible) - - - - - - - Textbox29 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Mal estado (no vendible) - - - - - - - Textbox31 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Conteo total - - - - - - - Textbox37 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Diferencias - - - - - - - Textbox39 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Pedidos - - - - - - - - - - - - - - - - Textbox41 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.44125cm - - - - - true - true - - - - - =Fields!RazonSocial.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SaldoFCant.Value - - - - - - - SaldoFCant - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - 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 - true - - - After - true - - - - - =iif(Fields!CveProveedor.Value IS NOTHING, True, False) - - - - - true - true - DataSet1 - 0.17639cm - 0.1085cm - 2.01166cm - 24.89925cm - - - - - - 0.89609in - - - - - - - - - Levantamiento Inventario Físico - - - - - - - Textbox1 - 0.22049cm - 6.00816cm - 1.18208cm - 17.63729cm - - - 2pt - 2pt - 2pt - 2pt - - - - External - = Parameters!pImg.Value - FitProportional - 0.22049cm - 0.1085cm - 2.27654cm - 4.38911cm - 1 - - - - - - true - true - - - - - SUCURSAL - - - - : - - - - =Parameters!Sucursal.Value - - - - - - - - - BODEGA - - - - : - - - - =Parameters!Bodega.Value - - - - - - - - - FECHA - - - - : - - - - - - - Textbox8 - 2.65931cm - 0.1085cm - 1.42021cm - 24.89925cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - NOMBRE DE QUIENES PARTICIPARON EN EL CONTEO: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 1.07102cm - true - true - - - true - true - - - - - ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.19756cm - 21.78045cm - 0.44125cm - 3.2273cm - - - 2pt - 2pt - 2pt - 2pt - - - - 0.127cm - 0.1085cm - 0cm - 24.89925cm - 1 - - - - - - true - true - - - - - ="<b>Fecha Impresión: </b>" & Globals!ExecutionTime - HTML - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ="<b>Usuario: </b>" & Parameters!UsuarioImprimio.Value - HTML - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox9 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox10 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox5 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PRIMER CONTEO + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 5 + + + + + + + + + + true + true + + + + + + + + + + + + Textbox14 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1.04979cm + + + + + true + true + + + + + Proveedor + + + + + + + Textbox18 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox20 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox23 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Existencia + + + + + + + Textbox25 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + + + + Medida + + + + + + + Textbox4 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Buen estado + + + + + + + Textbox27 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Mal estado (vendible) + + + + + + + Textbox29 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Mal estado (no vendible) + + + + + + + Textbox31 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Conteo total + + + + + + + Textbox37 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Diferencias + + + + + + + Textbox39 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Pedidos + + + + + + + + + + + + + + + + Textbox41 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.44125cm + + + + + true + true + + + + + =Fields!RazonSocial.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SaldoFCant.Value + + + + + + + SaldoFCant + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + 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 + true + + + After + true + + + + + =iif(Fields!CveProveedor.Value IS NOTHING, True, False) + + + + + true + true + DataSet1 + 0.17639cm + 0.1085cm + 2.01166cm + 24.89925cm + + + + + + 0.89609in + + + + + + + + + Levantamiento Inventario Físico + + + + + + + Textbox1 + 0.22049cm + 6.00816cm + 1.18208cm + 17.63729cm + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.22049cm + 0.1085cm + 2.27654cm + 4.38911cm + 1 + + + + + + true + true + + + + + SUCURSAL + + + + : + + + + =Parameters!Sucursal.Value + + + + + + + + + BODEGA + + + + : + + + + =Parameters!Bodega.Value + + + + + + + + + FECHA + + + + : + + + + + + + Textbox8 + 2.65931cm + 0.1085cm + 1.42021cm + 24.89925cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + NOMBRE DE QUIENES PARTICIPARON EN EL CONTEO: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 1.07102cm + true + true + + + true + true + + + + + ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.19756cm + 21.78045cm + 0.44125cm + 3.2273cm + + + 2pt + 2pt + 2pt + 2pt + + + + 0.127cm + 0.1085cm + 0cm + 24.89925cm + 1 + + + + + + true + true + + + + + ="<b>Fecha Impresión: </b>" & Globals!ExecutionTime + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="<b>Usuario: </b>" & Parameters!UsuarioImprimio.Value + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - - - - - - Textbox14 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox9 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox1 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cantidad - - - - - - - Textbox10 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox18 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - LightGrey - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - 0.9175cm - - - - - true - true - - - - - Código - - - - - - - Textbox15 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Articulos - - - - - - - Textbox2 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Proveedor - - - - - - - Textbox5 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Exist. Inicial - - - - - - - Textbox4 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Salidas - - - - - - - Textbox7 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Exist. - - - - - - - - - Final - - - - - - - Textbox16 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Saldo Inicial - - - - - - - Textbox19 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Salidas - - - - - - - Textbox22 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Saldo Final - - - - - - - Textbox28 - - - - White - - 1pt - - - White - - 1pt - - - White - - 1pt - - - LightGrey - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.37775cm - - - - - true - - - - - =Fields!Codigo.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - - - - - =Fields!PS.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!RazonSocial.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SaldoIniCant.Value = "0", "-", Fields!SaldoIniCant.Value) - - - - - - - SaldoInitCant - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SalidaCant.Value = "0", "-", Fields!SalidaCant.Value) - - - - - - - EntradaCant - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SaldoFCant.Value = "0", "-", Fields!SaldoFCant.Value) - - - - - - - SaldoFCant - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SaldoIniImp.Value = "0", "-", Fields!SaldoIniImp.Value) - - - - - - - SaldoIniImp - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SalidaImp.Value = "0", "-", Fields!EntradaImp.Value) - - - - - - - EntradaImp - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =IIF(Fields!SaldoFImp.Value = "0", "-", Fields!SaldoFImp.Value) - - - - - - - SaldoFImp - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SaldoInitCant.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SalidaCant.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SaldoFCant.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SaldoIniImp.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SalidaImp.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Sum(Fields!SaldoFImp.Value, "DataSet1") - - - - - - =Iif(Fields!CvePS.Value=-1, "LightGrey","White") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - After - true - true - - - After - true - true - - - - - - - true - - Before - - - - DataSet1 - 0.20849cm - 0.00415cm - 2.49525cm - 20.90254cm - - - - - - 1.16692in - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE SALIDAS - - - - - - - - - - - - - - - - Textbox2 - 1.13799cm - 2.78201cm - 0.52945cm - 18.12468cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - = Parameters!pImg.Value - FitProportional - 0.01325cm - 2.22362cm - 2.33715cm - 2 - - - - - - true - true - - - - - =Parameters!AgrupadoPor.Value - HTML - - - 2pt - 2pt - 2pt - 2pt - - - - 3.1764cm - 0cm - 20.90669cm - 4 - - - - - - - - - - - 0.727cm - true - true - - - true - true - - - - - ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.28575cm - 15.06595cm - 0.44125cm - 5.51625cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - Textbox8 - 0.28575cm - 0.6059cm - 0.44125cm - 1.60042cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - - Textbox9 - 0.28575cm - 2.15023cm - 0.44125cm - 5.14936cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - Textbox10 - 0.28575cm - 7.47001cm - 0.44125cm - 2.92333cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - - Textbox11 - 0.28575cm - 10.37923cm - 0.44125cm - 4.32745cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.127cm - 0cm - 20.90669cm - 5 - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox14 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox9 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox1 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad + + + + + + + Textbox10 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox18 + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + LightGrey + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + 3 + + + + + + + + 0.9175cm + + + + + true + true + + + + + Código + + + + + + + Textbox15 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Articulos + + + + + + + Textbox2 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Proveedor + + + + + + + Textbox5 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist. Inicial + + + + + + + Textbox4 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salidas + + + + + + + Textbox7 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist. + + + + + + + + + Final + + + + + + + Textbox16 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo Inicial + + + + + + + Textbox19 + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salidas + + + + + + + Textbox22 + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo Final + + + + + + + Textbox28 + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + LightGrey + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.37775cm + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + + + + + =Fields!PS.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!RazonSocial.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoIniCant.Value = "0", "-", Fields!SaldoIniCant.Value) + + + + + + + SaldoInitCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SalidaCant.Value = "0", "-", Fields!SalidaCant.Value) + + + + + + + EntradaCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoFCant.Value = "0", "-", Fields!SaldoFCant.Value) + + + + + + + SaldoFCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoIniImp.Value = "0", "-", Fields!SaldoIniImp.Value) + + + + + + + SaldoIniImp + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SalidaImp.Value = "0", "-", Fields!EntradaImp.Value) + + + + + + + EntradaImp + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoFImp.Value = "0", "-", Fields!SaldoFImp.Value) + + + + + + + SaldoFImp + + =IIF(Parameters!OcultarImportes.Value.ToString = "False", True,False) + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoInitCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SalidaCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoFCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoIniImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SalidaImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoFImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + After + true + true + + + + + + + true + + Before + + + + DataSet1 + 0.20849cm + 0.00415cm + 2.49525cm + 20.90254cm + + + + + + 1.16692in + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE SALIDAS + + + + + + + + + + + + + + + + Textbox2 + 1.13799cm + 2.78201cm + 0.52945cm + 18.12468cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.01325cm + 2.22362cm + 2.33715cm + 2 + + + + + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + 2pt + 2pt + 2pt + 2pt + + + + 3.1764cm + 0cm + 20.90669cm + 4 + + + + + + + + + + + 0.727cm + true + true + + + true + true + + + + + ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.28575cm + 15.06595cm + 0.44125cm + 5.51625cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + Textbox8 + 0.28575cm + 0.6059cm + 0.44125cm + 1.60042cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + + Textbox9 + 0.28575cm + 2.15023cm + 0.44125cm + 5.14936cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox10 + 0.28575cm + 7.47001cm + 0.44125cm + 2.92333cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + Textbox11 + 0.28575cm + 10.37923cm + 0.44125cm + 4.32745cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.127cm + 0cm + 20.90669cm + 5 + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - - - - - - Textbox15 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #007582 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Articulos - - - - - - - Textbox2 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #007582 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cant Comp - - - - - - - Textbox10 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #007582 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cant OC - - - - - - - Textbox8 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #007582 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PU - - - - - - - Textbox1 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #007582 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total - - - - - - - Textbox5 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #007582 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.40421cm - - - - - true - - - - - =Fields!Codigo.Value - - - - - - - #007582 - - - - #007582 - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - - - - - =Fields!PS.Value - - - - - - - #007582 - - - - #007582 - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CantComp.Value - - - - - - - #007582 - - - - #007582 - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CantOC.Value - - - - - - - #007582 - - - - #007582 - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - #007582 - - - - #007582 - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - #007582 - - - - #007582 - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - - - - - - - - - - - - - - - After - true - true - - - - - - - DataSet1 - 0.20849cm - 0.00415cm - 0.95129cm - 20.90254cm - - - - - - 0.80234in - - - - - - - Textbox1 - 0.22049cm - 4.21694cm - 0.6cm - 12.60299cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Reporte de Recepcíón Almacén - - - - - - - - - - - - - - - - Textbox2 - 1.13799cm - 5.38981cm - 0.52945cm - 9.98771cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - = Parameters!pImg.Value - FitProportional - 0.01325cm - 2.22362cm - 2.33715cm - 2 - - - - - - true - true - - - - - =Parameters!Proveedor.Value - HTML - - - 2pt - 2pt - 2pt - 2pt - - - - 4.1289cm - 0cm - 20.90669cm - 4 - - - - - - true - true - - - - - =Parameters!Compra.Value - HTML - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.727cm - true - true - - - true - true - - - - - ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.28575cm - 15.06595cm - 0.44125cm - 5.51625cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - Textbox8 - 0.28575cm - 0.6059cm - 0.44125cm - 1.60042cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - - Textbox9 - 0.28575cm - 2.15023cm - 0.44125cm - 5.14936cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - Textbox10 - 0.28575cm - 7.47001cm - 0.44125cm - 2.92333cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - - Textbox11 - 0.28575cm - 10.37923cm - 0.44125cm - 4.32745cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.127cm - 0cm - 20.90669cm - 5 - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox15 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #007582 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Articulos + + + + + + + Textbox2 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #007582 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cant Comp + + + + + + + Textbox10 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #007582 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cant OC + + + + + + + Textbox8 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #007582 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PU + + + + + + + Textbox1 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #007582 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Textbox5 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #007582 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.40421cm + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + #007582 + + + + #007582 + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + + + + + =Fields!PS.Value + + + + + + + #007582 + + + + #007582 + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CantComp.Value + + + + + + + #007582 + + + + #007582 + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CantOC.Value + + + + + + + #007582 + + + + #007582 + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + #007582 + + + + #007582 + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + #007582 + + + + #007582 + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + + + + + DataSet1 + 0.20849cm + 0.00415cm + 0.95129cm + 20.90254cm + + + + + + 0.80234in + + + + + + + Textbox1 + 0.22049cm + 4.21694cm + 0.6cm + 12.60299cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Reporte de Recepcíón Almacén + + + + + + + + + + + + + + + + Textbox2 + 1.13799cm + 5.38981cm + 0.52945cm + 9.98771cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.01325cm + 2.22362cm + 2.33715cm + 2 + + + + + + true + true + + + + + =Parameters!Proveedor.Value + HTML + + + 2pt + 2pt + 2pt + 2pt + + + + 4.1289cm + 0cm + 20.90669cm + 4 + + + + + + true + true + + + + + =Parameters!Compra.Value + HTML + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.727cm + true + true + + + true + true + + + + + ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.28575cm + 15.06595cm + 0.44125cm + 5.51625cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + Textbox8 + 0.28575cm + 0.6059cm + 0.44125cm + 1.60042cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + + Textbox9 + 0.28575cm + 2.15023cm + 0.44125cm + 5.14936cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox10 + 0.28575cm + 7.47001cm + 0.44125cm + 2.92333cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + Textbox11 + 0.28575cm + 10.37923cm + 0.44125cm + 4.32745cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.127cm + 0cm + 20.90669cm + 5 + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - - - - - - Textbox15 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Articulos - - - - - - - Textbox2 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cant Comp - - - - - - - Textbox10 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cant OC - - - - - - - Textbox8 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PU - - - - - - - Textbox1 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total - - - - - - - Textbox5 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.40421cm - - - - - true - - - - - =Fields!Codigo.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - - - - - =Fields!PS.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CantComp.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CantOC.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - - - - - - - - - - - - - - - After - true - true - - - - - - - DataSet1 - 0.20849cm - 0.00415cm - 0.95129cm - 20.90254cm - - - - - - 0.80234in - - - - - - - Textbox1 - 0.22049cm - 4.21694cm - 0.6cm - 12.60299cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Reporte de Recepcíón Almacén - - - - - - - - - - - - - - - - Textbox2 - 1.13799cm - 5.38981cm - 0.52945cm - 9.98771cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - = Parameters!pImg.Value - FitProportional - 0.01325cm - 2.22362cm - 2.33715cm - 2 - - - - - - true - true - - - - - =Parameters!Proveedor.Value - HTML - - - 2pt - 2pt - 2pt - 2pt - - - - 4.1289cm - 0cm - 20.90669cm - 4 - - - - - - true - true - - - - - =Parameters!Compra.Value - HTML - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.727cm - true - true - - - true - true - - - - - ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.28575cm - 15.06595cm - 0.44125cm - 5.51625cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - Textbox8 - 0.28575cm - 0.6059cm - 0.44125cm - 1.60042cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - - Textbox9 - 0.28575cm - 2.15023cm - 0.44125cm - 5.14936cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - Textbox10 - 0.28575cm - 7.47001cm - 0.44125cm - 2.92333cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - - Textbox11 - 0.28575cm - 10.37923cm - 0.44125cm - 4.32745cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.127cm - 0cm - 20.90669cm - 5 - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox15 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Articulos + + + + + + + Textbox2 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cant Comp + + + + + + + Textbox10 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cant OC + + + + + + + Textbox8 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PU + + + + + + + Textbox1 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Textbox5 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.40421cm + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + + + + + =Fields!PS.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CantComp.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CantOC.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + + + + + DataSet1 + 0.20849cm + 0.00415cm + 0.95129cm + 20.90254cm + + + + + + 0.80234in + + + + + + + Textbox1 + 0.22049cm + 4.21694cm + 0.6cm + 12.60299cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Reporte de Recepcíón Almacén + + + + + + + + + + + + + + + + Textbox2 + 1.13799cm + 5.38981cm + 0.52945cm + 9.98771cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.01325cm + 2.22362cm + 2.33715cm + 2 + + + + + + true + true + + + + + =Parameters!Proveedor.Value + HTML + + + 2pt + 2pt + 2pt + 2pt + + + + 4.1289cm + 0cm + 20.90669cm + 4 + + + + + + true + true + + + + + =Parameters!Compra.Value + HTML + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.727cm + true + true + + + true + true + + + + + ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.28575cm + 15.06595cm + 0.44125cm + 5.51625cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + Textbox8 + 0.28575cm + 0.6059cm + 0.44125cm + 1.60042cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + + Textbox9 + 0.28575cm + 2.15023cm + 0.44125cm + 5.14936cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox10 + 0.28575cm + 7.47001cm + 0.44125cm + 2.92333cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + Textbox11 + 0.28575cm + 10.37923cm + 0.44125cm + 4.32745cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.127cm + 0cm + 20.90669cm + 5 + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - - - - - - Textbox15 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Articulos - - - - - - - Textbox2 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cant Comp - - - - - - - Textbox10 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cant OC - - - - - - - Textbox8 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PU - - - - - - - Textbox1 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total - - - - - - - Textbox5 - - - - White - - 1pt - - - LightGrey - - 1pt - - - White - - 1pt - - #d3d3d3 - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.40421cm - - - - - true - - - - - =Fields!Codigo.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - - - - - =Fields!PS.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CantComp.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CantOC.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - LightGrey - - - - LightGrey - - - =Iif(Fields!CvePS.Value=-1, "#67809F","White") - 2pt - 2pt - 1pt - - - - - - - - - - - - - - - - - - - - - - After - true - true - - - - - - - DataSet1 - 0.20849cm - 0.00415cm - 0.95129cm - 20.90254cm - - - - - - 0.80234in - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Reporte de Salida Almacén - - - - - - - - - - - - - - - - Textbox2 - 1.13799cm - 4.68157cm - 0.52945cm - 9.98771cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - = Parameters!pImg.Value - FitProportional - 0.01325cm - 2.22362cm - 2.33715cm - 2 - - - - - - 2.5414cm - 0cm - 20.90669cm - 3 - - - - - - - - - - - 0.727cm - true - true - - - true - true - - - - - ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.28575cm - 15.06595cm - 0.44125cm - 5.51625cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - Textbox8 - 0.28575cm - 0.6059cm - 0.44125cm - 1.60042cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - - Textbox9 - 0.28575cm - 2.15023cm - 0.44125cm - 5.14936cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - Textbox10 - 0.28575cm - 7.47001cm - 0.44125cm - 2.92333cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - - Textbox11 - 0.28575cm - 10.37923cm - 0.44125cm - 4.32745cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - 0.127cm - 0cm - 20.90669cm - 5 - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Textbox15 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Articulos + + + + + + + Textbox2 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cant Comp + + + + + + + Textbox10 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cant OC + + + + + + + Textbox8 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PU + + + + + + + Textbox1 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total + + + + + + + Textbox5 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.40421cm + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + + + + + =Fields!PS.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CantComp.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CantOC.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + + + + + DataSet1 + 0.20849cm + 0.00415cm + 0.95129cm + 20.90254cm + + + + + + 0.80234in + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Reporte de Salida Almacén + + + + + + + + + + + + + + + + Textbox2 + 1.13799cm + 4.68157cm + 0.52945cm + 9.98771cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + = Parameters!pImg.Value + FitProportional + 0.01325cm + 2.22362cm + 2.33715cm + 2 + + + + + + 2.5414cm + 0cm + 20.90669cm + 3 + + + + + + + + + + + 0.727cm + true + true + + + true + true + + + + + ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.28575cm + 15.06595cm + 0.44125cm + 5.51625cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + Textbox8 + 0.28575cm + 0.6059cm + 0.44125cm + 1.60042cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + + Textbox9 + 0.28575cm + 2.15023cm + 0.44125cm + 5.14936cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox10 + 0.28575cm + 7.47001cm + 0.44125cm + 2.92333cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + + Textbox11 + 0.28575cm + 10.37923cm + 0.44125cm + 4.32745cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.127cm + 0cm + 20.90669cm + 5 + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + @@ -1056,7 +1056,7 @@ =IIF(Fields!EntradaCant.Value = "0", "-", Fields!EntradaCant.Value) @@ -1100,7 +1100,7 @@ =IIF(Fields!SalidaCant.Value = "0", "-", Fields!SalidaCant.Value) @@ -1144,7 +1144,7 @@ =IIF(Fields!SaldoFCant.Value = "0", "-", Fields!SaldoFCant.Value) @@ -1726,7 +1726,6 @@ 2pt - true @@ -1859,6 +1858,7 @@ Textbox2 1.13799cm + 0.01cm 0.52945cm 20.5896cm 1 diff --git a/Inventarios/RepEntradasSalidas.aspx.vb b/Inventarios/RepEntradasSalidas.aspx.vb index 63596b1f9..1710c7e8d 100644 --- a/Inventarios/RepEntradasSalidas.aspx.vb +++ b/Inventarios/RepEntradasSalidas.aspx.vb @@ -1,4 +1,7 @@ -Imports System.Data +Option Explicit On +Option Strict On + +Imports System.Data Imports System.IO Imports Extensiones Imports Microsoft.Reporting.WebForms @@ -65,7 +68,7 @@ Partial Class Inventarios_ReporteEntradasSalidas End If TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString - TxtFechaF.Text = Now + TxtFechaF.Text = Now.ToString("dd/MM/yyyy") FechaInicial = "-1" FechaFinal = "-1" @@ -374,7 +377,7 @@ Partial Class Inventarios_ReporteEntradasSalidas FechaI = "01-01-0001" End If If FechaF = "-1" OrElse FechaFinal.ToDate > Now.ToDate Then - FechaF = Now + FechaF = Now.ToString("dd/MM/yyyy") End If Dim RutaPDF As String Dim Ruta As String = UsuarioActual.Empresa.Ruta diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index cd7fea4c6..6cff3f356 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1704,7 +1704,7 @@ Partial Class RH_Personal 'TxtContactoAlterno.Text = ObjPersonal.ContactoAlterno - If ObjPersonal.CveUniforme > 0 Then + If ObjPersonal.CveUniforme > 0 Or UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then LnkSurtir.Visible = True ViewState("CveUniforme") = ObjPersonal.CveUniforme DdlUniforme.SelectedValueExist(CveUniforme) @@ -5636,7 +5636,7 @@ Partial Class RH_Personal Private Sub CargaUniformesPersonal() - If Not UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 153, 154, 140) Then + If Not UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 153, 154, 140, 7, 11, 12, 122, 145) Then GvUniforme.Visible = True GvUniformesResguardo.Visible = False diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 51539abc1..829d7d6d9 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -260,7 +260,16 @@ Partial Class Ventas_ClientesAbonar Dim CveTipoCuenta As Integer = 2 If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then CveTipoCuenta = -1 'que se muestren todas, para empresa acumuladores - Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=CveTipoCuenta) + + Dim dt As DataTable + + If UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then + dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=-1).FiltraParametros(" CveTipoCuenta in (1,2) ") + Else + dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=CveTipoCuenta) + End If + + If ChkPagarPesos.Checked Then dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1)) From 6c94dc331cd406817b9f347b1173f16cc47687d1 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 23 Aug 2023 20:37:37 -0700 Subject: [PATCH 051/111] =?UTF-8?q?Compilaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GPS/CatEventosTipos.aspx.vb | 2 +- GPS/CatProveedorComunicacion.aspx.vb | 10 +++++----- GPS/PuntosDeInteres.aspx.vb | 8 ++++---- GPS/RepCombustible.aspx.vb | 26 ++++++++++++++------------ General/RepIndicadorResumen.aspx.vb | 14 +++++++++----- 5 files changed, 33 insertions(+), 27 deletions(-) diff --git a/GPS/CatEventosTipos.aspx.vb b/GPS/CatEventosTipos.aspx.vb index 7176fd61a..feeb73659 100644 --- a/GPS/CatEventosTipos.aspx.vb +++ b/GPS/CatEventosTipos.aspx.vb @@ -103,7 +103,7 @@ Partial Class GPS_CatEventosTipos e.Row.VerticalAlign = VerticalAlign.Middle e.Row.FCLinkButton("ImgE").CommandArgument = e.Row.DataKey("CveEventoTipo").ToString - If e.Row.DBCampo("Estatus") = True Then + If Boolean.Parse(e.Row.DBCampo("Estatus")) = True Then e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green diff --git a/GPS/CatProveedorComunicacion.aspx.vb b/GPS/CatProveedorComunicacion.aspx.vb index 5a826973e..00672d527 100644 --- a/GPS/CatProveedorComunicacion.aspx.vb +++ b/GPS/CatProveedorComunicacion.aspx.vb @@ -36,16 +36,16 @@ Partial Class GPS_CatProveedorComunicacion Private Sub BtnAgregarProveedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarProveedor.Click Dim ObjGps As New ClsGPS - Dim Estatus = 0 + Dim Estatus As Byte = 0 Dim correo As String = TxtMail.Text - If ChkEstatus.Checked Then Estatus = 1 + If chkEstatus.Checked Then Estatus = 1 If HdnModalidad.Value = "A" Then If ObjGps.ProveedorComunicacion_Add(TxtProveedor.Text, Estatus, UsuarioActual.CveUsuario, DdlTipoComunicacion.SelectedValue.ToEntero(), TxtAPNIP.Text, TxtAPNUser.Text, TxtAPNPass.Text, correo) Then CargaDatos() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If ElseIf HdnModalidad.Value = "U" Then - If ObjGps.ProveedorComunicacion_Update(HdnID.Value, TxtProveedor.Text, Estatus, UsuarioActual.CveUsuario, DdlTipoComunicacion.SelectedValue.ToEntero(), TxtAPNIP.Text, TxtAPNUser.Text, TxtAPNPass.Text, correo) Then + If ObjGps.ProveedorComunicacion_Update(HdnID.Value.ToEntero, TxtProveedor.Text, Estatus, UsuarioActual.CveUsuario, DdlTipoComunicacion.SelectedValue.ToEntero(), TxtAPNIP.Text, TxtAPNUser.Text, TxtAPNPass.Text, correo) Then CargaDatos() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -98,7 +98,7 @@ Partial Class GPS_CatProveedorComunicacion Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CveProveedorComunicacion") UpDatos.Update() - If ObjGps.Proveedor_Delete(HdnID.Value) Then + If ObjGps.Proveedor_Delete(HdnID.Value.ToEntero) Then CargaDatos() Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -113,7 +113,7 @@ Partial Class GPS_CatProveedorComunicacion Private Sub GvTipoComunicacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvProveedorComunicacion.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Estatus") = True Then + If Boolean.Parse(e.Row.DBCampo("Estatus")) = True Then e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green diff --git a/GPS/PuntosDeInteres.aspx.vb b/GPS/PuntosDeInteres.aspx.vb index 0029bed99..04a164eb2 100644 --- a/GPS/PuntosDeInteres.aspx.vb +++ b/GPS/PuntosDeInteres.aspx.vb @@ -148,10 +148,10 @@ Partial Class GPS_PuntosDeInteres Dim Var As String = "" For Each coordenada As String In CoordsPuntos If coordenada Is CoordsPuntos.Last Then - Dim latlng() As String = coordenada.Trim.Split(" ") + Dim latlng() As String = coordenada.Trim.Split(" "c) Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }}" Else - Dim latlng() As String = coordenada.Trim.Split(" ") + Dim latlng() As String = coordenada.Trim.Split(" "c) Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }}," End If Next @@ -229,7 +229,7 @@ Partial Class GPS_PuntosDeInteres dvEstatus.Style.Add("display", "") dvEstatus.Style.Add("display", "") chkEstatus.Checked = CBool(GvRow.DataKey("Estatus").ToString) - RegistraScript($"$('#divAgregarTipo').modal();",1) + RegistraScript($"$('#divAgregarTipo').modal();", "1") For Each row As GridViewRow In GvGrupos.Rows If row.DataKey("CvePuntoDeInteresGrupo").ToString = GvRow.DataKey("CvePuntoDeInteresGrupo").ToString Then RegistraScript($"CargaDatosSeleccionados({row.RowIndex}, '{row.DataKey("CvePuntoDeInteresGrupo").ToString}');") @@ -255,7 +255,7 @@ Partial Class GPS_PuntosDeInteres For Each row As GridViewRow In GVPuntosInteres.Rows If row.FCCheckBox("chkGR").Checked Then Dim coords = SQLToGmaps(row.DataKey("Punto"), "POINT") - RegistraScript($"CreaMarcador({coords}, '{row.DataKey("PuntoDeInteres").ToString}')", row.RowIndex) + RegistraScript($"CreaMarcador({coords}, '{row.DataKey("PuntoDeInteres").ToString}')", row.RowIndex.ToString) End If Next RegistraScript("$('#dvEditar').modal('hide');FitBounds();") diff --git a/GPS/RepCombustible.aspx.vb b/GPS/RepCombustible.aspx.vb index 6df5d34e6..ead4b150f 100644 --- a/GPS/RepCombustible.aspx.vb +++ b/GPS/RepCombustible.aspx.vb @@ -97,7 +97,7 @@ Partial Class GPS_RepCombustible If GPS.RepCombustibleGet(DdlDispositivo.SelectedValue.ToEntero(), FechaI, FechaF) AndAlso GPS.DtResultados.Rows.Count > 0 Then Dim Arow As DataRow = GPS.DtResultados.Rows(0) Dim TotalKilometros As Decimal = (Arow("Distancia").ToString().ToDecimal()) / 1000 - Dim CombustibleConsumido As Decimal = $"{(Arow("CombustibleInicial").ToString().ToDecimal() + Arow("SumaCargas").ToString().ToDecimal()) - Arow("CombustibleFinal").ToString().ToDecimal():N2}" + Dim CombustibleConsumido As Decimal = $"{(Arow("CombustibleInicial").ToString().ToDecimal() + Arow("SumaCargas").ToString().ToDecimal()) - Arow("CombustibleFinal").ToString().ToDecimal():N2}".ToDecimal Dim RendBruto As Decimal = If(CombustibleConsumido > 0, TotalKilometros / CombustibleConsumido, 0) '2.8 Dim CostoCombustible As Decimal = GlobalDTDispositivos(-1).FiltroPrimeroValor("CostoCombustible", $"CveDispositivo = {DdlDispositivo.SelectedValue}").ToDecimal LtlDistancia.Text = TotalKilometros.ToString().FormatoNumero() @@ -117,7 +117,7 @@ Partial Class GPS_RepCombustible LtlCostoConsumo.Text = $"${((CombustibleConsumido - Arow("SumaDescargas").ToString().ToDecimal()) * CostoCombustible).ToString().FormatoNumero()}" LtlCostoCombustibleF.Text = $"${(GPS.DtResultados.Rows(0)("CombustibleFinal").ToString().ToDecimal * CostoCombustible).ToString().FormatoNumero()}" LtlCostoInicial.Text = $"${(GPS.DtResultados.Rows(0)("CombustibleInicial").ToString().ToDecimal * CostoCombustible).ToString().FormatoNumero()}" - lblMuerto.Text = $"{((DateDiff(DateInterval.Minute, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime).ToString() - GPS.DtResultados.Rows(0)("Horas").ToString().ToLong) / 60).ToString().FormatoNumero()} Hrs." + lblMuerto.Text = $"{((DateDiff(DateInterval.Minute, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime) - GPS.DtResultados.Rows(0)("Horas").ToString().ToLong) / 60).ToString().FormatoNumero()} Hrs." lblMovimiento.Text = $"{(GPS.DtResultados.Rows(0)("Horas").ToString().ToDecimal / 60).ToString().FormatoNumero()} Hrs" LtlRalenti.Text = $"{GPS.DtResultados.Rows(0)("TiempoRalentiHoras").ToString().FormatoNumero()} Hrs. ({GPS.DtResultados.Rows(0)("TiempoRalentiMinutos").ToString()} Minutos)" CargaHistorico(GPS) @@ -138,10 +138,12 @@ Partial Class GPS_RepCombustible Dim json As New StringBuilder json.Append("data=[") Dim color As String = "" - Dim encencido As Int16 = -1 - Dim encencidoC As Int16 = -1 + Dim encencido As Integer = -1 + Dim encencidoC As Integer = -1 For Each gvrow As DataRow In GPS.DtResultados.Rows + encencidoC = gvrow("Encendido").ToString().ToEntero() + If encencido <> encencidoC Then If encencidoC = 1 Then color = ",lineColor:""#2498d2""" @@ -328,11 +330,11 @@ Partial Class GPS_RepCombustible libro.Cell(5, 4).Value = txtFechaF.Text Dim cRow As Integer = 9 - Dim FechaI As String = txtFechaI.Text.ToDateTime - Dim FechaF As String = txtFechaF.Text.ToDateTime + Dim FechaI As Date = txtFechaI.Text.ToDateTime + Dim FechaF As Date = txtFechaF.Text.ToDateTime Using GPS As New ClsGPS() - For Each item In DdlDispositivo.Items - CveDispositivo = item.value.ToString().ToEntero() + For Each item As ListItem In DdlDispositivo.Items + CveDispositivo = item.Value.ToString().ToEntero() If CveDispositivo > 0 Then cRow = cRow + 1 @@ -363,14 +365,14 @@ Partial Class GPS_RepCombustible Dim Arow As DataRow = GPS.DtResultados.Rows(0) Dim TotalKilometros As Decimal = (Arow("Distancia").ToString().ToDecimal()) / 1000 Dim CostoCombustible As Decimal = GlobalDTDispositivos(-1).FiltroPrimeroValor("CostoCombustible", $"CveDispositivo = {CveDispositivo}").ToDecimal - Dim CombustibleConsumidoCC As Decimal = $"{(Arow("CombustibleInicial").ToString().ToDecimal() + Arow("SumaCargas").ToString().ToDecimal()) - Arow("CombustibleFinal").ToString().ToDecimal():N2}" + Dim CombustibleConsumidoCC As Decimal = $"{ (Arow("CombustibleInicial").ToString().ToDecimal() + Arow("SumaCargas").ToString().ToDecimal()) - Arow("CombustibleFinal").ToString().ToDecimal():N2}".ToDecimal VelocidadMaxima = $"{GPS.DtResultados.Rows(0)("VelocidadMaxima").ToString().FormatoNumero():N2}" Rendimiento = $"{If(CombustibleConsumidoCC > 0, TotalKilometros / CombustibleConsumidoCC, 0):N2}" KMRecorridos = $"{TotalKilometros:N2}" CombustibleConsumido = $"{(Arow("CombustibleInicial").ToString().ToDecimal() + Arow("SumaCargas").ToString().ToDecimal()) - Arow("CombustibleFinal").ToString().ToDecimal():N2}" Ralenti = $"{GPS.DtResultados.Rows(0)("TiempoRalentiHoras").ToString().FormatoNumero()} Hrs. ({GPS.DtResultados.Rows(0)("TiempoRalentiMinutos").ToString()} Minutos)" TiempoMovto = $"{(GPS.DtResultados.Rows(0)("Horas").ToString().ToDecimal / 60).ToString().FormatoNumero()} Hrs" - TiempoMuerto = $"{((DateDiff(DateInterval.Minute, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime).ToString() - GPS.DtResultados.Rows(0)("Horas").ToString().ToLong) / 60).ToString().FormatoNumero()} Hrs." + TiempoMuerto = $"{((DateDiff(DateInterval.Minute, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime).ToString().ToDecimal - GPS.DtResultados.Rows(0)("Horas").ToString().ToLong) / 60).ToString().FormatoNumero()} Hrs." CILts = $"{Arow("CombustibleInicial").ToString().ToDecimal():N2}" CITotal = $"{(GPS.DtResultados.Rows(0)("CombustibleInicial").ToString().ToDecimal * CostoCombustible).ToString().FormatoNumero()}" CFLts = GPS.DtResultados.Rows(0)("CombustibleFinal").ToString().FormatoNumero() @@ -382,8 +384,8 @@ Partial Class GPS_RepCombustible DesCargaLts = $"{Arow("SumaDescargas").ToString().ToDecimal():N2}" DesCargaTotal = $"{Arow("SumaDescargas").ToString().ToDecimal() * CostoCombustible:N2}" RecorridoValor = TotalKilometros.ToString().FormatoNumero() - RecorridoLts = $"{(CombustibleConsumido - Arow("SumaDescargas").ToString().ToDecimal()):N2}" - RecorridoTotal = $"{((CombustibleConsumido - Arow("SumaDescargas").ToString().ToDecimal()) * CostoCombustible).ToString().FormatoNumero()}" + RecorridoLts = $"{(CombustibleConsumido.ToDecimal - Arow("SumaDescargas").ToString().ToDecimal()):N2}" + RecorridoTotal = $"{((CombustibleConsumido.ToDecimal - Arow("SumaDescargas").ToString().ToDecimal()) * CostoCombustible).ToString().FormatoNumero()}" End If libro.Cell(cRow, 1).Value = vehiculo diff --git a/General/RepIndicadorResumen.aspx.vb b/General/RepIndicadorResumen.aspx.vb index 48d55e64b..80bbd09cd 100644 --- a/General/RepIndicadorResumen.aspx.vb +++ b/General/RepIndicadorResumen.aspx.vb @@ -1,4 +1,8 @@ -Imports System.Data + +Option Explicit On +Option Strict On + +Imports System.Data Imports Extensiones Imports Microsoft.Reporting.WebForms Imports MoreLinq @@ -35,18 +39,18 @@ Partial Class General_RepIndicadorResumen Dim ObjCitrus As New ClsCGame Dim Grupo As Integer = 28 'Clasificación - PS - If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), MinFecha, MaxFecha, -1, + If ObjVentas.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim().ToDate, TxtFechaF.Text.Trim().ToDate, MinFecha, MaxFecha, -1, -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing,Dev", TipoCambio:=1) Then GvVxP.DataSource = ObjVentas.DtResultados End If - If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, -1, -1, TxtFechaI.Text.Trim(), TxtFechaF.Text.Trim(), -1, -1, -1, + If ObjCompras.GetRepProductosServicios(-1, DdlSubProyecto.SelectedValue, "-1", -1, -1, TxtFechaI.Text.Trim().ToDate, TxtFechaF.Text.Trim().ToDate, -1, -1, -1, UsuarioActual.CveEmpresa, 5, -1, -1, "-1", "-1", -1, TipoCambio:=1, TipoDocto:="Fac", CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveProveedorClasificacion:=192) Then GvCompProductores.DataSource = ObjCompras.DtResultados.FiltraParametros("", "Cantidad DESC") End If - If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text, TxtFechaF.Text, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then + If ObjCitrus.GetIndicadores(UsuarioActual.CveEmpresa, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveUsuario, DdlSubProyecto.SelectedValue.ToEntero) Then 'Compras Productores 'GvCompProductores.DataSource = ObjCitrus.DTSetResultados.Tables(0).FiltraParametros("", "RazonSocial ASC") 'CxP Productores @@ -250,7 +254,7 @@ Partial Class General_RepIndicadorResumen DtCompProductores.Columns.Add("Importe") DtCompProductores.Columns.Add("UnidadC") DtCompProductores.Columns.Add("UnidadI") - For Each Dr As DataRow In GvCompProductores.DataSource.Rows + For Each Dr As DataRow In DirectCast(GvCompProductores.DataSource, DataTable).Rows If Not Dr("Orden").ToString = "00ND" Then Dim Row = DtCompProductores.NewRow() Row("Texto") = Dr("GPO").ToString From 3246d336fed94b3424f374eb957b01a1b8b8b12c Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 23 Aug 2023 22:34:21 -0700 Subject: [PATCH 052/111] =?UTF-8?q?--=20activaci=C3=B3n=20para=20vsh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/DepositosCaja.aspx.vb | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index af77dc10e..96137b777 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -75,8 +75,11 @@ Partial Class Bancos_DepositosCaja DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) DdlPersonal.DataBind() + Dim ClavesProvs As String = UsuarioActual.Empresa.Funcionalidad(206) + If ClavesProvs = "" Then ClavesProvs = "0" ' para que no marque error + 'intermediario - DdlProveedorIntermediario.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveProveedor in ({0})", 73343)) + DdlProveedorIntermediario.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveProveedor in ({0})", ClavesProvs)) DdlProveedorIntermediario.DataBind() DdlClasificacionIntermediario.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2) @@ -226,22 +229,21 @@ Partial Class Bancos_DepositosCaja CveClasificacionIntermediario = DdlClasificacionIntermediario.SelectedValue.ToEntero CveProveedorIntermediario = DdlProveedorIntermediario.SelectedValue.ToEntero - - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte, 95, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then - OcurrioError = True - End If - - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, TotalImporte, 95, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then - OcurrioError = True - End If - - + If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then ' empresa llantera + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte, 95, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then + OcurrioError = True + End If + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, TotalImporte, 95, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, CveProveedor:=CveProveedorIntermediario, CveCuenta:=57619) Then + OcurrioError = True + End If + End If + If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, ImporteInter, 51, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario) Then OcurrioError = True End If If IVA <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, IVA, 14, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, PorcentajeImpuesto:=0.16D) Then + If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, IVA, IVA, 14, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario, PorcentajeImpuesto:=0.16D) Then OcurrioError = True End If End If @@ -280,7 +282,7 @@ Partial Class Bancos_DepositosCaja documentos += String.Format("Depósito: {1}    
    ", CveIEOrigen, FolioIE) - If ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte * TipoCambio, 30, "Depósito Bancario", "Depósito Bancario", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then + If Not OcurrioError AndAlso ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, TotalImporte * TipoCambio, 30, "Depósito Bancario", "Depósito Bancario", CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen) Then If ChkFaltante.Checked Then CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero @@ -292,7 +294,7 @@ Partial Class Bancos_DepositosCaja End If End If - If ChkDescuento.Checked Then + If Not OcurrioError AndAlso ChkDescuento.Checked Then CveSubProyectoDescuento = DdlSubProyectoDescuento.SelectedValue.ToEntero CveClasificacionDescuento = DdlClasificacionDescuento.SelectedValue.ToEntero @@ -300,7 +302,6 @@ Partial Class Bancos_DepositosCaja OcurrioError = True End If End If - Else OcurrioError = True End If @@ -328,7 +329,7 @@ Partial Class Bancos_DepositosCaja CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then + If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then OcurrioError = True Exit For End If @@ -338,11 +339,8 @@ Partial Class Bancos_DepositosCaja OcurrioError = True Exit For End If - End If - Next - Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") documentos += String.Format("
    Imprimir {1}

    ", StrEncript, "Depósito Bancario") From 4c6f8bbaefbb9b58e2dd9379d848ad8bdb40bab0 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 24 Aug 2023 00:38:39 -0700 Subject: [PATCH 053/111] option strict on --- GPS/CatDispositivos.aspx.vb | 2 +- GPS/CatModelos.aspx.vb | 2 +- GPS/CatPlanesDatos.aspx.vb | 12 ++--- GPS/CatProveedoresComunicacionCuentas.aspx.vb | 12 ++--- GPS/CatTipoComunicacion.aspx.vb | 10 ++-- GPS/RepCombustible2.aspx.vb | 4 +- GPS/Soporte.aspx.vb | 33 ++++++------- Inventarios/AjustesSeccionAlmacen.aspx.vb | 8 ++-- Inventarios/CatUnidades.aspx.vb | 4 +- Inventarios/InventarioFisico.aspx.vb | 48 +++++++++---------- Inventarios/Paquetes.aspx.vb | 6 +-- Inventarios/RepAnomalias.aspx.vb | 14 +++--- Inventarios/RepExistenciasCostos.aspx.vb | 20 ++++---- Inventarios/RepNotasSinAlmacen.aspx.vb | 22 ++++----- Inventarios/RepRSCO.aspx.vb | 2 +- 15 files changed, 96 insertions(+), 103 deletions(-) diff --git a/GPS/CatDispositivos.aspx.vb b/GPS/CatDispositivos.aspx.vb index 230f72a08..d840f6ac8 100644 --- a/GPS/CatDispositivos.aspx.vb +++ b/GPS/CatDispositivos.aspx.vb @@ -104,7 +104,7 @@ Partial Class GPS_CatDispositivos e.Row.VerticalAlign = VerticalAlign.Middle ' e.Row.FCLinkButton("ImgE").CommandArgument = e.Row.DataKey("CveDispositivo").ToString - If e.Row.DBCampo("CveEstatus") = 1 Then + If e.Row.DBCampo("CveEstatus") = "1" Then e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green diff --git a/GPS/CatModelos.aspx.vb b/GPS/CatModelos.aspx.vb index 64c9294c2..e4dfea5f0 100644 --- a/GPS/CatModelos.aspx.vb +++ b/GPS/CatModelos.aspx.vb @@ -24,7 +24,7 @@ Partial Class GPS_CatModelos e.Row.VerticalAlign = VerticalAlign.Middle e.Row.FCHyperLink("ImgE").NavigateUrl = $"/GPS/WizardModelo.aspx?CveModelo={e.Row.DataKey("CveModelo").ToString}" - If e.Row.DBCampo("Estatus") = True Then + If e.Row.DBCampo("Estatus") = "True" Then e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green diff --git a/GPS/CatPlanesDatos.aspx.vb b/GPS/CatPlanesDatos.aspx.vb index 728ac9144..163fcd02e 100644 --- a/GPS/CatPlanesDatos.aspx.vb +++ b/GPS/CatPlanesDatos.aspx.vb @@ -19,7 +19,7 @@ Partial Class GPS_PlanesDatos DdlProveedorComunicacion.DataBind() End If ObjGps.Dispose() - DdlProveedorComunicacion.Items.Insert(0, New ListItem("Seleccione", -1)) + DdlProveedorComunicacion.Items.Insert(0, New ListItem("Seleccione", "-1")) UpDatos.Update() End Sub Private Sub CargaDatos() @@ -37,12 +37,12 @@ Partial Class GPS_PlanesDatos Dim Estatus = 0 If ChkEstatus.Checked Then Estatus = 1 If HdnModalidad.Value = "A" Then - If ObjGps.PlanesDatosAdd(DdlProveedorComunicacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtPlanDatos.Text, TxtImporte.Text, Estatus, TxtCapacidad.Text, DDLTipoDatos.SelectedValue, TxtCostoAdicional.Text, TxtTechoFacturacion.Text, UsuarioActual.CveEmpresa) Then + If ObjGps.PlanesDatosAdd(DdlProveedorComunicacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtPlanDatos.Text, TxtImporte.Text.ToDecimal, Estatus, TxtCapacidad.Text.ToEntero, DDLTipoDatos.SelectedValue, TxtCostoAdicional.Text, TxtTechoFacturacion.Text, UsuarioActual.CveEmpresa) Then CargaDatos() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If ElseIf HdnModalidad.Value = "U" Then - If ObjGps.PlanesDatosUpdate(HdnID.Value, DdlProveedorComunicacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtPlanDatos.Text, TxtImporte.Text, Estatus, TxtCapacidad.Text, DDLTipoDatos.SelectedValue, TxtCostoAdicional.Text, TxtTechoFacturacion.Text) Then + If ObjGps.PlanesDatosUpdate(HdnID.Value.ToEntero, DdlProveedorComunicacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtPlanDatos.Text, TxtImporte.Text.ToDecimal, Estatus, TxtCapacidad.Text.ToEntero, DDLTipoDatos.SelectedValue, TxtCostoAdicional.Text, TxtTechoFacturacion.Text) Then CargaDatos() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -97,7 +97,7 @@ Partial Class GPS_PlanesDatos Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CvePlanDato") UpDatos.Update() - If ObjGps.PlanesDatosRemove(HdnID.Value) Then + If ObjGps.PlanesDatosRemove(HdnID.Value.ToEntero) Then CargaDatos() Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -112,7 +112,7 @@ Partial Class GPS_PlanesDatos Private Sub GvPlanesDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPlanesDatos.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Estatus") = True Then + If e.Row.DBCampo("Estatus") = "True" Then e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green @@ -120,7 +120,7 @@ Partial Class GPS_PlanesDatos e.Row.FCLabel("LblEstatus").Text = "Inactivo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red End If - If e.Row.DBCampo("Importe") = True Then + If e.Row.DBCampo("Importe") = "True" Then e.Row.FCLabel("LblImporte").Text = "$" + e.Row.FCLabel("LblImporte").Text.FormatoNumero() End If End If diff --git a/GPS/CatProveedoresComunicacionCuentas.aspx.vb b/GPS/CatProveedoresComunicacionCuentas.aspx.vb index d17de7a4b..b484196d6 100644 --- a/GPS/CatProveedoresComunicacionCuentas.aspx.vb +++ b/GPS/CatProveedoresComunicacionCuentas.aspx.vb @@ -48,7 +48,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas Private Sub CargaDdlClientes() Dim ObjGps As New ClsClientes() - If ObjGps.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, -1, -1) Then + If ObjGps.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, "-1", -1) Then DdlFiltroCliente.DataSource = ObjGps.DtResultados DdlFiltroCliente.DataBind() End If @@ -128,7 +128,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas If UsuarioActual.Empresa.Funcionalidad(541) = "1" Then Estatus = 0 End If - If ObjGps.ProveedoresComunicacionCuentasAdd(DdlProveedorComunicacion.SelectedValue, DdlPlanDatos.SelectedValue, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then + If ObjGps.ProveedoresComunicacionCuentasAdd(DdlProveedorComunicacion.SelectedValue.ToEntero, DdlPlanDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then CargaDatos() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -137,7 +137,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas envirCorreoActivacion() Estatus = 1 End If - If ObjGps.ProveedoresComunicacionCuentasUpdate(HdnID.Value, DdlProveedorComunicacion.SelectedValue, DdlPlanDatos.SelectedValue, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then + If ObjGps.ProveedoresComunicacionCuentasUpdate(HdnID.Value.ToEntero, DdlProveedorComunicacion.SelectedValue.ToEntero, DdlPlanDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then CargaDatos() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -232,7 +232,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CveProveedorComunicacionCuenta") UpDatos.Update() - If ObjGps.ProveedoresComunicacionCuentasRemove(HdnID.Value) Then + If ObjGps.ProveedoresComunicacionCuentasRemove(HdnID.Value.ToEntero) Then CargaDatos() End If @@ -247,7 +247,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas Private Sub GvProveedorComunicacionCuenta_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvProveedorComunicacionCuenta.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Estatus") = True Then + If e.Row.DBCampo("Estatus") = "True" Then e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green @@ -306,7 +306,7 @@ Partial Class GPS_CatProveedoresComunicacionCuentas Dim Imei As String = TxtImei.Text Dim CveUsuarioResguardante As Integer = DDlResguardante.SelectedValue.ToEntero() - If ObjGps.ProveedoresComunicacionCuentasUpdate(HdnID.Value, DdlProveedorComunicacion.SelectedValue, DdlPlanDatos.SelectedValue, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then + If ObjGps.ProveedoresComunicacionCuentasUpdate(HdnID.Value.ToEntero, DdlProveedorComunicacion.SelectedValue.ToEntero, DdlPlanDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, TxtIP.Text, TxtSSID.Text, numeroTelefono, Estatus, UsuarioActual.CveEmpresa, Imei, CveUsuarioResguardante) Then CargaDatos() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If diff --git a/GPS/CatTipoComunicacion.aspx.vb b/GPS/CatTipoComunicacion.aspx.vb index 5b17e588a..90b88e795 100644 --- a/GPS/CatTipoComunicacion.aspx.vb +++ b/GPS/CatTipoComunicacion.aspx.vb @@ -12,15 +12,15 @@ Partial Class GPS_TipoComunicacion Private Sub BtnAgregarTipoComunicacion_Click(sender As Object, e As EventArgs) Handles BtnAgregarTipoComunicacion.Click Dim ObjGps As New ClsGPS - Dim Estatus = 0 - If ChkEstatus.Checked Then Estatus = 1 + Dim Estatus As Boolean = False + If ChkEstatus.Checked Then Estatus = True If HdnModalidad.Value = "A" Then If ObjGps.TipoComunicacionAdd(TxtTipoComunicacion.Text, Estatus, UsuarioActual.CveUsuario) Then CargaDatos() Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If ElseIf HdnModalidad.Value = "U" Then - If ObjGps.TipoComunicacionUpdate(HdnID.Value, TxtTipoComunicacion.Text, Estatus, UsuarioActual.CveUsuario) Then + If ObjGps.TipoComunicacionUpdate(HdnID.Value.ToEntero, TxtTipoComunicacion.Text, Estatus, UsuarioActual.CveUsuario) Then CargaDatos() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -66,7 +66,7 @@ Partial Class GPS_TipoComunicacion Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CveTipoComunicacion") UpDatos.Update() - If ObjGps.TipoComunicacionDelete(HdnID.Value) Then + If ObjGps.TipoComunicacionDelete(HdnID.Value.ToEntero) Then CargaDatos() Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -88,7 +88,7 @@ Partial Class GPS_TipoComunicacion Private Sub GvTipoComunicacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvTipoComunicacion.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Estatus") = True Then + If e.Row.DBCampo("Estatus") = "True" Then e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green diff --git a/GPS/RepCombustible2.aspx.vb b/GPS/RepCombustible2.aspx.vb index 646dddc4c..2af4322e4 100644 --- a/GPS/RepCombustible2.aspx.vb +++ b/GPS/RepCombustible2.aspx.vb @@ -132,7 +132,7 @@ Partial Class GPS_RepCombustible2 If DTDatos.Rows.Count > 0 Then LtlDistancia.Text = $"{DTDatos.Rows(0)("KmRecorridos")}" lblVelocidad.Text = $"{DTDatos.Rows(0)("SPD")}" - lblRendBruto.Text = $"{DTDatos.Rows(0)("KmRecorridos") / DTDatos.Rows(0)("CombustibleConsumido"):N2}" + lblRendBruto.Text = $"{DTDatos.Rows(0)("KmRecorridos").ToString.ToDecimal / DTDatos.Rows(0)("CombustibleConsumido").ToString.ToDecimal:N2}" LtlCombustibleInicial.Text = $"{DTDatos.Rows(0)("CombustibleInicial")}" LtlCombustibleFinal.Text = $"{DTDatos.Rows(0)("CombustibleFinal")}" LtlNoCargas.Text = $"{DTDatos.Rows(0)("CCargas")}" @@ -172,7 +172,7 @@ Partial Class GPS_RepCombustible2 ' LtlCostoCombustibleF.Text = $"${(GPS.DtResultados.Rows(0)("CombustibleFinal").ToString.ToDecimal * CostoCombustible).ToString.FormatoNumero}" ' LtlCostoInicial.Text = $"${(GPS.DtResultados.Rows(0)("CombustibleInicial").ToString.ToDecimal * CostoCombustible).ToString.FormatoNumero}" ' lCombustibleConsumido.Text = CombustibleConsumido.ToString.FormatoNumero - lblMuerto.Text = $"{((DateDiff(DateInterval.Minute, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime).ToString - GPS.DtResultados.Rows(0)("Horas").ToString.ToLong) / 60).ToString.FormatoNumero} Hrs." + lblMuerto.Text = $"{((DateDiff(DateInterval.Minute, txtFechaI.Text.ToDateTime, txtFechaF.Text.ToDateTime).ToString.ToEntero - GPS.DtResultados.Rows(0)("Horas").ToString.ToLong) / 60).ToString.FormatoNumero} Hrs." lblMovimiento.Text = $"{(GPS.DtResultados.Rows(0)("Horas").ToString.ToDecimal / 60).ToString.FormatoNumero} Hrs" LtlRalenti.Text = $"{GPS.DtResultados.Rows(0)("TiempoRalentiHoras").ToString.FormatoNumero} Hrs. ({GPS.DtResultados.Rows(0)("TiempoRalentiMinutos").ToString} Minutos)" diff --git a/GPS/Soporte.aspx.vb b/GPS/Soporte.aspx.vb index ce2364c94..e738d4d73 100644 --- a/GPS/Soporte.aspx.vb +++ b/GPS/Soporte.aspx.vb @@ -16,8 +16,6 @@ Partial Class GPS_Soporte End Set End Property #End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then CargaDispositivos() @@ -45,7 +43,7 @@ Partial Class GPS_Soporte Private Sub CargaDatos() Dim GPS As New ClsGPS - If GPS.DispositivosGet(DdlDispositivo.SelectedValue, -1, -1) AndAlso GPS.DtResultados.Rows.Count > 0 Then + If GPS.DispositivosGet(DdlDispositivo.SelectedValue.ToEntero, -1, -1) AndAlso GPS.DtResultados.Rows.Count > 0 Then TxtIp.Text = GPS.DtResultados.Rows(0)("IP").ToString TxtPuerto.Text = "80" TxtAPN.Text = GPS.DtResultados.Rows(0)("APN").ToString @@ -85,7 +83,7 @@ Partial Class GPS_Soporte If DdlTipoConsulta.SelectedValue = "Last" Then If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, MinFecha, MaxFecha, "Top 1") Then If GPS.DtResultados.Rows.Count > 0 Then - Dim Coord As String = SQLToGmaps(GPS.DtResultados.Rows(0)("Punto"), "POINT") + Dim Coord As String = SQLToGmaps(GPS.DtResultados.Rows(0)("Punto").ToString, "POINT") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}');") GvReportes.DataSource = GPS.DtResultados GvVLog.DataSource = GPS.DtResultados @@ -98,7 +96,7 @@ Partial Class GPS_Soporte If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, MinFecha, MaxFecha, "TOP 10") Then If GPS.DtResultados.Rows.Count > 0 Then For Each row As DataRow In GPS.DtResultados.Rows - Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") + Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng").ToString}');") Next GvReportes.DataSource = GPS.DtResultados @@ -112,7 +110,7 @@ Partial Class GPS_Soporte If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, DateTime.Today.AddHours(-1), DateTime.Today.AddDays(1)) Then If GPS.DtResultados.Rows.Count > 0 Then For Each row As DataRow In GPS.DtResultados.Rows - Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") + Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');") Next GvReportes.DataSource = GPS.DtResultados @@ -126,7 +124,7 @@ Partial Class GPS_Soporte If GPS.GetRepDispositivo(DdlDispositivo.SelectedValue.ToEntero, DateTime.Today.AddDays(-1).AddHours(-1), DateTime.Today) Then If GPS.DtResultados.Rows.Count > 0 Then For Each row As DataRow In GPS.DtResultados.Rows - Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") + Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');") Next GvReportes.DataSource = GPS.DtResultados @@ -141,7 +139,7 @@ Partial Class GPS_Soporte If GPS.DtResultados.Rows.Count > 0 Then Dim dr As DataRow = TmpDT.NewRow For Each row As DataRow In GPS.DtResultados.Rows - Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") + Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');") Next GvReportes.DataSource = GPS.DtResultados @@ -158,7 +156,7 @@ Partial Class GPS_Soporte If GPS.DtResultados.Rows.Count > 0 Then Dim dr As DataRow = TmpDT.NewRow For Each row As DataRow In GPS.DtResultados.Rows - Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") + Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT") RegistraScript($"CreaMarcador({Coord},'{DdlDispositivo.SelectedItem.Text}: {row("FechaIng")}');") Next GvReportes.DataSource = GPS.DtResultados @@ -219,10 +217,10 @@ Partial Class GPS_Soporte Dim Var As String = "" For Each coordenada As String In CoordsPuntos If coordenada Is CoordsPuntos.Last Then - Dim latlng() As String = coordenada.Trim.Split(" ") + Dim latlng() As String = coordenada.Trim.Split(" "c) Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }}" Else - Dim latlng() As String = coordenada.Trim.Split(" ") + Dim latlng() As String = coordenada.Trim.Split(" "c) Var = $"{Var}{{lat: {latlng(1)}, lng: {latlng(0)} }}," End If Next @@ -231,11 +229,11 @@ Partial Class GPS_Soporte Private Sub CreaTmpDT(Opcion As String) TmpDT = New DataTable - If Opcion = 1 Then + If Opcion = "1" Then TmpDT.Columns.Add("Fecha", GetType(String)) TmpDT.Columns.Add("Valor", GetType(String)) TmpDT.Columns.Add("CveTrama", GetType(Integer)) - ElseIf Opcion = 2 Then + ElseIf Opcion = "2" Then TmpDT.Columns.Add("Trama", GetType(String)) TmpDT.Columns.Add("CveTrama", GetType(Integer)) End If @@ -255,7 +253,7 @@ Partial Class GPS_Soporte Protected Sub BtnCargaLog_Click(sender As Object, e As EventArgs) Handles BtnCargaLog.Click Dim GPS As New ClsGPS - If GPS.DispositivosGet(DdlDispositivo.SelectedValue, -1, -1) AndAlso GPS.DtResultados.Rows.Count > 0 Then + If GPS.DispositivosGet(DdlDispositivo.SelectedValue.ToEntero, -1, -1) AndAlso GPS.DtResultados.Rows.Count > 0 Then ltlSerieLog.Text = GPS.DtResultados.Rows(0)("Serie").ToString Else Alert("No se encontraron resultados con el equipo seleccionado", TipoMensaje.MsgAdvertencia) @@ -278,10 +276,9 @@ Partial Class GPS_Soporte Private Sub CargaLog() Dim GPS As New ClsGPS - CreaTmpDT(2) + CreaTmpDT("2") RegistraScript("DeleteMarkers();") - If DdlTipoConsultaLog.SelectedValue = "Last" Then If GPS.GetRepDispositivo(DdlDispositivosLog.SelectedValue.ToEntero, MinFecha, MaxFecha) Then If GPS.DtResultados.Rows.Count > 0 Then @@ -330,7 +327,7 @@ Partial Class GPS_Soporte If GPS.DtResultados.Rows.Count > 0 Then Dim dr As DataRow = TmpDT.NewRow For Each row As DataRow In GPS.DtResultados.Rows - Dim Coord As String = SQLToGmaps(row("Punto"), "POINT") + Dim Coord As String = SQLToGmaps(row("Punto").ToString, "POINT") dr = TmpDT.NewRow dr("Trama") = row("Trama").ToString dr("CveTrama") = row("CveTrama").ToString @@ -383,7 +380,7 @@ Partial Class GPS_Soporte Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles btnAgregar.Click Dim GPS As New ClsGPS - If GPS.DispositivosGet(-1, -1, DdlClientes.SelectedValue, UsuarioActual.CveEmpresa) Then + If GPS.DispositivosGet(-1, -1, DdlClientes.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then GvConsultaM.DataSource = GPS.DtResultados Else GvConsultaM.DataSource = GPS.DtResultados diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index a9eba95af..6f3f75d03 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -65,7 +65,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux.ToString("######.###") Else e.Row.FCCheckBox("Chk").Visible = False - e.Row.FCRangeValidator("RVR").MaximumValue = 0 + e.Row.FCRangeValidator("RVR").MaximumValue = "0" End If End If End Sub @@ -169,7 +169,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen Cantidad = Row("Cantidad").ToString.ToDecimal() Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal() Dim CveUM As Integer = Row("CveUM").ToString().ToEntero() - Dim CveSeccionAlmacen As Integer = Lista(Row("CvePS").ToString().ToEntero()) 'GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() + Dim CveSeccionAlmacen As Integer = Lista(Row("CvePS")).ToString().ToEntero() 'GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal() Dim Serie As String = Row("Serie").ToString() Dim Lote As String = Row("Lote").ToString() @@ -329,7 +329,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "") If Tipo = "EXCEL" Then Dim CveAlmacen As Integer = DdlAlmacenExcel.SelectedValue.ToEntero() - Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}") + Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero CargarArchivo(Directorio, file.filename, CveAlmacen, CveSubProyecto) Else @@ -445,7 +445,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim SerieSalida As String = RowExistencia("Serie").ToString() Dim LoteSalida As String = RowExistencia("Lote").ToString() Dim FechaCaducidadSalida As Date = IfNull(RowExistencia("FechaCaducidad"), MinFecha).ToString.ToDate - Dim PUSalida As Decimal = RowExistencia("PU").ToString() + Dim PUSalida As Decimal = RowExistencia("PU").ToString.ToDecimal 'condicion para ajustar la seccion y permita hacer los cambios en el trigger If CveSeccionAlmacenSalida > 0 Then diff --git a/Inventarios/CatUnidades.aspx.vb b/Inventarios/CatUnidades.aspx.vb index ecb00f46f..c171aaf2a 100644 --- a/Inventarios/CatUnidades.aspx.vb +++ b/Inventarios/CatUnidades.aspx.vb @@ -213,14 +213,14 @@ Partial Class Inventarios_CatUnidades If CveCamion <= 0 Then If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, - TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then + TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue.ToEntero, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then Alert("Unidad agregada correctamente") Else ErrorPrceso = True End If Else If ObjInventarios.UpdateCamiones(CveCamion, TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, DdlConfigAuto.SelectedValue.ToEntero, TxtAnio.Text.ToEntero(), DdlTipoPermisoSCT.SelectedValue.ToEntero(), TxtNumermisoSCT.Text, TxtNombreAseguradora.Text, TxtNumPolizaSeguro.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, - TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then + TxtNombreAseguradoraMedioAmbiente.Text, TxtNumPolizaSeguroMedioAmbiente.Text, TxtNombreAseguradoraCarga.Text, TxtNumPolizaSeguroCarga.Text, CveTipoCamion, TxtLongitudCaja.Text, TxtLineaTransportacion.Text, TxtSCAC.Text, TxtCAAT.Text, DdlTiposRemolque.SelectedValue.ToEntero(), TxtNumeroTrailer.Text, ChkEstatus.Checked, CveProveedor:=DdlProveedor.SelectedValue.ToEntero, Color:=TxtColor.Text, Marca:=TxtMarca.Text) Then Alert("Unidad actualizada correctamente") Else ErrorPrceso = True diff --git a/Inventarios/InventarioFisico.aspx.vb b/Inventarios/InventarioFisico.aspx.vb index 3bbdccb25..6fbaf9f24 100644 --- a/Inventarios/InventarioFisico.aspx.vb +++ b/Inventarios/InventarioFisico.aspx.vb @@ -116,7 +116,7 @@ Partial Class Inventarios_InventarioFisico End Sub Private Sub CargaGvAlmacen() Dim ObjInventario As New ClsInventarios() - If ObjInventario.GetInventarioFisicoDetallesAlmacen(HdnID.Value, UsuarioActual.CveEmpresa) Then + If ObjInventario.GetInventarioFisicoDetallesAlmacen(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then GvAlmacen.DataSource = ObjInventario.DtResultados GvAlmacen.DataBind() End If @@ -125,7 +125,7 @@ Partial Class Inventarios_InventarioFisico End Sub Private Sub CargaGvClasificacion() Dim ObjInventario As New ClsInventarios() - If ObjInventario.GetInventarioFisicoDetallesClasificacion(HdnID.Value, UsuarioActual.CveEmpresa) Then + If ObjInventario.GetInventarioFisicoDetallesClasificacion(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then GvClasificacion.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1") GvClasificacionExcluida.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 0") End If @@ -137,7 +137,7 @@ Partial Class Inventarios_InventarioFisico End Sub Private Sub CargaGvProductosServicios() Dim ObjInventario As New ClsInventarios() - If ObjInventario.GetInventarioFisicoDetallesProductosServicios(HdnID.Value, UsuarioActual.CveEmpresa) Then + If ObjInventario.GetInventarioFisicoDetallesProductosServicios(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then GvPS.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1") GvPSExcluye.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 0") End If @@ -150,7 +150,7 @@ Partial Class Inventarios_InventarioFisico Private Sub CargaGvProveedores() Dim ObjInventario As New ClsInventarios() - If ObjInventario.GetInventarioFisicoDetallesProveedores(HdnID.Value, UsuarioActual.CveEmpresa) Then + If ObjInventario.GetInventarioFisicoDetallesProveedores(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then GvProveedor.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1") End If ObjInventario.Dispose() @@ -160,7 +160,7 @@ Partial Class Inventarios_InventarioFisico Private Sub CargaGvUsuarios() Dim ObjInventario As New ClsInventarios() - If ObjInventario.GetInventarioFisicoDetallesUsuarios(HdnID.Value, UsuarioActual.CveEmpresa) Then + If ObjInventario.GetInventarioFisicoDetallesUsuarios(HdnID.Value.ToEntero, UsuarioActual.CveEmpresa) Then gvUsuarios.DataSource = ObjInventario.DtResultados.FiltraParametros("Incluye = 1") End If ObjInventario.Dispose() @@ -244,7 +244,7 @@ Partial Class Inventarios_InventarioFisico End Sub Private Sub BtnAgregarProductosServicios_Click(sender As Object, e As EventArgs) Handles BtnAgregarProductosServicios.Click - If DdlProductosServicios.SelectedValue = -1 Then + If DdlProductosServicios.SelectedValue = "-1" Then Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) GvPS.DataSource = Nothing GvPS.DataBind() @@ -262,7 +262,7 @@ Partial Class Inventarios_InventarioFisico End Sub Private Sub BtnAddPSExcluye_Click(sender As Object, e As EventArgs) Handles BtnAddPSExcluye.Click - If DdlPSExcluye.SelectedValue = -1 Then + If DdlPSExcluye.SelectedValue = "-1" Then Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) GvPSExcluye.DataSource = Nothing GvPSExcluye.DataBind() @@ -302,7 +302,7 @@ Partial Class Inventarios_InventarioFisico End Sub Private Sub BtnAgregarClasificaciones_Click(sender As Object, e As EventArgs) Handles BtnAgregarClasificaciones.Click - If DdlClasificacion.SelectedValue = -1 Then + If DdlClasificacion.SelectedValue = "-1" Then Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) GvClasificacion.DataSource = Nothing GvClasificacion.DataBind() @@ -331,7 +331,7 @@ Partial Class Inventarios_InventarioFisico End Sub Protected Sub BtnClasificacionExcluida_Click(sender As Object, e As EventArgs) - If DdlClasificacionExcluida.SelectedValue = -1 Then + If DdlClasificacionExcluida.SelectedValue = "-1" Then Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) GvClasificacionExcluida.DataSource = Nothing GvClasificacionExcluida.DataBind() @@ -359,7 +359,7 @@ Partial Class Inventarios_InventarioFisico #Region "PROVEEDORES" Private Sub BtnAgregarProveedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarProveedor.Click - If DdlProveedor.SelectedValue = -1 Then + If DdlProveedor.SelectedValue = "-1" Then Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) GvPS.DataSource = Nothing GvPS.DataBind() @@ -396,7 +396,7 @@ Partial Class Inventarios_InventarioFisico #Region "USUARIOS" Private Sub btnAddUsuarios_Click(sender As Object, e As EventArgs) Handles btnAddUsuarios.Click - If DdlUsuarios.SelectedValue = -1 Then + If DdlUsuarios.SelectedValue = "-1" Then Alert("Tienes seleccionada la opcion 'Todos'.", TipoMensaje.MsgInformacion) GvPS.DataSource = Nothing GvPS.DataBind() @@ -448,7 +448,7 @@ Partial Class Inventarios_InventarioFisico Dim Cerrado As Boolean = Convert.ToBoolean(tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(3)) Dim Bloqueado As Boolean = Convert.ToBoolean(tDTUsuario.Rows(GvRow.RowIndex.ToEntero).Item(4)) - ObjInventario.UpdateInventarioFisicoUsuarios(HdnID.Value, CveUsuario, Cerrado, Bloqueado) + ObjInventario.UpdateInventarioFisicoUsuarios(HdnID.Value.ToEntero, CveUsuario, Cerrado, Bloqueado) gvUsuarios.DataSource = tDTUsuario gvUsuarios.DataBind() upUsuarios.Update() @@ -462,7 +462,7 @@ Partial Class Inventarios_InventarioFisico Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CveInventarioFisico") UppInventarioFisico.Update() - If ObjInventario.RemoveInventarioFisico(HdnID.Value) Then + If ObjInventario.RemoveInventarioFisico(HdnID.Value.ToEntero) Then CargaDatos(UsuarioActual.CveEmpresa) Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -503,8 +503,8 @@ Partial Class Inventarios_InventarioFisico myModalLabel.InnerText = "Actualizar Inventario Fisico" TxtTitulo.Text = GvRow.DataKey("InventarioFisico") TxtObservaciones.Text = GvRow.DataKey("Observaciones") - FechaInicio = GvRow.DataKey("FechaInicio").ToEntero - FechaFin = GvRow.DataKey("FechaFin").ToEntero + FechaInicio = GvRow.DataKey("FechaInicio") + FechaFin = GvRow.DataKey("FechaFin") DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero) chkUsarApp.Checked = Convert.ToBoolean(GvRow.DataKey("ConAplicacion").ToString) divUsuarios.Visible = chkUsarApp.Checked @@ -513,13 +513,13 @@ Partial Class Inventarios_InventarioFisico CargaGvProductosServicios() CargaGvProveedores() CargaGvUsuarios() - tDTClasif = GvClasificacion.DataSource - tDTClasifExcluye = GvClasificacionExcluida.DataSource - tDTPS = GvPS.DataSource - tDTPSExcluye = GvPSExcluye.DataSource - tDTProv = GvProveedor.DataSource - tDTUsuario = gvUsuarios.DataSource - tALM = GvAlmacen.DataSource + tDTClasif = CType(GvClasificacion.DataSource, DataTable) + tDTClasifExcluye = CType(GvClasificacionExcluida.DataSource, DataTable) + tDTPS = CType(GvPS.DataSource, DataTable) + tDTPSExcluye = CType(GvPSExcluye.DataSource, DataTable) + tDTProv = CType(GvProveedor.DataSource, DataTable) + tDTUsuario = CType(gvUsuarios.DataSource, DataTable) + tALM = CType(GvAlmacen.DataSource, DataTable) UpAddInventarioFisico.Update() RegistraScript(String.Format("$('#{0}').modal('show');", "divAddInventarioFisico")) End Sub @@ -748,7 +748,7 @@ Partial Class Inventarios_InventarioFisico Else ErrorClasif = False End If - If ErrorClasif = False And HdnID.Value > 0 Then + If ErrorClasif = False And HdnID.Value.ToEntero > 0 Then ObjInventario.Commit() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddInventarioFisico")) @@ -823,7 +823,7 @@ Partial Class Inventarios_InventarioFisico Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Dim ObjInventario As New ClsInventarios - If ObjInventario.GetInventarioFisico(-1, UsuarioActual.CveEmpresa, DdlFiltroSubProyecto.SelectedValue.ToEntero, DdlEstado.SelectedValue, UsuarioActual.CveUsuario) Then + If ObjInventario.GetInventarioFisico(-1, UsuarioActual.CveEmpresa, DdlFiltroSubProyecto.SelectedValue.ToEntero, DdlEstado.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then gvIF.DataSource = ObjInventario.DtResultados gvIF.DataBind() gvIF.Columns(1).HeaderText = LblSubProyecto.Text diff --git a/Inventarios/Paquetes.aspx.vb b/Inventarios/Paquetes.aspx.vb index f0b64b080..a47974baa 100644 --- a/Inventarios/Paquetes.aspx.vb +++ b/Inventarios/Paquetes.aspx.vb @@ -27,13 +27,9 @@ Partial Class Inventarios_Paquetes Private Sub CargaDatos() Dim ps As New ClsProductosServicios - - If ps.GetPS(-1, -1, UsuarioActual.CveEmpresa, "-1", "-1", 1) Then - + If ps.GetPS(-1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then gvPaquetes.DataSource = ps.DtResultados dtPaquetes = ps.DtResultados - - End If gvPaquetes.EditIndex = -1 gvPaquetes.DataBind() diff --git a/Inventarios/RepAnomalias.aspx.vb b/Inventarios/RepAnomalias.aspx.vb index 0015c0c2a..6979e25a0 100644 --- a/Inventarios/RepAnomalias.aspx.vb +++ b/Inventarios/RepAnomalias.aspx.vb @@ -80,7 +80,7 @@ Partial Class Inventarios_RepAnomalias Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then - CveInventarioFisico = If(Request("CveInventarioFisico") IsNot Nothing AndAlso Request("CveInventarioFisico").ToEntero() > 0, Request("CveInventarioFisico").ToEntero(), -1).ToString + CveInventarioFisico = If(Request("CveInventarioFisico") IsNot Nothing AndAlso Request("CveInventarioFisico").ToEntero() > 0, Request("CveInventarioFisico").ToEntero(), -1) EsAvance = If(Request("EsAvance") IsNot Nothing, CBool(Request("EsAvance").ToEntero), False) If CveInventarioFisico > 0 Then @@ -107,12 +107,12 @@ Partial Class Inventarios_RepAnomalias GvF.Columns(3).Visible = True 'proveedor GvS.Columns(3).Visible = True 'proveedor GvC.Columns(3).Visible = True 'proveedor - GvF.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo - GvS.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo - GvC.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo + GvF.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo + GvS.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo + GvC.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo GvGrupos.Columns(1).Visible = True 'clasificación GvGrupos.Columns(2).Visible = True 'proveedor - GvGrupos.Columns(17).Visible = UsuarioActual.Procesos(201) 'costo + GvGrupos.Columns(17).Visible = UsuarioActual.TienePermisoProceso(201) 'costo End If If Inventario.GetInventarioFisico(CveInventarioFisico, UsuarioActual.CveEmpresa, -1, -1, UsuarioActual.CveUsuario) Then @@ -396,7 +396,7 @@ Partial Class Inventarios_RepAnomalias If e.Row.Cells(7).Text = MinFecha.ToString Then e.Row.Cells(7).Text = "" End If - e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1 + e.Row.FCLabel("Lblc").Text = (e.Row.RowIndex + 1).ToString End If If e.Row.RowType = DataControlRowType.Header Then If CreandoNuevoInventario Then @@ -416,7 +416,7 @@ Partial Class Inventarios_RepAnomalias If e.Row.Cells(7).Text = MinFecha.ToString Then e.Row.Cells(7).Text = "" End If - e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1 + e.Row.FCLabel("Lblc").Text = (e.Row.RowIndex + 1).ToString End If If e.Row.RowType = DataControlRowType.Header Then If CreandoNuevoInventario Then diff --git a/Inventarios/RepExistenciasCostos.aspx.vb b/Inventarios/RepExistenciasCostos.aspx.vb index ae25f31ea..e6ef55df3 100644 --- a/Inventarios/RepExistenciasCostos.aspx.vb +++ b/Inventarios/RepExistenciasCostos.aspx.vb @@ -33,19 +33,19 @@ Partial Class Inventarios_RepExistenciasCostos ViewState("TmpPS") = value End Set End Property - Public Property FechaFinal As String + Public Property FechaFinal As Date Get - Return ViewState("FechaFinal").ToString + Return ViewState("FechaFinal").ToString.ToDate End Get - Set(value As String) + Set(value As Date) ViewState("FechaFinal") = value End Set End Property - Public Property FechaInicial As String + Public Property FechaInicial As Date Get - Return ViewState("FechaInicial").ToString + Return ViewState("FechaInicial").ToString.ToDate End Get - Set(value As String) + Set(value As Date) ViewState("FechaInicial") = value End Set End Property @@ -54,7 +54,7 @@ Partial Class Inventarios_RepExistenciasCostos Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not IsPostBack Then TxtFechaI.Text = New Date(Now.Year, Now.Month, 1).ToShortDateString - TxtFechaF.Text = Now.LastDayOfMonth + TxtFechaF.Text = Now.LastDayOfMonth.ToShortDateString If Request("CvePS") IsNot Nothing AndAlso Request("CveProveedor") IsNot Nothing AndAlso Request("CveMoneda") IsNot Nothing AndAlso Request("CveConcepto") IsNot Nothing AndAlso @@ -69,9 +69,9 @@ Partial Class Inventarios_RepExistenciasCostos If(Request("FechaI").ToString.Trim <> "-1", Request("FechaI").ToString.Trim.ToDate, MinFecha), If(Request("FechaF").ToString.Trim <> "-1", Request("FechaF").ToString.Trim.ToDate, MaxFecha), CveAlmacen, - IIf(Request("CVECLASIFICACION") Is Nothing, -1, Request("CveClasificacion").ToEntero), - IIf(Request("CvePersonal") Is Nothing, -1, Request("CvePersonal").ToEntero), - IIf(Request("Tipo") Is Nothing, -1, Request("Tipo").ToEntero) + If(Request("CVECLASIFICACION") Is Nothing, -1, Request("CveClasificacion").ToEntero), + If(Request("CvePersonal") Is Nothing, -1, Request("CvePersonal").ToEntero), + If(Request("Tipo") Is Nothing, -1, Request("Tipo").ToEntero) ) Panel1.Visible = False Else diff --git a/Inventarios/RepNotasSinAlmacen.aspx.vb b/Inventarios/RepNotasSinAlmacen.aspx.vb index 51990788f..4c80308a5 100644 --- a/Inventarios/RepNotasSinAlmacen.aspx.vb +++ b/Inventarios/RepNotasSinAlmacen.aspx.vb @@ -1,11 +1,11 @@ -Imports System.Data +Imports System.Data Imports Extensiones Imports Microsoft.Reporting.WebForms Partial Class RepNotasSinAlmacen - Inherits ClsPaginas + Inherits ClsPaginas #Region "propiedades" - + Private Property dt As DataTable Get Try @@ -27,19 +27,19 @@ Partial Class RepNotasSinAlmacen ViewState("dtReporte") = value End Set End Property - Public Property FechaInicial As String + Public Property FechaInicial As Date Get - Return ViewState("FechaInicial").ToString + Return ViewState("FechaInicial").ToString.ToDate End Get - Set(value As String) + Set(value As Date) ViewState("FechaInicial") = value End Set End Property - Public Property FechaFinal As String + Public Property FechaFinal As Date Get - Return ViewState("FechaFinal").ToString + Return ViewState("FechaFinal").ToString.ToDate End Get - Set(value As String) + Set(value As Date) ViewState("FechaFinal") = value End Set End Property @@ -250,8 +250,8 @@ Partial Class RepNotasSinAlmacen params.Add(New ReportParameter("DireccionEmpresa", UsuarioActual.Empresa.Direccion)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString())) - params.Add(New ReportParameter("FechaInicio", FechaInicial)) - params.Add(New ReportParameter("FechaFin", FechaFinal)) + params.Add(New ReportParameter("FechaInicio", FechaInicial.ToShortDateString)) + params.Add(New ReportParameter("FechaFin", FechaFinal.ToShortDateString)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) If Tab.ActiveTabIndex = 0 Then diff --git a/Inventarios/RepRSCO.aspx.vb b/Inventarios/RepRSCO.aspx.vb index 879462643..db010ac97 100644 --- a/Inventarios/RepRSCO.aspx.vb +++ b/Inventarios/RepRSCO.aspx.vb @@ -36,7 +36,7 @@ Partial Class Inventarios_RepRSCO LnkDescargaExcel.Visible = False - If ObjInventarios.RepCompuestosVigencia(DdlCompuesto.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, 1, UsuarioActual.CveEmpresa, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then + If ObjInventarios.RepCompuestosVigencia(DdlCompuesto.SelectedValue.ToEntero, DdlProveedores.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, True, UsuarioActual.CveEmpresa, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveUsuario) Then DTDatos = ObjInventarios.DtResultados GvDatos.DataSource = DTDatos From d094d993a287ae47a009340dd49b3d59c33cd4d9 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 24 Aug 2023 08:05:23 -0700 Subject: [PATCH 054/111] --option strict on --- Inventarios/RepExistenciaLote.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/RepExistenciaLote.aspx.vb b/Inventarios/RepExistenciaLote.aspx.vb index 0af361520..22417e49f 100644 --- a/Inventarios/RepExistenciaLote.aspx.vb +++ b/Inventarios/RepExistenciaLote.aspx.vb @@ -60,7 +60,7 @@ Partial Class Inventarios_RepExistenciaLote If Not IsPostBack Then TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString - TxtFechaF.Text = Now + TxtFechaF.Text = Now.ToShortDateString FechaInicial = "-1" FechaFinal = "-1" From e36f1786edfb196739ff03eada893bbd1b378f45 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 24 Aug 2023 11:23:50 -0700 Subject: [PATCH 055/111] Compilacion correciones --- Inventarios/AjustesSeccionAlmacen.aspx.vb | 2 +- Inventarios/CatAlmacenes.aspx.vb | 18 +++---- Inventarios/ConsignacionesMaterial.aspx.vb | 28 +++++----- Inventarios/Equivalencia.aspx.vb | 10 ++-- Inventarios/InventarioFisicoDetalle.aspx.vb | 20 ++++---- Inventarios/KardexAlmacen.aspx.vb | 2 +- Inventarios/KardexAlmacenHorizontal.aspx.vb | 12 ++--- Inventarios/PrestamosdeProveedor.aspx.vb | 2 +- Inventarios/RepUMEquivalencia.aspx.vb | 4 +- MF/CatOperadores.aspx.vb | 6 +-- Nomina/ReportePTU.aspx.vb | 6 +-- Nomina/SobreRecibo.aspx.vb | 4 +- OC/CotizacionEnLinea.aspx.vb | 6 +-- OC/CotizacionEnvio.aspx.vb | 2 +- OC/OC.aspx.vb | 57 +++++++++++---------- OC/RegOp.aspx.vb | 2 +- OC/RepCotizaciones.aspx.vb | 2 +- OI/Circular.aspx.vb | 2 +- OI/CircularDetalle.aspx.vb | 26 +++++----- OI/Normatividad.aspx.vb | 6 +-- OI/Proyecto.aspx.cs | 4 +- OI/SubidasADS.aspx.vb | 2 +- PortalGPS/Penske.aspx.vb | 6 +-- 23 files changed, 115 insertions(+), 114 deletions(-) diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index 6f3f75d03..94b2f7290 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -279,7 +279,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen End Sub Private Sub DescargarExcel() - Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows + Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)() Where row.RowType = DataControlRowType.DataRow Select New With { diff --git a/Inventarios/CatAlmacenes.aspx.vb b/Inventarios/CatAlmacenes.aspx.vb index 595093dbf..64e9d577f 100644 --- a/Inventarios/CatAlmacenes.aspx.vb +++ b/Inventarios/CatAlmacenes.aspx.vb @@ -244,8 +244,8 @@ Partial Class Inventarios_CatAlmacenes 'CargaSucursal() Dim ObjAlmacen As New ClsInventarios Dim TieneError = False - Dim Estatus = 0 - If ChkEstatus.Checked Then Estatus = 1 + Dim Estatus As Boolean = False + If ChkEstatus.Checked Then Estatus = True Dim CuentaContable As Integer = 0 Dim CveCuenta As Integer = 0 @@ -271,7 +271,7 @@ Partial Class Inventarios_CatAlmacenes Else TieneError = True End If - ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero) Then + ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, DdlModalidad.SelectedValue.ToEntero, Estatus, HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero, CveAlmacenVirtual:=DdlAlmacenesVirtuales.SelectedValue.ToEntero) Then Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion) UpDatos.Update() ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) @@ -290,7 +290,7 @@ Partial Class Inventarios_CatAlmacenes Public Sub Agregar() HdnModalidad.Value = "A" UpDatos.Update() - If DdlModalidad.SelectedValue = 1 Then + If DdlModalidad.SelectedValue.ToEntero = 1 Then DdlCuentasContables.Visible = True End If BtnAgregarAlmacen.Text = "Agregar" @@ -328,9 +328,9 @@ Partial Class Inventarios_CatAlmacenes UpDatos.Update() BtnAgregarAlmacen.Text = "Actualizar" myModalLabel.InnerText = "Actualizar Almacén" - DdlInventariable.SelectedValue = If((GvRow.DataKey("Inventariable")) = "True", 1, 0) - DdlModalidad.SelectedValue = If((GvRow.DataKey("Modalidad")) = "Solo Existencia", 0, 1) - divddlcc.Visible = If((DdlModalidad.SelectedValue) = 1, True, False) + DdlInventariable.SelectedValueExist(If((GvRow.DataKey("Inventariable")) = "True", 1, 0)) + DdlModalidad.SelectedValueExist(If((GvRow.DataKey("Modalidad")) = "Solo Existencia", 0, 1)) + divddlcc.Visible = If((DdlModalidad.SelectedValue.ToEntero) = 1, True, False) DdlCuentasContables.SelectedValueExist(GvRow.DataKey("IdCtaContable")) DdlCuentasSig.SelectedValueExist(-1) DdlCuentasSig.SelectedValueExist(GvRow.DataKey("CveCuenta")) @@ -354,7 +354,7 @@ Partial Class Inventarios_CatAlmacenes End Sub Private Sub DdlModalidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlModalidad.SelectedIndexChanged - If DdlModalidad.SelectedValue = 1 Then + If DdlModalidad.SelectedValue.ToEntero = 1 Then divddlcc.Visible = True CargaCuentasContables() Else @@ -366,7 +366,7 @@ Partial Class Inventarios_CatAlmacenes Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click Dim ObjAlmacen As New ClsInventarios - If ObjAlmacen.GetAlmacenes(DdlTipoAlmacenFiltro.SelectedValue, DdlModalidadFiltro.SelectedValue, UsuarioActual.CveEmpresa, DdlSubProyectoFiltro.SelectedValue.ToEntero) Then + If ObjAlmacen.GetAlmacenes(DdlTipoAlmacenFiltro.SelectedValue.ToEntero, DdlModalidadFiltro.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyectoFiltro.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GvDatos.DataBind() Else diff --git a/Inventarios/ConsignacionesMaterial.aspx.vb b/Inventarios/ConsignacionesMaterial.aspx.vb index 77c1d9fe2..bab8f15c4 100644 --- a/Inventarios/ConsignacionesMaterial.aspx.vb +++ b/Inventarios/ConsignacionesMaterial.aspx.vb @@ -29,7 +29,7 @@ Partial Class Inventarios_ConsignacionesMaterial CreaDTCons() InicializarListas() - TxtFecha.Text = Now + TxtFecha.Text = Now.ToString("dd/MM/yyyy") End If End Sub Private Sub CreaDTCons() @@ -108,7 +108,7 @@ Partial Class Inventarios_ConsignacionesMaterial - CveMovimientoC = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 6, 1, TxtFecha.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) + CveMovimientoC = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 6, 1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) If CveMovimientoC <= 0 Then Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError) @@ -120,7 +120,7 @@ Partial Class Inventarios_ConsignacionesMaterial If Not gr.FCTextBox("tbCantR").Text.ToString = "" Then If Not Mov.AddMovimientoDetalle(CveMovimientoC, gr.FCTextBox("tbCantR").Text.ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveUnidadMedida").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CvePS").ToString.ToEntero, - DTmp.Rows(gr.RowIndex)("PU").ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then + DTmp.Rows(gr.RowIndex)("PU").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then Mensaje = "Error al guardar los movimientos" Exit For End If @@ -128,7 +128,7 @@ Partial Class Inventarios_ConsignacionesMaterial Next - CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 3, 1, TxtFecha.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) + CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 3, 1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) If CveMovimiento <= 0 Then Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError) @@ -138,7 +138,7 @@ Partial Class Inventarios_ConsignacionesMaterial For Each gr As GridViewRow In GvConsignacion.Rows If Not gr.FCTextBox("tbCantR").Text.ToString = "" Then If Not Mov.AddMovimientoDetalle(CveMovimiento, gr.FCTextBox("tbCantR").Text.ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveUnidadMedida").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CvePS").ToString.ToEntero, - DTmp.Rows(gr.RowIndex)("PU").ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then + DTmp.Rows(gr.RowIndex)("PU").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then Mensaje = "Error al guardar los movimientos" Exit For End If @@ -181,7 +181,7 @@ Partial Class Inventarios_ConsignacionesMaterial If CveConcepto = 7 Then - If tbCant.Text >= Total Then + If tbCant.Text.ToDouble >= Total Then Alert("No hay existencia suficiente en el Inventario.", TipoMensaje.MsgInformacion) ObjInventario.Dispose() @@ -204,7 +204,7 @@ Partial Class Inventarios_ConsignacionesMaterial End If - AddDTmp(tbCant.Text.ToDouble, ddlUnidad.SelectedValue.ToEntero, ddlUnidad.SelectedItem.ToString, ddlProducto.SelectedValue, ddlProducto.SelectedItem.ToString, DdlAlmacen.SelectedItem.ToString, DdlAlmacen.SelectedValue.ToEntero, DdlSeccion.SelectedValue.ToEntero) + AddDTmp(tbCant.Text.ToEntero, ddlUnidad.SelectedValue.ToEntero, ddlUnidad.SelectedItem.ToString, ddlProducto.SelectedValue.ToEntero, ddlProducto.SelectedItem.ToString, DdlAlmacen.SelectedItem.ToString, DdlAlmacen.SelectedValue.ToEntero, DdlSeccion.SelectedValue.ToEntero) tbCant.Text = "" GvConsignacion.DataSource = DTmp GvConsignacion.DataBind() @@ -240,7 +240,7 @@ Partial Class Inventarios_ConsignacionesMaterial Protected Sub DdlPersonal_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPersonal.SelectedIndexChanged Dim ObjInventario As New ClsInventarios - If ObjInventario.GetConsignaciones(UsuarioActual.CveEmpresa, DdlPersonal.SelectedValue) Then + If ObjInventario.GetConsignaciones(UsuarioActual.CveEmpresa, DdlPersonal.SelectedValue.ToEntero) Then GvConsignacion.DataSource = ObjInventario.DtResultados DTmp = ObjInventario.DtResultados @@ -264,7 +264,7 @@ Partial Class Inventarios_ConsignacionesMaterial CvePersonal = DdlPersonal.SelectedValue.ToEntero For Each dr As DataRow In DTmp.FiltraParametros("", DistinctColumns:={"CveAlmacen"}).Rows - CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 6, 1, TxtFecha.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) + CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 6, 1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) If CveMovimiento <= 0 Then Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError) @@ -274,7 +274,7 @@ Partial Class Inventarios_ConsignacionesMaterial For Each gr As GridViewRow In GvConsignacion.Rows If Not gr.FCTextBox("tbCantR").Text.ToString = "" Then If Not Mov.AddMovimientoDetalle(CveMovimiento, gr.FCTextBox("tbCantR").Text.ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveUnidadMedida").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CvePS").ToString.ToEntero, - DTmp.Rows(gr.RowIndex)("PU").ToString.ToDouble, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then + DTmp.Rows(gr.RowIndex)("PU").ToString.ToEntero, DTmp.Rows(gr.RowIndex)("CveSeccionAlmacen").ToString.ToEntero) Then Mensaje = "Error al guardar los movimientos" Exit For End If @@ -314,7 +314,7 @@ Partial Class Inventarios_ConsignacionesMaterial Protected Sub cbEC_CheckedChanged(sender As Object, e As EventArgs) Handles cbEC.CheckedChanged If Not DdlPersonal.SelectedValue.ToEntero = -1 Then Dim ObjInventario As New ClsInventarios - If ObjInventario.GetConsignaciones(UsuarioActual.CveEmpresa, DdlPersonal.SelectedValue) Then + If ObjInventario.GetConsignaciones(UsuarioActual.CveEmpresa, DdlPersonal.SelectedValue.ToEntero) Then GvConsignacion.DataSource = ObjInventario.DtResultados DTmp = ObjInventario.DtResultados @@ -368,7 +368,7 @@ Partial Class Inventarios_ConsignacionesMaterial - CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 7, 1, TxtFecha.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) + CveMovimiento = Mov.AddMovimiento(dr("CveAlmacen").ToString.ToEntero, 7, 1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, CvePersonal) If CveMovimiento <= 0 Then Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError) @@ -379,7 +379,7 @@ Partial Class Inventarios_ConsignacionesMaterial For Each row As DataRow In DTmp.FiltraParametros("Nuevo=1").Rows - If Not Mov.AddMovimientoDetalle(CveMovimiento, row("Cantidad").ToString.ToDouble, row("CveUnidadMedida").ToString.ToEntero, row("CvePS").ToString.ToEntero, row("PU").ToString.ToDouble, + If Not Mov.AddMovimientoDetalle(CveMovimiento, row("Cantidad").ToString.ToDouble, row("CveUnidadMedida").ToString.ToEntero, row("CvePS").ToString.ToEntero, row("PU").ToString.ToDecimal, row("CveSeccionAlmacen").ToString.ToEntero) Then Mensaje = "Error al guardar los movimientos" Exit For @@ -420,7 +420,7 @@ Partial Class Inventarios_ConsignacionesMaterial Protected Sub GvConsignacion_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvConsignacion.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Nuevo") = 0 Then + If e.Row.DBCampo("Nuevo").ToEntero = 0 Then e.Row.FCImageButton("imgD").Visible = False e.Row.FCTextBox("tbCantR").Attributes.Add("onchange", String.Format("ValidarCantidad(this,{0})", e.Row.DBCampo("Cantidad"))) End If diff --git a/Inventarios/Equivalencia.aspx.vb b/Inventarios/Equivalencia.aspx.vb index 27d8d03b9..c357c49f5 100644 --- a/Inventarios/Equivalencia.aspx.vb +++ b/Inventarios/Equivalencia.aspx.vb @@ -72,12 +72,12 @@ Partial Class Inventarios_Equivalencia End If - If psEquivalencias.AddPSEquivalencias(ddlProducto.SelectedValue.ToEntero, CveUnidadMedida, Cantidad, UnidadBase, Precio, 1) Then + If psEquivalencias.AddPSEquivalencias(ddlProducto.SelectedValue.ToEntero, CveUnidadMedida, Cantidad.ToDecimal, UnidadBase, Precio, 1) Then gvEquivalencias.DataSource = psEquivalencias.DtResultados ViewState("dtEquivalencias") = psEquivalencias.DtResultados - + txtCantidad.Text = "" @@ -137,7 +137,7 @@ Partial Class Inventarios_Equivalencia If dt.Rows(i).Item("Base").ToString = "True" Then Dim psEquivalencias As New ClsProductosServicios - If Not psEquivalencias.UpdatePSEquivalencias(ddlProducto.SelectedValue.ToEntero, dt.Rows(i).Item("CveUnidadMedida").ToString.ToEntero, dt.Rows(i).Item("Cantidad").ToString.ToDouble, False, dt.Rows(i).Item("Precio").ToString.ToDouble, 1) Then + If Not psEquivalencias.UpdatePSEquivalencias(ddlProducto.SelectedValue.ToEntero, dt.Rows(i).Item("CveUnidadMedida").ToString.ToEntero, dt.Rows(i).Item("Cantidad").ToString.ToDecimal, False, dt.Rows(i).Item("Precio").ToString.ToDouble, 1) Then Alert("Error al actualizar registro.", TipoMensaje.MsgError) Return dt End If @@ -266,7 +266,7 @@ Partial Class Inventarios_Equivalencia Dim base As Boolean = DirectCast(gvEquivalencias.Rows(e.RowIndex).FindControl("cbEBase"), CheckBox).Checked Dim CveUnidadMedida As Integer = DirectCast(gvEquivalencias.Rows(e.RowIndex).FindControl("ddlEUnidad"), DropDownList).SelectedValue.ToEntero - If psEquivalencias.UpdatePSEquivalencias(ddlProducto.SelectedValue.ToEntero, CveUnidadMedida, cantidad, base, precio, UsuarioActual.CveUsuario) Then + If psEquivalencias.UpdatePSEquivalencias(ddlProducto.SelectedValue.ToEntero, CveUnidadMedida, cantidad.ToDecimal, base, precio, UsuarioActual.CveUsuario) Then dt = psEquivalencias.DtResultados If base Then @@ -277,7 +277,7 @@ Partial Class Inventarios_Equivalencia ViewState("dtEquivalencias") = dt - + gvEquivalencias.EditIndex = -1 gvEquivalencias.DataSource = dt gvEquivalencias.DataBind() diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb index 6bee3fa74..664ff0a41 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx.vb +++ b/Inventarios/InventarioFisicoDetalle.aspx.vb @@ -313,7 +313,7 @@ Partial Class Inventarios_InventarioFisicoDetalle GvIFD.DataSource = Nothing End If ' DtDatos = Inventario.DtResultados - LtlTotalRegistros.Text = Inventario.DtResultados.Rows.Count + LtlTotalRegistros.Text = Inventario.DtResultados.Rows.Count.ToString End If Inventario.Dispose() GvIFD.DataBind() @@ -354,10 +354,10 @@ Partial Class Inventarios_InventarioFisicoDetalle CveProducto = dr("CvePS").ToString.ToEntero CveUnidadMedida = dr("CveUnidadMedida").ToString.ToEntero 'Dim AplicaSeccion As Boolean = dr("AplicaSeccion") = "1" - Dim AplicaCaducidad As Boolean = dr("AplicaCaducidad") = "1" - Dim AplicaLote As Boolean = dr("AplicaLote") = "1" - Dim AplicaSerie As Boolean = dr("AplicaSerie") = "1" - Dim AplicaSeccion As Boolean = dr("AplicaSeccion") = "1" + Dim AplicaCaducidad As Boolean = dr("AplicaCaducidad").ToString = "1" + Dim AplicaLote As Boolean = dr("AplicaLote").ToString = "1" + Dim AplicaSerie As Boolean = dr("AplicaSerie").ToString = "1" + Dim AplicaSeccion As Boolean = dr("AplicaSeccion").ToString = "1" 'divSeccionAlmacen.Visible = AplicaSeccion divLote.Visible = AplicaLote @@ -453,7 +453,7 @@ Partial Class Inventarios_InventarioFisicoDetalle If GvIFDUltimoRegistrado.Rows.Count > 0 Then - GvIFDUltimoRegistrado.Rows(0).Cells(0).Text = Now + GvIFDUltimoRegistrado.Rows(0).Cells(0).Text = Now.ToString("dd/MM/yyyy") GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PSCodigo").ToString @@ -620,7 +620,7 @@ Partial Class Inventarios_InventarioFisicoDetalle Protected Sub Impimir(Optional Formato As String = "PDF", Optional Agrupar As Boolean = False) Dim DtDatos As New DataTable Dim ObjInventario As New ClsInventarios() - If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue, Agrupar:=Agrupar) Then + If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToEntero, Agrupar:=Agrupar) Then DtDatos = ObjInventario.DtResultados.FiltraParametros("CveInventarioFisico > 0 ").Copy End If ObjInventario.Dispose() @@ -773,9 +773,9 @@ Partial Class Inventarios_InventarioFisicoDetalle Alert("La cantidad debe ser mayor a 0", TipoMensaje.MsgAdvertencia) Exit Sub End If - Dim serie As String = IIf(TxtSerieLote.Text.ToString = "", "-1", TxtSerieLote.Text.ToString) - Dim Lote As String = IIf(TxtLoteEdit.Text.ToString = "", "-1", TxtLoteEdit.Text.ToString) - Dim FechaCaducidad As Date = IIf(TxtFechaCaducida.Text.ToString = "", MinFecha, TxtFechaCaducida.Text.ToString.ToDate) + Dim serie As String = If(TxtSerieLote.Text.ToString = "", "-1", TxtSerieLote.Text.ToString) + Dim Lote As String = If(TxtLoteEdit.Text.ToString = "", "-1", TxtLoteEdit.Text.ToString) + Dim FechaCaducidad As Date = If(TxtFechaCaducida.Text.ToString = "", MinFecha, TxtFechaCaducida.Text.ToString.ToDate) If objInventario.UpdateInventarioFisicoDetalles(HfCveInventarioFisicoDetalle.Value.ToEntero, HfCvePS.Value.ToEntero, HfCveUM.Value.ToEntero, TxtCantidad.Text.ToDecimal, serie, Lote, FechaCaducidad) Then If objInventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then diff --git a/Inventarios/KardexAlmacen.aspx.vb b/Inventarios/KardexAlmacen.aspx.vb index 7992ff344..73d96c6e0 100644 --- a/Inventarios/KardexAlmacen.aspx.vb +++ b/Inventarios/KardexAlmacen.aspx.vb @@ -66,7 +66,7 @@ Partial Class Inventarios_KardexAlmacen Private Sub CargaPS() If Not ddlProducto2.UsaWebService Then - Dim Filtro = If(DdlClasificacion.SelectedValue >= 0, String.Format("CveClasificacion={0} And CveTipoPS=2", DdlClasificacion.SelectedValue), "CveTipoPS=2") + Dim Filtro = If(DdlClasificacion.SelectedValue.ToEntero >= 0, String.Format("CveClasificacion={0} And CveTipoPS=2", DdlClasificacion.SelectedValue), "CveTipoPS=2") ddlProducto2.ddl.Items.Clear() ddlProducto2.DataSource = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(Filtro, "PSCodigo") ddlProducto2.DataBind() diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index 7747b9195..ed7747712 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -22,7 +22,7 @@ Partial Class Inventarios_KardexAlmacen DdlOrden.Visible = True LblMarca.Visible = True DdlMarca.Visible = True - DdlOrden.SelectedValue = 2 + DdlOrden.SelectedValueExist(2) End If If UsuarioActual.CveEmpresa = 119 Then @@ -154,7 +154,7 @@ Partial Class Inventarios_KardexAlmacen Dim IncluyeTransitorios As Integer = DdlIncluyeTransitorios.SelectedValue.ToEntero If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios, - DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue, + DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue.ToEntero, Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO) Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then dt = ObjMovimientos.DtResultados @@ -189,7 +189,7 @@ Partial Class Inventarios_KardexAlmacen GvDatos.DataBind() For index = 4 To GvDatos.Rows(0).Cells.Count - 1 - GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|")(0) + GvDatos.HeaderRow.Cells(index).Text = GvDatos.HeaderRow.Cells(index).Text.Split("|"c)(0) Next End Sub @@ -214,9 +214,9 @@ Partial Class Inventarios_KardexAlmacen If IsNumeric(Celda) Then Dim CveAlmacen2 As Integer = -1 If Index >= 5 Then - Dim Array = GvDatos.HeaderRow.Cells(Index).Text.Split("|") + Dim Array As String() = GvDatos.HeaderRow.Cells(Index).Text.Split("|"c) If Array.Length > 1 Then - CveAlmacen2 = Array(1) + CveAlmacen2 = Array(1).ToEntero End If End If @@ -511,7 +511,7 @@ Partial Class Inventarios_KardexAlmacen Protected Sub BtnDescargarPOG_Click(sender As Object, e As EventArgs) Dim Fecha As Date = txtFechaI.Text.ToDate - Dim Nombre As String = IIf(RBLPOG.SelectedValue = "0", "Ventas-", "Existencias-") + Dim Nombre As String = If(RBLPOG.SelectedValue = "0", "Ventas-", "Existencias-") Using ObjInventario As New ClsInventarios diff --git a/Inventarios/PrestamosdeProveedor.aspx.vb b/Inventarios/PrestamosdeProveedor.aspx.vb index 6fa7b92b5..42e5f6d8f 100644 --- a/Inventarios/PrestamosdeProveedor.aspx.vb +++ b/Inventarios/PrestamosdeProveedor.aspx.vb @@ -223,7 +223,7 @@ Partial Class Inventarios_PrestamosdeProveedor ErrorMovInv = True End If - Dim CveClasifCosto As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("CvePS ={0} ", CvePS)) + Dim CveClasifCosto As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("CvePS ={0} ", CvePS)).ToEntero If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, tValorInventario, 68, TxtObservacionesEntrega.Text.Trim, TxtObservacionesEntrega.Text.Trim, CveMovimientoAlmacen:=CveMovimientoSalida) Then ErrorMovInv = True diff --git a/Inventarios/RepUMEquivalencia.aspx.vb b/Inventarios/RepUMEquivalencia.aspx.vb index 01b7753c0..b5746994a 100644 --- a/Inventarios/RepUMEquivalencia.aspx.vb +++ b/Inventarios/RepUMEquivalencia.aspx.vb @@ -22,7 +22,7 @@ Partial Class Inventarios_RepUMEquivalencia Public Sub CargaDatos() Dim ObjInv As New ClsInventarios - If ObjInv.RepExistenciasEquivalencias( DdlClasificacion.SelectedValue,-1,UsuarioActual.CveEmpresa) Then + If ObjInv.RepExistenciasEquivalencias(DdlClasificacion.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then GVDatos.DataSource = ObjInv.DtResultados If ObjInv.DtResultados.Columns.Count <= 5 Then divGvdatos.Style.Add("width", "50%") @@ -44,7 +44,7 @@ Partial Class Inventarios_RepUMEquivalencia divHeader.Style.Add("width", "96.5%") End If End If - divGvdatos.Visible = True + divGvdatos.Visible = True UpDatos.Update() ObjInv.Dispose() GVDatos.DataBind() diff --git a/MF/CatOperadores.aspx.vb b/MF/CatOperadores.aspx.vb index 2dbddf392..d16f26f1d 100644 --- a/MF/CatOperadores.aspx.vb +++ b/MF/CatOperadores.aspx.vb @@ -21,7 +21,7 @@ Partial Class MF_CatOperadores Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) End If ElseIf HdnModalidad.Value = "U" Then - If ObjMF.UpdateOperador(HdnID.Value, TxtOperador.Text, Estatus) Then + If ObjMF.UpdateOperador(HdnID.Value.ToEntero, TxtOperador.Text, Estatus) Then CargaDatos() Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -75,7 +75,7 @@ Partial Class MF_CatOperadores Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) HdnID.Value = GvRow.DataKey("CveOperador") UpDatos.Update() - If ObjMF.RemoveOperador(HdnID.Value) Then + If ObjMF.RemoveOperador(HdnID.Value.ToEntero) Then CargaDatos() Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) End If @@ -90,7 +90,7 @@ Partial Class MF_CatOperadores Private Sub GvOperador_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOperador.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Estatus") = True Then + If Boolean.Parse(e.Row.DBCampo("Estatus")) = True Then e.Row.FCLabel("LblEstatus").Text = "Activo" e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green diff --git a/Nomina/ReportePTU.aspx.vb b/Nomina/ReportePTU.aspx.vb index f38802e4e..88f85fafb 100644 --- a/Nomina/ReportePTU.aspx.vb +++ b/Nomina/ReportePTU.aspx.vb @@ -157,7 +157,7 @@ Partial Class Nomina_ReportePTU If Not IsNothing(rowc) Then CveConcepto = rowc("CveConcepto").ToString().ToEntero() Else - CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, 0, -1, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1) + CveConcepto = objNomina.AddConcepto("PTU", "Utilidades", "P", "", True, True, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, -1, -1, False, -1, 0, 0, 0, 0, 0, -1, 1, -1, -1, -1, -1) End If If CveConcepto < 1 Then continuar = False @@ -171,7 +171,7 @@ Partial Class Nomina_ReportePTU CvePeriodo = CvePeriodoSeleccionado If continuar Then - continuar = objNomina.AddUtilidad(CvePersonal, Importe, CvePeriodo, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ejercicio, DiasLaborados, SueldoTotal) + continuar = objNomina.AddUtilidad(CvePersonal, Importe, CvePeriodo, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, ejercicio, DiasLaborados, SueldoTotal.ToDecimal) End If If Not continuar Then Exit For @@ -233,7 +233,7 @@ Partial Class Nomina_ReportePTU End Sub Protected Sub GVTipoPeriodo_RowDataBound(sender As Object, e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then - If (Not IsNothing(dtPeriodos) AndAlso dtPeriodos.Rows.Count()) Then + If (Not IsNothing(dtPeriodos) AndAlso dtPeriodos.Rows.Count > 0) Then Dim dddlperiodo As DropDownList = e.Row.FCDropDownList("ddlPeriodo") dddlperiodo.DataSource = dtPeriodos.FiltraParametros(String.Format("CveTipoPeriodo={0}", e.Row.DataKey("CveTipoPeriodo"))) dddlperiodo.DataBind() diff --git a/Nomina/SobreRecibo.aspx.vb b/Nomina/SobreRecibo.aspx.vb index 721652238..00a46140d 100644 --- a/Nomina/SobreRecibo.aspx.vb +++ b/Nomina/SobreRecibo.aspx.vb @@ -36,7 +36,7 @@ Partial Class Nominas_SobreRecibo If CvePersonal > 0 AndAlso CvePeriodo > 0 Then CargaDatos() CargaPersonal() - DdlPersonal.SelectedValue = CvePersonal + DdlPersonal.SelectedValueExist(CvePersonal) LtNombrePersonal.Text = DdlPersonal.SelectedItem.Text UPFiltros.Visible = False End If @@ -134,7 +134,7 @@ Partial Class Nominas_SobreRecibo e.Row.Cells(0).Style.Add("padding-left", "16px") End If - e.Row.FCLabel("LtlImporte").Text = e.Row.FCLabel("LtlImporte").Text.ToDecimal + e.Row.FCLabel("LtlImporte").Text = e.Row.FCLabel("LtlImporte").Text End If End Sub diff --git a/OC/CotizacionEnLinea.aspx.vb b/OC/CotizacionEnLinea.aspx.vb index bb512cde4..939ea6f1f 100644 --- a/OC/CotizacionEnLinea.aspx.vb +++ b/OC/CotizacionEnLinea.aspx.vb @@ -306,7 +306,7 @@ Partial Class OC_CotizacionEnLinea End If For Each dr As GridViewRow In GvD.Rows - If Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString) Then + If Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.FCTextBox("txtCantidadSurtir").Text.ToDecimal, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString) Then TieneError = True Exit For End If @@ -366,12 +366,12 @@ Partial Class OC_CotizacionEnLinea If objCotizacion.GetOC(CveOrdenCompra, CveEmpresa) Then Dim Folio = "", Descripcion = "", Justificacion = "", Estatus = "", Empresa = "", FechaEstimadaEntrega = "" - Folio = objCotizacion.Folio + Folio = objCotizacion.Folio.ToString Descripcion = objCotizacion.Descripcion Justificacion = objCotizacion.Justificacion Estatus = objCotizacion.Estatus Empresa = objCotizacion.Empresa - FechaEstimadaEntrega = objCotizacion.FechaEstimadaEntrega + FechaEstimadaEntrega = objCotizacion.FechaEstimadaEntrega.ToString("dd/MM/yyyy") If objCotizacion.GetCotizaciones(-1, CveCotizacion) Then strBody.Append(" ") diff --git a/OC/CotizacionEnvio.aspx.vb b/OC/CotizacionEnvio.aspx.vb index b705becee..e49748aed 100644 --- a/OC/CotizacionEnvio.aspx.vb +++ b/OC/CotizacionEnvio.aspx.vb @@ -234,7 +234,7 @@ Partial Class OC_CotizacionEnvio 'Agrega CveCotizacion a la lista OrdenCotizacion.Add(objCotizacion.CveCotizacion) For Each RowCD As DataRow In objCotizacion.DtResultados.Rows - If Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, RowCD("CvePS").ToString.ToEntero, -1, RowCD("Cantidad").ToString.ToDouble, RowCD("CveUnidadMedida").ToString.ToEntero, 0, "-1", "", RowCD("CveOrdenCompraDetalle").ToString.ToEntero) Then TieneError = True : Exit For + If Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, RowCD("CvePS").ToString.ToEntero, -1, RowCD("Cantidad").ToString.ToDecimal, RowCD("CveUnidadMedida").ToString.ToEntero, 0, "-1", "", RowCD("CveOrdenCompraDetalle").ToString.ToEntero) Then TieneError = True : Exit For Next 'If TieneError = False Then diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 5b3cf7b11..4271f1adf 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -1,4 +1,5 @@ Option Explicit On +Option Strict On Imports System.Data Imports System.IO @@ -507,7 +508,7 @@ Partial Class OC_OC If ViewState("MonedaTexto") Is Nothing Then Return "" Else - Return ViewState("MonedaTexto").ToString.ToEntero + Return ViewState("MonedaTexto").ToString End If End Get Set(value As String) @@ -1402,7 +1403,7 @@ Partial Class OC_OC DdlVendedor.SelectedValueExist(objOC.CveVendedor.ToString) If DdlVendedor.SelectedValue <> objOC.CveVendedor.ToString Then - DdlVendedor.Items.Insert(1, New ListItem(GlobalDTVendedores(UsuarioActual.CveEmpresa, False).FiltroPrimeroValor("Vendedor", $"CveVendedor = {objOC.CveVendedor}"), objOC.CveVendedor.ToString)) + DdlVendedor.Items.Insert(1, New ListItem(GlobalDTVendedores(UsuarioActual.CveEmpresa, 0).FiltroPrimeroValor("Vendedor", $"CveVendedor = {objOC.CveVendedor}"), objOC.CveVendedor.ToString)) End If End If @@ -1427,9 +1428,9 @@ Partial Class OC_OC Select Case objOC.PorcentajeIVA.ToString.ToDecimal Case 0 DdlIVA.SelectedValue = "1" - Case 0.16 + Case 0.16D DdlIVA.SelectedValue = "1.16" - Case 0.08 + Case 0.08D DdlIVA.SelectedValue = "1.08" End Select 'If objOC.PorcentajeIVA.ToString.ToDecimal = 0 Then DdlIVA.SelectedValue = "1" Else DdlIVA.SelectedValue = "1.16" @@ -2273,7 +2274,7 @@ Partial Class OC_OC If drProv IsNot Nothing Then If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr - RetISR = 0.0125 + RetISR = 0.0125D End If End If End If @@ -3342,7 +3343,7 @@ Partial Class OC_OC If (Not HuboError) AndAlso objOrdenCompra.AddOrdenCompra("OC", -1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, TxtFecha.Text.ToDate, DdlMoneda.SelectedValue.ToEntero, CveEstatusInicialOC, TxtFechaEstimadaEntrega.Text, LugarEntrega, CveUsuario, CveEmpresaActual, 0, pCveProveedor:=CveProveedor, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, - PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, + PorcentajeIVA:=PorIVA.ToDecimal, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim) Then @@ -4059,7 +4060,7 @@ Partial Class OC_OC Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("") If drProv IsNot Nothing Then If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr - RetISR = 0.0125 + RetISR = 0.0125D End If End If End If @@ -4594,7 +4595,7 @@ Partial Class OC_OC Filtro.Clear() If DtPresupuestosTemp.Rows.Count > 0 Then - disponible = ContPaq.GetSaldoCuenta(DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year) + disponible = ContPaq.GetSaldoCuenta(DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year).ToDecimal If disponible > 0 AndAlso disponible > Total Then 'Alert("Si hay dinero: ") @@ -5593,15 +5594,15 @@ Partial Class OC_OC Dim PorcentajeIVA As Decimal = 0D If DrPS("IVA").ToString().Contiene("-1", "") Then - PorcentajeIVA = Row("IVAPorcentaje") + PorcentajeIVA = Row("IVAPorcentaje").ToString.ToDecimal Else - PorcentajeIVA = DrPS("IVA") + PorcentajeIVA = DrPS("IVA").ToString.ToDecimal End If Dim ImporteIEPS As Decimal = (TotalCalculableImpuestos * PorcentajeIEPS).RoundSQL(2) Dim ImporteIVA As Decimal = (TotalCalculableImpuestosIVA * PorcentajeIVA).RoundSQL(2) - If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, "", UsuarioActual.CveUsuario) Then + If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, 0, "", UsuarioActual.CveUsuario) Then OcurrioError = True Exit For End If @@ -7297,13 +7298,13 @@ Partial Class OC_OC End Sub Private Sub CalculaGenerales() - Dim Subtotal As Decimal = DtDetalle.SUM("Total", "Total > 0") + DtDetalle.SUM("Descuento") - Dim Descuento As Decimal = DtDetalle.SUM("Descuento") - Dim SubTotalIEPSIVA As Decimal = DtDetalle.SUM("IEPSPSIVA") - Dim IVA As Decimal = DtDetalle.SUM("IVA") + SubTotalIEPSIVA - Dim SubTotalIEPS As Decimal = DtDetalle.SUM("IEPSPS") - Dim SubTotalRetIVA As Decimal = DtDetalle.SUM("RetIVA") - Dim SubTotalRetISR As Decimal = DtDetalle.SUM("RetISR") + Dim Subtotal As Decimal = DtDetalle.SUMD("Total", "Total > 0") + DtDetalle.SUMD("Descuento") + Dim Descuento As Decimal = DtDetalle.SUMD("Descuento") + Dim SubTotalIEPSIVA As Decimal = DtDetalle.SUMD("IEPSPSIVA") + Dim IVA As Decimal = DtDetalle.SUMD("IVA") + SubTotalIEPSIVA + Dim SubTotalIEPS As Decimal = DtDetalle.SUMD("IEPSPS") + Dim SubTotalRetIVA As Decimal = DtDetalle.SUMD("RetIVA") + Dim SubTotalRetISR As Decimal = DtDetalle.SUMD("RetISR") 'SUBTOTAL LblSubTotal.Text = (Subtotal).FormatoNumero @@ -7513,7 +7514,7 @@ Partial Class OC_OC TxtRetIVA.Text = TxtRetIVA.Text.FormatoNumero HdnRetIVA.Value = TxtRetIVA.Text - Dim Porcentaje As Decimal = TxtRetIVA.Text.ToDecimal / DtDetalle.SUM("Total") + Dim Porcentaje As Decimal = TxtRetIVA.Text.ToDecimal / DtDetalle.SUMD("Total") Dim LastDr As DataRow = Nothing For Each Dr As DataRow In DtDetalle.Rows 'Dr("RetIVA") = (Math.Truncate((Dr("Total").ToString.ToDecimal * Porcentaje) * 100)) / 100 @@ -7930,7 +7931,7 @@ Partial Class OC_OC 'cantidad, Producto, Precio Unitario, Fecha Entrega, Observación Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) - Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows + Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)() Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero() Where row.RowType = DataControlRowType.DataRow Select New With @@ -8028,7 +8029,7 @@ Partial Class OC_OC Try Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) - Dim DtOCDetalle As DataTable = (From row As GridViewRow In GvD.Rows + Dim DtOCDetalle As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)() Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero() Where row.RowType = DataControlRowType.DataRow Select New With @@ -8129,12 +8130,12 @@ Partial Class OC_OC PU = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * TCAjuste ImporteCI176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteCI228").ToDecimal Importe176 = Importe228 + Importe229 - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Importe228, -Importe228, 228, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Importe229, -Importe229, 229, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Importe228, -Importe228, 228, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Importe229, -Importe229, 229, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then ErrorPrepoliza = True Exit For Else - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Importe176, Importe176, 176, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe176, Importe176, 176, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then ErrorPrepoliza = True Exit For Else @@ -8412,7 +8413,7 @@ Partial Class OC_OC PorletIEAnticipo.Visible = True GvAnticpos.DataSource = objbancos.DtResultados - ImporteAnticipos = objbancos.DtResultados.SUM("Importe") + ImporteAnticipos = objbancos.DtResultados.SUMD("Importe") End If @@ -8536,7 +8537,7 @@ Partial Class OC_OC Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero) Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100 - AddPS(Cantidad, CvePS, PS, "", PrecioUnitario, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UM, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, LblCodigo.Text, + AddPS(Cantidad.ToString, CvePS, PS, "", PrecioUnitario, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UM, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, LblCodigo.Text, CveActivoFijo, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer, IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero, DdlACGeneral5.SelectedValue.ToEntero, RetIVA, RetISR) @@ -8635,7 +8636,7 @@ Partial Class OC_OC Dim PS As String = GvRow.DataKey("PS") Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal Dim TotalPS As Decimal = GvRow.FCTextBox("TxtImporte").Text.ToDecimal - Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida") + Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString Dim SubProyecto As String = GvRow.DataKey("SubProyecto") @@ -8661,7 +8662,7 @@ Partial Class OC_OC If Cantidad > 0 Then - AddPS(Cantidad, CvePS, PS, PS, PU, 0, TotalPS, + AddPS(Cantidad.ToString, CvePS, PS, PS, PU, 0, TotalPS, CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UMAbreviatura, Clasificacion, CveProyecto, Proyecto, CveSubProyecto, SubProyecto, Codigo, -1, 0, -1, -1, IdCuentaPorEjercer, IdCuentaComprometido, -1, -1, -1, -1, diff --git a/OC/RegOp.aspx.vb b/OC/RegOp.aspx.vb index 2f55670a8..ed2ced870 100644 --- a/OC/RegOp.aspx.vb +++ b/OC/RegOp.aspx.vb @@ -30,7 +30,7 @@ Partial Class RegOp Master.EsPopup = True If Request("p") IsNot Nothing Then - If Decripta(Request("p")) Then + If Decripta(Request("p")).Length > 0 Then Dim Par As Hashtable = ClsPaginas.UrlParametros Select Case Par("OP").ToString diff --git a/OC/RepCotizaciones.aspx.vb b/OC/RepCotizaciones.aspx.vb index bccfb7298..08bda8aa6 100644 --- a/OC/RepCotizaciones.aspx.vb +++ b/OC/RepCotizaciones.aspx.vb @@ -260,7 +260,7 @@ Partial Class RepCotizaciones 'Ingresar los detalles For Each RowD As DataRow In DtCotizacionesDetalle.FiltraParametros("CveCotizacion = " + CveCotizacion.ToString).Rows - If Not objCotizacion.AddOrdenCompraDetalle(CveOrdenCompra, RowD("Cantidad").ToString.ToDouble, RowD("CveUnidadMedida").ToString.ToEntero, RowD("CvePS").ToString.ToEntero, 0, -1, If(Not IsDBNull(Row("CveActivoFijo")), Row("CveActivoFijo").ToString.ToEntero, -1), Row("Observacion").ToString, UsuarioActual.CveUsuario) Then + If Not objCotizacion.AddOrdenCompraDetalle(CveOrdenCompra, RowD("Cantidad").ToString.ToDecimal, RowD("CveUnidadMedida").ToString.ToEntero, RowD("CvePS").ToString.ToEntero, 0, -1, If(Not IsDBNull(Row("CveActivoFijo")), Row("CveActivoFijo").ToString.ToEntero, -1), Row("Observacion").ToString, UsuarioActual.CveUsuario) Then HuboError = True End If Next diff --git a/OI/Circular.aspx.vb b/OI/Circular.aspx.vb index 8f39dc8a6..8a4b73290 100644 --- a/OI/Circular.aspx.vb +++ b/OI/Circular.aspx.vb @@ -55,7 +55,7 @@ Partial Class OI_Circular params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) - params.Add(New ReportParameter("FechaImpresion", Today)) + params.Add(New ReportParameter("FechaImpresion", Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("Filtros", String.Format("Fecha Inicial: {0} Fecha Final: {1}", TxtFechaI.Text, TxtFechaF.Text))) ImprimirPDF("Empresas/Grales/Formatos/Circulares.rdlc", DtDatos, params, "Circulares", "PDF", RDSName:="DataSet1") diff --git a/OI/CircularDetalle.aspx.vb b/OI/CircularDetalle.aspx.vb index e5a6ed498..7ff4c5c4c 100644 --- a/OI/CircularDetalle.aspx.vb +++ b/OI/CircularDetalle.aspx.vb @@ -55,15 +55,15 @@ Partial Class OI_CircularDetalle If ObjOI.GetCircular(UsuarioActual.CveEmpresa, CveCircular) Then Dim Circular As DataRow = ObjOI.DtResultados(0) - TxtAsunto.Text = Circular.Item("Asunto") - TxtCorreo.Value = Circular.Item("CorreosInternos") - TxtCorreoAdicional.Value = Circular.Item("CorreosExternos") - TxtCircular.Text = Circular.Item("Circular") + TxtAsunto.Text = Circular.Item("Asunto").ToString + TxtCorreo.Value = Circular.Item("CorreosInternos").ToString + TxtCorreoAdicional.Value = Circular.Item("CorreosExternos").ToString + TxtCircular.Text = Circular.Item("Circular").ToString - If Circular.Item("ArchivoAdjunto") <> "" Then + If Circular.Item("ArchivoAdjunto").ToString <> "" Then archivosDiv.Visible = True HkArchivo.NavigateUrl = $"~/Empresas/{UsuarioActual.CveEmpresa}/Formatos/{Circular.Item("ArchivoAdjunto")}" - HkArchivo.Text = Circular.Item("ArchivoAdjunto") + HkArchivo.Text = Circular.Item("ArchivoAdjunto").ToString End If UpCliente.Update() @@ -84,7 +84,7 @@ Partial Class OI_CircularDetalle Dim ObjOI As New ClsOIEventos If CveCircular > 0 Then - Dim AdjuntoValidate As String = NombreArchivo().Split("-")(1) + Dim AdjuntoValidate As String = NombreArchivo().Split("-"c)(1) If ObjOI.UpdateCircular(CveCircular, TxtAsunto.Text, TxtCircular.Text, TxtCorreo.Value, TxtCorreoAdicional.Value, AdjuntoValidate) Then GuardarArchivo(CveCircular) @@ -93,7 +93,7 @@ Partial Class OI_CircularDetalle Else Dim CorreoExtra As String = If(TxtCorreoAdicional.Value = "", "-1", TxtCorreoAdicional.Value) - Dim AdjuntoValidate As String = NombreArchivo().Split("-")(1) + Dim AdjuntoValidate As String = NombreArchivo().Split("-"c)(1) Dim CircularInsertado As Integer = ObjOI.AddCircular(TxtAsunto.Text, TxtCircular.Text, TxtCorreo.Value, Today.ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CorreoExtra, AdjuntoValidate) If CircularInsertado > 0 Then @@ -118,8 +118,8 @@ Partial Class OI_CircularDetalle End Sub Private Sub LimpiarModal() - DdlRolesFiltro.SelectedValue = -1 - DdlSucursales.SelectedValue = -1 + DdlRolesFiltro.SelectedValueExist(-1) + DdlSucursales.SelectedValueExist(-1) GvUsuarios.DataSource = Nothing GvUsuarios.DataBind() UpUsuarios.Update() @@ -222,7 +222,7 @@ Partial Class OI_CircularDetalle Protected Sub LnkMandarCorreo_Click() Handles LnkMandarCorreo.Click Dim correos() As String - correos = TxtCorreo.Value.Split(Environment.NewLine) + correos = TxtCorreo.Value.Split(New String() {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries) Dim ArchivoBytes As Byte() = ArchivoBytesArrya(HkArchivo.Text) Dim Contador As Integer = 0 @@ -263,9 +263,9 @@ Partial Class OI_CircularDetalle Dim ArchivoEnviar As String = String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, ArchivoNombre) If File.Exists(ArchivoEnviar) Then Dim fs As System.IO.FileStream = System.IO.File.Open(ArchivoEnviar, IO.FileMode.Open, IO.FileAccess.Read) - Dim buff(fs.Length) As Byte + Dim buff(fs.Length.ToEntero) As Byte If fs.Length > 0 Then - fs.Read(buff, 0, fs.Length - 1) + fs.Read(buff, 0, fs.Length.ToEntero - 1) fs.Close() End If Return buff diff --git a/OI/Normatividad.aspx.vb b/OI/Normatividad.aspx.vb index e1d44026f..5afb5e75a 100644 --- a/OI/Normatividad.aspx.vb +++ b/OI/Normatividad.aspx.vb @@ -213,7 +213,7 @@ Partial Class OI_Normatividad ArbolCuentas.DataSource = DtDatos Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", DdlSubtitulo.SelectedValue.ToEntero)), ADServerControl.DragableItem) - item.Attributes.Item("data-hijos") = item.Attributes.Item("data-hijos").ToEntero + 1 + item.Attributes.Item("data-hijos") = (item.Attributes.Item("data-hijos").ToEntero + 1).ToString Dim objul As ADServerControl.DragableUL = DirectCast(ArbolCuentas.FindControl(String.Format("ul{0}", DdlSubtitulo.SelectedValue.ToEntero)), ADServerControl.DragableUL) If (IsNothing(objul)) Then objul = New ADServerControl.DragableUL @@ -235,7 +235,7 @@ Partial Class OI_Normatividad End Sub Private Sub LimpiarCampos() Ttitulo.Text = "" - DdlSubtitulo.SelectedValue = -1 + DdlSubtitulo.SelectedValueExist(-1) TxtObservaciones.Text = "" Guardar.Visible = False @@ -265,7 +265,7 @@ Partial Class OI_Normatividad ArbolCuentas.DataSource = DtDatos Dim item As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", IDSelected)), ADServerControl.DragableItem) Dim padre As ADServerControl.DragableItem = DirectCast(ArbolCuentas.FindControl(String.Format("{0}", item.CvePadre)), ADServerControl.DragableItem) - padre.Attributes.Item("data-hijos") = padre.Attributes.Item("data-hijos").ToEntero - 1 + padre.Attributes.Item("data-hijos") = (padre.Attributes.Item("data-hijos").ToEntero - 1).ToString ArbolCuentas.Controls.Remove(item) 'RegistraScript(String.Format("$('#{0}').click();", editar.ClientID)) diff --git a/OI/Proyecto.aspx.cs b/OI/Proyecto.aspx.cs index ffa7f1c65..8d205aed7 100644 --- a/OI/Proyecto.aspx.cs +++ b/OI/Proyecto.aspx.cs @@ -309,8 +309,8 @@ public partial class OI_Proyecto : ClsPaginas else { - chkpara.Enabled = false; - chkCCpara.Enabled = false; + //chkpara.Enabled = false; + //chkCCpara.Enabled = false; } string palomitavisto = ""; string palomitasinver = ""; diff --git a/OI/SubidasADS.aspx.vb b/OI/SubidasADS.aspx.vb index a3e108431..4dc87ec3f 100644 --- a/OI/SubidasADS.aspx.vb +++ b/OI/SubidasADS.aspx.vb @@ -127,7 +127,7 @@ Partial Class OI_SubidasADS If Not ChkCompletado Is Nothing And GvRow.DataKey("Actualizable").ToEntero = 1 Then If ChkCompletado.Checked Then - If Not ObjDesarrollo.DesarrolloAddUpdate(GvRow.DataKey("CveDesarrollo").ToEntero, GvRow.DataKey("Desarrollo"), GvRow.DataKey("CveEvento").ToEntero, GvRow.DataKey("CveUsuarioResponsable").ToEntero, GvRow.DataKey("CveUsuarioPruebas"), GvRow.DataKey("CveModulo").ToEntero, GvRow.DataKey("Descripcion"), GvRow.DataKey("CveUsuarioAsignado").ToEntero, Nothing, -1, 5, -1, UsuarioActual.CveUsuario) Then + If Not ObjDesarrollo.DesarrolloAddUpdate(GvRow.DataKey("CveDesarrollo").ToEntero, GvRow.DataKey("Desarrollo"), GvRow.DataKey("CveEvento").ToEntero, GvRow.DataKey("CveUsuarioResponsable").ToEntero, GvRow.DataKey("CveUsuarioPruebas").ToEntero, GvRow.DataKey("CveModulo").ToEntero, GvRow.DataKey("Descripcion"), GvRow.DataKey("CveUsuarioAsignado").ToEntero, Nothing, -1, 5, -1, UsuarioActual.CveUsuario) Then Alert("Se presento un error al actulizar los estados") Exit For End If diff --git a/PortalGPS/Penske.aspx.vb b/PortalGPS/Penske.aspx.vb index 38e4d8041..461592c6e 100644 --- a/PortalGPS/Penske.aspx.vb +++ b/PortalGPS/Penske.aspx.vb @@ -36,15 +36,15 @@ Partial Class PortalGPS_Penske Dim ws As New WSPenske.ReceiveGPSInfo Dim info As New WSPenske.GPSInfo info.Proveedor = row("Proveedor").ToString - info.Latitud = row("Lat").ToString - info.Longitud = row("Lng").ToString + info.Latitud = row("Lat").ToString.ToDecimal + info.Longitud = row("Lng").ToString.ToDecimal info.NumUnidad = row("NoEconomico").ToString info.NumRemolque = row("NumeroRemolque").ToString info.Velocidad = row("Velocidad").ToString info.Placas = row("PlacasVehiculo").ToString info.Trackingnumber = row("TrackingNumber").ToString info.Ubicacion = direccion - info.FechaHoraEvento = row("FechaTrama").ToString + info.FechaHoraEvento = row("FechaTrama").ToString.ToDate info.FechaRecepcion = DateTime.Now.AddMinutes(120) info.Username = row("Usuario").ToString info.Password = row("PWD").ToString From 0811636213dc7189135e2a55af742e44a50e8690 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 24 Aug 2023 11:30:17 -0700 Subject: [PATCH 056/111] option strict on --- OC/OC.aspx.vb | 69 ++++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 5b3cf7b11..4d94fe1aa 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -507,7 +507,7 @@ Partial Class OC_OC If ViewState("MonedaTexto") Is Nothing Then Return "" Else - Return ViewState("MonedaTexto").ToString.ToEntero + Return ViewState("MonedaTexto").ToString End If End Get Set(value As String) @@ -1402,7 +1402,7 @@ Partial Class OC_OC DdlVendedor.SelectedValueExist(objOC.CveVendedor.ToString) If DdlVendedor.SelectedValue <> objOC.CveVendedor.ToString Then - DdlVendedor.Items.Insert(1, New ListItem(GlobalDTVendedores(UsuarioActual.CveEmpresa, False).FiltroPrimeroValor("Vendedor", $"CveVendedor = {objOC.CveVendedor}"), objOC.CveVendedor.ToString)) + DdlVendedor.Items.Insert(1, New ListItem(GlobalDTVendedores(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("Vendedor", $"CveVendedor = {objOC.CveVendedor}"), objOC.CveVendedor.ToString)) End If End If @@ -1427,9 +1427,9 @@ Partial Class OC_OC Select Case objOC.PorcentajeIVA.ToString.ToDecimal Case 0 DdlIVA.SelectedValue = "1" - Case 0.16 + Case 0.16D DdlIVA.SelectedValue = "1.16" - Case 0.08 + Case 0.08D DdlIVA.SelectedValue = "1.08" End Select 'If objOC.PorcentajeIVA.ToString.ToDecimal = 0 Then DdlIVA.SelectedValue = "1" Else DdlIVA.SelectedValue = "1.16" @@ -2273,12 +2273,12 @@ Partial Class OC_OC If drProv IsNot Nothing Then If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr - RetISR = 0.0125 + RetISR = 0.0125D End If End If End If - AddPS(TxtCant.Text, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDecimal, TotalPS, + AddPS(TxtCant.Text.ToDecimal, DdlP2.SelectedValue.ToEntero, DdlP2.SelectedText, TxtObsPS.Text, ImportePS, TxtDescuentoAdd.Text.ToDecimal, TotalPS, CboUnidadMedida.SelectedValue.ToEntero, IvaPS, IEPSPS, IEPSPSIVA, DdlClasificacion.SelectedValue.ToEntero, CboUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedItem.Text, DdlProyecto.SelectedValue.ToEntero, Proyecto, DdlSubProyecto.SelectedValue.ToEntero, SubProyecto, LblCodigo.Text, HdnCveActivoFijo.Value.ToEntero, 0, CveOrdenCompraDetalle, CveOrdenCompra, IdCuentaPorEjercer, IdCuentaComprometido, DdlACGeneral1.SelectedValue.ToEntero, DdlACGeneral2.SelectedValue.ToEntero, DdlACGeneral3.SelectedValue.ToEntero, DdlACGeneral4.SelectedValue.ToEntero, @@ -2306,7 +2306,7 @@ Partial Class OC_OC UPPDetalle.Update() End Sub - Private Sub AddPS(Cantidad As String, CvePS As Integer, PS As String, Observaciones As String, Importe As Decimal, Descuento As Decimal, Total As Decimal, CveUnidadMedida As Integer, IVAPS As Decimal, IEPSPS As Decimal, IEPSPSIVA As Decimal, CveClasificacion As Integer, + Private Sub AddPS(Cantidad As Decimal, CvePS As Integer, PS As String, Observaciones As String, Importe As Decimal, Descuento As Decimal, Total As Decimal, CveUnidadMedida As Integer, IVAPS As Decimal, IEPSPS As Decimal, IEPSPSIVA As Decimal, CveClasificacion As Integer, UM As String, Clasificacion As String, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, CodigoAF As String, CveActivoFijo As Integer, TipoDato As Integer, CveOrdenCompraDetalle As Integer, CveOrdenCompra As Integer, IdCuentaPorEjercer As Integer, IdCuentaComprometido As Integer, CveProgramaOperativo As Integer, CveUnidadAdministrativa As Integer, CveFuenteFinanciamiento As Integer, CveTipoGasto As Integer, CveClasificacionOG As Integer, RetIVA As Decimal, RetISR As Decimal, Optional CveContratoDetalle As Integer = -1, Optional CveTipoGastoObra As Integer = -1, Optional CveCultivoCuadroDetalle As Integer = -1, @@ -3318,7 +3318,8 @@ Partial Class OC_OC If ChkCotizacion.Checked AndAlso NoProveedoresCot > 0 AndAlso (NumCotizacionesGanadoras > 0 OrElse Not (NumCotizacionesGanadoras <= 0 AndAlso CveConfianzaProveedor = 1)) Then Dim CveProveedor = -1 - Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0, PorIVA = 0.0 + Dim TotalCot = 0.0, IVACot = 0D, RetIVA = 0.0, RetISR = 0.0 + Dim PorIVA As Decimal = 0 Dim IdPoliza = -1 @@ -3329,7 +3330,7 @@ Partial Class OC_OC CveProveedor = dr("CveProveedor").ToString.ToEntero - PorIVA = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) 'GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDecimal + PorIVA = (DdlIVA.SelectedValue.ToDecimal - 1D).RoundSQL 'GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)).Rows(0)("IVA").ToString.ToDecimal IVACot = IVA '(DtDetalle.SUM("Total", String.Format("CveProveedor = {0}", CveProveedor)) * PorIVA).ToString.ToDecimal RetIVA = TxtRetIVA.Text.ToDecimal RetISR = TxtRetISR.Text.ToDecimal @@ -4059,7 +4060,7 @@ Partial Class OC_OC Dim drProv As DataRow = GlobalDTCompProveedores(CveEmpresaActual, CveProveedor:=DdlProveedores.SelectedValue.ToEntero).FiltroPrimero("") If drProv IsNot Nothing Then If drProv("CodigoRegimenFiscal").ToString = "626" Then 'simplificado lleva retencion de 1.25 de isr - RetISR = 0.0125 + RetISR = 0.0125D End If End If End If @@ -4070,7 +4071,7 @@ Partial Class OC_OC If Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) = 0.08 Then RetIVA = RetIVA / 2 End If - IvaPS = -1 + If IvaPS <> 0 Then IvaPS = -1 End If CveSubProyecto = gvr.FCDropDownList("DdlSubProyectoEdit").SelectedValue.ToEntero @@ -4594,7 +4595,7 @@ Partial Class OC_OC Filtro.Clear() If DtPresupuestosTemp.Rows.Count > 0 Then - disponible = ContPaq.GetSaldoCuenta(DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year) + disponible = ContPaq.GetSaldoCuenta(DtPresupuestosTemp.Rows(0)("IdCuentaPorEjercer").ToString.ToEntero, 0, TxtFecha.Text.ToDate.Year).ToDecimal If disponible > 0 AndAlso disponible > Total Then 'Alert("Si hay dinero: ") @@ -5593,15 +5594,15 @@ Partial Class OC_OC Dim PorcentajeIVA As Decimal = 0D If DrPS("IVA").ToString().Contiene("-1", "") Then - PorcentajeIVA = Row("IVAPorcentaje") + PorcentajeIVA = Row("IVAPorcentaje").ToString.ToDecimal Else - PorcentajeIVA = DrPS("IVA") + PorcentajeIVA = DrPS("IVA").ToString.ToDecimal End If Dim ImporteIEPS As Decimal = (TotalCalculableImpuestos * PorcentajeIEPS).RoundSQL(2) Dim ImporteIVA As Decimal = (TotalCalculableImpuestosIVA * PorcentajeIVA).RoundSQL(2) - If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, "", UsuarioActual.CveUsuario) Then + If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalleCotizacion").ToString.ToEntero, CvePS, Cantidad, PU, ImporteIEPS, PorcentajeIEPS, ImporteIVA, PorcentajeIVA, 0, "", UsuarioActual.CveUsuario) Then OcurrioError = True Exit For End If @@ -6606,14 +6607,14 @@ Partial Class OC_OC Dim RowNoEncontrados As String = String.Empty Dim NumAgregados As Integer = 0 For Each Row As DataRow In dt.Rows - Dim Cantidad As String = Row("Cantidad").ToString + Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal Dim Codigo As String = Row("Código").ToString.Trim.ToUpper Dim CodigoBarras As String = Row("Código de Barras").ToString.Trim.ToUpper Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper Dim Proyecto As String = Row("Proyecto").ToString.Trim.ToUpper Dim Observaciones As String = Row("Observaciones").ToString Dim PrecioUnitario As String = Row("PU").ToString - Dim Descuento As Decimal = Row("Descuento").ToString.ToDecimal * Cantidad.ToDecimal 'RMF, cambio a multiplicar por cantidad 2018.04.21 + Dim Descuento As Decimal = Row("Descuento").ToString.ToDecimal * Cantidad 'RMF, cambio a multiplicar por cantidad 2018.04.21 Dim CvePS As Integer = 0 Dim CveProyecto As Integer = 0 Dim CveSubProyecto As Integer = 0 @@ -6684,7 +6685,7 @@ Partial Class OC_OC Dim RetIVA As Decimal = DrPS("RetIVA").ToString.ToDecimal Dim RetISR As Decimal = DrPS("RetISR").ToString.ToDecimal Dim PS As String = DrPS("PS").ToString - Dim TotalPS As Decimal = If(PrecioUnitario.ToDecimal > 0, PrecioUnitario.ToDecimal * Cantidad.ToDecimal - Descuento, 0) + Dim TotalPS As Decimal = If(PrecioUnitario.ToDecimal > 0, PrecioUnitario.ToDecimal * Cantidad - Descuento, 0) Dim CveUnidadMedida As Integer = DrPS("CveUnidadMedida").ToString.ToEntero Dim UM As String = DrPS("UnidadMedida").ToString Dim IvaPS As Decimal = DrPS("IVA").ToString.ToDecimal @@ -7297,13 +7298,13 @@ Partial Class OC_OC End Sub Private Sub CalculaGenerales() - Dim Subtotal As Decimal = DtDetalle.SUM("Total", "Total > 0") + DtDetalle.SUM("Descuento") - Dim Descuento As Decimal = DtDetalle.SUM("Descuento") - Dim SubTotalIEPSIVA As Decimal = DtDetalle.SUM("IEPSPSIVA") - Dim IVA As Decimal = DtDetalle.SUM("IVA") + SubTotalIEPSIVA - Dim SubTotalIEPS As Decimal = DtDetalle.SUM("IEPSPS") - Dim SubTotalRetIVA As Decimal = DtDetalle.SUM("RetIVA") - Dim SubTotalRetISR As Decimal = DtDetalle.SUM("RetISR") + Dim Subtotal As Decimal = DtDetalle.SUMD("Total", "Total > 0") + DtDetalle.SUMD("Descuento") + Dim Descuento As Decimal = DtDetalle.SUMD("Descuento") + Dim SubTotalIEPSIVA As Decimal = DtDetalle.SUMD("IEPSPSIVA") + Dim IVA As Decimal = DtDetalle.SUMD("IVA") + SubTotalIEPSIVA + Dim SubTotalIEPS As Decimal = DtDetalle.SUMD("IEPSPS") + Dim SubTotalRetIVA As Decimal = DtDetalle.SUMD("RetIVA") + Dim SubTotalRetISR As Decimal = DtDetalle.SUMD("RetISR") 'SUBTOTAL LblSubTotal.Text = (Subtotal).FormatoNumero @@ -7513,7 +7514,7 @@ Partial Class OC_OC TxtRetIVA.Text = TxtRetIVA.Text.FormatoNumero HdnRetIVA.Value = TxtRetIVA.Text - Dim Porcentaje As Decimal = TxtRetIVA.Text.ToDecimal / DtDetalle.SUM("Total") + Dim Porcentaje As Decimal = TxtRetIVA.Text.ToDecimal / DtDetalle.SUMD("Total") Dim LastDr As DataRow = Nothing For Each Dr As DataRow In DtDetalle.Rows 'Dr("RetIVA") = (Math.Truncate((Dr("Total").ToString.ToDecimal * Porcentaje) * 100)) / 100 @@ -7709,7 +7710,7 @@ Partial Class OC_OC Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100 - AddPS(Cantidad.ToString, row.DataKey("CvePS").ToEntero, row.DataKey("CodigoPS").ToString, "", ImportePS, 0, TotalPS, + AddPS(Cantidad, row.DataKey("CvePS").ToEntero, row.DataKey("CodigoPS").ToString, "", ImportePS, 0, TotalPS, row.DataKey("CveUM").ToEntero, IvaPS, IEPSPS, IEPSPSIVA, row.DataKey("CveClasificacion").ToEntero, row.DataKey("UM"), row.DataKey("ClasificacionPS"), 0, "Sin Proyecto", DdlSubProyectoContrato.SelectedValue.ToEntero, DdlSubProyectoContrato.SelectedItem.Text, "", -1, 0, CveOrdenCompraDetalle, -1, -1, -1, -1, -1, -1, -1, -1, RetIVA, RetISR, CveContratoDetalle:=row.DataKey("CveContratoDetalle").ToEntero) @@ -7930,7 +7931,7 @@ Partial Class OC_OC 'cantidad, Producto, Precio Unitario, Fecha Entrega, Observación Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) - Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows + Dim DtExcel As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)() Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero() Where row.RowType = DataControlRowType.DataRow Select New With @@ -8028,7 +8029,7 @@ Partial Class OC_OC Try Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) - Dim DtOCDetalle As DataTable = (From row As GridViewRow In GvD.Rows + Dim DtOCDetalle As DataTable = (From row As GridViewRow In GvD.Rows.Cast(Of GridViewRow)() Join rowPS In DtPS On rowPS("CvePS").ToString().ToEntero() Equals row.DataKey("CvePS").ToEntero() Where row.RowType = DataControlRowType.DataRow Select New With @@ -8129,12 +8130,12 @@ Partial Class OC_OC PU = ObjOC.DtResultados.FiltroPrimeroValor("Importe228").ToDecimal * TCAjuste ImporteCI176 = ObjOC.DtResultados.FiltroPrimeroValor("ImporteCI228").ToDecimal Importe176 = Importe228 + Importe229 - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Importe228, -Importe228, 228, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, -Importe229, -Importe229, 229, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Importe228, -Importe228, 228, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -Importe229, -Importe229, 229, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=-Importe228, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, TipoCambio:=TCAjuste, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then ErrorPrepoliza = True Exit For Else - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, 1, Importe176, Importe176, 176, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe176, Importe176, 176, lblFolio.Text, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteME:=Importe176, CveOCDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoAlmacen) Then ErrorPrepoliza = True Exit For Else @@ -8412,7 +8413,7 @@ Partial Class OC_OC PorletIEAnticipo.Visible = True GvAnticpos.DataSource = objbancos.DtResultados - ImporteAnticipos = objbancos.DtResultados.SUM("Importe") + ImporteAnticipos = objbancos.DtResultados.SUMD("Importe") End If @@ -8635,7 +8636,7 @@ Partial Class OC_OC Dim PS As String = GvRow.DataKey("PS") Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal Dim TotalPS As Decimal = GvRow.FCTextBox("TxtImporte").Text.ToDecimal - Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida") + Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString Dim SubProyecto As String = GvRow.DataKey("SubProyecto") From 637fdc63e9002f063bf089256bea35f6b0993b13 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 24 Aug 2023 16:05:50 -0700 Subject: [PATCH 057/111] --espacios --- Bancos/IE.aspx.vb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index ad714fa81..a0101dd2a 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -4968,10 +4968,7 @@ Partial Class Bancos_IE End If End If - Banco.IniciaTransacSQL() - - If Banco.GeneraTimbrePago(CveIE, -1, UsuarioActual) Then If Banco.Mensaje = "" Then Banco.Commit() @@ -4982,7 +4979,6 @@ Partial Class Bancos_IE Str.AppendFormat("{1}   {2}
    ", CveIE, Folio, DdlCliente.SelectedText.ToString()) MandaCorreo(Banco.ComplementoSerieFolio, CorreoCobranzaCliente) End If - Else Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", Folio, Banco.Mensaje) Banco.RollBack() From 435a92dea3c4aba325b0950f815c8d5a3c8a8830 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 24 Aug 2023 17:53:05 -0700 Subject: [PATCH 058/111] =?UTF-8?q?Compilaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 4 ++-- Prospeccion/Prospectos.aspx.vb | 6 +++--- Prospeccion/RepProspectosGIS.aspx.vb | 2 +- Prospectos/RedesIndicadores.aspx.vb | 2 +- Prospectos/RepMetas2.aspx.vb | 2 +- RH/CatCursosCapacitadores.aspx.vb | 12 +++++------ RH/CatCursosTemas.aspx.vb | 14 ++++++------- RH/CatEstadoCivil.aspx.vb | 2 +- RH/CatPersonalRequerido.aspx.vb | 8 +++---- RH/CatPuestosSueldos.aspx.vb | 6 +++--- Ventas/RepVentaDetalle.aspx | 30 +++++++++++++++++++++++---- Ventas/RepVentaDetalle.aspx.vb | 31 ++++++++++++++++++++++++++++ 12 files changed, 86 insertions(+), 33 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 358583201..50dc49d90 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -13326,7 +13326,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, If ObjCompras.GetCancelarNC(CveCompra, UsuarioActual.CveEmpresa) Then dt = ObjCompras.DtResultados - 'CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CvePrePolizaNueva > 0 Then For Each dr As DataRow In dt.Rows If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Importe").ToString.ToDecimal * -1, dr("CveConceptoContable").ToString.ToEntero, dr("Referencia").ToString, @@ -13351,7 +13351,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, If ObjContabilidad.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then dt = ObjContabilidad.DtResultados.FiltraParametros("ISNULL(CveMovimientoAlmacen,0) <=0") - 'CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CvePrePolizaNueva = ObjContabilidad.AddPrePolizas("Compras/Cancelar", dt.Rows(0)("CvePlantillaPoliza").ToString.ToEntero, dt.Rows(0)("Cargos").ToString.ToDouble * -1, dt.Rows(0)("Abonos").ToString.ToDouble * -1, dt.Rows(0)("CveMoneda").ToString.ToEntero, TxtFechaCancelacion.Text.ToDate, String.Format("Cancelación: {0}", dt.Rows(0)("Concepto").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CvePrePolizaNueva > 0 Then For Each dr As DataRow In dt.Rows If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePolizaNueva, CBool(dr("TipoMovto").ToString), dr("Importe").ToString.ToDecimal * -1, dr("Importe").ToString.ToDecimal * -1, dr("CveConceptoContable").ToString.ToEntero, dr("Referencia").ToString, diff --git a/Prospeccion/Prospectos.aspx.vb b/Prospeccion/Prospectos.aspx.vb index ba848c90a..c5985a827 100644 --- a/Prospeccion/Prospectos.aspx.vb +++ b/Prospeccion/Prospectos.aspx.vb @@ -162,11 +162,11 @@ Partial Class Prospectos_Prospectos End Sub Private Sub CargaEstados(ddl As DropDownList, CvePais As Integer) - ddl.DataSource = GlobalDTGralEstados(CvePais) : ddl.DataBind() + ddl.DataSource = GlobalDTGralEstados(CvePais.ToString) : ddl.DataBind() End Sub Private Sub CargaMunicipios(ddl As DropDownList, CveEstado As Integer) - ddl.DataSource = GlobalDTGralMunicipios(CveEstado) : ddl.DataBind() + ddl.DataSource = GlobalDTGralMunicipios(CveEstado.ToString) : ddl.DataBind() End Sub Private Sub CargaCoordinadores(ddl As DropDownList, CveSupervisor As Integer) @@ -423,7 +423,7 @@ Partial Class Prospectos_Prospectos #Region "Formatos Imprimir" - Protected Sub LnbImprimir_Click(sender As LinkButton, e As EventArgs) Handles LnbImprimir.Click + Protected Sub LnbImprimir_Click(sender As LinkButton, e As EventArgs) 'Handles LnbImprimir.Click 'Dim oWordApp As Microsoft.Office.Interop.Word.Application = Nothing 'Dim oWordDoc As Microsoft.Office.Interop.Word.Document = Nothing 'Dim objSelection As Microsoft.Office.Interop.Word.Selection = Nothing diff --git a/Prospeccion/RepProspectosGIS.aspx.vb b/Prospeccion/RepProspectosGIS.aspx.vb index 9fa70be6a..e2edca92e 100644 --- a/Prospeccion/RepProspectosGIS.aspx.vb +++ b/Prospeccion/RepProspectosGIS.aspx.vb @@ -75,7 +75,7 @@ Partial Class Prospeccion_RepProspectosGIS TmpDT.Columns.Add("Clave", GetType(String)) TmpDT.Columns.Add("CvePS", GetType(Integer)) - DdlFiscalEstado.DataSource = GlobalDTGralEstados(1) : DdlFiscalEstado.DataBind() + DdlFiscalEstado.DataSource = GlobalDTGralEstados("1") : DdlFiscalEstado.DataBind() CargaVendidos() End If diff --git a/Prospectos/RedesIndicadores.aspx.vb b/Prospectos/RedesIndicadores.aspx.vb index 9740d753e..a32194ea8 100644 --- a/Prospectos/RedesIndicadores.aspx.vb +++ b/Prospectos/RedesIndicadores.aspx.vb @@ -193,7 +193,7 @@ Partial Class Prospectos_RedesIndicadores ' ChtAvances.ChartAreas("ChartArea1").AxisX.IsMarginVisible = False - Dim Fechas = From s In Ind.DtResultados.AsEnumerable Where s!MesAnioIng <> "-1" Select Fecha = ("01/" & s!MesAnioIng).ToString.ToDate, Tot = s!Total.ToString.ToDouble Order By Fecha + Dim Fechas = From s In Ind.DtResultados.AsEnumerable Where s!MesAnioIng.ToString <> "-1" Select Fecha = ("01/" & s!MesAnioIng.ToString).ToString.ToDate, Tot = s!Total.ToString.ToDouble Order By Fecha 'xValues.Add(" - ") diff --git a/Prospectos/RepMetas2.aspx.vb b/Prospectos/RepMetas2.aspx.vb index 9774e9f57..6ede2e420 100644 --- a/Prospectos/RepMetas2.aspx.vb +++ b/Prospectos/RepMetas2.aspx.vb @@ -171,7 +171,7 @@ Partial Class Prospectos_RepMetas2 e.Row.FCLiteral("LitPor").Text = (e.Row.DBCampo("Hijos").ToDouble / e.Row.DBCampo("MetaGlobal").ToDouble * 100).FormatoNumero(0) - If e.Row.DBCampo("UltimoIngreso") <> "" AndAlso e.Row.DBCampo("UltimoIngreso") < Now.AddDays(-10) Then + If e.Row.DBCampo("UltimoIngreso") <> "" AndAlso e.Row.DBCampo("UltimoIngreso").ToDate < Now.AddDays(-10) Then e.Row.Cells(4).ForeColor = System.Drawing.Color.Red e.Row.Cells(4).ToolTip = "Ultimo ingreso mayor a 10 dias" End If diff --git a/RH/CatCursosCapacitadores.aspx.vb b/RH/CatCursosCapacitadores.aspx.vb index 7d414d95a..98efeb8ae 100644 --- a/RH/CatCursosCapacitadores.aspx.vb +++ b/RH/CatCursosCapacitadores.aspx.vb @@ -145,8 +145,8 @@ Partial Class RH_CatCursosCapacitadores Dim objRH As New ClsRH Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim activo As Boolean = 0 - Dim CveCapacitador As Integer = GvRow.DataKey("CveCapacitador") + Dim activo As Boolean = False + Dim CveCapacitador As Integer = GvRow.DataKey("CveCapacitador").ToEntero If objRH.CapacitadorRemove(CveCapacitador) Then CargadatosGvCapacitador() @@ -162,18 +162,18 @@ Partial Class RH_CatCursosCapacitadores Public Sub Edit_ClickCapacitador(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim activo As Boolean = 0 + Dim activo As Boolean = False LtlTituloModalCapacitadores.Text = "Editar Capacitador" Actualizar = True - CveCapaciatador = GvRow.DataKey("CveCapacitador") + CveCapaciatador = GvRow.DataKey("CveCapacitador").ToEntero TxtCapacitador.Text = GvRow.DataKey("Capacitador") TxtEspecialidades.Text = GvRow.DataKey("Especialidades") TxtCedula.Text = GvRow.DataKey("Cedula") - ChkEstatus.Checked = GvRow.DataKey("Estatus") - chkExterno.Checked = GvRow.DataKey("Externo") + ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus")) + chkExterno.Checked = Boolean.Parse(GvRow.DataKey("Externo")) BtnAgregarCapacitadorModal.Text = "Actualizar" diff --git a/RH/CatCursosTemas.aspx.vb b/RH/CatCursosTemas.aspx.vb index 75996ce7d..7071b6c07 100644 --- a/RH/CatCursosTemas.aspx.vb +++ b/RH/CatCursosTemas.aspx.vb @@ -95,8 +95,8 @@ Partial Class RH_CatCursosTemas Public Sub Remove_ClickTema(sender As Object, e As EventArgs) Dim objRH As New ClsRH Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim activo As Boolean = 0 - Dim CveTema As Integer = GvRow.DataKey("CveTema") + Dim activo As Boolean = False + Dim CveTema As Integer = GvRow.DataKey("CveTema").ToEntero If objRH.TemasRemove(CveTema) Then CargadatosGvTemas() @@ -109,14 +109,14 @@ Partial Class RH_CatCursosTemas Public Sub Edit_ClickTema(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim activo As Boolean = 0 + Dim activo As Boolean = False LtlTituloModalTema.Text = "Editar Tema" HdModalTemaModalidad.Value = "U" HdCveTema.Value = GvRow.DataKey("CveTema") TxtTema.Text = GvRow.DataKey("Tema") - ChkEstatusTema.Checked = GvRow.DataKey("Estatus") + ChkEstatusTema.Checked = Boolean.Parse(GvRow.DataKey("Estatus")) BtnAgregarTemaModal.Text = "Actualizar" LoadComboTemas() UpModalTema.Update() @@ -173,8 +173,8 @@ Partial Class RH_CatCursosTemas Public Sub Remove_ClickSubtema(sender As Object, e As EventArgs) Dim objRH As New ClsRH Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim activo As Boolean = 0 - Dim CveTema As Integer = GvRow.DataKey("CveSubtema") + Dim activo As Boolean = False + Dim CveTema As Integer = GvRow.DataKey("CveSubtema").ToEntero If objRH.SubtemaRemove(CveTema) Then CargadatosGvTemas() @@ -244,7 +244,7 @@ Partial Class RH_CatCursosTemas HdCveSubtema.Value = GvRow.DataKey("CveSubtema") DDlTema.SelectedValueExist(GvRow.DataKey("CveTema")) TxtSubtema.Text = GvRow.DataKey("Subtema") - ChkEstatusSubtema.Checked = GvRow.DataKey("Estatus") + ChkEstatusSubtema.Checked = Boolean.Parse(GvRow.DataKey("Estatus")) LtlTituloModalSubtema.Text = "Editar Subtema" BtnAgregarSubtemaModal.Text = "Actualizar" diff --git a/RH/CatEstadoCivil.aspx.vb b/RH/CatEstadoCivil.aspx.vb index ebc1d624f..8791f4d78 100644 --- a/RH/CatEstadoCivil.aspx.vb +++ b/RH/CatEstadoCivil.aspx.vb @@ -159,7 +159,7 @@ Partial Class RH_CatEstadoCivil Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar EstadoCivilTxt.Text = GvRow.DataKey("EstadoCivil") ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) - CveEstadoCivilAEditar = GvRow.DataKey("CveEstadoCivil") 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating" + CveEstadoCivilAEditar = GvRow.DataKey("CveEstadoCivil").ToEntero 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating" UpDatos.Update() If ViewState("Orden").ToString() <> String.Empty Then diff --git a/RH/CatPersonalRequerido.aspx.vb b/RH/CatPersonalRequerido.aspx.vb index 1d99a4bae..b60a418ae 100644 --- a/RH/CatPersonalRequerido.aspx.vb +++ b/RH/CatPersonalRequerido.aspx.vb @@ -175,7 +175,7 @@ Partial Class RH_CatPersonalRequerido Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim CveReq As Integer = GvRow.DataKey("CveRequerimiento") + Dim CveReq As Integer = GvRow.DataKey("CveRequerimiento").ToEntero Dim ObjRH As New ClsRH @@ -196,12 +196,12 @@ Partial Class RH_CatPersonalRequerido Public Sub Edit_ClickPersonalReq(sender As Object, e As EventArgs) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - Dim activo As Boolean = 0 + Dim activo As Boolean = False LtlTituloModalPersonalReq.Text = "Editar Personal Requerido" Actualizar = True - CveRequerimiento = GvRow.DataKey("CveRequerimiento") + CveRequerimiento = GvRow.DataKey("CveRequerimiento").ToEntero CargaProyectos() CargaTurno() @@ -212,7 +212,7 @@ Partial Class RH_CatPersonalRequerido ReqSubProyectoDdl.SelectedValueExist(GvRow.DataKey("CveSubProyecto").ToEntero) ReqTurnoDdl.SelectedValueExist(GvRow.DataKey("CveTurno").ToEntero) - TxtCantidad.Text = GvRow.DataKey("Cantidad").ToEntero + TxtCantidad.Text = GvRow.DataKey("Cantidad") DdlDepartamento.SelectedValueExist(GvRow.DataKey("CveDepartamento").ToEntero) diff --git a/RH/CatPuestosSueldos.aspx.vb b/RH/CatPuestosSueldos.aspx.vb index 0cd81b1d6..d098eaee0 100644 --- a/RH/CatPuestosSueldos.aspx.vb +++ b/RH/CatPuestosSueldos.aspx.vb @@ -29,7 +29,7 @@ Partial Class RH_CatPuestosSueldos DDL.DataSource = GlobalDTRHPuestos(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" (CvePuesto NOT IN({0}) OR CvePuesto={1})", FiltroPuestos, CvePuesto)) DDL.DataBind() If CvePuesto > 0 Then - DDL.SelectedValue = CvePuesto + DDL.SelectedValueExist(CvePuesto) End If End Sub @@ -75,7 +75,7 @@ Partial Class RH_CatPuestosSueldos Protected Sub GvDatos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvDatos.RowUpdating Dim index As Integer = e.RowIndex Dim cvepuesto As Integer = GvDatos.Rows(index).FCHiddenField("CvePuesto").Value.ToString.ToEntero - Dim Importe As Integer = GvDatos.Rows(index).FCTextBox("TxtSueldo").Text.ToString.ToDouble + Dim Importe As Integer = GvDatos.Rows(index).FCTextBox("TxtSueldo").Text.ToString.ToEntero Dim objRH As New ClsRH If objRH.UpdatePuestosSueldos(cvepuesto, Importe) Then GvDatos.EditIndex = -1 @@ -92,7 +92,7 @@ Partial Class RH_CatPuestosSueldos Dim index As Integer = e.NewEditIndex GvDatos.EditIndex = index cargaGVDatos() - CargaPuestos(GvDatos.Rows(index).FCDropDownList("DdlPuesto"), GvDatos.Rows(index).FCHiddenField("CvePuesto").Value) + CargaPuestos(GvDatos.Rows(index).FCDropDownList("DdlPuesto"), GvDatos.Rows(index).FCHiddenField("CvePuesto").Value.ToEntero) End Sub #End Region diff --git a/Ventas/RepVentaDetalle.aspx b/Ventas/RepVentaDetalle.aspx index 8f57510c5..61fae0be3 100644 --- a/Ventas/RepVentaDetalle.aspx +++ b/Ventas/RepVentaDetalle.aspx @@ -553,6 +553,28 @@ + + + <%-- 36--%> + + + + + + <%-- 37--%> + + + + + + <%-- 38--%> + + + + + + + @@ -680,19 +702,19 @@
    &nbst
    Fecha Aplicación @@ -792,7 +789,7 @@ --%> - +
    -
    +
    -
    -
    -
    - - Cuentas Contables Doctos. X Pagar -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - -
    Doctos. x Pagar: - - - - - -
    Extranjera: - - - -
    - - - - -
    -
    -
    +
    +
    +
    + + Cuentas Contables Anticipos +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + +
    Anticipos: + + + + + +
    Extranjera: + + + +
    + + + + +
    +
    +
    +
    -
    -
    -
    - - Cuentas Contables Anticipos -
    -
    -
    -
    -
    -
    - - -
    -
    -
    - - - - - - - - - - - - - - -
    Anticipos: - - - - - -
    Extranjera: - - - -
    - - - - -
    -
    -
    + +
    diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 419275723..594662fde 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -946,6 +946,12 @@ Partial Class Compras_Proveedores DdlCtaContDocsXPagarComplementaria.AutoPostBack = True DdlCtaContRetISRAcreditable.AutoPostBack = True + 'Proveedores + Dim drr As DataRow = ObjProveedor.DtResultados.Rows(0) + If drr("IdCtaContProveedores").ToString <> "" Then DdlCtaContProveedores.Items.Add(New ListItem(drr("CtaContProveedores").ToString, drr("IdCtaContProveedores").ToString)) : DdlCtaContProveedores.SelectedValueExist(drr("IdCtaContProveedores").ToString) + If drr("IdCtaContExtranjera").ToString <> "" Then DdlCtaContExtranjera.Items.Add(New ListItem(drr("CtaContExtranjera").ToString, drr("IdCtaContExtranjera").ToString)) : DdlCtaContExtranjera.SelectedValue = drr("IdCtaContExtranjera").ToString + If drr("IdCtaContComplementaria").ToString <> "" Then DdlCtaContComplementaria.Items.Add(New ListItem(drr("CtaContComplementaria").ToString, drr("IdCtaContComplementaria").ToString)) : DdlCtaContComplementaria.SelectedValue = drr("IdCtaContComplementaria").ToString + DdlCtaContProveedores.Attributes.Add("onclick", "CargaCuentas(1);") DdlCtaContAcreedores.Attributes.Add("onclick", "CargaCuentas(6);") DdlCtaContAnticipos.Attributes.Add("onclick", "CargaCuentas(2);") @@ -968,68 +974,68 @@ Partial Class Compras_Proveedores DdlCtaContRetIVAAcreditable.Attributes.Add("onclick", "CargaCuentas(20);") - End If + End If - 'CxP - TxtLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString.FormatoNumero - TxtPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString - LblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString.FormatoNumero - LblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString + 'CxP + TxtLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString.FormatoNumero + TxtPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString + LblLimiteCredito.Text = ObjProveedor.LimiteCredito.ToString.FormatoNumero + LblPlazoCobranza.Text = ObjProveedor.PlazoPago.ToString - 'Sistema - ChkEstado.Checked = ObjProveedor.Estatus = "Activo" - LblFechaCaptura.Text = ObjProveedor.FechaIng.ToShortDateString - LblUsuarioCapturo.Text = ObjProveedor.Usuario - TxtObservaciones.Text = ObjProveedor.Observaciones + 'Sistema + ChkEstado.Checked = ObjProveedor.Estatus = "Activo" + LblFechaCaptura.Text = ObjProveedor.FechaIng.ToShortDateString + LblUsuarioCapturo.Text = ObjProveedor.Usuario + TxtObservaciones.Text = ObjProveedor.Observaciones - CargaCombos() + CargaCombos() - ChkAplicarEvaluacion.Checked = If(ObjProveedor.DtResultados.Rows(0)("AplicarEvaluacion").ToString = "True", True, False) - TxtFechaEva.Text = If(IsDate(ObjProveedor.DtResultados.Rows(0)("FechaEvaluacion").ToString()), ObjProveedor.DtResultados.Rows(0)("FechaEvaluacion").ToString().ToDate().ToString("dd/MM/yyyy"), "") - LblFechaUltimaEvaluacion.Text = If(IsDate(ObjProveedor.DtResultados.Rows(0)("FechaUltimaEvaluacion").ToString()), ObjProveedor.DtResultados.Rows(0)("FechaUltimaEvaluacion").ToString().ToDate().ToString("dd/MM/yyyy"), "") - DdlCicloEvaluacion.SelectedValueExist(ObjProveedor.DtResultados.Rows(0)("CicloEvaluacion").ToString()) - DdlUsuarioEvaluador.SelectedValueExist(ObjProveedor.DtResultados.Rows(0)("CveUsuarioEvaluador").ToString()) + ChkAplicarEvaluacion.Checked = If(ObjProveedor.DtResultados.Rows(0)("AplicarEvaluacion").ToString = "True", True, False) + TxtFechaEva.Text = If(IsDate(ObjProveedor.DtResultados.Rows(0)("FechaEvaluacion").ToString()), ObjProveedor.DtResultados.Rows(0)("FechaEvaluacion").ToString().ToDate().ToString("dd/MM/yyyy"), "") + LblFechaUltimaEvaluacion.Text = If(IsDate(ObjProveedor.DtResultados.Rows(0)("FechaUltimaEvaluacion").ToString()), ObjProveedor.DtResultados.Rows(0)("FechaUltimaEvaluacion").ToString().ToDate().ToString("dd/MM/yyyy"), "") + DdlCicloEvaluacion.SelectedValueExist(ObjProveedor.DtResultados.Rows(0)("CicloEvaluacion").ToString()) + DdlUsuarioEvaluador.SelectedValueExist(ObjProveedor.DtResultados.Rows(0)("CveUsuarioEvaluador").ToString()) - DdlConfianzaProveedor.SelectedValueExist(ObjProveedor.DtResultados.Rows(0)("CveConfianzaProveedor")) + DdlConfianzaProveedor.SelectedValueExist(ObjProveedor.DtResultados.Rows(0)("CveConfianzaProveedor")) - DdlCveClasificacionProveedor.SelectedValue = ObjProveedor.CveProveedorClasificacion.ToString() - DdlCveUsuarioResponsable.SelectedValue = ObjProveedor.CveUsuarioResponsable.ToString - DdlCveTipoProveedor.SelectedValue = ObjProveedor.CveTipoProveedor.ToString + DdlCveClasificacionProveedor.SelectedValue = ObjProveedor.CveProveedorClasificacion.ToString() + DdlCveUsuarioResponsable.SelectedValue = ObjProveedor.CveUsuarioResponsable.ToString + DdlCveTipoProveedor.SelectedValue = ObjProveedor.CveTipoProveedor.ToString - 'EMD: Si no es prisila desablita este campo - If UsuarioActual.CveEmpresa = 13 AndAlso Not UsuarioActual.CveUsuario.Contiene(58, 100) Then - DdlCveTipoProveedor.Enabled = False - DdlCveTipoProveedor.Attributes.Add("disabled", "disabled") - End If + 'EMD: Si no es prisila desablita este campo + If UsuarioActual.CveEmpresa = 13 AndAlso Not UsuarioActual.CveUsuario.Contiene(58, 100) Then + DdlCveTipoProveedor.Enabled = False + DdlCveTipoProveedor.Attributes.Add("disabled", "disabled") + End If - If TxtRazonSocial.Text.Trim = TxtNombreComercial.Text.Trim Then TxtRazonSocial.Attributes.Add("onKeyUp", "SetText(" & TxtRazonSocial.ClientID & ", " & TxtNombreComercial.ClientID & ")") + If TxtRazonSocial.Text.Trim = TxtNombreComercial.Text.Trim Then TxtRazonSocial.Attributes.Add("onKeyUp", "SetText(" & TxtRazonSocial.ClientID & ", " & TxtNombreComercial.ClientID & ")") - If UsuarioActual.TienePermisoProceso(87) Then BtnGuardar.Visible = True 'Actualizar Proveedor - If UsuarioActual.TienePermisoProceso(86) Then BtnEliminar.Visible = True ' Eliminar Proveedor - If UsuarioActual.TienePermisoProceso(256) Then LnkParametros.Visible = True 'Actualizar Límite de Crédito + If UsuarioActual.TienePermisoProceso(87) Then BtnGuardar.Visible = True 'Actualizar Proveedor + If UsuarioActual.TienePermisoProceso(86) Then BtnEliminar.Visible = True ' Eliminar Proveedor + If UsuarioActual.TienePermisoProceso(256) Then LnkParametros.Visible = True 'Actualizar Límite de Crédito - Retorno = True + Retorno = True - ' enviaractivacion() + ' enviaractivacion() - CargaEventoBitacora() + CargaEventoBitacora() - Else + Else Alert("El Proveedor Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia) - BtnGuardar.Enabled = False - ' LbAgregarSucursal.Enabled = False + BtnGuardar.Enabled = False + ' LbAgregarSucursal.Enabled = False - End If - End If + End If + End If - CargaProveedorSucursales() + CargaProveedorSucursales() - CargaContactos(ObjProveedor) + CargaContactos(ObjProveedor) - ObjProveedor.Dispose() - Return Retorno - End Function + ObjProveedor.Dispose() + Return Retorno + End Function Private Sub CargaUsuarioEvaluacionProveedor() DdlUsuarioEvaluador.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa) DdlUsuarioEvaluador.DataBind() @@ -1115,7 +1121,7 @@ Partial Class Compras_Proveedores CountAnticipos = ObjMovtos.DtResultados.FiltraParametros(" Tipo = 'Act' AND TipoDocto <> '' AND (CveCompra > 0 OR CveIE > 0) ").Rows.Count - LblVencidoPesosAnt.Text = String.Format("{0}", ObjMovtos.DtResultados.SUM("Saldo", "CveMoneda = 1 And DiasVencidos > 0")).FormatoNumero + LblVencidoPesosAnt.Text = String.Format("{0}", ObjMovtos.DtResultados.SUM("Saldo", "CveMoneda = 1 And DiasVencidos > 0")).FormatoNumero LblTotalPesosAnt.Text = String.Format("{0}", ObjMovtos.DtResultados.SUM("Saldo", "CveMoneda = 1 ")).FormatoNumero LblPorVencerPesosAnt.Text = CType(LblTotalPesosAnt.Text.ToDouble - LblVencidoPesosAnt.Text.ToDouble, String).FormatoNumero @@ -1848,7 +1854,10 @@ Partial Class Compras_Proveedores DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, ChkEstado.Checked, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, CveProveedor, DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text, - CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then + CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, + IdCtaContProveedores:=DdlCtaContProveedores.SelectedValue.ToEntero, CtaContProveedores:=DdlCtaContProveedores.SelectedItem.Text, + IdCtaContExtranjera:=DdlCtaContExtranjera.SelectedValue.ToEntero, CtaContExtranjera:=DdlCtaContExtranjera.SelectedItem.Text, + IdCtaContComplementaria:=DdlCtaContComplementaria.SelectedValue.ToEntero, CtaContComplementaria:=DdlCtaContComplementaria.SelectedItem.Text) Then GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing From b3c80bd8ad367807e07ae835e8311c0c2e38798d Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 26 Aug 2023 15:41:19 -0700 Subject: [PATCH 072/111] -- doble parametro para antiguedad --- App_Code/LogicNominas.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index ba91cbbbd..a6dcf91e0 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -164,8 +164,7 @@ Public Class LogicNominas 'Else totalDb = drow("Total").ToString().ToDecimal() subTotalDb = drow("SubTotal").ToString().ToDecimal() - 'End If - cfdi.Nomina.Antiguedad = drow("Antiguedad").ToString().ToEntero() + 'End If cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal() Serie = objNomina.Serie Folio = objNomina.Folio.ToString() From 4f1ed65b6d25f0758227e80e17a57ddffcdc5d2a Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 26 Aug 2023 15:41:52 -0700 Subject: [PATCH 073/111] iva de importaciones, para E119, que solosea XEXX --- Compras/Compras.aspx.vb | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 7fa15a309..f618ce353 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -254,6 +254,7 @@ Partial Class Compras_Compras Return ViewState("NombreProveedor").ToString End Get End Property + Private Property IdPoliza As Integer Get Return ViewState("IdPoliza").ToString.ToEntero @@ -809,12 +810,12 @@ Partial Class Compras_Compras End Set End Property - Private Property RFCProv As String + Private Property RFCProveedor As String Get - Return IfNull(ViewState("RFCProv"), "").ToString + Return IfNull(ViewState("RFCProveedor"), "").ToString End Get Set(value As String) - ViewState("RFCProv") = value + ViewState("RFCProveedor") = value End Set End Property @@ -1087,7 +1088,7 @@ Partial Class Compras_Compras Modalidad = "" Version = "4.0" CveMetodoPago = -1 - RFCProv = "" + RFCProveedor = "" CargaDdlTipoGasto() CreaTmpAcarreos() EsContado = False @@ -1755,7 +1756,7 @@ Partial Class Compras_Compras CargaPSAlias() RFC = dr("RFCDe").ToString - RFCProv = RFC + RFCProveedor = RFC TxtFecha.Text = dr("FechaFactura").ToString.ToDate.ToShortDateString TxtSerie.Text = dr("Serie").ToString TxtFolio.Text = dr("Folio").ToString @@ -2040,7 +2041,7 @@ Partial Class Compras_Compras If Cambio Then DdlRetIVAConcepto.Items.Clear() - If RFCProv.Length = 13 Then ' personal fisica + If RFCProveedor.Length = 13 Then ' personal fisica If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) End If @@ -2067,7 +2068,7 @@ Partial Class Compras_Compras - ElseIf RFCProv.Length = 12 Then ' persona moral + ElseIf RFCProveedor.Length = 12 Then ' persona moral If DIOTCveTipoOperacion = 1 Then '03 - Prestación de Servicios Profesionales DdlRetIVAConcepto.Items.Insert(0, New ListItem("Honorarios/Serv. Prof.", "1")) End If @@ -3227,7 +3228,6 @@ Partial Class Compras_Compras CveTipoConcepto = ObjProveedor.CveTipoProveedor ViewState("NombreProveedor") = ObjProveedor.RazonSocial - HdnCveProveedor.Value = ObjProveedor.CveProveedor.ToString If ObjProveedor.EditarFolioDuplicado Then @@ -3282,7 +3282,7 @@ Partial Class Compras_Compras ViewState("CveProveedor") = ObjProveedor.CveProveedor HdnCveProveedor.Value = ObjProveedor.CveProveedor.ToString TxtFechaPago.Text = (TxtFecha.Text.ToDate.AddDays(LblDiasCredito.Text.ToEntero)).ToShortDateString - RFCProv = ObjProveedor.RFC + RFCProveedor = ObjProveedor.RFC CveRegimenFiscalProveedor = ObjProveedor.CveRegimenFiscal @@ -3300,7 +3300,7 @@ Partial Class Compras_Compras If (CalRetIVAPor).RoundSQL(2) = 0.04 Then '4 Fletes - If RFCProv.Length = 13 Then + If RFCProveedor.Length = 13 Then DdlRetIVAConcepto.SelectedValueExist("2") Else DdlRetIVAConcepto.SelectedValueExist("3") @@ -5869,7 +5869,14 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, PorcentajeImpuesto = PorcentajeIVA If chkImportacion.Checked Then - ConceptoContable = 287 + If UsuarioActual.CveEmpresa = 119 Then 'solo si tene rfc Generico extranjero es considerado en importación + If RFCProveedor = "XEXX010101000" Then + ConceptoContable = 287 + End If + Else + ConceptoContable = 287 + End If + End If 'si aplica NC sobre mov de almacen, el impuesto lo toma de la Factura.para la consideracion de mcia en tránsito From 20cc4a84ea7fbb017ffe8afe582ae96ce613844f Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 28 Aug 2023 06:58:45 -0700 Subject: [PATCH 074/111] =?UTF-8?q?--=20definici=C3=B3n=20de=20variables?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/CatAutorizacionLimites.aspx.vb | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Ventas/CatAutorizacionLimites.aspx.vb b/Ventas/CatAutorizacionLimites.aspx.vb index b02c3a4db..a20ae2377 100644 --- a/Ventas/CatAutorizacionLimites.aspx.vb +++ b/Ventas/CatAutorizacionLimites.aspx.vb @@ -95,8 +95,8 @@ Partial Class Ventas_CatAutorizacionLimites Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero() - Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero() + Dim CveAutorizacion As Integer = gvRow.DataKey("CveAutorizacion").ToEntero() + Dim CveCliente As Integer = gvRow.DataKey("CveCliente").ToEntero() Dim ObjGral As New ClsVentas If ObjGral.RemoveAutorizacionLimite(CveAutorizacion, CveCliente) Then @@ -208,19 +208,19 @@ Partial Class Ventas_CatAutorizacionLimites Protected Sub LnkAutorizar_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - Dim TipoAutorizacion = gvRow.DataKey("TipoAutorizacion").ToEntero() - Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero() - Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero() - Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero() + Dim TipoAutorizacion As Integer = gvRow.DataKey("TipoAutorizacion").ToEntero() + Dim CveAutorizacion As Integer = gvRow.DataKey("CveAutorizacion").ToEntero() + Dim CveCliente As Integer = gvRow.DataKey("CveCliente").ToEntero() + Dim CveVendedor As Integer = gvRow.DataKey("CveVendedor").ToEntero() Dim CveEstatusAutorizacion As Integer = 1 - Dim Importe = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2) + Dim Importe As Decimal = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2) 'AUTORIZACION DE IMPORTE, 'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo) If TipoAutorizacion = 1 Then - Dim SaldoCliente = gvRow.DataKey("Saldo").ToDecimal() - Dim LimiteCredito = gvRow.DataKey("LimiteCredito").ToDecimal() + Dim SaldoCliente As Decimal = gvRow.DataKey("Saldo").ToDecimal() + Dim LimiteCredito As Decimal = gvRow.DataKey("LimiteCredito").ToDecimal() 'SI EL LIMITE ES 0, PERMITE AUTORIZAR If LimiteCredito > 0 Then Dim PorcentajeMaximoAutorizar As Decimal = 0.1D @@ -240,11 +240,11 @@ Partial Class Ventas_CatAutorizacionLimites 'AUTORIZACION POR DIAS VENCIDOS ElseIf TipoAutorizacion = 2 Then - Dim DiasVencidos = gvRow.DataKey("DiasVencidos").ToEntero() + Dim DiasVencidos As Integer = gvRow.DataKey("DiasVencidos").ToEntero() If DiasVencidos > 0 Then Dim DiasVencidosPermitidos As Integer = 5 - Dim DiasVencidosAutorizacion = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero() + Dim DiasVencidosAutorizacion As Integer = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero() If DiasVencidos > DiasVencidosAutorizacion Then Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. Dias Vencidos: {DiasVencidos:N0}", TipoMensaje.MsgAdvertencia) @@ -273,10 +273,10 @@ Partial Class Ventas_CatAutorizacionLimites Protected Sub LnkRechazar_Click(sender As Object, e As EventArgs) Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) - Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero() - Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero() - Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero() - Dim Importe = gvRow.DataKey("Importe").ToDecimal() + Dim CveAutorizacion As Integer = gvRow.DataKey("CveAutorizacion").ToEntero() + Dim CveCliente As Integer = gvRow.DataKey("CveCliente").ToEntero() + Dim CveVendedor As Integer = gvRow.DataKey("CveVendedor").ToEntero() + Dim Importe As Decimal = gvRow.DataKey("Importe").ToDecimal() Dim CveEstatusAutorizacion As Integer = 3 Dim ObjVentas As New ClsVentas @@ -355,7 +355,7 @@ Partial Class Ventas_CatAutorizacionLimites StrFiltro.AppendFormat(", Fecha Fin: {0}", fechaFin) 'Oculta columnas en export sin afectar GridView en página - Dim tcols = GvDatos.Columns.Count + Dim tcols As Integer = GvDatos.Columns.Count GvDatos.HeaderRow.Cells(tcols - 2).Visible = False 'Autorizar/Rechazar GvDatos.HeaderRow.Cells(tcols - 1).Visible = False 'Eliminar From 71d8e44773d0a098e2702ae98ad38de72e42fb1f Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 28 Aug 2023 06:58:52 -0700 Subject: [PATCH 075/111] -- option strict on --- Finanzas/RepRazonesFinancieras.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Finanzas/RepRazonesFinancieras.aspx.vb b/Finanzas/RepRazonesFinancieras.aspx.vb index c60ee1df3..aee1513bd 100644 --- a/Finanzas/RepRazonesFinancieras.aspx.vb +++ b/Finanzas/RepRazonesFinancieras.aspx.vb @@ -217,7 +217,7 @@ Partial Class Finanzas_RepRazonesFinancieras If i = index Then serie.name = row(i).ToString() Else - Dim actual = row(i).ToString().ToDouble + Dim actual As Double = row(i).ToString.ToDouble serie.data.Add(actual) anterior = actual 'If Not G1 OrElse (actual >= anterior) Then @@ -415,7 +415,7 @@ Partial Class Finanzas_RepRazonesFinancieras End Sub Protected Sub GVDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then - For i = 1 To e.Row.Cells.Count - 1 + For i As Integer = 1 To e.Row.Cells.Count - 1 'Mind that i used i=1 not 0 because the width of cells(0) has already been set Dim cell2 As TableCell = e.Row.Cells(i) cell2.CssClass = "ceros" From fd6bd430de6f7f2cb7e08028578e0582b1f1bfd6 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 28 Aug 2023 07:41:15 -0700 Subject: [PATCH 076/111] - option --- Compras/ReembolsosComprobaciones.aspx.vb | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 5745265db..4aa5f3843 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -218,7 +218,7 @@ Partial Class Compras_ReembolsosComprobaciones CveMonedaPago = ObjIE.CveMoneda TipoCambioPago = ObjIE.TipoCambio - Dim IndexCheque = If(UsuarioActual.TienePermisoProceso(113), DDlCheques.SelectedIndex - 1, DDlCheques.SelectedIndex) + Dim IndexCheque As Integer = If(UsuarioActual.TienePermisoProceso(113), DDlCheques.SelectedIndex - 1, DDlCheques.SelectedIndex) TxtChequeSaldo.Text = DtCheques.Rows(DDlCheques.SelectedIndex - 1)("Saldo").ToString.FormatoNumero @@ -484,7 +484,7 @@ Partial Class Compras_ReembolsosComprobaciones Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos Dim filemove As String = "" Dim Comprobante As String = "" - Dim ComprobanteIE = "" + Dim ComprobanteIE As String = "" For Each fileItem As Archivo In filesgral Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") @@ -498,7 +498,7 @@ Partial Class Compras_ReembolsosComprobaciones CvePrePolizaIERegistrado = ObjMov.AddPrePolizas("Compras/Comprobaciones1", 9, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal, CveMoneda, TxtFechaPrePoliza.Text.ToDate, If(TxtObservaciones.Text.Trim = "", concepto, TxtObservaciones.Text.Trim), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveCajaChica > 0 Then - Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString + Dim FolioIENew As String = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporteVinculado.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False)) 'AGREGO PREPOLIZA IE BANCOS If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaIERegistrado, True, TxtImporteVinculado.Text.ToDecimal, TxtImporteVinculado.Text.ToDecimal * tipoCambio, 30, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtObservaciones.Text, CveIE:=CveIECajaChica, ImporteME:=If(tipoCambio = 1, 0, TxtImporteVinculado.Text.ToDecimal)) Then @@ -563,7 +563,7 @@ Partial Class Compras_ReembolsosComprobaciones 'SI ES CAJA CHICA REGISTRO IE CAJA CHICA If CveCajaChica > 0 Then - Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString + Dim FolioIENew As String = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 8).ToString CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 8, TxtFechaDocumento.Text.Trim.ToDate, FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False)) 'AGREGO PREPOLIZA IE BANCOS @@ -587,7 +587,7 @@ Partial Class Compras_ReembolsosComprobaciones 'SI ES CAJA CHICA REGISTRO IE CAJA CHICA If CveCajaChica > 0 Then - Dim FolioIENew = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 2).ToString + Dim FolioIENew As String = ObjIE.GetNextFolio(If(CveCajaChica > 0, CveCajaChica, CvePersonal), 2).ToString CveIECajaChica = ObjIE.AddBancos_IE(CveCajaChica, 2, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.Trim.ToDate), FolioIENew, String.Format("Transferencia Cta: {0}", DdlCajaChica.SelectedItem), TxtImporte.Text.ToDecimal, CveMoneda, 0, TxtObservaciones.Text.Trim, "", False, False, -1, CvePrePolizaIERegistrado, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False)) '8 'AGREGO PREPOLIZA IE BANCOS @@ -605,13 +605,13 @@ Partial Class Compras_ReembolsosComprobaciones If CveIERegistrado > 0 Or CveIEExcedente > 0 Or ChkReembolsarSinBancos.Checked Then 'inserto los movimientos de la conta para abonar al saldo If ((TxtImporte.Text.ToDecimal > 0 Or ChkReembolsarSinBancos.Checked) And CvePrePolizaIERegistrado > 0) Or ((TxtImporteVinculado.Text.ToDecimal > 0 And HdnCheque.Value.ToEntero > 0) Or ChkReembolsarSinBancos.Checked) Then - Dim SaldoCheque = If(HdnCheque.Value.ToEntero > 0, TxtChequeSaldo.Text.ToDecimal, TxtImporte.Text.ToDecimal) + Dim SaldoCheque As Decimal = If(HdnCheque.Value.ToEntero > 0, TxtChequeSaldo.Text.ToDecimal, TxtImporte.Text.ToDecimal) Dim PorcentajePago As Decimal = 1 Dim FechaMovimiento As Date = TxtFechaDocumento.Text.ToDate Dim CvePrePolizaUnificar As Integer = 0 - Dim SeUnifico = False + Dim SeUnifico As Boolean = False 'inserto las compras que voy a pagar For Each gvr As GridViewRow In GvCxP.Rows @@ -660,7 +660,7 @@ Partial Class Compras_ReembolsosComprobaciones 'registramos el nuevo IE If CveCajaChica > 0 Then CveIEPago = 0 - Dim FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString + Dim FolioIENew As String = ObjIE.GetNextFolio(CveCajaChica, 6).ToString CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.ToDate), FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False)) TipoCambioPago = 1 Else @@ -735,7 +735,7 @@ Partial Class Compras_ReembolsosComprobaciones 'registramos el nuevo IE If CveCajaChica > 0 Then CveIEPago = 0 - Dim FolioIENew = ObjIE.GetNextFolio(CveCajaChica, 6).ToString + Dim FolioIENew As String = ObjIE.GetNextFolio(CveCajaChica, 6).ToString CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, TxtFechaPrePoliza.Text.ToDate, FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False)) TipoCambioPago = 1 End If @@ -798,9 +798,6 @@ Partial Class Compras_ReembolsosComprobaciones End If End If Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" - If UsuarioActual.CveEmpresa = 119 Then - AutoConta = False - End If If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1, AutoConta:=AutoConta) Then If ObjMov.ValorPolizaDescuadre > 0 Then From b9d2f2d57ec88839a808def89b0d2d9833bb61c6 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 28 Aug 2023 10:45:06 -0700 Subject: [PATCH 077/111] option explicit on --- App_Code/ClsAF.vb | 2 +- App_Code/ClsBancos.vb | 4 +- App_Code/ClsCompras.vb | 36 +++--- App_Code/ClsContPAQi.vb | 116 ++++++++--------- App_Code/ClsContabilidad.vb | 199 +++++++++++++++--------------- App_Code/ClsContratos.vb | 106 +++++++--------- App_Code/ClsGPS.vb | 8 +- App_Code/ClsGPSHerramientas.vb | 2 +- App_Code/ClsGenerales.vb | 6 +- App_Code/ClsOC.vb | 2 +- App_Code/ClsOIEventos.vb | 2 +- App_Code/ClsPaginas.vb | 104 ++++++++-------- App_Code/ClsProductosServicios.vb | 3 +- App_Code/ClsProyectos.vb | 2 +- App_Code/ClsRH.vb | 4 +- App_Code/ClsSAT.vb | 2 +- App_Code/ClsSisUsuarios.vb | 11 +- App_Code/ClsValidaCFDi.vb | 2 +- App_Code/ClsVentas.vb | 27 ++-- 19 files changed, 300 insertions(+), 338 deletions(-) diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index e767e84c3..61265c606 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -776,7 +776,7 @@ Public Class ClsAF Public Function ActivoFijoResguardoADD(FechaInicio As Date, CvePersonal As Integer, CveUsuario As Integer, CveSubProyecto As Integer, CveActivoFijo As Integer, TipoDocto As String, Tipo As Integer, CveEmpresa As Integer, Optional Observaciones As String = " ", Optional CveResguardo As Integer = -1) As Boolean 'Dim CveResguardo As Integer = -1 - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_AF_ActivosFijosResguardosAdd") With SqlAdapter.SelectCommand.Parameters diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 511993a15..25f50de6a 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -2532,7 +2532,7 @@ Public Class ClsBancos OtrosGastos As Double, CveProveedor As Integer, ClasificacionContable As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveCuentaTarjeta As Integer = -1, Optional AplicaAnticipo As Boolean = False, Optional CreditoAnticipo As Double = 0.0, Optional ComisionAnticipo As Double = 0.0, Optional SeguroAnticipo As Double = 0.0, Optional OtrosGastosAnticipo As Double = 0.0, Optional FondoGarantia As Double = 0.0, Optional SeguroValor As Double = 0.0, Optional TipoInteres As Boolean = False) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 DataAdapter("PA_Banc_CreditosAdd") @@ -3074,7 +3074,7 @@ Public Class ClsBancos Return Retorno End Function Public Function AddLayoutEnvios(Archivo As String, Fecha As Date, CveCuenta As Integer, Optional PorGrupos As Boolean = False) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 DataAdapter("PA_Banc_LayoutEnviosAdd") diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 65c7ac3e5..57a586ee2 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -1295,7 +1295,7 @@ Public Class ClsCompras #Region "I M P O R T A C I O N E S" Public Function GetImportaciones(CveImportacion As Integer, CveProveedor As Integer, CveActivoFijo As Integer, FechaInicio As String, FechaFin As String, CveEmpresa As Integer, Optional CveEstatus As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesGet") @@ -1320,7 +1320,7 @@ Public Class ClsCompras End Function Public Function AddImportacion(Pedimento As String, Descripcion As String, CveProveedor As Integer, CveActivoFijo As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 DataAdapter("PA_Comp_ImportacionesAdd") @@ -1346,7 +1346,7 @@ Public Class ClsCompras End Function Public Function UpdateImportacion(Pedimento As String, CveImportacion As Integer, Descripcion As String, CveProveedor As Integer, CveActivoFijo As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesUpdate") @@ -1372,7 +1372,7 @@ Public Class ClsCompras End Function Public Function RemoveImportacion(CveImportacion As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesRemove") @@ -1391,7 +1391,7 @@ Public Class ClsCompras End Function Public Function GetImportacionCompra(CveCompra As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesCompraGet") @@ -1410,7 +1410,7 @@ Public Class ClsCompras End Function Public Function GetImportacionesDetalle(CveImportacion As Integer, CveImportacionDetalle As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesDetalleGet") @@ -1430,7 +1430,7 @@ Public Class ClsCompras End Function Public Function AddImportacionDetalle(CveImportacion As Integer, CveCompra As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesDetalleAdd") @@ -1450,7 +1450,7 @@ Public Class ClsCompras End Function Public Function UpdateImportacionDetalle(CveImportacionDetalle As Integer, CveCompra As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesDetalleUpdate") @@ -1470,7 +1470,7 @@ Public Class ClsCompras End Function Public Function RemoveImportacionDetalle(CveImportacionDetalle As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesDetalleRemove") @@ -1489,7 +1489,7 @@ Public Class ClsCompras End Function Public Function AddImportacionCompra(CveImportacion As Integer, CveCompra As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesCompraAdd") With SqlAdapter.SelectCommand.Parameters .Add("@CveImportacion", SqlDbType.Int).Value = CveImportacion @@ -1505,7 +1505,7 @@ Public Class ClsCompras End Function Public Function RemoveImportacionCompra(CveImportacionCompra As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesCompraRemove") With SqlAdapter.SelectCommand.Parameters .Add("@CveImportacionCompra", SqlDbType.Int).Value = CveImportacionCompra @@ -1520,7 +1520,7 @@ Public Class ClsCompras End Function Public Function GetImportacionCompras(Optional CveImportacion As Integer = -1, Optional CveCompra As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_ImportacionesComprasGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveImportacion", SqlDbType.Int).Value = CveImportacion @@ -1563,7 +1563,7 @@ Public Class ClsCompras #Region "B E N E F I C I A R I O S" Public Function GetBeneficiarios(CveProveedor As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_BeneficiariosGet") @@ -1584,7 +1584,7 @@ Public Class ClsCompras Public Function GetBeneficiarios2(CveProveedor As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_BeneficiariosGet2") @@ -1605,7 +1605,7 @@ Public Class ClsCompras Public Function GetBeneficiariosDetalle(CveProveedor As Integer, Tipo As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_BeneficiariosDetalleGet") @@ -1630,7 +1630,7 @@ Public Class ClsCompras #Region "N O T A S - C R E D I T O" Public Function GetNotasCreditoRep(CveProveedor As Integer, Opcion As Integer, FechaI As String, FechaF As String, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Comp_RepNotasCredito") @@ -1775,7 +1775,7 @@ Public Class ClsCompras CveEmpresa As Integer, PreFijo As String) As Integer Dim Retorno As Integer = -1 - Dim StrSQL = New StringBuilder() + Dim StrSQL As StringBuilder = New StringBuilder() StrSQL.Append(" BEGIN ") StrSQL.Append(" DECLARE @tTotal INT; ") StrSQL.Append(" ") @@ -1832,7 +1832,7 @@ Public Class ClsCompras Return Retorno End Function Public Function UpdateArchivo(CveFactura As Integer, Columna As String) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False Dim Str As String = "" If Columna = "XML" Then Str = "UPDATE Comp_Facturas SET XML = CONCAT(@CveFactura,'.xml') WHERE CveFactura = @CveFactura" diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index f0169db98..1e8ddfe32 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -1040,7 +1040,7 @@ Public Class ClsContPAQi End Function Public Function GetNumeroPoliza(TipoPoliza As Integer, Fecha As String) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 If Not FNC_GetNumPoliza() Then Return Retorno End If @@ -3345,8 +3345,6 @@ Public Class ClsContPAQi #End Region #Region " C U E N T A S " - - Public Function GetCuentas(IdCuenta As Integer, Codigo As String, Afectable As Integer, Optional RowNum As Integer = 100000, Optional IdPadre As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -3685,7 +3683,7 @@ Public Class ClsContPAQi #Region "P R E S U P U E S T O - I N G R E S O S " Public Function GetPresupuestoIngresosRep(Ejercicio As Integer, Fecha As Date, Gpo As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_PresupuestosIngresosRep") @@ -3706,7 +3704,7 @@ Public Class ClsContPAQi End Function Public Function GetPresupuestoIngresosMensualesRep(Ejercicio As Integer, MomentoContable As Integer, CveFuenteRecaudacion As Integer, CveRubroIngreso As Integer, GPO As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_PresupuestosIngresosMensualesRep") @@ -3735,7 +3733,7 @@ Public Class ClsContPAQi Public Function GetBalanceGeneral(FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional UsaAC As Boolean = False, Optional IdCuentaAhorroDesahorro As Integer = 9999, Optional SegmentoNegocio As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False Dim IdCtaSup As String = "" Dim IdCtaSup2 As String = "" @@ -3910,7 +3908,7 @@ Public Class ClsContPAQi End Function Public Function BalanceGeneral(FechaF As Date, Optional TipoMovtos As Integer = -1, Optional UsaAcumulado As Integer = 0, Optional NivelInferior As Integer = -2, Optional NivelInferior2 As Integer = -2, Optional NivelSuperior As Integer = 2) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_BalanceGeneralIP") @@ -3933,7 +3931,7 @@ Public Class ClsContPAQi End Function Public Function GetBalanceGeneralMensual(ANO As Integer, TipoMovtos As Integer, SubTotales As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_TotalMensualBG() Then Return Retorno @@ -4459,7 +4457,7 @@ Public Class ClsContPAQi End Function Public Function GetBalanceGeneralAnual(ANO As Integer, TipoMovtos As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_TotalAnual() Then Return Retorno @@ -4833,7 +4831,7 @@ Public Class ClsContPAQi End Function Public Function GetBalanceGeneralProForma(Unidad As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_BalanceGeneralProForma") @@ -4855,7 +4853,7 @@ Public Class ClsContPAQi #Region "E S T A D O - D E - A C T I V I D A D E S" Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, Optional TipoMovtos As Integer = -1, Optional UsaAC As Boolean = False, Optional IdSegNeg As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_TotalComplementaria(UsaAC) Then Return Retorno @@ -4973,7 +4971,7 @@ Public Class ClsContPAQi End Function Public Function GetEstadoActividadesSegmento(FechaI As Date, FechaF As Date, TipoMovtos As Integer, IdSegNeg As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_TotalComplementaria(False) Then Return Retorno @@ -5135,7 +5133,7 @@ Public Class ClsContPAQi End Function Public Function GetEstadoActividadesSegmentoDetalle(FechaI As Date, FechaF As Date, IdCta As Integer, IdsSegmentos As String) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_TotalComplementaria(False) Then Return Retorno @@ -5297,7 +5295,7 @@ Public Class ClsContPAQi End Function Public Function GetEstadoResultadosMensual(ANO As Integer, TipoMovtos As Integer, Optional IdSegNeg As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_TotalMensual() Then Return Retorno @@ -5868,7 +5866,7 @@ Public Class ClsContPAQi ' Return Retorno 'End Function Public Function GetEstadoResultadosAnual(ANO As Integer, TipoMovtos As Integer, Optional IdSegNeg As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_TotalAnual() Then Return Retorno @@ -6135,7 +6133,7 @@ Public Class ClsContPAQi End Function Public Function GetEstadoResultadosProForma(Unidad As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_EstadoResultadosProForma") @@ -6157,7 +6155,7 @@ Public Class ClsContPAQi #Region "E S T A D O - A N A L Í T I C O - D E L - A C T I V O" Public Function GetEstadoAnaliticoActivo(FechaI As Date, FechaF As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_Total() Then Return Retorno @@ -6228,10 +6226,8 @@ Public Class ClsContPAQi #Region "A N E X O - D E L - C A T A L O G O" - - Public Function GetAnexoCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, Optional TipoMovtos As Integer = -1, Optional SegmentoNegocio As Integer = -1, Optional UsaAC As Boolean = False) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_TotalComplementaria(UsaAC) Then Return Retorno @@ -6318,7 +6314,7 @@ Public Class ClsContPAQi ''Esta es Public Function GetAnexoCatalogoMes(IdCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, Optional TipoMovtos As Integer = -1, Optional SegmentoNegocio As Integer = -1, Optional UsaAC As Boolean = False) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_TotalComplementaria(UsaAC) Then Return Retorno @@ -6510,7 +6506,7 @@ Public Class ClsContPAQi #Region "B A L A N Z A - D E - C O M P R O B A C I O N" Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_Total() Then Return Retorno @@ -6669,7 +6665,7 @@ Public Class ClsContPAQi #Region "M O V I M I E N T O S - A U X I L I A R E S - C A T A L O G O" Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, Optional IdSegNeg As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False If Not FNC_Total_Segmento() Then Return Retorno @@ -6870,7 +6866,7 @@ Public Class ClsContPAQi #Region "E S T A D O - D E - F L U J O - D E - E F E C T I V O " Public Function GetFlujoEfectivo(FechaI As Date, FechaF As Date, Unidad As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_RepFlujoEfectivo") @@ -6893,7 +6889,7 @@ Public Class ClsContPAQi #Region "E S T A D O - D E - C A M B I O - D E - S I T U A C I O N - F I N A N C I E R A" Public Function GetCambioSituacionFinanciera(FechaI As Date, FechaF As Date, Unidad As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_RepCambioSituacionFinanciera") @@ -6916,7 +6912,7 @@ Public Class ClsContPAQi #Region "E S T A D O - D E - V A R I A C I O N - H A C I E N D A - P U B L I C A " Public Function GetVariacionHaciendaPublica(FechaI As Date, FechaF As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False 'StrSQL.Clear() @@ -6993,7 +6989,7 @@ Public Class ClsContPAQi #Region " O R I G E N - Y - A P L I C A C I O N " Public Function GetOrigenAplicacion(FechaI As Date, FechaF As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_RepOrigenAplicacion") @@ -7012,7 +7008,7 @@ Public Class ClsContPAQi Return Retorno End Function Public Function GetOrigenAplicacionMensual(Ejercicio As Integer, TipoMovtos As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_RepOrigenAplicacionMensual") @@ -7031,7 +7027,7 @@ Public Class ClsContPAQi Return Retorno End Function Public Function GetOrigenAplicacionAnual(Ejercicio As Integer, TipoMovtos As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_RepOrigenAplicacionAnual") @@ -7053,7 +7049,7 @@ Public Class ClsContPAQi #Region " P O L I Z A S - C O M P L E M E N T A R I A S " Public Function BalanceGeneralGet(TipoReporte As Integer, FechaI As Date, FechaF As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_Conta_BalanceGeneralGet") @@ -7073,7 +7069,7 @@ Public Class ClsContPAQi Return Retorno End Function Public Function EstadoResultadosGet(TipoReporte As Integer, FechaI As Date, FechaF As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_Conta_EstadoResultadosGet") @@ -7196,7 +7192,7 @@ Public Class ClsContPAQi Return Retorno End Function Public Function GetRepPresupuestosEgresosSaldosDetalle(MomentoContable As Integer, ProgramaOperativo As Integer, FuenteFinanciamiento As Integer, TipoGasto As Integer, UnidadAdministrativa As Integer, ClasificacionOG As Integer, CodigoOG As String, FechaI As Date, FechaF As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_PresupuestosEgresosSaldosDetalleRep") @@ -7249,7 +7245,7 @@ Public Class ClsContPAQi End Function Public Function GetRepPresupuestosIngresosSaldosDetalle(MomentoContable As Integer, FuenteRecaudacion As Integer, RubroIngreso As Integer, FechaI As Date, FechaF As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False SqlDataAdapter("PA_PresupuestosIngresosSaldosDetalleRep") @@ -7509,7 +7505,7 @@ Public Class ClsContPAQi End Function Public Function GetFolioProveedores(CuentaPadre As String) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 SqlDataAdapter("PA_AC_ProveedoresCuentasGetFolio") @@ -8133,8 +8129,8 @@ Public Class ClsContPAQi 'StrSQL.Append(file.OpenText().ReadToEnd()) - Dim file = System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("~/Empresas/TriggerConta.sql")) - Dim Comandos As [String]() = file.Split(New String() {"GO"}, StringSplitOptions.None) + Dim file As String = System.IO.File.ReadAllText(HttpContext.Current.Server.MapPath("~/Empresas/TriggerConta.sql")) + Dim Comandos As String() = file.Split(New String() {"GO"}, StringSplitOptions.None) For Each Script As String In Comandos SqlDataCommand(Script, CommandType.Text) SqlCommand.ExecuteNonQuery() @@ -8559,10 +8555,6 @@ Public Class ClsContPAQi Return Retorno End If - - - 'SqlDataAdapter("PA_AddMovimiento") - StrSQL.Clear() StrSQL.AppendLine(" BEGIN ") StrSQL.AppendLine(" DECLARE @Error nvarchar(300) ") @@ -8685,8 +8677,6 @@ Public Class ClsContPAQi #Region "CONTABILIDAD ELECTRONICA" - - Public Function GetBancos() As Boolean Dim Retorno As Boolean = False @@ -9852,7 +9842,7 @@ Public Class ClsContPAQi Public Function FNC_GetSigno() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_GetSigno') IS NOT NULL DROP FUNCTION FNC_GetSigno") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -9903,7 +9893,7 @@ Public Class ClsContPAQi Public Function FNC_GetNumPoliza() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_GetNumPoliza') IS NOT NULL DROP FUNCTION FNC_GetNumPoliza") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -9963,7 +9953,7 @@ Public Class ClsContPAQi Public Function FNC_GetNumMovtoDevIVA() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_GetNumMovtoDevIVA') IS NOT NULL DROP FUNCTION FNC_GetNumMovtoDevIVA") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10008,7 +9998,7 @@ Public Class ClsContPAQi Public Function FNC_GetNumMovto() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_GetNumMovto') IS NOT NULL DROP FUNCTION FNC_GetNumMovto") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10056,7 +10046,7 @@ Public Class ClsContPAQi Public Function FNC_GetCounter() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False 'StrSQL.Clear() 'StrSQL.Append(" IF OBJECT_ID ('FNC_GetCounter') IS NOT NULL DROP FUNCTION FNC_GetCounter") 'SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10103,7 +10093,7 @@ Public Class ClsContPAQi Public Function FNC_TotalAnualBG() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_TotalAnualBG') IS NOT NULL DROP FUNCTION FNC_TotalAnualBG") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10214,7 +10204,7 @@ Public Class ClsContPAQi Public Function FNC_TotalAnual() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_TotalAnual') IS NOT NULL DROP FUNCTION FNC_TotalAnual") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10327,7 +10317,7 @@ Public Class ClsContPAQi Public Function FNC_TotalMensualBG() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_TotalMensualBG') IS NOT NULL DROP FUNCTION FNC_TotalMensualBG") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10425,7 +10415,7 @@ Public Class ClsContPAQi Public Function FNC_TotalMensual() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_TotalMensual') IS NOT NULL DROP FUNCTION FNC_TotalMensual") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10539,7 +10529,7 @@ Public Class ClsContPAQi Public Function FNC_TotalMensualERSubTotales() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_TotalMensualERSubTotales') IS NOT NULL DROP FUNCTION FNC_TotalMensualERSubTotales") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10656,7 +10646,7 @@ Public Class ClsContPAQi End Function Public Function FNC_TotalComplementaria(UsaAC As Boolean) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_TotalComplementaria') IS NOT NULL DROP FUNCTION FNC_TotalComplementaria") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10847,7 +10837,7 @@ Public Class ClsContPAQi Public Function FNC_CargosComplementaria() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_CargosComplementaria') IS NOT NULL DROP FUNCTION FNC_CargosComplementaria") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -10954,7 +10944,7 @@ Public Class ClsContPAQi Public Function FNC_AbonosComplementaria() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_AbonosComplementaria') IS NOT NULL DROP FUNCTION FNC_AbonosComplementaria") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -11064,7 +11054,7 @@ Public Class ClsContPAQi Public Function FNC_Total() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_Total') IS NOT NULL DROP FUNCTION FNC_Total") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -11141,7 +11131,7 @@ Public Class ClsContPAQi Public Function FNC_Cargos() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_Cargos') IS NOT NULL DROP FUNCTION FNC_Cargos") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -11211,7 +11201,7 @@ Public Class ClsContPAQi Public Function FNC_Abonos() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_Abonos') IS NOT NULL DROP FUNCTION FNC_Abonos") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -11285,10 +11275,9 @@ Public Class ClsContPAQi #Region "Funciones con Segmento" - Public Function FNC_Total_Segmento() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_Total_Segmento') IS NOT NULL DROP FUNCTION FNC_Total_Segmento") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -11366,7 +11355,7 @@ Public Class ClsContPAQi Public Function FNC_Cargos_Segmento() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_Cargos_Segmento') IS NOT NULL DROP FUNCTION FNC_Cargos_Segmento") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -11437,7 +11426,7 @@ Public Class ClsContPAQi Public Function FNC_Abonos_Segmento() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False StrSQL.Clear() StrSQL.Append(" IF OBJECT_ID ('FNC_Abonos_Segmento') IS NOT NULL DROP FUNCTION FNC_Abonos_Segmento") SqlDataAdapter(StrSQL.ToString, CommandType.Text) @@ -11491,9 +11480,6 @@ Public Class ClsContPAQi StrSQL.Append(" END; ") - - - SqlDataAdapter(StrSQL.ToString, CommandType.Text) Try diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 4af8d32d9..f5eaa75ab 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -2989,7 +2989,7 @@ Public Class ClsContabilidad #Region "F I N A N C I A M I E N T O - M E T A S" Public Function AddFinan_Metas(Meta As Decimal, CveCuenta As Integer, Anio As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Finan_MetasAdd") With SqlAdapter.SelectCommand.Parameters @@ -3090,7 +3090,7 @@ Public Class ClsContabilidad #Region "F I N A N C I A M I E N T O - V E N T A S - P R O Y E C C I O N E S" Public Function AddFinan_VentasProyecciones(CvePS As Integer, Cantidad As Double, PU As Double, Fecha As Date, Anio As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Finan_MetasAdd") @@ -3196,7 +3196,7 @@ Public Class ClsContabilidad #Region " CUENTAS " Public Function GetCuentas(CveCuenta As Integer, Codigo As String, Afectable As Integer, CveEmpresa As Integer, Optional RowNum As Integer = 100000, Optional CvePadre As Integer = -1, Optional Nombre As String = "-1") As Boolean ', Codigo As String, Nombre As String, CveClasificacionCuenta As Integer, TipoCuenta As Integer, Afectable As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasGet") With SqlAdapter.SelectCommand.Parameters @@ -3220,7 +3220,7 @@ Public Class ClsContabilidad End Function Public Function GetClasificacionesCuentas() As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_ClasificacionesCuentaGet") With SqlAdapter.SelectCommand.Parameters @@ -3240,7 +3240,7 @@ Public Class ClsContabilidad #Region " EJERCICIOS " Public Function GetEjercicios(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EjerciciosGet") With SqlAdapter.SelectCommand.Parameters @@ -3258,7 +3258,7 @@ Public Class ClsContabilidad End Function Public Function AddEjercicio(Ejercicio As String, PeriodoActual As Integer, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EjerciciosAdd") With SqlAdapter.SelectCommand.Parameters @@ -3279,7 +3279,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function UpdateEjercicio(CveEjercicio As Integer, Ejercicio As String, Estatus As Boolean, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EjerciciosUpdate") With SqlAdapter.SelectCommand.Parameters @@ -3300,7 +3300,7 @@ Public Class ClsContabilidad End Function Public Function RemoveEjercicio(CveEjercicio As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EjerciciosRemove") With SqlAdapter.SelectCommand.Parameters @@ -3324,7 +3324,7 @@ Public Class ClsContabilidad #Region "REPORTE DE CONTABILIDAD" Public Function GetBalanceGeneralMensual(ANO As Integer, TipoMovtos As Integer, SubTotales As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EstadoResultadosMensual") @@ -3351,7 +3351,7 @@ Public Class ClsContabilidad Public Function GetBalanceGeneralAnual(ANO As Integer, TipoMovtos As Integer, CveEmpresa As Integer, CveSubProyecto As String) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_BalanceGeneralAnual") @@ -3375,7 +3375,7 @@ Public Class ClsContabilidad Public Function GetSituacionFinanciera(FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveSubProyecto As String, TipoMovtos As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False 'SqlAdapter.SelectCommand.t @@ -3405,7 +3405,7 @@ Public Class ClsContabilidad Public Function GetSituacionFinanciera2(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False 'SqlAdapter.SelectCommand.t @@ -3436,7 +3436,7 @@ Public Class ClsContabilidad Public Function GetSituacionFinancieraMensuallHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False 'SqlAdapter.SelectCommand.t @@ -3465,7 +3465,7 @@ Public Class ClsContabilidad Public Function GetSituacionFinancieraAnualHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False 'SqlAdapter.SelectCommand.t @@ -3495,7 +3495,7 @@ Public Class ClsContabilidad Public Function GetSituacionFinancieraSubProyectolHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False 'SqlAdapter.SelectCommand.t @@ -3524,7 +3524,7 @@ Public Class ClsContabilidad Public Function GetAnexoCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, OpcionCuentas As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1, Optional SAT As Integer = 0) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_AnexoCatalogoGet") @@ -3551,7 +3551,7 @@ Public Class ClsContabilidad End Function Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet") @@ -3598,7 +3598,7 @@ Public Class ClsContabilidad End Function Public Function GetEstadoActividades(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional SAT As Integer = 0, Optional Opcion As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EstadoActividadesGet") @@ -3625,7 +3625,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, TipoCuentas As Integer, TipoReporte As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional Sat As Integer = 0, Optional NivelCuenta As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_BalanzaComprobacionGet") @@ -3654,7 +3654,7 @@ Public Class ClsContabilidad End Function Public Function GetCambioSituacionFinanciera(FechaI As Date, FechaF As Date, Unidad As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer, Optional ConMovimientos As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_RepCambioSituacionFinanciera") @@ -3679,7 +3679,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetFlujoEfectivo(FechaI As Date, FechaF As Date, Unidad As Integer, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_RepFlujoEfectivo") @@ -3703,7 +3703,7 @@ Public Class ClsContabilidad End Function Public Function GetFlujoEfectivo2(FechaF As Date, Tipo As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_RepFlujoEfectivo2") @@ -3724,7 +3724,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetOrigenAplicacion(FechaI As String, FechaF As String, TipoReporte As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_RepOrigenAplicacion") @@ -3802,7 +3802,7 @@ Public Class ClsContabilidad End Function Public Function GetEstadoResultadosMensual(ANO As Integer, TipoMovtos As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EstadoResultadosMensual") @@ -3824,7 +3824,7 @@ Public Class ClsContabilidad End Function Public Function GetEstadoResultadosAnual(ANO As Integer, TipoMovtos As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EstadoResultadosAnual") @@ -3845,7 +3845,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetOrigenAplicacionMensual(Ejercicio As Integer, TipoMovtos As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_RepOrigenAplicacionMensual") @@ -3868,7 +3868,7 @@ Public Class ClsContabilidad End Function Public Function GetOrigenAplicacionAnual(Ejercicio As Integer, TipoMovtos As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_RepOrigenAplicacionAnual") @@ -3890,7 +3890,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetVariacionHaciendaPublica(FechaI As Date, FechaF As Date, TipoMovtos As Integer, CveSubProyecto As String, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_RepVariacionHaciendaPublica") @@ -3913,7 +3913,7 @@ Public Class ClsContabilidad End Function Public Function GetLibroDiario(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional CveTipoPoliza As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False 'SqlAdapter.SelectCommand.t @@ -3984,7 +3984,7 @@ Public Class ClsContabilidad #Region " REPORTES FINANCIEROS DICIEMBRE 2016 " Public Function GetBalanceGeneralVertical(Ejercicio As Integer, Periodo As Integer, CveSubProyecto As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_BalanceGeneralVerticalGet") @@ -4006,7 +4006,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetBalanceGeneralMensualVertical(Ejercicio As Integer, CveSubProyecto As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_BalanceGeneralVerticalMensualGet") @@ -4027,7 +4027,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetBalanceGeneralAnualVertical(Ejercicio As Integer, CveSubProyecto As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_BalanceGeneralAnualGet") @@ -4049,7 +4049,7 @@ Public Class ClsContabilidad End Function Public Function GetBalanceGeneralMensualHorizontal(Ejercicio As Integer, CveSubProyecto As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_BalanceGeneralHorizontalMensualGet") @@ -4071,7 +4071,7 @@ Public Class ClsContabilidad End Function Public Function GetBalanceGeneralHorizontalCC(Ejercicio As Integer, Periodo As Integer, CveSubProyecto As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_BalanceGeneralHorizontalCCGet") @@ -4093,7 +4093,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetEstadoResultadosVertical(Ejercicio As Integer, Periodo As Integer, CveSubProyecto As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EstadoResultadosVerticalGet") @@ -4115,7 +4115,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetEstadoResultadoMensualHorizontal(Ejercicio As Integer, CveSubProyecto As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EstadoResultadosHorizontalMensual") @@ -4137,7 +4137,7 @@ Public Class ClsContabilidad End Function Public Function GetEstadoResultadosAnualHorizontal(Ejercicio As Integer, CveSubProyecto As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EstadoResultadosHorizontalAnual") @@ -4160,7 +4160,7 @@ Public Class ClsContabilidad Public Function GetEstadoResultadosHorizontalCC(Ejercicio As Integer, Periodo As Integer, CveSubProyecto As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EstadoResultadosHorizontalCCGet") @@ -4183,7 +4183,7 @@ Public Class ClsContabilidad End Function Public Function GetAnexoCatalogoMensual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer, Periodo As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_AnexoCatalogoMensualGet") @@ -4207,7 +4207,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetAnexoCatalogoAnual(CveCuenta As Integer, Ejercicio As Integer, CveSubproyecto As Integer, CveEmpresa As Integer, EjercicioFinal As Integer, Divisor As Integer, CveUsuario As Integer, Periodo As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_AnexoCatalogoAnualGet") @@ -4236,7 +4236,7 @@ Public Class ClsContabilidad End Function Public Function GetAnexoCatalagoCC(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer, Divisor As Integer, CveUsuario As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_AnexoCatalogoCCGet") @@ -4261,7 +4261,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetRepPresupuestosEgresosSaldosDetalle(MomentoContable As Integer, ProgramaOperativo As Integer, FuenteFinanciamiento As Integer, TipoGasto As Integer, UnidadAdministrativa As Integer, ClasificacionOG As Integer, CodigoOG As String, FechaI As Date, FechaF As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_PresupuestosEgresosSaldosDetalleRep") @@ -4288,7 +4288,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetRepPresupuestosIngresosSaldosDetalle(MomentoContable As Integer, FuenteRecaudacion As Integer, RubroIngreso As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_PresupuestosIngresosSaldosDetalleRep") @@ -4311,7 +4311,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetPresupuestoIngresosRep(Ejercicio As Integer, Fecha As Date, Gpo As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_PresupuestosIngresosRep") @@ -4357,7 +4357,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetPresupuestoIngresosMensualesRep(Ejercicio As Integer, MomentoContable As Integer, CveFuenteRecaudacion As Integer, CveRubroIngreso As Integer, GPO As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_PresupuestosIngresosMensualesRep") @@ -4381,7 +4381,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetDependenciasUnidadesResponsables(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_DepUnidadResponsableGET") @@ -4399,7 +4399,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetProgramaSubPrograma(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_ProGSubProgramaGET") @@ -4417,7 +4417,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetGrupoVulnerable(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_GrupoVulnerable") @@ -4435,7 +4435,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetTipoGasto(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_AC_TipoGastoGet") @@ -4449,7 +4449,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetClasificadorOG(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_AC_ClasificadorOGGet") @@ -4467,7 +4467,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetClasificacion(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_ClasificacionGET") @@ -4485,7 +4485,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetClasificacionEconomica(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_ClasificacionEconomicaGET") @@ -4503,7 +4503,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetFuenteFinanciera(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_AC_FuentesFinanciamientoGet") @@ -4715,7 +4715,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetRepPresupuestosEgresosSaldosDetalle(MomentoContable As Integer, ProgramaOperativo As Integer, FuenteFinanciamiento As Integer, TipoGasto As Integer, UnidadAdministrativa As Integer, ClasificacionOG As Integer, CodigoOG As String, FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_PresupuestosEgresosSaldosDetalleRep") @@ -4743,7 +4743,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function GetGeneraPolizaPresupuestoEgresos(CveEmpresa As Integer, CveEjercicio As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_GeneraPolizaPresupuestoEgresos") @@ -5014,7 +5014,7 @@ Public Class ClsContabilidad #Region "FIS IMPUESTOS" Public Function GetFisImpuestos(CveImpuesto As Integer, CveImpuestoTipo As Integer, CveProveedor As Integer, Folio As String, CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_FisImpuestosGet") @@ -5039,7 +5039,7 @@ Public Class ClsContabilidad End Function Public Function GetFisImpuestosDetalle(CveImpuesto As Integer, CveImpuestoTipo As Integer, CveProveedor As Integer, Folio As String, CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_FisImpuestosDetalleGet") @@ -5064,7 +5064,7 @@ Public Class ClsContabilidad End Function Public Function AddUpdateFisImpuestos(CveImpuesto As Integer, CveImpuestoTipo As Integer, CvePrePoliza As Integer, CveProveedor As Integer, Fecha As Date, Folio As String, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_FisImpuestosAddUpdate") @@ -5119,7 +5119,7 @@ Public Class ClsContabilidad 'End Function Public Function GetFisImpuestosTipos(Estatus As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Fis_ImpuestosTiposGet") @@ -5141,7 +5141,7 @@ Public Class ClsContabilidad #Region "Contabilidad Electronica" Public Function GetCuentasElectronica(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_ContaElectronicaCuentasGet") @@ -5160,7 +5160,7 @@ Public Class ClsContabilidad End Function Public Function GetBalanzaComprobacion(FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_ContaElectronicaBalanzaGet") @@ -5183,7 +5183,7 @@ Public Class ClsContabilidad #Region "Estado de Situacion Financiera" Public Function GetSituacionFinanciera(FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional TipoMovtos As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_SituacionFinancieraGet") @@ -5205,7 +5205,7 @@ Public Class ClsContabilidad End Function Public Function GetBalanceGeneralMensual(ANO As Integer, TipoMovtos As Integer, SubTotales As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_BalanceGeneralMensual") @@ -5227,7 +5227,7 @@ Public Class ClsContabilidad End Function Public Function GetBalanceGeneralAnual(ANO As Integer, TipoMovtos As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_BalanceGeneralAnual") @@ -5337,7 +5337,7 @@ Public Class ClsContabilidad #Region "Cierre Contable" Public Function GetCuentasCierre(FechaI As Date, FechaF As Date, CveCuentaCierre As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Integer - Dim Retorno = 0 + Dim Retorno As Integer = 0 DataAdapter("PA_Conta_CierrePolizaCuentasGet") @@ -5409,7 +5409,7 @@ Public Class ClsContabilidad Public Function GetGastosRepCC(FechaInicio As DateTime, FechaFin As DateTime, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_ReporteGastos") @@ -5431,7 +5431,7 @@ Public Class ClsContabilidad Public Function GetEdoResultadosMes(FechaInicio As Date, FechaFin As Date, CveTipoGasto As Integer, CveClasificacion As Integer, CveSubProyecto As Integer, Agrupador As Integer, CveEmpresa As Integer, Unidad As Integer) As DataSet - Dim Retorno = False + Dim Retorno As Boolean = False Dim ds As New DataSet DataAdapter("PA_Conta_EdoResultado2") @@ -5621,7 +5621,7 @@ Public Class ClsContabilidad Public Function GetCuentasAsignaciones(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasAsignacionesGet") @@ -5640,7 +5640,7 @@ Public Class ClsContabilidad End Function Public Function GetCuentasAsignacionesSistema(CveEmpresa As Integer, Tipo As Integer, Opcion As Integer, CveConcepto As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasAsignacionesSistemaGet") @@ -5667,7 +5667,7 @@ Public Class ClsContabilidad Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1, Optional RegeneraCuenta As Boolean = False, Optional OpActualizarClasificacion As Boolean = False) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasAsignacionesAdd") @@ -5707,7 +5707,7 @@ Public Class ClsContabilidad Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1, Optional CveBancoCuenta As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional CveTipoGasto As Integer = -1, Optional CveCredito As Integer = -1, Optional RegeneraCuenta As Boolean = False) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasAsignacionesUpdate") @@ -5740,7 +5740,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function RemoveCuentasAsignaciones(CveCuentaAsignacion As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasAsignacionesDelete") @@ -5760,7 +5760,7 @@ Public Class ClsContabilidad #Region "Globales" Public Function GetCuentasGlobales(CveEmpresa As Integer, Optional CveConcepto As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasGlobalesGet") @@ -5780,7 +5780,7 @@ Public Class ClsContabilidad End Function Public Function AddCuentasGlobales(CveConceptoContable As Integer, CveCuenta As Integer, TipoGlobal As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasGlobalesAdd") @@ -5802,7 +5802,7 @@ Public Class ClsContabilidad End Function Public Function RemoveCuentasGlobales(CveConceptoContable As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_CuentasGlobalesDelete") @@ -5825,7 +5825,7 @@ Public Class ClsContabilidad #End Region Public Function GetContaEjercicio(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_ContaEjerciciosGet") @@ -5845,7 +5845,7 @@ Public Class ClsContabilidad Public Function AddContaEjercicio(Ejercicio As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional PeriodoActual As Integer = 0, Optional CveCuentaCierre As Integer = -1, Optional CvePoliza As Integer = -1, Optional CvePrePoliza As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_ContaEjerciciosAdd") @@ -5871,7 +5871,7 @@ Public Class ClsContabilidad Public Function UpdateContaEjercicio(CveEjercicio As Integer, Optional Ejercicio As Integer = -1, Optional PeriodoActual As Integer = 0, Optional CveCuentaCierre As Integer = -1, Optional CvePoliza As Integer = -1, Optional CvePrePoliza As Integer = -1, Optional Estatus As Boolean = False) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_ContaEjerciciosUpdate") @@ -5896,7 +5896,7 @@ Public Class ClsContabilidad End Function Public Function RemoveContaEjercicio(CveEjercicio As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_ContaEjerciciosDelete") @@ -5976,7 +5976,7 @@ Public Class ClsContabilidad #Region " RECONSTRUCCION DE PREPOLIZAS " Public Function ReconstruirPP_PagoCompra(CvePrePoliza As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_AD_PrePolizaReconstruccionPagoCompra") With SqlAdapter.SelectCommand.Parameters @@ -5993,7 +5993,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function ReconstruirPP_Compra(CveCompra As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_AD_PrePolizaReconstruccionCompra") With SqlAdapter.SelectCommand.Parameters @@ -6010,7 +6010,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function ReconstruirPP_PagoVenta(CvePrePoliza As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_AD_PrePolizaReconstruccionPagoVenta") With SqlAdapter.SelectCommand.Parameters @@ -6027,7 +6027,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function ReconstruirPP_PagoCompraVenta(CveIE As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_AD_PrePolizaReconstruccionPagoCompraVenta") With SqlAdapter.SelectCommand.Parameters @@ -6048,7 +6048,7 @@ Public Class ClsContabilidad #Region "VALIDACION POLIZA DESCUADRADA" Public Function ValidacionPrePolizaCuadre(CvePrePoliza As Integer, Opcion As Integer, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_PrePolizasValidacion") With SqlAdapter.SelectCommand.Parameters @@ -6081,7 +6081,7 @@ Public Class ClsContabilidad Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, ByRef UsuarioActual As Usuario, Optional Opcion As Integer = 1, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True, Optional ObjConta As ClsContPAQi = Nothing) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_PrePolizasValidacion") With SqlAdapter.SelectCommand.Parameters @@ -6175,7 +6175,7 @@ Public Class ClsContabilidad #Region "Periodos Bloqueo Meses" Public Function GetPeriodosBloqueo(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EmpresasBloqueoMesesGet") With SqlAdapter.SelectCommand.Parameters @@ -6192,7 +6192,7 @@ Public Class ClsContabilidad Return Retorno End Function Public Function AddPeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Integer, Mes2 As Integer, Mes3 As Integer, Mes4 As Integer, Mes5 As Integer, Mes6 As Integer, Mes7 As Integer, Mes8 As Integer, Mes9 As Integer, Mes10 As Integer, Mes11 As Integer, Mes12 As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EmpresasBloqueoMesesAdd") With SqlAdapter.SelectCommand.Parameters @@ -6224,7 +6224,7 @@ Public Class ClsContabilidad Public Function UpdatePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer, Mes1 As Boolean, Mes2 As Boolean, Mes3 As Boolean, Mes4 As Boolean, Mes5 As Boolean, Mes6 As Boolean, Mes7 As Boolean, Mes8 As Boolean, Mes9 As Boolean, Mes10 As Boolean, Mes11 As Boolean, Mes12 As Boolean, CveUsuario As Integer) As String - Dim Retorno = "" + Dim Retorno As String = "" DataAdapter("PA_Conta_EmpresasBloqueoMesesUpdate") With SqlAdapter.SelectCommand.Parameters @@ -6258,7 +6258,7 @@ Public Class ClsContabilidad End Function Public Function RemovePeriodosBloqueo(CveEmpresa As Integer, Ejercicio As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_EmpresasBloqueoMesesRemove") With SqlAdapter.SelectCommand.Parameters @@ -6277,7 +6277,7 @@ Public Class ClsContabilidad End Function Public Function GetBloqueoMesesBitacora(CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_GetBloqueoMesesBitacora") @@ -6300,7 +6300,7 @@ Public Class ClsContabilidad Public Function GetEstadosMensual(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosMensual") @@ -6329,7 +6329,7 @@ Public Class ClsContabilidad End Function Public Function GetEstadosMensualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosMensualHorizontal") @@ -6357,11 +6357,8 @@ Public Class ClsContabilidad Return Retorno End Function - - - Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1, Optional Periodo As Integer = 12) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal") @@ -6392,7 +6389,7 @@ Public Class ClsContabilidad Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta2_EstadoResultadosSubProyectolHorizontal") @@ -6423,7 +6420,7 @@ Public Class ClsContabilidad #End Region Public Function UpdateTraspasoPrepoliza(CveEmpresa As Integer, CveCuenta As Integer, CveCuentaNueva As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_Traspaso_Prepolizas") @@ -6444,7 +6441,7 @@ Public Class ClsContabilidad End Function Public Function UpdateProveedorPoliza(CveOrdenCompra As Integer, CveProveedor As Integer, Concepto As String) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_ActualizarProveedor") @@ -6466,7 +6463,7 @@ Public Class ClsContabilidad #Region "F L U C T U A C I O N - C A M B I A R I A" Public Function UpdateTCValuacion(CveVenta As Integer, CveCompra As Integer, CveIE As Integer, TCValuacion As Decimal, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Conta_TipoCambioValuacionUpdate") @@ -6490,8 +6487,6 @@ Public Class ClsContabilidad #End Region - - Public Function GetPolizas(Ejercicio As Integer, Periodo As Integer, TipoPoliza As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Respuesta As Boolean = False diff --git a/App_Code/ClsContratos.vb b/App_Code/ClsContratos.vb index 747f593bd..7c423f4bf 100644 --- a/App_Code/ClsContratos.vb +++ b/App_Code/ClsContratos.vb @@ -401,7 +401,7 @@ Public Class ClsContratos Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional FacturacionCicilica As Boolean = False, Optional FacturacionCiclicaAutomatico As Boolean = False, Optional DiaMesFacturacion As Integer = 1, Optional CvePeriodo As Integer = -1, Optional ObservacionesGenerales As String = "") As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosUpdate") With SqlAdapter.SelectCommand.Parameters @@ -475,7 +475,7 @@ Public Class ClsContratos End Function Public Function TerminarContrato(CveContrato As Integer, CveTipoEstatus As Integer, CveEmpresa As Integer) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 DataAdapter("PA_Con_ContratosTerminar") With SqlAdapter.SelectCommand.Parameters @@ -498,7 +498,7 @@ Public Class ClsContratos 'Usado en conrtatos Obra Public Function AbrirCerrarContrato(CveContrato As Integer, CveEmpresa As Integer, Cerrar As Boolean, CveUsuario As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraAbrirCerrar") With SqlAdapter.SelectCommand.Parameters @@ -529,7 +529,7 @@ Public Class ClsContratos 'End Function Public Function RemoveContrato(CveContrato As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosRemove") With SqlAdapter.SelectCommand.Parameters @@ -660,7 +660,7 @@ Public Class ClsContratos Optional TipoGarantia As Integer = -1, Optional Folio As Integer = -1, Optional FechaVenc As Date = Nothing, Optional EstatusFianza As Integer = -1, Optional CveContratoPlantilla As Integer = -1, Optional CveCuentaEquipo As Integer = -1, Optional CveVendedor As Integer = -1, Optional Observaciones As String = "", Optional CveDireccionEnvio As Integer = -1, Optional AplicaImpuestosLocales As Boolean = False, Optional CorreoNotificacionPedDev As String = "", Optional Lugar As String = "", Optional LimiteDeGasto As Double = 0, Optional ImporteSubTotal As Decimal = 0) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraUpdate") With SqlAdapter.SelectCommand.Parameters @@ -731,7 +731,7 @@ Public Class ClsContratos End Function Public Function GetContratosObraEstadoCuenta(CveContrato As Integer, CveEmpresa As Integer, Opcion As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosEstadoCuentaGet") With SqlAdapter.SelectCommand.Parameters @@ -755,7 +755,7 @@ Public Class ClsContratos #Region "ESTIMACION OBRA" Public Function GetContratosObraRepAvances(FechaI As Date, FechaF As Date, CveCliente As Integer, CveContrato As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraRepAvancesGet") With SqlAdapter.SelectCommand.Parameters @@ -778,7 +778,7 @@ Public Class ClsContratos Public Function GetContratosObraRepAvancesDetalle(CveContrato As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraRepAvancesDetalleGet") With SqlAdapter.SelectCommand.Parameters @@ -798,7 +798,7 @@ Public Class ClsContratos Public Function GetContratosObraRepAvancesPartida(CveEstimacion As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraRepAvancesPartidaGet") With SqlAdapter.SelectCommand.Parameters @@ -817,7 +817,7 @@ Public Class ClsContratos End Function Public Function GetContratosObraRepAvancesPartida(FechaI As Date, FechaF As Date, CveCliente As Integer, CveContrato As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraRepAvancesPartidaGet") With SqlAdapter.SelectCommand.Parameters @@ -840,7 +840,7 @@ Public Class ClsContratos Public Function GetContratosObraAvancesControlAcumulativo(CveContrato As Integer, CveEstimacion As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraAvancesControlAcumulativo") With SqlAdapter.SelectCommand.Parameters @@ -866,11 +866,8 @@ Public Class ClsContratos #Region "GASTOS OBRA" - - - Public Function GetContratosObragGastosVeiculos(CveContrato As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraGastosVeiculosGet") With SqlAdapter.SelectCommand.Parameters @@ -888,10 +885,8 @@ Public Class ClsContratos Return Retorno End Function - - Public Function GetContratosObragGastosCompras(CveContrato As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraGastosComprasGet") With SqlAdapter.SelectCommand.Parameters @@ -911,7 +906,7 @@ Public Class ClsContratos Public Function GetContratosObragGastosNomina(CveContrato As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosObraGastosNominaGet") With SqlAdapter.SelectCommand.Parameters @@ -1048,7 +1043,7 @@ Public Class ClsContratos Public Function AddContratosDetalle(CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, CveTipoPresupuesto As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosDetalleAdd") With SqlAdapter.SelectCommand.Parameters @@ -1083,7 +1078,7 @@ Public Class ClsContratos Public Function UpdateContratosDetalle(CveContratoDetalle As Integer, CveContrato As Integer, CvePS As Integer, Cantidad As Double, PU As Double, CveUsuario As Integer, NoIdentificacion As String, LimitarCantidad As Boolean, OCInterna As String, Optional Observacion As String = "", Optional CveRubro As Integer = -1, Optional CveActividad As Integer = -1, Optional CveSubTipoActivoFijo As Integer = -1, Optional Dias As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosDetalleUpdate") With SqlAdapter.SelectCommand.Parameters @@ -1116,7 +1111,7 @@ Public Class ClsContratos Public Function GetContratosDetalle(CveContrato As Integer, CveEmpresa As Integer, Optional Grupo As Integer = 1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosDetalleGet") With SqlAdapter.SelectCommand.Parameters @@ -1136,7 +1131,7 @@ Public Class ClsContratos End Function Public Function GetContratosDetalleOC(CveCliente As Integer, OCs As String, Tipo As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosDetalleOCGet") With SqlAdapter.SelectCommand.Parameters @@ -1156,7 +1151,7 @@ Public Class ClsContratos End Function Public Function AutorizarContratos(CveContrato As Integer, CveUsuario As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAutorizar") With SqlAdapter.SelectCommand.Parameters @@ -1175,7 +1170,7 @@ Public Class ClsContratos End Function Public Function UpdateContratosDetalleEstimacion(CveContratoDetalle As Integer, Estimacion As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosDetalleUpdateEstimacion") With SqlAdapter.SelectCommand.Parameters @@ -1194,7 +1189,7 @@ Public Class ClsContratos End Function Public Function RemoveContratosDetalle(CveContratoDetalle As Integer, CveContrato As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosDetalleRemove") With SqlAdapter.SelectCommand.Parameters @@ -1213,7 +1208,7 @@ Public Class ClsContratos End Function Public Function ValidaPSContrato(DtPS As String) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ValidarPSContrato") With SqlAdapter.SelectCommand.Parameters @@ -1231,7 +1226,7 @@ Public Class ClsContratos End Function Public Function GetPSContratoDetalle(CveContrato As Integer, DtPS As String) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_GetPSContratoDetalle") With SqlAdapter.SelectCommand.Parameters @@ -1253,7 +1248,7 @@ Public Class ClsContratos #Region "Contratos detalles Avance" Public Function GetContratosAvanceHistoricos(CveContrato As Integer, CveTipoPresupuesto As Integer, fecha As String) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceHistorico") With SqlAdapter.SelectCommand.Parameters @@ -1272,7 +1267,7 @@ Public Class ClsContratos Return Retorno End Function Public Function GetContratosAvanceTodos(CveContrato As Integer, CveTipoPresupuesto As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceTodos") With SqlAdapter.SelectCommand.Parameters @@ -1290,7 +1285,7 @@ Public Class ClsContratos Return Retorno End Function Public Function GetContratosAvanceFecha(CveContrato As Integer, CveTipoPresupuesto As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceFechas") With SqlAdapter.SelectCommand.Parameters @@ -1308,7 +1303,7 @@ Public Class ClsContratos Return Retorno End Function Public Function AddContratosAvance(CveContratoDetalle As Integer, Cantidad As Double, Fecha As Date, CveUsuario As Integer, Optional CveEstimacion As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceAdd") With SqlAdapter.SelectCommand.Parameters .Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle @@ -1328,7 +1323,7 @@ Public Class ClsContratos Return Retorno End Function Public Function UpdateContratosDetalleAvance(CveContratoDetalle As Integer, Avance As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosDetalleUpdateAvance") With SqlAdapter.SelectCommand.Parameters @@ -1346,7 +1341,7 @@ Public Class ClsContratos Return Retorno End Function Public Function AddContratosAvanceAnexo(CveContratoAvance As Integer, Archivo As String, CveUsuario As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceAnexosAdd") With SqlAdapter.SelectCommand.Parameters .Add("@CveContratoAvance", SqlDbType.Int).Value = CveContratoAvance @@ -1363,7 +1358,7 @@ Public Class ClsContratos Return Retorno End Function Public Function GetContratosAvanceAnexos(CveContratoDetalle As Integer, CveUsuario As Integer, Optional CveEstimacion As Integer = -1, Optional CveContratoAvance As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceAnexos") With SqlAdapter.SelectCommand.Parameters @@ -1386,9 +1381,8 @@ Public Class ClsContratos #Region "ESTIMACION" - Public Function AddContratosObraAvance(CveContrato As Integer, CveContratoDetalle As Integer, Cantidad As Double, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False CveEstimacionActual = 0 @@ -1422,7 +1416,7 @@ Public Class ClsContratos Public Function GetContratosAvanceEstimacion(CveContrato As Integer, CveEmpresa As Integer, CveEstimacion As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceEstimacionGet") With SqlAdapter.SelectCommand.Parameters @@ -1443,7 +1437,7 @@ Public Class ClsContratos Public Function AddContratosAvanceEstimacion(CveContrato As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False NumeroEstimacionNueva = -1 CveEstimacionNueva = -1 @@ -1475,7 +1469,7 @@ Public Class ClsContratos Public Function UpdateContratosAvanceEstimacion(CveContratoAvance As Integer, CveEstimacion As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceEstimacionUpdate") With SqlAdapter.SelectCommand.Parameters @@ -1494,12 +1488,9 @@ Public Class ClsContratos Return Retorno End Function - - - Public Function UpdateContratosEstimacion(CveEstimacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveEstimacionEstatus As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosEstimacionUpdate") With SqlAdapter.SelectCommand.Parameters @@ -1524,7 +1515,7 @@ Public Class ClsContratos Public Function RemoveContratosAvance(CveContratoAvance As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceRemove") With SqlAdapter.SelectCommand.Parameters @@ -1549,7 +1540,7 @@ Public Class ClsContratos #Region "CONTRATOS OBRA COMPRAS" Public Function GetContratosObraCompras(CveContrato As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAvanceObraComprasGet") With SqlAdapter.SelectCommand.Parameters @@ -1880,10 +1871,8 @@ Public Class ClsContratos #Region "S U B - T O T A L E S" - Public Function GetSubTotalesConDetalle(CveEmpresa As Integer) As Boolean - - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_SubtotalesWDetalles") With SqlAdapter.SelectCommand.Parameters @@ -1902,8 +1891,7 @@ Public Class ClsContratos End Function Public Function GetSubTotales(CveEmpresa As Integer, CveContrato As Integer) As Boolean - - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_SubTotalesGet") With SqlAdapter.SelectCommand.Parameters @@ -1921,14 +1909,11 @@ Public Class ClsContratos Return Retorno End Function - Public Function UpdateSubTotales(Descripcion As String, Porcentaje As Double, - CveSeccion As Integer, CveSubTotal As Integer, CveEmpresa As Integer) As Boolean - - Dim Retorno = False + Public Function UpdateSubTotales(Descripcion As String, Porcentaje As Double, CveSeccion As Integer, CveSubTotal As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False DataAdapter("PA_Con_SubTotalesUpdate") With SqlAdapter.SelectCommand.Parameters - .Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion .Add("@Porcentaje", SqlDbType.Float).Value = Porcentaje .Add("@CveSeccion", SqlDbType.Int).Value = CveSeccion @@ -1944,7 +1929,6 @@ Public Class ClsContratos End Try Return Retorno - End Function Public Function AddContratosSubTotales(CveContrato As Integer, CveSubTotal As Integer, Porcentaje As Double, Importe As Double) As Boolean Dim Retorno As Boolean = False @@ -1989,7 +1973,7 @@ Public Class ClsContratos #Region "S U B - T O T A L E S - D E T A L L E S" Public Function GetSubTotalesDetalle(CveEmpresa As Integer) As Boolean - Dim Retorno = True + Dim Retorno As Boolean = True DataAdapter("PA_Con_SubTotalesDetalleGet") With SqlAdapter.SelectCommand.Parameters @@ -2795,7 +2779,7 @@ Public Class ClsContratos #Region "Addendum" Public Function GetContratosAddendum(CveContrato As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosAddendumGet") With SqlAdapter.SelectCommand.Parameters @@ -2814,7 +2798,7 @@ Public Class ClsContratos Public Function GetContratosSuministros(CveContrato As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveEstatus As Integer, Tipo As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosSuministrosGet") With SqlAdapter.SelectCommand.Parameters @@ -2838,7 +2822,7 @@ Public Class ClsContratos #End Region Public Function GetContratosCostos(CveContrato As Integer, FechaInicio As DateTime, FechaFin As DateTime, CveEstatus As Integer, Tipo As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Con_ContratosCostosGet") With SqlAdapter.SelectCommand.Parameters diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb index 1fa45e0c4..2a38bb5aa 100644 --- a/App_Code/ClsGPS.vb +++ b/App_Code/ClsGPS.vb @@ -772,9 +772,9 @@ Public Class ClsGPS 'Dim datos As New JArray() Using Row = SqlAdapter.SelectCommand.ExecuteReader() - Dim Contador = 0 - Dim Info = "" - Dim Direccion = "" + Dim Contador As Integer = 0 + Dim Info As String = "" + Dim Direccion As String = "" Dim SBBody As New StringBuilder Dim StrPolyPath As New StringBuilder Dim StrScriptsMakers As New StringBuilder @@ -1051,7 +1051,7 @@ Public Class ClsGPS End With Try - Dim noRows = SqlAdapter.SelectCommand.ExecuteNonQuery() + Dim noRows As Integer = SqlAdapter.SelectCommand.ExecuteNonQuery() Retorno = (noRows = 1) If Retorno Then CveGeoReferencia = SqlAdapter.SelectCommand.Parameters("@CveGeoReferencia").Value.ToString.ToEntero diff --git a/App_Code/ClsGPSHerramientas.vb b/App_Code/ClsGPSHerramientas.vb index f0a8eefc7..94a74b82c 100644 --- a/App_Code/ClsGPSHerramientas.vb +++ b/App_Code/ClsGPSHerramientas.vb @@ -105,7 +105,7 @@ Public Class ClsGPSHerramientas End Sub Public Function EjecutarComandoManualSMS(Trama As String, Telefono As String, CveDispositivo As Integer, CveUsuario As Integer, Optional Valor As String = "") As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False Dim ObjMensaje As New ClsTecnoMovil If ObjMensaje.EnviarMensajeWS(Telefono, Trama) Then Retorno = InsertarComandoEnviar(Trama, 2, 1, CveDispositivo, CveUsuario, -1) diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 3157fd0a5..1b98bec8a 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -1817,7 +1817,7 @@ Public Class ClsGenerales End Function Public Function GetTipoCambio(CveTipoCambio As Integer, Fecha As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Gral_TipoCambioGet") @@ -1836,7 +1836,7 @@ Public Class ClsGenerales Return Retorno End Function Public Function GetTipoCambioUltimaFluctuacion(CveTipoCambio As Integer, Fecha As Date, Optional Top As Integer = 1000) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Gral_TipoCambioUltimaFluctuacionGet") @@ -1856,7 +1856,7 @@ Public Class ClsGenerales Return Retorno End Function Public Function GetTiposCambio(FechaInicio As Date, FechaFin As Date) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Gral_TiposCambioGet") diff --git a/App_Code/ClsOC.vb b/App_Code/ClsOC.vb index ef0885e4e..fe4cc82c8 100644 --- a/App_Code/ClsOC.vb +++ b/App_Code/ClsOC.vb @@ -2028,7 +2028,7 @@ Public Class ClsOC Return Retorno End Function Public Function GetOCFacturacion(pCveOrdenCompra As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_OC_OrdenesCompraFacturacionGet") diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb index 6eb47b0ba..37c61db00 100644 --- a/App_Code/ClsOIEventos.vb +++ b/App_Code/ClsOIEventos.vb @@ -1466,7 +1466,7 @@ Public Class ClsOIEventos #Region "E V E N T O S" Public Function GetEvento(CveEvento As Integer, CveUsuarioConsulta As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno = GetEventos(CveEvento, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuarioConsulta, CveEmpresa) + Dim Retorno As Boolean = GetEventos(CveEvento, -1, -1, "-1", "-1", -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveUsuarioConsulta, CveEmpresa) Return Retorno End Function Public Function GetEvento(objEvento As Modelos.Evento, CveUsuarioConsulta As Integer) As Boolean diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 5b8d31540..09ddd0a65 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -19,8 +19,8 @@ Imports Newtonsoft.Json.Linq Public Class ClsPaginas Inherits System.Web.UI.Page Public Const CveUsuarioAsistencia As Integer = 100 - Public Const ContraseñaPredeterminada = "-acceso-" - Public Const ContraseñaPredeterminadaEncriptada = "aQDyjiv2NgoTct4c84VnLQ==" ' "-acceso-" + Public Const ContraseñaPredeterminada As String = "-acceso-" + Public Const ContraseñaPredeterminadaEncriptada As String = "aQDyjiv2NgoTct4c84VnLQ==" ' "-acceso-" Private Shared EncryptKey() As Byte = {} Private Shared ReadOnly IV() As Byte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF} Private Const SEncryptionKey As String = "__sig__$gj7+5&j__sig__" @@ -1622,7 +1622,7 @@ Public Class ClsPaginas ObjPS.Dispose() End If - Dim Cons = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow)) + Dim Cons As EnumerableRowCollection(Of DataRow) = DirectCast(HttpContext.Current.Application(AppNombre), EnumerableRowCollection(Of DataRow)) 'Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa)) If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion)) If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo)) @@ -4327,15 +4327,15 @@ Public Class ClsPaginas Return URLParametros End Function Private Function AuthorizePageWithoutSessions() As List(Of String) - Dim pages = New List(Of String) + Dim pages As List(Of String) = New List(Of String) pages.Add("/Compras/PopUpVerFactura.aspx") Return pages End Function Protected Overridable Sub Page_PreInit(sender As Object, e As EventArgs) Handles Me.PreInit If Not User.Identity.IsAuthenticated OrElse UsuarioActual Is Nothing Then Dim AuthorizeRequest As Boolean = False - Dim HuboError = False - Dim statusCode = 200 + Dim HuboError As Boolean = False + Dim statusCode As Integer = 200 If AuthorizePageWithoutSessions().Contains(Request.ServerVariables("URL")) Then If Request.Headers("ADSToken") IsNot Nothing AndAlso Request.Headers("Host") IsNot Nothing Then Try @@ -4634,7 +4634,7 @@ Public Class ClsPaginas rds.Name = RDSName rds.Value = DtDatos lrds.Add(rds) - Dim Extension = "pdf" + Dim Extension As String = "pdf" If Formato.ToLower() = "excel" Then Extension = "xlsx" End If @@ -4746,7 +4746,7 @@ Public Class ClsPaginas reportobjects.Add(ojext) End If Else - Dim dt = New DataTable() + Dim dt As DataTable = New DataTable() dt.TableName = If(String.IsNullOrEmpty(rpds.Name), "DataTable1", rpds.Name) ds.Tables.Add(dt) End If @@ -4846,7 +4846,7 @@ Public Class ClsPaginas End Function Private Sub LocalReport_SubreportProcessing(ByVal sender As Object, ByVal e As SubreportProcessingEventArgs) If SubReportData IsNot Nothing Then - For Each ds In SubReportData.DataSources + For Each ds As ReportDataSource In SubReportData.DataSources e.DataSources.Add(ds) Next End If @@ -5146,9 +5146,9 @@ Public Class ClsPaginas Dim RutaCBB As String = String.Format("{0}CBB\{1}.jpg", Ruta, Vta.SerieFolio) Dim ImagenCBB As New System.IO.FileInfo(RutaCBB) Dim ImgCBB As String '= String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio) - Dim ImagenPath = String.Format("{0}Formatos\Suc{1}\logo.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal) + Dim ImagenPath As String = String.Format("{0}Formatos\Suc{1}\logo.png", UsuarioActual.Empresa.Ruta, Vta.CveSucursal) Dim Logo As New System.IO.FileInfo(ImagenPath) - Dim ImgLogo = New Uri(String.Format("{0}Empresas/{1}/Formatos/Suc{2}.png", UrlSitio, UsuarioActual.CveEmpresa, Vta.CveSucursal)).AbsoluteUri + Dim ImgLogo As String = New Uri(String.Format("{0}Empresas/{1}/Formatos/Suc{2}.png", UrlSitio, UsuarioActual.CveEmpresa, Vta.CveSucursal)).AbsoluteUri Dim SBDomicilioSucursal As New StringBuilder() Dim CiudadSucursal As String = String.Format("{0},{1}", Vta.SubProyecto.Municipio, Vta.SubProyecto.Estado) Dim DomicilioSucursal As String = "" @@ -5171,7 +5171,7 @@ Public Class ClsPaginas Vta.SelloCFDi = "Sin Timbrar" Vta.SelloSAT = "Sin Timbrar" #Region "COMERCIO EXTERIOR VARIABLES Y TABLAS" - Dim CETipoOperacion = "", CEClavePedimento As String = "", CEIncoterm As String = "", CEId As String = "", CEMotivoTraslado As String = "", CETipoCambio As String = "" + Dim CETipoOperacion As String = "", CEClavePedimento As String = "", CEIncoterm As String = "", CEId As String = "", CEMotivoTraslado As String = "", CETipoCambio As String = "" Dim RCETipoOperacion As String = "", RCEClavePedimento As String = "", RCEIncoterm As String = "", RCEMotivoTraslado As String = "" Dim CE_DT_Cabecera As New DataTable @@ -5210,7 +5210,7 @@ Public Class ClsPaginas 'SI ESTA TIMBRADA - CON XML If File.Exists(PathXML) AndAlso Vta.Serie <> "VistaPrevia" Then 'Cuando es vista previe y coincide la serie y folio se ponen los datos fiscales Dim XmlDoc As New System.Xml.XmlDocument - Dim EsXMLValido = False + Dim EsXMLValido As Boolean = False Try XmlDoc.Load(PathXML) EsXMLValido = True @@ -5225,7 +5225,7 @@ Public Class ClsPaginas If ValorNodoXML(XmlDoc.DocumentElement, "version").Contiene("3.3", "4.0") Then Vta.FechaEmision = ValorNodoXML(XmlDoc.DocumentElement, "fecha").ToDate Vta.NoSerieCertificadoContribuyente = ValorNodoXML(XmlDoc.DocumentElement, "NoCertificado") - Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento") + Dim validaElemento As XmlElement = XmlDoc.DocumentElement("cfdi:Complemento") If Not IsNothing(validaElemento) Then For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1 If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then @@ -5344,7 +5344,7 @@ Public Class ClsPaginas Else Vta.FechaEmision = XmlDoc.DocumentElement.Attributes("fecha").InnerText.ToDate Vta.NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("noCertificado").InnerText - Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento") + Dim validaElemento As XmlElement = XmlDoc.DocumentElement("cfdi:Complemento") If Not IsNothing(validaElemento) Then For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1 If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then @@ -5641,8 +5641,8 @@ Public Class ClsPaginas 'VSH If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 122, 145) Then 'DATOS CLIENTES - Dim ClienteRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", Vta.CveCliente.ToString)) - Dim DatosCliente = "" + Dim ClienteRow As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", Vta.CveCliente.ToString)) + Dim DatosCliente As String = "" If ClienteRow IsNot Nothing Then DatosCliente = String.Format("{0} | {1} | {2}", Vta.SubProyecto.Municipio, ClienteRow("CuentaContable"), ClienteRow("Codigo")) End If @@ -5919,7 +5919,7 @@ Public Class ClsPaginas For i As Integer = 0 To Vta.DtFirmas.Rows.Count - 1 'Si DtDetalle es menor al DtFirmas, crea un nuevo Row en DtDetalle y le asigna valor, Si no solo asigna valor If DtDetalleFirmas.Rows.Count < i + 1 Then - Dim Dr = DtDetalleFirmas.NewRow + Dim Dr As DataRow = DtDetalleFirmas.NewRow Dr("Titulo") = Vta.DtFirmas(i)("Titulo").ToString Dr("Nombre") = Vta.DtFirmas(i)("Nombre").ToString Dr("Puesto") = Vta.DtFirmas(i)("Puesto").ToString @@ -6084,7 +6084,7 @@ Public Class ClsPaginas urlHost = "http://sig.adssistemas.mx:6599/" End If 'SITIO DE PRUEBA EN IIS - Dim Url = New Uri(String.Format("{0}{1}", urlHost, Opcion)) + Dim Url As Uri = New Uri(String.Format("{0}{1}", urlHost, Opcion)) Try Dim dataSourceArray As New JArray() Dim paramsArray As New JArray() @@ -6150,7 +6150,7 @@ Public Class ClsPaginas Public Sub GenerarFacturaVenta(CveVenta As Integer) Dim ObjVentas As New ClsVentas Dim Vta As Modelos.Factura = Nothing - Dim TmpDTImpuestos = New DataTable + Dim TmpDTImpuestos As DataTable = New DataTable TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String)) TmpDTImpuestos.Columns.Add("Importe", GetType(Double)) TmpDTImpuestos.Columns.Add("Orden", GetType(Integer)) @@ -6230,7 +6230,7 @@ Public Class ClsPaginas Dim dtImpuesto As DataTable = ObjVentas.DtResultados If dtImpuesto.Rows.Count > 0 Then For Each Row As DataRow In dtImpuesto.Rows - Dim Orden = 80 + Dim Orden As Integer = 80 If Row("Importe").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString DR("Importe") = Row("Importe").ToString.ToDouble @@ -6619,11 +6619,11 @@ Public Class ClsPaginas End If If DTCxPTempral IsNot Nothing AndAlso DTCxPTempral.Rows.Count > 0 Then Dim dr As DataRow = DTCxPTempral.Rows(0) - Dim NombreProv = "" - Dim Direccion = "" - Dim RFC = "" - Dim Tel = "" - Dim DiasCredito = "" + Dim NombreProv As String = "" + Dim Direccion As String = "" + Dim RFC As String = "" + Dim Tel As String = "" + Dim DiasCredito As String = "" Dim LimCredito As Double CveEmpresaActual = dr("CveEmpresa").ToString.ToEntero Dim ObjEmpresa As New ClsSisEmpresas() @@ -6634,7 +6634,7 @@ Public Class ClsPaginas ObjEmpresa.Dispose() Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepProveedorCxP.rpt", EmpresaActual.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", EmpresaActual.Ruta)) - Dim logouri = String.Format("{0}Logo.png", EmpresaActual.Ruta) 'String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, CveEmpresaActual) + Dim logouri As String = String.Format("{0}Logo.png", EmpresaActual.Ruta) 'String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, CveEmpresaActual) Dim ObjProveedor As New ClsCompProveedores() If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then If ObjProveedor.DtResultados.Rows.Count > 0 Then @@ -6647,7 +6647,7 @@ Public Class ClsPaginas End If End If ObjProveedor.Dispose() - Dim lista = New List(Of CrystalParametro) + Dim lista As List(Of CrystalParametro) = New List(Of CrystalParametro) lista.Add(New CrystalParametro("Empresa", EmpresaActual.Empresa)) lista.Add(New CrystalParametro("TipoCuentas", "Todas")) lista.Add(New CrystalParametro("FechaInicio", "-")) @@ -6682,7 +6682,7 @@ Public Class ClsPaginas Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String, Optional indemnizacion As Boolean = False) As Byte() Dim ObjNomina As New ClsNominas Dim ObjPersonal As New ClsRH - Dim TieneError = False + Dim TieneError As Boolean = False Dim Retorno As Byte() = Nothing If Not ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, CveEmpresa) Then Alert("Ocurrio un erro al obtener datos de la nomina", TipoMensaje.MsgError) @@ -6690,7 +6690,7 @@ Public Class ClsPaginas ObjNomina.Dispose() Return Nothing End If - Dim CveNomina = ObjNomina.CveNomina + Dim CveNomina As Integer = ObjNomina.CveNomina Dim DTPercepciones As Data.DataTable Dim DTDeducciones As Data.DataTable Dim DTDeducciones2 As New Data.DataTable @@ -6990,26 +6990,26 @@ Public Class ClsPaginas Public Sub PDFReciboDePagos(CveVenta As Integer, CveIE As Integer, CveComplementoPago As Integer, Optional imprimir As Boolean = True, Optional SobreescribirPDF As Boolean = False) Dim params As New List(Of ReportParameter) Dim SerieFolio As String = "" - Dim Serie = "" - Dim Folio = "" - Dim CveCliente = -1 - Dim RFCOrdenante = "" + Dim Serie As String = "" + Dim Folio As String = "" + Dim CveCliente As Integer = -1 + Dim RFCOrdenante As String = "" Dim CveMoneda As Integer = 1 - Dim FolioFiscal = "" - Dim NoSerieCertificado = "" - Dim FechaCertificacion = "" - Dim SelloCFDi = "" - Dim SelloSAT = "" - Dim CertificadoSAT = "" + Dim FolioFiscal As String = "" + Dim NoSerieCertificado As String = "" + Dim FechaCertificacion As String = "" + Dim SelloCFDi As String = "" + Dim SelloSAT As String = "" + Dim CertificadoSAT As String = "" Dim FechaComprobante As Date - Dim CveUnidad = "" - Dim Descripcion = "" - Dim Cantidad = "" - Dim CvePS = "" - Dim PU = "" - Dim Importe = "" - Dim TotalLetra = "" - Dim FechaRecibo = "" + Dim CveUnidad As String = "" + Dim Descripcion As String = "" + Dim Cantidad As String = "" + Dim CvePS As String = "" + Dim PU As String = "" + Dim Importe As String = "" + Dim TotalLetra As String = "" + Dim FechaRecibo As String = "" Dim ProveedorIntermediario As String = "" Dim RegimenFiscalCodigo As String = "" Dim CFDIVersion As String = "4.0" @@ -7135,13 +7135,13 @@ Public Class ClsPaginas If File.Exists(PathXML) Then Dim XmlDoc As New System.Xml.XmlDocument XmlDoc.Load(PathXML) - Dim Version = ValorXML(XmlDoc.DocumentElement, "version") + Dim Version As String = ValorXML(XmlDoc.DocumentElement, "version") Dim namespaces As New XmlNamespaceManager(XmlDoc.NameTable) Dim Prefijo As String = If(XmlDoc.DocumentElement.Prefix = "", "cfd", XmlDoc.DocumentElement.Prefix) Dim cfdVer As String = "" Dim PagoVersion As String = "pago20" - Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento") - Dim validaElementoPago = XmlDoc.DocumentElement("cfdi:Conceptos") + Dim validaElemento As XmlElement = XmlDoc.DocumentElement("cfdi:Complemento") + Dim validaElementoPago As XmlElement = XmlDoc.DocumentElement("cfdi:Conceptos") If Version = "3.3" Then cfdVer = "http://www.sat.gob.mx/cfd/3" PagoVersion = "pago10" @@ -7208,7 +7208,7 @@ Public Class ClsPaginas If Version = "4.0" Then DrRelacionado("ObjetoImpDR") = Relacionado.Attributes("ObjetoImpDR").Value DrRelacionado("MonedaDR") = Relacionado.Attributes("MonedaDR").Value If Version = "4.0" Then - Dim NodosTraslados = Relacionado.SelectNodes($"{PagoVersion}:ImpuestosDR/{PagoVersion}:TrasladosDR/{PagoVersion}:TrasladoDR", namespaces) + Dim NodosTraslados As XmlNodeList = Relacionado.SelectNodes($"{PagoVersion}:ImpuestosDR/{PagoVersion}:TrasladosDR/{PagoVersion}:TrasladoDR", namespaces) For Each NodoTraslados As XmlNode In NodosTraslados Dim BaseDR As String = ValorXML(NodoTraslados, "BaseDR") Dim ImpuestoDR As String = ValorXML(NodoTraslados, "ImpuestoDR") ' ImpuestoDR diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 31bac4cb7..77ee44b44 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -1316,8 +1316,7 @@ Public Class ClsProductosServicios 'Ubicacion temporal Public Function GetMetodosInv() As Boolean - Dim Retorno = False - + Dim Retorno As Boolean = False DataAdapter("PA_Inv_MetodosGet") Try diff --git a/App_Code/ClsProyectos.vb b/App_Code/ClsProyectos.vb index f26258873..e5b3fe7a3 100644 --- a/App_Code/ClsProyectos.vb +++ b/App_Code/ClsProyectos.vb @@ -147,7 +147,7 @@ Public Class ClsProyectos End Function Public Function AddProyecto(Proyecto As String, CveUsuario As Integer, CveEmpresa As Integer, Optional CveSucursal As Integer = -1) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_ProyectoAdd") diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 2b0aaa728..ced536b40 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1942,7 +1942,7 @@ Public Class ClsRH Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1) As Boolean Dim Retorno As Boolean = False - Dim noguardoXcurp = False + Dim noguardoXcurp As Boolean = False SqlDataAdapter("PA_RH_PersonalAdd") With SqlAdapter.SelectCommand.Parameters @@ -7061,7 +7061,7 @@ Public Class ClsRH #Region "T A G S - RH " Public Function GetDatosTagsDocumentos(CvePersonal As Integer, CveEmpresa As Integer) As List(Of TagsDocumentos) - Dim ListaTagsDocumentost = New List(Of TagsDocumentos) + Dim ListaTagsDocumentost As List(Of TagsDocumentos) = New List(Of TagsDocumentos) If PersonalReclutamientoGet(CvePersonal, CveEmpresa) Then diff --git a/App_Code/ClsSAT.vb b/App_Code/ClsSAT.vb index f0650949d..b7eb261df 100644 --- a/App_Code/ClsSAT.vb +++ b/App_Code/ClsSAT.vb @@ -218,7 +218,7 @@ Public Class ClsSAT Private Function ToDataTable69B(Ruta As String) As DataTable ' Dim conn As Odbc.OdbcConnection = Nothing - Dim HasError = False + Dim HasError As Boolean = False Dim DTRespuesta As DataTable = New DataTable DTRespuesta.TableName = "Detalles" diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index 1a79d3b39..464fb1d6b 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -273,8 +273,7 @@ Public Class ClsSisUsuarios Retorno.Procesos = UsuariosProcesos Dim UsuariosIndicadores As New HybridDictionary - Dim dTableIndicadores = getUsuarioIndicadores(Retorno.CveUsuario, Retorno.CveEmpresa, Retorno.CveRol) - + Dim dTableIndicadores As DataTable = getUsuarioIndicadores(Retorno.CveUsuario, Retorno.CveEmpresa, Retorno.CveRol) For Each Row As DataRow In dTableIndicadores.Rows @@ -843,7 +842,7 @@ Public Class ClsSisUsuarios CveUsuarioIng As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, Optional Rol As String = "-1", Optional CveAlmacenAsignado As Integer = -1, Optional AsignarSubProyecto As Boolean = False, Optional AsignarOC As Boolean = False, Optional CvePlataforma As Integer = -1, Optional CveClientePlataforma As Integer = -1, Optional CveProveedorPlataforma As Integer = -1, Optional DescuentoAutorizado As Double = 0, Optional CodigoAcceso As String = "-1", Optional LimiteCreditoAutorizado As Decimal = 0, Optional PorcentajeMaximoAutorizacion As Decimal = 0, Optional DiasMaximoAutorizacion As Integer = 0) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 DataAdapter("PA_Sis_UsuarioAdd") With SqlAdapter.SelectCommand.Parameters .Add("@Usuario", SqlDbType.VarChar).Value = Usuario @@ -910,7 +909,7 @@ Public Class ClsSisUsuarios End Function Public Function AddUsuarioPopUp(Usuario As String, Contraseña As String, Nombre As String, Correo As String, CambiarContraseña As Boolean, CveUsuarioIng As Integer, CveEmpresa As Integer, CveCliente As Integer, CveProveedor As Integer, Optional CvePlataforma As Integer = -1) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 DataAdapter("PA_Sis_UsuarioAddPopUp") With SqlAdapter.SelectCommand.Parameters .Add("@Usuario", SqlDbType.VarChar).Value = Usuario @@ -941,7 +940,7 @@ Public Class ClsSisUsuarios Return Retorno End Function Public Function DeleteClienteUsuario(CveUsuario As Integer, CveCliente As Integer) As Boolean - Dim Retorno = False + Dim Retorno As Boolean = False DataAdapter("PA_Sis_UsuariosClienteDelete") With SqlAdapter.SelectCommand.Parameters @@ -1832,7 +1831,7 @@ Public Class ClsSisUsuarios dtMenu.TableName = "UsuariosModulos" Try - Dim Carpeta = "" + Dim Carpeta As String = "" 'GPS Carpeta = $"{AppDomain.CurrentDomain.BaseDirectory}/Menu/GPS" diff --git a/App_Code/ClsValidaCFDi.vb b/App_Code/ClsValidaCFDi.vb index 79014ea67..c2e19cc0c 100644 --- a/App_Code/ClsValidaCFDi.vb +++ b/App_Code/ClsValidaCFDi.vb @@ -120,7 +120,7 @@ Public Class ClsValidaCFDi 'SI NO PUEDE ENCONTRAR EL ESTATUS UTILIZA EL SERVICIO PARA ESTATUS DE CANCELACION If EsValida = 0 Then - Dim Vigencia = Timbrado.VerificarVigenciaSAT(LFolioFiscal.ToUpper, LRFCEmisor.Replace("%26", "&"), LRFCReceptor.Replace("%26", "&"), Importe, True) + Dim Vigencia As Timbrado.AcuseCancelacionSAT = Timbrado.VerificarVigenciaSAT(LFolioFiscal.ToUpper, LRFCEmisor.Replace("%26", "&"), LRFCReceptor.Replace("%26", "&"), Importe, True) If Vigencia IsNot Nothing Then If Not Vigencia.Estado.ToUpper().Contains("NO ENCONTRADO") AndAlso Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 31f109ff8..8e5dd0133 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2174,7 +2174,7 @@ Public Class ClsVentas Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean, CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String, Optional CveMarca As Integer = -1, Optional EsDistribuidor As Integer = -1) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 DataAdapter("PA_Vta_PromocionesAdd") With SqlAdapter.SelectCommand.Parameters @@ -2206,7 +2206,7 @@ Public Class ClsVentas Public Function AddPromociones(CvePromocion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Actualizar As Boolean) As Integer - Dim Retorno = -1 + Dim Retorno As Integer = -1 DataAdapter("PA_Vta_PromocionesAddClonar") With SqlAdapter.SelectCommand.Parameters @@ -3172,7 +3172,7 @@ Public Class ClsVentas theDataSet.ReadXml(theReader) If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then - Dim sb = New StringBuilder() + Dim sb As StringBuilder = New StringBuilder() For Each item As DataRow In theDataSet.Tables(0).Rows sb.AppendFormat("{0};", item("Uuid").ToString()) @@ -3331,7 +3331,7 @@ Public Class ClsVentas #Region " CANCELAR ANTE SAT " Public Function CancelarVentasSAT(StrVentas As String) As String - Dim CveVentas = StrVentas.Split(","c) + Dim CveVentas As String() = StrVentas.Split(","c) Dim CveVentasError As New List(Of Integer) If CveVentas IsNot Nothing Then @@ -3341,17 +3341,17 @@ Public Class ClsVentas Dim Usuario As Usuario = Nothing Dim ObjEmpresa As New ClsSisEmpresas() - Dim FolioFiscal = "-1" - Dim CveEstatus = -1 - Dim Total = 0.0D - Dim RFCReceptor = "-1" - Dim Nombre = "-1" + Dim FolioFiscal As String = "-1" + Dim CveEstatus As Integer = -1 + Dim Total As Decimal = 0.0D + Dim RFCReceptor As String = "-1" + Dim Nombre As String = "-1" Dim DbRowVenta As DataRow - Dim CveUsuario = -1 - Dim pCveEmpresa = -1 - Dim Contraseña = "-1" + Dim CveUsuario As Integer = -1 + Dim pCveEmpresa As Integer = -1 + Dim Contraseña As String = "-1" - For Each PCveVenta In CveVentas + For Each PCveVenta As String In CveVentas If ObjVentas.GetVenta(PCveVenta.ToEntero, -1) Then DbRowVenta = ObjVentas.DtResultados.Rows(0) @@ -3379,7 +3379,6 @@ Public Class ClsVentas Continue For End If - 'SOLO SI ESTA CANCELADA ANTE SAT EN SIG SE INTENTARA CANCELAR DE NUEVO CONTRA EL SAT If CveEstatus = 5 Then Dim Resp As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(Usuario.Empresa, FolioFiscal, Total, RFCReceptor, Usuario.Empresa.RFC) From 86f4b9fd45d8ad62cb17fdecae943919ad24bc21 Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 28 Aug 2023 19:04:49 -0700 Subject: [PATCH 078/111] - --- Inventarios/AjustesSeccionAlmacen.aspx.vb | 34 +++++++++++------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index 94b2f7290..3f8a90b6e 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -2,6 +2,7 @@ Imports System.Data Imports Extensiones Imports GemBox.Spreadsheet +Imports Telerik.Web.UI.GridExcelBuilder Partial Class Inventarios_AjustesSeccionAlmacen Inherits ClsPaginas @@ -40,10 +41,10 @@ Partial Class Inventarios_AjustesSeccionAlmacen If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacen.SelectedValue.ToEntero, DdlClasificaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FolioAux, CvePS.ToEntero) Then GvD.DataSource = ObjInv.DtResultados - If ObjInv.DtResultados.FiltraParametros("Serie <> '' ").Rows.Count = 0 Then GvD.columns(2).visible = False - If ObjInv.DtResultados.FiltraParametros("Lote <> ''").Rows.Count = 0 Then GvD.columns(3).visible = False - If ObjInv.DtResultados.FiltraParametros("FechaCaducidad IS NOT NULL ").Rows.Count = 0 Then GvD.columns(4).visible = False - If ObjInv.DtResultados.FiltraParametros("CveSeccionAlmacen > 0").Rows.Count = 0 Then GvD.columns(5).visible = False + If ObjInv.DtResultados.FiltraParametros("Serie <> '' ").Rows.Count = 0 Then GvD.Columns(2).Visible = False + If ObjInv.DtResultados.FiltraParametros("Lote <> ''").Rows.Count = 0 Then GvD.Columns(3).Visible = False + If ObjInv.DtResultados.FiltraParametros("FechaCaducidad IS NOT NULL ").Rows.Count = 0 Then GvD.Columns(4).Visible = False + If ObjInv.DtResultados.FiltraParametros("CveSeccionAlmacen > 0").Rows.Count = 0 Then GvD.Columns(5).Visible = False End If @@ -76,14 +77,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL) Dim Dtt As DataTable = Nothing Dim CveMovimientoEntrada As Integer = 0 - Dim Folio = 0 + Dim Folio As Integer = 0 Dim ErrorMovInv As Boolean = False - Dim TextoError = "" + Dim TextoError As String = "" Dim Contador As Integer = 0 Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero - - Dim Fecha As Date = DateTime.Now 'AGREGAMOS LA ENTRADA Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 44, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, @@ -153,7 +152,6 @@ Partial Class Inventarios_AjustesSeccionAlmacen Contador += 1 End If - Next If Not ErrorMovInv AndAlso Contador > 0 Then @@ -165,11 +163,11 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim ind As Integer = 0 For Each Row As DataRow In resultado.Rows - Dim CvePS = Row("CvePS").ToString().ToEntero() + Dim CvePS As Integer = Row("CvePS").ToString().ToEntero() Cantidad = Row("Cantidad").ToString.ToDecimal() Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal() Dim CveUM As Integer = Row("CveUM").ToString().ToEntero() - Dim CveSeccionAlmacen As Integer = Lista(Row("CvePS")).ToString().ToEntero() 'GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() + Dim CveSeccionAlmacen As Integer = 0 ' Lista(Row("CvePS").ToString().ToEntero()).ToString.ToEntero 'GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal() Dim Serie As String = Row("Serie").ToString() Dim Lote As String = Row("Lote").ToString() @@ -303,7 +301,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen Dim FileExcel As New ExcelFile() - Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName) + Dim worksheet As ExcelWorksheet = FileExcel.Worksheets.Add(DtExcel.TableName) worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With { .ColumnHeaders = True, @@ -313,8 +311,8 @@ Partial Class Inventarios_AjustesSeccionAlmacen worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255)) worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255) - Dim columnCount = worksheet.CalculateMaxUsedColumns() - For i = 0 To columnCount + Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns() + For i As Integer = 0 To columnCount worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1)) Next @@ -344,7 +342,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen Private Sub CargarArchivo(Ruta As String, FileName As String, CveAlmacen As Integer, CveSubProyecto As Integer) Dim DtExcel As DataTable = ReadExcelFile(Ruta + FileName, True) - Dim ErrorArchivo = False + Dim ErrorArchivo As Boolean = False If Not ErrorArchivo AndAlso DtExcel IsNot Nothing Then If Not DtExcel.Columns(0).ColumnName = "Cantidad" Then Alert("El nombre de la primera columna debe ser 'Código'.Favor de corregirlo", TipoMensaje.MsgError) @@ -397,11 +395,11 @@ Partial Class Inventarios_AjustesSeccionAlmacen End If 'SALIDA ALMACÉN - Dim CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", TipoCambio:=-1, + Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", TipoCambio:=-1, MovimientoFijo:=False, Modulo:="ASA/SA") 'ENTRADA ALMACÉN - Dim CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 2, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", TipoCambio:=-1, + Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(CveAlmacen, 2, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", TipoCambio:=-1, MovimientoFijo:=False, Modulo:="ASA/EA", CveMovimientoRelacionado:=CveMovimientoSalida) Dim dtSecciones As DataTable = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, CveAlmacen) @@ -478,7 +476,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen resultado = ObjInventario.DtResultados Dim RowEntrada As DataRow = ObjInventario.DtResultados.Rows(0) - Dim CvePSEntrada = RowEntrada("CvePS").ToString().ToEntero() + Dim CvePSEntrada As Integer = RowEntrada("CvePS").ToString().ToEntero() Dim PUEntrada As Decimal = RowEntrada("PUOriginal").ToString().ToDecimal() Dim CveUMEntrada As Integer = RowEntrada("CveUM").ToString().ToEntero() From a520e3254b0beef95b9d3509b9053262538f8aa6 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 29 Aug 2023 09:23:10 -0700 Subject: [PATCH 079/111] -- option explicit --- Inventarios/InventarioFisicoDetalle.aspx.vb | 22 ++++++++++----------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb index 664ff0a41..7ae714df8 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx.vb +++ b/Inventarios/InventarioFisicoDetalle.aspx.vb @@ -100,7 +100,7 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim ObjInventario As New ClsInventarios If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1, UsuarioActual.CveUsuario) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then - Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus") + Dim CveEstatus As String = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus") Select Case CveEstatus Case "0" 'NUEVO CveSubProyecto = ObjInventario.CveSubProyectoInventario @@ -341,23 +341,21 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim CveSeccionAlmacen As Integer = -1 Dim SeccionAlmacen As String = "" - Dim Cantidad = TxtCantidadProducto.Text.ToDouble + Dim Cantidad As Double = TxtCantidadProducto.Text.ToDouble Dim dr As DataRow 'dr = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}' OR Codigo = '{Codigo}' ") dr = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{CodigoBarras}' OR Codigo = '{Codigo}'") - - If dr IsNot Nothing Then CveProducto = dr("CvePS").ToString.ToEntero CveUnidadMedida = dr("CveUnidadMedida").ToString.ToEntero 'Dim AplicaSeccion As Boolean = dr("AplicaSeccion") = "1" - Dim AplicaCaducidad As Boolean = dr("AplicaCaducidad").ToString = "1" - Dim AplicaLote As Boolean = dr("AplicaLote").ToString = "1" - Dim AplicaSerie As Boolean = dr("AplicaSerie").ToString = "1" - Dim AplicaSeccion As Boolean = dr("AplicaSeccion").ToString = "1" + Dim AplicaCaducidad As Boolean = dr("AplicaCaducidad").ToString = "True" + Dim AplicaLote As Boolean = dr("AplicaLote").ToString = "True" + Dim AplicaSerie As Boolean = dr("AplicaSerie").ToString = "True" + Dim AplicaSeccion As Boolean = dr("AplicaSeccion").ToString = "True" 'divSeccionAlmacen.Visible = AplicaSeccion divLote.Visible = AplicaLote @@ -643,7 +641,7 @@ Partial Class Inventarios_InventarioFisicoDetalle params.Add(New ReportParameter("FechaFin", lbFechaF.Text)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToString)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) ImprimirPDF("Empresas/Grales/Formatos/RepInventarioFisicoDetalle.rdlc", DtDatos, params, String.Format("Reporte Inventario Físico-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) @@ -669,7 +667,7 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim NombreArchivo As String SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) Dim workbook As New ExcelFile() - Dim worksheet = workbook.Worksheets.Add("Productos") + Dim worksheet As ExcelWorksheet = workbook.Worksheets.Add("Productos") worksheet.InsertDataTable(DtPS, New InsertDataTableOptions() With { .ColumnHeaders = True, @@ -682,8 +680,8 @@ Partial Class Inventarios_InventarioFisicoDetalle 'worksheet.Columns("Q").Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(217, 217, 217), SpreadsheetColor.FromArgb(255, 255, 255)) worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(217, 217, 217), SpreadsheetColor.FromArgb(255, 255, 255)) - Dim columnCount = worksheet.CalculateMaxUsedColumns() - For i = 0 To columnCount + Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns() + For i As Integer = 0 To columnCount worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1)) Next From a8c9feadddcc9d979dbf2d77f8f54ce22c42a6b5 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 29 Aug 2023 10:36:10 -0700 Subject: [PATCH 080/111] =?UTF-8?q?--=20mostrar=20liga=20a=20prep=C3=B3liz?= =?UTF-8?q?a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/RepRembolsoComprobaciones.aspx | 2 +- Compras/RepRembolsoComprobaciones.aspx.vb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Compras/RepRembolsoComprobaciones.aspx b/Compras/RepRembolsoComprobaciones.aspx index 3b0965312..3c3ac64f7 100644 --- a/Compras/RepRembolsoComprobaciones.aspx +++ b/Compras/RepRembolsoComprobaciones.aspx @@ -243,7 +243,7 @@ - + diff --git a/Compras/RepRembolsoComprobaciones.aspx.vb b/Compras/RepRembolsoComprobaciones.aspx.vb index 2dc77cd24..23e243447 100644 --- a/Compras/RepRembolsoComprobaciones.aspx.vb +++ b/Compras/RepRembolsoComprobaciones.aspx.vb @@ -128,7 +128,7 @@ Partial Class Compras_RepRembolsoComprobaciones If e.Row.DBCampo("Original").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldoOriginal"), Literal).Text = "" If e.Row.DBCampo("Abonado").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAbonado"), Literal).Text = "" If e.Row.DBCampo("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlSaldo"), Literal).Text = "" - If Not e.Row.DBCampo("IdPoliza").ToEntero > 0 Then e.Row.Cells(13).Text = "" + If Not e.Row.DBCampo("CvePrePoliza").ToEntero > 0 Then e.Row.Cells(12).Text = "" End If End Sub @@ -137,7 +137,7 @@ Partial Class Compras_RepRembolsoComprobaciones Dim ObjMov As New ClsContabilidad(ObjComp.IniciaTransacSQL) Dim ObjAC As ClsContPAQi = Nothing - Dim TieneError = False + Dim TieneError As Boolean = False Dim CvePrePoliza As Integer = 0 Dim IdPoliza As Integer = 0 Dim Msg As New StringBuilder From 3d0180f7f9648aab7ca12e8459c286c6ab4c9a01 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 29 Aug 2023 13:31:52 -0700 Subject: [PATCH 081/111] - modal de importaciones --- Compras/Compras.aspx | 13 ++- Compras/Compras.aspx.vb | 195 +++++++++++++++++++--------------------- 2 files changed, 96 insertions(+), 112 deletions(-) diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx index f56cf82e1..a6b160135 100644 --- a/Compras/Compras.aspx +++ b/Compras/Compras.aspx @@ -38,22 +38,21 @@
  • Costo Indirecto/Importaciones
  • - +
  • - +
  • - - +
  • Descontabilizar @@ -69,7 +68,7 @@
  • Pagar
  • - +
  • <%----%> @@ -77,9 +76,7 @@
  • - - - +
  • diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index f618ce353..7bb164de0 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1175,6 +1175,9 @@ Partial Class Compras_Compras 'LbTotalPorDevengar.Attributes.Add("OnInnerTextChanged", "TotalDevendar();") 'Mensaje temporalca + If UsuarioActual.Empresa.Funcionalidad(155) <> "" Then liFletesImportaciones.Visible = True ' FNC Importaciones + If UsuarioActual.Empresa.Funcionalidad(158) <> "" Then liFletesImportaciones.Visible = True ' FNC Indirectos + RBLPago.Visible = True If UsuarioActual.Empresa.UsaAC Then RBLPago.Items.RemoveAt(2) 'Elimina Reembolso cuando es AC @@ -1207,7 +1210,7 @@ Partial Class Compras_Compras DdlSubProyecto.AutoPostBack = True GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing - Dim extrafiltro = "Estatus=1 AND " + Dim extrafiltro As String = "Estatus=1 AND " If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then extrafiltro = "" End If @@ -1396,8 +1399,6 @@ Partial Class Compras_Compras BtnGuardar.ToolTip = "Obliga a seleccionar una Orden de compra para su registro." End If - - 'Valida Proceso 119 para ROL Administrador de obra - Bloquea Contado If UsuarioActual.TienePermisoProceso(119) Then RBLPago.Items(1).Enabled = False @@ -10907,7 +10908,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, ObjAF.Dispose() End Sub Protected Sub DdlTipoMantemiento_SelectedIndexChanged(sender As Object, e As EventArgs) - Dim dr = TmpDT.Rows(CType(CType(sender, DropDownList).NamingContainer, GridViewRow).RowIndex) + Dim dr As DataRow = TmpDT.Rows(CType(CType(sender, DropDownList).NamingContainer, GridViewRow).RowIndex) dr("AFTipoMantenimiento") = CType(CType(sender, DropDownList).NamingContainer, GridViewRow).FCDropDownList("DdlTipoMantemiento").SelectedValue.ToEntero @@ -11006,7 +11007,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, If TxtAjustePorcentaje.Text.ToDecimal <> 0 Then For Each Dr As DataRow In TmpDT.Rows 'Dr("PU") = Dr("PU").ToString.ToDecimal * ((100 - TxtAjustePorcentaje.Text.ToDecimal) / 100) - Dim TotalAnterior = Dr("Total").ToString.ToDecimal + Dim TotalAnterior As Decimal = Dr("Total").ToString.ToDecimal Dr("Total") = Dr("Total").ToString.ToDecimal * ((100 - TxtAjustePorcentaje.Text.ToDecimal) / 100) Dr("Descuento") = TotalAnterior - Dr("Total").ToString.ToDecimal Next @@ -13578,7 +13579,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, CargaOC() End Sub Private Sub CargaOC() - Dim EntregaDirecta = 0 + Dim EntregaDirecta As Integer = 0 DivOCSolicitudAnticipo.Visible = False DivOCSolicitudAnticipoModal.Visible = False @@ -13592,8 +13593,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, GvOC1.Columns(1).Visible = True End If - Dim CvesOC = "" - + Dim CvesOC As String = "" If PopUpOC Then CvesOC = HdnVCveOC.Value @@ -13615,7 +13615,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, End If Next Else - Dim TextoErrorOC = "" + Dim TextoErrorOC As String = "" Dim ArrayCveOC As String() = TxtOC.Text.Split(New Char() {","c}) For i As Integer = 0 To ArrayCveOC.Count - 1 If OC.GetOrdenesCompraRep("OC", -1, -1, -1, -1, MinFecha, MaxFecha, -1, CveProveedor, ArrayCveOC(i).ToEntero, -1, -1, UsuarioActual.CveEmpresa, -1) Then @@ -13672,7 +13672,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, If TxtOC.Text <> "" Then 'VARIABLES - Dim TextoObservaciones = "" + Dim TextoObservaciones As String = "" LtOCPromocion.Text = "" IvaAcumulado = 0 DTOCTemp = New DataTable @@ -13687,7 +13687,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'CARGAMOS LOS DATOS DE LAS OC Dim ObjOC As New ClsOC Dim ArrayCveOC As String() = HdnVCveOC.Value.Split(New Char() {","c}) - Dim FoliosOCAnticipo = "", FoliosOCAnticipoIE = "" + Dim FoliosOCAnticipo As String = "", FoliosOCAnticipoIE As String = "" Dim StrPromos As New StringBuilder For Each CveOCItem As String In ArrayCveOC.Distinct @@ -13720,9 +13720,9 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, End If 'PROMOCIONES - Dim Promocion = ObjOC.DtResultados.Rows(0)("Promocion").ToString + Dim Promocion As String = ObjOC.DtResultados.Rows(0)("Promocion").ToString If Not String.IsNullOrEmpty(Promocion) Then - Dim FolioOC = ObjOC.DtResultados.Rows(0)("FolioOC").ToString + Dim FolioOC As String = ObjOC.DtResultados.Rows(0)("FolioOC").ToString StrPromos.Append($"OC #{FolioOC} {Promocion}
    ") StrPromos.AppendLine() End If @@ -13739,7 +13739,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'MOVIMIENTOS DE ALMACÉN Dim ObjInventarios As New ClsInventarios - Dim FoliosOCAlmacen = "" + Dim FoliosOCAlmacen As String = "" For Each CveOCItem As String In ArrayCveOC.Distinct If ObjInventarios.GetMovimientosOC(CveOCItem.ToEntero, UsuarioActual.CveEmpresa) Then If ObjInventarios.DtResultados.Rows.Count > 0 Then @@ -13842,7 +13842,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, CargaTotalesOC() 'Diferencia permitida $ entre OC y Compra - Dim DiferenciaPermitida = 1 + Dim DiferenciaPermitida As Decimal = 1 'VINCULACION TOTAL If CargaInicial And DivTipoCambioOC.Visible = False Then @@ -13911,17 +13911,15 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Protected Sub GvOC1_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvOC1.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then - Dim JSCambiaScript = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});" + Dim JSCambiaScript As String = $"CalculaTotalOCEdit('{e.Row.DBCampo("PS").Replace("'", "").Replace(vbLf, " ").Replace(vbCrLf, " ")}', {e.Row.DBCampo("Cantidad").ToString.ToDouble}, {e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID}, {e.Row.FCTextBox("TxtTotalOC1").ClientID}, {e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSImporte").ClientID}, {e.Row.DBCampo("IVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IVA").ClientID},{e.Row.DBCampo("RetIVA").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetIVA").ClientID},{e.Row.DBCampo("RetISR").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1RetISR").ClientID},{e.Row.DBCampo("IEPSPS").ToString.ToDouble},{e.Row.FCHiddenField("HdnOC1IEPSIVA").ClientID},{e.Row.DBCampo("Descuento")},{e.Row.FCHiddenField("HdnOC1Descuento").ClientID},{e.Row.DBCampo("IVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetIVAPorcentaje").ToString.ToDouble},{e.Row.DBCampo("RetISRPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSPorcentaje").ToString.ToDouble},{e.Row.DBCampo("IEPSPSIVAPorcentaje").ToString.ToDouble});" e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"LimitaCantidadOC({e.Row.DBCampo("CantidadPendienteVincular")}, this);{JSCambiaScript}") e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", JSCambiaScript) e.Row.FCTextBox("TxtCantidad").Attributes.Add("onblur", $"ValidaImporteCero('{e.Row.DBCampo("PS").Replace("'", "")}',{e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID});") e.Row.FCTextBox("TxtPU").Attributes.Add("onblur", $"ValidaImporteCero('{e.Row.DBCampo("PS").Replace("'", "")}',{e.Row.FCTextBox("TxtCantidad").ClientID}, {e.Row.FCTextBox("TxtPU").ClientID});") - RegistraScript(JSCambiaScript) - If e.Row.DataKey("FolioREQ").ToString.Trim.Length > 0 Then Dim LblOC As Label = e.Row.FCLabel("LblOC") LblOC.Attributes.Add("data-toggle", "tooltip") @@ -13929,8 +13927,6 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, LblOC.Attributes.Add("title", "REQ: " & e.Row.DataKey("FolioREQ").ToString) End If - - If e.Row.DBCampo("CveTipoPS").ToEntero = 2 And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 Then Select Case e.Row.DBCampo("EstatusInventario").ToEntero Case 1 @@ -13967,14 +13963,14 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Private Sub CargaTotalesOC() - Dim TotalOC = 0.0D + Dim TotalOC As Decimal = 0.0D For Each gvr As GridViewRow In GvOC1.Rows TotalOC += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal Next 'SUBTOTAL OC - LbSubTotalOC1Mod.Text = (TotalOC + DTOCGV.SUM("Descuento")).FormatoNumero - LbSubTotalOC1.Text = (TotalOC + DTOCGV.SUM("Descuento")).FormatoNumero + LbSubTotalOC1Mod.Text = (TotalOC + DTOCGV.SUM("Descuento")).FormatoNumero() + LbSubTotalOC1.Text = (TotalOC + DTOCGV.SUM("Descuento")).FormatoNumero() 'SUBTOTAL2 OC LbSubTotal2OC1Mod.Text = TotalOC.FormatoNumero @@ -14081,14 +14077,14 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, ' End If 'End If - Dim SubTotalGV = 0.0D + Dim SubTotalGV As Decimal = 0.0D Dim Amortizacion As Decimal = TmpDT.SUMD("Total") If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then Amortizacion = TmpDT.SUMD("ImporteSinImpuestos") End If Dim SubTotalCompra As Decimal = Amortizacion - Dim DiferenciaPermitida = 1 - Dim Cont = 0 + Dim DiferenciaPermitida As Decimal = 1 + Dim Cont As Integer = 0 'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") For Each gvr As GridViewRow In GvOC1.Rows SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal @@ -14158,15 +14154,15 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, End If 'PSCodigo DE XML IP - Dim DtTemporalXML = TmpDT.Copy - Dim IndexTmpOriginal = 0 + Dim DtTemporalXML As DataTable = TmpDT.Copy + Dim IndexTmpOriginal As Integer = 0 'Borramos el TmpDT CreaDTCompras() 'Iteramos el GridView de la OC Dim dr As DataRow - Dim Index = 0 + Dim Index As Integer = 0 Dim MensajeCostoCero As New StringBuilder Dim TotalRows As Integer = 0 For Each gvr As GridViewRow In GvOC1.Rows @@ -14226,7 +14222,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Dim CveSATPSActualizado As Boolean = gvr.FCDropDownLost("DdlSATPS").SelectedValue.ToEntero <> dr("CveSATPS").ToString.ToEntero '[IPP] PROVISIONAL PARA TIPO GASTO If GlobalDTTiposGastos(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTTiposGastos(UsuarioActual.CveEmpresa).Rows.Count = 1 Then - Dim DrTipoGasto = GlobalDTTiposGastos(UsuarioActual.CveEmpresa).FiltroPrimero("") + Dim DrTipoGasto As DataRow = GlobalDTTiposGastos(UsuarioActual.CveEmpresa).FiltroPrimero("") If DrTipoGasto IsNot Nothing Then CveTipoGasto = DrTipoGasto("CveTipoGasto").ToString.ToEntero TipoGasto = DrTipoGasto("TipoGasto").ToString @@ -14489,7 +14485,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, '[IPP] PROVISIONAL PARA TIPO GASTO If GlobalDTTiposGastos(UsuarioActual.CveEmpresa) IsNot Nothing AndAlso GlobalDTTiposGastos(UsuarioActual.CveEmpresa).Rows.Count = 1 Then - Dim DrTipoGasto = GlobalDTTiposGastos(UsuarioActual.CveEmpresa).FiltroPrimero("") + Dim DrTipoGasto As DataRow = GlobalDTTiposGastos(UsuarioActual.CveEmpresa).FiltroPrimero("") If DrTipoGasto IsNot Nothing Then CveTipoGasto = DrTipoGasto("CveTipoGasto").ToString.ToEntero TipoGasto = DrTipoGasto("TipoGasto").ToString @@ -14497,7 +14493,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, End If 'AGREGA PS - Dim IndexVinculacionOC = AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto) + Dim IndexVinculacionOC As Integer = AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, RetIVA, RetISR, IEPSPS, IEPSPSIVA, Descuento, CveOrdenCompraDetalle, False, CantidadF:=CantidadF, EntregaDirecta:=EntregaDirecta, CveSATPS:=CveSATPS, CveTipoGasto:=CveTipoGasto, TipoGasto:=TipoGasto) 'CARGA PE TmpDT.Rows(IndexVinculacionOC)("CvePresupuestoEgreso") = dr("CvePresupuestoEgreso").ToString.ToEntero @@ -14565,14 +14561,14 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, CargaVinculacionOC() End Sub Protected Sub BtnDividirCompra_Click(sender As Object, e As EventArgs) - Dim Cantidad = CType(CType(sender, Button).NamingContainer, GridViewRow).FCTextBox("TxtDividir").Text.ToDecimal + Dim Cantidad As Decimal = CType(CType(sender, Button).NamingContainer, GridViewRow).FCTextBox("TxtDividir").Text.ToDecimal If Cantidad < 0.1 Then Exit Sub End If - Dim dr = TmpDT.Rows(CType(CType(sender, Button).NamingContainer, GridViewRow).RowIndex) - Dim drNuevo = TmpDT.NewRow + Dim dr As DataRow = TmpDT.Rows(CType(CType(sender, Button).NamingContainer, GridViewRow).RowIndex) + Dim drNuevo As DataRow = TmpDT.NewRow drNuevo.ItemArray = dr.ItemArray drNuevo("Cantidad") = Cantidad @@ -14798,7 +14794,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'Si los costosindirectos no suman el total exacto del flete ajustamos el ultimo concepto If CostoIndirectoTotal <> TotalFlete AndAlso IndiceActualizar >= 0 Then - Dim Diferencia = TotalFlete - CostoIndirectoTotal + Dim Diferencia As Decimal = TotalFlete - CostoIndirectoTotal TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen") = TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen").ToString.ToDouble + Diferencia TmpDT.Rows(IndiceActualizar)("OtrosGastos") = TmpDT.Rows(IndiceActualizar)("OtrosGastos").ToString.ToDouble + Diferencia End If @@ -14898,10 +14894,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Next UpGVServicios.Update() - If Not TotalFlete > 0 Then Exit Sub - 'Asignamos los costos indirectos y los indices For Each Drt As DataRow In TmpDT.Rows If ListaConsecutivas.Contains(Drt("Consec").ToString) Then @@ -14916,7 +14910,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'Si los costosindirectos no suman el total exacto del flete ajustamos el ultimo concepto If CostoIndirectoTotal <> TotalFlete AndAlso IndiceActualizar >= 0 Then - Dim Diferencia = TotalFlete - CostoIndirectoTotal + Dim Diferencia As Decimal = TotalFlete - CostoIndirectoTotal TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen") = TmpDT.Rows(IndiceActualizar)("CostoIndirectoAlmacen").ToString.ToDouble + Diferencia TmpDT.Rows(IndiceActualizar)("OtrosGastos") = TmpDT.Rows(IndiceActualizar)("OtrosGastos").ToString.ToDouble + Diferencia End If @@ -15011,9 +15005,6 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, GVServicios.Visible = False End If - If UsuarioActual.Empresa.Funcionalidad(155) <> "" Then LnkFletesImportaciones.Visible = True ' FNC Importaciones - If UsuarioActual.Empresa.Funcionalidad(158) <> "" Then LnkFletesImportaciones.Visible = True ' FNC Indirectos - End Sub Public Function AplicarCostoIndirecto(ObjInv As ClsInventarios, ObjCompras As ClsCompras) As Boolean @@ -15054,7 +15045,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'If total > 0 Then If dtTemporal IsNot Nothing Then - Dim TotalFacturas = dtTemporal.SUM("Total").ToString.ToDecimal + Dim TotalFacturas As Decimal = dtTemporal.SUM("Total").ToString.ToDecimal For Each row As DataRow In dtTemporal.Rows Dim prorrateo As Decimal prorrateo = (row("PU").ToString.ToDecimal * TotalServicios) / TotalFacturas @@ -15091,7 +15082,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, If ObjCompras.GetCompraDetalle(CveCompra, UsuarioActual.CveEmpresa) Then If ObjInv.GetMovimientosDetalle(-1, UsuarioActual.CveEmpresa, CveCompra) Then Dtcompra = ObjInv.DtResultados - Dim TotalProductos = Dtcompra.SUM("Total").ToString.ToDecimal + Dim TotalProductos As Decimal = Dtcompra.SUM("Total").ToString.ToDecimal If TotalProductos > 0 Then For Each row As DataRow In Dtcompra.Rows Dim prorrateo As Decimal @@ -16247,15 +16238,13 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, End Sub Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) - - If Modalidad <> "U" Or Not CveFactura > 0 Then DdlPSChange() End If If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then GlobalDTCultivosCuadro(UsuarioActual.CveEmpresa) = Nothing - Dim extrafiltro = "Estatus=1 AND " + Dim extrafiltro As String = "Estatus=1 AND " If Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then extrafiltro = "" End If @@ -16512,7 +16501,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Dim dttemp As New DataTable dttemp.Columns.Add("CveSubProyecto", GetType(Integer)) dttemp.Columns.Add("CvePS", GetType(Integer)) - Dim DrPS = dttemp.NewRow + Dim DrPS As DataRow = dttemp.NewRow DrPS("CveSubProyecto") = DdlSubProyecto.SelectedValue.ToString.ToEntero DrPS("CvePS") = DdlPS.SelectedValue.ToString.ToEntero dttemp.Rows.Add(DrPS) @@ -16558,8 +16547,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Select Case Modalidad Case "A" 'ADD - Dim SATClavePS = -1 - Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") + Dim SATClavePS As Integer = -1 + Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") If PSRow IsNot Nothing Then SATClavePS = PSRow("SATClavePS").ToString.ToEntero End If @@ -16652,8 +16641,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Row = TmpDT.NewRow() Dim Retorno As Integer = 0 - Dim CveContrato = -1 - Dim CveSubProyecto = -1 + Dim CveContrato As Integer = -1 + Dim CveSubProyecto As Integer = -1 Dim Valores As String() ''CONTRATOS @@ -16713,8 +16702,6 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, End If End If End If - - Try If (DrPS("CvePSCargo").ToString <> "") Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto) CveTipoPS = 2 @@ -16723,7 +16710,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, End Try - Dim DecimalesPermitidos = 6 + Dim DecimalesPermitidos As Integer = 6 Row("CveConcepto") = TmpDT.Rows.Count + 1 Row("Cantidad") = Math.Round(Cantidad, DecimalesPermitidos) @@ -16868,7 +16855,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'BANDERA - Dim AplicaCalculaTotales = False + Dim AplicaCalculaTotales As Boolean = False 'DATOS GENERALES DrPS("Obs") = TxtObsPS.Text.Trim @@ -16879,10 +16866,10 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, DrPS("CveContratoDetalle") = CveContratoDetalle 'IMPORTES - [CANTIDAD Y PRECIO] - Dim Cantidad = DrPS("Cantidad").ToString.ToDouble - Dim PU = DrPS("PU").ToString.ToDouble - Dim Descuento = DrPS("Descuento").ToString.ToDouble - Dim Total = (Cantidad * PU) - Descuento + Dim Cantidad As Double = DrPS("Cantidad").ToString.ToDouble + Dim PU As Double = DrPS("PU").ToString.ToDouble + Dim Descuento As Double = DrPS("Descuento").ToString.ToDouble + Dim Total As Double = (Cantidad * PU) - Descuento DrPS("NoDeducible") = ChkEsNoDeduciblePS.Checked Dim ActualizarIva As Boolean = False @@ -16907,7 +16894,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'PS - CLASIFICACION If DdlPS.SelectedValue.ToEntero > 0 Then - Dim PSRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") + Dim PSRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPS.SelectedValue.ToEntero).FiltroPrimero("") If PSRow IsNot Nothing Then Dim CveTipoPS As Integer = PSRow("CveTipoPS").ToString.ToEntero If PSRow("CvePSCargo").ToString <> "" Then 'si es un producto de usado. que se registre contablemente como alamcen(como producto) @@ -16949,11 +16936,11 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'IMPUESTOS: SI ES COMPRA, FACUTRA O CON OC, NO MODIFICA IMPUESTOS!! 'Dim IVA = (TxtIVAModal.Text.ToDouble / 100) - Dim IVA = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) - Dim RetISR = (TxtRetISRModal.Text.ToDecimal / 100) - Dim RetIVA = (TxtRetIVAModal.Text.ToDecimal / 100) - Dim IEPSPS = (TxtIEPSModal.Text.ToDecimal / 100) - Dim IEPSPSIVA = 0 + Dim IVA As Decimal = Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2) + Dim RetISR As Decimal = (TxtRetISRModal.Text.ToDecimal / 100) + Dim RetIVA As Decimal = (TxtRetIVAModal.Text.ToDecimal / 100) + Dim IEPSPS As Decimal = (TxtIEPSModal.Text.ToDecimal / 100) + Dim IEPSPSIVA As Decimal = 0 'I f Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then 'If DdlIVA.SelectedValue.ToDouble = 0 Then DrPS("IVA") = 0 Else DrPS("IVA") = IVA * Total @@ -17690,14 +17677,14 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Private Sub CargaNCINV(Optional ShowAllPendientes As Boolean = False) - Dim SaldoAnticipo = 0.0 + Dim SaldoAnticipo As Decimal = 0 Dim CveCompras As String = "" If ChkNCInvNC.Checked Then If Not ShowAllPendientes Then For Each gvr As GridViewRow In GvFacturaNC.Rows If gvr.FCCheckBox("ChkFacturaNC") IsNot Nothing AndAlso gvr.FCCheckBox("ChkFacturaNC").Checked Then - SaldoAnticipo += gvr.FCTextBox("TxtImporte").Text.ToDouble + SaldoAnticipo += gvr.FCTextBox("TxtImporte").Text.ToDecimal If CveCompras <> "" Then CveCompras = $"{CveCompras},{gvr.DataKey("CveCompra").ToString}" Else @@ -17709,7 +17696,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Else For Each gvr As GridViewRow In GVAnticipos.Rows If gvr.FCCheckBox("Chk") IsNot Nothing AndAlso gvr.FCCheckBox("Chk").Checked Then - SaldoAnticipo += gvr.FCTextBox("TxtAnticipo").Text.ToDouble + SaldoAnticipo += gvr.FCTextBox("TxtAnticipo").Text.ToDecimal End If Next @@ -17780,8 +17767,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Exit Sub End If - Dim Contador = 0 - Dim CveCompraNC = -1 + Dim Contador As Integer = 0 + Dim CveCompraNC As Integer = -1 For Each gvr As GridViewRow In GVAnticipos.Rows If gvr.FCCheckBox("Chk") IsNot Nothing AndAlso gvr.FCCheckBox("Chk").Checked Then Contador += 1 @@ -17914,7 +17901,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Dim ObjCompra As New ClsCompras Dim ObjContabilidad As New ClsContabilidad(ObjCompra.IniciaTransacSQL) - Dim Estatus = ActualizarPrePoliza(ObjContabilidad, ObjCompra) + Dim Estatus As Boolean = ActualizarPrePoliza(ObjContabilidad, ObjCompra) If Estatus Then ObjCompra.Commit() @@ -17938,12 +17925,12 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, End If ObjInventarios.Dispose() - Dim DtTemporal = TmpDT.Copy + Dim DtTemporal As DataTable = TmpDT.Copy DtTemporal.Columns.Add("ImporteEnAlmacen", GetType(Decimal)) Dim ObjConta As New ClsContabilidad ObjConta.IniciaTransacSQL() - Dim TieneError = True + Dim TieneError As Boolean = True 'ELIMINA DETALLES DE [AF - INV - GASTO] If ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then @@ -17959,15 +17946,15 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'CONFIGURACIONES Dim CuentasContablesInvalidas As New StringBuilder - Dim CveProveedorConcepto = 0 - Dim Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" - Dim Multiplicador = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1) + Dim CveProveedorConcepto As Integer = 0 + Dim Concepto As String = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}" + Dim Multiplicador As Decimal = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1) - Dim ImporteMovimiento = 0.0D - Dim importeMN = 0.0D + Dim ImporteMovimiento As Decimal = 0.0D + Dim importeMN As Decimal = 0.0D - Dim TipoCambioActual = 0.0D - Dim TipoCambioPago = 0.0D + Dim TipoCambioActual As Decimal = 0.0D + Dim TipoCambioPago As Decimal = 0.0D Dim FechaMovimiento As Date = TxtFecha.Text.ToDate 'TIPO CAMBIO @@ -17991,7 +17978,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'INGRESA DETALLE DE AF(49) - TipoAF 2 es para las compras - Dim DT = DtTemporal.FiltraParametros("ISNULL(TipoAF,0) = 2") + Dim DT As DataTable = DtTemporal.FiltraParametros("ISNULL(TipoAF,0) = 2") If DT.Rows.Count > 0 AndAlso DdlTipoComprobante.SelectedValue <> "NC" Then For Each Row2 As DataRow In DT.Rows ImporteMovimiento = Row2("Total").ToString.ToDecimal * Multiplicador @@ -18007,10 +17994,10 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, ImporteMovimiento = 0 'INGRESA DETALLE DE ALMACÉN(68) - Dim DtAlmacenes = GlobalDTAlmacen(UsuarioActual.CveEmpresa) + Dim DtAlmacenes As DataTable = GlobalDTAlmacen(UsuarioActual.CveEmpresa) If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then - Dim CveMovimientoInventario = -1 - Dim ModalidadAlmacen = -1 + Dim CveMovimientoInventario As Integer = -1 + Dim ModalidadAlmacen As Integer = -1 Dim DtMovtosAlmacen As New DataTable DtMovtosAlmacen.Columns.Add("CveMovimiento", GetType(Integer)) DtMovtosAlmacen.Columns.Add("CveCuenta", GetType(Integer)) @@ -18033,7 +18020,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Exit For End If - Dim DrInv = DtMovtosAlmacen.NewRow + Dim DrInv As DataRow = DtMovtosAlmacen.NewRow DrInv("CveMovimiento") = CveMovimientoInventario DrInv("Importe") = ImporteMovimiento DtMovtosAlmacen.Rows.Add(DrInv) @@ -18078,7 +18065,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, End If If DT.Rows.Count > 0 Then - Dim ImporteAlmacen = 0.0D + Dim ImporteAlmacen As Decimal = 0.0D For Each Row2 As DataRow In DT.Rows If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then ImporteMovimiento = DtTemporal.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND CveClasificacion = {0} AND CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal @@ -18129,8 +18116,8 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Dim ObjContabilidad As New ClsContabilidad Dim ObjCompras As New ClsCompras(ObjContabilidad.IniciaTransacSQL()) Dim ObjEventos As New ClsOIEventos(ObjContabilidad.IniciaTransacSQL()) - Dim TieneError = False - Dim MensajeError = "" + Dim TieneError As Boolean = False + Dim MensajeError As String = "" If ObjEventos.AddEventoBitacora($"Se actualizó el Tipo de Cambio de la compra. TC anterior: {TxtActualizarTC_TCActual.Text.FormatoNumero(4)} | TC actual: {TxtActualizarTC_TCActualizar.Text.FormatoNumero(4)}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then If ObjCompras.UpdateCompraTipoCambio(TxtActualizarTC_TCActualizar.Text.ToDouble, CveCompra, CvePrePoliza, UsuarioActual.CveEmpresa) Then @@ -18427,7 +18414,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Dim importeMovimiento As Decimal = 0 Dim importeMN As Decimal = 0 Dim tipoCambioActual As Decimal = 0 - Dim Multiplicador = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1) + Dim Multiplicador As Decimal = If(DdlTipoComprobante.SelectedValue = "NC", -1, 1) If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then tipoCambioActual = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.ToDecimal @@ -18620,7 +18607,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, Dim CveProveedorContacto As Integer = -1 Dim Retorno As Boolean = True Dim CveProveedor As Integer = -1 - Dim GeneraReq = False + Dim GeneraReq As Boolean = False Dim IDPoliza As Integer = 0 @@ -18708,23 +18695,23 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, 'VARIABLES Dim CveOrdenCompra As Integer = -1 - Dim DiferenciaInvOC = 0.0D - Dim CveMovimientoAlmacen = -1 - Dim CveOCDetalle = -1 - Dim CveAlmacen = -1 + Dim DiferenciaInvOC As Decimal = 0.0D + Dim CveMovimientoAlmacen As Integer = -1 + Dim CveOCDetalle As Integer = -1 + Dim CveAlmacen As Integer = -1 Dim Fecha As Date = TxtFecha.Text.ToDate Dim CveProveedorInvOC As Integer = -1 Dim ProveedorNombre As String = "" Dim SerieFolio As String = "" Dim CvePrePoliza As Integer = -1 - Dim ConceptoSalida = -1 - Dim TCInvOC = 0.0D - Dim ImporteME = 0.0D - Dim ImporteMEComp = 0.0D - Dim SumatoriaMN = 0.0D - Dim SumatoriaME = 0.0D - Dim SumatoriaMEComp = 0.0D - Dim PUCompra = 0.0D + Dim ConceptoSalida As Integer = -1 + Dim TCInvOC As Decimal = 0.0D + Dim ImporteME As Decimal = 0.0D + Dim ImporteMEComp As Decimal = 0.0D + Dim SumatoriaMN As Decimal = 0.0D + Dim SumatoriaME As Decimal = 0.0D + Dim SumatoriaMEComp As Decimal = 0.0D + Dim PUCompra As Decimal = 0.0D Dim CveMoneda As Integer = 1 Dim PS As String = "" @@ -18749,7 +18736,7 @@ LblAmortizacion.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtRetIVA.Text.ToDecimal, CveMovimientoAlmacen = DrDiferencias("CveMovimiento").ToString.ToEntero TCInvOC = DrDiferencias("TipoCambioAjuste").ToString.ToDecimal - Dim CveClasificacionCostoOC = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero + Dim CveClasificacionCostoOC As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "ISNULL(TipoAF, 0) <> 2 And ISNULL(CveAlmacen, 0) = 0 And ISNULL(AplicaCostoIndirecto, 0) <> 1 And ISNULL(CveTipoPS, 0) = 2").ToEntero Dim CveSubProyecto As Integer = TmpDT.MAX("CveSubProyecto").ToEntero If DiferenciaInvOC.RoundSQL() <> 0 Then From 11d413f094f14ec6f15e441f77554d20154308e3 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 29 Aug 2023 18:09:10 -0700 Subject: [PATCH 082/111] =?UTF-8?q?Compras=20Cancelacion=20Fecha=20de=20ca?= =?UTF-8?q?ncelacion=20de=20movimeinto=20con=20devoluci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Empresas/153/Formatos/CHQ.rdlc | 665 +++ Empresas/153/Formatos/EntradasSalidas.rdlc | 2465 +++++++++ Empresas/153/Formatos/NotaCredito.rdlc | 5818 ++++++++++++++++++++ Empresas/153/Formatos/NotaDevolucion.rdlc | 5818 ++++++++++++++++++++ Empresas/153/Formatos/OC.rdlc | 3318 +++++++++++ Empresas/153/Formatos/Remision.rdlc | 3946 +++++++++++++ Empresas/153/Formatos/RepPS.rdlc | 1591 ++++++ Empresas/153/Formatos/Traslado.rdlc | 2152 ++++++++ 8 files changed, 25773 insertions(+) create mode 100644 Empresas/153/Formatos/CHQ.rdlc create mode 100644 Empresas/153/Formatos/EntradasSalidas.rdlc create mode 100644 Empresas/153/Formatos/NotaCredito.rdlc create mode 100644 Empresas/153/Formatos/NotaDevolucion.rdlc create mode 100644 Empresas/153/Formatos/OC.rdlc create mode 100644 Empresas/153/Formatos/Remision.rdlc create mode 100644 Empresas/153/Formatos/RepPS.rdlc create mode 100644 Empresas/153/Formatos/Traslado.rdlc diff --git a/Empresas/153/Formatos/CHQ.rdlc b/Empresas/153/Formatos/CHQ.rdlc new file mode 100644 index 000000000..463900c78 --- /dev/null +++ b/Empresas/153/Formatos/CHQ.rdlc @@ -0,0 +1,665 @@ + + + + + + true + true + + + + + Paguese A: + + + + + + + + =Parameters!Beneficiario.Value + + + + + + + Textbox1 + 4.74296cm + 3.20146cm + 0.6cm + 12.70388cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + Concepto del pago: + + + + + + + + =Parameters!Observaciones.Value + + + + + + + Textbox1 + 7.94971cm + 1.11125cm + 1.65834cm + 14.23847cm + 1 + + + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + =Parameters!Folio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Importe.Value + + + + + + + Textbox1 + 4.76639cm + 17.62802cm + 0.49896cm + 2.49471cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =CDATE(Parameters!Fecha.Value).ToString("dd/MM/yyyy") + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ImporteLetra.Value + + + + + + + Textbox1 + 6.11879cm + 1.11125cm + 0.6cm + 14.79409cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ELECTRICA SERVEC S DE RL DE CV + + + + + + + + + R.F.C. + + + + =Parameters!RFC.Value + + + + 0cm + 0cm + + + + + + + + + + 0cm + 0cm + + + + + + + + + + 0cm + 0cm + + + + Textbox2 + 2.52624cm + 3.35393cm + 2.12019cm + 13.5092cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + 4.72758cm + 15.14686cm + 0cm + 4.97587cm + 7 + + + + + + 5.2336cm + 1.11125cm + 0cm + 14.23847cm + 8 + + + + + + 6.64105cm + 1.11125cm + 0cm + 14.23847cm + 9 + + + + + + true + true + + + + + Importe: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + $ + + + + + + + Textbox1 + 4.73315cm + 17.59627cm + 0.56395cm + 0.49037cm + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + 4.60417in + + + + =Today + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0cm + 0cm + 0cm + 0.13cm + + + + + + + Textbox14 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox9 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cantidad + + + + + + + Textbox10 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox18 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + LightGrey + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + 0.9175cm + + + + + true + true + + + + + Código + + + + + + + Textbox15 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Articulos + + + + + + + Textbox2 + + + + White + + 1pt + + + LightGrey + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist. Inicial + + + + + + + Textbox4 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Entradas + + + + + + + Textbox7 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salidas + + + + + + + Textbox13 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist. + + + + + + + + + Final + + + + + + + Textbox16 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo Inicial + + + + + + + Textbox19 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Entradas + + + + + + + Textbox22 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Salidas + + + + + + + Textbox25 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Saldo Final + + + + + + + Textbox28 + + + + White + + 1pt + + + White + + 1pt + + + White + + 1pt + + + LightGrey + + 1pt + + #d3d3d3 + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.40421cm + + + + + true + + + + + =Fields!Codigo.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + + + + + =Fields!PS.Value + + + + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoIniCant.Value = "0", "-", Fields!SaldoIniCant.Value) + + + + + + + SaldoInitCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!EntradaCant.Value = "0", "-", Fields!EntradaCant.Value) + + + + + + + EntradaCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SalidaCant.Value = "0", "-", Fields!SalidaCant.Value) + + + + + + + SalidaCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoFCant.Value = "0", "-", Fields!SaldoFCant.Value) + + + + + + + SaldoFCant + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoIniImp.Value = "0", "-", Fields!SaldoIniImp.Value) + + + + + + + SaldoIniImp + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!EntradaImp.Value = "0", "-", Fields!EntradaImp.Value) + + + + + + + EntradaImp + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SalidaImp.Value = "0", "-", Fields!SalidaImp.Value) + + + + + + + SalidaImp + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =IIF(Fields!SaldoFImp.Value = "0", "-", Fields!SaldoFImp.Value) + + + + + + + SaldoFImp + + + + LightGrey + + + + LightGrey + + + =Iif(Fields!CvePS.Value=-1, "#67809F","White") + 2pt + 2pt + 1pt + + + + + + + + 0.6cm + + + + + true + true + + + + + + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoInitCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!EntradaCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SalidaCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoFCant.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoIniImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!EntradaImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SalidaImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Sum(Fields!SaldoFImp.Value, "DataSet1") + + + + + + =Iif(Fields!CvePS.Value=-1, "LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + After + true + true + + + After + true + true + + + + + + + true + + Before + + + + DataSet1 + 0.20849cm + 0.00415cm + 2.52171cm + 20.90254cm + + + + + + 1.16692in + + + + + + + Textbox1 + 0.22049cm + 4.38539cm + 0.6cm + 11.45673cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE ENTRADAS Y SALIDAS + + + + + + + + + + + + + + + + Textbox2 + 1.13799cm + 4.38539cm + 0.52945cm + 11.45673cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + 2pt + 2pt + 2pt + 2pt + + + + 4.4023cm + 0.01325cm + 0cm + 20.90669cm + 3 + + + + + + Embedded + LOGOSERVECENJPG + FitProportional + 0.22049cm + 0.08381cm + 1.60584cm + 4.19575cm + 4 + + + + + + + + + + + 0.727cm + true + true + + + true + true + + + + + ="Página: " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.28575cm + 15.06595cm + 0.44125cm + 5.51625cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + Textbox8 + 0.28575cm + 0.6059cm + 0.44125cm + 1.60042cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + + Textbox9 + 0.28575cm + 2.15023cm + 0.44125cm + 5.14936cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox10 + 0.28575cm + 7.47001cm + 0.44125cm + 2.92333cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + = Format(Now(),"dd-MM-yyyy HH:mm tt") + + + + + + + Textbox11 + 0.28575cm + 10.37923cm + 0.44125cm + 4.32745cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.127cm + 0cm + 20.90669cm + 5 + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + + + + + + true + true + true + + + + + Sello Digital del CFDI: + + + + + + + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 5.20368in + 0.06752in + 1.60919in + 8.23953in + + + + + + + + + 0.54014in + + + 0.59111in + + + 0.80359in + + + 0.66404in + + + 2.60074in + + + 0.83102in + + + 0.6403in + + + 0.69088in + + + 0.80447in + + + + + 0.19645in + + + + + true + true + + + + + # Cant. + + + + + + + + 2pt + + + + 2pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clave Pr./Se + + + + + + + Textbox29 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clave U. + + + + + + + Textbox2 + + + + + 2pt + + + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Textbox17 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Precio + + + + + + + Textbox53 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tasa IVA + + + + + + + Textbox21 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descto. + + + + + + + Textbox23 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SubTotal + + + + + + + Textbox1 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.16561in + + + + + true + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + SATClaveProdServ + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!SATClaveUM.Value + + + + + + + SATClaveUM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!PS.Value & IIF(Fields!Obs.Value <> "",System.Environment.NewLine &"Observaciones: ","") & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!PU.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!PorcentajeIVA.Value + + + + + + + PorcentajeIVA + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!Cantidad.Value * Fields!PU.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 1.92778in + 0.09836in + 0.36206in + 8.16629in + 1 + + + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ELECTRICA SERVEC S DE RL DE CV + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en Sucursal: + + + + =Parameters!Sucursal.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nota de crédito + + + + + + + Textbox8 + 18.23008cm + 0.96018cm + 2.79101cm + 6 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) + + + + + + + Textbox8 + 0.97782cm + 18.23008cm + 0.6cm + 2.79101cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora: + + + + + + + + + =Parameters!Fecha.Value + + + + + + + Textbox8 + 1.57782cm + 18.23008cm + 0.86903cm + 2.79101cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + Folio Fiscal: + + + + =Parameters!FolioFiscal.Value + + + + + + + + + Fecha y hora de certificacion: + + + + =Parameters!FechaCertificacion.Value + + + + + + + + + No. de Serie del Certificado del SAT: + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + + Textbox4 + 2.88607cm + 0.28014cm + 1.09007cm + 9.71199cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + No. de Serie del Certificado del CSD: + + + + =Parameters!CertificadoContribuyente.Value + + + + + + + =Parameters!CiudadSucursal.Value + + + + + + + + =Parameters!Fecha.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + =Parameters!ClienteColonia.Value + + + + + + + + =Parameters!ClienteCiudad.Value + + + + + + + + =Parameters!ClienteEstado.Value + + + + CP + + + + =Parameters!ClienteCP.Value + + + + + + + + =Parameters!ClientePais.Value + + + + + + + + + + + =Parameters!ClienteTelefono.Value + + + + + + + + =iif(Parameters!ClienteContactoMail.Value = "","","Correo: ") + + + + =Parameters!ClienteContactoMail.Value + + + + + + + =Parameters!ClienteRFC.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CondicionPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ord. Compra: + + + + =Parameters!OrdenCompra.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo de Comprobante:I + + + + =UCase(Parameters!TipoDocumento.Value) + + + + ,Moneda: + + + + =Parameters!MonedaAbreviatura.Value + + + + , Uso de CFDI: + + + + =Parameters!UsoCFDI.Value + + + + , Forma de Pago: + + + + =Parameters!FormaPago.Value + + + + , Método de Pago: + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.88535cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.82569cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 10.5106cm + 15.31342cm + 0.48004cm + 5.71104cm + 17 + + + + + + true + true + + + + + REVISAR BIEN EL PRODUCTO, UNA VEZ ENTREGADO EL MATERIAL NO SE ACEPTAN DEVOLUCIONES. + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + RFIRMAELECTRONICAEDITABLE + FitProportional + 0.41575cm + 0.28014cm + 1.73059cm + 3.63914cm + 19 + + + + + + true + true + + + + + Sucursal Matriz + + + + + + + + + Beneficiario: ELECTRICA SERVEC S DE RL DE CV + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sucursal Tijuana + + + + + + + + + Beneficiario: ELECTRICA SERVEC S DE RL DE CV + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuentas Bancarias + + + + Textbox3 + 7.79022cm + 0.28014cm + 0.56473cm + 18.6975cm + 22 + + + 2pt + 2pt + 2pt + 2pt + + + + 17.30469cm + + + + + + + Textbox35 + 0.01763cm + 18.52109cm + 0.50624cm + 2.5cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Now() + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario Imprimió: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + + + + + + true + true + true + + + + + Sello Digital del CFDI: + + + + + + + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + 5.17868in + 0.06752in + 1.60919in + 8.23953in + + + + + + + + + 0.54014in + + + 0.59111in + + + 0.80359in + + + 0.66404in + + + 2.60074in + + + 0.83102in + + + 0.6403in + + + 0.69088in + + + 0.80447in + + + + + 0.19645in + + + + + true + true + + + + + # Cant. + + + + + + + + 2pt + + + + 2pt + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clave Pr./Se + + + + + + + Textbox29 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clave U. + + + + + + + Textbox2 + + + + + 2pt + + + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Textbox17 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Precio + + + + + + + Textbox53 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tasa IVA + + + + + + + Textbox21 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descto. + + + + + + + Textbox23 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SubTotal + + + + + + + Textbox1 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.16561in + + + + + true + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!SATClaveProdServ.Value + + + + + + + SATClaveProdServ + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!SATClaveUM.Value + + + + + + + SATClaveUM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!PS.Value & IIF(Fields!Obs.Value <> "",System.Environment.NewLine &"Observaciones: ","") & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!PU.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!PorcentajeIVA.Value + + + + + + + PorcentajeIVA + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!Cantidad.Value * Fields!PU.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 1.92778in + 0.09836in + 0.36206in + 8.16629in + 1 + + + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ELECTRICA SERVEC S DE RL DE CV + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en Sucursal: + + + + =Parameters!Sucursal.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nota de devolución + + + + + + + Textbox8 + 18.23008cm + 0.96018cm + 2.79101cm + 6 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) + + + + + + + Textbox8 + 0.97782cm + 18.23008cm + 0.6cm + 2.79101cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora: + + + + + + + + + =Parameters!Fecha.Value + + + + + + + Textbox8 + 1.57782cm + 18.23008cm + 0.86903cm + 2.79101cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + Folio Fiscal: + + + + =Parameters!FolioFiscal.Value + + + + + + + + + Fecha y hora de certificacion: + + + + =Parameters!FechaCertificacion.Value + + + + + + + + + No. de Serie del Certificado del SAT: + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + + Textbox4 + 2.88607cm + 0.28014cm + 1.09007cm + 9.71199cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + No. de Serie del Certificado del CSD: + + + + =Parameters!CertificadoContribuyente.Value + + + + + + + =Parameters!CiudadSucursal.Value + + + + + + + + =Parameters!Fecha.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + =Parameters!ClienteColonia.Value + + + + + + + + =Parameters!ClienteCiudad.Value + + + + + + + + =Parameters!ClienteEstado.Value + + + + CP + + + + =Parameters!ClienteCP.Value + + + + + + + + =Parameters!ClientePais.Value + + + + + + + + + + + =Parameters!ClienteTelefono.Value + + + + + + + + =iif(Parameters!ClienteContactoMail.Value = "","","Correo: ") + + + + =Parameters!ClienteContactoMail.Value + + + + + + + =Parameters!ClienteRFC.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CondicionPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ord. Compra: + + + + =Parameters!OrdenCompra.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo de Comprobante:I + + + + =UCase(Parameters!TipoDocumento.Value) + + + + ,Moneda: + + + + =Parameters!MonedaAbreviatura.Value + + + + , Uso de CFDI: + + + + =Parameters!UsoCFDI.Value + + + + , Forma de Pago: + + + + =Parameters!FormaPago.Value + + + + , Método de Pago: + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.88535cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 2.82569cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 10.4471cm + 15.31342cm + 0.48004cm + 5.71104cm + 17 + + + + + + true + true + + + + + REVISAR BIEN EL PRODUCTO, UNA VEZ ENTREGADO EL MATERIAL NO SE ACEPTAN DEVOLUCIONES. + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + RFIRMAELECTRONICAEDITABLE + FitProportional + 0.41575cm + 0.28014cm + 1.73059cm + 3.63914cm + 19 + + + + + + true + true + + + + + Sucursal Matriz + + + + + + + + + Beneficiario: ELECTRICA SERVEC S DE RL DE CV + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sucursal Tijuana + + + + + + + + + Beneficiario: ELECTRICA SERVEC S DE RL DE CV + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuentas Bancarias + + + + Textbox3 + 7.82549cm + 0.30892cm + 0.54003cm + 18.6975cm + 22 + + + 2pt + 2pt + 2pt + 2pt + + + + 17.55869cm + + + + + + + Textbox35 + 0.01763cm + 18.52109cm + 0.50624cm + 2.5cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Now() + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario Imprimió: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + + + + + + + Textbox3 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + U. M. + + + + + + + Textbox7 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Producto o Servicio + + + + + + + Textbox9 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Observaciones + + + + + + + Textbox68 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sub Proyecto + + + + + + + Textbox71 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Activo Fijo + + + + + + + Textbox11 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P. Unitario + + + + + + + Textbox13 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox5 + + + + Black + 3pt + + + Black + 3pt + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.473cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + + UM + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + + PS + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Observacion.Value + + + + + + + Observacion + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!SubProyecto.Value + + + + + + + SubProyecto + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 1pt + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 4.45714cm + 0.37406cm + 0.96717cm + 20.25838cm + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + + + true + true + + + + + IVA + + + + + + + Textbox20 + 6.29242cm + 16.30259cm + 0.45183cm + 2.06968cm + 1 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Total " & Parameters!Moneda.Value + + + + + + + Textbox20 + 6.74425cm + 16.30259cm + 0.45183cm + 2.06968cm + 2 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Descuento + + + + + + + Textbox20 + 5.86881cm + 16.30259cm + 0.42361cm + 2.06968cm + 3 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!IVA.Value + + + + + + + Textbox20 + 6.29242cm + 18.37226cm + 0.45183cm + 2.26019cm + 4 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox20 + 6.74425cm + 18.37225cm + 0.45183cm + 2.26019cm + 5 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Descuento.Value + + + + + + + Textbox20 + 5.86881cm + 18.37225cm + 0.42361cm + 2.26019cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!ImporteLetra.Value + + + + + + + Textbox46 + 6.74425cm + 0.37406cm + 0.45183cm + 15.92855cm + 7 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ORDEN DE COMPRA DE MATERIALES Y SERVICIOS + + + + + + + Textbox8 + 1.24262cm + 5.09642cm + 0.5365cm + 10.29733cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoOC.Value + + + + + + + Textbox12 + 16.30259cm + 0.44478cm + 4.32987cm + 9 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + + Textbox12 + 0.44478cm + 16.30259cm + 0.44478cm + 4.32987cm + 10 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión + + + + + + + Textbox12 + 0.88956cm + 16.3026cm + 0.44478cm + 4.32987cm + 11 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Format(Globals!ExecutionTime,"dd/MM/yyyy") + + + + + + + Textbox12 + 1.33434cm + 16.30259cm + 0.44478cm + 4.32987cm + 12 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Proveedor + + + + + + + Textbox12 + 2.41498cm + 0.37406cm + 0.44478cm + 2.34596cm + 13 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Descripción + + + + + + + Textbox12 + 2.85976cm + 0.37406cm + 0.44478cm + 2.34596cm + 14 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Justificación + + + + + + + Textbox12 + 3.30454cm + 0.37406cm + 0.44478cm + 2.34596cm + 15 + + + Black + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Entrega + + + + + + + Textbox12 + 2.85976cm + 13.78003cm + 0.44478cm + 2.52258cm + 16 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Lugar de Entrega + + + + + + + Textbox12 + 3.30454cm + 13.78003cm + 0.44478cm + 2.52258cm + 17 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Estatus + + + + + + + Textbox12 + 2.41498cm + 13.78003cm + 0.44478cm + 2.52258cm + 18 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!FechaEntrega.Value="01/01/0001","",Parameters!FechaEntrega.Value) + + + + + + + Textbox12 + 2.85976cm + 16.30259cm + 0.44478cm + 4.32987cm + 19 + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ProveedorLugar.Value + + + + + + + Textbox12 + 3.30454cm + 16.30259cm + 0.44478cm + 4.32987cm + 20 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Estatus.Value + + + + + + + Textbox12 + 2.41498cm + 16.30259cm + 0.44478cm + 4.32987cm + 21 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Descripcion.Value + + + + + + + Textbox12 + 2.85976cm + 2.72002cm + 0.44478cm + 11.06001cm + 22 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Asunto.Value + + + + + + + Textbox12 + 3.30454cm + 2.72002cm + 0.44478cm + 11.06001cm + 23 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ProveedorNombre.Value + + + + + + + Textbox12 + 2.41498cm + 2.72002cm + 0.44478cm + 11.06001cm + 24 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ELECTRICA SERVEC S DE RL DE CV + + + + + + + Textbox8 + 0.48034cm + 5.09642cm + 0.76228cm + 10.29733cm + 25 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Solicitante + + + + + + + Textbox12 + 8.9744cm + 3.24661cm + 0.44478cm + 5.83844cm + 26 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + Textbox12 + 9.41918cm + 3.24661cm + 0.4095cm + 5.83844cm + 27 + + + + Black + + 1pt + + Top + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreSolicito.Value + + + + + + + Textbox12 + 9.86396cm + 3.24661cm + 0.44478cm + 5.83844cm + 28 + + + White + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Autorizó + + + + + + + Textbox12 + 8.9744cm + 11.64269cm + 0.44478cm + 5.83844cm + 29 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + + Textbox12 + 9.41918cm + 11.64269cm + 0.4095cm + 5.83844cm + 30 + + + + Black + + 1pt + + Top + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreAutorizo.Value + + + + + + + Textbox12 + 9.86396cm + 11.64269cm + 0.44478cm + 5.83844cm + 31 + + + White + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!FirmaAutorizo.Value + Fit + 7.40422cm + 12.66192cm + 3.5cm + 3.5cm + 32 + + =iif(Parameters!FirmaAutorizo.Value <> "", False, True) + + + + + + + External + =Parameters!FirmaSolicito.Value + Fit + 7.40422cm + 4.4049cm + 3.5cm + 3.5cm + 33 + + =iif(Parameters!FirmaSolicito.Value <> "", False, True) + + + + + + + true + true + + + + + Uso CFDI 3.3: + + + + + + + Textbox12 + 3.74932cm + 0.37406cm + 0.44478cm + 2.34596cm + 34 + + + Black + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsoCFDI.Value + + + + + + + Textbox12 + 3.74932cm + 2.72002cm + 0.44478cm + 11.06001cm + 35 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + White + Middle + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SubTotal + + + + + + + Textbox20 + 5.43618cm + 16.3026cm + 0.42361cm + 2.0597cm + 36 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SubTotal.Value + + + + + + + Textbox20 + 5.43618cm + 18.36228cm + 0.42361cm + 2.26019cm + 37 + + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + + LightGrey + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + LOGOSERVECENJPG + FitProportional + 0.44478cm + 0.37406cm + 1.60584cm + 4.54597cm + 38 + + + + + + 4.55973in + + + + + + + + =Now() + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 0.07056cm + 18.12247cm + 0.50624cm + 2.5cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 1cm + 1cm + 0.13cm + + + + + + + Textbox22 + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox17 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.16561in + + + + + true + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!PS.Value & IIF(Fields!Obs.Value <> "",System.Environment.NewLine &"Observaciones: ","") & Fields!Obs.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!Cantidad.Value * Fields!PU.Value + + + + + + + TiempoEntrega + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 2.61528in + 0.36206in + 3.14961in + + + + + + true + true + + + + + ELECTRICA SERVEC S DE RL DE CV + + + + + + R.F.C. ESE180307IUA + + + + + + Camelia No. Ext. 619 + + + + + + Col. Libertad C.P. 83130 + + + + + + México + + + + Textbox1 + 0.26141cm + 2.42563cm + 8cm + 1 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + + + =Parameters!Fecha.Value + + + + Textbox3 + 2.68703cm + 1.97583cm + 8cm + 2 + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cajero: + + + + + + Vendedor: + + + + Textbox4 + 4.66287cm + 1.28792cm + 8cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 3.19023cm + + + + + 0.48004cm + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + =Fields!ImpuestoLocal.Value + + + + 3.13057cm + + + true + true + + + + + =IIF(Fields!ImpuestoLocal.Value = "Total",UCase(Fields!ImpuestoLocal.Value),Fields!ImpuestoLocal.Value) + + + + + + White + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 7.72705cm + 1.67921cm + 0.48004cm + 6.3208cm + 4 + + + + + + true + true + + + + + SON + + + + ( + + + + + + + + + + + + GRACIAS POR SU PREFERENCIA + + + + + + ESTE NO ES UN COMPROBANTE FISCAL + + + + + + + + + + + + 83130 - Hermosillo Sonora. + + + + + + + + + + + + + + + + + + + + + + + + REVISAR BIEN EL PRODUCTO, UNA VEZ + + + + + + ENTREGADO EL MATERIAL NO SE + + + + + + ACEPTAN DEVOLUCIONES. + + + + Textbox16 + 8.36824cm + 5.28519cm + 8cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + 13.65344cm + + + + + 29.7cm + 8cm + 0cm + 0cm + 0.5cm + 0.5cm + 1.27cm + + + + + + + Textbox28 + + + + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 1.32814cm + + + 1.44393cm + + + 1.89656cm + + + 1.98182cm + + + 1.60777cm + + + 1.84281cm + + + 1.54614cm + + + 1.90101cm + + + + + 0.41479cm + + + + + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + =Switch(Fields!Orden.Value = 4,"#9CACC1",Fields!Orden.Value = 3,"#B9B5B4",Fields!Orden.Value = 2,"#CCCCCC",Fields!Orden.Value = 1,"#DDDDDD",Fields!Orden.Value = 0,"Transparent") + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + =Switch(Fields!Orden.Value = 4,"#9CACC1",Fields!Orden.Value = 3,"#B9B5B4",Fields!Orden.Value = 2,"#CCCCCC",Fields!Orden.Value = 1,"#DDDDDD",Fields!Orden.Value = 0,"Transparent") + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!PUPromedio.Value + + + + + + + PUPromedio + + + =Switch(Fields!Orden.Value = 4,"#9CACC1",Fields!Orden.Value = 3,"#B9B5B4",Fields!Orden.Value = 2,"#CCCCCC",Fields!Orden.Value = 1,"#DDDDDD",Fields!Orden.Value = 0,"Transparent") + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!SubTotal.Value + + + + + + + SubTotal + + + =Switch(Fields!Orden.Value = 4,"#9CACC1",Fields!Orden.Value = 3,"#B9B5B4",Fields!Orden.Value = 2,"#CCCCCC",Fields!Orden.Value = 1,"#DDDDDD",Fields!Orden.Value = 0,"Transparent") + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento1 + + + =Switch(Fields!Orden.Value = 4,"#9CACC1",Fields!Orden.Value = 3,"#B9B5B4",Fields!Orden.Value = 2,"#CCCCCC",Fields!Orden.Value = 1,"#DDDDDD",Fields!Orden.Value = 0,"Transparent") + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!VentaNeta.Value + + + + + + + VentaNeta + + + =Switch(Fields!Orden.Value = 4,"#9CACC1",Fields!Orden.Value = 3,"#B9B5B4",Fields!Orden.Value = 2,"#CCCCCC",Fields!Orden.Value = 1,"#DDDDDD",Fields!Orden.Value = 0,"Transparent") + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!IVA.Value + + + + + + + IVA + + + =Switch(Fields!Orden.Value = 4,"#9CACC1",Fields!Orden.Value = 3,"#B9B5B4",Fields!Orden.Value = 2,"#CCCCCC",Fields!Orden.Value = 1,"#DDDDDD",Fields!Orden.Value = 0,"Transparent") + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!Total.Value + + + + + + + Total + + + =Switch(Fields!Orden.Value = 4,"#9CACC1",Fields!Orden.Value = 3,"#B9B5B4",Fields!Orden.Value = 2,"#CCCCCC",Fields!Orden.Value = 1,"#DDDDDD",Fields!Orden.Value = 0,"Transparent") + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 0.49417cm + + + true + true + + + + + Cantidad + + + + + + + Textbox40 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + true + true + + + + + Unidad + + + + + + + Textbox5 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + true + true + + + + + P. Promedio + + + + + + + Textbox12 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + true + true + + + + + Venta Total + + + + + + + Textbox42 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + true + true + + + + + Descuento + + + + + + + Textbox17 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + true + true + + + + + Venta Neta + + + + + + + Textbox44 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + true + true + + + + + IVA + + + + + + + Textbox51 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + true + true + + + + + Total + + + + + + + Textbox47 + + + LightGrey + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + =Fields!GPO.Value + + + + 6.35646cm + + + true + + + + + =LEFT(Fields!GPO.Value,45) + + + + + + =Switch(Fields!Orden.Value = 4,"#9CACC1",Fields!Orden.Value = 3,"#B9B5B4",Fields!Orden.Value = 2,"#CCCCCC",Fields!Orden.Value = 1,"#DDDDDD",Fields!Orden.Value = 0,"Transparent") + Middle + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + DataSet1 + 0.90896cm + 19.90464cm + + + + + + 0.39952in + + + + + + + Textbox1 + 0.18521cm + 4.30829cm + 0.6cm + 11.35684cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE VENTAS POR PRODUCTO + + + + + + + Textbox2 + 1.10271cm + 4.30829cm + 0.52945cm + 11.35684cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Inicio: + + + + + + + + + =IIF(Parameters!FechaInicio.Value = "-1","",Parameters!FechaInicio.Value) + + + + + + + + + + + + + + + Fecha Fin: + + + + + + + + + =IIF(Parameters!FechaFin.Value = "-1","",Parameters!FechaFin.Value) + + + + Textbox13 + 17.43784cm + 2.14051cm + 2.33715cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Parametros.Value + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + LOGOSERVECENJPG + FitProportional + 0.18521cm + 0.04198cm + 1.60584cm + 4.19575cm + 4 + + + + + + + + + + + 0.84667cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.08291cm + 17.70912cm + 0.68085cm + 2.06587cm + + + 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 + + + + + =Now() + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad Medida + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Costo + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Valor + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.30367cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!UnidadMedida.Value + + + + + + + UnidadMedida + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + true + + + + + =Fields!PS.Value + + + + + + + PS + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.44125cm + + + + + true + true + + + + + =Sum(Fields!Cantidad.Value) + + + + + + + Textbox20 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + Total Productos + + + + + + + Textbox21 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox23 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox37 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox41 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox42 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + + + Before + + + + DsInventarios + 0.07056cm + 0.00711cm + 1.17559cm + 19.56807cm + + + + + + 0.68252in + + + + + + + Textbox2 + 0.03803cm + 4.37423cm + 2.04667cm + 10.17859cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox4 + 4.48094cm + 17.3888cm + 0.6cm + 1.76305cm + 1 + + + 2pt + 2pt + + + + true + true + + + + + Fecha: + + + + + + + Textbox5 + 4.48092cm + 16.27404cm + 0.6cm + 1.11476cm + 2 + + + 2pt + 2pt + + + + true + true + + + + + =Parameters!Folio.Value + + + + + + 2pt + 2pt + + + + true + true + + + + + FOLIO: + + + + Textbox5 + 0.03803cm + 17.07518cm + 0.6cm + 1.18203cm + 4 + + + Bottom + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!CveConcepto.Value = 8, "AVISO", "RECEPCIÓN") & " DE TRASLADO" + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SubProyecto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Origen: + + + + =Parameters!Origen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Destino: + + + + =Parameters!Destino.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + LOGOSERVECENJPG + FitProportional + 0.03803cm + 0.07265cm + 1.60584cm + 4.19575cm + 9 + + + + + + + + + + + 6.45758cm + true + true + + + true + true + + + + + =Parameters!NombreEntrego.Value + + + + Textbox21 + 1.87056cm + 2.54cm + 0.63472cm + 5.79375cm + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!NombreAccion.Value + + + + Textbox21 + 1.87056cm + 11.25481cm + 0.63528cm + 5.78664cm + 1 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + Firma + + + + Textbox21 + 3.82353cm + 2.54795cm + 1.2cm + 5.78664cm + 2 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + Nombre y Firma + + + + Textbox21 + 3.82354cm + 11.26191cm + 1.2cm + 5.78664cm + 3 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + OBSERVACIONES: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Observaciones.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 1.37639cm + 0.00626cm + 0cm + 19.57518cm + 6 + + + + + + 0.17639cm + 0cm + 19.57518cm + 7 + + + + + + true + true + + + + + ENTREGA + + + + + + + Textbox22 + 1.41167cm + 2.54795cm + 0.6cm + 5.78664cm + 8 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 1.37639cm + 11.26191cm + 0.6cm + 5.78664cm + 9 + + =iif(Parameters!CveConcepto.Value = 9,true,false) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!NombreAccion.Value="-1","",Parameters!NombreAccion.Value) + + + + Textbox21 + 1.87cm + 6.89031cm + 0.63528cm + 5.78664cm + 10 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ___________________________ + + + + + + Nombre y Firma + + + + Textbox21 + 3.82298cm + 6.89741cm + 1.2cm + 5.78664cm + 11 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Accion.Value + + + + + + + Textbox22 + 1.37583cm + 6.89741cm + 0.6cm + 5.78664cm + 12 + + =iif(Parameters!CveConcepto.Value = 8, True, False) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox35 + 5.90548cm + 17.07518cm + 0.41981cm + 2.5cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + 5.70264cm + 0.00313cm + 0cm + 19.57518cm + 16 + + + + + + + + + + 25cm + 21.59cm + 1cm + 0cm + 1cm + 1cm + 0.13cm +