Jump to content

invoices.php tpl admin file


apoxe

Recommended Posts

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..

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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? ☠️

Link to comment
Share on other sites

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 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated