Condition field in invoice

More
8 years 2 months ago #93520 by tonis
Condition field in invoice was created by tonis
Hello

I want to ask if there is an option how to add a conditional field in the invoice.

I need to generate proforma invoices for offline payment. After a successful payment the proforma invoice is changed to original invoice, but I need there a entry where it is writen something like "To pay 0 €".

How to do this please?

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

More
8 years 2 months ago #93539 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Condition field in invoice
Hello Tonis

Unfortunately, this is not supported, so you will have to customize the code if you want to have that behavior. The file you need to modify is components/com_osmembership/helper/helper.php, method generateInvoicePDF

I don't know exactly how you want it to work, so I could not guide you more detailed

Regards,

Tuan

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

More
8 years 2 months ago #93589 by tonis
Replied by tonis on topic Condition field in invoice
Some functions for proforma invoices would be great :).

But for now, thanks for directing, i have addet some conditions and new variables for the invoice.

If someone is interested in this sort customization, just folow the original hepler file like i did...
Code:
if ($row->published == 0) { $nauhradu = self::formatCurrency($row->gross_amount, $config); } elseif ($row->published == 1) { $nauhradu = JText::_('0€, invoice already paid'); } else { $nauhradu = JText::_(''); } $replaces['NA_UHRADU'] = $nauhradu;

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

More
8 years 2 months ago #93767 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Condition field in invoice
Great. Thanks for sharing

Tuan

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