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

@ -3,4 +3,6 @@ DELETE FROM `salix`.`ACL` WHERE id = 188;
UPDATE `salix`.`ACL` tdms SET tdms.accessType = '*'
WHERE tdms.id = 165;
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};
}));
describe('setTaxRate() setter', () => {
describe('taxRate()', () => {
it('should set tax rate with the Sage tax type value', () => {
const taxTypeSage = {
const taxRateSelection = {
rate: 21
};
$scope.taxTypeSage = {};
$scope.taxTypeSage.selection = taxTypeSage;
const invoiceInTax = {
taxableBase: 200
};
$scope.taxableBase = {};
$scope.taxableBase.value = 200;
const taxRate = controller.taxRate(invoiceInTax, taxRateSelection);
controller.taxRateSelection = 0;
expect(controller.taxRate).toEqual(42);
expect(taxRate).toEqual(42);
});
});