InvoicePlane 1.5.4 released

See this thread for more information about the credit card form for PayPal: Guest Payment showing a Credit Card form

1 Like

That’s perfect, thanks!

Hej @peterbeck,

have the exact same issue, updated directly from 1.5.3, our OS is Debian Jessie 8.9 as well. In the browser (chrome) we get a “ERROR 324 (net::ERR_EMPTY_RESPONSE)”.

The Invoiceplane Debug-Log says:

“Compile Error --> Cannot use for reading Mdl_custom_fields.php 257”

The Apache-Log says:

[Mon Sep 04 12:59:57.909855 2017] [:error] [pid 16324] [client ***:63726] PHP Fatal error: Cannot use “” for reading in ***/invoiceplane/application/modules/custom_fields/models/Mdl_custom_fields.php on line 257

[Mon Sep 04 12:59:58.718734 2017] [core:notice] [pid 12776] AH00052: child pid 16324 exit signal Segmentation fault (11)

Thanks for any fix or advise!

With InvoicePlane 1.4.x you didn’t need to select a payment method for an invoice, you could just leave it at the default (bank transfer in this case) and the clients invoice URL had a working link to the payment method (in this case PayPal) so they had that option available.

With 1.5.4 it appears that unless you set the payment method on an invoice specifically to PayPal the client doesn’t get a working “Pay Now” link? And there doesn’t seem to be a way to set the default payment method?

For the InvoicePlane site in question almost everybody pays using bank transfers but some use PayPal and a tiny few use cheques and cash, if I could set the default to PayPal then all the clients would have this option, is that possible?

Or am I misunderstanding something here?

If you select “Select the Payment Method” for the Payment Method form field then everything is OK, if you leave it at the default, which in this case is “Bank Transfer” and then go to the client URL and follow the “Pay Now” link you get a error page with:

A PHP Error was encountered

Severity: Notice

Message: Undefined index:

Filename: controllers/Payment_handler.php

Line Number: 166


File: /var/www/invoiceplane/application/modules/guest/controllers/Payment_handler.php
Line: 166
Function: _error_handler

File: /var/www/invoiceplane/application/modules/guest/controllers/Payment_handler.php
Line: 46
Function: initialize_gateway

File: /var/www/invoiceplane/index.php
Line: 327
Function: require_once

An uncaught Exception was encountered

Type: Omnipay\Common\Exception\RuntimeException

Message: Class ‘\Omnipay\Gateway’ not found

Filename: /var/www/invoiceplane/vendor/omnipay/common/src/Omnipay/Common/GatewayFactory.php

Line Number: 105


File: /var/www/invoiceplane/vendor/omnipay/common/src/Omnipay/Omnipay.php
Line: 103
Function: call_user_func_array

File: /var/www/invoiceplane/application/modules/guest/controllers/Payment_handler.php
Line: 192
Function: __callStatic

File: /var/www/invoiceplane/application/modules/guest/controllers/Payment_handler.php
Line: 46
Function: initialize_gateway

File: /var/www/invoiceplane/index.php
Line: 327
Function: require_once

Any suggestions for what I could do here other than remembering to always manually set the Payment Method to either PayPal or “Select the Payment Method” (in this case it defaults to the first one, Bank Transfer)?

The error Cannot use [] for reading is related to PHP < 7.0.
IP is fully working without an problems while using PHP 7.0 or 7.1 but throws the error while running PHP 5.6.

The bug will be fixed within the next release. To hitfix this, open the file application/modules/custom_fields/models/Mdl_custom_fields.php and replace line 257 with the following line:

array_push($field->$field_id_fieldlabel, $custom_value->custom_values_value);

Fore reference: ticket is

This issue was already solved in pull request #538. PLEASE DO NOT OPEN NEW PULL REQUESTS!

I cannot reproduce any of your errors and the system is working fine with how it should work. There are two possible cases:

  1. An invoice has no payment method set. The payment method should only be set if you want to enforce the particular method to the customer. If not, leave it blank.
    If the invoice has no payment method set, the customer can use any enabled payment gateway.
  2. An invoice has a payment method set. This payment method will be enforced. The customer can only use payment gateways that are associated with the method, which can be done in the settings.

The main problem is that new invoices don’t default to “Select the Payment Method”, this is what I have in the database:

MariaDB [invoiceplane]> select * from ip_payment_methods;
| payment_method_id | payment_method_name |
|                 1 | Bank Transfer       |
|                 2 | Cheque              |
|                 3 | Cash                |
|                 4 | PayPal              |
4 rows in set (0.00 sec)

And this is the HTML that is generated when you create a new invoice:

<select name="payment_method" id="payment_method" class="form-control input-sm simple-select">
  <option value="0">Select the Payment Method</option>
  <option selected="selected" value="1">Bank Transfer</option>
  <option value="2">Cheque</option>
  <option value="3">Cash</option>
  <option value="4">PayPal</option>

I’d like the selected="selected" attribute to appear on either “Select the Payment Method” or “PayPal”, if the behaviour I’m seeing isn’t reproducible then perhaps it is down to me having some legacy data in the database? Any idea how the selected="selected" attribute is being set?

Maybe you should just disable the “Default Payment Method” invoice setting in the system settings. :slight_smile:

Do’h, missed that! Thanks :grinning:

OK - this seems to be working for now – THX for your work and the fast hotfix! :slight_smile:

Hi Kovah, Many thanks for this new version. My upgrade from 1.5.3 to 1.5.4 ran flawless. :smile:
I also tested the custom-fields in the e-mail template and it also works great now!

Hi Kovah,

Thanks again for this update. I’m experiencing a couple of issues. The first issue I have is that email templates for standard invoices don’t get saved and loaded the correct way. Maybee this is related to IP-543 but I’m not completely sure.

Second issue I’m having is that when I copy a (already sent) invoice, also the old invoice date is getting copied instead of using the date of today. This should not be the case since it explicitly says that today’s date is going to be used in the popup. With some pointers in the right way I might be able to find and fix the problem myself and contribute.

Kind regards,

Hellllp… so this is not working :frowning: Unable to add a new client.

Fatal error: Cannot use for reading in /application/modules/custom_fields/models/Mdl_custom_fields.php on line 257
A PHP Error was encountered

Severity: Compile Error

Message: Cannot use for reading

Filename: models/Mdl_custom_fields.php

Line Number: 257 ($field->$field_id_fieldlabel = $custom_value->custom_values_value;)


wau!!! i fixed it by deleted the box which does not appear visable on my side unless i need glasses without the forum I could not found the argument hiding in plain sight… thanks kovah this site rocks it helped me debug my issue =)

Hi, I am using invoice plane for so long… its been so good. I have recently upgraded with release 1.5.4

I am unable to add invoice… can you please help me out as in my previous version i was using this feature and its important for my business.

Thanks in advance

A bit more information would be useful…

I upgraded over the weekend and do not have any issues.

I do understand that IP 1.5.4 requires PHP 7 (there are a few posts regarding this), so maybe check what version of PHP you are running?

@Kovah Any idea’s?

Nope, and I doubt I will fix any related issues as we intend to switch to file-based templates anyway.

Cool, thanks for your reply!