@@ -501,11 +516,11 @@
diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb
index bd4b1384c..ae6200ef3 100644
--- a/Inventarios/TrasladoSolicitud.aspx.vb
+++ b/Inventarios/TrasladoSolicitud.aspx.vb
@@ -50,6 +50,48 @@ Partial Class Inventarios_TrasladoSolicitud
End Set
End Property
+ Private Property AplicaSerie As Boolean
+ Get
+ If ViewState("AplicaSerie") Is Nothing Then
+ Return False
+ Else
+ Return CType(ViewState("AplicaSerie"), Boolean)
+ End If
+
+ End Get
+ Set(value As Boolean)
+ ViewState("AplicaSerie") = value
+ End Set
+ End Property
+
+ Private Property AplicaLote As Boolean
+ Get
+ If ViewState("AplicaLote") Is Nothing Then
+ Return False
+ Else
+ Return CType(ViewState("AplicaLote"), Boolean)
+ End If
+
+ End Get
+ Set(value As Boolean)
+ ViewState("AplicaLote") = value
+ End Set
+ End Property
+
+ Private Property AplicaCaducidad As Boolean
+ Get
+ If ViewState("AplicaCaducidad") Is Nothing Then
+ Return False
+ Else
+ Return CType(ViewState("AplicaCaducidad"), Boolean)
+ End If
+
+ End Get
+ Set(value As Boolean)
+ ViewState("AplicaCaducidad") = value
+ End Set
+ End Property
+
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -152,10 +194,27 @@ Partial Class Inventarios_TrasladoSolicitud
Dim ObjClientes As New ClsClientes
If ObjInventarios.AddTrasladoSolicitudGet(CveTraspasoSolicitud, UsuarioActual.CveEmpresa) Then
- If ObjInventarios.DtResultados.Rows.Count > 0 Then
+ If ObjInventarios.DtResultados.Rows.Count > 0 Then
+ For Each rowtp As DataRow In ObjInventarios.DtResultados.Rows
+ If Not AplicaSerie Then
+ AplicaSerie = rowtp("Serie").ToString <> ""
+ End If
+ If Not AplicaLote Then
+ AplicaLote = rowtp("Lote").ToString <> ""
+ End If
+ If Not AplicaCaducidad Then
+ AplicaCaducidad = rowtp("FechaCaducidad").ToString <> ""
+ End If
+ Next
+
+ Dim drPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProductoServicio.SelectedValue.ToEntero).FiltroPrimero("")
+
+
+ GvDatos.Columns(4).Visible = False
+ GvDatos.Columns(5).Visible = AplicaSerie
+ GvDatos.Columns(6).Visible = AplicaLote
+ GvDatos.Columns(7).Visible = AplicaCaducidad
- GvDatos.Columns(4).Visible = False
- GvDatos.Columns(5).Visible = True
DivFolio.Visible = True
LbFolio.Text = ObjInventarios.DtResultados.Rows(0)("FolioTraspaso").ToString
TxtObservaciones.Text = ObjInventarios.DtResultados.Rows(0)("ObservacionesTraspaso").ToString
@@ -369,14 +428,14 @@ Partial Class Inventarios_TrasladoSolicitud
Row("CveUM") = DdlUM.SelectedValue.ToEntero
Row("UnidadMedida") = DdlUM.SelectedItem.Text
Row("Observaciones") = ""
+ Row("Lote") = "-1"
+ Row("Serie") = "-1"
+ Row("FechaCaducidad") = MinFecha
If divLote.Visible Then
Row("Lote") = TxtLote.Text
GvDatos.Columns(6).Visible = True
Lote = TxtLote.Text.ToString
- Else
- Row("Lote") = "-1"
- Lote = "-1"
End If
@@ -384,8 +443,9 @@ Partial Class Inventarios_TrasladoSolicitud
Row("FechaCaducidad") = TxtCaducidad.Text
GvDatos.Columns(7).Visible = True
FechaCaducidad = TxtCaducidad.Text.ToDate
+ RFVFechaCad.Enabled = True
+
Else
- Row("FechaCaducidad") = MinFecha
FechaCaducidad = MinFecha
End If
@@ -393,8 +453,6 @@ Partial Class Inventarios_TrasladoSolicitud
If Div4.Visible Then
Row("Serie") = TxtSerie.Text
GvDatos.Columns(5).Visible = True
- Else
- Row("Serie") = "-1"
End If
@@ -621,7 +679,7 @@ Partial Class Inventarios_TrasladoSolicitud
For Each row As GridViewRow In GvDatos.Rows
CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "")
- Existencia = ObjInventarios.GetExistenciasPS(row.DataKey("CvePS").ToEntero, row.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"))
+ Existencia = ObjInventarios.GetExistenciasPS(row.DataKey("CvePS").ToEntero, row.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), Lote:=row.DataKey("Lote").ToString, FechaCaducidad:=row.DataKey("FechaCaducidad").ToString.ToDate)
If Existencia - TempDT.SUM("Cantidad", $"CvePS = {row.DataKey("CvePS").ToEntero} AND CveUM = {row.DataKey("CveUM").ToEntero}") < 0 Then
MensajeExistencia.AppendFormat("
-
{0}. Existencia: {1}", CodigoPS, Existencia)
TieneErrorExistencia = True
@@ -666,9 +724,11 @@ Partial Class Inventarios_TrasladoSolicitud
Dim Precio As Double = Row.DataKey("Precio").ToEntero
Dim Observaciones As String = Row.DataKey("Observaciones")
Dim CveContratoDetalle As Integer = Row.DataKey("CveContratoDetalle").ToEntero
- Dim Serie As String = Row.DataKey("Serie")
+ Dim Serie As String = Row.DataKey("Serie")
+ Dim Lote As String = Row.DataKey("Lote")
+ Dim FechaCaducidad As Date = Row.DataKey("FechaCaducidad").ToDate
- If Not ObjInventarios.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, Precio, Observaciones, CveContratoDetalle, Serie) Then
+ If Not ObjInventarios.AddTrasladoSolicitudDetalle(CveTraspasoSolicitud, Cantidad, CveUM, CvePS, Precio, Observaciones, CveContratoDetalle, Serie, Lote, FechaCaducidad) Then
TieneError = True
Exit For
End If
@@ -1019,15 +1079,17 @@ Partial Class Inventarios_TrasladoSolicitud
DdlUM.SelectedValue = "-1"
DdlUM.DataBind()
DdlUM.SelectedValueExist(drPS("CveUnidadMedida").ToString)
- Dim AplicaSerie As Boolean = drPS("AplicaSerie").ToString = "True"
- Div4.Visible = AplicaSerie
+ AplicaSerie = drPS("AplicaSerie").ToString = "True"
+ Div4.Visible = AplicaSerie
+
+ AplicaLote = drPS("AplicaLote").ToString = "True"
+ divLote.Visible = AplicaLote
+ RFVLote.Enabled = AplicaLote
- Dim AplicaLote As Boolean = drPS("AplicaLote").ToString = "True"
- divLote.Visible = AplicaLote
-
- Dim AplicaCaducidad As Boolean = drPS("AplicaCaducidad").ToString = "True"
+ AplicaCaducidad = drPS("AplicaCaducidad").ToString = "True"
divCaducidad.Visible = AplicaCaducidad
- divCaducidad2.Visible = AplicaCaducidad
+ divCaducidad2.Visible = AplicaCaducidad
+ RFVFechaCad.Enabled = AplicaCaducidad
End If
UpPS.Update()
@@ -1180,5 +1242,23 @@ Partial Class Inventarios_TrasladoSolicitud
GvDatos.Columns(5).Visible = Mostrar
End Sub
+ Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
+ If e.Row.RowType = DataControlRowType.DataRow Then
+ If e.Row.FCLiteral("LtlSerie").ToString = "-1" Then
+ e.Row.FCLiteral("LtlSerie").Text = ""
+ End If
+
+ If e.Row.FCLiteral("LtlLote").ToString = "-1" Then
+ e.Row.FCLiteral("LtlLote").Text = ""
+ End If
+
+ If e.Row.FCLiteral("LtlFechaCaducidad").ToString.ToDate = MinFecha Then
+ e.Row.FCLiteral("LtlFechaCaducidad").Text = ""
+ End If
+
+ End If
+
+
+ End Sub
End Class
diff --git a/PortalProveedor/PortalProveedor.aspx b/PortalProveedor/PortalProveedor.aspx
index c4114baf4..acdd6b0e0 100644
--- a/PortalProveedor/PortalProveedor.aspx
+++ b/PortalProveedor/PortalProveedor.aspx
@@ -493,7 +493,7 @@
-
+
diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx
index 4de796386..6f6ec5d8b 100644
--- a/Ventas/PV.aspx
+++ b/Ventas/PV.aspx
@@ -1938,8 +1938,9 @@
-
- |
+
+ |
+ |
| |
@@ -1950,7 +1951,7 @@
-
+
|
@@ -2896,17 +2897,17 @@
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index c79feb010..2dcb86463 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -4012,6 +4012,10 @@ Partial Class Ventas
End If
End If
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CBool(DbRowVenta("ServicioDomicilio")) Then
+ TrServicioDomicilio.Visible = True
+ End If
+
'CargaDetalle
If ObjVentas.GetVentaDetalle(CveVenta) Then
TmpDT = ObjVentas.DtResultados
@@ -12977,8 +12981,10 @@ Partial Class Ventas
Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0
+ Dim TotalCostoAcumulado As Decimal = 0
+
If tmpCostos.Rows.Count > 0 Then
- Dim TotalCostoAcumulado As Decimal = 0
+
Dim cont As Integer = 1
'Se agrega movimiento separado por la cuenta de ventas (ER)
For Each RowInv As DataRow In tmpCostos.Rows
@@ -12996,12 +13002,18 @@ Partial Class Ventas
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto69, ValorInventario, factura.SerieFolio, 69, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveSubProyecto:=factura.CveSubProyecto, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta) Then
- OcurrioError = True
- End If
+ OcurrioError = True
+ End If
'End If
cont += 1
Next
End If
+
+ 'AJUSTA EL TOTAL
+ If Math.Abs(TotalCostoAcumulado - TotalCosto) = 0.01 Then
+ TotalCosto = TotalCostoAcumulado
+ End If
+
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
'If TotalCosto <> 0 Then
@@ -23192,7 +23204,7 @@ Partial Class Ventas
Dim ObjBancos As New ClsBancos
If UsuarioActual.CveRol = 1 Then
- GvComplementoPagos.Columns(8).Visible = True
+ GvComplementoPagos.Columns(7).Visible = True
End If
|