Home Forums Plugin Support WP Project Manager Pro Invoice Add-on Math not working with decimal values

This topic is: not resolved

This topic contains 4 replies, has 3 voices, and was last updated by  Nayem 3 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #40132

    Blake
    Member
    Post count: 23

    Hello,

    The Issue:
    I bill in 15 min increments, so it's really important to use values with decimals like 5.25 hours, or 0.5 hours. The current invoice line totals are showing correct sums after saving, but the subtotal and total did not reflect any amounts using the decimal.

    In other words, I'd enter $50 / hour, at 0.5 hours, and it would total up as $0.00

    Or, I'd enter $50 / hour, at 1.5 hours, and it would total up as $50 instead of $75

    #40133

    Blake
    Member
    Post count: 23

    The Solution:
    I had someone from my team just fix it for me.

    Essentially find-and-replace “parseInt” with “parseFloat” in two files:
    wp-content/plugins/wedevs-pm-invoice-71cc7c6140ab/assets/js/script.js
    wp-content/plugins/wedevs-pm-invoice-71cc7c6140ab/assets/js/script.min.js

    This seems to work for me. Hopefully someone finds this helpful.
    View Screenshot

    #40158

    Nayem
    Moderator
    Post count: 6480

    Hello Blake,

    Thank you for sharing this great solution. It will help many client.

    #40310

    Gary
    Member
    Post count: 13

    This needs to be rolled into an update I have a few clients sites which I will be installing this on soon and I know at least two of them want to bill in 15 minutes slots.

    #40335

    Nayem
    Moderator
    Post count: 6480

    Hello,

    I have already notified to our developer team about this. They will add this decimal values in our next release.

    Thank you ๐Ÿ™‚

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Invoice Add-on Math not working with decimal values’ is closed to new replies.