Jump to content

Price without VAT amount on the invoice is wrong if coupon in percentage


TRISTO

Recommended Posts

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.

 

slika.png.a6c1c35111852de8abb9c42856cedd8c.png

Anyone else with this problem? What am I doing wrong?

 

Thank you for help.

 

Tomaz

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...