From: <dai...@us...> - 2011-02-20 03:52:33
|
Revision: 4494 http://web-erp.svn.sourceforge.net/web-erp/?rev=4494&view=rev Author: daintree Date: 2011-02-20 03:52:26 +0000 (Sun, 20 Feb 2011) Log Message: ----------- number_format conversions Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-02-18 21:41:14 UTC (rev 4493) +++ trunk/PO_Items.php 2011-02-20 03:52:26 UTC (rev 4494) @@ -35,21 +35,21 @@ if (isset($_POST['UpdateLines']) OR isset($_POST['Commit'])) { foreach ($_SESSION['PO'.$identifier]->LineItems as $POLine) { if ($POLine->Deleted == false) { - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['ConversionFactor'.$POLine->LineNo])))){ + if (!is_numeric(str_replace($locale_info['thousands_sep'],'',$_POST['ConversionFactor'.$POLine->LineNo]))){ prnMsg(_('The conversion factor is expected to be numeric - the figure which converts from our units to the supplier units. e.g. if the supplier units is a tonne and our unit is a kilogram then the conversion factor that converts our unit to the suppliers unit is 1000'),'error'); $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor = 1; } else { //a valid number for the conversion factor is entered $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor = doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['ConversionFactor'.$POLine->LineNo])); } - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppQty'.$POLine->LineNo])))){ + if (!is_numeric(str_replace($locale_info['thousands_sep'],'',$_POST['SuppQty'.$POLine->LineNo]))){ prnMsg(_('The quantity in the supplier units is expected to be numeric. Please re-enter as a number'),'error'); } else { //ok to update the PO object variables $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->Quantity=doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppQty'.$POLine->LineNo]))*doubleval(str_replace($locale_info['thousands_sep'],'',$_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor)); } - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo])))){ + if (!is_numeric(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo]))){ prnMsg(_('The supplier price is expected to be numeric. Please re-enter as a number'),'error'); } else { //ok to update the PO object variables - $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->Price=doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo]))/doubleval(str_replace($locale_info['thousands_sep'],'',$_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor)); + $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->Price=(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo]))/$_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor); } $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->NetWeight=$_POST['NetWeight'.$POLine->LineNo]; $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ReqDelDate=$_POST['ReqDelDate'.$POLine->LineNo]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-02-20 03:52:33
|
Revision: 4494 http://web-erp.svn.sourceforge.net/web-erp/?rev=4494&view=rev Author: daintree Date: 2011-02-20 03:52:26 +0000 (Sun, 20 Feb 2011) Log Message: ----------- number_format conversions Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-02-18 21:41:14 UTC (rev 4493) +++ trunk/PO_Items.php 2011-02-20 03:52:26 UTC (rev 4494) @@ -35,21 +35,21 @@ if (isset($_POST['UpdateLines']) OR isset($_POST['Commit'])) { foreach ($_SESSION['PO'.$identifier]->LineItems as $POLine) { if ($POLine->Deleted == false) { - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['ConversionFactor'.$POLine->LineNo])))){ + if (!is_numeric(str_replace($locale_info['thousands_sep'],'',$_POST['ConversionFactor'.$POLine->LineNo]))){ prnMsg(_('The conversion factor is expected to be numeric - the figure which converts from our units to the supplier units. e.g. if the supplier units is a tonne and our unit is a kilogram then the conversion factor that converts our unit to the suppliers unit is 1000'),'error'); $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor = 1; } else { //a valid number for the conversion factor is entered $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor = doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['ConversionFactor'.$POLine->LineNo])); } - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppQty'.$POLine->LineNo])))){ + if (!is_numeric(str_replace($locale_info['thousands_sep'],'',$_POST['SuppQty'.$POLine->LineNo]))){ prnMsg(_('The quantity in the supplier units is expected to be numeric. Please re-enter as a number'),'error'); } else { //ok to update the PO object variables $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->Quantity=doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppQty'.$POLine->LineNo]))*doubleval(str_replace($locale_info['thousands_sep'],'',$_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor)); } - if (!is_numeric(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo])))){ + if (!is_numeric(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo]))){ prnMsg(_('The supplier price is expected to be numeric. Please re-enter as a number'),'error'); } else { //ok to update the PO object variables - $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->Price=doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo]))/doubleval(str_replace($locale_info['thousands_sep'],'',$_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor)); + $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->Price=(doubleval(str_replace($locale_info['thousands_sep'],'',$_POST['SuppPrice'.$POLine->LineNo]))/$_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ConversionFactor); } $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->NetWeight=$_POST['NetWeight'.$POLine->LineNo]; $_SESSION['PO'.$identifier]->LineItems[$POLine->LineNo]->ReqDelDate=$_POST['ReqDelDate'.$POLine->LineNo]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-03-08 09:32:55
|
Revision: 4505 http://web-erp.svn.sourceforge.net/web-erp/?rev=4505&view=rev Author: daintree Date: 2011-03-08 09:32:48 +0000 (Tue, 08 Mar 2011) Log Message: ----------- PO Not an Asset SQL fix Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-03-08 07:38:45 UTC (rev 4504) +++ trunk/PO_Items.php 2011-03-08 09:32:48 UTC (rev 4505) @@ -195,7 +195,7 @@ '" . $_SESSION['PO'.$identifier]->PaymentTerms. "', '" . $_SESSION['PO'.$identifier]->AllowPrintPO . "' )"; - + $ErrMsg = _('The purchase order header record could not be inserted into the database because'); $DbgMsg = _('The SQL statement used to insert the purchase order header record and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); @@ -250,6 +250,7 @@ '" . $POLine->ConversionFactor . "')"; $ErrMsg =_('One of the purchase order detail records could not be inserted into the database because'); $DbgMsg =_('The SQL statement used to insert the purchase order detail record and failed was'); + $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); } } /* end of the loop round the detail line items on the order */ @@ -510,7 +511,10 @@ $_POST['ItemDescription'] = $AssetRow['description']; } } - } //end if an AssetID is entered + } /*end if an AssetID is entered */ + else { + $_POST['AssetID'] = 0; // cannot commit a string to an integer field so make it 0 if AssetID = 'Not an Asset' + } if (strlen($_POST['ItemDescription'])<=3){ $AllowUpdate = false; prnMsg(_('Cannot enter this order line') . ':<br />' . _('The description of the item being purchased is required where a non-stock item is being ordered'),'warn'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-03-08 09:32:55
|
Revision: 4505 http://web-erp.svn.sourceforge.net/web-erp/?rev=4505&view=rev Author: daintree Date: 2011-03-08 09:32:48 +0000 (Tue, 08 Mar 2011) Log Message: ----------- PO Not an Asset SQL fix Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-03-08 07:38:45 UTC (rev 4504) +++ trunk/PO_Items.php 2011-03-08 09:32:48 UTC (rev 4505) @@ -195,7 +195,7 @@ '" . $_SESSION['PO'.$identifier]->PaymentTerms. "', '" . $_SESSION['PO'.$identifier]->AllowPrintPO . "' )"; - + $ErrMsg = _('The purchase order header record could not be inserted into the database because'); $DbgMsg = _('The SQL statement used to insert the purchase order header record and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); @@ -250,6 +250,7 @@ '" . $POLine->ConversionFactor . "')"; $ErrMsg =_('One of the purchase order detail records could not be inserted into the database because'); $DbgMsg =_('The SQL statement used to insert the purchase order detail record and failed was'); + $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); } } /* end of the loop round the detail line items on the order */ @@ -510,7 +511,10 @@ $_POST['ItemDescription'] = $AssetRow['description']; } } - } //end if an AssetID is entered + } /*end if an AssetID is entered */ + else { + $_POST['AssetID'] = 0; // cannot commit a string to an integer field so make it 0 if AssetID = 'Not an Asset' + } if (strlen($_POST['ItemDescription'])<=3){ $AllowUpdate = false; prnMsg(_('Cannot enter this order line') . ':<br />' . _('The description of the item being purchased is required where a non-stock item is being ordered'),'warn'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-31 18:46:21
|
Revision: 4860 http://web-erp.svn.sourceforge.net/web-erp/?rev=4860&view=rev Author: daintree Date: 2012-01-31 18:46:10 +0000 (Tue, 31 Jan 2012) Log Message: ----------- bug fix Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-01-31 09:26:48 UTC (rev 4859) +++ trunk/PO_Items.php 2012-01-31 18:46:10 UTC (rev 4860) @@ -1126,11 +1126,6 @@ } #end of while loop echo '</table>'; - if ($PartsDisplayed == $Maximum_Number_Of_Parts_To_Show){ - /*$Maximum_Number_Of_Parts_To_Show defined in config.php */ - prnMsg( _('Only the first') . ' ' . $Maximum_Number_Of_Parts_To_Show . ' ' . _('can be displayed') . '. ' . - _('Please restrict your search to only the parts required'),'info'); - } echo '<a name="end"></a><br /><div class="centre"><input type="submit" name="NewItem" value="Order some" /></div>'; }#end if SearchResults to show This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-31 18:46:21
|
Revision: 4860 http://web-erp.svn.sourceforge.net/web-erp/?rev=4860&view=rev Author: daintree Date: 2012-01-31 18:46:10 +0000 (Tue, 31 Jan 2012) Log Message: ----------- bug fix Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-01-31 09:26:48 UTC (rev 4859) +++ trunk/PO_Items.php 2012-01-31 18:46:10 UTC (rev 4860) @@ -1126,11 +1126,6 @@ } #end of while loop echo '</table>'; - if ($PartsDisplayed == $Maximum_Number_Of_Parts_To_Show){ - /*$Maximum_Number_Of_Parts_To_Show defined in config.php */ - prnMsg( _('Only the first') . ' ' . $Maximum_Number_Of_Parts_To_Show . ' ' . _('can be displayed') . '. ' . - _('Please restrict your search to only the parts required'),'info'); - } echo '<a name="end"></a><br /><div class="centre"><input type="submit" name="NewItem" value="Order some" /></div>'; }#end if SearchResults to show This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-26 15:28:25
|
Revision: 4976 http://web-erp.svn.sourceforge.net/web-erp/?rev=4976&view=rev Author: ExsonQu Date: 2012-02-26 15:28:19 +0000 (Sun, 26 Feb 2012) Log Message: ----------- 26/02/2012 PO_Items.php Add $_SESSION and $_POST variables to fixed extra lines added while page refreshing or push F5. Reported by CQZ and Ke from webERP Chinese forum QQ group. Fixed by Exson Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-02-26 14:59:18 UTC (rev 4975) +++ trunk/PO_Items.php 2012-02-26 15:28:19 UTC (rev 4976) @@ -507,8 +507,10 @@ } /*end if Enter line button was hit - adding non stock items */ +//Add variables $_SESSION['PO_ItemsResubmitForm' . $identifier] and $_POST['PO_ItemsResubmitFormValue'] to prevent from page refreshing effect -if (isset($_POST['NewItem'])){ +$_SESSION['PO_ItemsResubmitForm' . $identifier] = (empty($_SESSION['PO_ItemsResubmitForm' . $identifier]))? '1' : $_SESSION['PO_ItemsResubmitForm' . $identifier]; +if (isset($_POST['NewItem']) and !empty($_POST['PO_ItemsResubmitFormValue']) and $_SESSION['PO_ItemsResubmitForm' . $identifier] == $_POST['PO_ItemsResubmitFormValue']){ //only submit values can be processed /* NewItem is set from the part selection list as the part code selected * take the form entries and enter the data from the form into the PurchOrder class variable @@ -634,6 +636,7 @@ } /* end of if not already on the order */ } /* end if the $_POST has NewQty in the variable name */ } /* end loop around the $_POST array */ + $_SESSION['PO_ItemsResubmitForm' . $identifier]++; //change the $_SESSION VALUE } /* end of if its a new item */ /* This is where the order as selected should be displayed reflecting any deletions or insertions*/ @@ -1126,9 +1129,10 @@ } #end of while loop echo '</table>'; + echo '<input type="hidden" name="PO_ItemsResubmitFormValue" value="' . $_SESSION['PO_ItemsResubmitForm' . $identifier] . '" />'; echo '<a name="end"></a><br /><div class="centre"><input type="submit" name="NewItem" value="Order some" /></div>'; }#end if SearchResults to show echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ex...@us...> - 2012-02-26 15:28:25
|
Revision: 4976 http://web-erp.svn.sourceforge.net/web-erp/?rev=4976&view=rev Author: ExsonQu Date: 2012-02-26 15:28:19 +0000 (Sun, 26 Feb 2012) Log Message: ----------- 26/02/2012 PO_Items.php Add $_SESSION and $_POST variables to fixed extra lines added while page refreshing or push F5. Reported by CQZ and Ke from webERP Chinese forum QQ group. Fixed by Exson Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-02-26 14:59:18 UTC (rev 4975) +++ trunk/PO_Items.php 2012-02-26 15:28:19 UTC (rev 4976) @@ -507,8 +507,10 @@ } /*end if Enter line button was hit - adding non stock items */ +//Add variables $_SESSION['PO_ItemsResubmitForm' . $identifier] and $_POST['PO_ItemsResubmitFormValue'] to prevent from page refreshing effect -if (isset($_POST['NewItem'])){ +$_SESSION['PO_ItemsResubmitForm' . $identifier] = (empty($_SESSION['PO_ItemsResubmitForm' . $identifier]))? '1' : $_SESSION['PO_ItemsResubmitForm' . $identifier]; +if (isset($_POST['NewItem']) and !empty($_POST['PO_ItemsResubmitFormValue']) and $_SESSION['PO_ItemsResubmitForm' . $identifier] == $_POST['PO_ItemsResubmitFormValue']){ //only submit values can be processed /* NewItem is set from the part selection list as the part code selected * take the form entries and enter the data from the form into the PurchOrder class variable @@ -634,6 +636,7 @@ } /* end of if not already on the order */ } /* end if the $_POST has NewQty in the variable name */ } /* end loop around the $_POST array */ + $_SESSION['PO_ItemsResubmitForm' . $identifier]++; //change the $_SESSION VALUE } /* end of if its a new item */ /* This is where the order as selected should be displayed reflecting any deletions or insertions*/ @@ -1126,9 +1129,10 @@ } #end of while loop echo '</table>'; + echo '<input type="hidden" name="PO_ItemsResubmitFormValue" value="' . $_SESSION['PO_ItemsResubmitForm' . $identifier] . '" />'; echo '<a name="end"></a><br /><div class="centre"><input type="submit" name="NewItem" value="Order some" /></div>'; }#end if SearchResults to show echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2013-04-27 17:18:09
|
Revision: 5854 http://sourceforge.net/p/web-erp/reponame/5854 Author: samudaya Date: 2013-04-27 17:18:05 +0000 (Sat, 27 Apr 2013) Log Message: ----------- When purchasing a non-stock item (asset), AssetID goes to wrong column in purchorderdetails table (Column name - suppliers_partno). Fixed the bug and now save the AssetID in correct column (Column name - assetid). Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2013-04-26 06:54:04 UTC (rev 5853) +++ trunk/PO_Items.php 2013-04-27 17:18:05 UTC (rev 5854) @@ -511,6 +511,7 @@ 2, $_POST['SuppliersUnit'], 1, + 1, '', $_POST['AssetID']); include ('includes/PO_UnsetFormVbls.php'); |
From: <ice...@us...> - 2013-06-08 16:04:04
|
Revision: 6009 http://sourceforge.net/p/web-erp/reponame/6009 Author: icedlava Date: 2013-06-08 16:04:01 +0000 (Sat, 08 Jun 2013) Log Message: ----------- PO update - fix sql where deladd6 overwritten with tel value Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2013-06-06 16:33:23 UTC (rev 6008) +++ trunk/PO_Items.php 2013-06-08 16:04:01 UTC (rev 6009) @@ -274,7 +274,7 @@ deladd4='" . $_SESSION['PO'.$identifier]->DelAdd4 . "', deladd5='" . $_SESSION['PO'.$identifier]->DelAdd5 . "', deladd6='" . $_SESSION['PO'.$identifier]->DelAdd6 . "', - deladd6='" . $_SESSION['PO'.$identifier]->Tel . "', + tel='" . $_SESSION['PO'.$identifier]->Tel . "', suppdeladdress1='" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', suppdeladdress2='" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', suppdeladdress3='" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', @@ -389,9 +389,9 @@ $Result = DB_Txn_Commit($db); /* Only show the link to auto receive the order if the user has permission to receive goods and permission to authorise and has authorised the order */ - if ($_SESSION['PO'.$identifier]->Status == 'Authorised' + if ($_SESSION['PO'.$identifier]->Status == 'Authorised' AND in_array($_SESSION['PageSecurityArray']['GoodsReceived.php'], $_SESSION['AllowedPageSecurityTokens'])){ - + echo '<a href="SupplierInvoice.php?SupplierID=' . $_SESSION['PO'.$identifier]->SupplierID . '&ReceivePO=' . $_SESSION['PO'.$identifier]->OrderNo . '&DeliveryDate=' . $_SESSION['PO'.$identifier]->DeliveryDate . '">' . _('Receive and Enter Purchase Invoice') . '</a>'; } @@ -656,7 +656,7 @@ $LeadTime=1; $DeliveryDate = $_SESSION['PO'.$identifier]->DeliveryDate; } - + $_SESSION['PO'.$identifier]->add_to_order ($_SESSION['PO'.$identifier]->LinesOnOrder+1, $ItemCode, 0, /*Serialised */ |
From: <ex...@us...> - 2015-03-08 04:43:31
|
Revision: 7207 http://sourceforge.net/p/web-erp/reponame/7207 Author: exsonqu Date: 2015-03-08 04:43:26 +0000 (Sun, 08 Mar 2015) Log Message: ----------- 08/03/15 Exson: Fixed undefined index noise in PO_Items.php. Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2015-03-07 17:44:35 UTC (rev 7206) +++ trunk/PO_Items.php 2015-03-08 04:43:26 UTC (rev 7207) @@ -1023,7 +1023,7 @@ ORDER BY stockmaster.stockid "; } } else { // for a specific stock category - if ($_POST['SupplierItemsOnly']=='on'){ + if (isset($_POST['SupplierItemsOnly']) AND $_POST['SupplierItemsOnly']=='on'){ $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units @@ -1059,6 +1059,8 @@ $SQLCount = substr($sql,strpos($sql, "FROM")); $SQLCount = substr($SQLCount,0, strpos($SQLCount, "ORDER")); $SQLCount = 'SELECT COUNT(*) '.$SQLCount; + $ErrMsg = _('Failed to retrieve result count'); + $DbgMsg = _('The SQL failed is '); $SearchResult = DB_query($SQLCount,$ErrMsg,$DbgMsg); $myrow=DB_fetch_array($SearchResult); DB_free_result($SearchResult); |
From: <te...@us...> - 2016-08-09 07:17:21
|
Revision: 7583 http://sourceforge.net/p/web-erp/reponame/7583 Author: tehonu Date: 2016-08-09 07:17:19 +0000 (Tue, 09 Aug 2016) Log Message: ----------- Fixed bug showing N rows instead of 1 when SepplierItemsOnly = on Modified Paths: -------------- trunk/PO_Items.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2016-08-06 21:44:43 UTC (rev 7582) +++ trunk/PO_Items.php 2016-08-09 07:17:19 UTC (rev 7583) @@ -871,9 +871,9 @@ AND stockmaster.discontinued<>1 AND purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID . "' AND stockmaster.description " . LIKE . " '" . $SearchString ."' - ORDER BY stockmaster.stockid "; + GROUP BY stockmaster.stockid + ORDER BY stockmaster.stockid"; } else { // not just supplier purchdata items - $sql = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units @@ -904,6 +904,7 @@ AND stockmaster.discontinued<>1 AND stockmaster.description " . LIKE . " '". $SearchString ."' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid ORDER BY stockmaster.stockid "; } else { $sql = "SELECT stockmaster.stockid, @@ -942,6 +943,7 @@ AND purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID . "' AND stockmaster.discontinued<>1 AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' + GROUP BY stockmaster.stockid ORDER BY stockmaster.stockid "; } else { $sql = "SELECT stockmaster.stockid, @@ -974,6 +976,7 @@ and stockmaster.discontinued<>1 AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid ORDER BY stockmaster.stockid "; } else { $sql = "SELECT stockmaster.stockid, @@ -1008,6 +1011,7 @@ AND stockmaster.mbflag<>'G' AND purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID . "' AND stockmaster.discontinued<>1 + GROUP BY stockmaster.stockid ORDER BY stockmaster.stockid "; } else { $sql = "SELECT stockmaster.stockid, @@ -1038,6 +1042,7 @@ AND purchdata.supplierno='" . $_SESSION['PO'.$identifier]->SupplierID . "' AND stockmaster.discontinued<>1 AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + GROUP BY stockmaster.stockid ORDER BY stockmaster.stockid "; } else { $sql = "SELECT stockmaster.stockid, |