Patty Posted September 29, 2017 Share Posted September 29, 2017 Hi there. I'm finally upgrading to v7.2.3 and found a problem with the mass payment feature. Part of the problem is described in the following thread which is 4 years old: https://forum.whmcs.com/showthread.php?94215 So the thing is: when client clicks the notification or the Pay All button, automatically a new invoice is created including the overdue invoices. BUT that new invoice is nowhere to be seen on the client area (unless you click in the notification or the PAY ALL button), just in the admin side, BUT the client area notification now shows THREE unpaid invoices AND a wrong balance due! I disabled mass payment for now and took the screenshot below just to show the two original unpaid invoices and the wrong count and amount to pay. Can this be fixed on the next version? It doesn't seem to complicated not to be fixed yet after being pointed out 4 years ago! 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted September 29, 2017 Share Posted September 29, 2017 Ok. I did a test on 7.1.2, and I was able to replicate this, so it is not related to your new WHMCS upgrade but its probably coming from other versions as well. But the bug seems to be only related to the notification display on the customer side. The mass payment invoice is not displayed to the customer, and I think this is done on purpose. Let me explain why. The mass payment option just generates a consolidated new invoice. The customer is supposed to be sent immediately to the payment gateway (PayPal, credit card, whatever) after hitting the mass payment button. If he does everything is ok as all balances/invoices are cleared after payment. But if he does not pay and goes back to the customer area. Then the notifications displays the total invoices (including the hidden). If that is a bug, it probably is as it confuses the customer. But hiding the invoice that includes the others is probably desired. If you go again to the mass payment option, WHMCS will now display the new generated invoices which includes all the other due invoices. If this third mass payment invoice was displayed to the customer under the invoices list, he would freak out and think you are overbilling him. I actually had people ask me about this mass payment invoice before. So personally I think it's ok that it is hidden as its just a dummy invoice. Now, the notification count and amount should not include this hidden invoice. You have a good point here, but the bug is also on the admin side. I guess WHMCS is just taking the total number of invoices for the customer account directly from the database and it is calculating the due amounts and totals the same way. Hence way it also shows the same data on the customer side. What WHMCS should do to fix this just improves the code that shows the notification. They can keep pulling the same data from the DB but just modify if this hidden invoice is detected. This is how I would do it. Assuming there is some state that lets you detect this hidden invoice from the database, the code should check this first and react differently. a) If the hidden invoice is not detected on the customer account, use the default code they are using now. No changes. b) If a hidden invoice is detected in the customer account, then go to C c) Get hidden invoice total amount. Now use a different code to display the notifications and due amounts that basically does this: -1 for the total count of invoices. So instead of 3, it will show 2. (based on your example). Correct! -extract the total of the due balance that we got on step B. So the due balance will be also be correct. Now the mass payment invoice is hidden, so it does not confuse the customer and the notifications for total invoices and balance due is correct. I was going to add that the customer should not receive an email for this new mass payment hidden invoice but I checked, and WHMCS seems to do this already. Why is this still not fixed? I don't know. But if the logic part that does this is not in some encoded file (sadly WHMCS seems to encode more stuff with new releases instead of less) then I will fix it. EDIT: Actually now that I see again, the sidebar has the fix already. It is just the top bar notification. So the fix is just a simple copy & paste for the same code. Oh gosh, and I typed all that. I guess I need some sleep... 1 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 29, 2017 Share Posted September 29, 2017 you could probably solve it with a hook, but it's really something that WHMCS should be looking to fix themselves. 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted September 30, 2017 Author Share Posted September 30, 2017 Tks for your replies, guys. You've got a point about the reason that the new invoice is not shown. I guess it's better this way. It is indeed a bug on the notification area, but it should be addressed, for it's confusing for the client. I hope they fix it soon. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 1, 2017 Share Posted October 1, 2017 On 9/30/2017 at 9:31 AM, Patty said: Tks for your replies, guys. You've got a point about the reason that the new invoice is not shown. I guess it's better this way. It is indeed a bug on the notification area, but it should be addressed, for it's confusing for the client. I hope they fix it soon. It is indeed better, you don't want customers asking why you are billing them again (which you are not). I know some people don't like how WHMCS does this, as it creates a new invoice which is not actually an invoice for a product but just an invoice of an invoice. Personally, this is not something I'm a fan either. An invoice for other invoices seems rather odd, maybe even invalid or illegal in some countries with accounting (reason you can disable mass payment on the admin side). But this is how WHMCS does it and since this is a strange way to handle mass payment, it is better to keep it hidden vs having to explain how the system works to customers. 1 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted October 1, 2017 Share Posted October 1, 2017 Hey Everyone, On 29/09/2017 at 4:43 PM, Patty said: I disabled mass payment for now and took the screenshot below just to show the two original unpaid invoices and the wrong count and amount to pay. I'm going to check in and see if this is the expected behaviour, just to confirm what you are seeing when using Mass Payments your client area notification shows 3 invoices overdue being the ones covered by the Mass Payment & the 2 outstanding invoices, thus showing the incorrect amount outstanding in the notifications. 12 minutes ago, yggdrasil said: I know some people don't like how WHMCS does this, as it creates a new invoice which is not actually an invoice for a product but just an invoice of an invoice. Personally, this is not something I'm a fan either. An invoice for other invoices seems rather odd, maybe even invalid or illegal in some countries with accounting (reason you can disable mass payment on the admin side). The mass payment functions in much the same way as "Add Funds" does, where the user can add $X credit to their account and an invoice is raised for them, this sits in the credit manager. With Mass Payment, it also uses the Credit System so the invoice is raised for both the outstanding invoices, once it's paid it add the amounts as a credit onto the initial invoices, I'll ask if we have plans to change this in the future 1 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 1, 2017 Share Posted October 1, 2017 7 minutes ago, WHMCS ChrisD said: Hey Everyone, I'm going to check in and see if this is the expected behaviour, just to confirm what you are seeing when using Mass Payments your client area notification shows 3 invoices overdue being the ones covered by the Mass Payment & the 2 outstanding invoices, thus showing the incorrect amount outstanding in the notifications. The mass payment functions in much the same way as "Add Funds" does, where the user can add $X credit to their account and an invoice is raised for them, this sits in the credit manager. With Mass Payment, it also uses the Credit System so the invoice is raised for both the outstanding invoices, once it's paid it add the amounts as a credit onto the initial invoices, I'll ask if we have plans to change this in the future The bug is indeed there. I confirmed it on my installation as well. Strangely, its correct on the sidebar (from his image) and also on my test installation I confirmed that as well. Its only in the top notification bubble where its wrong. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted October 3, 2017 Share Posted October 3, 2017 Hey Everyone, Apologies for the delay in following this up, I have this afternoon opened a case with the development team to discuss this further and see what they say in terms of bringing consistency across these numbers. For anyone that wishes to have it the Case ID is CORE-11695 I will keep this thread updated with the status of the discussions that come out of this ticket. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted October 3, 2017 Share Posted October 3, 2017 Hi @yggdrasil Im splitting the conversation around this off into a new thread and will provide a reply to you soon 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted October 3, 2017 Share Posted October 3, 2017 (edited) 5 minutes ago, WHMCS ChrisD said: Hi @yggdrasil Im splitting the conversation around this off into a new thread and will provide a reply to you soon Yes, that would be better. Here comes the deal with credits: Customers uploads credits on WHMCS. New invoices use that credit automatically. I think Quickbooks didn't allowed to pick those new invoices, as the date was newer than the original credit payment (payment can't have a prior date to the invoice). This was more complicated when credits are left on the account or only partial credits are used on one invoice. You could say that is a problem with Quickbooks but they actually follow accounting standards so there was a reason for this as well. This is why I used correctly the credit memo option. Edited October 3, 2017 by yggdrasil 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.