fix(Journals): sync posting datetime with jorunal entries.

This commit is contained in:
a.bouhuolia
2021-03-29 10:50:44 +02:00
parent 40b2ba099e
commit 9a204282a2
38 changed files with 477 additions and 302 deletions

View File

@@ -42,6 +42,7 @@ export default class InventoryTransaction extends TenantModel {
*/
static get relationMappings() {
const Item = require('models/Item');
const ItemEntry = require('models/ItemEntry');
return {
item: {
@@ -52,6 +53,14 @@ export default class InventoryTransaction extends TenantModel {
to: 'items.id',
},
},
itemEntry: {
relation: Model.BelongsToOneRelation,
modelClass: ItemEntry.default,
join: {
from: 'inventory_transactions.entryId',
to: 'items_entries.id',
},
}
};
}
}