donostiarra Posted March 27 Share Posted March 27 (edited) Hi. After upgrading yesterday to last version (8.9.0), all invoices are showing 00:00:00 time as datepaid column in DDBB. Before upgrading (8.8.0), in tblinvoices table, datepaid column, was saving date + correct time, when invoice was created. After upgrading, it's writing date + 00:00:00 in all new records. Is it a bug? We use that table for more processes, and we need that value to be correct, too, as it was until now. Thanks. Edited March 27 by donostiarra 0 Quote Link to comment Share on other sites More sharing options...
donostiarra Posted March 27 Author Share Posted March 27 Inside WHMCS, in transaction history, also showing today's date, and 00:00 time. But trying more today, it's happening only when I manually assign a payment to the invoice, that's when it happens. It doesn't send the confirmation email (another bug detected in another community thread, not sure if it's related), and it doesn't store the time correctly. Invoices generated with payments through Stripe save the time correctly (and sending confirmation e-mail well too). 0 Quote Link to comment Share on other sites More sharing options...
donostiarra Posted March 29 Author Share Posted March 29 (edited) Could you help us, @WHMCS John? With both isues, or maybe are related... Thanks a lot, in advance. Edited March 29 by donostiarra 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager Solution WHMCS John Posted April 4 WHMCS Support Manager Solution Share Posted April 4 Hi @donostiarra, Thank you for this report. Case #CORE-19178 is open with our developers in order to have this reviewed for future releases. Once we resolve cases and push features they are available at our change log, here: https://changelog.whmcs.com/ I apologize for the inconvenience, and appreciate your patience as we work to resolve this. Thanks again for taking the time to report your findings. 0 Quote Link to comment Share on other sites More sharing options...
jaysonvds Posted April 8 Share Posted April 8 This is definitely a bug. Since updating no transactions appear on the dashboard graphs either, except for Refunds to Credit Balances. There needs to be an urgent bug fix relased for this to address the regression in functionality. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted April 9 WHMCS Support Manager Share Posted April 9 Hi @jaysonvds, Yes I suspect the graph issue is related. In the meantime you can see today's data if you click the "Last 30 Days" filter button, or use the graph on the Billing > Transactions List page. 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted April 12 Share Posted April 12 @WHMCS John did this also mess with the AddTransaction hook? $vars['date'] is supposed to be a datetime object but it's returned as a string. 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted April 12 Share Posted April 12 (edited) For everyone having this issue, I've created the following script that checks if the time paid is equal to 00:00:00. If it is, it updates the time for the transaction. When an invoices goes to "Paid" status, it also updates the time. <?php use WHMCS\Billing\Invoice; use WHMCS\Database\Capsule; use WHMCS\Carbon; add_hook('AddTransaction', 1, function($vars) { $now = Carbon::now(); $transactionDate = Carbon::parse($vars['date']); if($transactionDate->toTimeString() === '00:00:00') { $transaction = Capsule::table('tblaccounts') ->where('id', $vars['id']) ->update( [ 'date' => $now, ]); } }); add_hook('InvoicePaidPreEmail', 1, function($vars) { $now = Carbon::now(); $invoice = Invoice::find($vars['invoiceid']); if($invoice->datepaid->toTimeString() === '00:00:00') { $invoice->datepaid = $now; $invoice->save(); } }); Create a new PHP file in /includes/hooks/ and paste the contents into the new file. Edited April 12 by DennisHermannsen 0 Quote Link to comment Share on other sites More sharing options...
glenn Posted April 12 Share Posted April 12 Previously, a hotfix would be made. Now we have to wait for a next release or use hooks to fix the bugs 😞 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted April 12 Share Posted April 12 Yeah, I must say I'm a bit disappointed that a hotfix hasn't been made available for such a simple issue after more than two weeks. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted April 24 WHMCS Support Manager Share Posted April 24 Hi all, Today we've published v8.10.0 which resolves this error: Quote CORE-19178 - Use current time for timestamps created by manual invoice payments https://docs.whmcs.com/Changelog:WHMCS_V8.10.0_GA 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.