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 @@
+
+
+
\ 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 @@
+
+
+
\ 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 @@
+
+
+
\ 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 @@
');
}
if (!(key == "text" || key == "id")) {
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index ee6befccd..8e3a9c230 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -8710,6 +8710,9 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
e.Row.FCLinkButton("LnkDescuentos").Visible = True
+ If e.Row.DBCampo("TipoDocto") = "Cot" AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe Then
+ e.Row.FCLinkButton("imgClone").Visible = False
+ End If
End If
'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then
@@ -31522,6 +31525,10 @@ Partial Class Ventas
LnkDescuentosRNC.Visible = UsuarioActual.TienePermisoProceso(328)
End If
+ If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
+ GvPS.Columns(19).Visible = True
+ End If
+
UpPS.Update()
UPPDescuento.Update()
UPObservaciones.Update()
@@ -33635,12 +33642,85 @@ Partial Class Ventas
ObjVentas.Dispose()
ObjEventos.Dispose()
End Sub
+
+
+#End Region
+
Private Sub BtnRefrescarPagina_Click(sender As Object, e As EventArgs) Handles BtnRefrescarPagina.Click
Response.Redirect($"~/Ventas/Ventas.aspx?CveVenta={Me.CveVenta}")
End Sub
-#End Region
+ Private Sub BtnCargarPSAdicionales_Click(sender As Object, e As EventArgs) Handles BtnCargarPSAdicionales.Click
+ Dim CvePS = HdnCvePSComparar.Value.ToEntero()
+ If CvePS > 0 Then
+ Dim ObjProductosServicios As New ClsProductosServicios()
+ If ObjProductosServicios.GetPSAdicionales(CvePS, UsuarioActual.CveEmpresa) Then
+ GvPSAdicionales.DataSource = ObjProductosServicios.DtResultados.FiltraParametros($"Tipo={HdnTipoPSComparar.Value}")
+ End If
+ ObjProductosServicios.Dispose()
+ If HdnTipoPSComparar.Value = "1" Then
+ LtlNombreModalPS.Text = "Productos y/o servicios complementarios"
+ ElseIf HdnTipoPSComparar.Value = "2" Then
+ LtlNombreModalPS.Text = "Productos y/o servicios similares"
+ End If
+
+ GvPSAdicionales.DataBind()
+ UpSimilares.Update()
+ RegistraScript("$('#DivSimilares').modal({backdrop: 'static', keyboard: false });")
+ End If
+
+ End Sub
+
+ Private Sub BtnAgregarPSSimilar_Click(sender As Object, e As EventArgs) Handles BtnAgregarPSSimilar.Click
+ If HdnTipoPSComparar.Value.ToEntero() > 0 Then
+
+ If GvPSAdicionales.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("chkPSAdicional").Checked) <= 0 Then
+ Alert($"Debe seleccionar al menos 1 producto", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ 'VALIDA
+ For Each Row As GridViewRow In GvPSAdicionales.Rows
+ If Row.RowType = DataControlRowType.DataRow Then
+ If Row.FCCheckBox("chkPSAdicional").Checked Then
+ If Row.FCTextBox("TxtCantidad").Text.ToDecimal() <= 0.00 Then
+ Alert($"La cantidad del producto y/o servicio {Row.DataKey("CodigoPS")} debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+ End If
+ End If
+ Next
+
+ 'AGREGA
+ For Each Row As GridViewRow In GvPSAdicionales.Rows
+ If Row.RowType = DataControlRowType.DataRow Then
+ If Row.FCCheckBox("chkPSAdicional").Checked Then
+ Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero()
+
+ HdnPS.Value = CvePS.ToString()
+ DdlPS.SelectedValue = CvePS.ToString()
+ DdlPS.SelectedText = Row.DataKey("CodigoPS")
+
+ TxtCantidad.Text = Row.FCTextBox("TxtCantidad").Text
+
+ Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
+ If DrPS IsNot Nothing Then
+ DdlUnidadMedida.SelectedValueExistInsert(DrPS("CveUnidadMedida").ToString(), DrPS("UnidadMedida").ToString())
+ DdlPSIndexChange(DdlPS.SelectedValue.ToEntero(), DdlPS)
+
+ AgregarPS()
+ End If
+ End If
+
+ End If
+ Next
+
+ End If
+
+ HdnTipoPSComparar.Value = "-1"
+ HdnCvePSComparar.Value = "-1"
+ End Sub
#Region "U S A D O S"