/// <summary>
        /// Copia los atributos del objeto
        /// </summary>
        /// <param name="source">Objeto origen</param>
        protected void CopyValues(AlbaranTicketInfo source, ClienteInfo cliente, TicketInfo ticket, OutputDeliveryInfo Albaran)
        {
            if (source == null)
            {
                return;
            }

            Oid = source.Oid;
            _base.Record.OidAlbaran = source.OidAlbaran;
            _base.Record.OidTicket  = source.OidTicket;

            SerieInfo serie = SerieInfo.Get(ticket.OidSerie, false);

            _base.CodigoTicket = ticket.Codigo;
            _total_factura     = ticket.Total;
            _numero_serie      = serie.Identificador;
            _fecha_factura     = ticket.Fecha;
            _prevision         = ticket.Prevision;

            //INNER JOIN
            _codigo_cliente = cliente.Codigo;
            _nombre         = cliente.Nombre;
            _telefonos      = cliente.Telefonos;
            _movil          = cliente.Movil;
            _dias_pago      = Albaran.Fecha.Subtract(ticket.Fecha).Days;
        }
Ejemplo n.º 2
0
        public ReportClass GetTicketReport(TicketInfo item)
        {
            if (item == null)
            {
                return(null);
            }

            List <ConceptoTicketPrint> conceptos = new List <ConceptoTicketPrint>();
            List <TicketPrint>         pList     = new List <TicketPrint>();

            foreach (ConceptoTicketInfo cfi in item.ConceptoTickets)
            {
                conceptos.Add(cfi.GetPrintObject());
            }

            //Si no existen conceptos, no tiene sentido un informe detallado. Además, falla en Crystal Reports
            if (conceptos.Count <= 0)
            {
                return(null);
            }

            pList.Add(TicketPrint.New(item));

            ProductList productos = ProductList.GetList(false);

            ReportClass doc = null;

            try
            {
                doc = GetReportFromName("Ticket", "TicketRpt");
            }
            catch
            {
                doc = new TicketRpt();
            }

            doc.SetDataSource(pList);
            doc.Subreports["ConceptosRpt"].SetDataSource(conceptos);

            Library.Common.CompanyInfo empresa = Library.Common.CompanyInfo.Get(Schema.Oid, false);
            doc.SetParameterValue("nombreEmpresa", empresa.Name);
            doc.SetParameterValue("dirEmpresa", empresa.Direccion);
            doc.SetParameterValue("dir2Empresa", empresa.CodPostal + ". " + empresa.Municipio + ". " + empresa.Provincia);
            doc.SetParameterValue("CIFEmpresa", empresa.VatNumber);
            doc.SetParameterValue("TlfEmpresa", empresa.Telefonos);
            doc.SetParameterValue("FaxEmpresa", empresa.Fax);

            return(doc);
        }
Ejemplo n.º 3
0
        protected void CopyValues(TicketInfo factura, bool get_QRCode)
        {
            if (factura == null)
            {
                return;
            }

            Oid = factura.Oid;
            _base.CopyValues(factura);

            _concepto_tickets = factura.ConceptoTickets;

            if (get_QRCode)
            {
                _qr_code_print.LoadQRCode(_qr_code_print.Encode(QREncodeVersion.v1, ETipoEntidad.Ticket, this), QRCodeVersion.v8);
            }
        }
Ejemplo n.º 4
0
 public static string SELECT(TicketInfo item)
 {
     return(SELECT(new Library.Invoice.QueryConditions {
         Ticket = item
     }));
 }
 public static string SELECT(TicketInfo source)
 {
     return(SELECT(new QueryConditions {
         Ticket = source
     }));
 }