diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index 8aff48266..b3997b144 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -2048,12 +2048,13 @@ Partial Class Inventarios_EntregaAlmacen
CantidadPendiente = 1
- If CBool(Dr("AplicaSeccion")) Then
- CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
- Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
- Else
- CveSeccionAlmacen = -1
- End If
+ 'If CBool(Dr("AplicaSeccion")) Then
+ ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr2("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
+ ' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr2("CveAlmacen"), Dr("CvePS"), CveSeccionAlmacen)
+ 'Else
+ ' CveSeccionAlmacen = -1
+ 'End If
+ CveSeccionAlmacen = -3
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Serie:=Dr1("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=CveSeccionAlmacen) Then
ErrorMovInv = True
@@ -2509,12 +2510,14 @@ Partial Class Inventarios_EntregaAlmacen
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
Exit For
End If
- If CBool(Dr("AplicaSeccion")) Then
- CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
- Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
- Else
- CveSeccionAlmacen = -1
- End If
+ 'If CBool(Dr("AplicaSeccion")) Then
+ ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenOrigen, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
+ ' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", CveAlmacenOrigen, Dr("CvePS"), CveSeccionAlmacen)
+ 'Else
+ ' CveSeccionAlmacen = -1
+ 'End If
+ CveSeccionAlmacen = -3
+
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
ErrorMovInv = True
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de control de apartados")
@@ -2543,12 +2546,13 @@ Partial Class Inventarios_EntregaAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If CBool(Dr("AplicaSeccion")) Then
- CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
- Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS"), CveSeccionAlmacen)
- Else
- CveSeccionAlmacen = -1
- End If
+ 'If CBool(Dr("AplicaSeccion")) Then
+ ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
+ ' Dim a As String = String.Format("CveAlmacen={0}-CvePS:{1}-CveseccionAlmacen={2}", Dr1("CveAlmacen").ToString.ToEntero, Dr("CvePS"), CveSeccionAlmacen)
+ 'Else
+ ' CveSeccionAlmacen = -1
+ 'End If
+ CveSeccionAlmacen = -3
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=CveSeccionAlmacen) Then
ErrorMovInv = True
@@ -3132,11 +3136,12 @@ Partial Class Inventarios_EntregaAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim CveSeccionAlmacen As Integer = -1
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
- If CBool(Dr("AplicaSeccion")) Then
- CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Almacen2, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
- Else
- CveSeccionAlmacen = -1
- End If
+ 'If CBool(Dr("AplicaSeccion")) Then
+ ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, Almacen2, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
+ 'Else
+ ' CveSeccionAlmacen = -1
+ 'End If
+ CveSeccionAlmacen = -3
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
ErrorMovInv = True
diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx b/Inventarios/PopUpExistenciasAlmacen.aspx
index eec03b6a6..2528fc984 100644
--- a/Inventarios/PopUpExistenciasAlmacen.aspx
+++ b/Inventarios/PopUpExistenciasAlmacen.aspx
@@ -46,7 +46,7 @@
-
+
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb
index 544cb3ba9..2f6d5ea53 100644
--- a/Inventarios/RecepcionAlmacen.aspx.vb
+++ b/Inventarios/RecepcionAlmacen.aspx.vb
@@ -2643,12 +2643,8 @@ Partial Class Inventarios_RecepcionAlmacen
ErrorMovInv = True
Exit For
End If
- If CBool(Dr("AplicaSeccion")) Then
- CveSeccionDestino = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDestino, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
- Else
- CveSeccionDestino = -1
- End If
+ CveSeccionDestino = -3 'se madna este dato, para que el trigger, obtenga la seccion automaticamente
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionDestino, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
diff --git a/Sistemas/CatSesiones.aspx.vb b/Sistemas/CatSesiones.aspx.vb
index 88f01e6ec..d37d08cc2 100644
--- a/Sistemas/CatSesiones.aspx.vb
+++ b/Sistemas/CatSesiones.aspx.vb
@@ -419,7 +419,7 @@ Partial Class Sistemas_CatSesiones
Private Sub CargaBancosCuentas()
Dim Banc As New ClsBancos
- If Banc.GetBancosCuentasUsuarios(-1) Then Application("GlobalDTBancosCuentas") = Banc.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
+ If Banc.GetBancosCuentasUsuarios(-1, UsuarioActual.CveEmpresa) Then Application("GlobalDTBancosCuentas") = Banc.DtResultados Else Application("GlobalDTBancosCuentas") = Nothing
Banc.Dispose()
End Sub
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index de17079a9..ad9f29627 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -1902,7 +1902,7 @@ Partial Class Clientes
GvDireccionesEnvio.DataBind()
If TxtRFC.Text = "XAXX010101000" Then
- GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal").Text = "Cliente"
+ If GvDireccionesEnvio.HeaderRow IsNot Nothing AndAlso GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal") IsNot Nothing Then GvDireccionesEnvio.HeaderRow.FCLiteral("LtlNombreSucursal").Text = "Cliente"
LtlNombreSucursal.Text = "Cliente"
LtlNombreSucursalTitulo.Text = "Cliente"
LtlTituloSurcusalCliente.Text = "Datos del cliente"
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index fa4571f56..81c0b9d88 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -12073,8 +12073,8 @@ Partial Class Ventas
Exit For
End If
End If
- Dim CveSeccionAlmacen As Integer = -1
- If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
+ Dim CveSeccionAlmacen As Integer = -3
+ 'If AplicaSeccion Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacen, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen", "").ToEntero
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Serie:=Dr("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
OcurrioError = True
@@ -14555,116 +14555,116 @@ Partial Class Ventas
If UsuarioActual.TienePermisoProceso(68) AndAlso Not PSCodigoSAT.Contiene("84111506", "80141610") Then TxtPrecio.Enabled = False
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
- DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
- CambiaMoneda()
+ DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString())
+ CambiaMoneda()
+ End If
+
+ 'SUGIERE PRECIO
+ Dim PrecioSugerido = 0.0
+ PrecioSugerido = drPS("Precio").ToString().ToDouble
+
+ If UsuarioActual.CveEmpresa.Contiene(1) Then
+ Dim ObjPS As New ClsProductosServicios
+ If ObjPS.GetPorcentajeProductos(CveCliente) Then
+ Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
+ If PrecioAplicado > 0 Then
+ PrecioSugerido = PrecioAplicado
+ End If
+ End If
+ ObjPS.Dispose()
+ End If
+
+ If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
+ Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
+ ' si es 10. primero el cliente
+ Dim CvePrecioListaPS As Integer
+ Dim PorcentajePrecio As Double = 0
+
+ If TipoPrecioLista = 10 Then
+
+ CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
+ If CvePrecioListaPS <= 0 Then
+
+ CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
+
+ End If
+
+ Else
+
+ CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
+ If CvePrecioListaPS <= 0 Then
+
+ CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
+
+ End If
+
End If
- 'SUGIERE PRECIO
- Dim PrecioSugerido = 0.0
- PrecioSugerido = drPS("Precio").ToString().ToDouble
-
- If UsuarioActual.CveEmpresa.Contiene(1) Then
+ If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios
- If ObjPS.GetPorcentajeProductos(CveCliente) Then
- Dim PrecioAplicado = ObjPS.DtResultados.FiltraParametros($"CvePS = {CvePSParametro}").FiltroPrimeroValor("PrecioA").ToDouble
- If PrecioAplicado > 0 Then
- PrecioSugerido = PrecioAplicado
- End If
+ If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
+ PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
+ PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
End If
ObjPS.Dispose()
End If
- If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'cuando el valor es 10.- secuencia Cliente/Sucursal, 20 - sucursal/cliente
- Dim TipoPrecioLista As Integer = UsuarioActual.Empresa.Funcionalidad(404).ToEntero
- ' si es 10. primero el cliente
- Dim CvePrecioListaPS As Integer
- Dim PorcentajePrecio As Double = 0
-
- If TipoPrecioLista = 10 Then
-
- CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
- If CvePrecioListaPS <= 0 Then
-
- CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
-
- End If
-
- Else
-
- CvePrecioListaPS = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "").ToEntero()
- If CvePrecioListaPS <= 0 Then
-
- CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("CvePrecioLista").ToEntero()
-
- End If
-
+ If PrecioSugerido = 0 Then
+ Dim ObjInventarios As New ClsInventarios
+ Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
+ 'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
+ If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
+ ObjInventarios.Dispose()
+ If CostoPS > 0 And PorcentajePrecio > 0 Then
+ PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
End If
-
- If CvePrecioListaPS > 0 Then
- Dim ObjPS As New ClsProductosServicios
- If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
- PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDouble
- PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDouble
- End If
- ObjPS.Dispose()
- End If
-
- If PrecioSugerido = 0 Then
- Dim ObjInventarios As New ClsInventarios
- Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
- 'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
- If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
- ObjInventarios.Dispose()
- If CostoPS > 0 And PorcentajePrecio > 0 Then
- PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
- End If
- End If
- CvePrecioLista = CvePrecioListaPS
End If
+ CvePrecioLista = CvePrecioListaPS
+ End If
- 'Dim ObjClasificaciones As New ClsClasificaciones
- 'If ObjClasificaciones.GetClasificaciones() Then
- ' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
- 'End If
+ 'Dim ObjClasificaciones As New ClsClasificaciones
+ 'If ObjClasificaciones.GetClasificaciones() Then
+ ' PrecioBaseCosto = ObjClasificaciones.DtResultados.FiltroPrimeroValor("PrecioBaseCosto", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveClasificacion = {drPS("CveClasificacion")}").ToDecimal
+ 'End If
- If PrecioSugerido > 0 Then
- Dim PrecioBaseCosto As Decimal = 0
- PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
+ If PrecioSugerido > 0 Then
+ Dim PrecioBaseCosto As Decimal = 0
+ PrecioBaseCosto = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=drPS("CveClasificacion").ToString().ToEntero()).FiltroPrimeroValor("PrecioBaseCosto", "").ToDecimal
- If PrecioBaseCosto > 0 Then
- PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
- End If
- TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
+ If PrecioBaseCosto > 0 Then
+ PrecioSugerido = PrecioSugerido * ((PrecioBaseCosto / 100) + 1)
End If
+ TxtPrecio.Text = PrecioSugerido.ToString("#,###.####") ' que muestre hasta los 4 digitos si lo requiere
+ End If
- If IsNumeric(TxtCantidad.Text.Trim) Then
- LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
+ If IsNumeric(TxtCantidad.Text.Trim) Then
+ LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString().FormatoNumero(2)
+ Else
+ LblTotalPS.Text = "0.00"
+ End If
+ LblPrecio1.Text = TxtPrecio.Text
+ UPPDescuento.Update()
+
+ HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
+ HdnIVARetAPS.Value = drPS("RetIVA").ToString()
+ HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
+ HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
+ HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
+ HdnCodigo.Value = drPS("Codigo").ToString()
+ If DdlClasificacion.SelectedIndex = 0 Then
+ If drPS("CveClasificacion").ToString() IsNot Nothing Then
+ DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
Else
- LblTotalPS.Text = "0.00"
- End If
- LblPrecio1.Text = TxtPrecio.Text
- UPPDescuento.Update()
-
- HdnIVAPS.Value = If(drPS("IVA").ToString() = "-1", ViewState("IVA"), drPS("IVA").ToString()).ToString()
- HdnIVARetAPS.Value = drPS("RetIVA").ToString()
- HdnAsientoContable.Value = drPS("AsientoContableVentas").ToString()
- HdnCtaContable.Value = drPS("IdCtaContVentas").ToString()
- HdnAplicaParaConcepto.Value = drPS("AplicaParaConcepto").ToString()
- HdnCodigo.Value = drPS("Codigo").ToString()
- If DdlClasificacion.SelectedIndex = 0 Then
- If drPS("CveClasificacion").ToString() IsNot Nothing Then
- DdlClasificacion.SelectedValueExist(drPS("CveClasificacion").ToString())
- Else
- Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
- End If
-
+ Alert("El Productos/Servicio no tiene asignada una Clasificación.", TipoMensaje.MsgInformacion)
End If
End If
- ElseIf CvePSParametro = -2 Then
+ End If
+
+ ElseIf CvePSParametro = -2 Then
CargaPS(DdlClasificacion.SelectedValue.ToEntero(), Ddl)
End If
@@ -15774,7 +15774,7 @@ Partial Class Ventas
End If
'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS
- Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Me.ObjFacturaNC.VentaDesglosaIEPS))
+ Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Not Me.ObjFacturaNC.VentaDesglosaIEPS))
If Not ClienteDesglosaIEPS Then
If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then
@@ -21609,11 +21609,12 @@ Partial Class Ventas
Return False
End If
- If AplicaSeccion Then
- CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
- Else
- CveSeccionAlmacen = -1
- End If
+ 'If AplicaSeccion Then
+ ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
+ 'Else
+ ' CveSeccionAlmacen = -1
+ 'End If
+ CveSeccionAlmacen = -3
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, Serie:=Dr2("Serie").ToString(), CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
Return False
@@ -21625,11 +21626,12 @@ Partial Class Ventas
Return False
End If
- If AplicaSeccion Then
- CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
- Else
- CveSeccionAlmacen = -1
- End If
+ 'If AplicaSeccion Then
+ ' CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenExistenciasContrato, CveProducto).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
+ 'Else
+ ' CveSeccionAlmacen = -1
+ 'End If
+ CveSeccionAlmacen = -3
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, Cantidad, CveUnidad, CveProducto, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero()) Then
Return False
|