Exxo Posted January 10, 2021 Share Posted January 10, 2021 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 Link to comment Share on other sites More sharing options...
brian! Posted January 11, 2021 Share Posted January 11, 2021 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 Link to comment Share on other sites More sharing options...
Exxo Posted January 11, 2021 Author Share Posted January 11, 2021 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 Link to comment Share on other sites More sharing options...
brian! Posted January 18, 2021 Share Posted January 18, 2021 (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, 2021 by brian! 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.