apoxe Posted March 30, 2020 Share Posted March 30, 2020 hi guys i need help, where i can edit the tpl of file invoices.php of admin? i want to change value from last capture attemp to show invoice date paided 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 31, 2020 Share Posted March 31, 2020 12 hours ago, apoxe said: i need help, where i can edit the tpl of file invoices.php of admin? there isn't a template file for the invoices page in the admin area. 12 hours ago, apoxe said: i want to change value from last capture attempt to show invoice date paid I suspect it would require a jQuery hook to do that.. 0 Quote Link to comment Share on other sites More sharing options...
apoxe Posted March 31, 2020 Author Share Posted March 31, 2020 1 hour ago, brian! said: there isn't a template file for the invoices page in the admin area. I suspect it would require a jQuery hook to do that.. thanks, maybe you have a jquery hook with another function so i can check how it works? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted April 1, 2020 Share Posted April 1, 2020 You need to use something that looks very similar to the code I posted here months ago: You have to change the query to retreive datepaid like follows: <?php $Data = Capsule::select(Capsule::raw('SELECT id, datepaid FROM tblinvoices')); $Data = json_encode($Data, true); Replace "Last Caputure Attempt" th with "Date Paid" then iterate each row to replace all your "N/A" with date paid. You can use this HTML as target. <td> <input type="checkbox" name="selectedinvoices[]" value="{USE_ME}" class="checkall"> </td> It's easy but sadly there's a big problem. Invoices page shows 25 to 250 records per page and selecting all records you have in tblinvoices makes no sense. What if you have 50k invoices stored on that table? It's clear that you need to select only the records you're actually seeing on screen. Basically you have to retreive all filters in use on the page (userid, invoicenum, invoicedate, duedate, datepaid...), sort order (ASC, DESC), current page number and of course calculate the right LIMIT to use. It's so damn frustrating and boring that I suggest you to stop working on it. If you need a proof just look at this code... <?php $filters = array_filter(json_decode(base64_decode(urldecode($_COOKIE['WHMCSFD'])), true)['invoices']); That's how you retrieve filters currently in use. Can you imagine the rest? ☠️ 0 Quote Link to comment Share on other sites More sharing options...
apoxe Posted April 1, 2020 Author Share Posted April 1, 2020 4 hours ago, Kian said: It's so damn frustrating and boring that I suggest you to stop working on it. thanks for your help i appreciate, i will not spend more time on this. maybe can you help me with this old post 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted April 1, 2020 Share Posted April 1, 2020 20 hours ago, apoxe said: thanks, maybe you have a jquery hook with another function so i can check how it works? I knew kian would take the lead on this one. 🙂 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.