feat: cash-only registers, day book sections and DD amendments
This commit is contained in:
@@ -146,8 +146,7 @@ export function declarationStatement(fy: string, asAt: string = TDS_AS_AT): Decl
|
||||
|
||||
for (const row of declared) {
|
||||
const acceptedOn = row.declarationAcceptedOn as string;
|
||||
const key =
|
||||
cfg.declarationStatementFrequency === 'MONTHLY' ? acceptedOn.slice(0, 7) : `Q${quarterOf(acceptedOn)}`;
|
||||
const key = cfg.declarationStatementFrequency === 'MONTHLY' ? acceptedOn.slice(0, 7) : `Q${quarterOf(acceptedOn)}`;
|
||||
|
||||
if (!row.declarationUin) {
|
||||
missingUinCount++;
|
||||
@@ -182,20 +181,22 @@ export function declarationStatement(fy: string, asAt: string = TDS_AS_AT): Decl
|
||||
|
||||
const periods: DeclarationStatementPeriod[] = [...buckets.entries()]
|
||||
.sort((a, b) => a[0].localeCompare(b[0]))
|
||||
.map(([
|
||||
key,
|
||||
lines
|
||||
]) => {
|
||||
const dueDate = declarationStatementDueDate(lines[0].acceptedOn, year);
|
||||
return {
|
||||
.map(
|
||||
([
|
||||
key,
|
||||
label: cfg.declarationStatementFrequency === 'MONTHLY' ? monthLabel(`${key}-01`) : key,
|
||||
dueDate,
|
||||
overdue: dueDate < asAt,
|
||||
lines,
|
||||
totalPaidWithoutDeduction: lines.reduce((s, l) => s + l.paidWithoutDeduction, 0)
|
||||
};
|
||||
});
|
||||
lines
|
||||
]) => {
|
||||
const dueDate = declarationStatementDueDate(lines[0].acceptedOn, year);
|
||||
return {
|
||||
key,
|
||||
label: cfg.declarationStatementFrequency === 'MONTHLY' ? monthLabel(`${key}-01`) : key,
|
||||
dueDate,
|
||||
overdue: dueDate < asAt,
|
||||
lines,
|
||||
totalPaidWithoutDeduction: lines.reduce((s, l) => s + l.paidWithoutDeduction, 0)
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
fy: year,
|
||||
|
||||
Reference in New Issue
Block a user