protected override void RefreshMainData()
        {
            Datos.DataSource          = _entity;
            Datos_Concepto.DataSource = _entity.Conceptos;
            PgMng.Grow();

            if (_entity.OidCliente > 0)
            {
                Datos_Cliente.DataSource = ClienteInfo.Get(_entity.OidCliente, false);
            }
            PgMng.Grow();

            if (_entity.OidSerie > 0)
            {
                SerieInfo serie = SerieInfo.Get(_entity.OidSerie, false);
                Serie_TB.Text = serie.Nombre;
                Nota_TB.Text  = serie.Cabecera;
            }
            PgMng.Grow();

            Fecha_DTP.Value = _entity.Fecha;
            PgMng.Grow();

            base.RefreshMainData();
        }
        public override void RefreshSecondaryData()
        {
            if (_entity.OidCliente != 0)
            {
                SetCliente(ClienteInfo.Get(_entity.OidCliente, false));
            }
            PgMng.Grow();

            if (_entity.OidSerie != 0)
            {
                SetSerie(SerieInfo.Get(_entity.OidSerie, false), false);
            }
            PgMng.Grow();

            if (_entity.OidAlmacen != 0)
            {
                SetAlmacen(StoreInfo.Get(_entity.OidAlmacen, false, true));
            }
            PgMng.Grow();

            if (_entity.OidExpediente != 0)
            {
                SetExpediente(ExpedientInfo.Get(_entity.OidExpediente, false, true));
            }
            PgMng.Grow();
        }
        protected override void RefreshMainData()
        {
            Datos.DataSource        = _entity;
            Datos_Lineas.DataSource = _entity.Conceptos;
            PgMng.Grow();

            if (_entity.OidAcreedor > 0)
            {
                Datos_Emisor.DataSource = ProviderBaseInfo.Get(_entity.OidAcreedor, _entity.ETipoAcreedor, true);
            }
            PgMng.Grow();

            if (_entity.OidSerie > 0)
            {
                SerieInfo serie = SerieInfo.Get(_entity.OidSerie, false);
                Serie_TB.Text = serie.Nombre;
            }
            PgMng.Grow();

            DiasPago_NTB.Text       = _entity.DiasPago.ToString();
            Fecha_DTP.Value         = _entity.Fecha;
            FechaRegistro_DTP.Value = _entity.FechaRegistro;
            Prevision_TB.Text       = _entity.Prevision.ToShortDateString();

            base.RefreshMainData();
        }
Beispiel #4
0
        public override void PrintDetailAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            InputInvoiceReportMng reportMng = new InputInvoiceReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

            InputInvoiceInfo item = InputInvoiceInfo.Get(ActiveOID, ActiveItem.ETipoAcreedor, true);

            FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

            ProviderBaseInfo provider = ProviderBaseInfo.Get(ActiveItem.OidAcreedor, ActiveItem.ETipoAcreedor, false);
            SerieInfo        serie    = SerieInfo.Get(ActiveItem.OidSerie, false);

            conf.nota            = (provider.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
            conf.nota           += (conf.nota != string.Empty) ? Environment.NewLine : string.Empty;
            conf.nota           += (ActiveItem.Nota ? serie.Cabecera : "");
            conf.cuenta_bancaria = ActiveItem.CuentaBancaria;
            PgMng.Grow();

            ReportClass report = reportMng.GetDetailReport(item, conf);

            if (SettingsMng.Instance.GetUseDefaultPrinter())
            {
                int n_copias = SettingsMng.Instance.GetDefaultNCopies();
                PrintReport(report, n_copias);
            }
            else
            {
                ShowReport(report);
            }
        }
        public override void RefreshSecondaryData()
        {
            if (_entity.OidSerie != 0)
            {
                SetSerie(SerieInfo.Get(_entity.OidSerie, false), false);
            }
            PgMng.Grow();

            if (_entity.OidAcreedor != 0)
            {
                SetAcreedor(ProviderBaseInfo.Get(_entity.OidAcreedor, _entity.ETipoAcreedor, false));
            }
            PgMng.Grow();

            if (_entity.OidAlmacen != 0)
            {
                SetAlmacen(StoreInfo.Get(_entity.OidAlmacen, false));
            }
            PgMng.Grow();

            if (_entity.OidExpediente != 0)
            {
                SetExpediente(ExpedientInfo.Get(_entity.OidExpediente, false));
            }
            PgMng.Grow();

            if (_acreedor != null)
            {
                ProductList.GetList(_acreedor, _serie, false, true);
            }
        }
Beispiel #6
0
        public override void RefreshSecondaryData()
        {
            if (_entity.OidSerie != 0)
            {
                SetSerie(SerieInfo.Get(_entity.OidSerie, false), false);
            }
            PgMng.Grow();

            if (_entity.OidAcreedor != 0)
            {
                SetProvider(ProviderBaseInfo.Get(_entity.OidAcreedor, _entity.ETipoAcreedor, false));
            }
            PgMng.Grow();

            if (_entity.OidAlmacen != 0)
            {
                SetStore(StoreInfo.Get(_entity.OidAlmacen, false));
            }
            PgMng.Grow();

            if (_entity.OidExpediente != 0)
            {
                SetExpedient(ExpedientInfo.Get(_entity.OidExpediente, false), false);
            }
            PgMng.Grow();

            base.RefreshSecondaryData();
        }
Beispiel #7
0
        protected override void RefreshMainData()
        {
            Datos.DataSource    = _entity;
            Lines_BS.DataSource = _entity.ConceptoFacturas;
            PgMng.Grow();

            if (_entity.OidCliente > 0)
            {
                Client_BS.DataSource = ClienteInfo.Get(_entity.OidCliente, true);
            }
            PgMng.Grow();

            if (_entity.OidSerie > 0)
            {
                _serie        = SerieInfo.Get(_entity.OidSerie, false);
                Serie_TB.Text = _serie.Nombre;
                Nota_TB.Text  = _serie.Cabecera;
            }
            PgMng.Grow();

            if (_entity.OidTransportista > 0)
            {
                _transporter          = TransporterInfo.Get(_entity.OidTransportista, ETipoAcreedor.TransportistaDestino, false);
                Transportista_TB.Text = _transporter.Nombre;
            }
            PgMng.Grow();

            DiasPago_NTB.Text = _entity.DiasPago.ToString();
            Fecha_DTP.Value   = _entity.Fecha;
            Prevision_TB.Text = _entity.Prevision.ToShortDateString();

            base.RefreshMainData();
        }
Beispiel #8
0
 public InputDeliveryAddForm(IAcreedorInfo acreedor, PedidoProveedorInfo pedido, Form parent)
     : this(parent, ETipoAlbaranes.Todos)
 {
     SetProvider(acreedor);
     SetSerie(SerieInfo.Get(pedido.OidSerie, false), true);
     AddPedidoAction(pedido);
 }
        /// <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;
        }
        public override void PrintDetailAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            InputDeliveryReportMng reportMng = new InputDeliveryReportMng(AppContext.ActiveSchema, Text, FilterValues);
            SerieInfo serie = SerieInfo.Get(ActiveItem.OidSerie, false);

            FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

            conf.nota = ActiveItem.Nota ? serie.Cabecera : "";

            /*AlbaranProveedorRpt report = reportMng.GetAlbaranProveedorReport(InputDeliveryInfo.Get(ActiveOID, true), conf);
             *
             * if (report != null)
             * {
             *      ReportViewer.SetReport(report);
             *      ReportViewer.ShowDialog();
             * }
             * else
             * {
             *      MessageBox.Show(moleQule.Face.Resources.Messages.NO_DATA_REPORTS,
             *                                      moleQule.Face.Resources.Labels.ADVISE_TITLE,
             *                                      MessageBoxButtons.OK,
             *                                      MessageBoxIcon.Exclamation);
             * }*/
        }
 public InvoiceAddForm(ClienteInfo client, OutputDeliveryInfo delivery, Form parent)
     : this(parent)
 {
     SetClient(client);
     SetSerie(SerieInfo.Get(delivery.OidSerie, false), true);
     _entity.AlbaranContado = delivery.Contado;
     _entity.Rectificativa  = delivery.Rectificativo;
     _out_delivery          = delivery;
 }
        public override void PrintDetailAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            PgMng.Reset(6, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

            OutputInvoiceReportMng reportMng = new OutputInvoiceReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

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

            PgMng.Grow();

            ClienteInfo client = ClienteInfo.Get(ActiveItem.OidCliente, false);

            PgMng.Grow();

            TransporterInfo transporter = TransporterInfo.Get(ActiveItem.OidTransportista, ETipoAcreedor.TransportistaDestino, false);

            PgMng.Grow();

            FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

            conf.nota            = (client.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
            conf.nota           += (conf.nota != string.Empty) ? Environment.NewLine : string.Empty;
            conf.nota           += (ActiveItem.Nota ? serie.Cabecera : "");
            conf.cuenta_bancaria = ActiveItem.CuentaBancaria;
            PgMng.Grow();

            OutputInvoiceInfo item = OutputInvoiceInfo.Get(ActiveOID, true);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);

            ReportClass report = reportMng.GetDetailReport(item, serie, client, transporter, conf);

            PgMng.FillUp();

            if (report != null)
            {
                if (SettingsMng.Instance.GetUseDefaultPrinter())
                {
                    int n_copias = SettingsMng.Instance.GetDefaultNCopies();
                    PrintReport(report, n_copias);
                }
                else
                {
                    ShowReport(report);
                }

                if (item.EEstado == EEstado.Abierto)
                {
                    ChangeStateAction(EEstadoItem.Emitido);
                }
            }
        }
 public DeliveryAddForm(ClienteInfo cliente, PedidoInfo pedido, Form parent)
     : this(new object[3] {
     null, ETipoEntidad.Cliente, ETipoAlbaranes.Todos
 }, parent)
 {
     SetCliente(cliente);
     SetSerie(SerieInfo.Get(pedido.OidSerie, false), true);
     AddPedidoAction(pedido);
 }
        protected override void GetFormSourceData(object[] parameters)
        {
            if (parameters[0] == null)
            {
                ETipoEntidad holder_type = (ETipoEntidad)parameters[1];

                _entity = OutputDelivery.New(holder_type);
                _entity.BeginEdit();

                switch (holder_type)
                {
                case ETipoEntidad.Cliente:
                {
                    if (parameters.Length >= 3)
                    {
                        _delivery_type = (ETipoAlbaranes)parameters[2];

                        if (_delivery_type == ETipoAlbaranes.Agrupados)
                        {
                            _entity.Contado = true;
                            _entity.GetNewCode(ETipoEntidad.Cliente, ETipoAlbaranes.Agrupados);
                            _entity.EMedioPago = EMedioPago.Efectivo;
                        }
                    }
                }
                break;

                case ETipoEntidad.WorkReport:
                {
                    //Se ha pasado como parametro en el constructor
                    if (parameters.Length >= 3)
                    {
                        _work_report = (WorkReportInfo)parameters[2];
                    }
                    //Venimos de un parte de trabajo y esta en cache
                    else if (Cache.Instance.Contains(typeof(WorkReport)))
                    {
                        _work_report = (Cache.Instance.Get(typeof(WorkReport)) as WorkReport).GetInfo();
                    }

                    _entity.OidHolder  = (_work_report != null) ? _work_report.Oid : 0;
                    _entity.EMedioPago = EMedioPago.Efectivo;
                    SerieInfo serie = SerieInfo.Get(Library.Invoice.ModulePrincipal.GetWorkDeliverySerieSetting(), false);
                    _entity.OidSerie = (serie != null) ? serie.Oid : 0;
                }
                break;
                }
            }
            else
            {
                _entity = (OutputDelivery)parameters[0];
                _entity.BeginEdit();
                SerieInfo serie = SerieInfo.Get(_entity.OidSerie, false);
                _entity.OidSerie = (serie != null) ? serie.Oid : 0;
            }
        }
Beispiel #15
0
        protected override void RefreshMainData()
        {
            if (Library.Invoice.ModulePrincipal.GetDefaultSerieSetting() > 0)
            {
                SetSerie(SerieInfo.Get(Library.Invoice.ModulePrincipal.GetDefaultSerieSetting(), false), true);
            }
            PgMng.Grow();

            base.RefreshMainData();
        }
        protected override void RefreshMainData()
        {
            if (_entity.OidSerie > 0)
            {
                SetSerie(SerieInfo.Get(_entity.OidSerie, false), false);
            }
            PgMng.Grow();

            base.RefreshMainData();
        }
Beispiel #17
0
 public InputInvoiceAddForm(InputDeliveryInfo albaran, IAcreedorInfo emisor, Form parent)
     : base(new object[2] {
     albaran, emisor
 }, parent)
 {
     InitializeComponent();
     SetFormData();
     _mf_type = ManagerFormType.MFAdd;
     SetEmisor(emisor);
     SetSerie(SerieInfo.Get(albaran.OidSerie, false), true);
     _albaran = albaran;
 }
Beispiel #18
0
        protected void CopyValues(CobroFacturaInfo source, ClienteInfo cliente, OutputInvoiceInfo factura)
        {
            if (source == null)
            {
                return;
            }

            CopyValues(source);

            if (factura != null)
            {
                SerieInfo serie = SerieInfo.Get(factura.OidSerie, false);

                _base.CodigoFactura = serie.Identificador + "/" + factura.Codigo;
                _total_factura      = factura.Total;
                _numero_serie       = serie.Identificador;
                _base.FechaFactura  = factura.Fecha;
                _prevision          = factura.Prevision;
                _base.Cliente       = factura.Cliente;

                if (factura.CobroFacturas != null)
                {
                    _cantidad_cobrada = 0;
                    _pendiente        = _total_factura - source.Cantidad;

                    foreach (CobroFacturaInfo item in factura.CobroFacturas)
                    {
                        if (item.Fecha < source.Fecha)
                        {
                            _cantidad_cobrada += item.Cantidad;
                            _pendiente        -= item.Cantidad;
                        }
                    }
                }
                else
                {
                    _cantidad_cobrada = factura.Cobrado;
                    _pendiente        = factura.Pendiente;
                }

                _codigo_cliente = factura.IDCliente;
                _id_cobro_label = _codigo_cliente + "/" + _base.IdCobro.ToString(Resources.Defaults.COBRO_ID_FORMAT);
            }

            if (cliente != null)
            {
                _codigo_cliente = cliente.Codigo;
                _base.Cliente   = cliente.Nombre;
                _id_cobro_label = _codigo_cliente + "/" + _base.IdCobro.ToString(Resources.Defaults.COBRO_ID_FORMAT);
            }
        }
        public override void PrintObject()
        {
            /*InputInvoiceReportMng reportMng = new InputInvoiceReportMng(AppContext.ActiveSchema);
             *
             *          FormatConfFacturaProveedorAlbaranReport conf = new FormatConfFacturaProveedorAlbaranReport();
             * conf.nota = EntityInfo.Nota ? Nota_TB.Text : "";
             * conf.cabecera = Cabecera_CB.SelectedItem == null ? "FACTURA" : Cabecera_CB.SelectedItem.ToString();
             * conf.copia = Copia_CKB.Checked ? "COPIA" : "";
             * conf.cuenta_bancaria = Cuenta_TB.Text;
             * conf.forma_pago = "";
             *
             * ReportViewer.SetReport(reportMng.GetFacturaProveedorReport(EntityInfo, conf));
             * ReportViewer.ShowDialog();
             *
             * ReportClass report = reportMng.GetQRCodeReport(EntityInfo);
             *
             * if (SettingsMng.Instance.GetUseDefaultPrinter())
             * {
             *  int n_copias = SettingsMng.Instance.GetDefaultNCopies();
             *  PrintReport(report, n_copias);
             * }
             * else
             *  ShowReport(report);*/

            InputInvoiceReportMng reportMng = new InputInvoiceReportMng(AppContext.ActiveSchema);

            FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

            ProviderBaseInfo provider = ProviderBaseInfo.Get(EntityInfo.OidAcreedor, EntityInfo.ETipoAcreedor, false);
            SerieInfo        serie    = SerieInfo.Get(EntityInfo.OidSerie, false);

            conf.nota            = (provider.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
            conf.nota           += (conf.nota != string.Empty) ? Environment.NewLine : string.Empty;
            conf.nota           += (EntityInfo.Nota ? serie.Cabecera : "");
            conf.cuenta_bancaria = EntityInfo.CuentaBancaria;
            PgMng.Grow();

            ReportClass report = reportMng.GetDetailReport(EntityInfo, conf);

            if (SettingsMng.Instance.GetUseDefaultPrinter())
            {
                int n_copias = SettingsMng.Instance.GetDefaultNCopies();
                PrintReport(report, n_copias);
            }
            else
            {
                ShowReport(report);
            }
        }
Beispiel #20
0
        protected override void RefreshMainData()
        {
            if (_entity.OidSerie > 0)
            {
                SetSerie(SerieInfo.Get(_entity.OidSerie, false), false);
            }
            PgMng.Grow();

            if (_entity.OidTransportista > 0)
            {
                SetTransportista(TransporterInfo.Get(_entity.OidTransportista, ETipoAcreedor.TransportistaDestino, false));
            }
            PgMng.Grow();

            base.RefreshMainData();
        }
        public override void RefreshSecondaryData()
        {
            if (_entity.OidAcreedor != 0)
            {
                SetEmisor(ProviderBaseInfo.Get(_entity.OidAcreedor, _entity.ETipoAcreedor, false));
            }
            PgMng.Grow();

            if (_entity.OidSerie != 0)
            {
                SetSerie(SerieInfo.Get(_entity.OidSerie, false), false);
            }
            PgMng.Grow();

            base.RefreshSecondaryData();
        }
        public override void ExportPDFAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            try
            {
                PgMng.Reset(9, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

                OutputInvoiceReportMng reportMng = new OutputInvoiceReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

                SerieInfo serie = SerieInfo.Get(ActiveItem.OidSerie, false);
                PgMng.Grow();

                ClienteInfo client = ClienteInfo.Get(ActiveItem.OidCliente, false);
                PgMng.Grow();

                TransporterInfo transporter = TransporterInfo.Get(ActiveItem.OidTransportista, ETipoAcreedor.TransportistaDestino, false);
                PgMng.Grow();

                FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

                conf.nota            = (client.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
                conf.nota           += Environment.NewLine + (ActiveItem.Nota ? serie.Cabecera : "");
                conf.cuenta_bancaria = ActiveItem.CuentaBancaria;
                PgMng.Grow();

                OutputInvoiceInfo item = OutputInvoiceInfo.Get(ActiveOID, true);
                PgMng.Grow();

                ReportClass report = reportMng.GetDetailReport(item, serie, client, transporter, conf);
                PgMng.Grow();

                ExportPDF(report, ActiveItem.FileName);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                PgMng.FillUp();
            }
        }
        public override void RefreshSecondaryData()
        {
            if (_entity.OidSerie != 0)
            {
                SetSerie(SerieInfo.Get(_entity.OidSerie, false), false);
            }
            PgMng.Grow();

            if (_entity.OidAlmacen != 0)
            {
                SetAlmacen(StoreInfo.Get(_entity.OidAlmacen, false));
            }
            PgMng.Grow();

            switch (_entity.EHolderType)
            {
            case ETipoEntidad.WorkReport:
            {
                if (_work_report == null)
                {
                    _work_report = WorkReportInfo.GetByResource(_entity.Oid, ETipoEntidad.OutputDelivery, false);
                }
                SetWorkReport(_work_report);
            }
            break;

            case ETipoEntidad.Cliente:
            {
                if (_entity.OidHolder != 0)
                {
                    SetCliente(ClienteInfo.Get(_entity.OidHolder, false));
                }
                PgMng.Grow();

                if (_entity.OidExpediente != 0)
                {
                    SetExpediente(ExpedientInfo.Get(_entity.OidExpediente, false));
                }
                PgMng.Grow();
            }
            break;
            }

            base.RefreshSecondaryData();
        }
        /// <summary>
        /// Asigna el objeto principal al origen de datos
        /// <returns>void</returns>
        /// </summary>
        protected override void RefreshMainData()
        {
            Datos.DataSource          = _entity;
            Datos_Concepto.DataSource = _entity.ConceptoTickets;
            PgMng.Grow();

            if (_entity.OidSerie > 0)
            {
                SerieInfo serie = SerieInfo.Get(_entity.OidSerie, false);
                Serie_TB.Text = serie.Nombre;
            }
            PgMng.Grow();

            Fecha_DTP.Value   = _entity.Fecha;
            Prevision_TB.Text = _entity.Prevision.ToShortDateString();

            base.RefreshMainData();
        }
        public override void PrintDetailAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            PgMng.Reset(6, 1, Face.Resources.Messages.LOADING_DATA, this);

            OutputDeliveryReportMng reportMng = new OutputDeliveryReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

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

            PgMng.Grow();

            ClienteInfo cliente = ClienteInfo.Get(ActiveItem.OidHolder, false);

            PgMng.Grow();

            FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

            conf.nota            = (cliente.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
            conf.nota           += Environment.NewLine + (ActiveItem.Nota ? serie.Cabecera : "");
            conf.cuenta_bancaria = ActiveItem.CuentaBancaria;
            PgMng.Grow();

            OutputDeliveryInfo item = OutputDeliveryInfo.Get(ActiveOID, ActiveItem.EEntityType, true);

            PgMng.Grow();

            ReportClass report = reportMng.GetDetailReport(item, conf);

            PgMng.FillUp();

            if (SettingsMng.Instance.GetUseDefaultPrinter())
            {
                int n_copias = SettingsMng.Instance.GetDefaultNCopies();
                PrintReport(report, n_copias);
            }
            else
            {
                ShowReport(report);
            }
        }
Beispiel #26
0
        protected virtual void PrintPendienteAction()
        {
            if (Pendientes_DGW.CurrentRow == null)
            {
                return;
            }

            OutputInvoiceInfo in_invoice = Pendientes_DGW.CurrentRow.DataBoundItem as OutputInvoiceInfo;

            PgMng.Reset(6, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

            OutputInvoiceReportMng reportMng = new OutputInvoiceReportMng(AppContext.ActiveSchema, this.Text, string.Empty);

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

            PgMng.Grow();

            ClienteInfo client = ClienteInfo.Get(in_invoice.OidCliente, false);

            PgMng.Grow();

            TransporterInfo transporter = TransporterInfo.Get(in_invoice.OidTransportista, ETipoAcreedor.TransportistaDestino, false);

            PgMng.Grow();

            FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

            conf.nota            = (client.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
            conf.nota           += Environment.NewLine + (in_invoice.Nota ? serie.Cabecera : "");
            conf.cuenta_bancaria = in_invoice.CuentaBancaria;
            PgMng.Grow();

            OutputInvoiceInfo item = OutputInvoiceInfo.Get(in_invoice.Oid, true);

            PgMng.Grow();

            ReportClass report = reportMng.GetDetailReport(item, serie, client, transporter, conf);

            PgMng.FillUp();

            ShowReport(report);
        }
        public override void PrintDetailAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            PgMng.Reset(4, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

            TicketReportMng reportMng = new TicketReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

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

            PgMng.Grow();

            TicketInfo item = TicketInfo.Get(ActiveOID, true);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);

            ReportClass report = reportMng.GetTicketReport(item);

            PgMng.FillUp();

            if (report != null)
            {
                if (SettingsMng.Instance.GetUseDefaultPrinter())
                {
                    string impresora = moleQule.Library.Invoice.ModulePrincipal.GetDefaultTicketPrinter();
                    PrintReport(report, impresora);
                }
                else
                {
                    ShowReport(report);
                }

                if (item.EEstado == EEstado.Abierto)
                {
                    ChangeStateAction(EEstadoItem.Emitido);
                }
            }
        }
        public override void ExportPDFAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            try
            {
                PgMng.Reset(7, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

                OutputDeliveryReportMng reportMng = new OutputDeliveryReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

                SerieInfo serie = SerieInfo.Get(ActiveItem.OidSerie, false);
                PgMng.Grow();

                ClienteInfo cliente = ClienteInfo.Get(ActiveItem.OidHolder, false);
                PgMng.Grow();

                FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

                conf.nota            = (cliente.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
                conf.nota           += Environment.NewLine + (ActiveItem.Nota ? serie.Cabecera : "");
                conf.cuenta_bancaria = ActiveItem.CuentaBancaria;
                PgMng.Grow();

                OutputDeliveryInfo item = OutputDeliveryInfo.Get(ActiveOID, ActiveItem.EHolderType, true);
                PgMng.Grow();

                ReportClass rpt = reportMng.GetDetailReport(item, conf);
                PgMng.Grow();

                ExportPDF(rpt, ActiveItem.FileName);
            }
            finally
            {
                PgMng.FillUp();
            }
        }
        public override void RefreshSecondaryData()
        {
            base.RefreshSecondaryData();

            if (_entity.OidCliente != 0)
            {
                SetClient(ClienteInfo.Get(_entity.OidCliente, false));
            }
            PgMng.Grow();

            if (_entity.OidSerie != 0)
            {
                SetSerie(SerieInfo.Get(_entity.OidSerie, false), false);
            }
            PgMng.Grow();

            if (_entity.OidTransportista > 0)
            {
                SetTransporter(TransporterInfo.Get(_entity.OidTransportista, ETipoAcreedor.TransportistaDestino, false));
            }
            PgMng.Grow();
        }
Beispiel #30
0
 public TicketAddForm(OutputDeliveryInfo delivery, Form parent)
     : this(parent)
 {
     SetSerie(SerieInfo.Get(delivery.OidSerie, false), false);
     _albaran = delivery;
 }