fix: Graph fetch relations with sales & purchases models.

feat: Inventory tracker algorithm lots with FIFO or LIFO cost method.
This commit is contained in:
Ahmed Bouhuolia
2020-08-11 01:00:33 +02:00
parent 8d4b3f1ab3
commit 42569c89e4
25 changed files with 526 additions and 93 deletions

View File

@@ -96,7 +96,7 @@ export default class BillPaymentsService {
* @param {IBillPayment} oldBillPayment
*/
static async editBillPayment(billPaymentId, billPayment, oldBillPayment) {
const amount = sumBy(bilPayment.entries, 'payment_amount');
const amount = sumBy(billPayment.entries, 'payment_amount');
const updateBillPayment = await BillPayment.tenant()
.query()
.where('id', billPaymentId)