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 52: Line 52:


; Add these fields to Orders:
; Add these fields to Orders:
:* '''Product margin''' — [[JavaScript 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">
field('Product std price') - field('Product cost')
#{product.std price} - #{product.cost}
</source>
</source>
:* '''Order margin''' &mdash; [[JavaScript field]]
:* '''Order margin''' &mdash; [[Calculation field]]
::* Enter this script:
::* Enter this script:
<source lang="JavaScript">
<source lang="JavaScript">
field('Price') - field('Product cost')
#{price} - #{product.cost}
</source>
</source>


Navigation menu