Thanks to the new update, I created a custom calculation property for line items to calculate the unit price after applying a percentage discount.
The formula used is:
(unit price - (unit price * (unit discount / 100)))
When testing the property, the calculation works correctly. However, when I add this property in the line item section during quote creation, the calculation does not work as expected: it only works if the discount is entered as an absolute number rather than a percentage.
This behavior seems inconsistent, since the property test returns the correct result.
@RNoll Now everything works, thank you very much. However, I’m having a new problem. When I try to insert it into the estimate template, I can’t find it even though I used it in the estimate construction table. Any suggestions?
Quick add-on to Robyn’s fix, since this tripped me up too: ‘unit discount’ is a currency amount, so entering 10 takes $10 off, not 10%. That’s why the test looked right and the quote didn’t — the test was using the value you typed, the quote reads the live field. With discount_percentage it works as expected: a $200 unit price at 10% off is 200 × (1 − 10/100) = $180. One thing to double-check: the discount_percentage field needs to hold the plain number 10, not 0.10 — HubSpot displays it as 10% but stores 10, so you still divide by 100 in the formula.