From: Phil D. <ph...@du...> - 2004-04-21 10:25:14
|
> Here are all of the scripts. It can handle as many parts you want to ship. > I tested it up to 45 parts, worked great. It basically puts the parts in a > Shipper table, then when the receiving person wants to receive them in they > simply go to the receiver page. the script PDFStockLocShipperHeader, needs > to be in the includes. Also, I have attached my index.diff so you can see > where I added the links on the inventory page. > > If you need anything let me know. > > Chris Thanks Chris, This is great, thanks so much for feeding your work back to the project. I started work on the StockLocShipper.php report and input form - there a couple of really minor points that I would encourage you to ignore, but if you wanted to make my life even easier :-) ..... - I try to avoid any dependence on Java ... at all - I have been religious in adherence to the database abstraction functions in ConnectDB.inc - ie there are no mysql specific function calls (at all) in any scripts except ConnectDB.inc eg Last insert ID and mysql err etc. It would a shame to compromise now. - I try to limit nasty messages to the debug user - ie only system administrators. The variable $debug is set to 1 if the user is an administrator in header.inc or session.inc - This stuff is really picky now and absolutely irrelavent to anything much but .... PHP offers a lot of flexibility in its syntax (some see this as a weakness of the language) - your syntax may well be better than that used in existing scripts, but I have adopted a slightly different style in a number of areas: 1. code blocks - my { always follows the statement for which the block is associated with rather than being a line down. else always appears as } else { 2. I try to be careful with indenting, to ensure I don't get into closing } errors. 3. I always contacenate $_POST['IndexName'] variables inside strings rather than have them parsed out by PHP. eg. $StringVble = "This string says $_POST['SomePostedVble'] is one possible way to write it"; However, I write this as: $StringVble = "This string says " . $_POST['SomePostedVble'] . " is another possible way to write it"; 4. I always quote the name of the index of variables eg. $_POST[SomeVariableIndexName] I write as : $_POST['SomeVariableIndexName'] Of course none of this matters really - I guess I have just got used to these peculiarities and having all the scripts written this way so far, it makes sense to me to continue in the same way. I am working through the scripts to make them conform to these conventions. Hope you don't mind. Thanks again for your contributions, please keep em coming! Phil |