-- mejoras.

-- es garantia. venta
This commit is contained in:
2022-01-09 21:00:02 -07:00
parent 57cd00696a
commit e69af0addc
4 changed files with 14 additions and 8 deletions

View File

@@ -5733,7 +5733,7 @@ Public Class ClsPaginas
Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object) Protected Overrides Sub SavePageStateToPersistenceMedium(pviewState As Object)
'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente 'If Request.Form("__VIEWSTATE_KEY") IsNot Nothing Then Cache.Remove(Request.Form("__VIEWSTATE_KEY")) 'elimino la cachado anteriormente
Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks) Dim VSKey As String = String.Format("VIEWSTATE_{0}_{1}_{2}", Session.SessionID, Request.Path, Date.Now.Ticks)
Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(30), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache Cache.Add(VSKey, pviewState, Nothing, Date.Now.AddMinutes(40), Cache.NoSlidingExpiration, CacheItemPriority.Default, Nothing) 'Store the ViewState on Cache
'Session.Add(VSKey, pviewState) 'Store the ViewState on Cache 'Session.Add(VSKey, pviewState) 'Store the ViewState on Cache
ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey) ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", VSKey)

View File

@@ -361,7 +361,8 @@ 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 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 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 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, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1", Optional DevolucionImportePagado As Decimal = 0) 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, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd") DataAdapter("PA_VentasAdd")
@@ -459,6 +460,7 @@ Public Class ClsVentas
.Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto .Add("@Adjunto", SqlDbType.VarChar).Value = Adjunto
.Add("@DevolucionImportePagado", SqlDbType.Money).Value = DevolucionImportePagado .Add("@DevolucionImportePagado", SqlDbType.Money).Value = DevolucionImportePagado
.Add("@EsGarantia", SqlDbType.Bit).Value = EsGarantia
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
End With End With
@@ -2870,7 +2872,7 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUtilidadGet") DataAdapter("PA_Vta_VentasUtilidadGet")
@@ -2885,6 +2887,7 @@ Public Class ClsVentas
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
End With End With
Try Try
@@ -2899,7 +2902,7 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUtilidadDetalleGet") DataAdapter("PA_Vta_VentasUtilidadDetalleGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -2914,6 +2917,7 @@ Public Class ClsVentas
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
End With End With
Try Try
@@ -2931,7 +2935,7 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepVentasUtilidadGet") DataAdapter("PA_Vta_RepVentasUtilidadGet")
@@ -2947,6 +2951,7 @@ Public Class ClsVentas
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -1488,7 +1488,7 @@ Namespace Modelos
PedidoContrato:=factura.PedidoContrato, ObservacionesAlmacen:=factura.ObservacionesAlmacen, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33, 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, 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)), CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor) Then CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico") ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
@@ -6458,6 +6458,7 @@ Namespace Modelos
End Property End Property
Public Property MotivoDescuento As String = "" Public Property MotivoDescuento As String = ""
Public Property EsGarantia As Boolean
#Region "Totales" #Region "Totales"

View File

@@ -120,7 +120,7 @@ Public Class Timbres
Dim ObjGrales As New ClsGenerales Dim ObjGrales As New ClsGenerales
If ObjGrales.GetGralTimbre(CveTimbre, Obj.TipoDocto, FI, FF, 0, UsuarioActual.CveEmpresa, -1) Then If ObjGrales.GetGralTimbre(CveTimbre, Obj.TipoDocto, FI, FF, -1, UsuarioActual.CveEmpresa, -1) Then
If ObjGrales.DtResultados.Rows.Count = 1 Then If ObjGrales.DtResultados.Rows.Count = 1 Then
Dim DtMovimientos As DataTable = Nothing Dim DtMovimientos As DataTable = Nothing
@@ -263,7 +263,7 @@ Public Class Timbres
.Descripción = tPS, .Descripción = tPS,
.ClaveUnidad = drr("SATClaveUM").ToString, .ClaveUnidad = drr("SATClaveUM").ToString,
.Unidad = drr("UM").ToString, .Unidad = drr("UM").ToString,
.Dimensiones = "", .Dimensiones = drr("Dimensiones").ToString,
.PesoenKg = drr("PesoKg").ToString.ToDecimal, .PesoenKg = drr("PesoKg").ToString.ToDecimal,
.MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", ""), .MaterialPeligroso = If(drr("ClaveMaterialPeligroso").ToString <> "", "Sí", ""),
.ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString, .ClaveMaterialPeligroso = drr("ClaveMaterialPeligroso").ToString,