[Weberp-svn] SF.net SVN: weberp:[6832] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-07-21 16:22:41
|
Revision: 6832 http://weberp.svn.sourceforge.net/weberp/?rev=6832&view=rev Author: tim_schofield Date: 2011-07-21 16:22:34 +0000 (Thu, 21 Jul 2011) Log Message: ----------- Changes to coding layout Modified Paths: -------------- trunk/Prices_Customer.php trunk/SelectOrderItems.php Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-07-21 16:22:21 UTC (rev 6831) +++ trunk/Prices_Customer.php 2011-07-21 16:22:34 UTC (rev 6832) @@ -145,18 +145,19 @@ branchcode, startdate, enddate) - valueS ('".$Item."', - '".$SalesType."', - '".$CurrCode."', - '" . $_SESSION['CustomerID'] . "', - '" . $_POST['Price'] . "', - '" . $_POST['Units'] . "', - '" . $_POST['ConversionFactor'] . "', - '" . $_POST['DecimalPlaces'] . "', - '" . $_POST['Branch'] . "', - '" . FormatDateForSQL($_POST['StartDate']) . "', - '" . FormatDateForSQL($_POST['EndDate']) . "' - )"; + VALUES ( + '".$Item."', + '".$SalesType."', + '".$CurrCode."', + '" . $_SESSION['CustomerID'] . "', + '" . $_POST['Price'] . "', + '" . $_POST['Units'] . "', + '" . $_POST['ConversionFactor'] . "', + '" . $_POST['DecimalPlaces'] . "', + '" . $_POST['Branch'] . "', + '" . FormatDateForSQL($_POST['StartDate']) . "', + '" . FormatDateForSQL($_POST['EndDate']) . "' + )"; $msg = _('Price added') . '.'; } //run the SQL from either of the above possibilites @@ -168,7 +169,7 @@ } else { $msg = _('The price could not be added because') . ' - ' . DB_error_msg($db); } - }else { + } else { ReSequenceEffectiveDates ($Item, $SalesType, $CurrCode, $_SESSION['CustomerID'], $db); unset($_POST['EndDate']); unset($_POST['StartDate']); @@ -209,20 +210,20 @@ prices.typeabbrev, prices.startdate, prices.enddate - FROM prices - WHERE prices.stockid='" . $Item . "' - AND prices.typeabbrev='". $SalesType ."' - AND prices.currabrev ='". $CurrCode ."' - AND prices.debtorno='' - ORDER BY currabrev, - typeabbrev, - startdate"; + FROM prices + WHERE prices.stockid='" . $Item . "' + AND prices.typeabbrev='". $SalesType ."' + AND prices.currabrev ='". $CurrCode ."' + AND prices.debtorno='' + ORDER BY currabrev, + typeabbrev, + startdate"; $ErrMsg = _('Could not retrieve the normal prices set up because'); $DbgMsg = _('The SQL used to retrieve these records was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); -echo '<table><tr><td valign=top>'; +echo '<table><tr><td valign="top">'; echo '<table class="selection">'; if (DB_num_rows($result) == 0) { @@ -310,20 +311,21 @@ $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } echo '<tr bgcolor="#CCCCCC"> - <td class="number">'.number_format($myrow['price'],2).'</td> - <td>'.$Branch.'</td> - <td>'.$myrow['units'].'</td> - <td class="number">'.$myrow['conversionfactor'].'</td> - <td class="number">'.$myrow['decimalplaces'].'</td> - <td>'.ConvertSQLDate($myrow['startdate']).'</td> - <td>'.$EndDateDisplay.'</td> - <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&delete=yes">' . _('Delete') . '</td></tr>'; + <td class="number">'.number_format($myrow['price'],2).'</td> + <td>'.$Branch.'</td> + <td>'.$myrow['units'].'</td> + <td class="number">'.$myrow['conversionfactor'].'</td> + <td class="number">'.$myrow['decimalplaces'].'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</a></td> + <td><a href="'.$_SERVER['PHP_SELF'].'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&delete=yes">' . _('Delete') . '</a></td> + </tr>'; } //END WHILE LIST LOOP } -echo '</table></tr></table><br />'; +echo '</table></td></tr></table><br />'; echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -410,12 +412,12 @@ while ($myrow=DB_fetch_array($result)) { $CustomerCurrency=$myrow['currency']; if ($myrow['branchcode']==$_POST['branch']) { - echo '<option selected value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; + echo '<option selected="True" value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; } else { echo '<option value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; } } -echo '</td></tr>'; +echo '</select></td></tr>'; echo '<tr><td>' . _('Currency') .':</td><td>' . $CustomerCurrency.'</td></tr>'; echo '<tr><td>' . _('Price Effective From Date') . ':</td> <td><input type="text" name="StartDate" class="date" alt="'.$_SESSION['DefaultDateFormat']. @@ -429,18 +431,16 @@ $result = DB_query($sql, $db); while ($myrow = DB_fetch_array($result)) { if ($_POST['Units'] == $myrow['unitname']) { - echo '<option selected value="' . $myrow['unitname'] . '">' . $myrow['unitname'] . '</option>'; + echo '<option selected="True" value="' . $myrow['unitname'] . '">' . $myrow['unitname'] . '</option>'; } else if ($DefaultUOM == $myrow['unitname'] and ($_POST['Units'] != $myrow['unitname'])) { - echo '<option selected value="' . $myrow['unitname'] . '">' . $myrow['unitname'] . '</option>'; + echo '<option selected="True" value="' . $myrow['unitname'] . '">' . $myrow['unitname'] . '</option>'; } else { echo '<option value="' . $myrow['unitname'] . '">' . $myrow['unitname'] . '</option>'; } } -echo '</td></tr>'; +echo '</select></td></tr>'; echo '<input type="hidden" name="Item" value="'.$Item.'" />'; -echo '</select></td></tr>'; - echo '<tr><td>'. _('Decimal Places') . '<br />'._('to display').'</td>'; echo '<td><input type="text" class="number" name="DecimalPlaces" size="8" maxlength="8" value="'; if(isset($_POST['DecimalPlaces'])) { @@ -448,7 +448,7 @@ } else { echo '0'; } -echo '">'; +echo '" /></td></tr>'; echo '<tr><td>'. _('Conversion Factor') . '<br />'._('to stock units').'</td>'; echo '<td><input type="text" class="number" name="ConversionFactor" size="8" maxlength="8" value="'; @@ -457,7 +457,7 @@ } else { echo '1'; } -echo '">'; +echo '" /></td></tr>'; echo '<tr><td>' . _('Price') . ':</td> <td><input type="text" class="number" name="Price" size="11" maxlength="10" value="' . $_POST['Price'] . '" /></td> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-21 16:22:21 UTC (rev 6831) +++ trunk/SelectOrderItems.php 2011-07-21 16:22:34 UTC (rev 6832) @@ -614,7 +614,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Enter an Order or Quotation') . ' : ' . _('Search for the Customer Branch.') . '</p>'; - echo '<div class="page_help_text">' . _('Orders/Quotations are placed against the Customer Branch. A Customer may have several Branches.') . '<div/>'; + echo '<div class="page_help_text">' . _('Orders/Quotations are placed against the Customer Branch. A Customer may have several Branches.') . '</div>'; ?> <form action="<?php echo $_SERVER['PHP_SELF'] . '?identifier='.$identifier;?>" name="SelectCustomer" method="post"> <?php @@ -624,17 +624,17 @@ <table cellpadding="3" colspan="4" class="selection"> <tr> <td><h5><?php echo _('Part of the Customer Branch Name'); ?>:</h5></td> - <td><input tabindex="1" type="Text" name="CustKeywords" size="20" maxlength="25"><td/> + <td><input tabindex="1" type="Text" name="CustKeywords" size="20" maxlength="25"></td> <td><h2><b><?php echo _('OR'); ?></b></h2></td> <td><h5><?php echo _('Part of the Customer Branch Code'); ?>:</h5></td> - <td><input tabindex="2" type="Text" name="CustCode" size="15" maxlength="18"><td/> + <td><input tabindex="2" type="Text" name="CustCode" size="15" maxlength="18"></td> <td><h2><b><?php echo _('OR'); ?></b></h2></td> <td><h5><?php echo _('Part of the Branch Phone Number'); ?>:</h5></td> - <td><input tabindex="3" type="Text" name="CustPhone" size="15" maxlength="18"><td/> - <tr/> - <table/> + <td><input tabindex="3" type="Text" name="CustPhone" size="15" maxlength="18"></td> + </tr> + </table> <br /><div class="centre"><input tabindex="4" type="submit" name="SearchCust" value="<?php echo _('Search Now'); ?>"> - <input tabindex="5" type="submit" action="reset" value="<?php echo _('Reset'); ?>"><div/> + <input tabindex="5" type="submit" action="reset" value="<?php echo _('Reset'); ?>"></div> <?php if (isset($result_CustSelect)) { @@ -647,7 +647,7 @@ <th>' . _('Contact') . '</th> <th>' . _('Phone') . '</th> <th>' . _('Fax') . '</th> - <tr/>'; + </tr>'; echo $TableHeader; $j = 1; @@ -674,14 +674,14 @@ <td>'.$myrow['contactname'].'</td> <td>'.$myrow['phoneno'].'</td> <td>'.$myrow['faxno'].'</td> - <tr/><form/>'; + </tr></form>'; $LastCustomer=$myrow['name']; $j++; //end of page full new headings if } //end of while loop - echo '<table/>'; + echo '</table>'; }//end if results to show @@ -753,17 +753,17 @@ echo '</b> ' . _('From Location') . ':<b> ' . $_SESSION['Items'.$identifier]->LocationName; echo '</b><br />' . _('Sales Type') . '/' . _('Price List') . ':<b> ' . $_SESSION['Items'.$identifier]->SalesTypeName; echo '</b><br />' . _('Terms') . ':<b> ' . $_SESSION['Items'.$identifier]->PaymentTerms; - echo '</b><div/>'; + echo '</b></div>'; } if (isset($_POST['Search']) or isset($_POST['Next']) or isset($_POST['Prev'])){ if ($_POST['Keywords']!=='' AND $_POST['StockCode']=='') { - $msg='</b><div class="page_help_text">' . _('Order Item description has been used in search') . '.<div/>'; + $msg='</b><div class="page_help_text">' . _('Order Item description has been used in search') . '.</div>'; } elseif ($_POST['StockCode']!=='' AND $_POST['Keywords']=='') { - $msg='</b><div class="page_help_text">' . _('Stock Code has been used in search') . '.<div/>'; + $msg='</b><div class="page_help_text">' . _('Stock Code has been used in search') . '.</div>'; } elseif ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { - $msg='</b><div class="page_help_text">' . _('Stock Category has been used in search') . '.<div/>'; + $msg='</b><div class="page_help_text">' . _('Stock Category has been used in search') . '.</div>'; } if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces @@ -915,13 +915,13 @@ OR isset($_POST['QuickEntry']) OR isset($_POST['Recalculate'])){ - /* get the item details from the database and hold them in the cart object */ + /* get the item details from the database and hold them in the cart object */ - /*Discount can only be set later on -- after quick entry -- so default discount to 0 in the first place */ - $Discount = 0; - - $i=1; - while ($i<=$_SESSION['QuickEntries'] and isset($_POST['part_' . $i]) and $_POST['part_' . $i]!='') { + /*Discount can only be set later on -- after quick entry -- so default discount to 0 in the first place */ + $Discount = 0; + $AlreadyWarnedAboutCredit = false; + $i=1; + while ($i<=$_SESSION['QuickEntries'] and isset($_POST['part_' . $i]) and $_POST['part_' . $i]!='') { $QuickEntryCode = 'part_' . $i; $QuickEntryQty = 'qty_' . $i; $QuickEntryPOLine = 'poline_' . $i; @@ -1077,7 +1077,7 @@ stockid) SELECT loccode, '" . $AssetStockID . "' - FROM locations",$db); + FROM locations",$db); /*Now the asset has been added to the stock master we can add it to the sales order */ $NewItemDue = date($_SESSION['DefaultDateFormat']); if (isset($_POST['POLine'])){ @@ -1104,6 +1104,7 @@ } } + $AlreadyWarnedAboutCredit = false; foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){ @@ -1313,7 +1314,7 @@ if($_SESSION['Items'.$identifier]->DefaultPOLine == 1){ echo '<th>' . _('PO Line') . '</th>'; } - echo '<div class="page_help_text">' . _('Quantity (required) - Enter the number of units ordered. Price (required) - Enter the unit price. Discount (optional) - Enter a percentage discount. GP% (optional) - Enter a percentage Gross Profit (GP) to add to the unit cost. Due Date (optional) - Enter a date for delivery.') . '<div/><br />'; + echo '<div class="page_help_text">' . _('Quantity (required) - Enter the number of units ordered. Price (required) - Enter the unit price. Discount (optional) - Enter a percentage discount. GP% (optional) - Enter a percentage Gross Profit (GP) to add to the unit cost. Due Date (optional) - Enter a date for delivery.') . '</div><br />'; echo '<th>' . _('Item Code') . '</th> <th>' . _('Item Description') . '</th> <th>' . _('Quantity') . '</th> @@ -1326,7 +1327,7 @@ <th>' . _('GP %') . '</th>'; } echo '<th>' . _('Total') . '</th> - <th>' . _('Due Date') . '</th><tr/>'; + <th>' . _('Due Date') . '</th></tr>'; $_SESSION['Items'.$identifier]->total = 0; $_SESSION['Items'.$identifier]->totalVolume = 0; @@ -1394,11 +1395,11 @@ echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size=10 maxlength=10 value=' . $LineDueDate . '></td>'; - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td><tr/>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td></tr>'; if ($_SESSION['AllowOrderLineItemNarrative'] == 1){ echo $RowStarter; - echo '<td colspan=10>' . _('Narrative') . ':<textarea name="Narrative_' . $OrderLine->LineNumber . '" cols="100%" rows="1">' . stripslashes(AddCarriageReturns($OrderLine->Narrative)) . '</textarea><br /></td><tr/>'; + echo '<td colspan=10>' . _('Narrative') . ':<textarea name="Narrative_' . $OrderLine->LineNumber . '" cols="100%" rows="1">' . stripslashes(AddCarriageReturns($OrderLine->Narrative)) . '</textarea><br /></td></tr>'; } else { echo '<input type="hidden" name="Narrative" value="" />'; } @@ -1416,7 +1417,7 @@ $ColSpanNumber = 1; } echo '<tr class="EvenTableRows"><td class="number" colspan=7><b>' . _('TOTAL Excl Tax/Freight') . '</b></td> - <td colspan="' . $ColSpanNumber . '" class="number">' . $DisplayTotal . '</td><tr/><table/>'; + <td colspan="' . $ColSpanNumber . '" class="number">' . $DisplayTotal . '</td></tr></table>'; $DisplayVolume = number_format($_SESSION['Items'.$identifier]->totalVolume,2); $DisplayWeight = number_format($_SESSION['Items'.$identifier]->totalWeight,2); @@ -1428,7 +1429,7 @@ echo '<br /><div class="centre"><input type="submit" name="Recalculate" Value="' . _('Re-Calculate') . '"> - <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"><div/><hr>'; + <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"><div/><hr />'; } # end of if lines /* Now show the stock item selection search stuff below */ @@ -1459,7 +1460,7 @@ $result2 = DB_query($SQL,$db); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' '; echo _('Frequently Ordered Items') . '</p><br />'; - echo '<div class="page_help_text">' . _('Frequently Ordered Items') . _(', shows the most frequently ordered items in the last 6 months. You can choose from this list, or search further for other items') . '.<div/><br />'; + echo '<div class="page_help_text">' . _('Frequently Ordered Items') . _(', shows the most frequently ordered items in the last 6 months. You can choose from this list, or search further for other items') . '.</div><br />'; echo '<table class="table1">'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> @@ -1470,7 +1471,7 @@ <th>' . _('Available') . '</th> <th>' . _('Quantity') . '</th> <th>' . _('Price') . '</th> - <tr/>'; + </tr>'; echo $TableHeader; $j = 1; $k=0; //row colour counter @@ -1565,7 +1566,7 @@ <td class="number">%s</td> <td><font size=1><input class="number" tabindex='.number_format($j+7).' type="textbox" size=6 name="itm'.$myrow['stockid'].'" value=0> </td> - <tr/>', + </tr>', $myrow['stockid'], $myrow['description'], $myrow['units'], @@ -1581,12 +1582,12 @@ } #end of while loop for Frequently Ordered Items echo '<td style="text-align:center" colspan=8><input type="hidden" name="order_items" value=1><input tabindex='.number_format($j+8).' type="submit" value="'._('Add to Sales Order').'"></td>'; - echo '<table/>'; + echo '</table>'; } //end of if Frequently Ordered Items > 0 - echo '<p><div class="centre"><b>' . $msg . '</b><div/></p>'; + echo '<p><div class="centre"><b>' . $msg . '</b></div></p>'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' '; echo _('Search for Order Items') . '</p>'; - echo '<div class="page_help_text">' . _('Search for Order Items') . _(', Searches the database for items, you can narrow the results by selecting a stock category, or just enter a partial item description or partial item code') . '.<div/><br />'; + echo '<div class="page_help_text">' . _('Search for Order Items') . _(', Searches the database for items, you can narrow the results by selecting a stock category, or just enter a partial item description or partial item code') . '.</div><br />'; echo '<table class="selection"><tr><td><b>' . _('Select a Stock Category') . ': </b><select tabindex=1 name="StockCat">'; if (!isset($_POST['StockCat'])){ @@ -1622,7 +1623,7 @@ if (isset($_POST['StockCode'])) { echo $_POST['StockCode']; } - echo '"></td><tr/>'; + echo '"></td></tr>'; echo '<tr> <td style="text-align:center" colspan=1><input tabindex=4 type="submit" name="Search" value="' . _('Search Now') . '"></td> @@ -1634,12 +1635,12 @@ if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ //not a customer entry of own order echo '<td style="text-align:center" colspan=1><input tabindex=6 type="submit" name="ChangeCustomer" value="' . _('Change Customer') . '"></td> <td style="text-align:center" colspan=1><input tabindex=7 type="submit" name="SelectAsset" value="' . _('Fixed Asset Disposal') . '"></td> - <tr/><table/><br />'; + </tr></table><br />'; } if (isset($SearchResult)) { echo '<br />'; - echo '<div class="page_help_text">' . _('Select an item by entering the quantity required. Click Order when ready.') . '<div/>'; + echo '<div class="page_help_text">' . _('Select an item by entering the quantity required. Click Order when ready.') . '</div>'; echo '<br />'; $j = 1; echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" method="post" name="orderform">'; @@ -1647,7 +1648,7 @@ echo '<table class="table1">'; echo '<tr><td colspan=><input type="hidden" name="previous" value='.number_format($Offset-1).'><input tabindex='.number_format($j+8).' type="submit" name="Prev" value="'._('Prev').'"></td>'; echo '<td style="text-align:center" colspan="7"><input type="hidden" name="order_items" value=1><input tabindex='.number_format($j+9).' type="submit" value="'._('Add to Sales Order').'"></td>'; - echo '<td><input type="hidden" name="nextlist" value='.number_format($Offset+1).'><input tabindex='.number_format($j+10).' type="submit" name="Next" value="'._('Next').'"></td><tr/>'; + echo '<td><input type="hidden" name="nextlist" value='.number_format($Offset+1).'><input tabindex='.number_format($j+10).' type="submit" name="Next" value="'._('Next').'"></td></tr>'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th> @@ -1657,7 +1658,7 @@ <th>' . _('Available') . '</th> <th>' . _('Quantity') . '</th> <th>' . _('Price') . '</th> - <tr/>'; + </tr>'; echo $TableHeader; $ImageSource = _('No Image'); @@ -1799,7 +1800,7 @@ <input type="hidden" name="StockID'.$i.'" value="'.$myrow['stockid'].'" /> <td class="number">'.number_format($PriceRow['price'],2).'</td> </td> - <tr/>'; + </tr>'; echo '<input type="hidden" name="ConversionFactor'.$i.'" value="' . $PriceRow['conversionfactor'] . '" />'; echo '<input type="hidden" name="Units'.$i.'" value="' . $myrow['units'] . '" />'; if ($j==1) { @@ -1812,14 +1813,14 @@ echo '<tr><td><input type="hidden" name="previous" value='.number_format($Offset-1).'><input tabindex='.number_format($j+7).' type="submit" name="Prev" value="'._('Prev').'"></td>'; echo '<td style="text-align:center" colspan="7"><input type="hidden" name="order_items" value=1><input tabindex='.number_format($j+8).' type="submit" value="'._('Add to Sales Order').'"></td>'; echo '<td><input type="hidden" name="nextlist" value='.number_format($Offset+1).'><input tabindex='.number_format($j+9).' type="submit" name="Next" value="'._('Next').'"></td><tr/>'; - echo '<table/><form/>'; + echo '</table></form>'; echo $jsCall; }#end if SearchResults to show } /*end of PartSearch options to be displayed */ elseif( isset($_POST['QuickEntry'])) { /* show the quick entry form variable */ /*FORM VARIABLES TO POST TO THE ORDER WITH PART CODE AND QUANTITY */ - echo '<div class="page_help_text"><b>' . _('Use this screen for the '). _('Quick Entry')._(' of products to be ordered') . '</b><div/><br /> + echo '<div class="page_help_text"><b>' . _('Use this screen for the '). _('Quick Entry')._(' of products to be ordered') . '</b></div><br /> <table border="1"> <tr>'; /*do not display colum unless customer requires po line number by sales order line*/ @@ -1829,7 +1830,7 @@ echo '<th>' . _('Part Code') . '</th> <th>' . _('Quantity') . '</th> <th>' . _('Due Date') . '</th> - <tr/>'; + </tr>'; $DefaultDeliveryDate = DateAdd(Date($_SESSION['DefaultDateFormat']),'d',$_SESSION['Items'.$identifier]->DeliveryDays); for ($i=1;$i<=$_SESSION['QuickEntries'];$i++){ @@ -1841,21 +1842,21 @@ echo '<td><input type="text" name="part_' . $i . '" size="21" maxlength="20"></td> <td><input type="text" name="qty_' . $i . '" size="6" maxlength="6"></td> <td><input type="text" class="date" name="itemdue_' . $i . '" size="25" maxlength="25" - alt="'.$_SESSION['DefaultDateFormat'].'" value="' . $DefaultDeliveryDate . '"></td><tr/>'; + alt="'.$_SESSION['DefaultDateFormat'].'" value="' . $DefaultDeliveryDate . '"></td></tr>'; } echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.part_1);}</script>'; - echo '<table/><br /><div class="centre"><input type="submit" name="QuickEntry" value="' . _('Quick Entry') . '"> - <input type="submit" name="PartSearch" value="' . _('Search Parts') . '"><div/>'; + echo '</table><br /><div class="centre"><input type="submit" name="QuickEntry" value="' . _('Quick Entry') . '"> + <input type="submit" name="PartSearch" value="' . _('Search Parts') . '"></div>'; } elseif (isset($_POST['SelectAsset'])){ - echo '<div class="page_help_text"><b>' . _('Use this screen to select an asset to dispose of to this customer') . '</b><div/><br /> + echo '<div class="page_help_text"><b>' . _('Use this screen to select an asset to dispose of to this customer') . '</b></div><br /> <table border="1">'; /*do not display colum unless customer requires po line number by sales order line*/ if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){ echo '<tr><td>' . _('PO Line') . '</td> - <td><input type="text" name="poline" size="21" maxlength="20"></td><tr/>'; + <td><input type="text" name="poline" size="21" maxlength="20"></td></tr>'; } echo '<tr><td>' . _('Asset to Dispose Of') . ':</td> <td><select name="AssetToDisposeOf">'; @@ -1864,18 +1865,18 @@ while ($AssetRow = DB_fetch_array($AssetsResult)){ echo '<option value="' . $AssetRow['assetid'] . '">' . $AssetRow['assetid'] . ' - ' . $AssetRow['description'] . '</option>'; } - echo '</select></td><tr/><table/> + echo '</select></td></tr></table> <br /><div class="centre"><input type="submit" name="AssetDisposalEntered" value="' . _('Add Asset To Order') . '"> - <input type="submit" name="PartSearch" value="' . _('Search Parts') . '"><div/>'; + <input type="submit" name="PartSearch" value="' . _('Search Parts') . '"></div>'; } //end of if it is a Quick Entry screen/part search or asset selection form to display if ($_SESSION['Items'.$identifier]->ItemsOrdered >=1){ - echo '<br /><div class="centre"><input type="submit" name="CancelOrder" value="' . _('Cancel Whole Order') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel this entire order?') . '\');"><div/>'; + echo '<br /><div class="centre"><input type="submit" name="CancelOrder" value="' . _('Cancel Whole Order') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel this entire order?') . '\');"></div>'; } }#end of else not selecting a customer -echo '<form/>'; +echo '</form>'; if (isset($_GET['NewOrder']) and $_GET['NewOrder']!='') { echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectCustomer.CustKeywords);}</script>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |