feat: moneda y tipo de cambio del documento (debajo del Nº de referencia) y ajustes de moneda local de la empresa

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-19 14:40:14 -05:00
1 parent a74c19a139
commit b85383dda1
11 files changed
+229 -9

No files matched your search

+3 -3
View File
@@ -9,15 +9,15 @@ describe('CompanyService', () => {
};
it('entrega solo el redondeo y el separador, sin el resto de la información de la empresa', async () => {
const { service, request } = make({ RoundingMethod: 'tYES', AccountSegmentsSeparator: '.', DefaultBankAccount: '192-1153365-0-50' });
const { service, request } = make({ RoundingMethod: 'tYES', AccountSegmentsSeparator: '.', LocalCurrency: 'SOL', DefaultBankAccount: '192-1153365-0-50' });
const settings = await service.settings();
expect(settings).toEqual({ roundingEnabled: true, accountSegmentsSeparator: '.' });
expect(settings).toEqual({ roundingEnabled: true, accountSegmentsSeparator: '.', localCurrency: 'SOL' });
expect(request).toHaveBeenCalledWith({ method: 'POST', path: 'CompanyService_GetAdminInfo', body: {} });
});
it('sin redondeo ni separador usa los valores por defecto', async () => {
const { service } = make({ RoundingMethod: 'tNO', AccountSegmentsSeparator: null });
expect(await service.settings()).toEqual({ roundingEnabled: false, accountSegmentsSeparator: '-' });
expect(await service.settings()).toEqual({ roundingEnabled: false, accountSegmentsSeparator: '-', localCurrency: '' });
});
it('recuerda la respuesta un rato y luego la vuelve a pedir', async () => {