From: <tim...@us...> - 2010-06-24 22:32:28
|
Revision: 3522 http://web-erp.svn.sourceforge.net/web-erp/?rev=3522&view=rev Author: tim_schofield Date: 2010-06-24 22:32:20 +0000 (Thu, 24 Jun 2010) Log Message: ----------- OffersReceived.php - Deal correctly with case where the cancreate flag is turned off for user/currency Modified Paths: -------------- trunk/OffersReceived.php trunk/doc/Change.log.html Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2010-06-24 22:08:41 UTC (rev 3521) +++ trunk/OffersReceived.php 2010-06-24 22:32:20 UTC (rev 3522) @@ -32,21 +32,26 @@ LEFT JOIN suppliers ON suppliers.supplierid=offers.supplierid WHERE purchorderauth.userid="'.$_SESSION['UserID'].'" - AND offers.expirydate>"'.date('Y-m-d').'"'; + AND offers.expirydate>"'.date('Y-m-d').'" + AND purchorderauth.cancreate=0'; $result=DB_query($sql, $db); - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . - _('Select Supplier') . '" alt="">' . ' ' . _('Select Supplier') . '</p>'; - echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; - echo '<table class=selection>'; - echo '<tr><td>'._('Select Supplier').'</td>'; - echo '<td><select name=supplierid>'; - while ($myrow=DB_fetch_array($result)) { - echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>'; + if (DB_num_rows($result)==0) { + prnMsg(_('There are no offers outstanding that you are authorised to deal with'), 'information'); + } else { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . + _('Select Supplier') . '" alt="">' . ' ' . _('Select Supplier') . '</p>'; + echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; + echo '<table class=selection>'; + echo '<tr><td>'._('Select Supplier').'</td>'; + echo '<td><select name=supplierid>'; + while ($myrow=DB_fetch_array($result)) { + echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>'; + } + echo '</select></td></tr>'; + echo '<tr><td colspan=12><div class="centre"><input type=submit name=select value=' . _('Enter Information') . '></div></td></tr>'; + echo '</table>'; + echo '</form>'; } - echo '</select></td></tr>'; - echo '<tr><td colspan=12><div class="centre"><input type=submit name=select value=' . _('Enter Information') . '></div></td></tr>'; - echo '</table>'; - echo '</form>'; } if (!isset($_POST['submit']) and isset($_POST['supplierid'])) { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-24 22:08:41 UTC (rev 3521) +++ trunk/doc/Change.log.html 2010-06-24 22:32:20 UTC (rev 3522) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>24/06/10 Tim: OffersReceived.php - Deal correctly with case where the cancreate flag is turned off for user/currency</p> <p>24/06/10 Tim: SelectWorkOrder.php - Layout changes</p> <p>24/06/10 Tim: WorkOrderEntry.php - sql string must be unset before it can become an array</p> <p>24/06/10 Tim: upgrade3.11.1-3.12.sql - Add fields in salesorderfdetails table to enable new salesman commission program</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |