2018-05-25 13:49:00 +00:00
|
|
|
export class CashFlowItem {
|
|
|
|
name: string;
|
2020-05-14 05:56:28 +00:00
|
|
|
url: [];
|
2018-05-25 13:49:00 +00:00
|
|
|
amount: number;
|
|
|
|
|
|
|
|
constructor(name: string) {
|
|
|
|
this.name = name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export class CashFlow {
|
|
|
|
startDate: string;
|
|
|
|
finishDate: string;
|
|
|
|
body?: { operating: CashFlowItem[], investing: CashFlowItem[], financing: CashFlowItem[], details: CashFlowItem[] };
|
|
|
|
footer?: CashFlowItem[];
|
|
|
|
|
|
|
|
static Data(value): CashFlowItem[] {
|
|
|
|
const d: CashFlowItem[] = [];
|
|
|
|
if (value.body.operating && value.body.operating.length) {
|
|
|
|
d.push(new CashFlowItem('Cash flows from Operating activities'));
|
|
|
|
d.push(...value.body.operating);
|
|
|
|
}
|
|
|
|
if (value.body.investing && value.body.investing.length) {
|
|
|
|
d.push(new CashFlowItem('Cash flows from Investing activities'));
|
|
|
|
d.push(...value.body.investing);
|
|
|
|
}
|
|
|
|
if (value.body.financing && value.body.financing.length) {
|
|
|
|
d.push(new CashFlowItem('Cash flows from Financing activities'));
|
|
|
|
d.push(...value.body.financing);
|
|
|
|
}
|
|
|
|
if (value.body.details && value.body.details.length) {
|
|
|
|
d.push(...value.body.details);
|
|
|
|
}
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
}
|