2940-invoiceInTax-section #680

Merged
joan merged 36 commits from 2940-invoiceInTax-section into dev 2021-08-13 06:11:07 +00:00
2 changed files with 10 additions and 10 deletions
Showing only changes of commit 3424fabd5b - Show all commits

View File

@ -4,3 +4,5 @@ UPDATE `salix`.`ACL` tdms SET tdms.accessType = '*'
WHERE tdms.id = 165; WHERE tdms.id = 165;
INSERT INTO salix.ACL (model, principalId, property, accessType) INSERT INTO salix.ACL (model, principalId, property, accessType)
VALUES ('InvoiceInTax','administrative', '*', '*'); VALUES ('InvoiceInTax','administrative', '*', '*');
INSERT INTO salix.ACL (model, principalId, property, accessType)
VALUES ('InvoiceInLog','administrative', '*', 'READ');

View File

@ -22,20 +22,18 @@ describe('InvoiceIn', () => {
controller.invoiceIn = {id: 1}; controller.invoiceIn = {id: 1};
})); }));
describe('setTaxRate() setter', () => { describe('taxRate()', () => {
it('should set tax rate with the Sage tax type value', () => { it('should set tax rate with the Sage tax type value', () => {
const taxTypeSage = { const taxRateSelection = {
rate: 21 rate: 21
}; };
$scope.taxTypeSage = {}; const invoiceInTax = {
$scope.taxTypeSage.selection = taxTypeSage; taxableBase: 200
};
$scope.taxableBase = {}; const taxRate = controller.taxRate(invoiceInTax, taxRateSelection);
$scope.taxableBase.value = 200;
controller.taxRateSelection = 0; expect(taxRate).toEqual(42);
expect(controller.taxRate).toEqual(42);
}); });
}); });