feat: cash-only registers, day book sections and DD amendments
This commit is contained in:
@@ -226,7 +226,11 @@ export function uinTaxYearPart(fy: string): string {
|
||||
*/
|
||||
export function buildUin(sequence: number, fy: string, tan: string): string {
|
||||
const digits = `${Math.max(0, Math.floor(sequence))}`.slice(-9).padStart(9, '0');
|
||||
const normalisedTan = (tan || '').toUpperCase().replace(/[^A-Z0-9]/g, '').padEnd(10, 'X').slice(0, 10);
|
||||
const normalisedTan = (tan || '')
|
||||
.toUpperCase()
|
||||
.replace(/[^A-Z0-9]/g, '')
|
||||
.padEnd(10, 'X')
|
||||
.slice(0, 10);
|
||||
return `D${digits}${uinTaxYearPart(fy)}${normalisedTan}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user