- feat: Sales estimates APIs.

- feat: Sales invoices APIs.
- feat: Sales receipts APIs.
- WIP: Sales payment receipts.
- WIP: Purchases bills.
- WIP: Purchases payments made.
This commit is contained in:
Ahmed Bouhuolia
2020-07-22 02:03:12 +02:00
parent 9d9c7c1568
commit 56278a25f0
83 changed files with 5330 additions and 76 deletions

View File

@@ -0,0 +1,30 @@
import { omit } from "lodash";
import { BillPayment } from '@/models';
export default class BillPaymentsService {
static async createBillPayment(billPayment) {
const storedBillPayment = await BillPayment.tenant().query().insert({
...omit(billPayment, ['entries']),
});
}
editBillPayment(billPaymentId, billPayment) {
}
static async isBillPaymentExists(billPaymentId) {
const foundBillPayments = await BillPayment.tenant().query().where('id', billPaymentId);
return foundBillPayments.lengh > 0;
}
static async isBillPaymentNumberExists(billPaymentNumber) {
const foundPayments = await Bill.tenant().query().where('bill_payment_number', billPaymentNumber);
return foundPayments.length > 0;
}
isBillPaymentsExist(billPaymentIds) {
}
}