Created
July 30, 2013 11:53
-
-
Save chadhutchins/6112305 to your computer and use it in GitHub Desktop.
SugarLogic Calculated Field script to calculate the subtotal, with respect to quantity and provided discount (dollar amount or percentage), for product line items on SugarCRM Quotes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifElse( | |
$discount_select, | |
multiply( | |
subtract( | |
$discount_price, | |
multiply( | |
$discount_price, | |
divide( | |
$discount_amount, | |
100 | |
) | |
) | |
), | |
$quantity | |
), | |
multiply( | |
subtract( | |
$discount_price, | |
$discount_amount | |
), | |
$quantity | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment