# About include more cost to compute margin

**URL:** https://discuss.tryton.org/t/about-include-more-cost-to-compute-margin/3313
**Category:** Ideas
**Tags:** stock
**Created:** [October 2, 2020, 10:06pm UTC](https://discuss.tryton.org/t/about-include-more-cost-to-compute-margin/3313 "2020-10-02T22:06:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 2, 2020, 10:06pm UTC](https://discuss.tryton.org/t/about-include-more-cost-to-compute-margin/3313/1 "2020-10-02T22:06:56Z")

</div>

> [@Compute margins](https://discuss.tryton.org/t/compute-margins/3278):
>
> One of the objectives of implementing and ERP system is to know how much money the company is earning. This can be computed in several costs levels: Globaly on the company (using Profit and Lost) Per cost center or similar (using Analytic account) But one may be interested on [computing the profit at document/line level](https://help.sap.com/saphelp_sbo882/helpdata/en/44/fd8a17a7100484e10000000a155369/frameset.htm). Normally this is computed using the following formulas: Profit = Sale Price - Cost Price Profit % = Profit / Sale Price = (Sale Price - Cost Price) / Sale Price We could de…

To extend the feature of the margin computation based on the stock moves.  
I’m wondering if it makes sense to add extra cost in the computation. Such extra cost could be for example the shipping cost if it is not invoiced to the customer, the packaging cost for the handling.  
So the idea would be that the customer shipment we compute a cost (like in production) in standard only shipping cost if not invoiced. This cost is distributed to the outgoing moves based on their value (like in production) when it is done. This is stored in a separate extra cost field. This column is added in the report to the cost computation. Idem for customer return shipment.

What do you think?

---

<div class="post-metadata">

### Author: ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)
#### Post date: [October 3, 2020, 2:48pm UTC](https://discuss.tryton.org/t/about-include-more-cost-to-compute-margin/3313/2 "2020-10-03T14:48:21Z")

</div>

> [@ced](#):
>
> What do you think?

I think it makes sense and can be a useful feature.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 19, 2020, 5:32pm UTC](https://discuss.tryton.org/t/about-include-more-cost-to-compute-margin/3313/3 "2020-10-19T17:32:05Z")

</div>

Here is [Add shipment cost to outgoing moves (#9740) · Issues · Tryton / Tryton · GitLab](https://bugs.tryton.org/issue9740)
