Why hasn't this worked though 
It's applying the percentage discount, but only to the unit price? 
because the calulation uses the TruePrice column which is the unit price, it should use the TotalPrice column instead.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.