We successfully migrated from 1.3 to 1.4 version. All the patches after upgrade where successfully applied and we are able to create new invoices. Everything is working but the Invoice list module, when we navigate to this module we receive the following error:
CREATE TEMPORARY TABLE invoice_details
SELECT SUM(invoiceItem.iiAmount) as iiAmountSum
, invoice.*
, client.clientName
FROM invoice
LEFT JOIN invoiceItem on invoiceItem.invoiceID = invoice.invoiceID
LEFT JOIN client ON invoice.clientID = client.clientID
GROUP BY invoice.invoiceID
ORDER BY invoiceDateFrom
SELECT invoice_details.*
, SUM(transaction_approved.amount) as amountPaidApproved
, SUM(transaction_pending.amount) as amountPaidPending
, SUM(transaction_rejected.amount) as amountPaidRejected
FROM invoice_details
LEFT JOIN invoiceItem on invoiceItem.invoiceID = invoice_details.invoiceID
LEFT JOIN transaction transaction_approved on invoiceItem.invoiceItemID = transaction_approved.invoiceItemID AND transaction_approved.status = 'approved'
LEFT JOIN transaction transaction_pending on invoiceItem.invoiceItemID = transaction_pending.invoiceItemID AND transaction_pending.status = 'pending'
LEFT JOIN transaction transaction_rejected on invoiceItem.invoiceItemID = transaction_rejected.invoiceItemID AND transaction_rejected.status = 'rejected'
LEFT JOIN tfPerson ON tfPerson.tfID = transaction_approved.tfID OR tfPerson.tfID = transaction_pending.tfID OR tfPerson.tfID = transaction_rejected.tfID
GROUP BY invoice_details.invoiceID
ORDER BY invoiceDateFrom
Unable to connect to database: Table 'alloc.invoice_details' doesn't exist
Query failed:
SELECT sessData FROM sess WHERE sessID = '5bc445829bb0e5209f902bbfce186dca'
***END of the Error
It seems that the temporary table isn't created at runtime. but we don't know why
Any help is welcome
Thanks and Regards,
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is possible the version of MySQL that you are running is too old. Or it is possible that the database user that you are using to connect to the database doesn't have permission to create temporary tables.
Have a look in the alloc_config.php file for the db connection credentials. Then run a mysql command as the database administrator:
GRANT ALL on ALLOC_DB_NAME.* to ALLOC_DB_USER@ALLOC_DB_HOST IDENTIFIED BY 'ALLOC_DB_PASS';
(obviously swap the 4 ALLOC_DB_ variables with the values that are in your alloc_config.php file)
Then go to the invoices tab again and see what happens.
Cheers,
Alex Lance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
We successfully migrated from 1.3 to 1.4 version. All the patches after upgrade where successfully applied and we are able to create new invoices. Everything is working but the Invoice list module, when we navigate to this module we receive the following error:
CREATE TEMPORARY TABLE invoice_details
SELECT SUM(invoiceItem.iiAmount) as iiAmountSum
, invoice.*
, client.clientName
FROM invoice
LEFT JOIN invoiceItem on invoiceItem.invoiceID = invoice.invoiceID
LEFT JOIN client ON invoice.clientID = client.clientID
Query failed: Table 'alloc.invoice_details' doesn't exist
SELECT invoice_details.*
, SUM(transaction_approved.amount) as amountPaidApproved
, SUM(transaction_pending.amount) as amountPaidPending
, SUM(transaction_rejected.amount) as amountPaidRejected
FROM invoice_details
LEFT JOIN invoiceItem on invoiceItem.invoiceID = invoice_details.invoiceID
LEFT JOIN transaction transaction_approved on invoiceItem.invoiceItemID = transaction_approved.invoiceItemID AND transaction_approved.status = 'approved'
LEFT JOIN transaction transaction_pending on invoiceItem.invoiceItemID = transaction_pending.invoiceItemID AND transaction_pending.status = 'pending'
LEFT JOIN transaction transaction_rejected on invoiceItem.invoiceItemID = transaction_rejected.invoiceItemID AND transaction_rejected.status = 'rejected'
LEFT JOIN tfPerson ON tfPerson.tfID = transaction_approved.tfID OR tfPerson.tfID = transaction_pending.tfID OR tfPerson.tfID = transaction_rejected.tfID
Unable to connect to database: Table 'alloc.invoice_details' doesn't exist
Query failed:
SELECT sessData FROM sess WHERE sessID = '5bc445829bb0e5209f902bbfce186dca'
***END of the Error
It seems that the temporary table isn't created at runtime. but we don't know why
Any help is welcome
Thanks and Regards,
Alex
Hi Alex,
Thank's for your support.
Yes it works I changed the permissions in the database as you posted before and it works.
By the way I'm running MySQL server version: 5.0.26 on suse 10.2
Hoppefully this help's other people with the same problem
Cheers,
Alex
Hi Alex,
It is possible the version of MySQL that you are running is too old. Or it is possible that the database user that you are using to connect to the database doesn't have permission to create temporary tables.
Have a look in the alloc_config.php file for the db connection credentials. Then run a mysql command as the database administrator:
GRANT ALL on ALLOC_DB_NAME.* to ALLOC_DB_USER@ALLOC_DB_HOST IDENTIFIED BY 'ALLOC_DB_PASS';
(obviously swap the 4 ALLOC_DB_ variables with the values that are in your alloc_config.php file)
Then go to the invoices tab again and see what happens.
Cheers,
Alex Lance