mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
refactor: e2e tests for payment received
This commit is contained in:
@@ -8,6 +8,10 @@ export class GetPaymentReceivedInvoices {
|
||||
constructor(
|
||||
@Inject(PaymentReceived.name)
|
||||
private paymentReceiveModel: typeof PaymentReceived,
|
||||
|
||||
@Inject(SaleInvoice.name)
|
||||
private saleInvoiceModel: typeof SaleInvoice,
|
||||
|
||||
private validators: PaymentReceivedValidators,
|
||||
) {}
|
||||
|
||||
@@ -28,10 +32,10 @@ export class GetPaymentReceivedInvoices {
|
||||
const paymentReceiveInvoicesIds = paymentReceive.entries.map(
|
||||
(entry) => entry.invoiceId,
|
||||
);
|
||||
const saleInvoices = await SaleInvoice.query().whereIn(
|
||||
'id',
|
||||
paymentReceiveInvoicesIds,
|
||||
);
|
||||
const saleInvoices = await this.saleInvoiceModel
|
||||
.query()
|
||||
.whereIn('id', paymentReceiveInvoicesIds);
|
||||
|
||||
return saleInvoices;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user