From: <tim...@us...> - 2010-07-06 22:00:36
|
Revision: 3579 http://web-erp.svn.sourceforge.net/web-erp/?rev=3579&view=rev Author: tim_schofield Date: 2010-07-06 22:00:30 +0000 (Tue, 06 Jul 2010) Log Message: ----------- Layout improvements Modified Paths: -------------- trunk/DiscountCategories.php trunk/doc/Change.log.html Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2010-07-06 21:59:59 UTC (rev 3578) +++ trunk/DiscountCategories.php 2010-07-06 22:00:30 UTC (rev 3579) @@ -58,9 +58,10 @@ $sql="UPDATE stockmaster SET discountcategory='' WHERE stockid='" . trim(strtoupper($_GET['StockID'])) ."'"; $result = DB_query($sql,$db); prnMsg( _('The stock master record has been updated to no discount category'),'success'); + echo '<br>'; } elseif (isset($_POST['submitcategory'])) { - $sql="UPDATE stockmaster - SET discountcategory='".$_POST['DiscountCategory']."' + $sql="UPDATE stockmaster + SET discountcategory='".$_POST['DiscountCategory']."' WHERE categoryid='".$_POST['stockcategory']."'"; $result=DB_query($sql, $db); } @@ -71,7 +72,7 @@ $sql = "SELECT DISTINCT discountcategory FROM stockmaster WHERE discountcategory <>''"; $result = DB_query($sql, $db); if (DB_num_rows($result) > 0) { - echo '<table><tr><td>'. _('Discount Category Code') .': </td>'; + echo '<table class=selection><tr><td>'. _('Discount Category Code') .': </td>'; echo '<td><select name="DiscCat" onChange="ReloadForm(update.select)">'; @@ -91,16 +92,16 @@ echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; echo '<input type="hidden" name="chooseoption" value="'.$_POST['chooseoption'].'">'; echo '<input type="hidden" name="selectchoice" value="'.$_POST['selectchoice'].'">'; - + if (isset($_POST['chooseoption']) and $_POST['chooseoption']==1) { - echo '<table><tr><td>'. _('Discount Category Code') .':</td><td>'; - + echo '<table class=selection><tr><td>'. _('Discount Category Code') .':</td><td>'; + if (isset($_POST['DiscCat'])) { - echo "<input type='text' name='DiscountCategory' maxlength=2 size=2 value='" . $_POST['DiscCat'] . + echo "<input type='text' name='DiscountCategory' maxlength=2 size=2 value='" . $_POST['DiscCat'] . "'></td><td>"._('OR')."</td><td></td><td>"._('OR')."</td></tr>"; } else { echo "<input type='text' name='DiscountCategory' maxlength=2 size=2></td><td>". - _('OR')."</td><td></td><td>"._('OR')."</td></tr>"; + _('OR')."</td><td></td><td>"._('OR')."</td></tr>"; } if (!isset($_POST['StockID'])) { @@ -121,14 +122,14 @@ echo '</table>'; echo "<br><div class='centre'><input type='Submit' name='submit' value='". _('Update Item') ."'></div>"; - + if (isset($_POST['search'])) { if ($_POST['PartID']!='' and $_POST['PartDesc']=='') $sql='SELECT stockid, description FROM stockmaster WHERE stockid LIKE"%'.$_POST['PartID'].'%"'; if ($_POST['PartID']=='' and $_POST['PartDesc']!='') $sql='SELECT stockid, description FROM stockmaster WHERE description LIKE"%'.$_POST['PartDesc'].'%"'; if ($_POST['PartID']!='' and $_POST['PartDesc']!='') - $sql='SELECT stockid, description FROM stockmaster WHERE stockid LIKE"%'.$_POST['PartID'].'%" and + $sql='SELECT stockid, description FROM stockmaster WHERE stockid LIKE"%'.$_POST['PartID'].'%" and description LIKE"%'.$_POST['PartDesc'].'%"'; $result=DB_query($sql,$db); if (!isset($_POST['stockID'])) { @@ -139,11 +140,11 @@ } } } else { - echo '<table><tr><td>'._('Assign discount category').'</td>'; + echo '<table class=selection><tr><td>'._('Assign discount category').'</td>'; echo '<td><input type="text" name="DiscountCategory" maxlength=2 size=2></td>'; echo '<td>'._('to all items in stock category').'</td>'; - $sql = 'SELECT categoryid, - categorydescription + $sql = 'SELECT categoryid, + categorydescription FROM stockcategory'; $result = DB_query($sql, $db); echo '<td><select name="stockcategory">'; @@ -154,7 +155,7 @@ echo "<br><div class='centre'><input type='Submit' name='submitcategory' value='". _('Update Items') ."'></div>"; } echo '</form>'; - + if (! isset($_POST['DiscCat'])){ /*set DiscCat to something to show results for first cat defined */ $sql = "SELECT DISTINCT discountcategory FROM stockmaster WHERE discountcategory <>''"; @@ -179,7 +180,7 @@ $result = DB_query($sql,$db); - echo '<br><table border=1>'; + echo '<br><table class=selection>'; echo "<tr> <th>". _('Discount Category') ."</th> <th>". _('Item') .'</th></tr>'; @@ -218,7 +219,7 @@ if (!isset($_POST['selectchoice'])) { echo "<form method='post' name='choose' action=" . $_SERVER['PHP_SELF'] . '?' . SID . '>'; - echo '<table>'; + echo '<table class=selection>'; echo '<tr><td>'._('Update discount category for').'</td>'; echo '<td><select name="chooseoption" onChange="ReloadForm(choose.selectchoice)">'; echo '<option value="1">'._('a single stock item').'</option>'; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-07-06 21:59:59 UTC (rev 3578) +++ trunk/doc/Change.log.html 2010-07-06 22:00:30 UTC (rev 3579) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>05/07/10 Tim: DiscountCategories.php - Layout improvements</p> <p>05/07/10 Tim: DemandWorkOrders.php - Remove redundant file</p> <p>05/07/10 Tim: DeliveryDetails.php - sql corrections</p> <p>05/07/10 Tim: DebtorsAtPeriodEnd.php - Report design changes, screen layout changes, and sql corrections</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |