diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb
index ccf45d815..10b6cbae5 100644
--- a/App_Code/ClsContPAQi.vb
+++ b/App_Code/ClsContPAQi.vb
@@ -1065,11 +1065,11 @@ Public Class ClsContPAQi
StrSQL.Clear()
StrSQL.AppendLine(" SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; ")
StrSQL.AppendLine(" ")
- StrSQL.AppendLine(" SELECT mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta , mp.IdCuenta as CveCuenta, c.CODIGO, c.NOMBRE as Cuenta , T.Codigo as CodigoTipoPoliza, T.Nombre AS TipoPoliza, mp.Folio, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre AS SegNeg, p.Fecha AS FechaPol, p.Cargos, p.Abonos, p.Concepto AS ConceptoPoliza, ")
+ StrSQL.AppendLine(" SELECT mp.id, mp.IdPoliza, mp.NumMovto, mp.IdCuenta , mp.IdCuenta as CveCuenta, c.CODIGO, c.NOMBRE as Cuenta , c.NOMBRE as NombreCuenta , T.Codigo as CodigoTipoPoliza, T.Nombre AS TipoPoliza, mp.Folio, mp.Folio as Numero, mp.Importe, mp.Concepto, mp.Referencia, mp.SIGReferencia, mp.Fecha, mp.IdSegNeg, p.IdUsuario, s.Nombre AS SegNeg, p.Fecha AS FechaPol, p.Cargos, p.Abonos, p.Concepto AS ConceptoPoliza, ")
StrSQL.AppendLine(" CASE WHEN ISNUMERIC(c.Codigo) = 1 THEN FORMAT(CAST (c.Codigo AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.Codigo END + ' - ' + c.Nombre + ' ' AS CtaCodigo, ") 'Roberto 8/Nov/2014
StrSQL.AppendLine(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.Importe ELSE 0 END) AS Cargo, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.Importe ELSE 0 END) AS Abono, ")
StrSQL.AppendLine(" SUM (CASE WHEN mp.TipoMovto = 0 THEN mp.ImporteME ELSE 0 END) AS CargoME, SUM (CASE WHEN mp.TipoMovto = 1 THEN mp.ImporteME ELSE 0 END) AS AbonoME, ")
- StrSQL.AppendLine(" mp.TipoMovto, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CuentaFormato, '' as Estado,MAX(U.Nombre) AS UsuarioRegistro ")
+ StrSQL.AppendLine(" mp.TipoMovto, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CuentaFormato, CASE WHEN ISNUMERIC(c.CODIGO) = 1 THEN FORMAT(CAST (c.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE c.CODIGO END CodigoCuenta, '' as Estado,MAX(U.Nombre) AS UsuarioRegistro, MAX(U.Nombre) AS NombreUsuario ")
StrSQL.AppendLine(" FROM MovimientosPoliza mp ")
StrSQL.AppendLine(" INNER JOIN Polizas p ON mp.IdPoliza = p.Id ")
StrSQL.AppendLine(" INNER JOIN Cuentas c ON c.Id = mp.IdCuenta ")
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index e7907959b..23f649d54 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -5723,7 +5723,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
- Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1,
+ Public Function AddCuentasAsignaciones(Optional CveConceptoContable As Integer = -1, Optional CveEmpresa As Integer = -1, Optional CveCuenta As Integer = -1, Optional IdCtaContable As Integer = -1,
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveClasificacion As Integer = -1,
Optional CveAlmacen As Integer = -1, Optional PorcentajeIVA As Decimal = -1, Optional CveConceptoNomina As Decimal = -1) As Boolean
Dim Retorno = False
@@ -5732,6 +5732,7 @@ Public Class ClsContabilidad
With SqlAdapter.SelectCommand.Parameters
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
diff --git a/App_Code/ClsGPS.vb b/App_Code/ClsGPS.vb
index d19cb9541..6ef6a9114 100644
--- a/App_Code/ClsGPS.vb
+++ b/App_Code/ClsGPS.vb
@@ -3137,6 +3137,24 @@ Public Class ClsGPS
Return Retorno
End Function
+ Public Function ReporteUnidadesnoTransmitenGet(NoHoras As Integer, CveEstatus As Integer, CveCliente As Integer, Optional CveEmpresa As Integer = -1, Optional TipoDispositivo As Integer = -1) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_GPS_ReporteUnidadesnoTransmitenGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@NoHoras", SqlDbType.Int).Value = NoHoras
+ .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@TipoDispositivo", SqlDbType.Int).Value = TipoDispositivo
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener los dispositivos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
Public Function DispositivosGet(CveDispositivo As Integer, CveEstatus As Integer, CveCliente As Integer, Optional CveEmpresa As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_GPS_DispositivosGet")
diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index c4c0b3881..45f22427f 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -1249,7 +1249,7 @@ Public Class ClsInventarios
'''
''' Cuando sea cancelacion/devolucion hay que mandar este dato que seria la salida de almacen
'''
- Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1) As Boolean
+ Public Function GetMovimientosDetalleVirtual(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoRelacionado As Integer = -1, Optional ValidaUsadosCompra As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_MovimientosDetalleVirtualGet")
@@ -1258,12 +1258,18 @@ Public Class ClsInventarios
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
.Add("@CveMovimientoRelacionado", SqlDbType.Int).Value = CveMovimientoRelacionado
+ .Add("@ValidaUsadosCompra", SqlDbType.Bit).Value = ValidaUsadosCompra
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
- OnError("Ocurrió un error al obtener los movimientos virtuales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ If ex.Message.Contains("Usados sistema") Then
+ OnError($"Los usados de la compra no coinciden. {ex.Message}", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ Else
+ OnError("Ocurrió un error al obtener los movimientos virtuales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
+
End Try
Return Retorno
@@ -1628,7 +1634,7 @@ Public Class ClsInventarios
End Function
- Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer) As Boolean
+ Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ProductosCaducidadGet")
@@ -1639,6 +1645,8 @@ Public Class ClsInventarios
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
+ .Add("@CvePS", SqlDbType.Int).Value = CvePS
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index b1a8ffaf3..148b96b30 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3821,6 +3821,8 @@ Public Class ClsPaginas
PaginaDict.Add("/Inicio.aspx".ToUpper(), -1)
PaginaDict.Add("/reporteador.aspx".ToUpper(), -1)
PaginaDict.Add("/General/CATIEPSxEntidadFed.aspx".ToUpper(), 719)
+ PaginaDict.Add("/GPS/ReporteUnidadesnoTransmiten.aspx".ToUpper(), 917)
+
PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718)
PaginaDict.Add("/Ventas/RepConciliacionEmitidosSat.aspx".ToUpper(), -1)
PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716)
diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb
index 8afea1057..0a9d5aca9 100644
--- a/App_Code/ClsProductosServicios.vb
+++ b/App_Code/ClsProductosServicios.vb
@@ -1409,6 +1409,30 @@ Public Class ClsProductosServicios
Return Retorno
End Function
+
+ Public Function UpdateAplicaLoteCaducidadAlmacen(CvePS As Integer, CveEmpresa As Integer, AplicaLoteAlmacen As Boolean, AplicaCaducidadAlmacen As Boolean) As Boolean
+ Dim Retorno As Boolean = False
+
+ DataAdapter("PA_Gral_ProductosServiciosLoteCaducidadAlmacenUpdate")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CvePS", SqlDbType.Int).Value = CvePS
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@AplicaLoteAlmacen", SqlDbType.Bit).Value = AplicaLoteAlmacen
+ .Add("@AplicaCaducidadAlmacen", SqlDbType.Bit).Value = AplicaCaducidadAlmacen
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch Ex1 As SqlException
+
+ Catch ex As Exception
+ OnError("Ocurrió un error al actualizar aplicar lote/caducidad almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
Public Function GetMarcas(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_MarcasGet")
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index e864519ea..79a6ab882 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -341,7 +341,7 @@ Public Class ClsVentas
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
- Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False) As Boolean
+ Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd")
@@ -434,6 +434,7 @@ Public Class ClsVentas
.Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
.Add("@FacturarSucursal", SqlDbType.Bit).Value = FacturarSucursal
.Add("@VentaDesglosaIEPS", SqlDbType.Bit).Value = VentaDesglosaIEPS
+ .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With
@@ -462,7 +463,7 @@ Public Class ClsVentas
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
- Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1) As Boolean
+ Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUpdate")
@@ -494,6 +495,7 @@ Public Class ClsVentas
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
.Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi
+ .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio
End With
Try
@@ -1452,7 +1454,7 @@ Public Class ClsVentas
Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1,
- Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
+ Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasGetRepPeriodo")
@@ -1480,6 +1482,7 @@ Public Class ClsVentas
.Add("@VerEn", SqlDbType.Int).Value = VerEn
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
+ .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
End With
Try
@@ -1549,7 +1552,7 @@ Public Class ClsVentas
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer,
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1,
- Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1) As Boolean
+ Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_GetRepPS")
@@ -1579,6 +1582,8 @@ Public Class ClsVentas
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
+ .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
+
End With
@@ -1597,7 +1602,7 @@ Public Class ClsVentas
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1,
Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1,
Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1,
- Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
+ Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_GetRepPSDetalle")
@@ -1630,7 +1635,7 @@ Public Class ClsVentas
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveClasificacionDetalle", SqlDbType.Int).Value = CveClasificacionDetalle
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
-
+ .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
End With
@@ -2156,7 +2161,7 @@ Public Class ClsVentas
#End Region
#Region " PROMOCIONES DETALLE "
- Public Function GetPromocionesPS(CvePS As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveCliente As Integer, CveVendedor As Integer, CveEmpresa As Integer) As Boolean
+ Public Function GetPromocionesPS(CvePS As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveCliente As Integer, CveVendedor As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesPSGet")
@@ -2166,6 +2171,7 @@ Public Class ClsVentas
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
@@ -3789,8 +3795,8 @@ Public Class ClsVentas
Public Function GetRepPSPeriodo(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1,
- Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, Optional CvePS As Integer = -1, Optional CveClasificacion As Integer = -1,
- Optional CveCategoria As Integer = -1, Optional TipoFecha As Integer = 1, Optional CveClienteClasificacion As Integer = -1) As Boolean
+ Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, Optional CvePS As Integer = -1, Optional CveClasificacion As Integer = -1,
+ Optional CveCategoria As Integer = -1, Optional TipoFecha As Integer = 1, Optional CveClienteClasificacion As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasGetRepPeriodoPS")
With SqlAdapter.SelectCommand.Parameters
@@ -3819,6 +3825,7 @@ Public Class ClsVentas
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
.Add("@TipoFecha", SqlDbType.Int).Value = TipoFecha
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
+ .Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
End With
Try
SqlAdapter.Fill(Data)
@@ -4753,7 +4760,7 @@ Public Class ClsVentas
Return Retorno
End Function
- Public Function GetVentasUsados(CveVenta As Integer, CveSubProyecto As Integer, Fecha As DateTime, CveEmpresa As Integer) As Boolean
+ Public Function GetVentasUsados(CveVenta As Integer, CveSubProyecto As Integer, Fecha As DateTime, CveEmpresa As Integer, Optional ServicioDomicilio As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUsadosGet", CommandType.StoredProcedure)
@@ -4763,6 +4770,7 @@ Public Class ClsVentas
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio
End With
Try
diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb
index e378f3aae..61f35a5e7 100644
--- a/App_Code/LogicNominas.vb
+++ b/App_Code/LogicNominas.vb
@@ -256,7 +256,7 @@ Public Class LogicNominas
'subsidio al empleo
If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo
- .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal})
+ .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal, .Subsidiocausado = Row("Importe").ToString().ToDecimal().Abs()})
End If
Next
End If
@@ -286,7 +286,7 @@ Public Class LogicNominas
'subsidio al empleo
If Row("SATCveConcepto").ToString().ToEntero().ToEntero() = 17 AndAlso Row("Importe").ToString().ToDecimal > 0 Then 'Subsidio
ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo
- .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal})
+ .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(), .Importe = Row("Importe").ToString().ToDecimal(), .Subsidiocausado = Row("Importe").ToString().ToDecimal().Abs()})
End If
Next
End If
@@ -300,7 +300,13 @@ Public Class LogicNominas
If Row("CveSATConcepto").ToString() = "" Then cfdi.AddMsg(String.Format("Concepto No registrado ({0})", Row("Concepto").ToString())) : Exit For
Dim otrp = New CFDINominaOtrosPagos With {.TipoOtroPago = Row("SATCveConcepto").ToString(), .Clave = Row("Codigo").ToString(), .Concepto = Row("Concepto").ToString(),
- .Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("ImporteGravado").ToString().ToDecimal().Abs()}
+ .Importe = Row("Importe").ToString().ToDecimal().Abs(), .Subsidiocausado = Row("Importe").ToString().ToDecimal().Abs()}
+ If Row("SATCveConcepto").ToString().ToEntero() = 4 Then
+ otrp.ejercicio = DateTime.Now.Year - 1
+ otrp.SaldoAFavor = Row("ImporteValor").ToString().ToDecimal().Abs()
+ otrp.RemanenteSalFav = Row("ImporteValor").ToString().ToDecimal().Abs() - Row("Importe").ToString().ToDecimal().Abs()
+ End If
+
ObjOtrosPagos.Add(otrp)
@@ -316,6 +322,13 @@ Public Class LogicNominas
Next
End If
+ If CveRegimenContratacion.ToEntero() = 2 AndAlso ((ObjOtrosPagos.FirstOrDefault(Function(m) m.TipoOtroPago.ToEntero().Contiene(2, 7, 8))) Is Nothing) Then
+
+ ObjOtrosPagos.Add(New CFDINominaOtrosPagos With {.TipoOtroPago = "002", ' codigo fijo, por ser referente a subsidio al empleo
+ .Clave = "D051", .Concepto = "Subs al Empleo acreditado", .Importe = 0D, .Subsidiocausado = 0D})
+
+ End If
+
If ObjPercepciones IsNot Nothing AndAlso ObjPercepciones.Count > 0 Then cfdi.Nomina.Percepciones = ObjPercepciones
If ObjHorasExtras IsNot Nothing AndAlso ObjHorasExtras.Count > 0 Then cfdi.Nomina.HorasExtras = ObjHorasExtras
If ObjOtrosPagos IsNot Nothing AndAlso ObjOtrosPagos.Count > 0 Then cfdi.Nomina.OtrosPagos = ObjOtrosPagos
diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 37f285efa..d9dd46a07 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -526,7 +526,7 @@ Namespace Modelos
Dim ObjVentas As New ClsVentas
'CARGA PROMOCIONES
- If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, Me.CveEmpresa) Then
+ If ObjVentas.GetPromocionesPS(-1, Me.Fecha, Me.CveSubProyecto, CveCliente, Me.CveVendedor, 1, Me.CveEmpresa) Then
Me.DtPromociones = ObjVentas.DtResultados.Copy()
End If
@@ -1422,7 +1422,7 @@ Namespace Modelos
PedidoContrato:=factura.PedidoContrato, ObservacionesAlmacen:=factura.ObservacionesAlmacen, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33,
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
- CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno) Then
+ CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio) Then
ErrorList.Add("Ocurrió un error al Generar la Venta. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
@@ -5775,6 +5775,7 @@ Namespace Modelos
#Region "P R O P I E D A D E S"
+ Public Property ServicioDomicilio As Boolean
Public Property CveEstatusRefacturacion As Integer = 0
Public Property NuevaFactura As Integer
Public Property EnviarCorreo As Boolean = False
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index 94768effd..9a18a5716 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -961,6 +961,8 @@ Namespace Extensiones
Retorno = ""
End If
+ Retorno = UCase(Mid(Retorno, 1, 1)) + Mid(Retorno, 2, Len(Retorno))
+
Return Retorno
End Function
diff --git a/Ashx/SIGFacturacion.ashx b/Ashx/SIGFacturacion.ashx
index eb3f2fa7d..cf37bb840 100644
--- a/Ashx/SIGFacturacion.ashx
+++ b/Ashx/SIGFacturacion.ashx
@@ -362,14 +362,14 @@ Public Class SIGFacturacion : Implements IHttpHandler, IRequiresSessionState
ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
- ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
+ 'ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
- If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then
- ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString
- Else
- ObjFactura.CveMetodoPago = 1
- ObjFactura.MetodoPago = "Efectivo"
- End If
+ 'If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then
+ ' ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString
+ 'Else
+ ' ObjFactura.CveMetodoPago = 1
+ ' ObjFactura.MetodoPago = "Efectivo"
+ 'End If
End If
End If
If ObjCliente.GetSucursales(CveCliente) Then
diff --git a/Ashx/SIGFacturacionCiclica.ashx b/Ashx/SIGFacturacionCiclica.ashx
index efa477a6f..35541349c 100644
--- a/Ashx/SIGFacturacionCiclica.ashx
+++ b/Ashx/SIGFacturacionCiclica.ashx
@@ -425,14 +425,14 @@ Public Class SIGFacturacionCiclica : Implements IHttpHandler, IRequiresSessionSt
ObjFactura.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
ObjFactura.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
- ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
+ 'ObjFactura.CveMetodoPago = ObjCliente.CveMetodoPago
- If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then
- ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString
- Else
- ObjFactura.CveMetodoPago = 1
- ObjFactura.MetodoPago = "Efectivo"
- End If
+ 'If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then
+ ' ObjFactura.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString
+ 'Else
+ ' ObjFactura.CveMetodoPago = 1
+ ' ObjFactura.MetodoPago = "Efectivo"
+ 'End If
End If
End If
diff --git a/Bancos/Devoluciones.aspx.cs b/Bancos/Devoluciones.aspx.cs
index 65a91d93d..acc3565c3 100644
--- a/Bancos/Devoluciones.aspx.cs
+++ b/Bancos/Devoluciones.aspx.cs
@@ -433,7 +433,7 @@ public partial class Bancos_Devoluciones : ClsPaginas
}
// OTROS INGRESOS
- if (gvr.FCTextBox("TxtComision").Text.ToDecimal() > 0)
+ if (gvr.FCTextBox("TxtComision").Text.ToDecimal() != 0)
{
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovoDevolucion, gvr.FCTextBox("TxtComision").Text.ToDecimal(), Ref, 78, Conc, DateTime.Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, CveIE: gvr.DataKey("CveIE").ToEntero(), CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero(), CveProveedor: cveProveedor, CvePersonal: cvePersonal, ImporteMX: gvr.FCTextBox("TxtComision").Text.ToDecimal(), CveIEDevolucion: CveIE))
{
diff --git a/Bancos/RepCortes.aspx b/Bancos/RepCortes.aspx
index 2f90c1b90..3ccba8aaf 100644
--- a/Bancos/RepCortes.aspx
+++ b/Bancos/RepCortes.aspx
@@ -323,7 +323,12 @@
-
+
+
+
+
+
+ <%----%>
diff --git a/Bancos/RepCortes.aspx.vb b/Bancos/RepCortes.aspx.vb
index df363cc2c..3109668a4 100644
--- a/Bancos/RepCortes.aspx.vb
+++ b/Bancos/RepCortes.aspx.vb
@@ -100,6 +100,9 @@ Partial Class Bancos_RepCortes
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveVenta").ToString = "" Then
e.Row.CssClass = "Totales"
+ End If
+ If e.Row.DBCampo("ImportePagado").ToDecimal() < 0 Then
+ e.Row.FCLabel("LblTotal").CssClass = "badge badge-danger"
End If
End If
End Sub
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index 283f3403f..7064cbbec 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -157,15 +157,14 @@
}
.GastoIndirectoOpciones {
- margin-left:auto;
- margin-right:auto;
- width:400px;
+ margin-left: auto;
+ margin-right: auto;
+ width: 400px;
}
- .GastoIndirectoOpciones td
- {
- text-align:right /* Or any other value */
- }
+ .GastoIndirectoOpciones td {
+ text-align: right; /* Or any other value */
+ }
/*IPP*/
@@ -3217,12 +3216,12 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/GPS/ReporteUnidadesnoTransmiten.aspx.cs b/GPS/ReporteUnidadesnoTransmiten.aspx.cs
new file mode 100644
index 000000000..b32f8e60f
--- /dev/null
+++ b/GPS/ReporteUnidadesnoTransmiten.aspx.cs
@@ -0,0 +1,95 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using Extensiones;
+public partial class GPS_ReporteUnidadesnoTransmiten : ClsPaginas
+{
+ #region Propiedades
+ protected int CveCliente
+ {
+ get
+ {
+ if (ViewState["CveCliente"] == null) { return 0; }
+ else { return ViewState["CveCliente"].ToString().ToEntero(); }
+ }
+
+ set { ViewState["CveCliente"] = value; }
+ }
+ protected int CveEstatus
+ {
+ get
+ {
+ if (ViewState["CveEstatus"] == null) { return 0; }
+ else { return ViewState["CveEstatus"].ToString().ToEntero(); }
+ }
+
+ set { ViewState["CveEstatus"] = value; }
+ }
+ protected int TipoDispositivo
+ {
+ get
+ {
+ if (ViewState["TipoDispositivo"] == null) { return 0; }
+ else { return ViewState["TipoDispositivo"].ToString().ToEntero(); }
+ }
+
+ set { ViewState["TipoDispositivo"] = value; }
+ }
+ #endregion
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+
+ DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa);
+ DdlCliente.DataBind();
+ CveCliente = -1;
+ CveEstatus = 1;
+ TipoDispositivo = -1;
+ cargaDispositivos();
+ }
+ }
+ public void cargaDispositivos()
+ {
+ GvDatosGPS.DataSource = null;
+ using (ClsGPS ObjGPS = new ClsGPS())
+ {
+ if (ObjGPS.ReporteUnidadesnoTransmitenGet(-1, CveEstatus, CveCliente, UsuarioActual.CveEmpresa, TipoDispositivo))
+ {
+ GvDatosGPS.DataSource = ObjGPS.DtResultados;
+ }
+ }
+ GvDatosGPS.DataBind();
+ /*
+ Dim ObjGPS As New ClsGPS
+ If ObjGPS.DispositivosGet(-1, Estatus, CveCliente) Then
+ GvDatosGPS.DataSource = ObjGPS.DtResultados
+ Else
+ GvDatosGPS.DataSource = Nothing
+ End If
+ ObjGPS.Dispose()
+ GvDatosGPS.DataBind()
+ UpDispositivos.Update()
+ */
+ }
+
+ protected void BtnConsultar_Click(object sender, EventArgs e)
+ {
+ CveEstatus = DdlEstatus.SelectedValue.ToEntero();
+ CveCliente = DdlCliente.SelectedValue.ToEntero(); CveCliente = CveCliente > 0 ? CveCliente : -1;
+ TipoDispositivo = DdltipoDispositivo.SelectedValue.ToEntero();
+ cargaDispositivos();
+ }
+
+ protected void GvDatosGPS_RowDataBound(object sender, GridViewRowEventArgs e)
+ {
+ if (e.Row.RowType == DataControlRowType.DataRow)
+ {
+ e.Row.VerticalAlign = VerticalAlign.Middle;
+ e.Row.FCLabel("Lblnumero").Text = (e.Row.RowIndex + 1).ToString();
+ }
+ }
+}
\ No newline at end of file
diff --git a/GPS/WizardDispositivos.aspx.cs b/GPS/WizardDispositivos.aspx.cs
index 7a86e9a01..d922d90dd 100644
--- a/GPS/WizardDispositivos.aspx.cs
+++ b/GPS/WizardDispositivos.aspx.cs
@@ -353,7 +353,11 @@ public partial class GPS_WizardDispositivos : ClsPaginas
string icono = "rsz_11rsz_car";
string Color = "#0088FF";
string NumTelefono = ChkTipoLinea.Checked ? TxtTelefonoMovil.Text.Trim().Replace("(","").Replace(")","").Replace("-","").Replace(" ","") : "-1";
-
+ if(DdlMarca.SelectedValue =="19" && DevId.Length != 16 )
+ {
+ continuar = false;
+ Alert("el IMEI y DEVID de los dispositivos concox debe ser igual a 16 dígitos.", ModExtensiones.TipoMensaje.MsgAdvertencia);
+ }
if (continuar)
{
ClsGPS ObjGPS = new ClsGPS();
diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb
index 3fe1cc915..4191ec709 100644
--- a/General/SaldosIniciales.aspx.vb
+++ b/General/SaldosIniciales.aspx.vb
@@ -856,16 +856,16 @@ Partial Class General_SaldosIniciales
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle) <= 0 Then
- 'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
- ' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then
- ErrorPS = True
- Codigo.GuardaLog
- Exit For
- 'Else
- ' If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
- ' DTPS = ObjPS.DtResultados
- ' End If
- End If
+ 'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
+ ' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then
+ ErrorPS = True
+ Codigo.GuardaLog
+ Exit For
+ 'Else
+ ' If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
+ ' DTPS = ObjPS.DtResultados
+ ' End If
+ End If
'End If
End If
@@ -1468,12 +1468,14 @@ Partial Class General_SaldosIniciales
'PrePólizaDetalle
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero) Then ErrorVentas = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then ErrorVentas = True : Exit For
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
+
+ If IVA > 0 Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For
+ End If
'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString, 38, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For
If UsaComplementaria Then
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For
-
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total * TipoCambio.ToDecimal - Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal - Total, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For
End If
'Saldo
@@ -1961,6 +1963,88 @@ Partial Class General_SaldosIniciales
End If
+ Catch ex As Exception
+ ObjConta.RollBack()
+ End Try
+
+ ObjConta.Dispose()
+
+ ElseIf RblFormato.SelectedValue = "11" Then
+
+ Dim ObjConta As New ClsContabilidad()
+ ObjConta.IniciaTransacSQL()
+ Try
+ Dim TieneError As Boolean = False
+ Dim ContadorUpdate As Integer = 0
+ Dim ContadorError As Integer = 0
+ Dim NombreCuenta As String = ""
+ Dim CvePrePoliza As Integer = 0
+ Dim Cuenta As String = ""
+ Dim Reporte As New StringBuilder
+
+ CvePrePoliza = ObjConta.AddPrePolizas("SI", 1, 0, 0, 1, Now.ToDate, "Saldos Iniciales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
+
+ For Each Row As DataRow In dt.Rows
+ NombreCuenta = Row("NombreCuenta").ToString
+ Cuenta = Row("Cuenta").ToString
+
+ Dim Importe As Decimal = If(Row("Cargo").ToString.ToDecimal <> 0, Row("Cargo").ToString.ToDecimal, Row("Abono").ToString.ToDecimal)
+ Dim Concepto As String = Row("Concepto").ToString
+ Dim IdCuenta As Integer = -1
+ Dim CveSubProyecto As Integer = -1
+ Dim TipoMovto As Boolean = If(Row("Cargo").ToString.ToDecimal <> 0, False, True)
+ Dim YaExiste As Boolean = False
+
+ Dim SubP As String = Row("SubProyecto").ToString
+ If SubP <> "" Then
+ CveSubProyecto = GlobalDTSubProyectos(-1, -1, CveEmpresa:=UsuarioActual.CveEmpresa, Estatus:=-1).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
+ End If
+
+ If ObjConta.GetCuentas(-1, Cuenta.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then
+ If ObjConta.DtResultados.Rows.Count > 0 Then
+ IdCuenta = ObjConta.DtResultados().FiltroPrimeroValor("CveCuenta").ToEntero
+ 'TipoCuenta = ObjConta.DtResultados().FiltroPrimeroValor("Tipo")
+ Else
+ Reporte.AppendLine($"{Cuenta} - {NombreCuenta} - {Importe} ")
+ TieneError = True
+ YaExiste = True
+ End If
+ Else
+ TieneError = True
+ Exit For
+ End If
+
+
+ 'If TipoCuenta.Contiene("A", "C", "E") Then
+ ' CargoAbono = False
+ 'End If
+
+ If YaExiste = False Then
+ If IdCuenta > 0 Then
+ If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, "", 95, Concepto, Now.toDate, -1, -1, ImporteMX:=Importe, CveSubProyecto:=CveSubProyecto) Then
+ TieneError = True
+ Exit For
+ End If
+ Else
+ IdCuenta = -2
+ End If
+ End If
+
+
+ Next
+
+ If Not TieneError Then
+ ObjConta.Commit()
+ Alert(String.Format("
Prepóliza: {1}", CvePrePoliza, ObjConta.ContaFolio))
+
+ Alert($"Se agregó la póliza {ObjConta.ContaFolio}")
+
+ Else
+ Alert($"No encontraron las siguientes cuentas: {Reporte.ToString} ", TipoMensaje.MsgError)
+ ObjConta.RollBack()
+ End If
+
+
Catch ex As Exception
ObjConta.RollBack()
End Try
@@ -2059,6 +2143,8 @@ Partial Class General_SaldosIniciales
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
ElseIf RblFormato.SelectedValue = "9" Then
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoContabilidad.xlsx"
+ ElseIf RblFormato.SelectedValue = "11" Then
+ Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoPrePoliza.xlsx"
ElseIf RblFormato.SelectedValue = "12" Then
Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoAlmacen.xlsx"
End If
diff --git a/Inventarios/AjustesSeccionAlmacen.aspx b/Inventarios/AjustesSeccionAlmacen.aspx
index f0856d143..054cd4912 100644
--- a/Inventarios/AjustesSeccionAlmacen.aspx
+++ b/Inventarios/AjustesSeccionAlmacen.aspx
@@ -135,7 +135,7 @@
-
+
diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb
index dce146164..3293c0fa6 100644
--- a/Inventarios/AjustesSeccionAlmacen.aspx.vb
+++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb
@@ -177,11 +177,14 @@ Partial Class Inventarios_AjustesSeccionAlmacen
End If
'actualizamos el PS, para que tenga el aplica seccion
- If Lista.ContainsKey(CvePS) Then
- ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
- End If
- If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
- ErrorMovInv = True
+ If CveSeccionAlmacen > 0 Then
+ If Lista.ContainsKey(CvePS) Then
+ ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
+ End If
+ If Not ObjInventario.AddProductosServiciosAlmacenSeccion(CvePS, CveAlmacen, CveSeccionAlmacen) Then
+ ErrorMovInv = True
+ End If
+
End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
@@ -201,7 +204,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=contabilizable, ImporteMX:=importe) Then
ErrorMovInv = True
End If
- If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=contabilizable, ImporteMX:=importe) Then
+ If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, Concepto, 68, Concepto, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=contabilizable, ImporteMX:=importe) Then
ErrorMovInv = True
End If
End If
@@ -388,6 +391,8 @@ Partial Class Inventarios_AjustesSeccionAlmacen
dtSecciones.CaseSensitive = False
Dim resultado As DataTable = Nothing
+ DtExcel = DtExcel.FiltraParametros("Código <> ''")
+
For Each RowExcel As DataRow In DtExcel.Rows
Dim Codigo As String = RowExcel("Código").ToString.Trim()
@@ -395,7 +400,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"Codigo='{Codigo}'")
- If DrPS IsNot Nothing Then
+ If Codigo <> "" AndAlso DrPS IsNot Nothing Then
If Not ErrorMovInv Then
Dim CantidadEntrada As Decimal = RowExcel("Cantidad").ToString().ToDecimal()
@@ -432,6 +437,13 @@ Partial Class Inventarios_AjustesSeccionAlmacen
ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, False)
End If
+ If LoteSalida = "" Then
+ ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(CvePS, UsuarioActual.CveEmpresa, False, False)
+ Else
+ ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(CvePS, UsuarioActual.CveEmpresa, True, True)
+ End If
+
+
'GENERA LA SALIDA DE LOS PRODUCTOS QUE VIENEN EN EL EXCEL
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadSalida, CveUM, CvePS, PUSalida, CveSeccionAlmacen:=CveSeccionAlmacenSalida, Serie:=SerieSalida, Lote:=LoteSalida, FechaCaducidad:=FechaCaducidadSalida, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
@@ -464,6 +476,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen
End If
End If
+ If Lote = "" Then
+ ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(CvePS, UsuarioActual.CveEmpresa, False, False)
+ Else
+ ErrorMovInv = Not ObjPS.UpdateAplicaLoteCaducidadAlmacen(CvePS, UsuarioActual.CveEmpresa, True, True)
+ End If
+
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
ErrorMovInv = True
Exit For
@@ -478,7 +496,10 @@ Partial Class Inventarios_AjustesSeccionAlmacen
End If
If RowExistencia Is Nothing Then
- ExistenciasNoEncontradas.AppendFormat("{0} - S:{1} ", Codigo, Serie)
+ Dim str As String = ""
+ If Serie <> "" Then Serie = String.Format(" - Serie:{0} ")
+ ExistenciasNoEncontradas.AppendFormat("{0} {1} ", Codigo, str)
+
ErrorMovInv = True
End If
diff --git a/Inventarios/EntradasSalidas.aspx b/Inventarios/EntradasSalidas.aspx
index 8a4dca52d..8c24fa9af 100644
--- a/Inventarios/EntradasSalidas.aspx
+++ b/Inventarios/EntradasSalidas.aspx
@@ -1073,13 +1073,13 @@
- Ajuste Inventario Fisico
+ Ajuste Inventario Físico
-
+
@@ -1183,14 +1183,21 @@
-
-
+
+
-
+
-
+
+
+
+
+
+
+
+
@@ -1258,7 +1265,7 @@
Sección almacén
Serie
Lote
-
Caducidad
+
Caducidad
@@ -1277,13 +1284,20 @@
-
+
-
+
-
+
+
+
+
+
+
+
+
@@ -1307,7 +1321,7 @@
-
+
diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index aeb668b7d..0cbaa5b97 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -3818,13 +3818,38 @@ Partial Class Inventarios_EntradasSalidas
#Region "SALIDAS"
Private Sub BtnAgregarSalida_Click(sender As Object, e As EventArgs) Handles BtnAgregarSalida.Click
- If Not DdlPSSalida.SelectedValue.ToEntero > 0 Then
- RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
- Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia)
- Exit Sub
+ Dim ObjProductosServicios As New ClsProductosServicios()
+ Dim ObjInventario As New ClsInventarios
+ Dim CveUM As Integer
+ Dim Mensaje As String = ""
+ Dim FechaCaducidad As Date
+ Dim lote As String
+ If ObjProductosServicios.GetPS(DdlPSSalida.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
+ If ObjProductosServicios.DtResultados.Rows.Count > 0 Then
+ CveUM = ObjProductosServicios.CveUnidadMedida.ToString.ToEntero
+ End If
End If
- AddPSSalida(DdlPSSalida.SelectedValue.ToEntero, TxtCantidadSalidaInv.Text.ToDouble)
+ FechaCaducidad = If(ObjProductosServicios.AplicaCaducidad, TxtCaducidadSalida.Text.ToDate, MinFecha)
+ lote = If(ObjProductosServicios.AplicaLote, TxtLoteSalida.Text.ToString, "-1")
+
+ If ObjInventario.GetExistenciasPS(DdlPSSalida.SelectedValue.ToEntero, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1, Lote:=lote, FechaCaducidad:=FechaCaducidad) >= TxtCantidadSalidaInv.Text.ToDouble Then
+ If Not DdlPSSalida.SelectedValue.ToEntero > 0 Then
+ RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
+ Alert("Es necesario especificar el producto.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ AddPSSalida(DdlPSSalida.SelectedValue.ToEntero, TxtCantidadSalidaInv.Text.ToDouble)
+ Else
+ Mensaje = String.Format("No hay existencias suficientes del producto: {0}", ObjProductosServicios.PS)
+ RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
+ Alert(Mensaje, TipoMensaje.MsgError)
+ End If
+
+ ObjInventario.Dispose()
+ ObjProductosServicios.Dispose()
+
End Sub
Protected Sub AddPSSalida(CvePS As Integer, Cantidad As Double)
@@ -3881,7 +3906,7 @@ Partial Class Inventarios_EntradasSalidas
GvSalidas.Columns(3).Visible = DtTemp.MAX("Serie") <> ""
GvSalidas.Columns(4).Visible = DtTemp.MAX("Lote") <> ""
GvSalidas.Columns(5).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
- GvSalidas.Columns(5).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
+ GvSalidas.Columns(5).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
End If
End Sub
@@ -4013,7 +4038,7 @@ Partial Class Inventarios_EntradasSalidas
GvSalidasCambioVigencia.Columns(3).Visible = DtTemp.MAX("Serie") <> ""
GvSalidasCambioVigencia.Columns(4).Visible = DtTemp.MAX("Lote") <> ""
GvSalidasCambioVigencia.Columns(5).Visible = DtTemp.MAX("FechaCaducidad").ToDate > MinFecha
- GvSalidasCambioVigencia.Columns(5).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
+ GvSalidasCambioVigencia.Columns(5).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
End If
UpGvCambioSalidas.Update()
End Sub
@@ -4406,7 +4431,7 @@ Partial Class Inventarios_EntradasSalidas
'activa caducidad
ThCaducidadEntrada.Visible = AplicaCaducidad
- ThCaducidadEntrada.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
+ ThCaducidadEntrada.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
TrCaducidadEntrada.Visible = AplicaCaducidad
Else
@@ -4440,7 +4465,7 @@ Partial Class Inventarios_EntradasSalidas
'activa caducidad
ThCaducidadSalida.Visible = AplicaCaducidad
- ThCaducidadSalida.InnerText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
+ ThCaducidadSalida.InnerText = UsuarioActual.Empresa.Funcionalidad(147)
TrCaducidadSalida.Visible = AplicaCaducidad
Else
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index a46d77cd0..e11c48081 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -2428,17 +2428,18 @@ Partial Class Inventarios_EntregaAlmacen
CantidadPendiente = Dr("CantidadGV").ToString().ToDecimal - Dr("CantidadTraspaso").ToString().ToDecimal - CantidadEntradaSinCosto
If CantidadPendiente > 0 Then
Dim PU As Decimal = 0
-
+ Dim CveSeccionAlmacen As Integer = If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)
'SI FUE POR SERIE
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
DtDetalleLote = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0} AND FueTraspaso IS NULL", Dr("Consec")))
If DtDetalle.Rows.Count > 0 Then
For Each Dr1 As DataRow In DtDetalle.Rows
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
- PU = DtExistencias.FiltroPrimeroValor("PU", $"CveTipoAlmacenDevolucion <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
+ CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"ISNULL(CveTipoAlmacenDevolucion,0) <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
+ PU = DtExistencias.FiltroPrimeroValor("PU", $"ISNULL(CveTipoAlmacenDevolucion,0) <> 26 AND CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, 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:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, 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
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For
@@ -2447,10 +2448,11 @@ Partial Class Inventarios_EntregaAlmacen
ElseIf DtDetalleLote.Rows.Count > 0 Then
For Each Dr1 As DataRow In DtDetalleLote.Rows
If TipoMovimiento = 2 AndAlso DtExistencias IsNot Nothing Then
+ CveSeccionAlmacen = DtExistencias.FiltroPrimeroValor("CveSeccionAlmacen", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToEntero
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()} AND Serie = '{Dr1("Serie").ToString()}'").ToString().ToDecimal
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, 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:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, 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
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar.")
Exit For
diff --git a/Inventarios/Kardex.aspx b/Inventarios/Kardex.aspx
index 642e7f73d..d08f6290c 100644
--- a/Inventarios/Kardex.aspx
+++ b/Inventarios/Kardex.aspx
@@ -574,7 +574,7 @@
- Imprmir QR
+ Imprimir QR
<%--ADVERTENCIA--%>
-
+
diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb
index 1b87f88b1..fa8443cc1 100644
--- a/Inventarios/RecepcionAlmacen.aspx.vb
+++ b/Inventarios/RecepcionAlmacen.aspx.vb
@@ -977,11 +977,7 @@ Partial Class Inventarios_RecepcionAlmacen
SumarImporteUsados = True
DtRecepcion = ObjInventario.DtResultados.Copy()
If TipoMovimiento <> 3 Then 'sino es devolucion/NC
- If UsuarioActual.CveRol = 1 Then
- CargaAlmacenes(-1, "22", CveTipoCompra)
- Else
- CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
- End If
+ CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
End If
Else
@@ -1009,6 +1005,12 @@ Partial Class Inventarios_RecepcionAlmacen
DivVirtualAdvertencia.Visible = False
End If
+ 'SI LA COMPRA ES DE TIPO "APOYO LOGISTICO" NO DEBE GENERAR VIRTUAL
+ If Not SumarImporteUsados AndAlso CveTipoCompra = 9 Then
+ RealizarMovimientoVirtual = False
+ DivVirtualAdvertencia.Visible = False
+ End If
+
If TipoMovimiento = 2 AndAlso CveAlmacenDevolucionProveedor > 0 Then
RealizarTraspasoAlmacenDevolucion = True
@@ -1142,6 +1144,7 @@ Partial Class Inventarios_RecepcionAlmacen
CargaGVInv()
+ UpAdvertencias.Update()
UpDocumentos.Update()
End Sub
@@ -2796,7 +2799,7 @@ Partial Class Inventarios_RecepcionAlmacen
'VERIFICA SI TIENE ALMACEN VIRTUAL
If CveAlmacenVirtual > 0 Then
- If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa) Then
+ If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=SumarImporteUsados) Then
DtPSVirtual = ObjInventario.DtResultados
End If
@@ -2991,7 +2994,7 @@ Partial Class Inventarios_RecepcionAlmacen
CveMovimientoRef = CveMovimiento
End If
- If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa) Then
+ If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=SumarImporteUsados) Then
DtPSVirtual = ObjInventario.DtResultados
End If
@@ -4687,6 +4690,13 @@ Partial Class Inventarios_RecepcionAlmacen
Return Retorno
End Function
+
+ Public Class MMovimientoAlmacen
+ Public Property CveMovimiento As Integer
+ Public Property Folio As Integer
+
+ End Class
+
'Private Function GuardaDocumentoBitacora(ObjEventoBitacora As ClsOIEventos, CveMovimiento As Integer) As Boolean
' Dim Retorno = True
' Dim Archivo As System.IO.FileInfo = Nothing
@@ -4717,8 +4727,3 @@ Partial Class Inventarios_RecepcionAlmacen
End Class
-Public Class MMovimientoAlmacen
- Public Property CveMovimiento As Integer
- Public Property Folio As Integer
-
-End Class
diff --git a/Inventarios/RecepcionUsados.aspx b/Inventarios/RecepcionUsados.aspx
index 971b5095d..fab7a2104 100644
--- a/Inventarios/RecepcionUsados.aspx
+++ b/Inventarios/RecepcionUsados.aspx
@@ -297,9 +297,9 @@
-
-
- Sucursal:
+ Servicio a Domicilio:
+
+ Sucursal:
diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb
index 2f69a4d04..0b862b866 100644
--- a/Inventarios/RecepcionUsados.aspx.vb
+++ b/Inventarios/RecepcionUsados.aspx.vb
@@ -2047,7 +2047,7 @@ Partial Class Inventarios_RecepcionUsados
Private Sub CargaPendientesRecibir()
Dim ObjVentas As New ClsVentas
- If ObjVentas.GetVentasUsados(-1, DdlSubProyectos.SelectedValue.ToEntero(), TxtFechaPendientes.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then
+ If ObjVentas.GetVentasUsados(-1, DdlSubProyectos.SelectedValue.ToEntero(), TxtFechaPendientes.Text.ToDateTime(), UsuarioActual.CveEmpresa, ServicioDomicilio:=ChkServicioDomicilio.Checked) Then
GVPendientes.DataSource = ObjVentas.DtResultados
End If
ObjVentas.Dispose()
@@ -2227,10 +2227,10 @@ Partial Class Inventarios_RecepcionUsados
Me.ObjRemisionNC.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
Me.ObjRemisionNC.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
- Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago
+ Me.ObjRemisionNC.CveMetodoPago = ObjCliente.CveMetodoPago33
- If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows.Count > 0 Then
- Me.ObjRemisionNC.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago)).Rows(0)("MetodoPago").ToString
+ If GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)).Rows.Count > 0 Then
+ Me.ObjRemisionNC.MetodoPago = GlobalDTMetodosPago.FiltraParametros(String.Format("CveMetodoPago = {0}", ObjCliente.CveMetodoPago33)).Rows(0)("MetodoPago").ToString
Else
Me.ObjRemisionNC.CveMetodoPago = 1
Me.ObjRemisionNC.MetodoPago = "Efectivo"
diff --git a/Inventarios/RepProductosPorCaducar.aspx b/Inventarios/RepProductosPorCaducar.aspx
index 79a13a2c7..ef613f1f8 100644
--- a/Inventarios/RepProductosPorCaducar.aspx
+++ b/Inventarios/RepProductosPorCaducar.aspx
@@ -90,6 +90,10 @@
+
+
+
+
@@ -104,7 +108,7 @@
-
+
diff --git a/Inventarios/RepProductosPorCaducar.aspx.cs b/Inventarios/RepProductosPorCaducar.aspx.cs
index 01361b049..a9afbeb9b 100644
--- a/Inventarios/RepProductosPorCaducar.aspx.cs
+++ b/Inventarios/RepProductosPorCaducar.aspx.cs
@@ -35,10 +35,11 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
private void CargarDatos()
{
- if (!String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147))) { GvDatos.Columns[4].HeaderText = UsuarioActual.Empresa.Funcionalidad(147); }
+ // aqui siempre se visualiza la caducidad, sin importar la condición, porque siempre se valida la caducidad
+ //if (!String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147))) { GvDatos.Columns[4].HeaderText = UsuarioActual.Empresa.Funcionalidad(147); }
ClsInventarios ObjInventarios = new ClsInventarios();
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(),TxtFechaInicio.Text.ToDate(),TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
- DdlClasificacion.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
+ DdlClasificacion.SelectedValue.ToEntero(), -1, UsuarioActual.CveEmpresa))
{
GvDatos.DataSource = ObjInventarios.DtResultados;
DTDatos = ObjInventarios.DtResultados;
@@ -61,6 +62,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month,1);
TxtFechaInicio.Text = date.ToString("dd/MM/yyyy");
TxtFechaFin.Text = date.AddMonths(3).AddDays(-1).ToString("dd/MM/yyyy");
+ DdlPS.setEsWebService(true);
}
private void CargarProveedores()
@@ -137,7 +139,7 @@ public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
{
@params.Add(new ReportParameter("LogoPath", ""));
}
- @params.Add(new ReportParameter("FechaCaducidadHeader", (!String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) ? UsuarioActual.Empresa.Funcionalidad(147) : "Fecha Caducidad")));
+ @params.Add(new ReportParameter("FechaCaducidadHeader", "Fecha Caducidad")); // (!String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) ? UsuarioActual.Empresa.Funcionalidad(147) : "Fecha Caducidad")));
ImprimirPDF("Empresas/Grales/Formatos/RepProductosCaducidad.rdlc", DTDatos, @params, "Reporte de Productos por Caducar", formato);
}
diff --git a/Inventarios/TrasladoSolicitud.aspx b/Inventarios/TrasladoSolicitud.aspx
index ea4114667..d3b5085d7 100644
--- a/Inventarios/TrasladoSolicitud.aspx
+++ b/Inventarios/TrasladoSolicitud.aspx
@@ -311,7 +311,9 @@
<%----%>
-
+
+
+
@@ -433,7 +435,7 @@
-
@@ -426,10 +426,11 @@
-
+
-
+
@@ -443,7 +444,7 @@
-
+
@@ -476,7 +477,7 @@
-
+
diff --git a/Ventas/RepVentasUtilidadDetalle.aspx.vb b/Ventas/RepVentasUtilidadDetalle.aspx.vb
index 3b8c091f6..0b72e1c81 100644
--- a/Ventas/RepVentasUtilidadDetalle.aspx.vb
+++ b/Ventas/RepVentasUtilidadDetalle.aspx.vb
@@ -109,7 +109,7 @@ Partial Class Ventas_RepVentasUtilidadDetalle
ImgCosto.Visible = True
Else
UPFiltros.Visible = False
- GvDatos.CssClass = "gvFull"
+ GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvFull"
End If
End If
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 94e2c239f..4ff849a57 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -2089,7 +2089,7 @@ Partial Class Ventas
TrSinExistencia.Visible = UsuarioActual.TienePermisoProceso(276)
- If UsuarioActual.CveEmpresa.Contiene(119, 1) Then
+ If UsuarioActual.Empresa.Funcionalidad(595) = "1" Then
ImgDescPU.Visible = False
ImgDescConcepto.Visible = False
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA"))
@@ -4387,7 +4387,7 @@ Partial Class Ventas
HdnIVAOriginal.Value = TxtIVA.Text
TxtPedidoContrato.Text = DbRowVenta("PedidoContrato").ToString()
TxtPedidoContrato.Enabled = False
- TxtKilometraje.Text = DbRowVenta("Kilometraje").ToString()
+ TxtKilometraje.Text = DbRowVenta("Kilometraje").ToString().PadLeft(6, "0"c)
HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString()
HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2)
@@ -5241,16 +5241,26 @@ Partial Class Ventas
Else
Dim DTAlmacen As DataTable
ddlAlmacen.Items.Clear()
+
DTAlmacen = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}")
ddlAlmacen.DataSource = DTAlmacen
- If DTAlmacen Is Nothing Or DTAlmacen.Rows.Count = 0 Then
- ddlAlmacen.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
- ddlAlmacen.SelectedValue = "-1"
- End If
+
+ ddlAlmacen.Items.Insert(0, New ListItem("Seleccione ", "-1"))
+ ddlAlmacen.SelectedValueExist("-1")
+
ddlAlmacen.DataBind()
+
If GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltraParametros($"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}").Rows.Count > 0 Then
- ddlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
+ 'SI ES DEL MISMO SUB PROYECTO SUGIERE EL ALMACEN ASIGNADO AL USUARIO
+ If UsuarioActual.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero() Then
+ ddlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
+ Else
+ Dim CveAlmacen As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto = {DdlSubProyectoDatos.SelectedValue.ToEntero()}").ToEntero()
+ ddlAlmacen.SelectedValueExist(CveAlmacen)
+ End If
+
End If
+
End If
'SI TIENE CONTRATO NO SE MUEVE
@@ -5351,8 +5361,11 @@ Partial Class Ventas
If EstatusCliente = False And Not DdlTipoComprobante.SelectedValue.Contiene("Cot", "DPe") And (CveVenta <= 0 Or EsCreaApartirDe) Then
Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia)
+ BtnEmitirImprimir.Visible = EstatusCliente
+ TrVistaPrevia.Visible = EstatusCliente
End If
+
'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE
If UsuarioActual.CveEmpresa = 72 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
ChkEnviarFactura.Checked = False
@@ -5935,7 +5948,8 @@ Partial Class Ventas
RBLPago.SelectedValue = "2"
RBLPago.Items(0).Enabled = False
RBLPago_SelectedIndexChanged(Nothing, Nothing)
- If UsuarioActual.CveEmpresa.Contiene(119) AndAlso Not UsuarioActual.TienePermisoProceso(268) Then
+ 'GENERAR UNA AUTORIZACIÓN SI EL CLIENTE NO PERMITE CREDITO
+ If UsuarioActual.Empresa.Funcionalidad(595) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) Then
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
DdlTipoComprobante.SelectedValue = "PA"
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
@@ -5948,7 +5962,8 @@ Partial Class Ventas
LnkCotizaciones.Visible = False
End If
UPCondicionesPago.Update()
- ElseIf UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 146, 158, 140) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then
+ 'CARGAR CREDITO DISPONIBLE AL GENERAR UNA FACTURA
+ ElseIf UsuarioActual.Empresa.Funcionalidad(596) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta < 1 Then
RBLPago.SelectedValue = "1"
RBLPago_SelectedIndexChanged(Nothing, Nothing)
UPCondicionesPago.Update()
@@ -5958,7 +5973,7 @@ Partial Class Ventas
TrCreditoDisponible.Visible = True
LblCreditoDisponible.Text = CreditoDispo.FormatoNumero
If PorcentajeCredito > 80 Then TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%"
- If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
+ If UsuarioActual.Empresa.Funcionalidad(597) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "PA") Then
'If LblRFC.Text.Trim <> "XAXX010101000" Then
@@ -6010,19 +6025,23 @@ Partial Class Ventas
End If
Else
+ 'GENERAR AUTORIZACION SI TIENE EXCEDIO EL LIMITE DE CREDITO
+ If UsuarioActual.Empresa.Funcionalidad(595) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") Then
- If UsuarioActual.CveEmpresa = 119 AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "Ant", "PA") Then
- Dim Vta As New ClsVentas
- Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
- Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón:
{0}", Vta.SerieVenta)
- Vta.Dispose()
- If Opcion > 0 Then
- If Opcion = 1 Then
- BtnEmitirImprimir.Visible = False
+ 'VERIFICAR CANDADOS DE VENTA, REMISIONES SIN FACTURAR, FACTURAS QUE NO TENGAN VENCIDAS
+ If UsuarioActual.Empresa.Funcionalidad(597) = "1" Then
+ Dim Vta As New ClsVentas
+ Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
+ Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón:
{0}", Vta.SerieVenta)
+ Vta.Dispose()
+ If Opcion > 0 Then
+ If Opcion = 1 Then
+ BtnEmitirImprimir.Visible = False
+ End If
+ If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
+ Else
+ If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
End If
- If Alertas Then Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
- Else
- If Alertas AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" Then Alert("El cliente tiene su límite de crédito agotado.", TipoMensaje.MsgAdvertencia)
End If
'RBLPago.SelectedValue = "2"
@@ -6049,7 +6068,7 @@ Partial Class Ventas
End If
End If
UPPCreditoDisponible.Update()
- ElseIf UsuarioActual.CveEmpresa.Contiene(119, 1) AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso CveVenta > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Pd2", "Cot") Or (DdlTipoComprobante.SelectedValue = "Rem" And ModalidadEdicion And ViewState("CveClienteAnterior").ToString().ToEntero() > 0 And LblRFC.Text.Trim <> "XAXX010101000")) Then
+ ElseIf UsuarioActual.Empresa.Funcionalidad(597) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(268) AndAlso CveVenta > 0 AndAlso (DdlTipoComprobante.SelectedValue.Contiene("Pd2", "Cot") Or (DdlTipoComprobante.SelectedValue = "Rem" And ModalidadEdicion And ViewState("CveClienteAnterior").ToString().ToEntero() > 0 And LblRFC.Text.Trim <> "XAXX010101000")) Then
Dim CreditoDispo As Decimal = CargaCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero())
If CreditoDispo > 0 Then
Dim Vta As New ClsVentas
@@ -7376,7 +7395,7 @@ Partial Class Ventas
'VALIDA PROMOCIONES Y EXISTENCIAS
Dim ObjVentas As New ClsVentas
- If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
+ If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then
DtPromociones = ObjVentas.DtResultados
End If
ObjVentas.Dispose()
@@ -8440,7 +8459,7 @@ Partial Class Ventas
ObjFacturaDevolucion.TipoDocto = "Egs"
- If UsuarioActual.CveEmpresa = 140 Then
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjFolios As New ClsGralFolios()
Dim TipoDoctoConsulta As String = If(ObjFacturaDevolucion.TipoDocto = "Ant", "Ing", If(ObjFacturaDevolucion.TipoDocto = "PA", "Rem", ObjFacturaDevolucion.TipoDocto))
@@ -8718,7 +8737,7 @@ Partial Class Ventas
ObjFacturaBonificacion.TipoDocto = "Egs"
- If UsuarioActual.CveEmpresa = 140 Then
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjFolios As New ClsGralFolios()
Dim TipoDoctoConsulta As String = If(ObjFacturaBonificacion.TipoDocto = "Ant", "Ing", If(ObjFacturaBonificacion.TipoDocto = "PA", "Rem", ObjFacturaBonificacion.TipoDocto))
@@ -9147,7 +9166,7 @@ Partial Class Ventas
ObjFactura.Serie = If(VistaPrevia, "VistaPrevia", LblSerie.Text)
- If UsuarioActual.CveEmpresa = 140 Then
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjFolios As New ClsGralFolios()
Dim TipoDoctoConsulta As String = If(ObjFactura.TipoDocto = "Ant", "Ing", If(ObjFactura.TipoDocto = "PA", "Rem", ObjFactura.TipoDocto))
@@ -9808,7 +9827,7 @@ Partial Class Ventas
'ObjFacturaDevolucion.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text)
ObjFacturaDevolucion.TipoDocto = "Egs"
- If UsuarioActual.CveEmpresa = 140 Then
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjFolios As New ClsGralFolios()
Dim TipoDoctoConsulta As String = If(ObjFacturaDevolucion.TipoDocto = "Ant", "Ing", If(ObjFacturaDevolucion.TipoDocto = "PA", "Rem", ObjFacturaDevolucion.TipoDocto))
@@ -11073,17 +11092,26 @@ Partial Class Ventas
End If
- If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then
+ 'If DTRemisiones IsNot Nothing AndAlso DTRemisiones.Rows.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then
- Dim dt As DataTable = DTRemisiones.FiltraParametros("Aplicado = True")
- If dt.Rows.Count > 0 Then
- For Each row As DataRow In dt.Rows
- If Not ObjVentas.UpdateVentaRemision(row("CveVenta").ToString().ToEntero(), ObjFactura.CveVenta) Then
- ErrorList.Add("Ocurrió un error al actualizar la remisión")
- End If
- Next
- End If
+ ' Dim dt As DataTable = DTRemisiones.FiltraParametros("Aplicado = True")
+ ' If dt.Rows.Count > 0 Then
+ ' For Each row As DataRow In dt.Rows
+ ' If Not ObjVentas.UpdateVentaRemision(row("CveVenta").ToString().ToEntero(), ObjFactura.CveVenta) Then
+ ' ErrorList.Add("Ocurrió un error al actualizar la remisión")
+ ' End If
+ ' Next
+ ' End If
+ 'End If
+
+ If RemisionesLista IsNot Nothing AndAlso RemisionesLista.Count > 0 AndAlso ErrorList.Count = 0 AndAlso factura.TipoDocto.Contiene("Ing", "Ant") Then
+ For Each CveRemision As Integer In RemisionesLista
+ If Not ObjVentas.UpdateVentaRemision(CveRemision, ObjFactura.CveVenta) Then
+ ErrorList.Add("Ocurrió un error al actualizar la remisión")
+ End If
+ Next
End If
+
End If
If ErrorList.Count = 0 Then
@@ -12840,6 +12868,12 @@ Partial Class Ventas
End If
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero()
+
+ If CveAlmacen <= 0 Then
+ OcurrioError = True
+ ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario. No ha seleccionado ningun almacen o no tiene permiso para el almacen de esta sucursal.")
+ End If
+
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, factura.CveMoneda, factura.Fecha, -1, factura.CveUsuario, factura.CveEmpresa, -1, factura.CveVenta, -1, -1, Modulo:="Vta/E1")
If CveMovimientoInventario <= 0 Then
@@ -15899,7 +15933,7 @@ Partial Class Ventas
GvPS.DataBind()
UpPS.Update()
End Sub
- Private Sub CargaFolios()
+ Private Sub CargaFolios(Optional FacturarDocumentoNuevo As Boolean = False)
If ExFolioFactura Then
Exit Sub
End If
@@ -15921,15 +15955,19 @@ Partial Class Ventas
'ViewState("NumAprobacion") = CLng(DT.Rows(0)("Aprobacion").ToString())
'ViewState("FechaAprobacion") = DT.Rows(0)("FechaAprobacion").ToString().ToDate
ViewState("FolioActual") = DT.Rows(0)("FActual").ToString()
- If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveVenta > 0 AndAlso Not EsCreaApartirDe AndAlso Not String.IsNullOrEmpty(SerieVenta) Then
LblSerie.Text = SerieVenta
Else
LblSerie.Text = DT.Rows(0)("Serie").ToString()
End If
TxtFolio.Text = DT.Rows(0)("FActual").ToString()
- BtnCrearApartirDe.Enabled = True
- BtnEmitirImprimir.Visible = True
- TrVistaPrevia.Visible = True
+
+ If Not FacturarDocumentoNuevo Then
+ BtnCrearApartirDe.Enabled = EstatusCliente
+ BtnEmitirImprimir.Visible = EstatusCliente
+ TrVistaPrevia.Visible = EstatusCliente
+ End If
+
UpFacturar.Update()
Else
@@ -16092,7 +16130,7 @@ Partial Class Ventas
'VALIDA PROMOCIONES
Dim ObjVentas As New ClsVentas
- If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
+ If ObjVentas.GetPromocionesPS(-1, TxtFecha.Text.ToDateTime, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveCliente, DdlVendedor.SelectedValue.ToEntero(), 1, UsuarioActual.CveEmpresa) Then
DtPromociones = ObjVentas.DtResultados
End If
ObjVentas.Dispose()
@@ -22806,11 +22844,6 @@ Partial Class Ventas
Return False
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
@@ -22823,11 +22856,6 @@ Partial Class Ventas
Return False
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
@@ -22894,7 +22922,7 @@ Partial Class Ventas
dtvirtual = ObjInventario.DtResultados
If dtvirtual.Rows.Count > 0 Then
- CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral)
+ CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, -1, -1, Observaciones:="", Modulo:="VV2", CveMovimientoRelacionado:=CveMovimientoSalidaGeneral)
'FolioVirtualSalida = ObjInventario.Folio
For Each RowVirtual As DataRow In dtvirtual.Rows
@@ -22907,10 +22935,14 @@ Partial Class Ventas
Return False
End If
Next
+ Else
+ Return False
End If
Else
Return False
End If
+ Else
+ Return False
End If
End If
@@ -24310,7 +24342,7 @@ Partial Class Ventas
Private Sub CargaCxC()
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString().ToEntero(), "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero()) Then
- Dim DtTemporal As DataTable = ObjMovtos.DtResultados.FiltraParametros("TipoDocto <> 'RNC' AND Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento")
+ Dim DtTemporal As DataTable = ObjMovtos.DtResultados.FiltraParametros("TipoDocto NOT IN ('RNC','Rem') AND Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento")
GvCxC.DataSource = DtTemporal
End If
ObjMovtos.Dispose()
@@ -28214,7 +28246,7 @@ Partial Class Ventas
End If
End If
- If FolioFijo = 0 Then CargaFolios() 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO
+ If FolioFijo = 0 Then CargaFolios(FacturarDocumentoNuevo:=True) 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO
EmitirImprimir(TipoDoctoViejo) 'MANDA A EMITIR - PROCESO VIEJO
End If
@@ -28275,7 +28307,7 @@ Partial Class Ventas
Private Sub CalculaUsados(Optional DtUsadosDevolucion As DataTable = Nothing)
- If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev") Then
+ If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Dev", "PA") Then
If ViewState("CargoUsado").ToString() = "False" Then
Exit Sub
End If
diff --git a/WebBase.config b/WebBase.config
index 544610b9d..a5bcb93b5 100644
--- a/WebBase.config
+++ b/WebBase.config
@@ -1,4 +1,4 @@
-
+
-
+
-
-
+
+
-
+
-
+
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
-
+
@@ -66,170 +68,193 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
@@ -267,34 +294,39 @@
-->
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
+
-
+
-
-
+
+
-
+
@@ -345,32 +377,25 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+