Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Picking List: only the first item of an order is printed
12-14-2017, 09:44 AM, (This post was last modified: 12-15-2017, 01:28 PM by HDeriauFF.)
#1
Picking List: only the first item of an order is printed
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!
Reply
12-14-2017, 01:50 PM, (This post was last modified: 12-14-2017, 02:00 PM by TurboPT.)
#2
RE: Picking List: only the first item of an order is printed
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.
Reply
12-14-2017, 02:15 PM,
#3
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.
Reply
12-14-2017, 03:23 PM, (This post was last modified: 12-14-2017, 03:25 PM by TurboPT.)
#4
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.
Reply
12-15-2017, 03:01 AM,
#5
RE: Picking List: only the first item of an order is printed
Applying the above changes did not solve the issue.
Thank you for your time however!
Reply
12-15-2017, 03:04 AM,
#6
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
Reply
12-15-2017, 07:01 AM,
#7
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

Reply
12-15-2017, 08:35 AM,
#8
RE: Picking List: only the first item of an order is printed
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
Reply
12-16-2017, 10:32 AM, (This post was last modified: 12-16-2017, 10:44 AM by TurboPT.)
#9
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. Sad
(was that file ever committed to SVN?)
Reply
12-16-2017, 06:45 PM,
#10
RE: Picking List: only the first item of an order is printed
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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)