WIP: allocate landed cost.

This commit is contained in:
a.bouhuolia
2021-07-24 03:46:25 +02:00
parent ca48dac75d
commit 504b380da6
5 changed files with 69 additions and 19 deletions

View File

@@ -446,7 +446,9 @@ export default class BillsController extends BaseController {
],
});
}
if (error.errorType === 'LOCATED_COST_ENTRIES_SHOULD_BIGGE_THAN_NEW_ENTRIES') {
if (
error.errorType === 'LOCATED_COST_ENTRIES_SHOULD_BIGGE_THAN_NEW_ENTRIES'
) {
return res.status(400).send({
errors: [
{
@@ -456,6 +458,18 @@ export default class BillsController extends BaseController {
],
});
}
if (error.errorType === 'LANDED_COST_ENTRIES_SHOULD_BE_INVENTORY_ITEMS') {
return res.status(400).send({
errors: [
{
type: 'LANDED_COST_ENTRIES_SHOULD_BE_INVENTORY_ITEMS',
message:
'Landed cost entries should be only with inventory items.',
code: 1600,
},
],
});
}
}
next(error);
}