Bug in 1.3.1. while deleting products from withing invoice


I came across a bug when trying to delete a product from withing an invoice.
There is a line pointing to an non existing table.

A Database Error Occurred
Error Number: 1146
Table 'dbname.invoice_id' doesn't exist
SELECT * FROM (`invoice_id`) WHERE `invoice_id` = '5'
Filename: modules/invoices/models/mdl_invoice_amounts.php
Line Number: 84

I saw that in “invoices/models/mdl_invoice_amounts.php” there is a “typo” i guess.

Line 84 says:

$payment = $this->db->get('invoice_id');

while it should be:

$payment = $this->db->get('ip_invoices');

Otherwise, great stuff :wink:

Related to Error changing invoice value to "PAID' after upgrading to v1.3.0

Pleas follow my post where a single line has to be changed and everything should work again.

Does this affect only those doing an upgrade or fresh install?

Both will be affected.