12-14-2017, 02:15 PM,
|
|
HDeriauFF
Senior Member
|
Posts: 149
Threads: 56
Joined: Dec 2017
|
|
RE: Picking List: only the first item of an order is printed
(12-14-2017, 01:50 PM)TurboPT Wrote: Thanks for the report, HDeriauFF.
Yes, there appears to be some mishandling in that script.
I'm investigating, but I may need the assistance of other weberp developers to check as well, because I don't have any "orders" data to test the "normal" route.
I only have a "Preview" route, but this usage is not very useful for a good test/debug, especially to check multiple order handling.
thank you so much for looking into it !
When echoing the query and running it directly in sql, it returns the same set of the first record.
|
|
12-14-2017, 03:23 PM,
(This post was last modified: 12-14-2017, 03:25 PM by TurboPT.)
|
|
TurboPT
Administrator
|
Posts: 727
Threads: 10
Joined: Jun 2012
|
|
RE: Picking List: only the first item of an order is printed
One minor thing that you can try, is to change line 332...
From this:
PHP Code: if ($Page_Height-$YPos-$line_height <= 50)
To this:
PHP Code: if ( ($Page_Height-$YPos-$line_height) <= 50)
I was seeing a strange negative value from the calculation, so that minor change at least allowed me to get some output from my basic testing.
However, that change will likely NOT solve all issues, but see if that might somewhat help the situation.
|
|
12-15-2017, 03:04 AM,
|
|
VortecCPI
Paul Becker
|
Posts: 751
Threads: 211
Joined: Apr 2017
|
|
RE: Picking List: only the first item of an order is printed
I suggest you echo the $sql variable to the screen and start by looking at that.
https://www.linkedin.com/in/eclipsepaulbecker
|
|
12-15-2017, 07:01 AM,
|
|
HDeriauFF
Senior Member
|
Posts: 149
Threads: 56
Joined: Dec 2017
|
|
RE: Picking List: only the first item of an order is printed
(12-15-2017, 03:04 AM)VortecCPI Wrote: I suggest you echo the $sql variable to the screen and start by looking at that.
That's what I'm doing.
I have two orders that are printed on the picking list, each has two lines
the screen echo renders one query for the first order, then another query for the second order. But each query doesn't loop through the entire order, only the first line: here are orders 30 and 31 each should have two items
Code: SELECT salesorderdetails.stkcode, stockmaster.description, salesorderdetails.orderlineno, salesorderdetails.quantity, salesorderdetails.qtyinvoiced, SUM(pickinglistdetails.qtyexpected) as qtyexpected, SUM(pickinglistdetails.qtypicked) as qtypicked, salesorderdetails.unitprice, salesorderdetails.narrative, stockmaster.decimalplaces FROM salesorderdetails INNER JOIN stockmaster ON salesorderdetails.stkcode=stockmaster.stockid LEFT JOIN pickinglists ON salesorderdetails.orderno=pickinglists.orderno LEFT JOIN pickinglistdetails ON pickinglists.pickinglistno=pickinglistdetails.pickinglistno WHERE salesorderdetails.orderno='30' AND salesorderdetails.orderlineno=pickinglistdetails.orderlineno
SELECT salesorderdetails.stkcode, stockmaster.description, salesorderdetails.orderlineno, salesorderdetails.quantity, salesorderdetails.qtyinvoiced, SUM(pickinglistdetails.qtyexpected) as qtyexpected, SUM(pickinglistdetails.qtypicked) as qtypicked, salesorderdetails.unitprice, salesorderdetails.narrative, stockmaster.decimalplaces FROM salesorderdetails INNER JOIN stockmaster ON salesorderdetails.stkcode=stockmaster.stockid LEFT JOIN pickinglists ON salesorderdetails.orderno=pickinglists.orderno LEFT JOIN pickinglistdetails ON pickinglists.pickinglistno=pickinglistdetails.pickinglistno WHERE salesorderdetails.orderno='31' AND salesorderdetails.orderlineno=pickinglistdetails.orderlineno
|
|
12-16-2017, 10:32 AM,
(This post was last modified: 12-16-2017, 10:44 AM by TurboPT.)
|
|
TurboPT
Administrator
|
Posts: 727
Threads: 10
Joined: Jun 2012
|
|
RE: Picking List: only the first item of an order is printed
@HDeriauFF:
Thanks for the query info, I can likely use that to build test dummy data.
Might take some time for me looking into this matter.
@Tim:
I looked back into the SVN history, and I could not find that file reference either.
(was that file ever committed to SVN?)
|
|
|