public static OutputInvoiceLineListViewModel Get(OutputInvoiceLineList sourceList)
        {
            OutputInvoiceLineListViewModel list = new OutputInvoiceLineListViewModel();

            foreach (OutputInvoiceLineInfo item in sourceList)
            {
                list.Add(OutputInvoiceLineViewModel.New(item));
            }

            return(list);
        }
Esempio n. 2
0
        public static OutputInvoiceViewModel Get(long oid, bool childs = false)
        {
            OutputInvoiceViewModel obj     = new OutputInvoiceViewModel();
            OutputInvoiceInfo      invoice = OutputInvoiceInfo.Get(oid, childs);

            if (invoice == null)
            {
                return(null);
            }

            obj.CopyFrom(invoice);

            if (childs)
            {
                obj.Lines = OutputInvoiceLineListViewModel.Get(invoice.ConceptoFacturas);
            }

            return(obj);
        }