From 00bfedf7851dcd91c76b6040b7bf22577ead5f9f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 10:46:39 -0700 Subject: [PATCH 01/30] - --- Compras/Compras.aspx.vb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 2cf509159..40c9cab95 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2471,7 +2471,7 @@ Partial Class Compras_Compras If TipoCambio <> TipoCambioOriginal Then LblTCO.Text = String.Format("
TC Original: {0}", TipoCambioOriginal.ToString("N4")) - AsignaValoresOriginales(TxtSubTotal.Text.ToDouble, TxtSubTotal2.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtTotal.Text.ToDecimal) + AsignaValoresOriginales(TxtSubTotal.Text.ToDecimal, TxtSubTotal2.Text.ToDecimal, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtTotal.Text.ToDecimal) CalculaTotalPorDevengar() TxtDocumentoImporteFE.Text = dr("Total").ToString RVDocumentoImporte.MaximumValue = dr("Total").ToString.FormatoNumero(2) @@ -6077,7 +6077,7 @@ Partial Class Compras_Compras If importeMN <> 0 Then - If Not UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) AndAlso (TxtFecha.Text.ToDate.LastDayOfMonth <> NowADS.LastDayOfMonth And Not EntradaComoGastoConAlmacen Then + If Not UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) AndAlso (TxtFecha.Text.ToDate.LastDayOfMonth <> NowADS.LastDayOfMonth And Not EntradaComoGastoConAlmacen) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMN.RoundSQL(2), importeMN.RoundSQL(2), 205, Referencia, Concepto, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=ContabilizableAlmacen) Then ErrorPrepoliza = True @@ -14285,7 +14285,7 @@ Partial Class Compras_Compras OCVinculada = True UpPSS.Update() - AsignaValoresOriginales(TxtSubTotal.Text.ToDouble, TxtSubTotal2.Text.ToDouble, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtTotal.Text.ToDecimal) + AsignaValoresOriginales(TxtSubTotal.Text.ToDecimal, TxtSubTotal2.Text.ToDecimal, TxtIVA.Text.ToDouble, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, TxtTotal.Text.ToDecimal) If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero) @@ -15630,8 +15630,8 @@ Partial Class Compras_Compras TxtTotal.Text = (TmpDT.SUMD("Total") + TmpDT.SUMD("IVA") + TmpDT.SUMD("IEPSPS") - TmpDT.SUMD("RetIVA") - TmpDT.SUMD("RetISR")).FormatoNumero - SubTotalOriginal = TxtSubTotal.Text.ToDouble - SubTotal2Original = TxtSubTotal2.Text.ToDouble + SubTotalOriginal = TxtSubTotal.Text.ToDecimal + SubTotal2Original = TxtSubTotal2.Text.ToDecimal If TrDescuento.Visible Then TxtDescuento.Text = (TmpDT.SUMD("Descuento")).ToString.FormatoNumero If TrRetIVA.Visible Then TxtRetIVA.Text = (TmpDT.SUMD("RetIVA")).ToString.FormatoNumero @@ -15651,7 +15651,7 @@ Partial Class Compras_Compras #End Region #Region " TOTALES: VALIDA Y CALCULA " - Private Sub AsignaValoresOriginales(SubTotal As Double, SubTotal2 As Double, IVA As Double, RetIVA As Double, RetISR As Double, Total As Decimal) + Private Sub AsignaValoresOriginales(SubTotal As Decimal, SubTotal2 As Decimal, IVA As Double, RetIVA As Double, RetISR As Double, Total As Decimal) SubTotalOriginal = SubTotal SubTotal2Original = SubTotal2 IVAOriginal = IVA @@ -15814,8 +15814,8 @@ Partial Class Compras_Compras TempSubTotal = TxtSubTotal.Text.ToDouble - SubTotalOriginal = TxtSubTotal.Text.ToDouble - SubTotal2Original = TxtSubTotal2.Text.ToDouble + SubTotalOriginal = TxtSubTotal.Text.ToDecimal + SubTotal2Original = TxtSubTotal2.Text.ToDecimal TempDescuentos = TxtDescuento.Text.Trim.ToDouble + Amortizacion TempSubTotal2 = TempSubTotal - TempDescuentos TempIVA = TxtIVA.Text.ToDouble @@ -15832,8 +15832,8 @@ Partial Class Compras_Compras ElseIf DifTotales <> 0 Then TxtSubTotal2.Text = (TxtSubTotal2.Text.ToDouble + DifTotales).ToString TxtSubTotal.Text = (TxtSubTotal.Text.ToDouble + DifTotales).ToString - SubTotalOriginal = TxtSubTotal.Text.ToDouble - SubTotal2Original = TxtSubTotal2.Text.ToDouble + SubTotalOriginal = TxtSubTotal.Text.ToDecimal + SubTotal2Original = TxtSubTotal2.Text.ToDecimal End If Dim DiferenciaSubtotales As Decimal = 0.0D From 78f81faa651df88cde4599c7c04b153c8b6d01e7 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 13:31:12 -0700 Subject: [PATCH 02/30] -- pago de ventas, con compras --- Bancos/PopIECompras.aspx.vb | 1 - Bancos/PopIEVentas.aspx | 2 +- Bancos/PopIEVentas.aspx.vb | 36 ++++++++++++++++++++++++++++++------ 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index a093792e9..cdda5974c 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -1456,7 +1456,6 @@ Partial Class Bancos_PopIECompras If MsgError = "" Then Dim VentaActual As New Venta(UsuarioActual) With {.CveVenta = rw.DataKey("CveVenta").ToEntero, .ClienteNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveCliente = rw.DataKey("CveCliente").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero} Dim PagoVenta As New VentaPago - PagoVenta.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero PagoVenta.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal PagoVenta.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index 078ca609f..d1a5e2397 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -350,7 +350,7 @@
- diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index d037f2d73..b05648ad7 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -118,7 +118,7 @@ Partial Class Bancos_PopIEVentas Private Property TipoTransaccion As String Get - Return ViewState("TipoTransaccion").ToString + Return IfNull(ViewState("TipoTransaccion"), "").ToString End Get Set(value As String) ViewState("TipoTransaccion") = value @@ -772,7 +772,7 @@ Partial Class Bancos_PopIEVentas Dim Folio As Long Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue) - Dim TCveMoneda = -1 + Dim TCveMoneda As Integer = -1 If dr IsNot Nothing Then If ChkPagarPesos.Checked Then @@ -1175,7 +1175,7 @@ Partial Class Bancos_PopIEVentas Dim CvePlantillaPoliza As Integer = 11 Dim ConceptoPoliza As String = String.Format("{0} {1}", NombreCliente, SerieFolio) Dim CveCuentaDeposito As Integer = If(DdlCuentaDeposito.Items.Count > 0, DdlCuentaDeposito.SelectedValue.ToEntero, 0) - Dim FechaDocumento = FechaVenta + Dim FechaDocumento As Date = FechaVenta Dim StrMsg As New StringBuilder 'Saca moneda en que se va a pagar segun metodo de pago @@ -1310,9 +1310,33 @@ Partial Class Bancos_PopIEVentas Case "5" 'Compras If CveVenta > 0 Then ImportePagado = TxtImporte.Text.Trim.ToDecimal - CveConceptoPrePoliza = 2 - 'CveConcepto2 = 43 CveIE = -1 + For Each rw As GridViewRow In GvCompras.Rows + If rw.FCCheckBox("Chk").Checked AndAlso rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal <> 0 Then + Pago.CveMonedaPago = 1 + Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + Pago.TipoPago = "Compra" + If AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + End If + If MsgError = "" Then + Dim CompraActual As New Compra() With {.CveCompra = rw.DataKey("CveCompra").ToEntero, .ProveedorNombre = NombreCliente, .SerieFolio = rw.DataKey("SerieFolio"), .CveProveedor = rw.DataKey("CveProveedor").ToEntero, .IVA = rw.DataKey("IVA").ToDecimal, .IEPS = rw.DataKey("IEPS").ToDecimal, .RetIVA = rw.DataKey("RetIVA").ToDecimal, .RetISR = rw.DataKey("RetISR").ToDecimal, .Total = rw.DataKey("Total").ToDecimal, .PorcentajeIVA = rw.DataKey("PorcentajeIVA").ToDecimal, .CveSubProyecto = rw.DataKey("CveSubProyecto").ToEntero, .CveMoneda = rw.DataKey("CveMoneda").ToEntero, .CveTipoConceptoProveedor = rw.DataKey("CveTipoConcepto").ToEntero} + Dim PagoCompra As New CompraPago + + PagoCompra.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero + PagoCompra.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal + PagoCompra.TCPago = rw.DataKey("TipoCambio").ToDecimal + PagoCompra.CveProveedor = rw.DataKey("CveProveedor").ToEntero + PagoCompra.CveVentaRelacionada = CveVenta + PagoCompra.TipoPago = "Venta" + If AplicaPrePolizaPagoCompra(CompraActual, PagoCompra, CvePrePoliza, ObjMov) Then + MsgError = "No se pudo insertar la póliza" + End If + End If + + End If + Next End If Case Else 'NO SE HA DEFINIDO PARA FUNCIONARIO Y EMPLEADO @@ -1350,7 +1374,7 @@ Partial Class Bancos_PopIEVentas '07-05-2018 - Timbra Complemento de pago Dim TextoComplementoPago As String = "" - StrMsg.AppendFormat("Folio {0}
", ObjIE.Folio) + If ObjIE.Folio <> "" Then StrMsg.AppendFormat("Folio {0}
", ObjIE.Folio) If RBLContado.SelectedValue = "1" And ChkComplementoPago.Checked Then Dim SeriesPago As New List(Of String) From 68c436d4c7196b14b84eb00cc8e1b1b6e7914b4f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 17:09:05 -0700 Subject: [PATCH 03/30] --mejora --- General/SaldosIniciales.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index bc6b04318..8c8dc38f9 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -935,7 +935,7 @@ Partial Class General_SaldosIniciales End If Next - For Each Row As DataRow In dt.Rows + For Each Row As DataRow In dt.FiltraParametros("RazonSocial <> ''").Rows Dim RazonSocial As String = Row("RazonSocial").ToString() If Not (Row("TipoProveedor").ToString().Trim.ToUpper).Contiene("PROVEEDOR", "ACREEDOR") Then sbErrores.AppendLine($"Proveedor {RazonSocial} TipoProveedor {Row("TipoProveedor")} invalido.
") From b0ff94bf73b597f361bb7ad277a6e201e57ffe7d Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 17:09:18 -0700 Subject: [PATCH 04/30] -- --- RH/Personal.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index f8231edc6..029a45413 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -6958,7 +6958,7 @@ Partial Class RH_Personal Dim primav As Decimal = TxtFIPrimaVacacional.Text.ToDecimal() Dim DiasVacaciones As Decimal = TxtFIDiasVacaciones.Text.ToDecimal() Dim diasaguinaldo As Decimal = TxtFIAguinaldo.Text.ToDecimal() - Dim FI As Decimal = (365 + diasaguinaldo + (DiasVacaciones * (primav / 100))) / 365 + Dim FI As Decimal = (365D + diasaguinaldo + (DiasVacaciones * (primav / 100D))) / 365D Dim SDI As Decimal = (SD * FI) TxtFactordeIntegracion.Text = FI.ToString() TxtFISalarioDiarioIntegrado.Text = String.Format("{0:###0.########}", SDI) @@ -6966,7 +6966,7 @@ Partial Class RH_Personal End Sub Protected Sub LnkCalcularFactordeintegracion_Click(sender As Object, e As EventArgs) calcularSDI() - Alert(String.Format(" salario diario integreado {0}", TxtFISalarioDiarioIntegrado.Text)) + Alert(String.Format(" salario diario integrado {0}", TxtFISalarioDiarioIntegrado.Text)) End Sub Protected Sub LnkCalcularFactordeintegracionyguardar_Click(sender As Object, e As EventArgs) calcularSDI() From 272fd4920ecfe64a207c882079cfd89ebf330d60 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 20:18:39 -0700 Subject: [PATCH 05/30] -- se quitaron columnas IdCtaXXX --- App_Code/ClsClientes.vb | 2 -- App_Code/ClsCompProveedores.vb | 37 ++++++++++++++-------------------- App_Code/ClsGenerales.vb | 14 ++++++------- 3 files changed, 22 insertions(+), 31 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 0d9be3e11..455e17b73 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -69,7 +69,6 @@ Public Class ClsClientes Public Property Sucursal As String Public Property RecepcionPagos As String Public Property TipoPago As String - Public Property CuentaContable As String Public Property FormaFacturacion As String Public Property Codigo As String Public Property LimiteCredito As Double @@ -319,7 +318,6 @@ Public Class ClsClientes _PlazoCobranzaRemision = Data.Rows(0)("PlazoCobranzaRemision").ToString.ToEntero _RecepcionPagos = Data.Rows(0)("RecepcionPagos").ToString _TipoPago = Data.Rows(0)("TipoPago").ToString - _CuentaContable = Data.Rows(0)("CuentaContable").ToString _FormaFacturacion = Data(0)("FormaFacturacion").ToString _LimiteCredito = Data(0)("LimiteCredito").ToString.ToDouble '_NumCtaPago = Data(0)("NumCtaPago").ToString diff --git a/App_Code/ClsCompProveedores.vb b/App_Code/ClsCompProveedores.vb index aee9aab93..2d5d2f14d 100644 --- a/App_Code/ClsCompProveedores.vb +++ b/App_Code/ClsCompProveedores.vb @@ -402,9 +402,7 @@ 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, - 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 + Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ProveedorUpdate") @@ -458,21 +456,21 @@ 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 + ''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 + ''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 @@ -522,11 +520,6 @@ Public Class ClsCompProveedores Return Retorno End Function - - - - - Public Function UpdateProveedorPagoElectronico(EstatusPagoElectronico As Boolean, CveUsuario As Integer, CveProveedor As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ProveedorUpdatePagoElectronico") diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index a28971f9e..782d554cf 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -179,7 +179,7 @@ Public Class ClsGenerales SqlAdapter.Fill(Data) retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener los registros de Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener los registros de Conciliaciones detalle SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -197,11 +197,11 @@ Public Class ClsGenerales SqlAdapter.Fill(Data) retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener los registros de Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las Conciliaciones SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function - Public Function SAT_DescargaSolicitudesGET(CveEmpresa As Int32, tipo As Int32, fIngInicio As String, fIngFin As String, fSolInicio As String, fSolFin As String) As Boolean + Public Function SAT_DescargaSolicitudesGET(CveEmpresa As Integer, tipo As Integer, fIngInicio As String, fIngFin As String, fSolInicio As String, fSolFin As String) As Boolean Dim retorno As Boolean = False DataAdapter("[PA_SAT_DescargaSolicitudesGET]", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -216,7 +216,7 @@ Public Class ClsGenerales SqlAdapter.Fill(Data) retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT4.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -231,7 +231,7 @@ Public Class ClsGenerales SqlAdapter.Fill(Data) retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener los folios fiscales de solicitudes CFDI SAT1.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -248,7 +248,7 @@ Public Class ClsGenerales SqlAdapter.Fill(Data) retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener las descargas de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function @@ -262,7 +262,7 @@ Public Class ClsGenerales SqlAdapter.Fill(Data) retorno = True Catch ex As Exception - OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + OnError("Ocurrió un error al obtener los registros de descarga de solicitudes CFDI SAT.2", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End Try Return retorno End Function From c703f84a01e56fbdcc53d682e815d1cb34a5adc3 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 20:18:47 -0700 Subject: [PATCH 06/30] - --- Compras/Proveedores.aspx.vb | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index ffd74af0e..84c730ac7 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -946,13 +946,13 @@ Partial Class Compras_Proveedores '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 + '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 - If drr("IdCtaContAnticipos").ToString <> "" Then DdlCtaContAnticipos.Items.Add(New ListItem(drr("CtaContAnticipos").ToString, drr("IdCtaContAnticipos").ToString)) : DdlCtaContAnticipos.SelectedValueExist(drr("IdCtaContAnticipos").ToString) - If drr("IdCtaContAnticiposExtranjera").ToString <> "" Then DdlCtaContAnticiposExtranjera.Items.Add(New ListItem(drr("CtaContAnticiposExtranjera").ToString, drr("IdCtaContAnticiposExtranjera").ToString)) : DdlCtaContAnticiposExtranjera.SelectedValue = drr("IdCtaContAnticiposExtranjera").ToString - If drr("IdCtaContAnticiposComplementaria").ToString <> "" Then DdlCtaContAnticiposComplementaria.Items.Add(New ListItem(drr("CtaContAnticiposComplementaria").ToString, drr("IdCtaContAnticiposComplementaria").ToString)) : DdlCtaContAnticiposComplementaria.SelectedValue = drr("IdCtaContAnticiposComplementaria").ToString + 'If drr("IdCtaContAnticipos").ToString <> "" Then DdlCtaContAnticipos.Items.Add(New ListItem(drr("CtaContAnticipos").ToString, drr("IdCtaContAnticipos").ToString)) : DdlCtaContAnticipos.SelectedValueExist(drr("IdCtaContAnticipos").ToString) + 'If drr("IdCtaContAnticiposExtranjera").ToString <> "" Then DdlCtaContAnticiposExtranjera.Items.Add(New ListItem(drr("CtaContAnticiposExtranjera").ToString, drr("IdCtaContAnticiposExtranjera").ToString)) : DdlCtaContAnticiposExtranjera.SelectedValue = drr("IdCtaContAnticiposExtranjera").ToString + 'If drr("IdCtaContAnticiposComplementaria").ToString <> "" Then DdlCtaContAnticiposComplementaria.Items.Add(New ListItem(drr("CtaContAnticiposComplementaria").ToString, drr("IdCtaContAnticiposComplementaria").ToString)) : DdlCtaContAnticiposComplementaria.SelectedValue = drr("IdCtaContAnticiposComplementaria").ToString DdlCtaContProveedores.Attributes.Add("onclick", "CargaCuentas(1);") DdlCtaContAcreedores.Attributes.Add("onclick", "CargaCuentas(6);") @@ -1852,13 +1852,7 @@ 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, - IdCtaContProveedores:=DdlCtaContProveedores.SelectedValue.ToEntero, CtaContProveedores:=DdlCtaContProveedores.SelectedItem.Text, - IdCtaContExtranjera:=DdlCtaContExtranjera.SelectedValue.ToEntero, CtaContExtranjera:=DdlCtaContExtranjera.SelectedItem.Text, - IdCtaContComplementaria:=DdlCtaContComplementaria.SelectedValue.ToEntero, CtaContComplementaria:=DdlCtaContComplementaria.SelectedItem.Text, - IdCtaContAnticipos:=DdlCtaContAnticipos.SelectedValue.ToEntero, CtaContAnticipos:=DdlCtaContAnticipos.SelectedItem.Text, - IdCtaContAnticiposExtranjera:=DdlCtaContAnticiposExtranjera.SelectedValue.ToEntero, CtaContAnticiposExtranjera:=DdlCtaContAnticiposExtranjera.SelectedItem.Text, - IdCtaContAnticiposComplementaria:=DdlCtaContAnticiposComplementaria.SelectedValue.ToEntero, CtaContAnticiposComplementaria:=DdlCtaContAnticiposComplementaria.SelectedItem.Text) Then + CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing @@ -4293,8 +4287,8 @@ Partial Class Compras_Proveedores End Sub Protected Sub BtnAgregaCuentaContable(ByVal sender As Object, ByVal e As EventArgs) - Dim CuentaContable = DirectCast(sender, Button).CommandArgument.ToString - Dim Button = DirectCast(sender, Button) + Dim CuentaContable As String = DirectCast(sender, Button).CommandArgument.ToString + Dim Button As Button = DirectCast(sender, Button) Select Case CuentaContable Case "Proveedores" AgregarCuentaContable(Button, DdlCtaContProveedores) @@ -4315,7 +4309,7 @@ Partial Class Compras_Proveedores If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad = True Then Dim IdCuentaContable As Integer = -1 Dim CtaCodigo As String = "" - Dim TieneError = False + Dim TieneError As Boolean = False Dim CveConceptoContable As Integer = -1 Dim Codigo As String = "" @@ -4325,7 +4319,7 @@ Partial Class Compras_Proveedores ObjContaAC.IniciaTransacSQL() ObjProveedores.IniciaTransacSQL() - Dim CuentaPadre = -1 + Dim CuentaPadre As Integer = -1 Dim TipoCuenta As String = "D" @@ -4357,13 +4351,13 @@ Partial Class Compras_Proveedores End Select 'SI EL NOMBRE DEL PROVEEDOR ES MAYOR DE 50 LO CORTAMOS - Dim NombreCuenta = If(TxtRazonSocial.Text.Trim.Length > 50, TxtRazonSocial.Text.Trim.Substring(0, 50), TxtRazonSocial.Text.Trim) + Dim NombreCuenta As String = If(TxtRazonSocial.Text.Trim.Length > 50, TxtRazonSocial.Text.Trim.Substring(0, 50), TxtRazonSocial.Text.Trim) IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(CuentaPadre, NombreCuenta, "D", 2) If IdCuentaContable > 0 Then ObjContaAC.GetCuentas(IdCuentaContable, "-1", -1) - Dim dt = ObjContaAC.DtResultados + Dim dt As DataTable = ObjContaAC.DtResultados If dt.Rows.Count = 1 Then From 6d163b4f8257e034988bd6158d3e836ac155e0f3 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 20:19:04 -0700 Subject: [PATCH 07/30] - JAM . campo ecommerce Cantidad --- App_Code/ClsProductosServicios.vb | 8 +++++--- Ventas/ProductosServicios.aspx | 11 +++++++++++ Ventas/ProductosServicios.aspx.vb | 5 +++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 3b544ba40..4c7c41706 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -412,7 +412,7 @@ Public Class ClsProductosServicios Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, - Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0, Optional CveClasificacionEcommerce As Integer = -1) As Integer + Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0, Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_ProductosServiciosAdd") @@ -516,6 +516,8 @@ Public Class ClsProductosServicios .Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce .Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio .Add("@CveClasificacionEcommerce", SqlDbType.Int).Value = CveClasificacionEcommerce + .Add("@EcommerceCantidad", SqlDbType.SmallMoney).Value = EcommerceCantidad + End With @@ -651,7 +653,7 @@ Public Class ClsProductosServicios Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, - Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0, Optional CveClasificacionEcommerce As Integer = -1) As Boolean + Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0, Optional CveClasificacionEcommerce As Integer = -1, Optional EcommerceCantidad As Decimal = 0) As Boolean Dim Retorno As Boolean = False @@ -755,7 +757,7 @@ Public Class ClsProductosServicios .Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce .Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio .Add("@CveClasificacionEcommerce", SqlDbType.Int).Value = CveClasificacionEcommerce - + .Add("@EcommerceCantidad", SqlDbType.SmallMoney).Value = EcommerceCantidad End With Try diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index b3f5200b4..5da6f5a23 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -582,6 +582,17 @@
+
+
+ + + + +
+
+ +
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 5d7f0d632..cef31ed3f 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -984,6 +984,7 @@ Partial Class ProductosyServicios TxtEcommerceEtiquetas.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommerceEtiquetas").ToString TxtEcommercePrecio.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommercePrecio").ToString.ToDecimal.ToString("#,###.####") DdlEcommerceClasificacion.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveClasificacionEcommerce").ToString) + TxtEcommerceCantidad.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommerceCantidad").ToString.ToDecimal.ToString("#,###.####") Try DdlClasificacion_SelectedIndexChanged(DdlClasificacion, Nothing) @@ -1470,7 +1471,7 @@ Partial Class ProductosyServicios CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked, - NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero) > 0 Then + NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero, EcommerceCantidad:=TxtEcommerceCantidad.Text.Trim.ToDecimal) > 0 Then ViewState("CvePS") = ObjProductosServicios.CvePS For Each GVR As GridViewRow In GvImpuestosLocales.Rows If GVR.FCCheckBox("ChkDeduccion").Checked Then @@ -1542,7 +1543,7 @@ Partial Class ProductosyServicios CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked, - NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, ActivoEcommerce:=ChkActivoEcommerce.Checked, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:= DdlEcommerceClasificacion.SelectedValue.toentero) Then + NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, ActivoEcommerce:=ChkActivoEcommerce.Checked, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal, CveClasificacionEcommerce:=DdlEcommerceClasificacion.SelectedValue.ToEntero, EcommerceCantidad:=TxtEcommerceCantidad.Text.Trim.ToDecimal) Then If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then TieneError = True From de090e71ba22d6cf1d1546d54fd8cf7217a98e45 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 20:31:21 -0700 Subject: [PATCH 08/30] - limpieza de columna CTAs --- Ventas/Ventas.aspx.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 01bfec8d8..439509f2b 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6386,7 +6386,6 @@ Partial Class Ventas End If ViewState("Vendedor") = ObjCliente.Vendedor - ViewState("CtaContable") = ObjCliente.CuentaContable ViewState("CodCliente") = ObjCliente.Codigo ViewState("CvePrecioLista") = ObjCliente.CvePrecioLista From 7bacc44b84163ee2e1d08f7f9555a0547cde5d89 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 20:51:58 -0700 Subject: [PATCH 09/30] - --- Ventas/PV.aspx.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 829e11ef1..5128cadec 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -2609,7 +2609,6 @@ Partial Class PV End If ViewState("Vendedor") = ObjCliente.Vendedor - ViewState("CtaContable") = ObjCliente.CuentaContable ViewState("CodCliente") = ObjCliente.Codigo ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS ClienteCodigoRegimenFiscal = ObjCliente.DtResultados.Rows(0)("CodigoRegimenFiscal").ToString() From 6808a9cb3c48289f969b5ff592f6a4f91e24abb8 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 20:52:12 -0700 Subject: [PATCH 10/30] -- cambios en idcta --- App_Code/ClsAF.vb | 3 --- 1 file changed, 3 deletions(-) diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index 61265c606..e4535dd69 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -64,7 +64,6 @@ Public Class ClsAF Public Property SubProyecto As String Public Property CveProyecto As Integer Public Property Proyecto As String - Public Property Cuenta As Integer Public Property CveEstadoActivoFijo As Integer Public Property EstadoActivoFijo As String Public Property PorDepreciacion As Double @@ -219,7 +218,6 @@ Public Class ClsAF Me.SubProyecto = Data.Rows(0)("SubProyecto").ToString Me.CveProyecto = Data.Rows(0)("CveProyecto").ToString.ToEntero Me.Proyecto = Data.Rows(0)("Proyecto").ToString - Me.Cuenta = Data.Rows(0)("Cuenta").ToString.ToEntero Me.CveEstadoActivoFijo = Data.Rows(0)("CveEstadoActivoFijo").ToString.ToEntero Me.EstadoActivoFijo = Data.Rows(0)("EstadoActivoFijo").ToString Me.PorDepreciacion = Data.Rows(0)("PorDepreciacion").ToString.ToDouble @@ -343,7 +341,6 @@ Public Class ClsAF Me.SubProyecto = Data.Rows(0)("SubProyecto").ToString Me.CveProyecto = Data.Rows(0)("CveProyecto").ToString.ToEntero Me.Proyecto = Data.Rows(0)("Proyecto").ToString - Me.Cuenta = Data.Rows(0)("Cuenta").ToString.ToEntero Me.CveEstadoActivoFijo = Data.Rows(0)("CveEstadoActivoFijo").ToString.ToEntero Me.EstadoActivoFijo = Data.Rows(0)("EstadoActivoFijo").ToString Me.PorDepreciacion = Data.Rows(0)("PorDepreciacion").ToString.ToDouble From e3e4174c78b7b2089315fa4e5c838f49605fecea Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 16 Nov 2023 21:06:11 -0700 Subject: [PATCH 11/30] -- cambios de idcta --- Inventarios/CatAlmacenes.aspx | 2 +- Inventarios/CatAlmacenes.aspx.vb | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Inventarios/CatAlmacenes.aspx b/Inventarios/CatAlmacenes.aspx index c76f3f83a..6325655e6 100644 --- a/Inventarios/CatAlmacenes.aspx +++ b/Inventarios/CatAlmacenes.aspx @@ -151,7 +151,7 @@ - + diff --git a/Inventarios/CatAlmacenes.aspx.vb b/Inventarios/CatAlmacenes.aspx.vb index 64e9d577f..a65f93a13 100644 --- a/Inventarios/CatAlmacenes.aspx.vb +++ b/Inventarios/CatAlmacenes.aspx.vb @@ -166,11 +166,6 @@ Partial Class Inventarios_CatAlmacenes 'e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center 'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center - If e.Row.DBCampo("IdCtaContable").ToEntero > 0 Then - e.Row.FCLiteral("LtlCuentaContable").Text = DtCuentasContables.FiltroPrimeroValor("CtaCodigo", $"Id = {e.Row.DBCampo("IdCtaContable")}") - 'Else - ' e.Row.FCLiteral("LtlCuentaContable").Text = "Sin Cuenta" - End If End If If e.Row.RowType = DataControlRowType.DataRow Then @@ -243,7 +238,7 @@ Partial Class Inventarios_CatAlmacenes Private Sub BtnAgregarAlmacen_Click(sender As Object, e As EventArgs) Handles BtnAgregarAlmacen.Click 'CargaSucursal() Dim ObjAlmacen As New ClsInventarios - Dim TieneError = False + Dim TieneError As Boolean = False Dim Estatus As Boolean = False If ChkEstatus.Checked Then Estatus = True Dim CuentaContable As Integer = 0 @@ -331,7 +326,6 @@ Partial Class Inventarios_CatAlmacenes 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")) DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto")) From 2277f503586574e6dbc34d1e59cf3952e443bfb6 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Nov 2023 11:10:12 -0700 Subject: [PATCH 12/30] -activar la carga de alamcen ,con lote/caducidad --- AC/CatOGClasificaciones.aspx.vb | 6 +-- App_Code/ClsClasificaciones.vb | 61 +++++++------------------------ General/SaldosIniciales.aspx.vb | 29 ++++----------- Ventas/CatClasificaciones.aspx | 8 ++-- Ventas/CatClasificaciones.aspx.vb | 20 ++++------ 5 files changed, 37 insertions(+), 87 deletions(-) diff --git a/AC/CatOGClasificaciones.aspx.vb b/AC/CatOGClasificaciones.aspx.vb index e41239c25..2ac9dd512 100644 --- a/AC/CatOGClasificaciones.aspx.vb +++ b/AC/CatOGClasificaciones.aspx.vb @@ -68,7 +68,7 @@ Partial Class AC_CatOGClasificaciones Dim ObjClasificaciones As New ClsClasificaciones If LbAgregar.Text = "Agregar" Then - If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, -1, "", -1, "", -1, "", 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If ObjClasificaciones.AddClasificaciones(TxtOGClasificacion.Text.Trim, TxtCodigo.Text.Trim, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TxtOGClasificacion.Text = "" TxtCodigo.Text = "" Alert("La Clasificacion de Objeto de Gasto se guardó correctamente.", TipoMensaje.MsgInformacion) @@ -78,7 +78,7 @@ Partial Class AC_CatOGClasificaciones End If Else - If ObjClasificaciones.UpdateClasificacion(TxtOGClasificacion.Text, TxtCodigo.Text, -1, "", -1, "", -1, "", ChkEstatus.Checked, ChkAfectable.Checked, 0, UsuarioActual.CveUsuario, CveClasificacion) Then + If ObjClasificaciones.UpdateClasificacion(TxtOGClasificacion.Text, TxtCodigo.Text, ChkEstatus.Checked, ChkAfectable.Checked, 0, UsuarioActual.CveUsuario, CveClasificacion) Then GvDatos.EditIndex = -1 ViewState("DTOGClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing @@ -191,7 +191,7 @@ Partial Class AC_CatOGClasificaciones Dim CveOGClasificacion As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero Dim Codigo As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtCodigo"), TextBox).Text.Trim - If ObjOGClasificaciones.UpdateClasificacion(OGClasificacion, Codigo, -1, "", -1, "", -1, "", Estatus, Afectable, 0, UsuarioActual.CveUsuario, CveOGClasificacion) Then + If ObjOGClasificaciones.UpdateClasificacion(OGClasificacion, Codigo, Estatus, Afectable, 0, UsuarioActual.CveUsuario, CveOGClasificacion) Then GvDatos.EditIndex = -1 ViewState("DTOGClasificaciones") = ObjOGClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb index 3c8597b3a..bb1535594 100644 --- a/App_Code/ClsClasificaciones.vb +++ b/App_Code/ClsClasificaciones.vb @@ -272,7 +272,7 @@ Public Class ClsClasificaciones Return Retorno End Function - Public Function AddClasificaciones(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngreso As Integer, CuentaIngreso As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = False, Optional RequiereAFInsumo As Boolean = False, Optional RequierePersonal As Boolean = False, + Public Function AddClasificaciones(Clasificacion As String, Codigo As String, CveCategoria As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = False, Optional RequiereAFInsumo As Boolean = False, Optional RequierePersonal As Boolean = False, Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean Dim Retorno As Boolean = False Me.CveClasificacion = -1 @@ -281,20 +281,12 @@ Public Class ClsClasificaciones With SqlAdapter.SelectCommand.Parameters .Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion - .Add("@Codigo", SqlDbType.VarChar).Value = Codigo - .Add("@IdCuentaGasto", SqlDbType.Int).Value = IdCuentaGasto - .Add("@IdCuentaCostos", SqlDbType.Int).Value = IdCuentaCostos - '.Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario - .Add("@CuentaGasto", SqlDbType.VarChar).Value = CuentaGasto - .Add("@CuentaCostos", SqlDbType.VarChar).Value = CuentaCostos - ' .Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario + .Add("@Codigo", SqlDbType.VarChar).Value = Codigo .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - - 'Nuevo 10/06/2016 - .Add("@IdCuentaIngresos", SqlDbType.Int).Value = IdCuentaIngreso - .Add("@CuentaIngresos", SqlDbType.VarChar).Value = CuentaIngreso + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + + 'Nuevo 10/06/2016 .Add("@RequiereSerieLote", SqlDbType.Int).Value = RequiereSerieLote .Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion @@ -338,13 +330,7 @@ Public Class ClsClasificaciones With SqlAdapter.SelectCommand.Parameters .Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion.Clasificacion - .Add("@Codigo", SqlDbType.VarChar).Value = Clasificacion.Codigo - '.Add("@IdCuentaGasto", SqlDbType.Int).Value = Clasificacion.IdCuentaGasto - '.Add("@IdCuentaCostos", SqlDbType.Int).Value = Clasificacion.IdCuentaCostos - '.Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario - '.Add("@CuentaGasto", SqlDbType.VarChar).Value = Clasificacion.CuentaGasto - '.Add("@CuentaCostos", SqlDbType.VarChar).Value = Clasificacion.CuentaCostos - ' .Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario + .Add("@Codigo", SqlDbType.VarChar).Value = Clasificacion.Codigo .Add("@CveCategoria", SqlDbType.Int).Value = Clasificacion.CveCategoria .Add("@CveEmpresa", SqlDbType.Int).Value = Clasificacion.CveEmpresa .Add("@CveUsuario", SqlDbType.Int).Value = Clasificacion.CveUsuario @@ -384,29 +370,22 @@ Public Class ClsClasificaciones Return Retorno End Function - Public Function UpdateClasificacion(Clasificacion As String, Codigo As String, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngresos As Integer, CuentaIngresos As String, Estatus As Boolean, Afectable As Boolean, CveCategoria As Integer, CveUsuario As Integer, CveClasificacion As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True, + Public Function UpdateClasificacion(Clasificacion As String, Codigo As String, Estatus As Boolean, Afectable As Boolean, CveCategoria As Integer, CveUsuario As Integer, CveClasificacion As Integer, Optional RequiereSerieLote As Integer = 0, Optional UsoClasificacion As Integer = -1, Optional CveSATPS As Integer = -1, Optional RequiereAFCompra As Boolean = True, Optional RequiereAFInsumo As Boolean = True, Optional RequierePersonal As Boolean = True, Optional EsAcumulador As Boolean = False, Optional TopVentas As Boolean = False, Optional TopCompras As Boolean = False, Optional PrecioBaseCosto As Decimal = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClasificacionesUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@Clasificacion", SqlDbType.VarChar).Value = Clasificacion - .Add("@Codigo", SqlDbType.VarChar).Value = Codigo - .Add("@IdCuentaGasto", SqlDbType.Int).Value = IdCuentaGasto - .Add("@IdCuentaCostos", SqlDbType.Int).Value = IdCuentaCostos - ' .Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario - .Add("@CuentaGasto", SqlDbType.VarChar).Value = CuentaGasto - .Add("@CuentaCostos", SqlDbType.VarChar).Value = CuentaCostos - ' .Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario + .Add("@Codigo", SqlDbType.VarChar).Value = Codigo + .Add("@Estatus", SqlDbType.Bit).Value = If(Estatus, 1, 0) .Add("@Afectable", SqlDbType.Bit).Value = If(Afectable, 1, 0) .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario - .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion - - 'Nuevo 10/06/2016 - .Add("@IdCuentaIngresos", SqlDbType.Int).Value = IdCuentaIngresos - .Add("@CuentaIngresos", SqlDbType.VarChar).Value = CuentaIngresos + .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + + 'Nuevo 10/06/2016 .Add("@RequiereSerieLote", SqlDbType.Int).Value = RequiereSerieLote .Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion @@ -572,25 +551,13 @@ Public Class ClsClasificaciones Return Retorno End Function - Public Function UpdateClasificacionSubProyecto(CveClasificacion As Integer, CveSubProyecto As Integer, IdCuentaGasto As Integer, CuentaGasto As String, IdCuentaCostos As Integer, CuentaCostos As String, IdCuentaIngresos As Integer, CuentaIngresos As String) As Boolean + Public Function UpdateClasificacionSubProyecto(CveClasificacion As Integer, CveSubProyecto As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClasificacionesSubProyectoUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@IdCuentaGasto", SqlDbType.Int).Value = IdCuentaGasto - .Add("@IdCuentaCostos", SqlDbType.Int).Value = IdCuentaCostos - '.Add("@IdCuentaInventario", SqlDbType.Int).Value = IdCuentaInventario - .Add("@CuentaGasto", SqlDbType.VarChar).Value = CuentaGasto - .Add("@CuentaCostos", SqlDbType.VarChar).Value = CuentaCostos - '.Add("@CuentaInventario", SqlDbType.VarChar).Value = CuentaInventario - - .Add("@IdCuentaIngresos", SqlDbType.Int).Value = IdCuentaIngresos - .Add("@CuentaIngresos", SqlDbType.VarChar).Value = CuentaIngresos - - - + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto End With Try diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 8c8dc38f9..0660034ea 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -736,8 +736,7 @@ Partial Class General_SaldosIniciales If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then - If ObjClas.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1", - GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString().ToEntero(), UsuarioActual.CveUsuario, + If ObjClas.AddClasificaciones(Clasificacion, "", GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString().ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing CveClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString().ToEntero() @@ -825,8 +824,7 @@ Partial Class General_SaldosIniciales End If If CveClasificacion2 = 0 Then - If ObjClas.AddClasificaciones(Clasificacion2, "", -1, "-1", -1, "-1", -1, "-1", CveCategoria, UsuarioActual.CveUsuario, - UsuarioActual.CveEmpresa) Then + If ObjClas.AddClasificaciones(Clasificacion2, "", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If ObjClas.GetClasificaciones(Tipo:=4) Then Application("GlobalDTClasificaciones2") = ObjClas.DtResultados CveClasificacion2 = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString().ToEntero() End If @@ -2299,7 +2297,7 @@ Partial Class General_SaldosIniciales If CveAlmacen > 0 Then Dim movimientoCabecera As Integer = ObjMovimientos.AddMovimiento(CveAlmacen, DdlConceptoAlmacen.SelectedValue.ToEntero(), 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1) - listadoMovimientos += $"movimiento con folio {ObjMovimientos.Folio}
" + listadoMovimientos += $"movimiento con folio {ObjMovimientos.Folio}
" If movimientoCabecera > 0 Then For Each nuevaEntrada As DataRow In dt.FiltraParametros($"TRIM(Almacen) = '{almacenActual}'").Rows @@ -2312,12 +2310,12 @@ Partial Class General_SaldosIniciales Dim Cantidad As Decimal = nuevaEntrada("Existencia").ToString().ToDecimal Dim Valor As Decimal = nuevaEntrada("Valor").ToString().ToDecimal Dim Serie As String = If(dt.Columns.Contains("Serie"), nuevaEntrada("Serie").ToString().Trim, "") - + Dim Lote As String = If(dt.Columns.Contains("Lote"), nuevaEntrada("Lote").ToString().Trim, "-1") + Dim FechaCaducidad As Date = If(dt.Columns.Contains("FechaCaducidad"), nuevaEntrada("FechaCaducidad").ToString().Trim.ToDate, MinFecha) Dim PU As Decimal = If(Valor = 0, 0, (Valor / Cantidad)) - - If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie) Then + If Not ObjMovimientos.AddMovimientoDetalle(movimientoCabecera, Cantidad, CveUM, CvePS, PU, -1, -1, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad) Then mensajeError = "No se logró generar el detalle del movimiento" Throw New Exception() End If @@ -2502,7 +2500,7 @@ Partial Class General_SaldosIniciales If Not CveClasificacion > 0 Then - If ObjClasificaciones.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=0, UsoClasificacion:=CveUsoClasificacion, + If ObjClasificaciones.AddClasificaciones(Clasificacion, "", CveCategoria, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=0, UsoClasificacion:=CveUsoClasificacion, CveSATPS:=-1, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False, EsAcumulador:=False, TopVentas:=False, TopCompras:=False, PrecioBaseCosto:=-1) Then CveClasificacion = ObjClasificaciones.CveClasificacion @@ -2523,7 +2521,7 @@ Partial Class General_SaldosIniciales End If Else - If Not ObjClasificaciones.UpdateClasificacion(Clasificacion, "-1", -1, "-1", -1, "-1", -1, "-1", True, True, CveCategoria, UsuarioActual.CveUsuario, CveClasificacion, UsoClasificacion:=CveUsoClasificacion) Then + If Not ObjClasificaciones.UpdateClasificacion(Clasificacion, "-1", True, True, CveCategoria, UsuarioActual.CveUsuario, CveClasificacion, UsoClasificacion:=CveUsoClasificacion) Then ErrorProceso = True End If @@ -2925,7 +2923,6 @@ Partial Class General_SaldosIniciales If Not ErrorProceso Then DTAnticipoCliente.AcceptChanges() End If - End If @@ -2941,8 +2938,6 @@ Partial Class General_SaldosIniciales ErrorProceso = True Exit For End If - - Dim CveIE As Integer = ObjBancos.AddBancos_IE(CveCuentaBancaria, 3, Fecha, FolioStr.ToString(), "", Importe, CveMoneda, TipoCambio, Descripcion, "", False, False, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -2951,9 +2946,6 @@ Partial Class General_SaldosIniciales Contador = Contador + 1 Next - - - If Not ErrorProceso Then Alert($"Se agregaron {Contador} Anticipos.") ObjBancos.Commit() @@ -2963,11 +2955,6 @@ Partial Class General_SaldosIniciales ObjBancos.Dispose() - - - - - End Sub diff --git a/Ventas/CatClasificaciones.aspx b/Ventas/CatClasificaciones.aspx index 64d68ffe9..c1e894b28 100644 --- a/Ventas/CatClasificaciones.aspx +++ b/Ventas/CatClasificaciones.aspx @@ -76,7 +76,7 @@
+ DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto, CveCuentaGasto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None"> @@ -97,13 +97,13 @@ - + - + @@ -128,7 +128,7 @@ - + diff --git a/Ventas/CatClasificaciones.aspx.vb b/Ventas/CatClasificaciones.aspx.vb index fe7b3af49..f3d03f077 100644 --- a/Ventas/CatClasificaciones.aspx.vb +++ b/Ventas/CatClasificaciones.aspx.vb @@ -152,9 +152,6 @@ Partial Class CatClasificaciones If HdnModalidadClasificacion.Value = "A" Then If ObjClasificaciones.AddClasificaciones(TxtClasificacion.Text.Trim, "", - DdlCuentaGasto.SelectedValue.ToEntero, DdlCuentaGasto.SelectedItem.Text, - DdlCuentaCostos.SelectedValue.ToEntero, DdlCuentaCostos.SelectedItem.Text, - DdlCuentaIngresos.SelectedValue.ToEntero, DdlCuentaIngresos.SelectedItem.Text, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then @@ -185,8 +182,7 @@ Partial Class CatClasificaciones Dim DdlCosto As DropDownList = DdlCuentaCostos Dim DdlIngresos As DropDownList = DdlCuentaIngresos - If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text, - DdlCosto.SelectedValue.ToEntero, DdlCosto.SelectedItem.Text, DdlIngresos.SelectedValue.ToEntero, DdlIngresos.SelectedItem.Text, + If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion, RequiereSerieLote:=RequireSerieLote, UsoClasificacion:=DdlUsoClasificacion.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, RequiereAFCompra:=ChkRequiereAFCompra.Checked, RequiereAFInsumo:=ChkRequiereAFInsumo.Checked, RequierePersonal:=ChkRequierePersonal.Checked, EsAcumulador:=ChkEsAcumulador.Checked, TopVentas:=ChkTopVentas.Checked, TopCompras:=ChkTopCompras.Checked, PrecioBaseCosto:=TxtPrecioBaseCosto.Text.ToDecimal) Then @@ -307,8 +303,8 @@ Partial Class CatClasificaciones If e.Row.DBCampo("CuentaGasto") = "Seleccione" Or e.Row.DBCampo("CuentaGasto") = "" Then e.Row.FCLabel("LtlCuentaGasto").Text = "-" - If e.Row.DBCampo("CuentaCostos") = "Seleccione" Or e.Row.DBCampo("CuentaCostos") = "" Then e.Row.FCLabel("LtlCuentaCosto").Text = "-" - If e.Row.DBCampo("CuentaIngresos") = "Seleccione" Or e.Row.DBCampo("CuentaIngresos") = "" Then e.Row.FCLabel("LtlCuentaIngresos").Text = "-" + ' If e.Row.DBCampo("CuentaCostos") = "Seleccione" Or e.Row.DBCampo("CuentaCostos") = "" Then e.Row.FCLabel("LtlCuentaCosto").Text = "-" + ' If e.Row.DBCampo("CuentaIngresos") = "Seleccione" Or e.Row.DBCampo("CuentaIngresos") = "" Then e.Row.FCLabel("LtlCuentaIngresos").Text = "-" e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left If UsuarioActual.CveEmpresa.Contiene(13, 83) Then @@ -383,8 +379,8 @@ Partial Class CatClasificaciones Dim PrecioBaseCosto As String = GvRow.DataKey("PrecioBaseCosto").ToString Dim CveCategoria As String = GvRow.DataKey("CveCategoria").ToString Dim CuentaGasto As String = GvRow.DataKey("CuentaGasto").ToString - Dim CuentaCostos As String = GvRow.DataKey("CuentaCostos").ToString - Dim CuentaIngresos As String = GvRow.DataKey("CuentaIngresos").ToString + Dim CuentaCostos As String = "" + Dim CuentaIngresos As String = "" Dim UsoClasificacion As String = GvRow.DataKey("UsoClasificacion").ToString Dim TopVentas As Boolean = If(GvRow.DataKey("TopVentas") = "True", True, False) Dim TopCompras As Boolean = If(GvRow.DataKey("TopCompras") = "True", True, False) @@ -392,9 +388,9 @@ Partial Class CatClasificaciones ChkTopCompras.Checked = TopCompras ChkTopVentas.Checked = TopVentas - CveCuentaGastoActual = GvRow.DataKey("IdCuentaGasto").ToString.ToEntero - CveCuentaCostoActual = GvRow.DataKey("IdCuentaCostos").ToString.ToEntero - CveCuentaIngresoActual = GvRow.DataKey("IdCuentaIngresos").ToString.ToEntero + 'CveCuentaGastoActual = GvRow.DataKey("IdCuentaGasto").ToString.ToEntero + 'CveCuentaCostoActual = GvRow.DataKey("IdCuentaCostos").ToString.ToEntero + 'CveCuentaIngresoActual = GvRow.DataKey("IdCuentaIngresos").ToString.ToEntero ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) ChkRequiereSerieLote.Checked = If(GvRow.DataKey("RequiereSerieLote") = "True", True, False) From 556bdf93215e930fa434b23224099a4a0a152905 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Nov 2023 11:44:16 -0700 Subject: [PATCH 13/30] =?UTF-8?q?-=20que=20no=20cargue=20los=20usuarios,?= =?UTF-8?q?=20cuando=20se=20est=C3=A1=20creando=20el=20rol,=20es=20dcir=20?= =?UTF-8?q?que=20no=20hay=20un=20rol=20definido?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sistemas/RolesDetalle.aspx.vb | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Sistemas/RolesDetalle.aspx.vb b/Sistemas/RolesDetalle.aspx.vb index 4e97f18c2..c24d2e7ca 100644 --- a/Sistemas/RolesDetalle.aspx.vb +++ b/Sistemas/RolesDetalle.aspx.vb @@ -44,7 +44,7 @@ Partial Class Sistemas_RolesDetalle TxtUsuarioAlta.Text = DTRoles.FiltroPrimeroValor("Nombre") DdlModulo.SelectedValueExist(DTRoles.FiltroPrimeroValor("CveModulo").ToEntero) Else - Dim Liga = $"document.location.href=""/Sistemas/CatRoles.aspx"";" + Dim Liga As String = $"document.location.href=""/Sistemas/CatRoles.aspx"";" Alert("El Rol solicitado no existe.", TipoMensaje.MsgAdvertencia, Liga) End If @@ -61,13 +61,16 @@ Partial Class Sistemas_RolesDetalle Private Sub CargaUsuarios() - Dim ObjUsuarios As New ClsSisUsuarios() - If ObjUsuarios.GetUsuarios(-1, CveRol) Then - GvUsurios.DataSource = ObjUsuarios.DtResultados.FiltraParametros("", "", {"CveUsuario", "Usuario", "Nombre"}) - Else - GvUsurios.DataSource = Nothing + If CveRol > 0 Then + Dim ObjUsuarios As New ClsSisUsuarios() + If ObjUsuarios.GetUsuarios(-1, CveRol) Then + GvUsurios.DataSource = ObjUsuarios.DtResultados.FiltraParametros("", "", {"CveUsuario", "Usuario", "Nombre"}) + Else + GvUsurios.DataSource = Nothing + End If + ObjUsuarios.Dispose() End If - ObjUsuarios.Dispose() + GvUsurios.DataBind() End Sub @@ -233,7 +236,7 @@ Partial Class Sistemas_RolesDetalle If TieneError = False Then - Dim Liga = $"document.location.href=""/Sistemas/CatRoles.aspx"";" + Dim Liga As String = $"document.location.href=""/Sistemas/CatRoles.aspx"";" Alert("Se han guardado los cambios correctamente.", TipoMensaje.MsgInformacion, Liga) ObjEmpresa.Commit() Else From 0db011e749be89ac424aae89e624210e32b8077a Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Nov 2023 11:44:24 -0700 Subject: [PATCH 14/30] --visual --- Compras/CatProveedores.aspx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Compras/CatProveedores.aspx b/Compras/CatProveedores.aspx index 3599a49e7..68cf359a4 100644 --- a/Compras/CatProveedores.aspx +++ b/Compras/CatProveedores.aspx @@ -97,15 +97,12 @@
-
" style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
-
-
+
From 69cfb6e60911a41b1fa07dcf26bec92d899c6c1f Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 Nov 2023 13:16:27 -0700 Subject: [PATCH 15/30] -- idcta --- Inventarios/EntradasSalidas.aspx.vb | 2 +- Inventarios/KardexAlmacenHorizontal.aspx.vb | 20 +++---- Ventas/CatClasificaciones2.aspx.vb | 66 ++++++++++----------- Ventas/CatClasificacionesDetalle.aspx.vb | 19 +++--- 4 files changed, 52 insertions(+), 55 deletions(-) diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index 67afe9096..decd0e02d 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -1968,7 +1968,7 @@ Partial Class Inventarios_EntradasSalidas 'Dim Total As Decimal = 0 If CveConceptoContable.Contiene(181, 78, 51, 69) Then Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy - 'Dim IdCuentaGasto As Integer = 0 + For Each Dr As DataRow In Dt.Rows Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion")}").SUM("Total").RoundSQL() diff --git a/Inventarios/KardexAlmacenHorizontal.aspx.vb b/Inventarios/KardexAlmacenHorizontal.aspx.vb index a99613ff7..cc49574e7 100644 --- a/Inventarios/KardexAlmacenHorizontal.aspx.vb +++ b/Inventarios/KardexAlmacenHorizontal.aspx.vb @@ -69,7 +69,7 @@ Partial Class Inventarios_KardexAlmacen End Sub Private Sub CargaClasificaciones() - Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1") + Dim CveClasificacion As Integer = If(Request("CveClasificacion") IsNot Nothing, Request("CveClasificacion").ToString, "-1").ToEntero Dim ObjClasificaciones As New ClsClasificaciones If UsuarioActual.Empresa.UsaAC Then @@ -159,7 +159,7 @@ Partial Class Inventarios_KardexAlmacen If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then dt = ObjMovimientos.DtResultados Dim ListaBorrar As New List(Of DataColumn) - For index = 3 To dt.Columns.Count - 1 + For index As Integer = 3 To dt.Columns.Count - 1 Dim TotColumna As Double = 0 For Each Dr As DataRow In dt.Rows TotColumna += Dr.Item(index).ToString.ToDouble @@ -283,19 +283,19 @@ Partial Class Inventarios_KardexAlmacen GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8") Dim excel As GemBox.Spreadsheet.ExcelFile - Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault - Using htmlStream = New MemoryStream(options.Encoding.GetBytes(sw.ToString())) + Dim options As HtmlLoadOptions = GemBox.Spreadsheet.LoadOptions.HtmlDefault + Using htmlStream As New MemoryStream(options.Encoding.GetBytes(sw.ToString())) excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream, options) If Usuario IsNot Nothing Then Dim TotalRowHeader As Integer = 8 Dim TotalRowFooter As Integer = 2 - Dim worksheet = excel.Worksheets(0) + Dim worksheet As ExcelWorksheet = excel.Worksheets(0) worksheet.Rows.InsertEmpty(0, TotalRowHeader) - Dim celdasConTexto = worksheet.GetUsedCellRange(True) + Dim celdasConTexto As CellRange = worksheet.GetUsedCellRange(True) celdasConTexto.Style.Font.Name = "Calibri Light" - Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex) + Dim RangoNombreEmpresa As CellRange = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex) RangoNombreEmpresa.Merged = True RangoNombreEmpresa.Value = Usuario.Empresa.Empresa RangoNombreEmpresa.Style.Font.Size = 18 * 20 @@ -304,7 +304,7 @@ Partial Class Inventarios_KardexAlmacen RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex) + Dim RangoFiltros As CellRange = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex) RangoFiltros.Merged = True RangoFiltros.Value = Filtros RangoFiltros.Style.Font.Size = 15 * 20 @@ -313,7 +313,7 @@ Partial Class Inventarios_KardexAlmacen RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex) + Dim RangoTitulo As CellRange = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex) RangoTitulo.Merged = True RangoTitulo.Value = Titulo RangoTitulo.Style.Font.Size = 20 * 20 @@ -321,7 +321,7 @@ Partial Class Inventarios_KardexAlmacen RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex + For i As Integer = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20 worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center diff --git a/Ventas/CatClasificaciones2.aspx.vb b/Ventas/CatClasificaciones2.aspx.vb index 26c86f3ae..4380f1c83 100644 --- a/Ventas/CatClasificaciones2.aspx.vb +++ b/Ventas/CatClasificaciones2.aspx.vb @@ -186,33 +186,33 @@ Partial Class Ventas_CatClasificaciones2 Protected Sub LbAgregarS_Click(sender As Object, e As EventArgs) Handles LbAgregarS.Click Dim ObjClasificaciones As New ClsClasificaciones - If ObjClasificaciones.AddClasificaciones(TxtClasificacionS.Text.Trim, "", - -1, "", -1, "", -1, "", - DdlCategoriaS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False) Then + 'If ObjClasificaciones.AddClasificaciones(TxtClasificacionS.Text.Trim, "", + ' -1, "", -1, "", -1, "", + ' DdlCategoriaS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, RequiereAFCompra:=False, RequiereAFInsumo:=False, RequierePersonal:=False) Then - 'DdlCuentaGastoS.SelectedValue.ToEntero, DdlCuentaGastoS.SelectedItem.Text, - 'DdlCuentaAnticipoS.SelectedValue.ToEntero, DdlCuentaAnticipoS.SelectedItem.Text, - 'DdlCuentaInventarioS.SelectedValue.ToEntero, DdlCuentaInventarioS.SelectedItem.Text, - TxtClasificacionS.Text = "" - Alert("La nueva Clasificación se guardó correctamente.", TipoMensaje.MsgInformacion) - UpTitulosS.Update() + ' 'DdlCuentaGastoS.SelectedValue.ToEntero, DdlCuentaGastoS.SelectedItem.Text, + ' 'DdlCuentaAnticipoS.SelectedValue.ToEntero, DdlCuentaAnticipoS.SelectedItem.Text, + ' 'DdlCuentaInventarioS.SelectedValue.ToEntero, DdlCuentaInventarioS.SelectedItem.Text, + ' TxtClasificacionS.Text = "" + ' Alert("La nueva Clasificación se guardó correctamente.", TipoMensaje.MsgInformacion) + ' UpTitulosS.Update() - If ObjClasificaciones.GetClasificaciones(-1, 4) Then - GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = Nothing - ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) - GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) - End If + ' If ObjClasificaciones.GetClasificaciones(-1, 4) Then + ' GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = Nothing + ' ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) + ' GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) + ' End If - 'DdlCuentaGastoS.SelectedValue = "-1" - 'DdlCuentaAnticipoS.SelectedValue = "-1" - 'DdlCuentaInventarioS.SelectedValue = "-1" + ' 'DdlCuentaGastoS.SelectedValue = "-1" + ' 'DdlCuentaAnticipoS.SelectedValue = "-1" + ' 'DdlCuentaInventarioS.SelectedValue = "-1" - If ViewState("Orden2").ToString() <> String.Empty Then - CargaGridS(ViewState("Orden2").ToString()) - Else - CargaGridS("") - End If - End If + ' If ViewState("Orden2").ToString() <> String.Empty Then + ' CargaGridS(ViewState("Orden2").ToString()) + ' Else + ' CargaGridS("") + ' End If + 'End If ObjClasificaciones.Dispose() End Sub @@ -362,17 +362,17 @@ Partial Class Ventas_CatClasificaciones2 Dim DdlCategoria As DropDownList = GvDatosS.Rows(e.RowIndex).FCDropDownList("DdlCategoria") 'Dim IDCuentaGasto As Integer = GvDatosS.Rows(e.RowIndex).FCDropDownList("DdlCuentaGasto").SelectedValue.ToEntero - If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", -1, "", -1, "", -1, "", Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then - 'DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text, - 'DdlAnticipo.SelectedValue.ToEntero, DdlAnticipo.SelectedItem.Text, - 'DdlInventario.SelectedValue.ToEntero, DdlInventario.SelectedItem.Text, + 'If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", -1, "", -1, "", -1, "", Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then + ' 'DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text, + ' 'DdlAnticipo.SelectedValue.ToEntero, DdlAnticipo.SelectedItem.Text, + ' 'DdlInventario.SelectedValue.ToEntero, DdlInventario.SelectedItem.Text, - GvDatosS.EditIndex = -1 - If ObjClasificaciones.GetClasificaciones(-1, 4) Then - ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) - End If - Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) - End If + ' GvDatosS.EditIndex = -1 + ' If ObjClasificaciones.GetClasificaciones(-1, 4) Then + ' ViewState("DTClasificacion2") = ObjClasificaciones.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) + ' End If + ' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) + 'End If ObjClasificaciones.Dispose() diff --git a/Ventas/CatClasificacionesDetalle.aspx.vb b/Ventas/CatClasificacionesDetalle.aspx.vb index c8899794d..e59d1ce2b 100644 --- a/Ventas/CatClasificacionesDetalle.aspx.vb +++ b/Ventas/CatClasificacionesDetalle.aspx.vb @@ -139,9 +139,7 @@ Partial Class CatClasificacionesDetalle Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click Dim ObjClasificaciones As New ClsClasificaciones - If ObjClasificaciones.UpdateClasificacion(TxtClasificacion.Text, "", DdlCuentaGasto.SelectedValue.ToEntero, DdlCuentaGasto.SelectedItem.Text, - DdlCuentaCostos.SelectedValue.ToEntero, DdlCuentaCostos.SelectedItem.Text, DdlCuentaIngresos.SelectedValue.ToEntero, DdlCuentaIngresos.SelectedItem.Text, - ChkEstado.Checked, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then + If ObjClasificaciones.UpdateClasificacion(TxtClasificacion.Text, "", ChkEstado.Checked, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then GvDatos.EditIndex = -1 ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) @@ -251,14 +249,13 @@ Partial Class CatClasificacionesDetalle Dim DdlCostos As DropDownList = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlCuentaCostos") Dim DdlIngresos As DropDownList = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlCuentaIngresos") - If ObjClasificaciones.UpdateClasificacionSubProyecto(tCveClasificacion, CveSubProyecto, DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text, - DdlCostos.SelectedValue.ToEntero, DdlCostos.SelectedItem.Text, DdlIngresos.SelectedValue.ToEntero, DdlIngresos.SelectedItem.Text) Then - GvDatos.EditIndex = -1 - ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados - Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) - Else - Alert("Ocurrió un error al actualizar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError) - End If + 'If ObjClasificaciones.UpdateClasificacionSubProyecto(tCveClasificacion, CveSubProyecto, DdlIngresos.SelectedValue.ToEntero, DdlIngresos.SelectedItem.Text) Then + ' GvDatos.EditIndex = -1 + ' ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados + ' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) + 'Else + ' Alert("Ocurrió un error al actualizar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError) + 'End If ObjClasificaciones.Dispose() From 3904343f17a39d15464541527f41568c9554d79e Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Nov 2023 05:33:39 -0700 Subject: [PATCH 16/30] -- mejora --- App_Code/ClsContabilidad.vb | 2 ++ Bancos/PopIEVentas.aspx | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 336499c97..4a132fe6b 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -6094,6 +6094,7 @@ Public Class ClsContabilidad .Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output .Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output .Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output + .Add("@FolioPoliza", SqlDbType.Int).Direction = ParameterDirection.Output End With Try @@ -6103,6 +6104,7 @@ Public Class ClsContabilidad MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString + ContaFolio = SqlAdapter.SelectCommand.Parameters("@FolioPoliza").Value.ToString.ToEntero If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza") If MensajePolizaDescuadre = "" Then diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index d1a5e2397..851a7d32a 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -217,8 +217,8 @@
- + From f91dd1438795eeb67b7c8c07c71125cc22ccf9dc Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Nov 2023 13:20:20 -0700 Subject: [PATCH 17/30] =?UTF-8?q?--=20cambio=20a=20unificaci=C3=B3n=20func?= =?UTF-8?q?i=C3=B3n=20validaci=C3=B3nprepolizas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/Devoluciones.aspx.cs | 22 ++-------- Bancos/IE.aspx.vb | 18 -------- Bancos/PagoAcreedor.aspx.cs | 37 +++------------- Bancos/PagoDeudor.aspx.cs | 38 +--------------- Bancos/PolizaCheque.aspx.vb | 13 ------ Bancos/PrestamoPersonal.aspx.cs | 48 ++++++--------------- Bancos/ProductosFinancieros.aspx.vb | 18 -------- Bancos/ProveedoresAbonar.aspx.vb | 13 +----- Bancos/RepEgresosSinComprobante.aspx.vb | 6 --- Bancos/Transferencias.aspx.vb | 12 ------ Compras/Compras.aspx.vb | 9 ---- Compras/ReembolsosComprobaciones.aspx.vb | 22 +--------- Compras/RepNotasCredito.aspx.vb | 15 ++----- Compras/RepRembolsoComprobaciones.aspx.vb | 24 +++-------- Contabilidad/PopUpAuxiliar.aspx.vb | 2 +- Contabilidad/RegPrePoliza.aspx.vb | 32 +++++++------- Contabilidad/RegPrePolizaS.aspx.vb | 2 +- Contabilidad/RepAnexoCatalogo.aspx.vb | 4 ++ Inventarios/Consignaciones.aspx.vb | 6 +-- Inventarios/EntradasSalidas.aspx.vb | 17 -------- Inventarios/PaquetesArmadoDesarmado.aspx.vb | 7 +-- Inventarios/RecepcionUsados.aspx.vb | 6 +-- PortalCliente/PortalCliente.aspx.vb | 2 +- Ventas/ClientesAbonar.aspx.vb | 46 +++++++------------- Ventas/RepNCxAplicar.aspx.cs | 4 +- Ventas/Ventas.aspx.vb | 18 ++------ 26 files changed, 87 insertions(+), 354 deletions(-) diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs index 3155be9f3..d9521500b 100644 --- a/Bancos/Devoluciones.aspx.cs +++ b/Bancos/Devoluciones.aspx.cs @@ -356,8 +356,7 @@ public partial class Bancos_Devoluciones : ClsPaginas int CveTipoPoliza = 1;// tipo ingreso int CvePrePoliza = 0; int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero(); - int FolioFijo = 0; - int IDPoliza = 0; + int FolioFijo = 0; int cveProveedor = (DdlProveedores.SelectedValue.ToEntero() > 0) ? DdlProveedores.SelectedValue.ToEntero() : -1; int cvePersonal = (DdlPersonal.SelectedValue.ToEntero() > 0) ? DdlPersonal.SelectedValue.ToEntero() : -1; int cveCliente = (DdlCliente.SelectedValue.ToEntero() > 0) ? DdlCliente.SelectedValue.ToEntero() : -1; @@ -567,28 +566,15 @@ public partial class Bancos_Devoluciones : ClsPaginas } //VALIDA QUE CUADRE LA PREPOLIZA - if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1)) + Usuario UA = UsuarioActual; + if (ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA)) { if (ObjMov.ValorPolizaDescuadre > 0) { MsgError = ObjMov.MensajePolizaDescuadre; ModExtensiones.GuardaLogAD($"Bancos/IE DEVOLUCIONES | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas"); } - } - - //CONTABILIZA - if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) - { - if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) - { - IDPoliza = ObjMov.ContaIdPoliza; - } - else - { - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); - } - } - + } if (MsgError.Equals("")) { if (Msg.ToString().Equals("")) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index b1442d461..81155906e 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -2856,24 +2856,6 @@ Partial Class Bancos_IE End If End If - - 'El movimiento 1 es el de Venta - - 'Conta ContPAQ - If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then - Dim AutoConta As Boolean = True - - If AutoConta Then - If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - IDPoliza = ObjMov.ContaIdPoliza - Else - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - MsgError = "Error al contabilizar." - End If - End If - - End If - If MsgError = "" Then 'IMPRIME CHEQUE 'GeneraChequePDF(CveIE, UsuarioActual.Empresa, IDPoliza) diff --git a/Bancos/PagoAcreedor.aspx.cs b/Bancos/PagoAcreedor.aspx.cs index 42b3d4f01..52c647ae7 100644 --- a/Bancos/PagoAcreedor.aspx.cs +++ b/Bancos/PagoAcreedor.aspx.cs @@ -382,28 +382,15 @@ public partial class Bancos_PagoAcreedor : ClsPaginas } //VALIDA QUE CUADRE LA PREPOLIZA - if (MsgError == "" && ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5)) + Usuario UA = UsuarioActual; + if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA,Opcion:5)) { if (ObjMov.ValorPolizaDescuadre > 0) { MsgError = ObjMov.MensajePolizaDescuadre; ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas"); } - } - - //CONTABILIZA - if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) - { - - if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) - { - IDPoliza = ObjMov.ContaIdPoliza; - } - else - { - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); - } - } + } if (MsgError.Equals("")) { @@ -617,27 +604,15 @@ public partial class Bancos_PagoAcreedor : ClsPaginas } //VALIDA QUE CUADRE LA POLIZA - if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5)) + Usuario UA = UsuarioActual; + if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 5)) { if (ObjMov.ValorPolizaDescuadre > 0) { MsgError = ObjMov.MensajePolizaDescuadre; ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas"); } - } - - //CONTABILIZA - if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) - { - if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) - { - IDPoliza = ObjMov.ContaIdPoliza; - } - else - { - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); - } - } + } if (MsgError.Equals("")) { diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index fe400ea7b..020ac979b 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -308,25 +308,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas $"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD("LogPrePolizas"); } } - - //bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1"); - //// if (UsuarioActual.CveEmpresa == 119) AutoConta = false; - - //if (AutoConta && MsgError.Equals("")) - //{ - // //JJMQ:20190103: Cambio la siguiente linea porque esta validando siempre una complementaria aunque el movto sea dlls - // //Y se valida la moneda con el siguiente IF - - // if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) - // { - // IDPoliza = ObjMov.ContaIdPoliza; - // } - // else - // { - // Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); - // } - //} - + if (MsgError.Equals("")) { if (Msg.ToString().Equals("")) @@ -686,23 +668,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas MsgError = ObjMov.MensajePolizaDescuadre; $"Bancos/IE PAGO Deudor | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}".GuardaLogAD("LogPrePolizas"); } - } - - - //bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1"); - ////if (UsuarioActual.CveEmpresa == 119) AutoConta = false; - - //if (AutoConta && MsgError.Equals("")) - //{ - // if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) - // { - // IDPoliza = ObjMov.ContaIdPoliza; - // } - // else - // { - // Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); - // } - //} + } } else { diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index 7fda562fd..c54a4ae23 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -861,19 +861,6 @@ Partial Class Bancos_PolizaCheque End If End If - 'El movimiento 2 es el de Pago - If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then - - If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - IDPoliza = ObjMov.ContaIdPoliza - Else - MsgError = "Error al contabilizar" - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - End If - - End If - - If MsgError = "" Then ObjIE.Commit() diff --git a/Bancos/PrestamoPersonal.aspx.cs b/Bancos/PrestamoPersonal.aspx.cs index 00075eb97..0583bf6d1 100644 --- a/Bancos/PrestamoPersonal.aspx.cs +++ b/Bancos/PrestamoPersonal.aspx.cs @@ -315,30 +315,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas else { MsgError = "No se pudo insertar la póliza"; - } - - // VALIDA QUE CUADRE LA PREPOLIZA - if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5)) + } + + // VALIDA QUE CUADRE LA PREPOLIZA + Usuario UA = UsuarioActual; + if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 5)) { if (ObjMov.ValorPolizaDescuadre > 0) { MsgError = ObjMov.MensajePolizaDescuadre; ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas"); } - } - - //CONTABILIZA - if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) - { - if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) - { - IDPoliza = ObjMov.ContaIdPoliza; - } - else - { - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); - } - } + } if (MsgError.Equals("")) { @@ -593,30 +581,18 @@ public partial class Bancos_PrestamoPersonal : ClsPaginas else { MsgError = "No se pudo insertar la póliza"; - } - - //VALIDA QUE CUADRE LA POLIZA - if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5)) + } + + //VALIDA QUE CUADRE LA POLIZA + Usuario UA = UsuarioActual; + if (MsgError == "" && ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 5)) { if (ObjMov.ValorPolizaDescuadre > 0) { MsgError = ObjMov.MensajePolizaDescuadre; ModExtensiones.GuardaLogAD($"Bancos/IE PAGO ACREEDOR | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas"); } - } - - //CONTABILIZA - if (UsuarioActual.Empresa.Funcionalidad(200).Equals("1") && MsgError.Equals("")) - { - if (ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa)) - { - IDPoliza = ObjMov.ContaIdPoliza; - } - else - { - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError); - } - } + } if (MsgError.Equals("")) { diff --git a/Bancos/ProductosFinancieros.aspx.vb b/Bancos/ProductosFinancieros.aspx.vb index 142179554..4836de357 100644 --- a/Bancos/ProductosFinancieros.aspx.vb +++ b/Bancos/ProductosFinancieros.aspx.vb @@ -366,25 +366,7 @@ Partial Class Bancos_ProductosFinancieros If Not ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=4) Then ErrorTransaccion = True End If - - 'Por el momento no hay movimiento para estas plantillas y no debe entrar aqui - If UsuarioActual.Empresa.Funcionalidad(200).ToEntero > 0 And Not ErrorTransaccion Then - If idCuentaContabilizacion > 0 Then - If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion) - Else - Alert("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 - - End If - - - Else ErrorTransaccion = True End If diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 23f8c212d..9f7dd2e45 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -841,23 +841,12 @@ Partial Class Bancos_ProveedoresAbonar End If End If - If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then + If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5) Then If ObjMov.ValorPolizaDescuadre > 0 Then MsgError = ObjMov.MensajePolizaDescuadre + " " + ObjMov.ValorDiferencia GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") End If End If - - 'Conta ContPAQ - If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then - 'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then - If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then - IDPoliza = ObjMov.ContaIdPoliza - Else - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico" - End If - End If Else MsgError = "No se pudo insertar la póliza" End If diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb index decc73eb3..4c564e10d 100644 --- a/Bancos/RepEgresosSinComprobante.aspx.vb +++ b/Bancos/RepEgresosSinComprobante.aspx.vb @@ -333,12 +333,6 @@ Partial Class Bancos_RepEgresosSinComprobante Exit For End If - If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then - If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) - End If - End If - End If Next Catch ex As Exception diff --git a/Bancos/Transferencias.aspx.vb b/Bancos/Transferencias.aspx.vb index 16b0c62be..7134865b9 100644 --- a/Bancos/Transferencias.aspx.vb +++ b/Bancos/Transferencias.aspx.vb @@ -425,18 +425,6 @@ Partial Class Bancos_Transferencias If MsgError = "" Then - 'Conta ContPAQ - If UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then - - If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, Fecha:=TxtFechaDocumento.Text.ToDate) Then - If ObjMov.ContaIdPoliza > 0 Then - AlertaGlobal.AppendFormat("

Ver Póliza", ObjMov.ContaIdPoliza) - End If - Else - MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico" - End If - End If - If CveIE > 0 Then AlertaGlobal.AppendFormat("

Movimiento: {1}", CveIE, FolioOrigen) End If diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 40c9cab95..3f960cd6c 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -9129,15 +9129,6 @@ Partial Class Compras_Compras Next End If - ''VALIDAR PREPOLIZA DE COMPRA - 'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then - ' If ObjConta.ValorPolizaDescuadre > 0 Then - ' ErrorPrepoliza = True - ' Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia) - ' GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - ' End If - 'End If - If Not ErrorPrepoliza Then Retorno = True Else diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index cfb6c0604..aec735a45 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -789,38 +789,20 @@ Partial Class Compras_ReembolsosComprobaciones Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" - If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1, AutoConta:=AutoConta) Then + If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePolizaPago, UsuarioActual, Opcion:=1, AutoConta:=AutoConta) Then If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Compras/ReembolsosComprobaciones | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePolizaPago}", "LogPrePolizas") MsgError = ObjMov.MensajePolizaDescuadre End If End If - If MsgError = "" AndAlso CvePrePolizaExcedente > 0 AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaExcedente, 1, AutoConta:=AutoConta) Then + If MsgError = "" AndAlso CvePrePolizaExcedente > 0 AndAlso ObjMov.ValidacionesPrePoliza(CvePrePolizaExcedente, UsuarioActual, Opcion:=1, AutoConta:=AutoConta) Then If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Compras/ReembolsosComprobaciones | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePolizaExcedente}", "LogPrePolizas") MsgError = ObjMov.MensajePolizaDescuadre End If End If - If MsgError.Trim = "" Then - - 'Conta ContPAQ AUTOMATICA - If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError.Trim = "" Then - If CvePrePolizaIERegistrado > 0 Then - If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico" - End If - End If - - If ChkChequeExcedente.Checked Then - If Not ObjMov.ContabilizarPrePoliza(CvePrePolizaIERegistrado, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - MsgError = "Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico" - End If - End If - End If - End If - Else MsgError = "No se pudo insertar el encabezado" End If diff --git a/Compras/RepNotasCredito.aspx.vb b/Compras/RepNotasCredito.aspx.vb index 02a971121..7647c7aa0 100644 --- a/Compras/RepNotasCredito.aspx.vb +++ b/Compras/RepNotasCredito.aspx.vb @@ -129,7 +129,7 @@ Partial Class Compras_RepNotasCredito Dim TCCompra As Decimal = 0 Dim Concepto As String = TxtConcepto.Text Dim UsaComplementaria As Boolean = UsuarioActual.CveEmpresa.Contiene(119) - Dim MensajeAlert = New StringBuilder + Dim MensajeAlert As New StringBuilder CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 103, 0, 0, 1, TxtFechaSaldar.Text.ToDate, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -139,7 +139,7 @@ Partial Class Compras_RepNotasCredito ImporteMN = gr.DataKey("Saldo").ToDecimal.RoundSQL TCCompra = gr.DataKey("TipoCambio").ToDecimal CveMoneda = gr.DataKey("CveMoneda").ToEntero - Dim CveTipoConcepto = gr.DataKey("CveTipoConcepto").ToEntero + Dim CveTipoConcepto As Integer = gr.DataKey("CveTipoConcepto").ToEntero If CveMoneda > 1 Then ImporteMN = (gr.DataKey("Saldo").ToDecimal * TCCompra).RoundSQL @@ -188,22 +188,13 @@ Partial Class Compras_RepNotasCredito Next If MsgError = "" Then - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5) Then If ObjConta.ValorPolizaDescuadre > 0 Then MsgError = ObjConta.MensajePolizaDescuadre GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") End If End If - If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then - If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - If MensajeAlert.ToString = "" Then - MensajeAlert.AppendFormat("Los siguientes movimientos fueron saldados correctamente:
") - End If - MensajeAlert.AppendFormat("", ObjConta.ContaIdPoliza, ObjConta.ContaFolio) - End If - End If - If MsgError = "" Then ObjConta.Commit() If MensajeAlert.ToString <> "" Then diff --git a/Compras/RepRembolsoComprobaciones.aspx.vb b/Compras/RepRembolsoComprobaciones.aspx.vb index 4f611595d..98cbd2dd3 100644 --- a/Compras/RepRembolsoComprobaciones.aspx.vb +++ b/Compras/RepRembolsoComprobaciones.aspx.vb @@ -160,7 +160,7 @@ Partial Class Compras_RepRembolsoComprobaciones End If - If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then + If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Compras/RepRembolsoComprobaciones - Unificar | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") Alert(ObjMov.MensajePolizaDescuadre, TipoMensaje.MsgError) @@ -171,25 +171,11 @@ Partial Class Compras_RepRembolsoComprobaciones If Not TieneError Then Msg.AppendFormat("Se unificaron todas las compras con éxito") End If - - If UsuarioActual.Empresa.Funcionalidad(200).ToString = "1" AndAlso Not TieneError Then - ObjAC = New ClsContPAQi(UsuarioActual.Empresa) - ObjAC.IniciaTransacSQL() - - If Not TieneError Then - If Not ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjAC) Then - TieneError = True - Alert($"Ocurrio un error al contabilizar {ObjMov.AlertaMensaje}", TipoMensaje.MsgAdvertencia) - Else - IdPoliza = ObjMov.ContaIdPoliza - End If - End If - - If IdPoliza > 0 AndAlso Not TieneError Then - Msg.AppendFormat("

Ver Póliza", IdPoliza) - End If - + IdPoliza = ObjMov.ContaIdPoliza + If IdPoliza > 0 AndAlso Not TieneError Then + Msg.AppendFormat("

Ver Póliza", IdPoliza) End If + Catch ex As Exception TieneError = True OnError("Ocurrió un error al unificar las compras", ex) diff --git a/Contabilidad/PopUpAuxiliar.aspx.vb b/Contabilidad/PopUpAuxiliar.aspx.vb index 02ec5fce4..9cdaaff03 100644 --- a/Contabilidad/PopUpAuxiliar.aspx.vb +++ b/Contabilidad/PopUpAuxiliar.aspx.vb @@ -277,7 +277,7 @@ Partial Class PopUpAuxiliar TieneError = True End If - If Not TieneError AndAlso Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then + If Not TieneError AndAlso Conta.ValidacionesPrePoliza(ClavePrePoliza, UsuarioActual) Then If Conta.ValorPolizaDescuadre > 0 Then TieneError = True End If diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 222bc4852..a9832af7d 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -1100,29 +1100,29 @@ Partial Class ContabilidadC_RegPrePoliza ' End If 'End If - If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then + If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") MsgError = ObjMov.MensajePolizaDescuadre & "-" End If End If - 'El movimiento 2 es el de Pago - If ChkAutoConta.Checked AndAlso MsgError = "" Or UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then - If idCuentaContabilizacion > 0 Then - If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then + ''El movimiento 2 es el de Pago + 'If ChkAutoConta.Checked AndAlso MsgError = "" Or UsuarioActual.Empresa.Funcionalidad(200) = "1" And MsgError = "" Then + ' If idCuentaContabilizacion > 0 Then + ' If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then - 'MENSAJE PRINCIPAL - MensajeAlert.AppendFormat("

Folio de Póliza: {1}", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) - MensajeAlert.AppendFormat("

Prepóliza: {1}", CvePrePoliza, ObjMov.ContaFolio) - 'Alert(MensajeAlert.Tostring(), ModExtensiones.TipoMensaje.MsgInformacion) - Else - Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico") - End If - Else - Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas") - End If - End If + ' 'MENSAJE PRINCIPAL + ' MensajeAlert.AppendFormat("

Folio de Póliza: {1}", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) + ' MensajeAlert.AppendFormat("

Prepóliza: {1}", CvePrePoliza, ObjMov.ContaFolio) + ' 'Alert(MensajeAlert.Tostring(), ModExtensiones.TipoMensaje.MsgInformacion) + ' Else + ' Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico") + ' End If + ' Else + ' Alert("No se puede contabilizar la Prepoliza debido a que una o mas cuentas son inválidas") + ' End If + 'End If Else MsgError = "No se pudo insertar la póliza" diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 66f677d93..04a1d755f 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -2915,7 +2915,7 @@ Partial Class ContabilidadC_RegPrePolizaS End If Next - If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then + If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=1) Then If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") MsgError = ObjMov.MensajePolizaDescuadre diff --git a/Contabilidad/RepAnexoCatalogo.aspx.vb b/Contabilidad/RepAnexoCatalogo.aspx.vb index e3dd29e2a..1ce96c44a 100644 --- a/Contabilidad/RepAnexoCatalogo.aspx.vb +++ b/Contabilidad/RepAnexoCatalogo.aspx.vb @@ -71,6 +71,10 @@ Partial Class AC_RepAnexoCatalogo Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then + If UsuarioActual.Empresa.TipoContabilidad = 1 Then + Response.Redirect($"/Contabilidad2/RepAnexoCatalogo.aspx") + End If + If UsuarioActual.Empresa.UsaContabilidad Or UsuarioActual.Empresa.UsaAC Then InicializaValores() CargaURLParametros() diff --git a/Inventarios/Consignaciones.aspx.vb b/Inventarios/Consignaciones.aspx.vb index e211666af..0f32c6301 100644 --- a/Inventarios/Consignaciones.aspx.vb +++ b/Inventarios/Consignaciones.aspx.vb @@ -839,7 +839,7 @@ Partial Class Inventarios_Consignaciones ErrorMovInv = True End If - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") ErrorMovInv = True @@ -1017,7 +1017,7 @@ Partial Class Inventarios_Consignaciones ErrorMovInv = True End If - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") ErrorMovInv = True @@ -1569,7 +1569,7 @@ Partial Class Inventarios_Consignaciones ErrorMovInv = True End If - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") ErrorMovInv = True diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index decd0e02d..91c9a70b6 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -2002,15 +2002,6 @@ Partial Class Inventarios_EntradasSalidas 'End If End If - 'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, OpcionPrePoliza) Then - ' If ObjConta.ValorPolizaDescuadre > 0 Then - ' ErrorMovInv = True - ' GuardaLogAD($"Inv/ES | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") - ' Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia) - ' End If - 'Else - ' Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia) - 'End If End If '------------------------------------------------ @@ -4639,14 +4630,6 @@ Partial Class Inventarios_EntradasSalidas ' ErrorPrepolizaDescuadre = True 'End If End If - - 'If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then - ' ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) - ' If ObjConta.ValorPolizaDescuadre > 0 Then - ' ErrorMovInv = True - ' Mensaje = "Ocurrió un error al validar los movimientos contables" - ' End If - 'End If End If Dim RetornoVirtual As MMovimientoVirtual = Nothing diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb index 9299a4f7b..65355c496 100644 --- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb +++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb @@ -619,8 +619,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado TieneError = True End If - - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") TieneError = True @@ -743,8 +742,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado TieneError = True End If - - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=6) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") TieneError = True @@ -753,7 +751,6 @@ Partial Class Inventarios_PaquetesArmadoDesarmado End Select - If Not TieneError Then Dim Msg As New StringBuilder diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index ee0c1f8f5..a78ec0fb7 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1487,7 +1487,7 @@ Partial Class Inventarios_RecepcionUsados Correcto = False End If - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=-1) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Inventarios/RecepcionUsados-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") Correcto = False @@ -3286,9 +3286,9 @@ Partial Class Inventarios_RecepcionUsados Dim CargoActual As Double = 0 Dim Row As DataRow = Nothing - Dim EsNuevo As Boolean = true + Dim EsNuevo As Boolean = True - Dim RowsAjustes = TmpDTAjustes.Select($"ConsecutivoVenta = {ConsecutivoVenta}") + Dim RowsAjustes As DataRow() = TmpDTAjustes.Select($"ConsecutivoVenta = {ConsecutivoVenta}") If RowsAjustes IsNot Nothing AndAlso RowsAjustes.Length > 0 Then Row = RowsAjustes(0) diff --git a/PortalCliente/PortalCliente.aspx.vb b/PortalCliente/PortalCliente.aspx.vb index 0000a25a2..bd3c7e951 100644 --- a/PortalCliente/PortalCliente.aspx.vb +++ b/PortalCliente/PortalCliente.aspx.vb @@ -1879,7 +1879,7 @@ Partial Class Ventas_PortalCliente End If If MsgError = "" Then - If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then + If ObjMov.sValidacionePrePoliza(CvePrePoliza, UsuarioActual) Then If ObjMov.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Bancos/IE | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") End If diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 87166c841..2c5749d39 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2,6 +2,7 @@ 'Option Strict On Imports System.Data +Imports ADSTimbrado Imports Extensiones Partial Class Ventas_ClientesAbonar @@ -1369,17 +1370,12 @@ Partial Class Ventas_ClientesAbonar ObjFacturaDevolucion.CveEmpresa = UsuarioActual.CveEmpresa ObjFacturaDevolucion.TipoCambio = If(Me.CveMoneda = 1, 1, GlobalTipoCambio(NowADS()).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 = NowADS() - ObjFacturaDevolucion.CvePrePoliza = -1 - ObjFacturaDevolucion.CveMetodoPago = 0 - ObjFacturaDevolucion.CondicionesPago = 0 ' 0 - Contado, 1 - Credito (CHECAR) - ObjFacturaDevolucion.FormaPago = 0 ObjFacturaDevolucion.TipoDocto = "Egs" ObjFacturaDevolucion.Fecha = NowADS() @@ -1433,7 +1429,7 @@ Partial Class Ventas_ClientesAbonar ObjFacturaDevolucion.DtVentasRelacionadas.Columns.Add("CveVenta", GetType(Integer)) Dim Fol As New List(Of String) - For Each Fac In ListaVentasGenerarNC + For Each Fac As Modelos.Factura In ListaVentasGenerarNC Fol.Add(Fac.FolioFiscal) Dim RowVenta As DataRow = ObjFacturaDevolucion.DtVentasRelacionadas.NewRow @@ -1460,24 +1456,14 @@ Partial Class Ventas_ClientesAbonar End Select ObjFacturaDevolucion.FechaPago = NowADS() + Dim DtVentasNC As DataTable = InicializaDTVentasNC() - 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 TotalImporte As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("TotalImporte") + Dim ImporteIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteIVA") + Dim ImporteRetIVA As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteRetIVA") + Dim ImporteRetISR As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteRetISR") + Dim ImporteIEPS As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("ImporteIEPS") + Dim Descuento As Decimal = ObjFacturaDevolucion.DtDetalle.SUM("Descuento") Dim Amortizacion As Decimal = 0 Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion) @@ -1493,8 +1479,8 @@ Partial Class Ventas_ClientesAbonar ObjFacturaDevolucion.Total = Total ObjFacturaDevolucion.TotalOtrosConceptos = 0 - For Each Fac In ListaVentasGenerarNC - Dim Drt = DtVentasNC.NewRow + For Each Fac As Modelos.Factura In ListaVentasGenerarNC + Dim Drt As DataRow = DtVentasNC.NewRow Drt("CveVenta") = Fac.CveVenta Drt("Importe") = Fac.DescuentoProntoPago Drt("FolioFiscal") = Fac.FolioFiscal @@ -1508,7 +1494,7 @@ Partial Class Ventas_ClientesAbonar ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion, ListaVentasGenerarNC) Try - Dim Resp = ObjFacturaDevolucion.EmitirFactura(False, Transac:=SqlTransaccion) + Dim Resp As Modelos.Factura.MMensajeFactura = ObjFacturaDevolucion.EmitirFactura(False, Transac:=SqlTransaccion) Retorno.Respuesta = Resp Catch ex As Exception OnError("Ocurrió un error al guardar la NC de pronto pago", ex) @@ -1572,7 +1558,7 @@ Partial Class Ventas_ClientesAbonar Timbre.CFDIRelacionados.TipoRelacion = RowTipoRelacion("SATClaveTipoRelacion").ToString() Timbre.CFDIRelacionados.TipoRelacionTexto = RowTipoRelacion("SATTipoRelacion").ToString() - For Each Fac In ListaVentasGenerarNC + For Each Fac As Modelos.Factura In ListaVentasGenerarNC Timbre.CFDIRelacionados.UUID.Add(Fac.FolioFiscal) Next End If @@ -1601,7 +1587,7 @@ Partial Class Ventas_ClientesAbonar tPS = tPS.Replace("|", " ") If tPS.Length >= 1000 Then - Dim tPSRecortado = tPS.Remove(999, tPS.Length - 999) + Dim tPSRecortado As String = tPS.Remove(999, tPS.Length - 999) tPS = tPSRecortado End If @@ -1740,7 +1726,7 @@ Partial Class Ventas_ClientesAbonar DtImpuestos.AcceptChanges() Dim AcumuladoNC As Decimal = 0 - For Each Fac In ListaVentasGenerarNC + For Each Fac As Modelos.Factura In ListaVentasGenerarNC DtImpuestos.Merge(CargaDtImpuestosNC(Fac.CveVenta, Fac.DescuentoProntoPago), True, MissingSchemaAction.Ignore) Next @@ -2384,7 +2370,7 @@ Partial Class Ventas_ClientesAbonar MsgError = "Ocurrio un error al saldar el movimiento" End If - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5) Then If ObjConta.ValorPolizaDescuadre > 0 Then MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia GuardaLogAD($"Ventas/ClientesAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") diff --git a/Ventas/RepNCxAplicar.aspx.cs b/Ventas/RepNCxAplicar.aspx.cs index e1f32d2d0..b8153eccf 100644 --- a/Ventas/RepNCxAplicar.aspx.cs +++ b/Ventas/RepNCxAplicar.aspx.cs @@ -211,8 +211,8 @@ public partial class Ventas_RepNCxAplicar : ClsPaginas { MsgError = "Ocurrio un error al saldar el movimiento"; } - - if (ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1)) + Usuario UA = UsuarioActual; + if (MsgError == "" && ObjConta.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: -1)) { if (ObjConta.ValorPolizaDescuadre > 0) { diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 439509f2b..c5c6ebba5 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -15835,7 +15835,7 @@ Partial Class Ventas ErrorConta = True End If - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 3) Then If ObjConta.ValorPolizaDescuadre > 0 Then GuardaLogAD($"Ventas/Ventas-Anticipos | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") ErrorConta = True @@ -21368,7 +21368,7 @@ Partial Class Ventas End If End If - If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then + If ObjConta.ValidacionesPrePoliza(-1, UsuarioActual, Opcion:=2, CveVenta:=CveVenta) Then If ObjConta.ValorPolizaDescuadre > 0 Then If ObjConta.ValorPolizaDescuadre = 2 Then OcurrioError = True @@ -25802,11 +25802,7 @@ Partial Class Ventas MsgError = "Ocurrio un error al saldar el movimiento" End If - 'If Descuentos > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not SubtotalMovto, Descuentos, SerieFolio, 103, ConceptoPartida, FechaPago, IdCuentaContableNoDeducible, -1, CveCliente:=CveCliente, CveVenta:=CveVenta, ImporteMX:=Descuentos, CveCuenta:=-1, TipoCambio:=TCVenta, TipoCambioPago:=TCPago, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto) Then - ' MsgError = "Ocurrio un error al saldar el movimiento" - 'End If - - If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then + If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 5) Then If ObjConta.ValorPolizaDescuadre > 0 Then MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia GuardaLogAD($"Ventas/ClientesAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas") @@ -29814,14 +29810,6 @@ Partial Class Ventas End If End If - 'If ObjConta.ValidacionPrePolizaCuadre(-1, 2, CveVenta) Then - ' If ObjConta.ValorPolizaDescuadre > 0 Then - ' If ObjConta.ValorPolizaDescuadre = 2 Then - ' OcurrioError = True - ' MensajeError = ObjConta.MensajePolizaDescuadre - ' End If - ' End If - 'End If Catch ex As Exception OcurrioError = True OnError("Ocurrió un error al guardar la cotización", ex) From 2aa0c1f4a35325f3099c120aeeb5501d3c003dde Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Nov 2023 13:20:36 -0700 Subject: [PATCH 18/30] =?UTF-8?q?--=20correcci=C3=B3n=20de=20numero=20de?= =?UTF-8?q?=20columna?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/RepProductosServicios.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index 257116385..e8d79bdb1 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -197,11 +197,11 @@ Partial Class Ventas_RepProductosServicios txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString txtFechaF.Text = NowADS().ToShortDateString - If UsuarioActual.TienePermisoProceso(339) Then - GvDatos.Columns(2).Visible = False + If UsuarioActual.TienePermisoProceso(339) Then GvDatos.Columns(3).Visible = False GvDatos.Columns(4).Visible = False GvDatos.Columns(5).Visible = False + GvDatos.Columns(6).Visible = False End If End Sub From be4f17839f4b2939f8f676818162c6a3d2bed2d5 Mon Sep 17 00:00:00 2001 From: rrene Date: Sat, 18 Nov 2023 13:20:48 -0700 Subject: [PATCH 19/30] =?UTF-8?q?correcci=C3=B3n=20parametros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/CatFamiliaSubFamilia.aspx.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Ventas/CatFamiliaSubFamilia.aspx.vb b/Ventas/CatFamiliaSubFamilia.aspx.vb index 56eb761f7..5861c05df 100644 --- a/Ventas/CatFamiliaSubFamilia.aspx.vb +++ b/Ventas/CatFamiliaSubFamilia.aspx.vb @@ -187,7 +187,6 @@ Partial Class Ventas_CatFamiliaSubFamilia Protected Sub LbAgregarS_Click(sender As Object, e As EventArgs) Handles LbAgregarS.Click Dim ObjClasificaciones As New ClsClasificaciones If ObjClasificaciones.AddClasificaciones(TxtClasificacionS.Text.Trim, "", - -1, "", -1, "", -1, "", DdlCategoriaS.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then 'DdlCuentaGastoS.SelectedValue.ToEntero, DdlCuentaGastoS.SelectedItem.Text, 'DdlCuentaAnticipoS.SelectedValue.ToEntero, DdlCuentaAnticipoS.SelectedItem.Text, @@ -358,7 +357,7 @@ Partial Class Ventas_CatFamiliaSubFamilia Dim DdlCategoria As DropDownList = GvDatosS.Rows(e.RowIndex).FCDropDownList("DdlCategoria") 'Dim IDCuentaGasto As Integer = GvDatosS.Rows(e.RowIndex).FCDropDownList("DdlCuentaGasto").SelectedValue.ToEntero - If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", -1, "", -1, "", -1, "", Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then + If ObjClasificaciones.UpdateClasificacion(Clasificacion, "", Estatus, False, DdlCategoria.SelectedValue.ToEntero, UsuarioActual.CveUsuario, CveClasificacion) Then 'DdlGasto.SelectedValue.ToEntero, DdlGasto.SelectedItem.Text, 'DdlAnticipo.SelectedValue.ToEntero, DdlAnticipo.SelectedItem.Text, 'DdlInventario.SelectedValue.ToEntero, DdlInventario.SelectedItem.Text, From 7eb061a56c2b0f79ef8d981c68bb7bc69e9362cf Mon Sep 17 00:00:00 2001 From: rakcsle Date: Fri, 17 Nov 2023 15:50:09 -0700 Subject: [PATCH 20/30] Ventas medicas fuera de linea --- App_Code/ClsInventarios.vb | 1 + App_Code/ClsOS.vb | 7 +- App_Code/ClsVentas.vb | 9 +- Ashx/CargaEventos.ashx | 38 ++- CRM/Acercamiento.aspx | 2 +- CRM/EmpresaCRM.aspx | 2 +- Inventarios/EntregaAlmacen.aspx | 2 +- Inventarios/EntregaAlmacen.aspx.vb | 109 +++++--- OS/Asignaciones.aspx.vb | 2 +- OS/CatEstatusOrdenServicio.aspx | 26 +- OS/CatEstatusOrdenServicio.aspx.vb | 18 +- OS/OrdenesServicios.aspx | 2 +- OS/RepServicioDomicilio.aspx.vb | 4 + Scripts/jquery.simple-color-picker.css | 31 +++ Scripts/jquery.simple-color-picker.js | 104 +++++++ Ventas/Ventas.aspx | 140 +++++++++- Ventas/Ventas.aspx.vb | 359 ++++++++++++++++++++++++- Ventas/VentasMedicas.aspx | 101 ++++++- Ventas/VentasMedicas.aspx.vb | 184 +++++++++++-- 19 files changed, 1031 insertions(+), 110 deletions(-) create mode 100644 Scripts/jquery.simple-color-picker.css create mode 100644 Scripts/jquery.simple-color-picker.js diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 1699f61e8..b46e6a56d 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1045,6 +1045,7 @@ Public Class ClsInventarios .Add("@Licencia", SqlDbType.VarChar).Value = Licencia .Add("@Modulo", SqlDbType.VarChar).Value = Modulo .Add("@CveOP", SqlDbType.Int).Value = CveOP + .Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia End With diff --git a/App_Code/ClsOS.vb b/App_Code/ClsOS.vb index 64b381f1d..171d0f8bf 100644 --- a/App_Code/ClsOS.vb +++ b/App_Code/ClsOS.vb @@ -378,7 +378,7 @@ Public Class ClsOS Return Retorno End Function - Public Function AddEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean + Public Function AddEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveUsuario As Integer, CveEmpresa As Integer, BackgroundColor As String) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_EstatusOrdenServicioAdd") @@ -389,7 +389,7 @@ Public Class ClsOS .Add("@Estado", SqlDbType.Bit).Value = Estado .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - + .Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor End With Try @@ -407,7 +407,7 @@ Public Class ClsOS Return Retorno End Function - Public Function UpdateEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveEstatusOrdenServicio As Integer) As Boolean + Public Function UpdateEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveEstatusOrdenServicio As Integer, BackgroundColor As String) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_OS_EstatusOrdenServicioUpdate") @@ -417,6 +417,7 @@ Public Class ClsOS .Add("@TipoEstatus", SqlDbType.Int).Value = TipoEstatus .Add("@Estado", SqlDbType.Bit).Value = Estado .Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatusOrdenServicio + .Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor End With Try diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index e1eab6eec..490f25784 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -419,7 +419,7 @@ Public Class ClsVentas Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1", Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "", - Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1 + Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False ) As Boolean Dim Retorno As Boolean = False @@ -524,6 +524,8 @@ Public Class ClsVentas .Add("@CveMedico", SqlDbType.Int).Value = CveMedico .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento .Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta + .Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS + .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With @@ -552,7 +554,9 @@ Public Class ClsVentas Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1, Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1, - Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1) As Boolean + Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1, + Optional RequiereOS As Boolean = False) As Boolean + Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasUpdate") @@ -586,6 +590,7 @@ Public Class ClsVentas .Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS End With Try diff --git a/Ashx/CargaEventos.ashx b/Ashx/CargaEventos.ashx index 3e8039f23..91874be2f 100644 --- a/Ashx/CargaEventos.ashx +++ b/Ashx/CargaEventos.ashx @@ -100,6 +100,10 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer)) DT_SubProyectos.Columns.Add("backgroundColor") + Dim DT_EstatusOS = New DataTable + DT_EstatusOS.Columns.Add("", GetType(Integer)) + + 'son 26 Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"} @@ -140,6 +144,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End If + + Dim EsCoordinador As Boolean = False Dim usuarioActual_ As Usuario = UsuarioActual(context) @@ -239,17 +245,24 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState If usuarioActual_.Empresa.Funcionalidad(578) = "1" Then - If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then - cevent.backgroundColor = "#006699" - ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then - cevent.backgroundColor = "#025716" - ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then - cevent.backgroundColor = "#730505" + Dim colorString As String = dr("BackgroundColorOS").ToString.Trim + + If colorString.Length > 0 AndAlso IsValidHtmlColor(colorString) Then + cevent.backgroundColor = $"#{colorString}" Else - cevent.backgroundColor = "#006699" + If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then + cevent.backgroundColor = "#006699" + ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then + cevent.backgroundColor = "#025716" + ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then + cevent.backgroundColor = "#730505" + Else + cevent.backgroundColor = "#006699" + End If End If + End If 'VERIFICAMOS SI TIENE O NO RECURRENCIA @@ -424,5 +437,16 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState End Get End Property + Private Function IsValidHtmlColor(colorString As String) As Boolean + Try + Dim color As System.Drawing.Color = System.Drawing.ColorTranslator.FromHtml(colorString) + ' Si no se produce una excepción, el color es válido + Return True + Catch ex As Exception + ' Se produce una excepción, el color no es válido + Return False + End Try + End Function + End Class diff --git a/CRM/Acercamiento.aspx b/CRM/Acercamiento.aspx index 47b1508a6..b726cbc25 100644 --- a/CRM/Acercamiento.aspx +++ b/CRM/Acercamiento.aspx @@ -454,7 +454,7 @@ <%----%> - +
diff --git a/CRM/EmpresaCRM.aspx b/CRM/EmpresaCRM.aspx index 29216de65..a4e65951e 100644 --- a/CRM/EmpresaCRM.aspx +++ b/CRM/EmpresaCRM.aspx @@ -861,7 +861,7 @@ <%----%> - +
diff --git a/Inventarios/EntregaAlmacen.aspx b/Inventarios/EntregaAlmacen.aspx index 277f7e9b2..80305b09f 100644 --- a/Inventarios/EntregaAlmacen.aspx +++ b/Inventarios/EntregaAlmacen.aspx @@ -367,7 +367,7 @@
- + diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 03580d33e..9fc025498 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -106,7 +106,18 @@ Partial Class Inventarios_EntregaAlmacen Set(value As Integer) ViewState("CveVentaSurtir") = value End Set - End Property + End Property + + Private Property CveOSSurtir As Integer + Get + Return CType(ViewState("CveOSSurtir"), Integer) + End Get + Set(value As Integer) + ViewState("CveOSSurtir") = value + End Set + End Property + + Private Property TipoEstatus As Integer Get Return CType(ViewState("TipoEstatus"), Integer) @@ -547,6 +558,10 @@ Partial Class Inventarios_EntregaAlmacen Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs) Dim Boton As LinkButton = CType(sender, LinkButton) + + Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow) + Dim CveOS As Integer = GvRow.DataKey("CveOS").ToEntero + CveVentaAD = -1 If Boton.CommandArgument.ToEntero() > 0 Then @@ -560,7 +575,7 @@ Partial Class Inventarios_EntregaAlmacen Select Case CType(Boton.NamingContainer, GridViewRow).DataKey("TipoEntrega").ToEntero() Case 1 ' VENTA - CargaVentaPorSurtir(CType(sender, LinkButton).CommandArgument.ToEntero()) + CargaVentaPorSurtir(CType(sender, LinkButton).CommandArgument.ToEntero(), CveOS:=CveOS) Case 2 ' TRASPASO DivTransitorio1.Visible = True CargaTraspasoPorSurtir(CType(Boton.NamingContainer, GridViewRow).DataKey("CveTraspasoSolicitud").ToEntero()) @@ -573,15 +588,17 @@ Partial Class Inventarios_EntregaAlmacen CveVentaAD = -2 CargaVentaPorSurtir(DdlFolio.SelectedValue.ToEntero()) End Sub - Private Sub CargaVentaPorSurtir(CveVenta As Integer, Optional CveAlmacen As Integer = -1) + Private Sub CargaVentaPorSurtir(CveVenta As Integer, Optional CveAlmacen As Integer = -1, Optional CveOS As Integer = -1) LbSurtida.Visible = False CveContrato = -1 CveSubProyecto = -1 CveOP = -1 DtDatos = Nothing TipoEntrega = 1 - BtnGuardar.Visible = True - + BtnGuardar.Visible = True + + + Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,26)" If UsuarioActual.CveSubProyecto = 8804 Then @@ -642,6 +659,7 @@ Partial Class Inventarios_EntregaAlmacen trObsAlmacen.Visible = drE("ObservacionesAlmacen").ToString() <> "" LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString() CveVentaSurtir = CveVenta + CveOSSurtir = CveOS CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero() CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero() CveContrato = drE("CveContrato").ToString().ToEntero() @@ -857,6 +875,7 @@ Partial Class Inventarios_EntregaAlmacen EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString()) CveOP = DtDatos.Rows(0)("CveOP").ToString().ToEntero() CveVentaSurtir = -1 + CveOSSurtir = -1 If DtDatos.SUM("CantidadS") <= 0 Then GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna" Else @@ -945,7 +964,7 @@ Partial Class Inventarios_EntregaAlmacen 'SugerirFecha() If DdlAlmacen.SelectedValue.ToEntero > 0 And CveVentaSurtir > 0 Then - CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero) + CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero, CveOS:=CveOSSurtir) If CargaBitacora Then CargaBitacoraSerie() @@ -2002,7 +2021,7 @@ Partial Class Inventarios_EntregaAlmacen If Not CveMovimientoSalida > 0 Then - CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, + CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC1") FolioSalida = ObjInventario.Folio @@ -2052,7 +2071,7 @@ Partial Class Inventarios_EntregaAlmacen CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr1("CveAlmacen")}").ToEntero() If Not CveMovimientoSalida > 0 Then - CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, + CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC3") FolioSalida = ObjInventario.Folio @@ -2112,7 +2131,7 @@ Partial Class Inventarios_EntregaAlmacen Dim CveAlmacenExA As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=10).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero() - CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(CveAlmacenExA, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, + CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(CveAlmacenExA, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4") FolioEntrada = ObjInventario.Folio @@ -2194,7 +2213,7 @@ Partial Class Inventarios_EntregaAlmacen 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, + CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G1") FolioSalida = ObjInventario.Folio @@ -2248,7 +2267,7 @@ Partial Class Inventarios_EntregaAlmacen 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, + CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G2") FolioSalida = ObjInventario.Folio @@ -2301,7 +2320,7 @@ Partial Class Inventarios_EntregaAlmacen 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, + CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G3") FolioSalida = ObjInventario.Folio @@ -2359,7 +2378,7 @@ Partial Class Inventarios_EntregaAlmacen For Each Dr1 As DataRow In DtTraspasos.Select("CveTipoAlmacen = 9") 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, + CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4") FolioEntrada = ObjInventario.Folio @@ -2403,7 +2422,7 @@ Partial Class Inventarios_EntregaAlmacen End If If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then - CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 14, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="EA/G5") + CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 14, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="EA/G5") FolioGarantia = ObjInventario.Folio For Each RowGarantia As DataRow In DtGarantias.Rows @@ -2455,7 +2474,7 @@ Partial Class Inventarios_EntregaAlmacen 'Dim AlmacenSinCosto As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=26).FiltroPrimeroValor("Almacen", $"CveAlmacen={CveAlmacenSinCosto}").ToString() - Dim CveMovimientoDevolucionSinCosto As Integer = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, + Dim CveMovimientoDevolucionSinCosto As Integer = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4") Dim FolioDevSinCosto As Integer = ObjInventario.Folio @@ -2539,7 +2558,7 @@ Partial Class Inventarios_EntregaAlmacen ConceptoMovimiento = 41 End If - CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, + CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveAlmacenDestino:=tCveAlmacenTraspasoDestino, Modulo:="RE/G7") Folio = ObjInventario.Folio @@ -2640,7 +2659,7 @@ Partial Class Inventarios_EntregaAlmacen 'ENTRADA POR TRASPASO CUANDO ES REMISION If Not ErrorMovInv Then If tCveAlmacenTraspasoDestino > 0 AndAlso Not (TipoMovimiento = 2 And TipoDocto = "Dev" And EsDevolucionVenta = 1) Then ' TRASPASO CUANDO ES REMISION - CveMovimientoEntrada = ObjInventario.AddMovimiento(tCveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, + CveMovimientoEntrada = ObjInventario.AddMovimiento(tCveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G8") FolioEntrada = ObjInventario.Folio Dim ImporteAlmacen As Decimal = 0 @@ -2695,7 +2714,7 @@ Partial Class Inventarios_EntregaAlmacen 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, + CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, CveAlmacenDestino:=Dr("CveAlmacen").ToString().ToEntero(), Modulo:="RE/G9") FolioSalida = ObjInventario.Folio @@ -2742,7 +2761,7 @@ Partial Class Inventarios_EntregaAlmacen 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(), + -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G10") FolioEntrada = ObjInventario.Folio @@ -2880,7 +2899,7 @@ Partial Class Inventarios_EntregaAlmacen End If If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then - CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="RE/G6") FolioVirtual = ObjInventario.Folio @@ -2941,9 +2960,12 @@ Partial Class Inventarios_EntregaAlmacen 'AGREGA BITACORA A VENTA If Not ErrorMovInv Then Dim MensajeBitacora As String = If(TipoMovimiento = 1, "Surtida", "Devuelta") - If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: {1}", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then + Dim LigaVenta As String = String.Format("Venta {2} en Folio: {1}", CveMovimiento, Folio, MensajeBitacora) + + If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir, CveOS:=CveOSSurtir) Then ErrorMovInv = True End If + End If 'Paqueterias guias @@ -3609,7 +3631,9 @@ Partial Class Inventarios_EntregaAlmacen CargaFolios() 'VARIABLES GENERALES - CveVentaSurtir = -1 + CveVentaSurtir = -1 + CveOSSurtir = -1 + DtDatosDetalle = Nothing DtDatosDetalleLote = Nothing DtDatos = Nothing @@ -4122,27 +4146,28 @@ Partial Class Inventarios_EntregaAlmacen DtDatos = TempDT - End Sub - + End Sub + #End Region - - - 'Protected void LnkEditarDir_Click(Object sender, EventArgs e) - '{ - - - ' int CveCliente = GvRow.DataKey("CveCliente").ToEntero(); - ' int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero(); - - ' HdnCveVenta.Value = GvRow.DataKey("CveVenta"); - ' CargaModalCombosDirecciones(CveCliente, CveDireccion); - - ' UpModalEditarentrega.Update(); - ' RegistraScript("$('#DivEditarEntrega').modal('show');"); - '} - - - + + + 'Protected void LnkEditarDir_Click(Object sender, EventArgs e) + '{ + + + ' int CveCliente = GvRow.DataKey("CveCliente").ToEntero(); + ' int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero(); + + ' HdnCveVenta.Value = GvRow.DataKey("CveVenta"); + ' CargaModalCombosDirecciones(CveCliente, CveDireccion); + + + ' UpModalEditarentrega.Update(); + ' RegistraScript("$('#DivEditarEntrega').modal('show');"); + '} + + + Protected Sub LnkEditarDir_Click(sender As Object, e As EventArgs) HdnCveVenta.Value = CveVentaSurtir.ToString diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb index 66c3de3e1..f7ad121bc 100644 --- a/OS/Asignaciones.aspx.vb +++ b/OS/Asignaciones.aspx.vb @@ -394,7 +394,7 @@ Partial Class OS_Asignaciones lrds.Add(rds) lrds.Add(rds2) - ObjOS.Dispose() + Dim ReporteByte As Byte() = StreamPDF(RutaReporte.FullName, lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio)) diff --git a/OS/CatEstatusOrdenServicio.aspx b/OS/CatEstatusOrdenServicio.aspx index c6f3a8e0f..44fed26a7 100644 --- a/OS/CatEstatusOrdenServicio.aspx +++ b/OS/CatEstatusOrdenServicio.aspx @@ -102,7 +102,7 @@ - + @@ -203,6 +203,15 @@
+ + +
+ + +
+ + + @@ -1522,9 +1525,12 @@
+
+ Producto Servicio: - + <%----%> +
@@ -1591,29 +1597,98 @@ +