feat: Control the payment method from invoice form

This commit is contained in:
Ahmed Bouhuolia
2024-09-22 21:23:02 +02:00
parent 9827a84857
commit eb5fdbf4ee
11 changed files with 295 additions and 20 deletions

View File

@@ -21,7 +21,7 @@ export class GetPaymentServicesSpecificInvoice {
const { PaymentIntegration } = this.tenancy.models(tenantId);
const paymentGateways = await PaymentIntegration.query()
.where('enable', true)
.where('active', true)
.orderBy('name', 'ASC');
return this.transform.transform(

View File

@@ -8,4 +8,12 @@ export class GetPaymentServicesSpecificInvoiceTransformer extends Transformer {
public excludeAttributes = (): string[] => {
return ['accountId'];
};
public includeAttributes = (): string[] => {
return ['serviceFormatted'];
};
public serviceFormatted(method) {
return 'Stripe';
}
}