Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.3 kB
0
Indexable
Never
import * as fs from 'fs';
import { generateCsvReport } from "./generate-monthly-fa-firm-report/generateCsvReport";
import { FirmReportData } from "./generate-monthly-fa-firm-report/types";
import { DateTime } from "luxon";
import * as Money from "@lambdas/shared/money";

const firmReportData: FirmReportData = {
    date: DateTime.now(),
    currency: "SGD",
    faFirmId: 110,
    faFirmName: "Name",
    faFirmCreatedDate: "date",
    faReps: [],
    totalMonthlyData: {
        numberOfCustomers: 60,
        numberOfLeads: 80,
        numberOfLeadsViaInvite: 90,
        numberOfLeadsViaAssignment: 90,
        aum: Money.SGD.amount(10),
        personalInvest: Money.SGD.amount(10),
        totalAum: Money.SGD.amount(10)
    },
    totalAllTimeData: {
        numberOfCustomers: 50,
        numberOfLeads: 30,
        numberOfLeadsViaInvite: 60,
        numberOfLeadsViaAssignment: 20,
        aum: Money.SGD.amount(10),
        totalAum: Money.SGD.amount(10),
        personalInvest: Money.SGD.amount(20)
    },
    unassignedLeadsInfo: {
        allTimeAum: Money.SGD.amount(10),
        monthlyAum: Money.SGD.amount(10),
        allTimeAmount: 10,
        monthlyAmount: 30
    }
}
const a = generateCsvReport(firmReportData)
console.log(a)
fs.writeFileSync('./output.csv', a)