How:Slice & Dice Library Data: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 53: Line 53:
; Add these fields to Orders:
; Add these fields to Orders:
:* '''Product margin''' — [[Calculation field]]
:* '''Product margin''' — [[Calculation field]]
::* Either using the '''+Field''' button or by just typing, enter this script:
:: Either using the '''+Field''' button or by just typing, enter this script:
<source lang="JavaScript">
<source lang="JavaScript">
#{product.std price} - #{product.cost}
#{product.std price} - #{product.cost}
</source>
</source>
:* '''Product margin %''' &mdash; [[Calculation field]]
:* '''Product margin %''' &mdash; [[Calculation field]]
::* Enter this script:
:: Enter this script:
<source lang="JavaScript">
<source lang="JavaScript">
( #{product.std price} - #{product.cost} ) * 100 / #{product.cost}
( #{product.std price} - #{product.cost} ) * 100 / #{product.cost}
</source>
</source>
:* '''Order margin''' &mdash; [[Calculation field]]
:* '''Order margin''' &mdash; [[Calculation field]]
::* Enter this script:
:: Enter this script:
<source lang="JavaScript">
<source lang="JavaScript">
#{price} - #{product.cost}
#{price} - #{product.cost}
</source>
</source>
:* '''Order margin %''' &mdash; [[Calculation field]]
:* '''Order margin %''' &mdash; [[Calculation field]]
::* Enter this script:
:: Enter this script:
<source lang="JavaScript">
<source lang="JavaScript">
( #{price} - #{product.cost} ) * 100 / #{product.cost}
( #{price} - #{product.cost} ) * 100 / #{product.cost}

Navigation menu