Question: Pos Balance amount is not showing

Pos Balance amount is not showing

Hello. The balance amount of some pos bill is not showing. I thing when the total amount have zero value in its decimal then it shows the balance amount otherwise it do not show it. Kindly c

MA

Muhammad Irfan Ahmed

Asked
Hello. The balance amount of some pos bill is not showing. I thing when the total amount have zero value in its decimal then it shows the balance amount otherwise it do not show it. Kindly check and reply me asap. I am attaching the snapshot.
  • MS

    Mian Saleem

    Answered
    Hello,

    I can't guess what's wrong. Is there any error in the console log. Did you test it on live demo?
  • MA

    Muhammad Irfan Ahmed

    Answered
    Yes I tested. the problem is in the file themes/pos/sales.php

    function balance(x, number) {
    if (!x) {
    return '0.00';
    }
    var b = x.split('__');
    var total = parseFloat(b[0]);
    var rounding = parseFloat(b[1]);
    var paid = parseFloat(b[2]);
    if (number == 'number') {
    return formatDecimals(formatDecimals(total)+rounding-paid);
    }
    return currencyFormat(formatDecimals(formatDecimals(total)+rounding-paid));
    }

    Due to the formatdecimals the value becomes zero..
  • MS

    Mian Saleem

    Answered
    That isn't used for the row level. That's only used to calculate total in the table footer.

    Is it showing if you just return `x` back?
  • MA

    Muhammad Irfan Ahmed

    Answered
    I just removed the formatdecimals, and the it shows..
  • MS

    Mian Saleem

    Answered
    Oh that's strange, I will check again. Thanks
  • MA

    Muhammad Irfan Ahmed

    Answered
    ok thank you
    One thing more How many installations can we do on one license? I am just using this software for my shop...
  • MS

    Mian Saleem

    Answered
    Hello,

    *One **active production** installation per license.* You can have separate test/dev installation too.

    Thank you
  • Login to Reply