Invoice for free plans

  • Stephen
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 5 months ago #52336 by Stephen
Invoice for free plans was created by Stephen
Hi
Just tested a free plan and there is no invoice for this (although it would say all 0) with paid plans invoice is correct.
Is there a configuration for this so that an invoice is created even for free plans?

If the problem can be solved why worry? If the problem can not be solved, worrying will do you no good.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
10 years 5 months ago #52384 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Invoice for free plans
Hi Stephen

No, it is not possible. I don't see any reasons why free subscriptions need invoices ? It is illogical .

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • Stephen
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 5 months ago #52414 by Stephen
Replied by Stephen on topic Invoice for free plans
Hi
Yes, sometimes things are not logical, like the IRS here in Sweden, even if things that I´m selling is "free" like discount I´m obliged to let customer have an invoice for these "Free" stuff as well.
But never the less, I can do this in a little different way so it´s not a big deal, just wondering if it was doable.

If the problem can be solved why worry? If the problem can not be solved, worrying will do you no good.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
10 years 5 months ago #52416 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Invoice for free plans
I haven't tried yet but I think you can try this solution :

1. Open the file components/com_osmembership/helper/helper.php

2. Find the function below:
Code:
public static function needToCreateInvoice($row) { if ($row->amount > 0 || $row->gross_amount > 0) { return true; } else { return false; } }

Simply change it to:
Code:
public static function needToCreateInvoice($row) { return true; }

After that, invoice should be generated for free subscriptions as well

Tuan

Please Log in or Create an account to join the conversation.

  • Stephen
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 5 months ago #52427 by Stephen
Replied by Stephen on topic Invoice for free plans
Hi Tuan
Thank you so much, I´ll try this and come back with info.

Regards
Stephen

If the problem can be solved why worry? If the problem can not be solved, worrying will do you no good.

Please Log in or Create an account to join the conversation.

  • Stephen
  • Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
10 years 5 months ago #52447 by Stephen
Replied by Stephen on topic Invoice for free plans
Hi
Just tested this and it seems working well.
Thank you for your help.

If the problem can be solved why worry? If the problem can not be solved, worrying will do you no good.

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
10 years 5 months ago #52461 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Invoice for free plans
OK Stephen. Please continue to setup and use the extension. If you need more help, please don't hesitate to ask !

Regards,

Tuan

Please Log in or Create an account to join the conversation.