Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Picking List: only the first item of an order is printed
01-14-2018, 02:43 PM (This post was last modified: 01-14-2018 03:34 PM by TurboPT.)
Post: #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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Picking List: only the first item of an order is printed - TurboPT - 01-14-2018 02:43 PM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)