diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index e864519ea..6179fc9e4 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 @@ -4753,7 +4755,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 +4765,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..05ee89800 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/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/Ventas/PV.aspx b/Ventas/PV.aspx index d324631b7..b54300575 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -491,6 +491,12 @@ + + Servicio a Domicilio:  + + + +
@@ -827,7 +833,7 @@ - + @@ -2742,6 +2748,7 @@
+ <%----%> @@ -2938,7 +2945,7 @@
- + @@ -2967,7 +2974,7 @@
- + @@ -3001,7 +3008,7 @@
- + diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 5e4698a5b..245f2ca89 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -1123,6 +1123,9 @@ Partial Class PV End If LimpiaEscondeContado() + If UsuarioActual.TienePermisoProceso(316) Then + TrServicioDomicilio.Visible = True + End If 'Carga cliente If Request("CveCliente") IsNot Nothing AndAlso IsNumeric(Request("CveCliente")) AndAlso Request("CveCliente").ToEntero > 0 AndAlso Request("CveFactura") Is Nothing Then @@ -1500,6 +1503,8 @@ Partial Class PV End If + ChkServicioDomicilio.Checked = CBool(DbRowVenta("ServicioDomicilio").ToString()) + If UsuarioActual.CveEmpresa = 48 Then TxtFecha.AutoPostBack = True End If @@ -1620,7 +1625,7 @@ Partial Class PV TxtRetIVA.ReadOnly = False TxtRetISR.ReadOnly = False TxtIEPS.ReadOnly = False - TxtTotal.ReadOnly = False + 'TxtTotal.ReadOnly = False 'Sección Detalle DdlMoneda.Enabled = True @@ -3195,6 +3200,9 @@ Partial Class PV Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("") If RowGarantia IsNot Nothing Then SbAlert.AppendFormat("
", Encripta(String.Format("OP=AJUSTE&CVEGARANTIADETALLE={0}", RowGarantia("CveGarantiaDetalle")))) + + 'AUTO DESCARGAR PDF AJUSTE + RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AJUSTE&CVEGARANTIADETALLE={0}", RowGarantia("CveGarantiaDetalle")))}'", "Imprimir") End If End If End Using @@ -3205,11 +3213,11 @@ Partial Class PV For Each Mensaje In Retorno.Mensajes Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), If(Retorno.TieneError, "", Retorno.LigaPV)) Next - - 'Dim facBytes = DescargarFactura(Retorno.CveVenta, UsuarioActual.CveEmpresa) - 'ImprimirbytesPDF(facBytes, ObjFactura.SerieFolio) - + Else + Alert("No hay partidas agregadas a la factura", TipoMensaje.MsgAdvertencia) End If + Else + Alert("No hay ningun cliente seleccionado", TipoMensaje.MsgAdvertencia) End If End Sub @@ -3474,6 +3482,8 @@ Partial Class PV End If End If + ObjFactura.ServicioDomicilio = ChkServicioDomicilio.Checked + End Sub #End Region @@ -4720,7 +4730,7 @@ Partial Class PV TxtObsPS.Text = GvRow.DataKey("Obs") '.Replace(StrTamanios.ToString(), "") - TxtPrecio.Text = GvRow.DataKey("PU") + TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal().FormatoNumero TxtDescuento.Text = GvRow.DataKey("Descuento") LblTotalPS.Text = GvRow.DataKey("Total") ChkAgregar.Checked = False @@ -6300,7 +6310,7 @@ Partial Class PV TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString DdlTipoComprobanteAjuste.SelectedValueExist(Dr("TipoComprobante").ToString()) TxtComprobante.Text = Dr("Comprobante").ToString - TxtImporteAjuste.Text = Dr("Importe").ToString + TxtImporteAjuste.Text = Dr("Importe").ToString().ToDecimal().FormatoNumero(2) DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString) If TxtDescuento.Text.ToDecimal() > 0 AndAlso Dr("Importe").ToString.ToDecimal() > 0 Then