mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: Concurrency control items cost compute.
This commit is contained in:
@@ -32,4 +32,19 @@ export default class ItemEntry extends TenantModel {
|
||||
|
||||
return discount ? total - (total * discount * 0.01) : total;
|
||||
}
|
||||
|
||||
static get relationMappings() {
|
||||
const Item = require('@/models/Item');
|
||||
|
||||
return {
|
||||
item: {
|
||||
relation: Model.BelongsToOneRelation,
|
||||
modelClass: this.relationBindKnex(Item.default),
|
||||
join: {
|
||||
from: 'items_entries.itemId',
|
||||
to: 'items.id',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user