How to Calculate and Display Labour Cost in Invoice Summary

Hello

I have a vehicle auto repair invoicing system all setup and it works a treat. I have implemented many custom fields and got them to display exactly where i would like them. Really good!

However…There is something that i would like to do.

For Example…
I can add a product to an invoice like …Gearbox Repair etc…
What i would like to do is to add a box in the summary of total labour cost of fitting.

Now i can do this by adding a product each time for labour cost for whatever work is to be carried out.

It would be really good if i can have all the labour calculated and displayed under the subtotal in the summary of the invoice. It would be a really neat touch…

Incase my uploaded example didnt work ive included a link here also.

Screenshot

Thank you all…!
example|659x499

1 Like

You would need to add a new field to the items category that says “is_labour” or something like this and must be set to true if the item is labour work. Then, while calculating the totals, while looping trough all items you just check each item if it’s labour or not and if so, add the amount to a variable like “labour_total” which then can be used to print the total amount.

1 Like

Hi Kovah,

Thanks for coming back to me and its the first chance ive had to catch up whilst being on hols…

Where abouts did you say add items category? In the database somewhere? Or as a product family?

Sorry i didn’t get what you meant on how to do this…can you explain it to me more simpler please?

Thanks in advance

Having said what i did in the original post, can i just have a box somewhere in the invoice where i can just add the labour total instaead of looping through making it harder…

Just a simple box to go to the sub totals where i can just input the labour cost to display on the final print invoice.

Sorry to be a pain…and i am grateful for all the help. :slight_smile:

No, it’s not possible to just adda box somewhere. You need to edit core functionality. But I can’t help you with that in detail, don’t have the time.

You have that funcitonality with the discount box,

you didnt explain yourself in detail on the original post with regard to categories etc

Kovah, any chance you can just explain? Ive done all the rest of it myself, just want that bit of functionality and im done.

This is all compiled through codeigniter i see…maybe laravel would of been a better choice overall for a MVC :slight_smile: