Topic: Bug in report 110

Hello,
it seems there is a bug in report 110 "Print Deliveries"
the bug appears when you create a new sales order and add a shipping value.

the shipping value would be shown correctly in the sales order report.
but when printing deliveries the shipping value w'll always appear as "0" even though the total balance is correct.

i tested it on the default demo page and i got the same result.

please check the attached image
https://ibb.co/cATmYb

Post's attachments

Bug_in_DN.png 208.9 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: Bug in report 110

Replace line 161 in reporting/rep110.php:

                    $DisplayFreight = number_format2($sign*$myrow["ov_freight"],$dec);

with:

                    $DisplayFreight = number_format2($myrow["ov_freight"],$dec);

The $sign is not defined anywhere in the report and may be present through some include when a sales order is being printed. The $sign was not present in FA 2.3.x.

@joe: Should this be committed?

Re: Bug in report 110

works great now.. but wondering why $sign works just fine in other reports like 107.

Re: Bug in report 110

I will look at this in a while.

Joe

Re: Bug in report 110

Addendum to your commit:

In rep102.php, $sign is computed and then used in the sql so it is okay.

In rep107.php $sign is assigned 1 and used and hence it can be fully eliminated unless there are some CAST issues.

In rep113.php, $sign is assigned -1 and used and may be removed likewise and the sign made inline.

In rep109.php, rep111.php and rep209.php just as in rep110.php here, $sign is not assigned anywhere in the script and hence can be removed as done herein.

Re: Bug in report 110

@joe: Thanks for the commit.