From: <tim...@us...> - 2010-06-25 23:46:22
|
Revision: 3523 http://web-erp.svn.sourceforge.net/web-erp/?rev=3523&view=rev Author: tim_schofield Date: 2010-06-25 23:46:16 +0000 (Fri, 25 Jun 2010) Log Message: ----------- Add facility of the supplier to view, amend, or remove offers. Modified Paths: -------------- trunk/SupplierTenders.php trunk/doc/Change.log.html Modified: trunk/SupplierTenders.php =================================================================== --- trunk/SupplierTenders.php 2010-06-24 22:32:20 UTC (rev 3522) +++ trunk/SupplierTenders.php 2010-06-25 23:46:16 UTC (rev 3523) @@ -48,7 +48,7 @@ echo '<table class=selection>'; echo'<tr><td>'._('Select option for tendering').'</td>'; echo '<td><select name=TenderType>'; -// echo '<option value=1>'._('View or Amend outstanding offers from').' '.$Supplier .'</option>'; + echo '<option value=1>'._('View or Amend outstanding offers from').' '.$Supplier .'</option>'; echo '<option value=2>'._('Create a new offer from').' '.$Supplier .'</option>'; // echo '<option value=3>'._('View any open tenders without an offer from').' '.$Supplier .'</option>'; echo '</select></td></tr>'; @@ -152,6 +152,37 @@ exit; } +/*The supplier has chosen option 1 + */ +if (isset($_POST['TenderType']) and $_POST['TenderType']==1) { + $sql='SELECT offers.offerid, + offers.stockid, + stockmaster.description, + offers.quantity, + offers.uom, + offers.price, + offers.expirydate, + stockmaster.decimalplaces + FROM offers + LEFT JOIN stockmaster + ON offers.stockid=stockmaster.stockid + WHERE offers.supplierid="'.$_POST['SupplierID'].'"'; + $result=DB_query($sql, $db); + $_SESSION['offer']=new Offer(); + $_SESSION['offer']->SupplierID=$_POST['SupplierID']; + $_SESSION['offer']->CurrCode=$Currency; + while ($myrow=DB_fetch_array($result)) { + $_SESSION['offer']->add_to_offer( + $myrow['offerid'], + $myrow['stockid'], + $myrow['quantity'], + $myrow['description'], + $myrow['price'], + $myrow['uom'], + $myrow['decimalplaces']); + } +} + if (isset($_SESSION['offer']) and $_SESSION['offer']->LinesOnOffer>0 or isset($_POST['Update'])) { echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">"; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/supplier.png" title="' . @@ -192,11 +223,6 @@ echo '</form>'; } -/*The supplier has chosen option 1 - */ -if (isset($_POST['TenderType']) and $_POST['TenderType']==1) { -} - /*The supplier has chosen option 2 */ if (isset($_POST['TenderType']) and $_POST['TenderType']==2 and !isset($_POST['Search']) or isset($_GET['Delete'])) { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-06-24 22:32:20 UTC (rev 3522) +++ trunk/doc/Change.log.html 2010-06-25 23:46:16 UTC (rev 3523) @@ -1,6 +1,7 @@ <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>25/06/10 Tim: SupplierTender.php - Add facility of the supplier to view, amend, or remove offers.</p> +<p>24/06/10 Tim: OffersReceived.php - Deal correctly with case where the cancreate flag is turned off for user/currency combination</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. |