diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb
index 77ee44b44..d825969e1 100644
--- a/App_Code/ClsProductosServicios.vb
+++ b/App_Code/ClsProductosServicios.vb
@@ -411,7 +411,8 @@ Public Class ClsProductosServicios
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, 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) As Integer
+ 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 = "") As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_ProductosServiciosAdd")
@@ -509,6 +510,8 @@ Public Class ClsProductosServicios
'Nuevo MLopez 18/11/2022
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
+ .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
+ .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
End With
@@ -643,7 +646,8 @@ Public Class ClsProductosServicios
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1,
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) As Boolean
+ 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 = "") As Boolean
Dim Retorno As Boolean = False
@@ -740,6 +744,8 @@ Public Class ClsProductosServicios
'Nuevo MLopez 18/11/2022
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
+ .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
+ .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
End With
diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx
index c470944d7..8622c226a 100644
--- a/Ventas/ProductosServicios.aspx
+++ b/Ventas/ProductosServicios.aspx
@@ -530,6 +530,41 @@
+
+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb
index ad3d30557..1770b056a 100644
--- a/Ventas/ProductosServicios.aspx.vb
+++ b/Ventas/ProductosServicios.aspx.vb
@@ -430,6 +430,9 @@ Partial Class ProductosyServicios
DivCitricos.Visible = True
CargaPanelCitricos()
End If
+ If UsuarioActual.CveEmpresa = 2 Then
+ DiveCommerce.Visible = True
+ End If
End Sub
@@ -1469,7 +1472,8 @@ Partial Class ProductosyServicios
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad,
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) > 0 Then
+ 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) > 0 Then
ViewState("CvePS") = ObjProductosServicios.CvePS
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
If GVR.FCCheckBox("ChkDeduccion").Checked Then
@@ -1540,7 +1544,8 @@ Partial Class ProductosyServicios
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, 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) Then
+ RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
+ NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim) Then
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
TieneError = True
@@ -1704,7 +1709,7 @@ Partial Class ProductosyServicios
#Region "GV ALIAS"
Protected Sub GVAlias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVAlias.RowDeleting
Dim ObjAliasDelete As New ClsProductosServicios
- Dim TieneError = False
+ Dim TieneError As Boolean = False
If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString, UsuarioActual.CveUsuario) Then
GVAlias.EditIndex = -1
@@ -1783,11 +1788,11 @@ Partial Class ProductosyServicios
CargaGvEquivalencias()
End Sub
Private Sub GvEquivalencia_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvEquivalencia.RowUpdating
- Dim TieneError = False
+ Dim TieneError As Boolean = False
- Dim CveUM = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
- Dim UnidadBase = GvEquivalencia.Rows(e.RowIndex).DataKey("UnidadBase").ToString = "True"
- Dim Cantidad = DirectCast(GvEquivalencia.Rows(e.RowIndex).FindControl("TxtCantidadEquivalencia"), TextBox).Text.Trim.ToDecimal
+ Dim CveUM As Integer = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
+ Dim UnidadBase As Boolean = GvEquivalencia.Rows(e.RowIndex).DataKey("UnidadBase").ToString = "True"
+ Dim Cantidad As Decimal = DirectCast(GvEquivalencia.Rows(e.RowIndex).FindControl("TxtCantidadEquivalencia"), TextBox).Text.Trim.ToDecimal
Dim ObjProductosServicios As New ClsProductosServicios()
If Not ObjProductosServicios.UpdatePSEquivalencias(CvePS, CveUM, Cantidad, UnidadBase, 0, UsuarioActual.CveUsuario) Then
@@ -1807,9 +1812,9 @@ Partial Class ProductosyServicios
End Sub
Private Sub GvEquivalencia_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvEquivalencia.RowDeleting
- Dim TieneError = False
+ Dim TieneError As Boolean = False
- Dim CveUM = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
+ Dim CveUM As Integer = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
Dim ObjProductosServicios As New ClsProductosServicios()
If Not ObjProductosServicios.RemovePSEquivalencias(CvePS, CveUM) Then
@@ -2349,7 +2354,7 @@ Partial Class ProductosyServicios
Public Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
If DdlClasificacion.SelectedValue.ToEntero > 0 Then
If Me.CvePS <= 0 AndAlso (Not CveSATPS > 0 Or CveSATPS = 46920) Then
- Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
+ Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
If Dr IsNot Nothing Then
DdlSATPS.SelectedValue = Dr("CveSATPS").ToString
@@ -2367,7 +2372,7 @@ Partial Class ProductosyServicios
If DdlClasificacion.SelectedValue.ToEntero > 0 Then
Try
- Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
+ Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
If Boolean.Parse(Dr("EsAcumulador").ToString) Then
MostarOcultarDivTamanio(True)
Else
@@ -2381,10 +2386,6 @@ Partial Class ProductosyServicios
OnError("Ocurrió un error al mostrar los tamaños", ex)
End Try
End If
-
-
-
-
End Sub
Private Sub MostarOcultarDivTamanio(Mostrar As Boolean)
@@ -2479,7 +2480,7 @@ Partial Class ProductosyServicios
UpEcommercePSRelacionados.Update()
End Sub
Private Function GuardaEcommerce() As Boolean
- Dim TieneError = False
+ Dim TieneError As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(700) = "1" Then
@@ -2494,10 +2495,10 @@ Partial Class ProductosyServicios
End If
End If
- Dim Descripcion = TxtEcommerceDescripcion.Text.Trim
- Dim PrecioBase = TxtEcommercePrecioBase.Text.Trim.ToDouble
- Dim PrecioPromocion = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
- Dim Disponible = ChkEcommerceDisponible.Checked
+ Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
+ Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
+ Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
+ Dim Disponible As Boolean = ChkEcommerceDisponible.Checked
Dim ObjEcommerce As New ClsECommerce
If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
@@ -2510,11 +2511,11 @@ Partial Class ProductosyServicios
Return TieneError
End Function
Private Function ValidaGuardarEcommerce() As Boolean
- Dim Retorno = True
+ Dim Retorno As Boolean = True
Dim Mensaje As New StringBuilder
'DESCRIPCION
- Dim Descripcion = TxtEcommerceDescripcion.Text.Trim
+ Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
If Descripcion.Length = 0 Then
Mensaje.Append("- El campo Descripción es obligatorio. Por favor introduzcalo y vuelva a intentar.
")
End If
@@ -2523,7 +2524,7 @@ Partial Class ProductosyServicios
End If
'PRECIO BASE
- Dim PrecioBase = TxtEcommercePrecioBase.Text.Trim.ToDouble
+ Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
If PrecioBase = 0 Then
Mensaje.Append("- El campo Precio es obligatorio. Por favor verifique y vuelva a intentar.
")
End If
@@ -2532,7 +2533,7 @@ Partial Class ProductosyServicios
End If
'PRECIO FINAL
- Dim PrecioPromocion = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
+ Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
If PrecioPromocion < 0 Then
Mensaje.Append("- El campo Precio Final no puede ser negativo. Por favor verifique y vuelva a intentar.
")
End If
@@ -2567,8 +2568,8 @@ Partial Class ProductosyServicios
Exit Sub
End If
- Dim TieneError = False
- Dim CveInsignia = DdlEcommerceInsignia.SelectedValue.ToEntero
+ Dim TieneError As Boolean = False
+ Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
'AGREGAR
Dim ObjEcommerce As New ClsECommerce
@@ -2585,11 +2586,11 @@ Partial Class ProductosyServicios
End If
End Sub
Private Function ValidaAgregarProductosInsigniasEcommerce() As Boolean
- Dim Retorno = True
+ Dim Retorno As Boolean = True
Dim Mensaje As New StringBuilder
'INSIGNIA
- Dim CveInsignia = DdlEcommerceInsignia.SelectedValue.ToEntero
+ Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
If CveInsignia = 0 Then
Mensaje.Append("- El campo Insignia es obligatorio. Por favor introduzcalo y vuelva a intentar.
")
End If
@@ -2609,8 +2610,8 @@ Partial Class ProductosyServicios
Return Retorno
End Function
Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting
- Dim TieneError = False
- Dim GvRow = GvEcommercePSInsignias.Rows(e.RowIndex)
+ Dim TieneError As Boolean = False
+ Dim GvRow As GridViewRow = GvEcommercePSInsignias.Rows(e.RowIndex)
Dim ObjEcommerce As New ClsECommerce
If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
@@ -2645,11 +2646,11 @@ Partial Class ProductosyServicios
Protected Sub BtnEcommerceImagenes_Click(sender As Object, e As EventArgs)
Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos
- Dim FileMove = ""
- Dim Archivo = ""
- Dim DirectorioTemporal = ""
+ Dim FileMove As String = ""
+ Dim Archivo As String = ""
+ Dim DirectorioTemporal As String = ""
- Dim DirectorioDestino = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\"
+ Dim DirectorioDestino As String = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\"
If Not Directory.Exists(DirectorioDestino) Then
Directory.CreateDirectory(DirectorioDestino)
End If
@@ -2712,8 +2713,8 @@ Partial Class ProductosyServicios
Exit Sub
End If
- Dim TieneError = False
- Dim CvePS = DdlEcommercePSRelacionado.SelectedValue.ToEntero
+ Dim TieneError As Boolean = False
+ Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
'AGREGAR
Dim ObjEcommerce As New ClsECommerce
@@ -2731,11 +2732,11 @@ Partial Class ProductosyServicios
End If
End Sub
Private Function ValidaAgregarProductosRelacionadosEcommerce() As Boolean
- Dim Retorno = True
+ Dim Retorno As Boolean = True
Dim Mensaje As New StringBuilder
'PS
- Dim CvePS = DdlEcommercePSRelacionado.SelectedValue.ToEntero
+ Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
If CvePS = 0 Then
Mensaje.Append("- El campo Producto es obligatorio. Por favor introduzcalo y vuelva a intentar.
")
End If
@@ -2755,8 +2756,8 @@ Partial Class ProductosyServicios
Return Retorno
End Function
Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting
- Dim TieneError = False
- Dim GvRow = GvEcommercePSRealacionados.Rows(e.RowIndex)
+ Dim TieneError As Boolean = False
+ Dim GvRow As GridViewRow = GvEcommercePSRealacionados.Rows(e.RowIndex)
Dim ObjEcommerce As New ClsECommerce
If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then