webERP Forum
Picking List: only the first item of an order is printed - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Problems / Bugs? (http://www.weberp.org/forum/forumdisplay.php?fid=8)
+--- Thread: Picking List: only the first item of an order is printed (/showthread.php?tid=7988)

Pages: 1 2 3 4 5 6 7 8


Picking List: only the first item of an order is printed - HDeriauFF - 12-14-2017

Hi

When printing my picking lists, only the first item is printed.
If an item is an assembly, the components are printed below the master product (at least the first one, since my assembly only has one component) Anyone with similar issues?

Thanks!


RE: Picking List: only the first item of an order is printed - TurboPT - 12-14-2017

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.


RE: Picking List: only the first item of an order is printed - HDeriauFF - 12-14-2017

(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.



RE: Picking List: only the first item of an order is printed - TurboPT - 12-14-2017

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.


RE: Picking List: only the first item of an order is printed - HDeriauFF - 12-15-2017

Applying the above changes did not solve the issue.
Thank you for your time however!


RE: Picking List: only the first item of an order is printed - VortecCPI - 12-15-2017

I suggest you echo the $sql variable to the screen and start by looking at that.


RE: Picking List: only the first item of an order is printed - HDeriauFF - 12-15-2017

(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




RE: Picking List: only the first item of an order is printed - TimSchofield - 12-15-2017

I have a script called GeneratePickingLists.php that has an SVN stamp on for Andrew Galuski in August 2014. It works well for me producing picking lists for orders with multiple lines.

It was obviously in SVN at one time but appears to have been removed (at least I can't see it). Anybody know why?

Tim


RE: Picking List: only the first item of an order is printed - TurboPT - 12-16-2017

@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. Sad
(was that file ever committed to SVN?)


RE: Picking List: only the first item of an order is printed - TimSchofield - 12-16-2017

Yes it was Paul, line 3 of the file is

/* $Id: GeneratePickingList.php 1 2014-08-26 11:54:03Z agaluski $*/

which is inserted by the sourceforge SVN when a commit is made. I can send you the script if you want as it will probably help sort this query out anyway. I don't think Andrew monitors this forum anymore but I can ask him if he remembers what happened if you want?

Tim