From 52a976d9badf679990bd6fbc312cb83e23d2d3b6 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 5 Jun 2024 14:05:46 -0700 Subject: [PATCH] --Agregar productos similares o complementarios en ventas --- Compras/PopUpVerFactura.aspx.vb | 12 +++- Content/CustomIcons/existencia.svg | 1 + Content/CustomIcons/existencia_verde.svg | 16 +++++ Content/CustomIcons/similar.svg | 1 + Content/CustomIcons/similar_verde.svg | 16 +++++ Content/CustomIcons/sustituir.svg | 1 + Content/CustomIcons/sustituir_azul.svg | 16 +++++ Ventas/CatPS.aspx.vb | 2 +- Ventas/Ventas.aspx | 91 ++++++++++++++++++++++-- Ventas/Ventas.aspx.vb | 82 ++++++++++++++++++++- 10 files changed, 229 insertions(+), 9 deletions(-) create mode 100644 Content/CustomIcons/existencia.svg create mode 100644 Content/CustomIcons/existencia_verde.svg create mode 100644 Content/CustomIcons/similar.svg create mode 100644 Content/CustomIcons/similar_verde.svg create mode 100644 Content/CustomIcons/sustituir.svg create mode 100644 Content/CustomIcons/sustituir_azul.svg diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 76933f943..62058d6e8 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -346,7 +346,7 @@ Partial Class PopUpVerFactura Dim totalPallets As String = "" Dim totalBachas As String = "" Dim dfec As DateTime = fecha.ToDateTime() - Dim fechas As String = String.Format(New System.Globalization.CultureInfo("es-MX"), "{0dd} DE {0:MMMM} DEL {0:yyyy}", dfec).ToUpper() + Dim fechas As String = String.Format(New System.Globalization.CultureInfo("es-MX"), "{0:dd} DE {0:MMMM} DEL {0:yyyy}", dfec).ToUpper() Dim totalcajas As String = "" Dim TotalBins As String = "" @@ -1589,6 +1589,16 @@ Partial Class PopUpVerFactura ' End If 'End If + If DtCortesVentas.Rows.Count > 0 Then + Dim RowInfo As DataRow = DtCortesVentas.FiltroPrimero("CveVenta > 0") + + If RowInfo IsNot Nothing Then + Fecha = RowInfo("FechaInicial").ToString + Nombre = RowInfo("Nombre").ToString + End If + + End If + If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197 Then If ObjVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, CveSubProyecto, CveCorte:=CveCorte) Then DtReporteCorte = ObjVenta.DtResultados.FiltraParametros("CveCorte > 0") diff --git a/Content/CustomIcons/existencia.svg b/Content/CustomIcons/existencia.svg new file mode 100644 index 000000000..77da1fa1c --- /dev/null +++ b/Content/CustomIcons/existencia.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Content/CustomIcons/existencia_verde.svg b/Content/CustomIcons/existencia_verde.svg new file mode 100644 index 000000000..1619ab133 --- /dev/null +++ b/Content/CustomIcons/existencia_verde.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + \ No newline at end of file diff --git a/Content/CustomIcons/similar.svg b/Content/CustomIcons/similar.svg new file mode 100644 index 000000000..9887ee828 --- /dev/null +++ b/Content/CustomIcons/similar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Content/CustomIcons/similar_verde.svg b/Content/CustomIcons/similar_verde.svg new file mode 100644 index 000000000..17b5b55d7 --- /dev/null +++ b/Content/CustomIcons/similar_verde.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + \ No newline at end of file diff --git a/Content/CustomIcons/sustituir.svg b/Content/CustomIcons/sustituir.svg new file mode 100644 index 000000000..65e193fb5 --- /dev/null +++ b/Content/CustomIcons/sustituir.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Content/CustomIcons/sustituir_azul.svg b/Content/CustomIcons/sustituir_azul.svg new file mode 100644 index 000000000..77a3dd24e --- /dev/null +++ b/Content/CustomIcons/sustituir_azul.svg @@ -0,0 +1,16 @@ + + + +Created with Fabric.js 5.2.4 + + + + + + + + + + + + \ No newline at end of file diff --git a/Ventas/CatPS.aspx.vb b/Ventas/CatPS.aspx.vb index 4b8a2f3dd..f371962e3 100644 --- a/Ventas/CatPS.aspx.vb +++ b/Ventas/CatPS.aspx.vb @@ -333,7 +333,7 @@ Partial Class CatPS End If If Opcion = 1 Then - If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, Cantidad) Then + If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, Cantidad, 1) Then Return String.Format("No se registró el producto adicional:{0} no existe en la franquicia: '{1}'", CodigoPS, GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")) End If End If diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 00999f431..b348094a2 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -758,12 +758,12 @@ Fecha:
- + - + - + @@ -1160,7 +1160,9 @@ - + + +