Topic: A Bug in Item Sales Summary Report

In order to veiw this bug login at fa.boxygen.biz/fa2325

id: demouser
pass: 123456

Check the Item Sales Summary Report of September 2016. It will show something belo

102 17inch VGA Monitor 5         
103 32MB VGA Card       6       
104 52x CD Drive          10

While If you check the Inventory Sales Report of September 2016. It will show something like below

102 17inch VGA Monitor 2         
103 32MB VGA Card       6       
104 52x CD Drive          10

The 3 Quantity of VGA Monitor was Credited (Returned) but it is not reflecting in Item Sales Summary REport

www.boxygen.pk

Re: A Bug in Item Sales Summary Report

When crediting did you choose Write off the items? Or?

/Joe

Re: A Bug in Item Sales Summary Report

No, I choose the Item returned to inventory location.

www.boxygen.pk

Re: A Bug in Item Sales Summary Report

Hell @joe could you check it further?

www.boxygen.pk

Re: A Bug in Item Sales Summary Report

*Hello

www.boxygen.pk

6 (edited by apmuthu 11/28/2016 05:02:04 pm)

Re: A Bug in Item Sales Summary Report

@joe: Boxygen's claim needs to be checked for reporting consistency.

Re: A Bug in Item Sales Summary Report

@boxygen

You are absolutely right. There was a bug in the Item Sales Summary Report.

Please try the attached file and tell me if this is ok now. Rename it to rep309.php. Thanks for finding this.

/Joe

Post's attachments

rep309.php1 5.4 kb, 3 downloads since 2016-11-28 

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

Re: A Bug in Item Sales Summary Report

Quickfix @joe. Thanks.

Line 53 in the new file:

        AND (line.debtor_trans_type = ".ST_SALESINVOICE." OR line.debtor_trans_type = ".ST_CUSTCREDIT.")";

may also be

        AND (line.debtor_trans_type IN (".ST_SALESINVOICE.", ".ST_CUSTCREDIT."))";

This way, when more transaction types needs to be added, it would be easily readable.

Please commit it.

Re: A Bug in Item Sales Summary Report

Thanks @Joe for your action.

However the bug is still there. Earlier it was not subtracting the credited quantity and now it is adding back. Means now the result in Item sales Summary report is like below

102 17inch VGA Monitor 8 (instead of 2)         
103 32MB VGA Card       6       
104 52x CD Drive          10

www.boxygen.pk

10 (edited by apmuthu 12/04/2016 02:18:40 am)

Re: A Bug in Item Sales Summary Report

Try to replace line 41 (in both FA 2.3 and 2.4):

SUM(line.quantity) as quantity

with

SUM(IF(line.debtor_trans_type = ".ST_CUSTCREDIT.", -line.quantity, line.quantity)) as quantity

Re: A Bug in Item Sales Summary Report

Oh yes, and please report back if this is ok. Then I will commit the change.

/Joe

Re: A Bug in Item Sales Summary Report

Its Perfect Now.
Thanks @Joe and @apmuthu
Regards.

www.boxygen.pk

Re: A Bug in Item Sales Summary Report

Thanks @joe: Stands committed in FA 2.3 and FA 2.4.