This topic is locked
[SOLVED]

 calculations with totals on list page

7/9/2020 5:48:57 AM
PHPRunner General questions
J
jacques author

hi
I'm tying do some calculations with totals on a list page.

I found a possible solution ont the page possible solution
the example:
$debit
$xt);
In my case I added on the before display:

[indent]

$credit = strip_tags($xt->getvar("credit_tax_total"));

$debit = strip_tags($xt->getvar("debet_tax_total"));

if ($debit!=0)

$xt->assign("txt_totaal",($credit-$debit));[/indent]
Is this still working in the latest version?

I don't get it working
thanks

Sergey Kornilov admin 7/9/2020

You need to troubleshoot this code to find out what exactly doesn't work.
For instance, you can print variables like $credit and $debit on the page to see what exactly is happening there.

J
jacques author 7/9/2020



You need to troubleshoot this code to find out what exactly doesn't work.
For instance, you can print variables like $credit and $debit on the page to see what exactly is happening there.


I find my solution:

  1. remove the currency
  2. replace comma by a point
    then do some calculatin