+
diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb
index b9abdc86f..cf37794d5 100644
--- a/Ventas/ProductosServicios.aspx.vb
+++ b/Ventas/ProductosServicios.aspx.vb
@@ -184,15 +184,14 @@ Partial Class ProductosyServicios
InicializaValores()
If Request("CvePS") IsNot Nothing AndAlso IsNumeric(Request("CvePS")) AndAlso Request("CvePS").ToEntero > 0 Then
ViewState("CvePS") = Request("CvePS")
- CargarMarcas()
-
- CargaDatos()
- 'Configuración de Modalidad Update
- BtnGuardar.Text = "Guardar Cambios"
-
- CargarAlias()
- CargaExistencias()
+ If CargaDatos() Then
+ CargarMarcas()
+ 'Configuración de Modalidad Update
+ BtnGuardar.Text = "Guardar Cambios"
+ CargarAlias()
+ CargaExistencias()
+ End If
Else
'Configuración de Modalidad Insert
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
@@ -850,11 +849,12 @@ Partial Class ProductosyServicios
'DdlCtaContableInventarios.DataBind()
'ObjContabilidad.Dispose()
End Sub
- Private Sub CargaDatos()
+ Private Function CargaDatos() As Boolean
+ Dim Retorno As Boolean = False
Dim ObjProductosServicios As New ClsProductosServicios()
If ObjProductosServicios.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then
If ObjProductosServicios.DtResultados.Rows.Count > 0 Then
-
+ Retorno = True
'SI NO TIENE VALOR Y NO TIENE EL PROCESO MUESTRA SIN CLASIFICACION
If ObjProductosServicios.CveClasificacion.ToString.Equals("-1") And Not UsuarioActual.TienePermisoProceso(147) And UsuarioActual.Empresa.Funcionalidad(121) = "1" Then
DdlClasificacion.SelectedValueExist("0")
@@ -1106,7 +1106,8 @@ Partial Class ProductosyServicios
End If
ObjProductosServicios.Dispose()
gvPaqueteDetalle.DataBind()
- End Sub
+ Return Retorno
+ End Function
Protected Sub CargarAlias()
Dim ObjAlias As New ClsProductosServicios
ObjAlias.GetPSAlias(CvePS, UsuarioActual.CveEmpresa)
diff --git a/Ventas/RepEntregasEcommerce.aspx b/Ventas/RepEntregasEcommerce.aspx
index b8a4c8fc7..2d593214d 100644
--- a/Ventas/RepEntregasEcommerce.aspx
+++ b/Ventas/RepEntregasEcommerce.aspx
@@ -88,20 +88,62 @@
-
-
+ <%-- --%>
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%-- --%>
+
+
+
+
+
+
diff --git a/Ventas/RepEntregasEcommerce.aspx.vb b/Ventas/RepEntregasEcommerce.aspx.vb
index 9c38e88de..c8fd441cc 100644
--- a/Ventas/RepEntregasEcommerce.aspx.vb
+++ b/Ventas/RepEntregasEcommerce.aspx.vb
@@ -1,6 +1,5 @@
Imports System.Data
Imports Extensiones
-Imports iText.Barcodes.Dmcode
Imports Microsoft.Reporting.WebForms
Partial Class Ventas_RepEntregasEcommerce
@@ -10,12 +9,11 @@ Partial Class Ventas_RepEntregasEcommerce
If Not Page.IsPostBack Then
CargaCombos()
CargaDatos()
-
End If
End Sub
Private Sub CargaCombos()
- txtFechaI.Text = NowADS.AddDays(-3).ToShortDateString
+ txtFechaI.Text = NowADS.AddDays(-5).ToShortDateString
txtFechaF.Text = NowADS.ToShortDateString
End Sub
@@ -25,11 +23,20 @@ Partial Class Ventas_RepEntregasEcommerce
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text.Trim.ToDate Else FechaI = MinFecha
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text.Trim.ToDate Else FechaF = MaxFecha
Dim Obj As New ClsVentas
- If Obj.GetEntregasEcommerce(FechaI, FechaF, 1, UsuarioActual.CveEmpresa) Then
- GvD.DataSource = Obj.DtResultados
+ If Obj.GetEntregasEcommerce(FechaI, FechaF, RBL.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
+ If RBL.SelectedValue = "1" Then
+ GvD.DataSource = Obj.DtResultados
+ GvD.Visible = True : GvR.Visible = False
+ Else
+ GvR.DataSource = Obj.DtResultados
+ GvR.Visible = True : GvD.Visible = False
+ End If
+
End If
Obj.Dispose()
GvD.DataBind()
+ GvR.DataBind()
+
UPDatos.Update()
End Sub
@@ -127,13 +134,38 @@ Partial Class Ventas_RepEntregasEcommerce
Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.DBCampo("CvePS") = "" Then e.Row.CssClass = "SubTotales"
+ If e.Row.DBCampo("CvePS") = "" Then
+ e.Row.CssClass = "SubTotales"
+ If e.Row.DBCampo("HMO").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnHMO").Visible = True
+ If e.Row.DBCampo("CUL").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnCUL").Visible = True
+ If e.Row.DBCampo("Mex").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnMex").Visible = True
+ If e.Row.DBCampo("LP").ToDecimal >= e.Row.DBCampo("Cantidad").ToDecimal Then e.Row.FCButton("BtnLP").Visible = True
+ e.Row.FCLabel("LblHmo").Visible = False
+ e.Row.FCLabel("LblCUL").Visible = False
+ e.Row.FCLabel("LblMex").Visible = False
+ e.Row.FCLabel("LblLP").Visible = False
+ Else
+ If e.Row.DBCampo("CveAlmacenTraspasoOrigen") <> "" Then
+ Dim tCve As Integer = e.Row.DBCampo("CveAlmacenTraspasoOrigen").ToEntero
+ Dim tCol As Integer = If(tCve = 153, 4, If(tCve = 271, 5, If(tCve = 275, 6, 7)))
+ e.Row.Cells(tCol).BackColor = Drawing.Color.LightGreen
+
+ End If
+ End If
End If
End Sub
#End Region
-
-
+ Private Sub GvD_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvD.RowCommand
+ If e.CommandName <> "" Then
+ Dim ObjSurtir As New ClsInventarios
+ If ObjSurtir.UpdateAlmacenTraspasoOrigen(e.CommandName.ToEntero, e.CommandArgument.ToString.ToEntero, UsuarioActual.CveEmpresa) Then
+ Alert("Se asignó el almacen por surtir.")
+ End If
+ ObjSurtir.Dispose()
+ CargaDatos()
+ End If
+ End Sub
End Class