public static InputInvoiceLineListViewModel Get(InputInvoiceLineList sourceList)
        {
            InputInvoiceLineListViewModel list = new InputInvoiceLineListViewModel();

            foreach (InputInvoiceLineInfo item in sourceList)
            {
                list.Add(InputInvoiceLineViewModel.New(item));
            }

            return(list);
        }
Exemplo n.º 2
0
        protected virtual void LoadCostes(long oidExpediente)
        {
            if (_facturas_costes_list != null)
            {
                return;
            }

            try
            {
                PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);

                _facturas_costes_list    = InputInvoiceList.GetCostesByExpedienteList(oidExpediente, false);
                Datos_FCostes.DataSource = _facturas_costes_list;
                PgMng.Grow();

                PendienteFacturasCostes_NTB.Text  = _facturas_costes_list.TotalPendiente().ToString("N2");
                TotalFacturasCostes_NTB.Text      = _facturas_costes_list.Total().ToString("N2");
                ExpedienteFacturasCostes_NTB.Text = _facturas_costes_list.TotalExpediente().ToString("N2");
                ImpuestosFacturasCostes_NTB.Text  = _facturas_costes_list.TotalImpuestos().ToString("N2");

                _conceptos_costes_list            = InputInvoiceLineList.GetCostesByExpedienteList(oidExpediente, false, true);
                Datos_CCostes.DataSource          = _conceptos_costes_list;
                TotalConceptosCostes_NTB.Text     = _conceptos_costes_list.Total().ToString("N2");
                ImpuestosConceptosCostes_NTB.Text = _conceptos_costes_list.TotalImpuestos().ToString("N2");

                BeCostes_NTB.Text = TotalConceptosCostes_NTB.DecimalValue.ToString("C2");

                CalculateBeneficios();

                PgMng.Grow();
            }
            finally
            {
                PgMng.FillUp();
            }
        }