From 3d9016c2252790d4594eea704f48720fbbf1d9f7 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:07:21 -0700 Subject: [PATCH 01/13] -- MEJORA --- Bancos/RepCortes.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb index f5e4ccba6..fd52292fd 100644 --- a/Bancos/RepCortes.aspx.vb +++ b/Bancos/RepCortes.aspx.vb @@ -172,7 +172,7 @@ Partial Class Bancos_RepCortes DtCortesVentas = Vent.DtResultados divDetalle.Visible = True End If - If DtCortesVentasResumen.Rows.Count > 0 Or DtCortesVentas.Rows.Count > 0 Then + If (DtCortesVentasResumen IsNot Nothing AndAlso DtCortesVentasResumen.Rows.Count > 0) Or (DtCortesVentas IsNot Nothing AndAlso DtCortesVentas.Rows.Count > 0) Then HplDownPDF.Visible = True HplDownEXCEL.Visible = True HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}&CVESUBPROYECTO={2}", CveCorte, "PDF", DdlSubProyectos.SelectedValue.ToEntero))) From a4d7903dc6f85aceef81aab2e2edef02c45227d3 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:07:46 -0700 Subject: [PATCH 02/13] -cambio de conceptos --- Acumuladores/RepRecolecciones.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Acumuladores/RepRecolecciones.aspx.vb b/Acumuladores/RepRecolecciones.aspx.vb index a54114ae5..0fd8d43d1 100644 --- a/Acumuladores/RepRecolecciones.aspx.vb +++ b/Acumuladores/RepRecolecciones.aspx.vb @@ -220,9 +220,9 @@ Partial Class Acumuladores_RepRecolecciones Dim ErrorMovInv As Boolean = False Dim Fecha As DateTime = NowADS() Dim Concepto As String = "Traspaso Recolección" - Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 26, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveEntregaAlmacen:=CveEntregaAlmacen) + Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 45, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveEntregaAlmacen:=CveEntregaAlmacen, Modulo:="clasifUsados") Dim FolioSalida As Integer = ObjInventario.Folio - Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 27, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalida, CveEntregaAlmacen:=CveEntregaAlmacen) + Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(DdlAlmacenDestino.SelectedValue.ToEntero, 42, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoSalida, CveEntregaAlmacen:=CveEntregaAlmacen, Modulo:="clasifUsados") Dim CveUM As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=HdnPSRecoleccion.Value.ToEntero).FiltroPrimeroValor("CveUnidadMedida", "").ToEntero If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, HdnCantidadRecoleccion.Value.ToDecimal, CveUM, HdnPSRecoleccion.Value.ToEntero, 0) Then ErrorMovInv = True From c19142ed323b0c7e2b1e451a6c89516d50b2b8ce Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:07:58 -0700 Subject: [PATCH 03/13] -- pac 4 --- Inventarios/CartaPorteManual.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/CartaPorteManual.aspx.vb b/Inventarios/CartaPorteManual.aspx.vb index 784e26323..71f333a2a 100644 --- a/Inventarios/CartaPorteManual.aspx.vb +++ b/Inventarios/CartaPorteManual.aspx.vb @@ -781,7 +781,7 @@ Partial Class Inventarios_CartaPorteManual Exit Sub End If - If ObjTimbres.Timbrar() Then + If ObjTimbres.Timbrar(4) Then Try PdfFactura(ObjTimbres.ObjFactura) From cd59cdc37f54d8ef76b5ca87c997ff84cc5e11eb Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:14:05 -0700 Subject: [PATCH 04/13] -- mejora en descarga xml para econo --- Ventas/RepProductosServiciosDetalle.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index b4747a7da..60ac4617d 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -788,7 +788,7 @@ Partial Class Ventas_RepProductosServiciosDetalle Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) If File.Exists(Archivo) Then archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf") - If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa = 119 Then + If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa.Contiene(119, 141) Then Archivo = String.Format("{0}XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) If File.Exists(Archivo) Then archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml") From 66181a66c84fc93201417fc0eeebd2d6694fd71f Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:14:16 -0700 Subject: [PATCH 05/13] - --- Ventas/RepProductosServiciosDetalle.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index 60ac4617d..4338b5057 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -788,7 +788,7 @@ Partial Class Ventas_RepProductosServiciosDetalle Archivo = String.Format("{0}PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) If File.Exists(Archivo) Then archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".pdf") - If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa.Contiene(119, 141) Then + If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveEmpresa.Contiene(119, 141, 152, 159, 160, 161, 162, 166) Then Archivo = String.Format("{0}XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta.Replace("\", "/"), Drow("TipoDocumento").ToString, Drow("SerieFolio").ToString) If File.Exists(Archivo) Then archiveZip.CreateEntryFromFile(Archivo, Drow("SerieFolio").ToString & ".xml") From f99941f756fa70b77789b96376fde034ef911b0a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:14:27 -0700 Subject: [PATCH 06/13] - mejora --- Ventas/PVCobranza.aspx | 29 +++++++++++------------------ Ventas/PVCobranza.aspx.vb | 21 ++++++++++++++++++--- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/Ventas/PVCobranza.aspx b/Ventas/PVCobranza.aspx index 820691846..bc89fc143 100644 --- a/Ventas/PVCobranza.aspx +++ b/Ventas/PVCobranza.aspx @@ -292,9 +292,9 @@ + DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA"> - + @@ -310,14 +310,15 @@
- Nombre: - -           +
+
Nombre:
+
         
+ - - - - +
+
+
+
@@ -514,15 +515,7 @@ - - - - - - - - - +     diff --git a/Ventas/PVCobranza.aspx.vb b/Ventas/PVCobranza.aspx.vb index b07564e1a..2da8d426b 100644 --- a/Ventas/PVCobranza.aspx.vb +++ b/Ventas/PVCobranza.aspx.vb @@ -93,7 +93,7 @@ Partial Class Ventas_PVCobranza If ObjPVenta.DtResultados.Rows.Count > 0 Then CveCorte = ObjPVenta.CveCorte Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5) - If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then + If FechaICorte < NowADS().Date Then DebeCerrarCorte = True LblMotivoBloqueo.Text = $"Existe un corte del día {FechaICorte.ToString("dd/MM/yyyy")}. Favor de cerrarlo para iniciar un nuevo corte." Else @@ -244,7 +244,7 @@ Partial Class Ventas_PVCobranza TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero HdnTotal.Value = GvRow.DataKey("Saldo") TxtImporteEfectivo.Focus() - LtlNombre.Text = GvRow.DataKey("DescripcionVenta") + LtlNombre.Text = GvRow.DataKey("AtencionA") LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero Catch ex As Exception TieneError = True @@ -340,6 +340,10 @@ Partial Class Ventas_PVCobranza PagoEfectivo = TxtImporteCheque.Text.ToDecimal End If + If Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then + MsgError = "Error al aplicar el corte" + End If + Else MsgError = "Error al registrar prepólizas" End If @@ -503,7 +507,7 @@ Partial Class Ventas_PVCobranza Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click Dim ObjPVenta As New ClsPuntoVenta - ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa) + ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, "", UsuarioActual.CveEmpresa) CveCorte = ObjPVenta.CveCorte LblTurno.Text = NowADS().ToShortDateString UpTurno.Visible = True @@ -561,4 +565,15 @@ Partial Class Ventas_PVCobranza End If End Sub + + Protected Sub LnkLiberar_Click(sender As Object, e As EventArgs) + Dim ObjVentas As New ClsVentas + + If ObjVentas.UpdateAsignaVentaCobranza(HdnCveVenta.Value.ToEntero, -1, -1, -1, "", Now) Then + PnlContado.Visible = False + HdnCveVenta.Value = "" + CargaDatos() + End If + ObjVentas.Dispose() + End Sub End Class From f2ef32a7b6480c30dcc88a7de3059ca0c4764072 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:14:53 -0700 Subject: [PATCH 07/13] - permite descuento al 100% --- Ventas/Ventas.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 65aa3a9ca..527c0b11f 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -9840,7 +9840,7 @@ console.log("evento descuento"); if ($get("TxtPorPS").value != "") { let PorcentajeDescuento = parseFloat($get("TxtPorPS").value); - if (PorcentajeDescuento < 0 || PorcentajeDescuento > 99) { + if (PorcentajeDescuento < 0 || PorcentajeDescuento > 100) { alert("No se puede aplicar ese porcentaje de descuento"); $get("TxtPorPS").value = "0"; recalcularUtilidad(0); From a9b4672bc6c8d099447d3f09a8e2f8776598ca37 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:15:30 -0700 Subject: [PATCH 08/13] - descuento al 100 y bloqueo de pantalla --- Ventas/Ventas.aspx.vb | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index d0c65fca6..5fad3f3ff 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2671,6 +2671,7 @@ Partial Class Ventas If UsuarioActual.Empresa.Funcionalidad(714).ToEntero() > 0 Then ViewState("CveCliente") = UsuarioActual.Empresa.Funcionalidad(714).ToEntero() HdnCveCliente.Value = UsuarioActual.Empresa.Funcionalidad(714) + RBLPago.SelectedValue = "2" CargaCliente(CveCliente) End If End If @@ -3532,11 +3533,11 @@ Partial Class Ventas Private Sub ValidaUsuarioAcceso() 'VERIFICAR SI LA SESION SE ENCUENTRA BLOQUEADA If UsuarioActual.Empresa.Funcionalidad(599) = "1" Then - Dim DrUsuario As DataRow = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0) + Dim DrUsuario As DataRow = GlobalDTUsuarios(CveUsuario:=UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("") - If DrUsuario("CodigoAcceso").ToString() <> "" Then + If DrUsuario IsNot Nothing AndAlso DrUsuario("CodigoAcceso").ToString() <> "" Then If UsuarioActual.SesionBloqueada Then - DivBloqueoacceso.Visible = False + DivBloqueoAcceso.Visible = False Dim strScript As New StringBuilder strScript.Append("window.onload = function MuestraBloqueo() { document.getElementById(""C_BtnShowBloqueoAcceso"").click(); setTimeout(function(){ $('#C_TxtCodigoAcceso').focus(); ") If UsuarioActual.ErrorDesbloqueo Then @@ -3553,10 +3554,10 @@ Partial Class Ventas BtnEmitirImprimir.Visible = False Exit Sub Else - DivBloqueoacceso.Visible = True + DivBloqueoAcceso.Visible = True End If Else - DivBloqueoacceso.Visible = False + DivBloqueoAcceso.Visible = False End If Else DivBloqueoacceso.Visible = False @@ -12903,6 +12904,13 @@ Partial Class Ventas 'si el codigo objeto impuesto es 02 y no tiene desglose de impuestos por el descuento, debe asignar el valor 04 - Si objeto de impuesto y no causa impuesto If concepto.Impuestos.Count = 0 AndAlso concepto.ObjetoImpuesto = "02" AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(2) = 0.00D Then concepto.ObjetoImpuesto = "04" + 'se ajusta a un centavo, para que se pueda emitir con un centavo. + If UsuarioActual.CveEmpresa = 140 Then + concepto.ObjetoImpuesto = "02" + concepto.Descuento = concepto.Descuento - 0.01D + Obj.SubTotal = Obj.SubTotal + 0.01D + Obj.Total = Obj.Total + 0.01D + End If End If Timbre.Conceptos.Add(concepto) @@ -37164,7 +37172,7 @@ Partial Class Ventas If HdnDescPS.Value.ToEntero() > 0 Then Dim RowUpdate As DataRow = TmpDT.Select($"Consec = {HdnConsecPS.Value}").FirstOrDefault() If RowUpdate IsNot Nothing Then - If HdnDescPS.Value.ToDecimal().RoundSQL(2) < RowUpdate("Total").ToString().ToDecimal() Then + If HdnDescPS.Value.ToDecimal().RoundSQL(2) <= RowUpdate("Total").ToString().ToDecimal() Then RowUpdate("Descuento") = HdnDescPS.Value.ToDecimal().RoundSQL(2) Dim TotalCalculableImpuestos = (RowUpdate("Cantidad").ToString().ToDecimal * RowUpdate("PU").ToString().ToDecimal) - RowUpdate("Descuento").ToString().ToDecimal() @@ -37177,7 +37185,7 @@ Partial Class Ventas CalculaTotalesVenta() RegistraScript("$('#ModalDescPS').modal('hide');") Else - Alert("El descuento no puede ser mayor o igual al total.", TipoMensaje.MsgAdvertencia) + Alert("El descuento no puede ser mayor al total.", TipoMensaje.MsgAdvertencia) End If End If From 27a12e381951a399d356cd0865c90d2e1e3cbdf5 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:17:04 -0700 Subject: [PATCH 09/13] - mejora texto --- Ventas/ActualizarPrecios.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ventas/ActualizarPrecios.aspx.vb b/Ventas/ActualizarPrecios.aspx.vb index 0222be5d3..de07ebba7 100644 --- a/Ventas/ActualizarPrecios.aspx.vb +++ b/Ventas/ActualizarPrecios.aspx.vb @@ -425,7 +425,7 @@ Partial Class Ventas_ActualizarPrecios .Precio = row.FCTextBox("TxtPrecio").Text.ToDecimal() }).QueryToDataTable(True) If DtExcel.Rows.Count < 1 Then - Alert("No hay resutados en la busqueda.", TipoMensaje.MsgAdvertencia) + Alert("No hay resultados en la busqueda.", TipoMensaje.MsgAdvertencia) Exit Sub End If From f82d12f9a5ed0e90a1503e6ee8a7b0f5c7ec315f Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 28 Feb 2024 20:17:26 -0700 Subject: [PATCH 10/13] - mejora en mensaje --- Contabilidad2/CatCuentas.aspx.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index 531d8780a..7d7b7887c 100644 --- a/Contabilidad2/CatCuentas.aspx.vb +++ b/Contabilidad2/CatCuentas.aspx.vb @@ -497,6 +497,7 @@ Partial Class Contabilidad2_CatCuentas Exit Sub End If Else + Alert("El traspaso de movimientos en la cuenta tuvo un error.", TipoMensaje.MsgError) TieneError = True ObjConta.RollBack() ObjConta.Dispose() From efeb1740744d76d9ed92ef767b8a871425f7e321 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 29 Feb 2024 08:32:51 -0700 Subject: [PATCH 11/13] Correcion OS material utilizado --- OS/OrdenesServicios.aspx.vb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index ac79814f3..36cd8ca2f 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -3037,18 +3037,20 @@ Partial Class OS_OrdenesServicios Select Case DdlTipoVenta.SelectedValue.ToEntero - Case 1, 2 + Case 1, 2 ' *1 *pago directo Opcion = 1 Exit Select Case 3 ' por el momento ya no se usa Opcion = 2 Exit Select - Case 5 - Opcion = 3 - Exit Select - Case 6 + Case 5 ' consignacion uso + 'Opcion = 3 Opcion = 4 Exit Select + Case 6 ' a vista uso de material + 'Opcion = 4 + Opcion = 3 + Exit Select Case Else Opcion = 1 Exit Select From cec5f48473218d3483f82bf8ab70475ef3b87663 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 29 Feb 2024 08:39:22 -0700 Subject: [PATCH 12/13] OS correcion materia surtido v2 --- OS/OrdenesServicios.aspx.vb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/OS/OrdenesServicios.aspx.vb b/OS/OrdenesServicios.aspx.vb index 36cd8ca2f..453c99c5d 100644 --- a/OS/OrdenesServicios.aspx.vb +++ b/OS/OrdenesServicios.aspx.vb @@ -3037,19 +3037,17 @@ Partial Class OS_OrdenesServicios Select Case DdlTipoVenta.SelectedValue.ToEntero - Case 1, 2 ' *1 *pago directo + Case 1, 2 ' *Fuera de liena *pago directo Opcion = 1 Exit Select Case 3 ' por el momento ya no se usa Opcion = 2 Exit Select Case 5 ' consignacion uso - 'Opcion = 3 - Opcion = 4 + Opcion = 3 Exit Select Case 6 ' a vista uso de material - 'Opcion = 4 - Opcion = 3 + Opcion = 4 Exit Select Case Else Opcion = 1 From ce0b57a1ab64bf6ad91de048570696fa10a7fbbf Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 29 Feb 2024 10:05:18 -0700 Subject: [PATCH 13/13] error en codigos duplicados --- Nomina/Nomina.aspx.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 85ebb9a3a..9285ca71e 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -2519,7 +2519,14 @@ public partial class Nomina_Nomina2 : ClsPaginas if (dconr != null) { CveConcepto = dconr["CveConcepto"].ToString(); - dtxz.Columns[i].ColumnName = CveConcepto; + if (dtxz.Columns.Contains(CveConcepto)) + { + stringError = string.Format("Ocurrio un Error al procesar el excel código duplicado '{0}'({1}).", conceptocodigo, i); + } + else + { + dtxz.Columns[i].ColumnName = CveConcepto; + } } else {