mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
- 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:
30
server/src/services/Purchases/BillPayments.js
Normal file
30
server/src/services/Purchases/BillPayments.js
Normal 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) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user