Exxo 0 Posted January 10 Hi, i wanted to filter unpaid invoices for a custom view on my clientareahome.tpl I tried the following code, but it won't show the unpaid ones. {foreach key=num item=invoice from=$invoices} {if $invoice.status eq 'Unpaid'} .... {/if} {/foreach} 0 Quote Share this post Link to post Share on other sites
brian! 3112 Posted January 11 19 hours ago, Exxo said: I tried the following code, but it won't show the unpaid ones. technically, it should be... {if $invoice.statustext eq 'Unpaid'} but I think the existing invoices array on the client homepage only contains unpaid invoices anyway. 0 Quote Share this post Link to post Share on other sites
Exxo 0 Posted January 11 1 hour ago, brian! said: technically, it should be... {if $invoice.statustext eq 'Unpaid'} but I think the existing invoices array on the client homepage only contains unpaid invoices anyway. Yes, got the same result there. With {debug} i got a version working: {foreach key=num item=invoice from=$invoices} {if $invoice.rawstatus eq 'unpaid'} ... {/if} {/foreach} But since it's in the header.tpl it won't show invoices on every .tpl page. So my question; How to i get the $invoices working in the header.tpl on other pages too? 0 Quote Share this post Link to post Share on other sites
brian! 3112 Posted January 18 (edited) On 11/01/2021 at 14:14, Exxo said: But since it's in the header.tpl it won't show invoices on every .tpl page. do you want to show invoices on every page ??? On 11/01/2021 at 14:14, Exxo said: So my question; How to i get the $invoices working in the header.tpl on other pages too? are you actually wanting to show a list of invoices on every page in the client area in the header ?? I can understand a count (and you wouldn't need a hook for that), but a list ?!? Edited January 18 by brian! 0 Quote Share this post Link to post Share on other sites