netdg Posted November 26, 2011 Share Posted November 26, 2011 Hello everyone'm experiencing a problem that occurs with every new job, when I installed WHMCS I ran the test as a customer to control the entire process, from order sending the invoice. After completing canceled orders, and then all the historical, the objects are deleted prior to re-invoice the first customer who places an order. I did a check in the database and table tblinvoiceitems contains many of these objects that do not correspond to any order, as I avoid this problem? Thanks for any replies. 0 Quote Link to comment Share on other sites More sharing options...
netdg Posted December 3, 2011 Author Share Posted December 3, 2011 No answer? 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted December 4, 2011 Share Posted December 4, 2011 You might need to be a little more specific ... Are you concerned that tblinvoiceitems contains invoice "lines" for items where there is no invoice (due to you _deleting_ it) ? Fix depends on why you *deleted* invocies - if these were *testing* invoices and you wanted them removed form the DB - then in future first delete each line-item from the invoice, before deleting the invoices. To "tidyup" you just do (a backup first) delete from tblinvoiceitems where invoiceid not in (select id from tblinvoices) 0 Quote Link to comment Share on other sites More sharing options...
cwispy Posted December 5, 2011 Share Posted December 5, 2011 I reported this bug a while ago and they simply deleted my post. If you delete an invoice from the admin area, it deletes the invoice, but not the invoice items in the tables. This then causes all sorts of issues with clients getting overdue notices, suspended accounts etc. I have not had time to check if this has been fixed in v5 or not. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted December 5, 2011 Share Posted December 5, 2011 I reported this bug a while ago and they simply deleted my post. If you delete an invoice from the admin area, it deletes the invoice, but not the invoice items in the tables. This then causes all sorts of issues with clients getting overdue notices, suspended accounts etc. I have not had time to check if this has been fixed in v5 or not. Deleting an invoice does not lead to overdue notices (as there's no invoice to remind them about) or suspended accounts (thats *date* based from the hosting product) The reason it leaves the "items" behind is to stop it re-attempting to invoice, and causes no harm to the correct operation of the system at all. What _exactly_ are you trying to achieve by deleting the invoice ? 0 Quote Link to comment Share on other sites More sharing options...
netdg Posted December 5, 2011 Author Share Posted December 5, 2011 The bug has not been eliminated, or because I installed version 5.2 and the problem still occurs. For myself, I had initially set the system so that the receipt of the invoice is sent to the customer, but for this problem I had to set the invoice only after the payment. 0 Quote Link to comment Share on other sites More sharing options...
cwispy Posted December 6, 2011 Share Posted December 6, 2011 Deleting an invoice does not lead to overdue notices (as there's no invoice to remind them about) or suspended accounts (thats *date* based from the hosting product) The reason it leaves the "items" behind is to stop it re-attempting to invoice, and causes no harm to the correct operation of the system at all. What _exactly_ are you trying to achieve by deleting the invoice ? Well we have had client accounts suspended and overdue notices sent out for invoices that do not exist any more, but the invoice items do cause they were left behind after invoices had been deleted. After deleting the items, the suspensions and overdue notices stop. The idea of leaving invoice items behind is not in the best interest of a normalized db design and I really have to question why it is designed in that way. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted December 7, 2011 Share Posted December 7, 2011 Well we have had client accounts suspended Account suspension isn't related to invoices (at all) it's related to the dates on the tblhosting record - if the account was suspended (irrespective of you removing) the invoice there are 2 possibilities: 1. you didnt change the dates 2. you have another copy of whmcs running 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.