fix(biling): Subscription billing system.

fix(GeneralLedger): running balance.
This commit is contained in:
a.bouhuolia
2021-03-13 15:36:03 +02:00
parent 30cd6c8a61
commit dbb4e4de47
12 changed files with 310 additions and 216 deletions

View File

@@ -31,10 +31,8 @@ export default class Subscription<PaymentModel> {
) {
this.validateIfPlanHasPriceNoPayment(plan, paymentModel);
// @todo
if (plan.price > 0) {
await this.paymentContext.makePayment(paymentModel, plan);
}
await this.paymentContext.makePayment(paymentModel, plan);
const subscription = await tenant.$relatedQuery('subscriptions')
.modify('subscriptionBySlug', subscriptionSlug)
.first();