From: <tu...@us...> - 2018-01-09 00:19:02
|
Revision: 7909 http://sourceforge.net/p/web-erp/reponame/7909 Author: turbopt Date: 2018-01-09 00:19:00 +0000 (Tue, 09 Jan 2018) Log Message: ----------- PO_Items.php: Fix/improve Supplier checkbox hanlding, and fix a PHP7 compatibility issue. (Reported in forums by Confucius: http://www.weberp.org/forum/showthread.php?tid=7958) Modified Paths: -------------- trunk/PO_Items.php trunk/doc/Change.log Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2018-01-08 05:57:24 UTC (rev 7908) +++ trunk/PO_Items.php 2018-01-09 00:19:00 UTC (rev 7909) @@ -1149,14 +1149,16 @@ $_POST['StockCode']=''; } + if (isset($_POST['SupplierItemsOnly'])) { + $Checked = 'checked'; + } else { + $Checked = ''; + } + echo '</select></td> <td>' . _('Enter text extracts in the description') . ':</td> <td><input type="text" name="Keywords" size="20" maxlength="25" value="' . $_POST['Keywords'] . '" /></td></tr> - <tr><td>' . _('Only items defined as from this Supplier') . ' <input type="checkbox" checked name="SupplierItemsOnly" '; - if (isset($_POST['SupplierItemsOnly']) AND $_POST['SupplierItemsOnly']=='on'){ - echo 'checked'; - } - echo ' /></td> + <tr><td>' . _('Only items defined as from this Supplier') . ' <input type="checkbox" ' . $Checked . ' name="SupplierItemsOnly" /></td> <td><b>' . _('OR') . ' </b>' . _('Enter extract of the Stock Code') . ':</td> <td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> </tr> @@ -1213,7 +1215,10 @@ } $SupportedImgExt = array('png','jpg','jpeg'); - $imagefile = reset((glob($_SESSION['part_pics_dir'] . '/' . $myrow['stockid'] . '.{' . implode(",", $SupportedImgExt) . '}', GLOB_BRACE))); + + $imagefilearray = (glob($_SESSION['part_pics_dir'] . '/' . $myrow['stockid'] . '.{' . implode(",", $SupportedImgExt) . '}', GLOB_BRACE)); + $imagefile = reset($imagefilearray); + if (extension_loaded('gd') && function_exists('gd_info') && file_exists ($imagefile) ) { $ImageSource = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. '&StockID='.urlencode($myrow['stockid']). Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-08 05:57:24 UTC (rev 7908) +++ trunk/doc/Change.log 2018-01-09 00:19:00 UTC (rev 7909) @@ -1,5 +1,6 @@ webERP Change Log +8/1/18 Tim (PaulT commit): PO_Items.php: Fix/improve Supplier checkbox hanlding, and fix a PHP7 compatibility issue. (Reported in forums by Confucius: http://www.weberp.org/forum/showthread.php?tid=7958) 8/1/18 Paul Becker/Tim (PaulT commit): SalesGraph.php: Replace period numbers in graph title with month and year. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7946) 7/1/18 Paul Becker (PaulT commit): WriteReport.inc: Fix broken page number handling. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7955) 7/1/18 PaulT: Change.log: Update remaining past commit entries (during the past few weeks) to give credit to the right person(s) involved with the change, and when applicable, add the related forum URL for historical reference. |