mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: validate the matched linked transacation on deleting.
This commit is contained in:
@@ -21,6 +21,7 @@ export class GetMatchedTransactionsByInvoices extends GetMatchedTransactionsByTy
|
||||
* Retrieves the matched transactions.
|
||||
* @param {number} tenantId -
|
||||
* @param {GetMatchedTransactionsFilter} filter -
|
||||
* @returns {Promise<MatchedTransactionsPOJO>}
|
||||
*/
|
||||
public async getMatchedTransactions(
|
||||
tenantId: number,
|
||||
@@ -38,10 +39,10 @@ export class GetMatchedTransactionsByInvoices extends GetMatchedTransactionsByTy
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Retrieves the matched transaction.
|
||||
* @param {number} tenantId
|
||||
* @param {number} transactionId
|
||||
* @returns
|
||||
* @returns {Promise<MatchedTransactionPOJO>}
|
||||
*/
|
||||
public async getMatchedTransaction(
|
||||
tenantId: number,
|
||||
@@ -49,8 +50,6 @@ export class GetMatchedTransactionsByInvoices extends GetMatchedTransactionsByTy
|
||||
): Promise<MatchedTransactionPOJO> {
|
||||
const { SaleInvoice } = this.tenancy.models(tenantId);
|
||||
|
||||
console.log(transactionId);
|
||||
|
||||
const invoice = await SaleInvoice.query().findById(transactionId);
|
||||
|
||||
return this.transformer.transform(
|
||||
|
||||
Reference in New Issue
Block a user