From d2881e4f496e7025abf6d47c34e239c0802cc8d6 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 8 Jan 2020 08:39:20 -0700 Subject: [PATCH 1/8] aplicando descuentos --- Inventarios/RecepcionUsados.aspx.vb | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 113da0acf..e85f433a3 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -2561,16 +2561,25 @@ Partial Class Inventarios_RecepcionUsados Dim MarcaPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero(String.Format("CveMarca = {0}", drPS("CveMarca").ToString)) If MarcaPorcentaje IsNot Nothing Then Dim PorcentajeProducto As Decimal = MarcaPorcentaje("PorcentajeProducto").ToString.ToDecimal / 100 - Dim MontoDescuento As Decimal = PrecioSugerido * PorcentajeProducto - PrecioSugerido -= MontoDescuento - Dim PorcentajeProducto2 As Decimal = MarcaPorcentaje("PorcentajeProducto2").ToString.ToDecimal / 100 - MontoDescuento = PrecioSugerido * PorcentajeProducto2 - PrecioSugerido -= MontoDescuento - Dim PorcentajeProducto3 As Decimal = MarcaPorcentaje("PorcentajeProducto3").ToString.ToDecimal / 100 - MontoDescuento = PrecioSugerido * PorcentajeProducto3 - PrecioSugerido -= MontoDescuento + + If PorcentajeProducto > 0 Then + + Dim MontoDescuento As Decimal = PrecioSugerido * PorcentajeProducto + PrecioSugerido -= MontoDescuento + + If PorcentajeProducto2 > 0 Then + + MontoDescuento = PrecioSugerido * PorcentajeProducto2 + PrecioSugerido -= MontoDescuento + + If PorcentajeProducto3 > 0 Then + MontoDescuento = PrecioSugerido * PorcentajeProducto3 + PrecioSugerido -= MontoDescuento + End If + End If + End If End If From 21bffb5bac258a987d3dbf1f3bd59a257a8fb63d Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 8 Jan 2020 10:55:50 -0700 Subject: [PATCH 2/8] reparando detalles al agregar ps en saldos iniciales y al abrir el modal en cat clasificaciones --- General/SaldosIniciales.aspx.vb | 9 +++++++-- Ventas/CatClasificaciones.aspx.vb | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 004b752d8..dd79a2a08 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -683,6 +683,7 @@ Partial Class General_SaldosIniciales DTPS = ObjPS.DtResultados End If + Dim NuevaClasificacion As Boolean = False For Each Row As DataRow In dt.Rows Dim Codigo As String = Row("Codigo").ToString @@ -718,8 +719,9 @@ Partial Class General_SaldosIniciales If ObjClas.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1", GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then - If ObjClas.GetClasificaciones() Then Application("GlobalDTClasificaciones") = ObjClas.DtResultados + GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing CveClasificacion = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion}'").ToString.ToEntero + NuevaClasificacion = True End If End If @@ -831,7 +833,7 @@ Partial Class General_SaldosIniciales 'If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then Alert("No se encontró la Serie: " + Clasificacion2, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For If CvePS > 0 Then - If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, + If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño) Then 'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, @@ -878,6 +880,9 @@ Partial Class General_SaldosIniciales UpDatos.Update() Else ObjPS.RollBack() + If NuevaClasificacion Then + GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing + End If End If ObjPS.Dispose() ObjGral.Dispose() diff --git a/Ventas/CatClasificaciones.aspx.vb b/Ventas/CatClasificaciones.aspx.vb index 0f1bd5b3e..1714fc630 100644 --- a/Ventas/CatClasificaciones.aspx.vb +++ b/Ventas/CatClasificaciones.aspx.vb @@ -348,7 +348,9 @@ Partial Class CatClasificaciones TxtClasificacion.Text = "" TxtPrecioBaseCosto.Text = "" - DdlCategoria.SelectedIndex = 0 + If DdlCategoria.Items.Count > 0 Then + DdlCategoria.SelectedIndex = 0 + End If DdlSATPS.SelectedValue = "" DdlSATPS.SelectedText = "" LtlTituloModal.Text = "Agregar Clasificación" From 8deccde93296d2ff889191f06322c98b1569d787 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 8 Jan 2020 12:24:41 -0700 Subject: [PATCH 3/8] agregando validacion de un nuevo proceso --- Ventas/Ventas.aspx.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index df9cc6906..f84070629 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -14252,7 +14252,8 @@ Partial Class Ventas 'AGREGA PS ADICIONAL - If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then + If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza AndAlso Not UsuarioActual.TienePermisoProceso(284) Then + For Each Dr As DataRow In GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows Dim CvePSAdicional As Integer = Dr("CvePSAdicional").ToString.ToEntero Dim DrPoliza As DataRow = TmpDT.NewRow() @@ -14334,6 +14335,8 @@ Partial Class Ventas TmpDT.Rows.Add(DrPoliza) End If Next + + End If Retorno = True From e0a648477387cf243675a5bad20afa245269be4a Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Wed, 8 Jan 2020 12:24:57 -0700 Subject: [PATCH 4/8] -error correcion --- Ventas/ClientesAbonar.aspx.vb | 2 +- Ventas/Ventas.aspx.vb | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index e91c73d26..680aee283 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -459,7 +459,7 @@ Partial Class Ventas_ClientesAbonar TxtImporte.Text = "" TxtObservaciones.Text = "" If SumDescuentoProntoPago > 0.0 Then - GvCxC.Columns("DescuentoProntoPago").Visible = True + GvCxC.Columns(15).Visible = True End If Mov.Dispose() diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 0748e7778..857f74619 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -10259,7 +10259,9 @@ Partial Class Ventas If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" 'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then - IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero + Dim CampoCuenta As String = "IdCuentaGasto" + If UsuarioActual.CveEmpresa.Contiene(80, 72, 146) Then CampoCuenta = "IdCuentaDescuento" + IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor(CampoCuenta, String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero Else IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero End If @@ -13827,10 +13829,12 @@ Partial Class Ventas If DtPromociones.Rows.Count > 0 And DtPromociones IsNot Nothing Then Dim dr As DataRow = DtPromociones.FiltroPrimero($"CvePS = {CvePS}") - TipoPromo = dr("TipoPromocion").ToString.ToEntero - TotalPromocion = dr("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal - PromocionPorcentaje = dr("Promocion").ToString.ToDecimal - CantMinima = dr("CantidadMinima").ToString.ToEntero + If dr IsNot Nothing Then + TipoPromo = dr("TipoPromocion").ToString.ToEntero + TotalPromocion = dr("PUPromocion").ToString.ToDecimal * TxtCantidad.Text.ToDecimal + PromocionPorcentaje = dr("Promocion").ToString.ToDecimal + CantMinima = dr("CantidadMinima").ToString.ToEntero + End If End If If TipoPromo = 1 Then 'Promocion por Importe $ From 6edd3406d107eda65d76c91a0d43a2e410c938c2 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 8 Jan 2020 13:39:34 -0700 Subject: [PATCH 5/8] validacion de contabilizacion --- Bancos/FluctuacionCambiaria.aspx.vb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 64f05ff7c..3146fb542 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -315,6 +315,8 @@ Partial Class Bancos_FluctuacionCambiaria Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() + Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) + ObjContPaq.IniciaTransacSQL() Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/Fluctua", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 @@ -372,8 +374,19 @@ Partial Class Bancos_FluctuacionCambiaria End If Next + Dim SeContabilizo As Boolean = False + + Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" + If AutoConta Then + If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContPaq) Then + SeContabilizo = True + Else + Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError) + End If + End If + + If Not ErrorRegistrar And SeContabilizo Then - If Not ErrorRegistrar Then Conta.Commit() Alert(String.Format("La Fluctuación se ha generado
Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion) CargaDatosCuentas() From ff3194d6205341b4759f8dfce6c34afae69232de Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Wed, 8 Jan 2020 13:42:32 -0700 Subject: [PATCH 6/8] -global --- Bancos/ProveedoresAbonar.aspx.vb | 2 +- Ventas/CatVendedores.aspx.vb | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index c86542405..1ab731944 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -827,7 +827,7 @@ Partial Class Bancos_ProveedoresAbonar 'cheque - If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = TxtFolio.Text.ToEntero + If DdlTipoTransaccion.SelectedValue = "1" AndAlso UsuarioActual.CveEmpresa.Contiene(13, 83) Then FolioFijo = TxtFolio.Text.ToEntero CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProveedoresAbonar", 2, ImporteSeleccionado, ImporteSeleccionado, GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltroPrimeroValor("CveMoneda", "CveCuenta = " & DdlCuenta.SelectedValue).ToEntero, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa)) diff --git a/Ventas/CatVendedores.aspx.vb b/Ventas/CatVendedores.aspx.vb index 0de634028..0b9743043 100644 --- a/Ventas/CatVendedores.aspx.vb +++ b/Ventas/CatVendedores.aspx.vb @@ -137,11 +137,12 @@ Partial Class Ventas_CatVendedores #Region "CARGA GLOBAL" Private Sub CargaGlobal() - Dim ObjVendedores As New ClsVtaVendedores - If ObjVendedores.GetVendedores(-1) Then - GlobalDTVendedores(-1) = ObjVendedores.DtResultados - End If - ObjVendedores.Dispose() + GlobalDTVendedores(UsuarioActual.CveEmpresa) = Nothing + 'Dim ObjVendedores As New ClsVtaVendedores + 'If ObjVendedores.GetVendedores(UsuarioActual.CveEmpresa) Then + ' GlobalDTVendedores(-1) = ObjVendedores.DtResultados + 'End If + 'ObjVendedores.Dispose() End Sub #End Region From 3a103f74f364a047f4b8e49874d55635d48667b1 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 8 Jan 2020 15:47:59 -0700 Subject: [PATCH 7/8] correcion en un texto fijo --- Empresas/146/Formatos/Factura.rdlc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Empresas/146/Formatos/Factura.rdlc b/Empresas/146/Formatos/Factura.rdlc index 5be0b965e..8ba97fc21 100644 --- a/Empresas/146/Formatos/Factura.rdlc +++ b/Empresas/146/Formatos/Factura.rdlc @@ -963,7 +963,7 @@ - Régimen: Sociedad Anónima de Capital Variable; Condiciones de pago: + Régimen: Personas Físicas con Actividades Empresariales y Profesionales; Condiciones de pago: - ; Num. Cta Pago: - - - - =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) + ; - Por éste pagare prometo (emos) pagar incondicionalmente a la orden de Localización Precisa GPS de México SA de CV, a su vencimiento el + Por éste pagare prometo (emos) pagar incondicionalmente a la orden de VICTOR MANUEL RAMIREZ CASTILLO, a su vencimiento el - , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ + , en Tijuana, Baja California o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ - ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a Localización Precisa GPS de México SA de CV o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a + ). Valor recibido a mi (nuestra) entera satisfacción. La falta de pago de éste documento a su vencimiento dará derecho a VICTOR MANUEL RAMIREZ CASTILLO o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Tijuana, Baja California a