mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
fix: edit payment transaction
This commit is contained in:
@@ -28,7 +28,12 @@ export class GetBankRulesTransformer extends Transformer {
|
||||
* @returns {string}
|
||||
*/
|
||||
protected assignCategoryFormatted(bankRule: any) {
|
||||
return getCashflowTransactionFormattedType(bankRule.assignCategory);
|
||||
const translationKey = getCashflowTransactionFormattedType(
|
||||
bankRule.assignCategory,
|
||||
);
|
||||
return translationKey
|
||||
? this.context.i18n.t(translationKey)
|
||||
: bankRule.assignCategory;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@ export class BillPaymentsPages {
|
||||
|
||||
@Inject(BillPayment.name)
|
||||
private readonly billPaymentModel: TenantModelProxy<typeof BillPayment>,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* Retrieve bill payment with associated metadata.
|
||||
@@ -46,7 +46,8 @@ export class BillPaymentsPages {
|
||||
paymentAmount: entry.paymentAmount,
|
||||
}));
|
||||
|
||||
const resPayableBills = await Bill.query()
|
||||
const resPayableBills = await this.billModel()
|
||||
.query()
|
||||
.modify('opened')
|
||||
.modify('dueBills')
|
||||
.where('vendor_id', billPayment.vendorId)
|
||||
|
||||
@@ -18,7 +18,7 @@ export class PaymentsReceivedPagesService {
|
||||
|
||||
@Inject(PaymentReceived.name)
|
||||
private readonly paymentReceived: TenantModelProxy<typeof PaymentReceived>,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
/**
|
||||
* Retrive page invoices entries from the given sale invoices models.
|
||||
@@ -58,11 +58,10 @@ export class PaymentsReceivedPagesService {
|
||||
|
||||
/**
|
||||
* Retrieve the payment receive details of the given id.
|
||||
* @param {number} tenantId - Tenant id.
|
||||
* @param {Integer} paymentReceiveId - Payment receive id.
|
||||
* @param {number} paymentReceiveId - Payment receive id.
|
||||
*/
|
||||
public async getPaymentReceiveEditPage(paymentReceiveId: number): Promise<{
|
||||
paymentReceive: Omit<PaymentReceived, 'entries'>;
|
||||
data: Omit<PaymentReceived, 'entries'>;
|
||||
entries: IPaymentReceivePageEntry[];
|
||||
}> {
|
||||
// Retrieve payment receive.
|
||||
@@ -100,7 +99,7 @@ export class PaymentsReceivedPagesService {
|
||||
const entries = [...paymentEntries, ...restReceivableEntries];
|
||||
|
||||
return {
|
||||
paymentReceive: omit(paymentReceive, ['entries']),
|
||||
data: omit(paymentReceive, ['entries']),
|
||||
entries,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user