3448-worker_calendar-payedHolidays #846

Merged
carlosjr merged 11 commits from 3448-worker_calendar-payedHolidays into dev 2022-01-17 09:09:46 +00:00
10 changed files with 21 additions and 20996 deletions
Showing only changes of commit 941d43b9a2 - Show all commits

View File

@ -1292,11 +1292,11 @@ INSERT INTO `vn`.`supplierAddress`(`id`, `supplierFk`, `nickname`, `street`, `pr
(5, 442, 'GCR building', 'Bristol district', 1, '46000', 'Gotham', '111111111', '222222222'),
(6, 442, 'The Gotham Tonight building', 'Bristol district', 1, '46000', 'Gotham', '111111111', '222222222');
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`,`isFarmer`,`commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`)
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`, `commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`)
VALUES
(1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, 0, CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1),
(2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 1, 0, CURDATE(), 1, 'supplier address 2', 'SILLA', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1),
(442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, 0, CURDATE(), 1, 'supplier address 3', 'SILLA', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'flowerPlants', 1);
(1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1),
(2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 0, CURDATE(), 1, 'supplier address 2', 'SILLA', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1),
(442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, CURDATE(), 1, 'supplier address 3', 'SILLA', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'flowerPlants', 1);
INSERT INTO `vn`.`supplierContact`(`id`, `supplierFk`, `phone`, `mobile`, `email`, `observation`, `name`)
VALUES

View File

@ -91,32 +91,26 @@
}
.icon-calc_volum .path1:before {
content: "\e915";
color: rgb(0, 0, 0);
}
.icon-calc_volum .path2:before {
content: "\e916";
margin-left: -1em;
color: rgb(0, 0, 0);
}
.icon-calc_volum .path3:before {
content: "\e917";
margin-left: -1em;
color: rgb(0, 0, 0);
}
.icon-calc_volum .path4:before {
content: "\e918";
margin-left: -1em;
color: rgb(0, 0, 0);
}
.icon-calc_volum .path5:before {
content: "\e919";
margin-left: -1em;
color: rgb(0, 0, 0);
}
.icon-calc_volum .path6:before {
content: "\e91a";
margin-left: -1em;
color: rgb(255, 255, 255);
}
.icon-deliveryprices:before {
content: "\e91c";
@ -144,7 +138,6 @@
}
.icon-invoice:before {
content: "\e924";
color: #5f5f5f;
}
.icon-supplier:before {
content: "\e925";
@ -160,7 +153,6 @@
}
.icon-shipment-01:before {
content: "\e929";
color: #000;
}
.icon-inventory:before {
content: "\e92b";
@ -398,7 +390,6 @@
}
.icon-bucket:before {
content: "\e97a";
color: #000;
}
.icon-mandatory:before {
content: "\e97b";
@ -411,7 +402,6 @@
}
.icon-invoices:before {
content: "\e97f";
color: #000;
}
.icon-grid:before {
content: "\e980";

View File

@ -51,7 +51,7 @@ h1, h2, h3, h4, h5, h6 {
color: $color-main;
}
.text-secondary {
color: $color-font-secondary;
color: $color-font-light;
}
/* Helpers */

View File

@ -179,7 +179,7 @@
ng-click="$ctrl.selectItem(item.id)">
<vn-td shrink>
<span
ng-click="itemDescriptor.show($event, item.id)"
vn-click-stop="itemDescriptor.show($event, item.id)"
class="link">
{{::item.id}}
</span>

View File

@ -296,7 +296,7 @@
ng-click="$ctrl.selectItem(item.id)">
<vn-td shrink>
<span
ng-click="itemDescriptor.show($event, item.id)"
vn-click-stop="itemDescriptor.show($event, item.id)"
class="link">
{{::item.id}}
</span>

View File

@ -38,7 +38,6 @@ module.exports = Self => {
'payDemFk',
'payDay',
'account',
'isFarmer',
'sageTaxTypeFk',
'sageTransactionTypeFk',
'sageWithholdingFk',
@ -102,6 +101,11 @@ module.exports = Self => {
]
};
let supplier = await Self.app.models.Supplier.findOne(filter);
const farmerCode = 2;
if (supplier.sageWithholdingFk == farmerCode)
supplier.isFarmer = true;
return supplier;
};
};

View File

@ -25,4 +25,12 @@ describe('Supplier getSummary()', () => {
expect(payMethod.name).toEqual('PayMethod one');
});
it(`should get if supplier is farmer by sageWithholdingFk`, async() => {
const supplier = await app.models.Supplier.findById(2);
const supplierSummary = await app.models.Supplier.getSummary(2);
expect(supplier.isFarmer).toBeUndefined();
expect(supplierSummary.isFarmer).toEqual(true);
});
});

View File

@ -27,9 +27,6 @@
"nif": {
"type": "string"
},
"isFarmer": {
"type": "boolean"
},
"phone": {
"type": "number"
},

20974
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,7 +9,7 @@
"url": "https://gitea.verdnatura.es/verdnatura/salix"
},
"engines": {
"node": ">=12"
"node": ">=14"
},
"dependencies": {
"bmp-js": "^0.1.0",