- Posts: 11
- Thank you received: 0
Invoice generation and Offline payments
- Pascal
- Topic Author
- Offline
- New Member
-
Less
More
11 years 6 months ago #36192
by Pascal
Invoice generation and Offline payments was created by Pascal
Hi,
I am writing about invoice creation.
Normally the invoice is generated even if the user selects the payment method "os_offline". In this case, however, the user still has not paid (and could not pay): in fact the status is "pending".
It's possible to enable the generation of the invoice only when the user is on status "Active" e not status "Pending"?
I saw the file code invoice.php (version 1.6.2), but I do not know if you have to change these codes.
* Run when a membership activated
* @param PlanOsMembership $row
*/
function onMembershipActive($row) {
if (!$row->invoice_number) {
$row->invoice_number = OSMembershipHelper::getInvoiceNumber();
$row->store();
}
return true ;
}
function onAfterStoreSubscription($row) {
if ($row->payment_method == 'os_offline' && !$row->invoice_number) {
$row->invoice_number = OSMembershipHelper::getInvoiceNumber();
$row->store();
}
}
}
Thanks for your attention!
I am writing about invoice creation.
Normally the invoice is generated even if the user selects the payment method "os_offline". In this case, however, the user still has not paid (and could not pay): in fact the status is "pending".
It's possible to enable the generation of the invoice only when the user is on status "Active" e not status "Pending"?
I saw the file code invoice.php (version 1.6.2), but I do not know if you have to change these codes.
* Run when a membership activated
* @param PlanOsMembership $row
*/
function onMembershipActive($row) {
if (!$row->invoice_number) {
$row->invoice_number = OSMembershipHelper::getInvoiceNumber();
$row->store();
}
return true ;
}
function onAfterStoreSubscription($row) {
if ($row->payment_method == 'os_offline' && !$row->invoice_number) {
$row->invoice_number = OSMembershipHelper::getInvoiceNumber();
$row->store();
}
}
}
Thanks for your attention!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 6 months ago #36307
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Invoice generation and Offline payments
You can remove the second function from the above code and it will works well (remove the below code) :
Tuan
Code:
function onAfterStoreSubscription($row) {
if ($row->payment_method == 'os_offline' && !$row->invoice_number) {
$row->invoice_number = OSMembershipHelper::getInvoiceNumber();
$row->store();
}
}
Tuan
Please Log in or Create an account to join the conversation.
- Pascal
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
11 years 6 months ago #36322
by Pascal
Replied by Pascal on topic Re: Invoice generation and Offline payments
Thanks, Tuan, for your answer,
but really I had already deleted exactly those codes. Unfortunately it doesn't work, invoices are always sent after offline payment (and Subscription Pending).
I also cleared the cache of site, extensions and browser, after the changes.
Could you try to solve this issue?
I believe that this issue is important, in an really good extension (one of the best Joomla! extensions). I think the automatic sending to subscribers who have not paid (Pending) is a limitation of use.
I thank you for your great assistance!
Best regards,
Pascal
but really I had already deleted exactly those codes. Unfortunately it doesn't work, invoices are always sent after offline payment (and Subscription Pending).
I also cleared the cache of site, extensions and browser, after the changes.
Could you try to solve this issue?
I believe that this issue is important, in an really good extension (one of the best Joomla! extensions). I think the automatic sending to subscribers who have not paid (Pending) is a limitation of use.
I thank you for your great assistance!
Best regards,
Pascal
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
-
11 years 6 months ago #36485
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Invoice generation and Offline payments
Hi Pascal
Please submit a support ticket sending me admin and FTP account of the site. I will check and correct it for you.
Regards,
Tuan
Please submit a support ticket sending me admin and FTP account of the site. I will check and correct it for you.
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Pascal
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 11
- Thank you received: 0
11 years 6 months ago #36492
by Pascal
Replied by Pascal on topic Re: Invoice generation and Offline payments
Thanks Tuan!
Now I'm submitting a ticket, with admin and FTP account of the site.
Thanks again.
Pascal
Now I'm submitting a ticket, with admin and FTP account of the site.
Thanks again.
Pascal
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.