Page 1 of 1

showing weights on invoices

Posted: 18 Oct 2012, 10:37
by amoss
Hi
I need help with the correct expression for the total weight of products on the invoice. at the moment i have just used "stock.unit_weight"

This does add the weight of the of the different items but only as a quantity of 1 per item for example if an invoice has

QTY Product Code weight per item
1 AB 1kg
1 CD 1kg
1 EF 1kg

The Total weight would show 3kg

But if i changed the qty to example

QTY Product Code weight per item
1 AB 1kg
3 CD 1kg
3 EF 1kg

The Total weight still shows 3kg and not 7KG as it should.

Please help if you can with the correct expression

Thanks :)

Re: showing weights on invoices

Posted: 18 Oct 2012, 17:00
by brucedenney
You need to add an expression to the details section (it can be set to have printing suppressed so it is not visible)
The expression is Quantity times Weight (I would name it items_weight)

Then in your footer section add in the items_weight as a sum

Re: showing weights on invoices

Posted: 22 Oct 2012, 11:44
by amoss
thats great thanks for your help on that but now i have another problem.

since adding the weights in my message lines have completly disapeared i have checked that supress printinh is false so not sure what else to do.

Re: showing weights on invoices

Posted: 23 Oct 2012, 12:00
by brucedenney
the message lines (and S1 and S2 and S3 lines) will disappear, because you have linked the stock table to the items. and for those items there is no corresponding stock item.

What you need to do is to change the join type to parent, this will return the items even if there is no matching stock item.