diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 52fd6dc07..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
diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index fe050542c..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
@@ -3790,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
@@ -3820,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)
@@ -4754,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)
@@ -4764,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/Modelos.vb b/App_Code/Modelos.vb
index d79a5d6b7..d9dd46a07 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -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/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 @@
-