[Solved] Error Number: 1054 MY_Model.php Line Number: 91

Hello. I just upgraded my site to 1.2. follwing the wiki ugrape.
After run the setup, I have this error, cannot log into the app anymore.:

A Database Error Occurred
Error Number: 1054
Unknown column 'ip_invoice_amounts.invoice_sign' in 'field list'

SELECT SQL_CALC_FOUND_ROWS ip_invoice_custom.*, ip_client_custom.*, ip_user_custom.*, ip_users.user_name, ip_users.user_company, ip_users.user_address_1, ip_users.user_address_2, ip_users.user_city, ip_users.user_state, ip_users.user_zip, ip_users.user_country, ip_users.user_phone, ip_users.user_fax, ip_users.user_mobile, ip_users.user_email, ip_users.user_web, ip_users.user_vat_id, ip_users.user_tax_code, ip_clients.*, ip_invoice_amounts.invoice_amount_id, IFNULL(ip_invoice_amounts.invoice_item_subtotal, '0.00') AS invoice_item_subtotal, IFNULL(ip_invoice_amounts.invoice_item_tax_total, '0.00') AS invoice_item_tax_total, IFNULL(ip_invoice_amounts.invoice_tax_total, '0.00') AS invoice_tax_total, IFNULL(ip_invoice_amounts.invoice_total, '0.00') AS invoice_total, IFNULL(ip_invoice_amounts.invoice_paid, '0.00') AS invoice_paid, IFNULL(ip_invoice_amounts.invoice_balance, '0.00') AS invoice_balance, ip_invoice_amounts.invoice_sign AS invoice_sign, (CASE WHEN ip_invoices.invoice_status_id NOT IN (1, 4) AND DATEDIFF(NOW(), invoice_date_due) > 0 THEN 1 ELSE 0 END) is_overdue, DATEDIFF(NOW(), invoice_date_due) AS days_overdue, (CASE (SELECT COUNT(*) FROM ip_invoices_recurring WHERE ip_invoices_recurring.invoice_id = ip_invoices.invoice_id and ip_invoices_recurring.recur_next_date <> '0000-00-00') WHEN 0 THEN 0 ELSE 1 END) AS invoice_is_recurring, ip_invoices.* FROM (`ip_invoices`) JOIN `ip_clients` ON `ip_clients`.`client_id` = `ip_invoices`.`client_id` JOIN `ip_users` ON `ip_users`.`user_id` = `ip_invoices`.`user_id` LEFT JOIN `ip_invoice_amounts` ON `ip_invoice_amounts`.`invoice_id` = `ip_invoices`.`invoice_id` LEFT JOIN `ip_client_custom` ON `ip_client_custom`.`client_id` = `ip_clients`.`client_id` LEFT JOIN `ip_user_custom` ON `ip_user_custom`.`user_id` = `ip_users`.`user_id` LEFT JOIN `ip_invoice_custom` ON `ip_invoice_custom`.`invoice_id` = `ip_invoices`.`invoice_id` ORDER BY `ip_invoices`.`invoice_id` DESC LIMIT 10
Filename: /public_html/billing/core/MY_Model.php
Line Number: 91

This error should not happen if your tables were updated correctly. Are you sure the setup ran without errors?
So please check if the invoice_sign column exists in the ip_invoice_amounts. If not please reply again.

Thanks for the quick reply Kovac.

I did not had any problem with the setup when I installed the app ( that I am testing since 1 week). It is this monring when I updated it, after running the /setup, I had the message above.

In the ip_invoice_amounts . Here the columns I have. i don’t see any invoice_sign

invoice_total invoice_paid

Could you check if you have the ip_products and the ip_families tables?

No I don’t . Here all the tables I have:

  • ip_clients
  • ip_client_custom
  • ip_client_notes
  • ip_custom_fields
  • ip_email_templates
  • ip_imports
  • ip_import_details
  • ip_invoices
  • ip_invoices_recurring
  • ip_invoice_amounts
  • ip_invoice_custom
  • ip_invoice_groups
  • ip_invoice_items
  • ip_invoice_item_amounts
  • ip_invoice_tax_rates
  • ip_item_lookups
  • ip_merchant_responses
  • ip_payments
  • ip_payment_custom
  • ip_payment_methods
  • ip_quotes
  • ip_quote_amounts
  • ip_quote_custom
  • ip_quote_items
  • ip_quote_item_amounts
  • ip_quote_tax_rates
  • ip_settings
  • ip_tax_rates
  • ip_users
  • ip_user_clients
  • ip_user_custom
  • ip_versions

Open the following file:
Copy all SQL commands and run them on your database and check if it works.

Thank you Kovah. Now everything is working fine. Excepted the Update Check still showing 1.1.2 , while I have below the welcome message of v1.2.0.
Anyway I will go with that, no big deal.

Run this command on your database to fix the version problem:

INSERT INTO `ip_versions` (`version_id`, `version_date_applied`, `version_file`, `version_sql_errors`) VALUES (7, '1424534471', '006_1.2.0.sql', 0);

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.