Template customization question

Hi,

I’m trying out Invoice plane for our company in belgium , and we are really falling in love with it!

I have a question about customizing the Template for invoices and Qoutes. I’ve the basic scheme of how i want it already done but i have a problem getting something to work.

What we want is that in the PDF and web preview, all items are ordered by Product category ( wich is possible in the products option, verry nicely done to include that in IP :slight_smile: ). And after each category ends there is a subtotal per categorie. Its not that big of a deal if that ain’t possible.

I’ve the template as good as ready but now all items are just listed underneath each other. The thing i’m stuck on is ordering them per category and making the subtotal. also if items are not in a category they can be listed in an “extra” categorie. Also for estetics would it be nice if there aren’t items of a certain categorie the categorie ‘header’ / ‘subtotal’ calculation (wich will be 0) will not be shown.

I’ill include a image below to give you guys an idea how we want it.

Hope you guys can help me out, Because we really are commited to use Invoiceplane.

I already fiddled around myself and know how i could do it but the thing is to get it working is an other kind of story.

i figured out how i could get the familie names from the items in Qoute_Items.

With this querry.

SELECT ip_quote_items.item_name, ip_families.family_name
FROM ip_quote_items
INNER JOIN ip_products
ON ip_quote_items.item_product_id=ip_products.product_id
LEFT JOIN ip_families
ON ip_products.family_id=ip_families.family_id

I know i need to make an foreach of those names that come out the querry. and then loop again with an foreach all the items with that family id. The thing is i can"t get the querry to work inside the code. Can someone help me with this ?

Hi, have you notice about this?

can you solve the problem?

i need this too

Hi,

Wel i customized it the way i wanted , and it works fine. Although my code is in no way beautiful. i did it hardcoded in the template itself whitout even envolving some of the MVC of Codeigniter.

Since i did a couple more changes specific for my company i can’t give you the entire code, but if you want ik can provide you some bits of it that will make it work for you :).
P.s. its in no way a beautiful piece of code but it works.