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/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/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/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 @@
-