TRISTO Posted January 31, 2022 Report Posted January 31, 2022 Hello, Is there anyone else having strange numbers on the renewal invoice? My case... I have a customer with two services (domain 15,86 with VAT and hosting 134,20 with VAT) and a discount coupon 15% on hosting only (-20,13 with VAT). Total with VAT is 129,93 in this amount the VAT is 23,43. Price without VAT is calculated wrong. It is not 99,24, but 129,93 - 23,43 = 106,5. Anyone else with this problem? What am I doing wrong? Thank you for help. Tomaz Quote
TRISTO Posted January 31, 2022 Author Report Posted January 31, 2022 I've found a bug in vendors/blesta/pricing/src/Type/ItemPrice.php line #158: -return parent::total() - abs($this->taxAmount(null, TaxPrice::INCLUSIVE_CALCULATED)); +return parent::total() - ($this->taxAmount(null, TaxPrice::INCLUSIVE_CALCULATED)); If price is negative (with discount coupon), tax is negative and should not be absolute. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.