Jump to content

invoice calcLineTotals() wrong total


Blesta Addons

Recommended Posts

sometimes we get a wrong total in the invoice edition or addition, after some investigaion we found the fallowing issue.

we have the currency format $1 234,56 with precision 2.

let create a new invoice, with two lines :

Description     - Qty    -  Unit Cost
test line 1           1             1
test line 1           1             2,33

this return a total of 5,00$ USD.

after enabling the error reporting we found the fallowing error

 A non well formed numeric value encountered on line 95 in /home/xxxxxxxxxxx/public_html/vendors/blesta/pricing/src/Type/UnitPrice.php 

the issue come from (2,33) when we put (2.33) we get the exact total $5,66 USD

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...