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[] = [];
|
2020-05-30 04:59:23 +00:00
|
|
|
if (value.body.operating?.length) {
|
2018-05-25 13:49:00 +00:00
|
|
|
d.push(new CashFlowItem('Cash flows from Operating activities'));
|
|
|
|
d.push(...value.body.operating);
|
|
|
|
}
|
2020-05-30 04:59:23 +00:00
|
|
|
if (value.body.investing?.length) {
|
2018-05-25 13:49:00 +00:00
|
|
|
d.push(new CashFlowItem('Cash flows from Investing activities'));
|
|
|
|
d.push(...value.body.investing);
|
|
|
|
}
|
2020-05-30 04:59:23 +00:00
|
|
|
if (value.body.financing?.length) {
|
2018-05-25 13:49:00 +00:00
|
|
|
d.push(new CashFlowItem('Cash flows from Financing activities'));
|
|
|
|
d.push(...value.body.financing);
|
|
|
|
}
|
2020-05-30 04:59:23 +00:00
|
|
|
if (value.body.details?.length) {
|
2018-05-25 13:49:00 +00:00
|
|
|
d.push(...value.body.details);
|
|
|
|
}
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
}
|