/** Reallocate fixed costs using server dist service (per-day calendar). */ require('dotenv').config(); const { reallocateAllFixedCosts } = require('../dist/services/costAllocationService'); const cycle = process.argv.find((a) => a.startsWith('--cycle='))?.slice(8) || '202607'; const branch = process.argv.find((a) => a.startsWith('--branch='))?.slice(9) || null; reallocateAllFixedCosts({ cycleCode: cycle, branchCode: branch }) .then((data) => { console.log(JSON.stringify(data, null, 2)); process.exit(0); }) .catch((error) => { console.error(error); process.exit(1); });