Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Picking List: only the first item of an order is printed
01-13-2018, 01:05 PM,
#21
RE: Picking List: only the first item of an order is printed
HDeriauFF:

The pick list area is my main focus at the moment, though I did have a small delay since my post #20, as mentioned here.

Unfortunately, the files from Tim are not a simple "drop-in" replacement, as there have been MANY other weberp updates since Andrew's files from 3.5 years ago that virtually all files need updating to be consistent with current code, along with potentially new tables as briefly mentioned in post #20, AND there are pick list changes to other files that don't exist anywhere in current weberp files of the same name, so these will need merging as well.

Turns out that the effort is more involved than originally perceived!
Reply
01-13-2018, 02:39 PM,
#22
RE: Picking List: only the first item of an order is printed
Thank you for the update!
Reply
01-13-2018, 06:48 PM, (This post was last modified: 01-13-2018, 06:50 PM by TimSchofield.)
#23
RE: Picking List: only the first item of an order is printed
Am happy to help you integrate them if you want?

Tim
Sorry Paul, I read and replied to this post before seeing your email, I will reply there.
Reply
01-14-2018, 08:36 AM,
#24
RE: Picking List: only the first item of an order is printed
I have had a quick look and it isn't as daunting as it first looks. A lot of the script changes were just to add a createdate field in to some tables which the picking list functionality uses. GeneratePickingLists.php makes my old PDFPickingLists.php redundant and it can go along with its header script.

It is worth persisting with as it makes the whole picking list functionality far more professional and detailed. I should have time tomorrow to do a proper diff for you to use.

Tim
Reply
01-14-2018, 02:43 PM, (This post was last modified: 01-14-2018, 03:34 PM by TurboPT.)
#25
RE: Picking List: only the first item of an order is printed
Tim, (hopefully, this is not a TL;DR post...) Smile

Yes, I agree about the PDFPickingList.php, though there are likely changes to the current file (that you have), but this file was not in the zip. There are likely changes between your copy and the trunk that need merging, and I was only curious to know what a copy of your file might be for a diff. Your copy very likely has SQL updates that match his table names (and columns), and fixes to the output that is not working now. This file is referenced from GeneratePickingLists.php.

The only minor 'daunting' part to me, is about the SQL for the table and column name differences. Not only do the table names differ but so do the column names and there are extra columns (and one extra table presence) added in Andrew's files. Therefore, the SQL differences are the big changes here.

The current structure looks like this based on the trunk:
(only 2 tables, but the table names and columns differ, these are NOT in Andrew's files)
Code:
-- 5 columns
CREATE TABLE `pickinglists` (
   `pickinglistno` int(11) NOT NULL DEFAULT '0',
   `orderno` int(11) NOT NULL DEFAULT '0',
   `pickinglistdate` date NOT NULL DEFAULT '0000-00-00',
   `dateprinted` date NOT NULL DEFAULT '0000-00-00',
   `deliverynotedate` date NOT NULL DEFAULT '0000-00-00',
   PRIMARY KEY (`pickinglistno`),
   KEY `pickinglists_ibfk_1` (`orderno`),
   CONSTRAINT `pickinglists_ibfk_1` FOREIGN KEY (`orderno`) REFERENCES `salesorders` (`orderno`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Code:
-- 5 columns
CREATE TABLE `pickinglistdetails` (
   `pickinglistno` int(11) NOT NULL DEFAULT '0',
   `pickinglistlineno` int(11) NOT NULL DEFAULT '0',
   `orderlineno` int(11) NOT NULL DEFAULT '0',
   `qtyexpected` double NOT NULL DEFAULT '0',
   `qtypicked` double NOT NULL DEFAULT '0',
   PRIMARY KEY (`pickinglistno`,`pickinglistlineno`),
   CONSTRAINT `pickinglistdetails_ibfk_1` FOREIGN KEY (`pickinglistno`) REFERENCES `pickinglists` (`pickinglistno`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

=====

...where the tables in Andrew's scripts have:
(3 tables, different names, some similar columns (with different names), but the tables also have more columns than the trunk)
Code:
-- 13 columns (this table name not in the trunk)
CREATE table pickreq (
    prid int not null auto_increment,
    initiator varchar(20) not null default '',
    shippedby varchar(20) not null default '',
    initdate date not null default '0000-00-00',
    requestdate date not null default '0000-00-00',
    shipdate date not null default '0000-00-00',
    status varchar(12) not null default '',
    comments text default null,
    closed tinyint not null default '0',
    loccode varchar(5) not null default '',
    orderno int not null default '1',
    consignment varchar(15) NOT NULL DEFAULT '',
    packages int(11) NOT NULL DEFAULT '1' COMMENT 'number of cartons',
    PRIMARY KEY (`prid`),
    key (`orderno`),
    key (`requestdate`),
    key (`shipdate`),
    key (`status`),
    key (`closed`),
    CONSTRAINT FOREIGN KEY(`loccode`) REFERENCES `locations`(`loccode`),
    constraint foreign key (`orderno`) REFERENCES salesorders(`orderno`)) Engine=InnoDB DEFAULT CHARSET=utf8;
Code:
-- 8 columns (this table name not in the trunk)
CREATE table pickreqdetails (
    detailno int not null auto_increment,
    prid int not null default '1',
    orderlineno int not null default '0',
    stockid varchar(20) not null default '',
    qtyexpected double not null default '0',
    qtypicked double not null default '0',
    invoicedqty double not null default '0',
    shipqty double not null default '0',
    PRIMARY KEY (`detailno`),
    key (`prid`),
    constraint foreign key (`stockid`) REFERENCES stockmaster(`stockid`),
    constraint foreign key (`prid`) REFERENCES pickreq(`prid`))Engine=InnoDB DEFAULT CHARSET=utf8;
Code:
-- 5 columns (this table is NOT in the trunk)
CREATE table pickserialdetails (
    serialmoveid int not null auto_increment,
    detailno int not null default '1',
    stockid varchar(20) not null default '',
    serialno varchar(30) not null default '',
    moveqty double not null default '0',
    PRIMARY KEY (`serialmoveid`),
    key (`detailno`),
    key (`stockid`,`serialno`),
    key (`serialno`),
    CONSTRAINT FOREIGN KEY (`detailno`) REFERENCES pickreqdetails (`detailno`),
    CONSTRAINT FOREIGN KEY (`stockid`,`serialno`) REFERENCES `stockserialitems`(`stockid`,`serialno`)) Engine=InnoDB DEFAULT CHARSET=utf8;
So part of the question (via e-mail), is: are we to completely drop the 2 trunk tables to be replaced by the latter 3 tables that Andrew uses within his scripts?
I'm not sure what the impact might be to current users with this "brute-force" approach, if so?

Most other scripts, as you've said, are not that bad... adds a column here or there, such as a date column, a comment column, updating the stockID, etc...

However, there are other scripts where the new (or Andrew's) picklist table names have updates that don't match the trunk tables within the SQL statements.
Reply
01-14-2018, 11:56 PM,
#26
RE: Picking List: only the first item of an order is printed
Obviously pickserialdetails had no equivalent table before so should probably be empty, I would fill the other two tables as follows (Note this is not an exact science but should give us everything we need - though I wouldn't drop the other tables just yet)

CREATE table pickreq (
prid int not null auto_increment, --> pickinglists.pickinglistno
initiator varchar(20) not null default '', -> ''
shippedby varchar(20) not null default '', -> ''
initdate date not null default '0000-00-00', -> -> pickinglists.dateprinted
requestdate date not null default '0000-00-00', > pickinglists.pickinglistdate
shipdate date not null default '0000-00-00', -> pickinglists.deliverynotedate
status varchar(12) not null default '', -> ''
comments text default null, -> ''
closed tinyint not null default '0', (if pickinglistdetails.qtyexpected = pickinglistdetails.qtypicked then 1 else 0)

CREATE table pickreqdetails (
detailno int not null auto_increment, -> pickinglistdetails.pickinglistlineno
prid int not null default '1', -> pickinglistdetails.pickinglistno
orderlineno int not null default '0', -> pickinglistdetails.orderlineno
stockid varchar(20) not null default '', (salesorderdeails.stkcode WHERE orderno = pickinglists.orderno AND orderlineno = pickinglistdetails.orderlineno)
qtyexpected double not null default '0', -> pickinglistdetails.qtyexpected
qtypicked double not null default '0', -> pickinglistdetails.qtypicked
invoicedqty double not null default '0', -> pickinglistdetails.qtypicked
shipqty double not null default '0', -> pickinglistdetails.qtypicked
Reply
01-15-2018, 03:32 AM,
#27
RE: Picking List: only the first item of an order is printed
Ok, looks like a migration taking shape. That was to be another question, but I had not yet got that far wondering if it may go the "brute-force" route.

There are 4 other columns in the `pickreq` table, one of which is `loccode` as a foreign key, but I may be able to derive this info as part of item #3 below.

So, the "general idea" as it seems at the moment, is to:
  1. Leave the 2 original trunk tables as-is (or in-place) for now...
  2. Create the 3 new tables relative to Andrew's handling...
  3. Migrate the existing data from the existing tables (which will become unused), based on the similar columns... (I can handle this SQL, no problem)
  4. Then see how the overall handling goes from there.
If that is correct, that sounds good, I hope that some of the un-populated columns don't cause issues, such as script filtering uses when output, but we'll see.

Other than that, I might still need to see what your copy of the PDFPickingList.php might contain -- if it differs much from the trunk copy that I have.
Reply
01-15-2018, 05:59 AM,
#28
RE: Picking List: only the first item of an order is printed
PDFPickingLists.php can go. It is superseded by GeneratePickingLists.php

Looking at my code I seem to have not deleted it but that's an oversight it's not referenced anywhere. You can see any of my scripts on my github site but Phil gets himself worked up if I give the link here and I have to go to the trouble of creating a new account on this forum so if you can't find it message me privately.

Tim
Reply
01-15-2018, 07:04 AM, (This post was last modified: 01-15-2018, 07:08 AM by TurboPT.)
#29
RE: Picking List: only the first item of an order is printed
Then you might have updates to the GeneratePickingLists.php script?

I see a link reference to PDFPickingList in that file at line 154:
PHP Code:
        prnMsg_('Unable to Locate any orders for this criteria '), 'info');
        echo 
'<br />
                <table class="selection">
                <tr>
                    <td><a href="'
$RootPath '/PDFPickingList.php">' _('Enter Another Date') . '</a></td>
                </tr>
                </table>
                <br />'

Reply
01-15-2018, 07:15 AM,
#30
RE: Picking List: only the first item of an order is printed
Its a bit hard for me to check as I am just on my phone so I will email you my github repository and you can see my latest code
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)