Thread: [Weberp-svn] SF.net SVN: weberp:[8740] trunk (Page 11)
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2012-04-29 19:22:32
|
Revision: 8740 http://weberp.svn.sourceforge.net/weberp/?rev=8740&view=rev Author: tim_schofield Date: 2012-04-29 19:22:26 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/Stocks.php trunk/css/silverwolf/default.css Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2012-04-29 19:22:14 UTC (rev 8739) +++ trunk/Stocks.php 2012-04-29 19:22:26 UTC (rev 8740) @@ -853,7 +853,7 @@ $_POST['CategoryID']=$Category; } -echo '</select><a target="_blank" href="'. $rootpath . '/StockCategories.php">' . _('Add or Modify Stock Categories') . '</a></td></tr>'; +echo '</select> <a target="_blank" href="'. $rootpath . '/StockCategories.php">' . _('Add or Modify Stock Categories') . '</a></td></tr>'; if (!isset($_POST['EOQ']) or $_POST['EOQ']==''){ $_POST['EOQ']=0; @@ -987,7 +987,7 @@ } else { echo '<option value="1">' . _('Yes'). '</option>'; } -echo '</select><i>' . _('Note') . ', ' . _('this has no effect if the item is not Controlled') . '</i></td></tr>'; +echo '</select> <i>' . _('Note') . ', ' . _('this has no effect if the item is not Controlled') . '</i></td></tr>'; if ($_POST['Serialised']==1 AND $_POST['MBFlag']=='M'){ echo '<tr><td>' . _('Next Serial No (greater than 0 for auto numbering)') . ':</td><td> @@ -1145,22 +1145,22 @@ $PropertyCounter++; } //end loop round properties for the item category unset($StockID); -echo '</table><br />'; +echo '</table>'; echo '<input type="hidden" name="PropertyCounter" value="' . $PropertyCounter . '" />'; if ($New==1) { - echo '<input type="submit" name="submit" value="' . _('Insert New Item') . '" />'; + echo '<button type="submit" name="submit">' . _('Insert New Item') . '</button>'; echo '<input type="submit" name="UpdateCategories" style="visibility:hidden;width:1px" value="' . _('Categories') . '" />'; } else { // Now the form to enter the item properties - echo '<input type="submit" name="submit" value="' . _('Update') . '" />'; + echo '<button type="submit" name="submit">' . _('Update') . '</button>'; echo '<input type="submit" name="UpdateCategories" style="visibility:hidden;width:1px" value="' . _('Categories') . '" />'; echo '<br />'; prnMsg( _('Only click the Delete button if you are sure you wish to delete the item!') . _('Checks will be made to ensure that there are no stock movements, sales analysis records, sales order items or purchase order items for the item') . '. ' . _('No deletions will be allowed if they exist'), 'warn', _('WARNING')); - echo '<br /><input type="submit" name="delete" value="' . _('Delete This Item') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');" />'; + echo '<br /><button type="submit" name="delete" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete This Item') . '</button>'; } echo '</div></form>'; Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2012-04-29 19:22:14 UTC (rev 8739) +++ trunk/css/silverwolf/default.css 2012-04-29 19:22:26 UTC (rev 8740) @@ -214,7 +214,7 @@ textarea { font-family: Arial, Helvetica, sans-serif; font-size: 100%; - background-color: #e3e1e1; + background-color: transparent; border-width:1px; border-bottom-color: gray; border-bottom-style: solid; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-04-29 19:24:47
|
Revision: 8751 http://weberp.svn.sourceforge.net/weberp/?rev=8751&view=rev Author: tim_schofield Date: 2012-04-29 19:24:39 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/SelectCreditItems.php trunk/SelectSalesOrder.php trunk/SelectWorkOrder.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/Shipt_Select.php trunk/StockCostUpdate.php trunk/StockSerialItems.php trunk/StockStatus.php trunk/StockUsage.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierContacts.php trunk/SupplierTenders.php trunk/TaxGroups.php trunk/WhereUsedInquiry.php trunk/WorkOrderStatus.php trunk/Z_UpgradeDatabase.php trunk/css/silverwolf/default.css Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SelectCreditItems.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -184,7 +184,7 @@ } echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div>'; + echo '<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button></div>'; if (isset($_SESSION['SalesmanLogin']) and $_SESSION['SalesmanLogin'] != '') { prnMsg(_('Your account enables you to see only customers allocated to you'), 'warn', _('Note: Sales-person Login')); } @@ -387,9 +387,9 @@ $ListPage++; } echo '</select> - <input type="submit" name="Go1" value="' . _('Go') . '" /> - <input type="submit" name="Previous" value="' . _('Previous') . '" /> - <input type="submit" name="Next" value="' . _('Next') . '" />'; + <button type="submit" name="Go1">' . _('Go') . '</button> + <button type="submit" name="Previous">' . _('Previous') . '</button> + <button type="submit" name="Next">' . _('Next') . '</button>'; echo '</div>'; } echo '<br /><table cellpadding="2" class="selection">'; @@ -419,7 +419,7 @@ echo '<tr class="OddTableRows">'; $k = 1; } - echo '<td><font size="1"><input type="submit" name="Customer' . $j . '" value="' . _('Select') . '" /></font></td> + echo '<td><button type="submit" name="Customer' . $j . '">' . _('Select') . '</button></td> <td><font size="1">' . htmlspecialchars_decode($myrow['name']) . '</font></td> <td><font size="1">' . htmlspecialchars_decode($myrow['brname']) . '</font></td> <td><font size="1">' . htmlspecialchars_decode($myrow['contactname']) . '</font></td> @@ -836,6 +836,7 @@ $LineItem->Units, $LineItem->ConversionFactor, $DiscountPercentage/100, + 1, $Narrative, 'No', $LineItem->ItemDue, @@ -1013,12 +1014,19 @@ $i=0; // initialise the number of taxes iterated through $TaxLineTotal =0; //initialise tax total for the line + $sql="SELECT taxid FROM taxauthorities"; + $result=DB_query($sql, $db); + while ($myrow=DB_fetch_array($result)) { + $TaxTotals[$myrow['taxid']]=0; + } + foreach ($LineItem->Taxes AS $Tax) { if ($i>0){ echo '<br />'; } echo '<input type="text" class="number" name="' . $LineItem->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength="4" size="4" value="' . locale_number_format($Tax->TaxRate*100, 2) . '" /> %'; $i++; + echo $Tax->TaxAuthID.'<br />'; if ($Tax->TaxOnTax ==1){ $TaxTotals[$Tax->TaxAuthID] += ($Tax->TaxRate * ($LineTotal + $TaxLineTotal)); $TaxLineTotal += ($Tax->TaxRate * ($LineTotal + $TaxLineTotal)); @@ -1052,6 +1060,8 @@ if (!isset($_POST['ChargeFreightCost']) AND !isset($_SESSION['CreditItems'.$identifier]->FreightCost)){ $_POST['ChargeFreightCost']=0; + } elseif (!isset($_POST['ChargeFreightCost'])) { + $_POST['ChargeFreightCost']=filter_currency_input($_SESSION['CreditItems'.$identifier]->FreightCost); } else { $_POST['ChargeFreightCost']=filter_currency_input($_POST['ChargeFreightCost']); } @@ -1199,10 +1209,11 @@ </tr> </table><br />'; - echo '<div class="centre"><input type="submit" name="Update" value="' . _('Update') . '" /> - <input type="submit" name="CancelCredit" value="' . _('Cancel') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel the whole of this credit note?') . '\');" />'; + echo '<div class="centre"> + <button type="submit" name="Update">' . _('Update') . '</button> + <button type="submit" name="CancelCredit" onclick="return confirm(\'' . _('Are you sure you wish to cancel the whole of this credit note?') . '\');">' . _('Cancel') . '</button>'; if (!isset($_POST['ProcessCredit'])){ - echo '<input type="submit" name="ProcessCredit" value="' . _('Process Credit Note') . '" /></div><br />'; + echo '<button type="submit" name="ProcessCredit">' . _('Process Credit Note') . '</button></div><br />'; } } # end of if lines @@ -1248,18 +1259,22 @@ echo '</tr>'; echo '</table><br /><div class="centre">'; - echo '<input type="submit" name="Search" value="' . _('Search Now') .'" />'; - echo '<input type="submit" name="ChangeCustomer" value="' . _('Change Customer') . '" />'; - echo '<input type="submit" name="Quick" value="' . _('Quick Entry') . '" />'; + echo '<button type="submit" name="Search">' . _('Search Now') .'</button>'; + echo '<button type="submit" name="ChangeCustomer">' . _('Change Customer') . '</button>'; + echo '<button type="submit" name="Quick">' . _('Quick Entry') . '</button>'; echo '</div>'; if (isset($SearchResult)) { - echo '<br /><table cellpadding="2" class="selection">'; - echo '<tr><td><input type="hidden" name="previous" value="'.($Offset-1).'" /><input type="submit" name="Prev" value="'._('Prev').'" /></td>'; - echo '<td style="text-align:center" colspan="3"><input type="hidden" name="order_items" value="1" /><input type="submit" name="AddToCredit" value="'._('Add to Credit Note').'" /></td>'; - echo '<td><input type="hidden" name="nextlist" value="'.($Offset+1).'" /><input type="submit" name="Next" value="'._('Next').'" /></td></tr>'; - $TableHeader = '<tr><th>' . _('Code') . '</th> + echo '<br /> + <table cellpadding="2" class="selection"> + <tr> + <td><input type="hidden" name="previous" value="'.($Offset-1).'" /><button type="submit" name="Prev">'._('Prev').'</button></td> + <td style="text-align:center" colspan="3"><input type="hidden" name="order_items" value="1" /><button type="submit" name="AddToCredit">'._('Add to Credit Note').'</button></td> + <td><input type="hidden" name="nextlist" value="'.($Offset+1).'" /><button type="submit" name="Next">'._('Next').'</button></td> + </tr>'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') .'</th> <th>' . _('Quantity') .'</th> @@ -1349,16 +1364,16 @@ #end of page full new headings if } #end of while loop - echo '<tr><td><input type="hidden" name="previous" value="'.($Offset-1).'" /><input type="submit" name="Prev" value="'._('Prev').'" /></td>'; - echo '<td style="text-align:center" colspan="3"><input type="hidden" name="order_items" value="1" /><input type="submit" name="AddToCredit" value="'._('Add to Credit Note').'" /></td>'; - echo '<td><input type="hidden" name="nextlist" value="'.($Offset+1).'" /><input type="submit" name="Next" value="'._('Next').'" /></td></tr>'; + echo '<tr><td><input type="hidden" name="previous" value="'.($Offset-1).'" /><button type="submit" name="Prev">'._('Prev').'</button></td>'; + echo '<td style="text-align:center" colspan="3"><input type="hidden" name="order_items" value="1" /><button type="submit" name="AddToCredit">' . _('Add to Credit Note') . '</button></td>'; + echo '<td><input type="hidden" name="nextlist" value="'.($Offset+1).'" /><button type="submit" name="Next">'._('Next').'</button></td></tr>'; echo '</table>'; }#end if SearchResults to show } /*end if part searching required */ elseif(!isset($_POST['ProcessCredit'])) { /*quick entry form */ /*FORM VARIABLES TO POST TO THE CREDIT NOTE 10 AT A TIME WITH PART CODE AND QUANTITY */ echo '<table class="selection">'; - echo '<tr><th colspan="2"><font size="3" color="#616161"><b>' . _('Quick Entry') . '</b></font></th></tr>'; + echo '<tr><th colspan="2" class="header"><b>' . _('Quick Entry') . '</b></th></tr>'; echo '<tr> <th>' . _('Part Code') . '</th> <th>' . _('Quantity') . '</th> @@ -1370,8 +1385,8 @@ <td><input type="text" class="number" name="qty_' . $i . '" size="6" maxlength="6" /></td></tr>'; } - echo '</table><br /><div class="centre"><input type="submit" name="QuickEntry" value="' . _('Process Entries') . '" /> - <input type="submit" name="PartSearch" value="' . _('Search Parts') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="QuickEntry">' . _('Process Entries') . '</button> + <button type="submit" name="PartSearch">' . _('Search Parts') . '</button></div>'; } Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SelectSalesOrder.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -213,7 +213,7 @@ DB_Txn_Commit($db); } - /*Starting a new purchase order with a different supplier */ + /*Starting a new purchase order with a different supplier */ $result = DB_Txn_Begin($db); $PO_OrderNo = GetNextTransNo(18, $db); //get the next PO number @@ -222,18 +222,18 @@ $Order_Value =0; /*Now get all the required details for the supplier */ $sql = "SELECT address1, - address2, - address3, - address4, - address5, - address6, - telephone, - paymentterms, - currcode, - rate - FROM suppliers INNER JOIN currencies - ON suppliers.currcode = currencies.currabrev - WHERE supplierid='" . $SupplierID . "'"; + address2, + address3, + address4, + address5, + address6, + telephone, + paymentterms, + currcode, + rate + FROM suppliers INNER JOIN currencies + ON suppliers.currcode = currencies.currabrev + WHERE supplierid='" . $SupplierID . "'"; $ErrMsg = _('Could not get the supplier information for the order'); $SuppResult = DB_query($sql, $db, $ErrMsg); @@ -242,61 +242,61 @@ $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . ' ' . $UserDetails . ' - '._('Auto created from sales orders') .'<br />'; /*Insert to purchase order header record */ $sql = "INSERT INTO purchorders ( orderno, - supplierno, - orddate, - rate, - initiator, - intostocklocation, - deladd1, - deladd2, - deladd3, - deladd4, - deladd5, - deladd6, - tel, - suppdeladdress1, - suppdeladdress2, - suppdeladdress3, - suppdeladdress4, - suppdeladdress5, - suppdeladdress6, - supptel, - version, - revised, - deliveryby, - status, - stat_comment, - deliverydate, - paymentterms, - allowprint) - VALUES( '" . $PO_OrderNo . "', - '" . $SupplierID . "', - '" . Date('Y-m-d') . "', - '" . $SuppRow['rate'] . "', - '" . $_SESSION['UsersRealName'] . "', - '" . $_SESSION['UserStockLocation'] . "', - '" . $DelAddRow['locationname'] . "', - '" . $DelAddRow['deladd1'] . "', - '" . $DelAddRow['deladd2'] . "', - '" . $DelAddRow['deladd3'] . "', - '" . $DelAddRow['deladd4'] . "', - '" . $DelAddRow['deladd5'] . ' ' . $DelAddRow['deladd6'] . "', - '" . $DelAddRow['tel'] . "', - '" . $SuppRow['address1'] . "', - '" . $SuppRow['address2'] . "', - '" . $SuppRow['address3'] . "', - '" . $SuppRow['address4'] . "', - '" . $SuppRow['address5'] . "', - '" . $SuppRow['address6'] . "', - '" . $SuppRow['telephone'] . "', - '1.0', - '" . Date('Y-m-d') . "', - '" . $_SESSION['Default_Shipper'] . "', - 'Pending', - '" . $StatusComment . "', - '" . Date('Y-m-d') . "', - '" . $SuppRow['paymentterms'] . "', - 0)"; + supplierno, + orddate, + rate, + initiator, + intostocklocation, + deladd1, + deladd2, + deladd3, + deladd4, + deladd5, + deladd6, + tel, + suppdeladdress1, + suppdeladdress2, + suppdeladdress3, + suppdeladdress4, + suppdeladdress5, + suppdeladdress6, + supptel, + version, + revised, + deliveryby, + status, + stat_comment, + deliverydate, + paymentterms, + allowprint) + VALUES( '" . $PO_OrderNo . "', + '" . $SupplierID . "', + '" . Date('Y-m-d') . "', + '" . $SuppRow['rate'] . "', + '" . $_SESSION['UsersRealName'] . "', + '" . $_SESSION['UserStockLocation'] . "', + '" . $DelAddRow['locationname'] . "', + '" . $DelAddRow['deladd1'] . "', + '" . $DelAddRow['deladd2'] . "', + '" . $DelAddRow['deladd3'] . "', + '" . $DelAddRow['deladd4'] . "', + '" . $DelAddRow['deladd5'] . ' ' . $DelAddRow['deladd6'] . "', + '" . $DelAddRow['tel'] . "', + '" . $SuppRow['address1'] . "', + '" . $SuppRow['address2'] . "', + '" . $SuppRow['address3'] . "', + '" . $SuppRow['address4'] . "', + '" . $SuppRow['address5'] . "', + '" . $SuppRow['address6'] . "', + '" . $SuppRow['telephone'] . "', + '1.0', + '" . Date('Y-m-d') . "', + '" . $_SESSION['Default_Shipper'] . "', + 'Pending', + '" . $StatusComment . "', + '" . Date('Y-m-d') . "', + '" . $SuppRow['paymentterms'] . "', + 0)"; $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'); @@ -306,29 +306,29 @@ /*reminder we are in a loop of the total of each item to place a purchase order for based on a selection of sales orders */ $DeliveryDate = DateAdd(Date($_SESSION['DefaultDateFormat']),'d',$ItemRow['leadtime']); $sql = "INSERT INTO purchorderdetails ( orderno, - itemcode, - deliverydate, - itemdescription, - glcode, - unitprice, - quantityord, - uom, - suppliers_partno, - gw, - cuft, - conversionfactor ) - VALUES ('" . $PO_OrderNo . "', - '" . $ItemRow['stockid'] . "', - '" . FormatDateForSQL($DeliveryDate) . "', - '" . $ItemRow['suppliers_partno'] . ' ' . $ItemRow['supplierdescription'] . "', - '" . $ItemRow['stockact'] . "', - '" . $ItemRow['price'] . "', - '" . $ItemRow['orderqty'] . "', - '" . $ItemRow['suppliersuom'] . "', - '" . $ItemRow['suppliers_partno'] . "', - '" . $ItemRow['kgs'] . "', - '" . $ItemRow['volume'] . "', - '" . $ItemRow['conversionfactor'] . "')"; + itemcode, + deliverydate, + itemdescription, + glcode, + unitprice, + quantityord, + uom, + suppliers_partno, + gw, + cuft, + conversionfactor ) + VALUES ('" . $PO_OrderNo . "', + '" . $ItemRow['stockid'] . "', + '" . FormatDateForSQL($DeliveryDate) . "', + '" . $ItemRow['suppliers_partno'] . ' ' . $ItemRow['supplierdescription'] . "', + '" . $ItemRow['stockact'] . "', + '" . $ItemRow['price'] . "', + '" . $ItemRow['orderqty'] . "', + '" . $ItemRow['suppliersuom'] . "', + '" . $ItemRow['suppliers_partno'] . "', + '" . $ItemRow['kgs'] . "', + '" . $ItemRow['volume'] . "', + '" . $ItemRow['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'); @@ -349,7 +349,7 @@ $AuthResult=DB_query($AuthSQL,$db); $AuthRow=DB_fetch_array($AuthResult); if ($AuthRow['authlevel']=''){ - $AuthRow['authlevel'] = 0; + $AuthRow['authlevel'] = 0; } if (DB_num_rows($AuthResult) > 0 AND $AuthRow['authlevel'] > $Order_Value) { //user has authority to authrorise as well as create the order @@ -394,7 +394,7 @@ if (isset($_POST['ResetPart'])){ - unset($_REQUEST['SelectedStockItem']); + unset($_REQUEST['SelectedStockItem']); } echo '<br /><div class="centre">'; @@ -490,7 +490,7 @@ if (!isset($StockID)) { - /* Not appropriate really to restrict search by date since may miss older ouststanding orders */ + /* Not appropriate really to restrict search by date since may miss older ouststanding orders */ if (!isset($_REQUEST['OrderNumber']) or $_REQUEST['OrderNumber']==''){ @@ -506,9 +506,9 @@ while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation'])){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname']. '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname']. '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ echo '<option selected="True" value="' . $myrow['loccode'] . '">' . $myrow['locationname']. '</option>'; @@ -533,7 +533,7 @@ } echo '</select> </td><td>'; - echo '<input type="submit" name="SearchOrders" value="' . _('Search') . '" /></td>'; + echo '<button type="submit" name="SearchOrders">' . _('Search') . '</button></td>'; echo ' <td><a href="' . $rootpath . '/SelectOrderItems.php?NewOrder=Yes">' . _('Add Sales Order') . '</a></td></tr></table>'; } @@ -546,37 +546,37 @@ $result1 = DB_query($SQL,$db); echo '<br /><table class="selection">'; - echo '<tr><th colspan="6"><font size="3" color="#616161">' . _('To search for sales orders for a specific part use the part selection facilities below'); + echo '<tr><th colspan="6" class="header">' . _('To search for sales orders for a specific part use the part selection facilities below'); echo '</th></tr>'; echo '<tr> - <td><font size="1">' . _('Select a stock category') . ':</font> - <select name="StockCat">'; + <td><font size="1">' . _('Select a stock category') . ':</font> + <select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } - echo '</select> - <td><font size="1">' . _('Enter text extract(s) in the description') . ':</font></td> - <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> + echo '</select> + <td><font size="1">' . _('Enter text extract(s) in the description') . ':</font></td> + <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> </tr> - <tr><td></td> - <td><font size="3"><b>' . _('OR') . ' </b></font><font size="1">' . _('Enter extract of the Stock Code') . '</b>:</font></td> - <td><input type="text" name="StockCode" size="15" maxlength="18" /></td> - </tr> - </table>'; - echo '<br /><input type="submit" name="SearchParts" value="' . _('Search Parts Now') . '" /> - <input type="submit" name="ResetPart" value="' . _('Show All') . '" /></div><br />'; + <tr><td></td> + <td><font size="3"><b>' . _('OR') . ' </b></font><font size="1">' . _('Enter extract of the Stock Code') . '</b>:</font></td> + <td><input type="text" name="StockCode" size="15" maxlength="18" /></td> + </tr> + </table>'; + echo '<br /><button type="submit" name="SearchParts">' . _('Search Parts Now') . '</button> + <button type="submit" name="ResetPart">' . _('Show All') . '</button></div><br />'; if (isset($StockItemsResult) and DB_num_rows($StockItemsResult)>0) { echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('On Hand') . '</th> - <th>' . _('Units') . '</th> - </tr>'; + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('On Hand') . '</th> + <th>' . _('Units') . '</th> + </tr>'; echo $TableHeader; $j = 1; @@ -592,12 +592,13 @@ $k++; } - printf('<td><input type="submit" name="SelectedStockItem" value="%s" /></td> - <td>%s</td> - <td class="number">%s</td> - <td>%s</td> + printf('<td><button type="submit" name="SelectedStockItem" value="%s">%s</td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> </tr>', $myrow['stockid'], + $myrow['stockid'], $myrow['description'], locale_number_format($myrow['qoh'], $myrow['decimalplaces']), $myrow['units']); @@ -660,7 +661,7 @@ salesorders.poplaced ORDER BY salesorders.orderno"; } else { - /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ + /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ if (isset($_REQUEST['SelectedCustomer'])) { @@ -807,8 +808,8 @@ /*show a table of the orders returned by the SQL */ if (DB_num_rows($SalesOrdersResult)>0) { - /* Get users authority to place POs */ - $AuthSQL="SELECT cancreate + /* Get users authority to place POs */ + $AuthSQL="SELECT cancreate FROM purchorderauth WHERE userid='". $_SESSION['UserID'] . "'"; @@ -816,20 +817,20 @@ $AuthResult=DB_query($AuthSQL,$db); $AuthRow=DB_fetch_array($AuthResult); - echo '<table cellpadding="2" width="95%" class="selection">'; + echo '<table cellpadding="2" width="95%" class="selection">'; if (isset($_POST['Quotations']) AND $_POST['Quotations']=='Orders_Only'){ $tableheader = '<tr> - <th>' . _('Modify') . '</th> - <th>' . _('Invoice') . '</th> - <th>' . _('Dispatch Note') . '</th> - <th>' . _('Customer') . '</th> - <th>' . _('Branch') . '</th> - <th>' . _('Cust Order') . ' #</th> - <th>' . _('Order Date') . '</th> - <th>' . _('Req Del Date') . '</th> - <th>' . _('Delivery To') . '</th> - <th>' . _('Order Total') . '<br />' . $_SESSION['CompanyRecord']['currencydefault'] . '</th>'; + <th>' . _('Modify') . '</th> + <th>' . _('Invoice') . '</th> + <th>' . _('Dispatch Note') . '</th> + <th>' . _('Customer') . '</th> + <th>' . _('Branch') . '</th> + <th>' . _('Cust Order') . ' #</th> + <th>' . _('Order Date') . '</th> + <th>' . _('Req Del Date') . '</th> + <th>' . _('Delivery To') . '</th> + <th>' . _('Order Total') . '<br />' . $_SESSION['CompanyRecord']['currencydefault'] . '</th>'; if ($AuthRow['cancreate']==0){ //If cancreate==0 then this means the user can create orders hmmm!! $tableheader .= '<th>' . _('Place PO') . '</th></tr>'; } else { @@ -837,23 +838,23 @@ } } else { // displaying only quotations $tableheader = '<tr> - <th>' . _('Modify') . '</th> - <th>' . _('Print Quote') . '</th> - <th>' . _('Customer') . '</th> - <th>' . _('Branch') . '</th> - <th>' . _('Cust Ref') . ' #</th> - <th>' . _('Quote Date') . '</th> - <th>' . _('Req Del Date') . '</th> - <th>' . _('Delivery To') . '</th> - <th>' . _('Quote Total') . '<br />' . $_SESSION['CompanyRecord']['currencydefault'] . '</th></tr>'; + <th>' . _('Modify') . '</th> + <th>' . _('Print Quote') . '</th> + <th>' . _('Customer') . '</th> + <th>' . _('Branch') . '</th> + <th>' . _('Cust Ref') . ' #</th> + <th>' . _('Quote Date') . '</th> + <th>' . _('Req Del Date') . '</th> + <th>' . _('Delivery To') . '</th> + <th>' . _('Quote Total') . '<br />' . $_SESSION['CompanyRecord']['currencydefault'] . '</th></tr>'; } echo $tableheader; $i = 1; - $j = 1; - $k=0; //row colour counter - $OrdersTotal =0; + $j = 1; + $k = 0; //row colour counter + $OrdersTotal = 0; while ($myrow=DB_fetch_array($SalesOrdersResult)) { @@ -887,58 +888,58 @@ if ($_POST['Quotations']=='Orders_Only'){ - /*Check authority to create POs if user has authority then show the check boxes to select sales orders to place POs for otherwise don't provide this option */ - if ($AuthRow['cancreate']==0 AND $myrow['poplaced']==0){ //cancreate==0 if the user can create POs and not already placed - printf('<td><a href="%s">%s</a></td> - <td><a href="%s">' . _('Invoice') . '</a></td> - <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td><input type="checkbox" name="PlacePO_%s" value"" /><input type="hidden" name="OrderNo_PO_%s" value="%s" /></td> - </tr>', - $ModifyPage, - $myrow['orderno'], - $Confirm_Invoice, - $PrintDispatchNote, - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedOrderDate, - $FormatedDelDate, - $myrow['deliverto'], - $FormatedOrderValue, - $i, - $i, - $myrow['orderno']); - } else { //User is not authorised to create POs so don't even show the option - printf('<td><a href="%s">%s</a></td> - <td><a href="%s">' . _('Invoice') . '</a></td> - <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - </tr>', - $ModifyPage, - $myrow['orderno'], - $Confirm_Invoice, - $PrintDispatchNote, - $myrow['name'], - $myrow['brname'], - $myrow['customerref'], - $FormatedOrderDate, - $FormatedDelDate, - $myrow['deliverto'], - $FormatedOrderValue); - } + /*Check authority to create POs if user has authority then show the check boxes to select sales orders to place POs for otherwise don't provide this option */ + if ($AuthRow['cancreate']==0 AND $myrow['poplaced']==0){ //cancreate==0 if the user can create POs and not already placed + printf('<td><a href="%s">%s</a></td> + <td><a href="%s">' . _('Invoice') . '</a></td> + <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td><input type="checkbox" name="PlacePO_%s" value"" /><input type="hidden" name="OrderNo_PO_%s" value="%s" /></td> + </tr>', + $ModifyPage, + $myrow['orderno'], + $Confirm_Invoice, + $PrintDispatchNote, + $myrow['name'], + $myrow['brname'], + $myrow['customerref'], + $FormatedOrderDate, + $FormatedDelDate, + $myrow['deliverto'], + $FormatedOrderValue, + $i, + $i, + $myrow['orderno']); + } else { //User is not authorised to create POs so don't even show the option + printf('<td><a href="%s">%s</a></td> + <td><a href="%s">' . _('Invoice') . '</a></td> + <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + </tr>', + $ModifyPage, + $myrow['orderno'], + $Confirm_Invoice, + $PrintDispatchNote, + $myrow['name'], + $myrow['brname'], + $myrow['customerref'], + $FormatedOrderDate, + $FormatedDelDate, + $myrow['deliverto'], + $FormatedOrderValue); + } } else { //must be quotes only printf('<td><a href="%s">%s</a></td> @@ -962,7 +963,7 @@ $myrow['deliverto'], $FormatedOrderValue); } - $i++; + $i++; $j++; $OrdersTotal += $myrow['ordervalue']; if ($j == 12){ @@ -973,7 +974,7 @@ }//end while loop through orders to display if ($_POST['Quotations']=='Orders_Only' AND $AuthRow['cancreate']==0){ //cancreate==0 means can create POs echo '<tr><th colspan="8"></th><th></th><th colspan="2" class="number"> - <input type="submit" name="PlacePO" value="' . _('Place') . "\n" . _('PO') . '" onclick="return confirm(\'' . _('This will create purchase orders for all the items on the checked sales orders above, based on the preferred supplier purchasing data held in the system. Are You Absolutely Sure?') . '\');" /></th></tr>'; + <button type="submit" name="PlacePO" value="" onclick="return confirm(\'' . _('This will create purchase orders for all the items on the checked sales orders above, based on the preferred supplier purchasing data held in the system. Are You Absolutely Sure?') . '\');">' . _('Place') . "\n" . _('PO') . '</button></th></tr>'; } echo '<tr><td colspan="9" class="number">'; if ($_POST['Quotations']=='Orders_Only'){ Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SelectWorkOrder.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -143,7 +143,7 @@ } echo '</select>   '; - echo '<input type="submit" name="SearchOrders" value="' . _('Search') . '" />'; + echo '<button type="submit" name="SearchOrders">' . _('Search') . '</button>'; echo ' <a href="' . $rootpath . '/WorkOrderEntry.php">' . _('New Work Order') . '</a></td></tr></table><br />'; } @@ -156,7 +156,7 @@ echo '<table class="selection"> <tr> - <th colspan="6"><font size="3" color="#616161">' . _('To search for work orders for a specific item use the item selection facilities below') . '</font></th> + <th colspan="6" class="header">' . _('To search for work orders for a specific item use the item selection facilities below') . '</th> </tr> <tr> <td><font size="1">' . _('Select a stock category') . ':</font> @@ -176,8 +176,8 @@ <td><input type="text" name="StockCode" size="15" maxlength="18" /></td> </tr> </table><br />'; - echo '<div class="centre"><input type="submit" name="SearchParts" value="' . _('Search Items Now') . '" /> - <input type="submit" name="ResetPart" value="' . _('Show All') . '" /></div>'; + echo '<div class="centre"><button type="submit" name="SearchParts">' . _('Search Items Now') . '</button> + <button type="submit" name="ResetPart">' . _('Show All') . '</button></div>'; } if (isset($StockItemsResult)) { @@ -204,12 +204,13 @@ $k++; } - printf('<td><input type="submit" name="SelectedStockItem" value="%s" /></td> + printf('<td><button type="submit" name="SelectedStockItem" value="%s" />%s</button></td> <td>%s</td> <td class="number">%s</td> <td>%s</td> </tr>', $myrow['stockid'], + $myrow['stockid'], $myrow['description'], $myrow['qoh'], $myrow['units']); Modified: trunk/ShipmentCosting.php =================================================================== --- trunk/ShipmentCosting.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/ShipmentCosting.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -46,7 +46,7 @@ $HeaderData = DB_fetch_array($GetShiptHdrResult); echo '<br />'; echo '<table class="selection">'; -echo '<tr><th colspan="4"><font size="3" color="#616161">'._('Shipment Details').'</font></th></tr>'; +echo '<tr><th colspan="4" class="header">'._('Shipment Details').'</th></tr>'; echo '<tr> <td><b>'. _('Shipment') .': </td> <td><b>' . $_GET['SelectedShipment'] . '</b></td> @@ -137,7 +137,7 @@ } echo '<br /><table cellpadding="2" class="selection">'; - echo '<tr><th colspan="9"><font color="#616161" size="3">' . _('Items on shipment'). '</font></th></tr>'; + echo '<tr><th colspan="9" class="header">' . _('Items on shipment'). '</th></tr>'; $TableHeader = '<tr> <th>'. _('Item'). '</th> @@ -499,7 +499,7 @@ $ChargesResult = DB_query($sql,$db); echo '<table cellpadding="2" class="selection">'; -echo '<tr><th colspan="6"><font color="#616161" size="3">' . _('Shipment Charges Against Products'). '</font></th></tr>'; +echo '<tr><th colspan="6" class="header">' . _('Shipment Charges Against Products'). '</th></tr>'; $TableHeader = '<tr> <th>'. _('Supplier'). '</th> @@ -570,7 +570,7 @@ $ChargesResult = DB_query($sql,$db); echo '<table cellpadding="2" class="selection">'; -echo '<tr><th colspan="6"><font color="#616161" size="3">'._('General Shipment Charges').'</font></th></tr>'; +echo '<tr><th colspan="6" class="header">'._('General Shipment Charges').'</th></tr>'; $TableHeader = '<tr> <th>'. _('Supplier'). '</th> @@ -630,7 +630,7 @@ <option value="No">'. _('No') . '</option> </select>'; } - echo '<br /><br /><input type="submit" name="Close" value="'. _('Confirm OK to Close'). '" />'; + echo '<br /><br /><button type="submit" name="Close">'. _('Confirm OK to Close'). '</button>'; echo '</form></div>'; } Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/Shipments.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -376,7 +376,7 @@ /* Always display all shipment lines */ echo '<br /><table cellpadding="2" class="selection">'; - echo '<tr><th colspan="9"><font color="#616161" size="3">'. _('Order Lines On This Shipment'). '</font></th></tr>'; + echo '<tr><th colspan="9" class="header">'. _('Order Lines On This Shipment'). '</th></tr>'; $TableHeader = '<tr> <th>'. _('Order'). '</th> @@ -426,7 +426,7 @@ echo '</table>'; }//there are lines on the shipment -echo '<br /><div class="centre"><input type="submit" name="Update" value="'. _('Update Shipment Details') . '" /></div><br />'; +echo '<br /><div class="centre"><button type="submit" name="Update">'. _('Update Shipment Details') . '</button></div><br />'; if (!isset($_POST['StockLocation'])) { $_POST['StockLocation'] =$_SESSION['Shipment']->StockLocation; @@ -456,16 +456,16 @@ if (DB_num_rows($result)>0){ echo '<table cellpadding="2" class="selection">'; - echo '<tr><th colspan="7"><font color="#616161" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th></tr>'; + echo '<tr><th colspan="7" class="header">'. _('Possible Order Lines To Add To This Shipment').'</th></tr>'; $TableHeader = '<tr> - <th>'. _('Order').'</th> - <th>'. _('Item').'</th> - <th>'. _('Quantity').'<br />'. _('Ordered').'</th> - <th>'. _('Units').'</th> - <th>'. _('Quantity').'<br />'. _('Received').'</th> - <th>'. _('Delivery').'<br />'. _('Date').'</th> - </tr>'; + <th>'. _('Order').'</th> + <th>'. _('Item').'</th> + <th>'. _('Quantity').'<br />'. _('Ordered').'</th> + <th>'. _('Units').'</th> + <th>'. _('Quantity').'<br />'. _('Received').'</th> + <th>'. _('Delivery').'<br />'. _('Date').'</th> + </tr>'; echo $TableHeader; Modified: trunk/Shipt_Select.php =================================================================== --- trunk/Shipt_Select.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/Shipt_Select.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -29,32 +29,13 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -If (isset($_POST['ResetPart'])) { +if (isset($_POST['ResetPart'])) { unset($SelectedStockItem); } -If (isset($ShiptRef) and $ShiptRef!="") { - if (!is_numeric($ShiptRef)){ - echo '<br />'; - prnMsg( _('The Shipment Number entered MUST be numeric') ); - unset ($ShiptRef); - } else { - echo _('Shipment Number'). ' - '. $ShiptRef; - } -} else { - if (isset($SelectedSupplier)) { - echo '<br />' ._('For supplier'). ': '. $SelectedSupplier . ' ' . _('and'). ' '; - echo '<input type="hidden" name="SelectedSupplier" value="'. $SelectedSupplier. '" />'; - } - If (isset($SelectedStockItem)) { - echo _('for the part'). ': ' . $SelectedStockItem . '.'; - echo '<input type="hidden" name="SelectedStockItem" value="'. $SelectedStockItem. '" />'; - } -} - if (isset($_POST['SearchParts'])) { - If ($_POST['Keywords'] AND $_POST['StockCode']) { + if ($_POST['Keywords'] AND $_POST['StockCode']) { echo '<br />'; prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered'),'info'); } @@ -68,7 +49,7 @@ INNER JOIN purchorderdetails ON stockmaster.stockid=purchorderdetails.itemcode"; - If ($_POST['Keywords']) { + if ($_POST['Keywords']) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -101,9 +82,29 @@ } -if (!isset($ShiptRef) or $ShiptRef==""){ - echo '<table class="selection"><tr><td>'; - echo _('Shipment Number'). ': <input type="text" name="ShiptRef" maxlength="10" size="10" /> '. +if (!isset($ShiptRef) or $ShiptRef==''){ + echo '<table class="selection">'; + echo '<tr><th class="header">'; + if (isset($ShiptRef) and $ShiptRef!='') { + if (!is_numeric($ShiptRef)){ + echo '<br />'; + prnMsg( _('The Shipment Number entered MUST be numeric') ); + unset ($ShiptRef); + } else { + echo _('Shipment Number'). ' - '. $ShiptRef; + } + } else { + if (isset($SelectedSupplier)) { + echo _('For supplier'). ': '. $SelectedSupplier . ' ' . _('and'). ' '; + echo '<input type="hidden" name="SelectedSupplier" value="'. $SelectedSupplier. '" />'; + } + if (isset($SelectedStockItem)) { + echo _('for the part'). ': ' . $SelectedStockItem . '.'; + echo '<input type="hidden" name="SelectedStockItem" value="'. $SelectedStockItem. '" />'; + } + } + echo '</th></tr>'; + echo '<tr><td>' . _('Shipment Number'). ': <input type="text" name="ShiptRef" maxlength="10" size="10" /> '. _('Into Stock Location').' :<select name="StockLocation"> '; $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); @@ -134,7 +135,7 @@ } echo '</select></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="SearchShipments" value="'. _('Search Shipments'). '" /></div></div><br />'; + echo '<br /><div class="centre"><button type="submit" name="SearchShipments">'. _('Search Shipments'). '</button></div></div><br />'; } $SQL="SELECT categoryid, @@ -146,7 +147,7 @@ echo '<table class="selection">'; -echo '<tr><th colspan="5"><font size="3" color="#616161">'._('To search for shipments for a specific part use the part selection facilities below') . '</font></th></tr>'; +echo '<tr><th colspan="5" class="header">'._('To search for shipments for a specific part use the part selection facilities below') . '</th></tr>'; echo '<tr> <td><font size="1">' . _('Select a stock category') . ':</font> <select name="StockCat">'; @@ -168,8 +169,8 @@ </tr> </table><br />'; -echo '<div class="centre"><input type="submit" name="SearchParts" value="'._('Search Parts Now').'" />'; -echo '<input type="submit" name="ResetPart" value="'. _('Show All') .'" /></div><br />'; +echo '<div class="centre"><button type="submit" name="SearchParts">' . _('Search Parts Now') . '</button>'; +echo '<button type="submit" name="ResetPart">'. _('Show All') .'</button></div><br />'; if (isset($StockItemsResult)) { @@ -199,11 +200,16 @@ /* Code Description On Hand Orders Ostdg Units Code Description On Hand Orders Ostdg Units */ printf('<td><input type="submit" name="SelectedStockItem" value="%s" /></td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td>%s</td></tr>', - $myrow['stockid'], $myrow['description'], $myrow['qoh'], $myrow['qord'],$myrow['units']); + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>', + $myrow['stockid'], + $myrow['description'], + $myrow['qoh'], + $myrow['qord'], + $myrow['units']); $j++; If ($j == 15){ Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/StockCostUpdate.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -130,12 +130,12 @@ echo '<table cellpadding="2" class="selection">'; echo '<tr> <th colspan="2">' . _('Item Code') . ':<input type="text" name="StockID" value="' . $StockID . '" maxlength="20" />'; -echo '<input type="submit" name="Show" value="' . _('Show Cost Details') . '" /></th></tr>'; +echo '<button type="submit" name="Show">' . _('Show Cost Details') . '</button></th></tr>'; echo '<tr> - <th colspan="2"><font color="#616161" size="2">' . $StockID . ' - ' . $myrow['description'] . '</font></th> + <th colspan="2" class="header">' . $StockID . ' - ' . $myrow['description'] . '</th> </tr>'; echo '<tr> - <th colspan="2"><font color="#616161" size="2">'. _('Total Quantity On Hand') . ': ' . locale_number_format($myrow['totalqoh'], $myrow['decimalplaces']) . ' ' . $myrow['units'] .'</font></th> + <th colspan="2" class="header">'. _('Total Quantity On Hand') . ': ' . locale_number_format($myrow['totalqoh'], $myrow['decimalplaces']) . ' ' . $myrow['units'] .'</th> </tr>'; if (($myrow['mbflag']=='D' AND $myrow['stocktype'] != 'L') Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/StockSerialItems.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -68,13 +68,13 @@ echo '<table cellpadding="2" class="selection">'; if ($Serialised==1){ - echo '<tr><th colspan="5"><font color="#616161" size="2">' . _('Serialised items in') . ' '; + echo '<tr><th colspan="5" class="header">' . _('Serialised items in') . ' '; } else { - echo '<tr><th colspan="11"><font color=#616161 size="2">' . _('Controlled items in') . ' '; + echo '<tr><th colspan="11" class="header">' . _('Controlled items in') . ' '; } -echo $myrow['locationname']. '</font></th></tr>'; +echo $myrow['locationname']. '</th></tr>'; -echo '<tr><th colspan="11"><font color="#616161" size="2">'.$StockID .'-'. $Description .'</b> (' . _('In units of') . ' ' . $UOM . ')</font></th></tr>'; +echo '<tr><th colspan="11" class="header">'.$StockID .'-'. $Description .'</b> (' . _('In units of') . ' ' . $UOM . ')</th></tr>'; if ($Serialised == 1){ $tableheader = '<tr> Modified: trunk/StockStatus.php =================================================================== --- trunk/StockStatus.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/StockStatus.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -300,7 +300,7 @@ } if (isset($PriceHistory)) { echo '<br /><table cellpadding="4" class="selection">'; - echo '<tr><th colspan="4"><font color="#616161" size="2">' . _('Pricing history for sales of') . ' ' . $StockID . ' ' . _('to') . ' ' . $DebtorNo . '</font></th></tr>'; + echo '<tr><th colspan="4" class="header">' . _('Pricing history for sales of') . ' ' . $StockID . ' ' . _('to') . ' ' . $DebtorNo . '</th></tr>'; $tableheader = '<tr> <th>' . _('Date Range') . '</th> <th>' . _('Quantity') . '</th> Modified: trunk/StockUsage.php =================================================================== --- trunk/StockUsage.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/StockUsage.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -43,13 +43,13 @@ $Its_A_KitSet_Assembly_Or_Dummy =False; if (($myrow['mbflag']=='K') OR ($myrow['mbflag']=='A') OR ($myrow['mbflag']=='D')) { $Its_A_KitSet_Assembly_Or_Dummy =True; - echo '<font color="#616161" size="3"><b>' . $StockID - $myrow['description'] . '</b></font>'; + echo '<font color="#616162" size="3"><b>' . $StockID - $myrow['description'] . '</b></font>'; echo '<br />' . _('The selected item is a dummy or assembly or kit-set item and cannot have a stock holding') . '. ' . _('Please select a different item'); $StockID = ''; } else { - echo '<tr><th><font size="3" color="#616161">' . _('Item') . ' :<b> ' . $StockID . ' - ' . $myrow['description'] . ' </b> (' . _('in units of') . ' :<b> ' . $myrow['units'] . ')</b></font></th></tr>'; + echo '<tr><th class="header">' . _('Item') . ' :<b> ' . $StockID . ' - ' . $myrow['description'] . ' </b> (' . _('in units of') . ' :<b> ' . $myrow['units'] . ')</b></th></tr>'; } echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"><tr><td>'; Modified: trunk/SuppCreditGRNs.php =================================================================== --- trunk/SuppCreditGRNs.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SuppCreditGRNs.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -106,8 +106,8 @@ } } -echo '<tr><td colspan="5" class="number"><font size="2" color="#616161">' . _('Total Value Credited Against Goods') . ':</font></td> - <td class="number"><font size="2" color="#616161"><u>' . locale_money_format($TotalValueCharged,$_SESSION['SuppTrans']->CurrCode) . '</u></font></td></tr>'; +echo '<tr><th colspan="5" class="header">' . _('Total Value Credited Against Goods') . ':</th> + <th class="header"><u>' . locale_money_format($TotalValueCharged,$_SESSION['SuppTrans']->CurrCode) . '</u></th></tr>'; echo '</table><br /><div class="centre"><a href="' . $rootpath . '/SupplierCredit.php">' . _('Back to Credit Note Entry') . '</a></div>'; /* Now get all the GRNs for this supplier from the database @@ -231,7 +231,7 @@ $myrow = DB_fetch_array($GRNEntryResult); echo '<br /><table class="selection">'; - echo '<tr><th colspan="6"><font size="3" color="#616161">' . _('GRN Selected For Adding To A Suppliers Credit Note') . '</font></th></tr>'; + echo '<tr><th colspan="6" class="header">' . _('GRN Selected For Adding To A Suppliers Credit Note') . '</th></tr>'; echo '<tr><th>' . _('GRN') . '</th> <th>' . _('Item') . '</th> <th>' . _('Quantity') . '<br />' . _('Outstanding') . '</th> Modified: trunk/SuppFixedAssetChgs.php =================================================================== --- trunk/SuppFixedAssetChgs.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SuppFixedAssetChgs.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -91,8 +91,8 @@ } echo '<tr> - <td class="number"><font size="2" color="#616161">' . _('Total') . ':</font></td> - <td class="number"><font size="2" color="#616161"><U>' . locale_money_format($TotalAssetValue,$_SESSION['SuppTrans']->CurrCode) . '</U></font></td> + <th class="header">' . _('Total') . ':</th> + <th class="header"><u>' . locale_money_format($TotalAssetValue,$_SESSION['SuppTrans']->CurrCode) . '</u></th> </tr> </table><br />'; Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SuppInvGRNs.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -148,8 +148,8 @@ } echo '<tr> - <td colspan="5" align="right"><font size="2" color="#616161">' . _('Total Value of Goods Charged') . ':</font></td> - <td class="number"><font size="2" color="#616161">' . locale_money_format($TotalValueCharged,$_SESSION['SuppTrans']->CurrCode) . '</font></td> + <th colspan="5" align="right" class="header">' . _('Total Value of Goods Charged') . ':</th> + <th class="number">' . locale_money_format($TotalValueCharged,$_SESSION['SuppTrans']->CurrCode) . '</th> </tr>'; echo '</table>'; echo '<br /><div class="centre"><a href="' . $rootpath . '/SupplierInvoice.php">' . _('Back to Invoice Entry') . '</a></div><br />'; @@ -235,7 +235,7 @@ $GRNTmp = $_SESSION['SuppTrans']->GRNs[$GRNNo]; echo '<table class="selection">'; - echo '<tr><th colspan="10"><font size="3" color="#616161">' . _('GRN Selected For Adding To A Purchase Invoice') . '</font></th></tr>'; + echo '<tr><th colspan="10" class="header">' . _('GRN Selected For Adding To A Purchase Invoice') . '</th></tr>'; echo '<tr bgcolor=#800000> <th>' . _('Sequence') . ' #</th> <th>' . _('Item') . '</th> Modified: trunk/SuppShiptChgs.php =================================================================== --- trunk/SuppShiptChgs.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SuppShiptChgs.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -99,8 +99,8 @@ } echo '<tr> - <td class="number"><font size="2" color="#616161">' . _('Total') . ':</font></td> - <td class="number"><font size="2" color="#616161"><u>' . locale_money_format($TotalShiptValue,$_SESSION['SuppTrans']->CurrCode) . '</u></font></td> + <th class="header">' . _('Total') . ':</th> + <th class="header"><u>' . locale_money_format($TotalShiptValue,$_SESSION['SuppTrans']->CurrCode) . '</u></th> </tr> </table><br />'; Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SuppTransGLAnalysis.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -133,8 +133,8 @@ } echo '<tr> - <td colspan="2" class="number"><font size="4" color="blue">' . _('Total') . ':</font></td> - <td class="number"><font size="2" color="#616161"><u>' . locale_money_format($TotalGLValue,$_SESSION['SuppTrans']->CurrCode) . '</u></font></td> + <th colspan="2" class="header">' . _('Total') . ':</th> + <th class="header"><u>' . locale_money_format($TotalGLValue,$_SESSION['SuppTrans']->CurrCode) . '</u></th> </tr> </table>'; Modified: trunk/SupplierContacts.php =================================================================== --- trunk/SupplierContacts.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SupplierContacts.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -131,16 +131,17 @@ AND suppliercontacts.supplierid = '".$SupplierID."'"; $result = DB_query($sql, $db); + $myrow=DB_fetch_array($result); if (DB_num_rows($result)>0){ - echo '<table class="selection"><tr><th colspan="7"><font size="3" color="#616161">' . _('Contacts Defined for') . ' - ' . $myrow['suppname'] . '</font></th></tr>'; + echo '<br /><table class="selection"><tr><th colspan="7" class="header">' . _('Contacts Defined for') . ' - ' . $myrow['suppname'] . '</th></tr>'; echo '<tr><th>' . _('Name') . '</th> <th>' . _('Position') . '</th> <th>' . _('Phone No') . '</th> <th>' . _('Fax No') . '</th> <th>' . _('Email') . '</th></tr>'; - + DB_data_seek($result, 0); while ($myrow = DB_fetch_array($result)) { printf('<tr><td>%s</td> <td>%s</td> @@ -149,7 +150,7 @@ <td><a href="mailto:%s">%s</td> <td><a href="%s?SupplierID=%s&SelectedContact=%s">' . _('Edit') . '</td> <td><a href="%s?SupplierID=%s&SelectedContact=%s&delete=yes" onclick=\'return confirm("' . _('Are you sure you wish to delete this contact?') . '");\'>' . _('Delete') . '</td></tr>', - $myrow['suppname'], + $myrow['contact'], $myrow['position'], $myrow['tel'], $myrow['fax'], @@ -206,7 +207,7 @@ $_POST['Mobile'] = $myrow['mobile']; echo '<input type="hidden" name="SelectedContact" value="' . $_POST['Contact'] . '" />'; echo '<input type="hidden" name="Contact" value="' . $_POST['Contact'] . '" />'; - echo '<table><tr><td>' . _('Contact') . ':</td><td>' . $_POST['Contact'] . '</td></tr>'; + echo '<table class="selection"><tr><td>' . _('Contact') . ':</td><td>' . $_POST['Contact'] . '</td></tr>'; } else { //end of if $SelectedContact only do the else when a new record is being entered if (!isset($_POST['Contact'])) { Modified: trunk/SupplierTenders.php =================================================================== --- trunk/SupplierTenders.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/SupplierTenders.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -111,7 +111,7 @@ } } echo '</td>'; - echo '<th colspan="8" style="vertical-align:top"><font size="2" color="#616161">' . _('Tender Number') . ': ' .$_SESSION['offer'.$identifier]->TenderID . '</font></th>'; + echo '<th colspan="8" class="header" style="vertical-align:top">' . _('Tender Number') . ': ' .$_SESSION['offer'.$identifier]->TenderID . '</th>'; echo '<input type="hidden" value="' . $_SESSION['offer'.$identifier]->TenderID . '" name="Tender" />'; echo '<tr><th>' . stripslashes($_SESSION['CompanyRecord']['coyname']) . '<br />' . _('Item Code') . '</th>'; echo '<th>' . _('Item Description') . '</th>'; @@ -425,7 +425,7 @@ ORDER BY tendersuppliers.tenderid"; $result=DB_query($sql, $db); echo '<table class="selection">'; - echo '<tr><th colspan="13"><font size="3" color="#616161">' . _('Outstanding Tenders Waiting For Offer') . '</font></th></tr>'; + echo '<tr><th colspan="13" class="header">' . _('Outstanding Tenders Waiting For Offer') . '</th></tr>'; while ($myrow=DB_fetch_array($result)) { echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -453,7 +453,7 @@ } } echo '</td>'; - echo '<th colspan="8" style="vertical-align:top"><font size="2" color="#616161">' . _('Tender Number') . ': ' .$myrow['tenderid'] . '</font></th>'; + echo '<th colspan="8" class="header" style="vertical-align:top">' . _('Tender Number') . ': ' .$myrow['tenderid'] . '</th>'; echo '<input type="hidden" value="' . $myrow['tenderid'] . '" name="Tender" />'; echo '<th><button type="submit" value="" name="Process">' . _('Process') . "\n" . _('Tender') . '</button></th></tr>'; $ItemSQL="SELECT tenderitems.tenderid, Modified: trunk/TaxGroups.php =================================================================== --- trunk/TaxGroups.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/TaxGroups.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -264,7 +264,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type="hidden" name="SelectedGroup" value="' . $SelectedGroup .'" />'; echo '<table class="selection">'; - echo '<tr><th colspan="3"><font size="3" color="#616161">'._('Calculation Order').'</font></th></tr>'; + echo '<tr><th colspan="3" class="header">'._('Calculation Order').'</th></tr>'; echo '<tr> <th>'._('Tax Authority').'</th> Modified: trunk/WhereUsedInquiry.php =================================================================== --- trunk/WhereUsedInquiry.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/WhereUsedInquiry.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -56,7 +56,7 @@ include('includes/footer.inc'); exit; } - echo '<tr><th colspan="6"><font color="#616161" size="3"><b>'.$StockID . ' - ' . $myrow['description'] .'</b> (' . _('in units of') . ' ' . $myrow['units'] . ')</font></th></tr>'; + echo '<tr><th colspan="6" class="header"><b>'.$StockID . ' - ' . $myrow['description'] .'</b> (' . _('in units of') . ' ' . $myrow['units'] . ')</th></tr>'; } $tableheader = '<tr><th>' . _('Used By') . '</th> Modified: trunk/WorkOrderStatus.php =================================================================== --- trunk/WorkOrderStatus.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/WorkOrderStatus.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -79,8 +79,8 @@ echo '</td></tr></table><br />'; //set up options for selection of the item to be issued to the WO - echo '<table class="selection"><tr><th colspan="5"><font size="2" color="#616161">' . _('Material Requirements For this Work Order') . '</font></th></tr>'; - echo '<tr><th colspan="4"><font size="2" color="#616161">' . _('Stock Issued From') . ' - ' . $LocRow['locationname'] . '</font></th></tr>'; + echo '<table class="selection"><tr><th colspan="5" class="header">' . _('Material Requirements For this Work Order') . '</th></tr>'; + echo '<tr><th colspan="4" class="header">' . _('Stock Issued From') . ' - ' . $LocRow['locationname'] . '</th></tr>'; echo '<tr><th colspan="2">' . _('Item') . '</th> <th>' . _('Qty Required') . '</th> <th>' . _('Qty Issued') . '</th> Modified: trunk/Z_UpgradeDatabase.php =================================================================== --- trunk/Z_UpgradeDatabase.php 2012-04-29 19:24:04 UTC (rev 8750) +++ trunk/Z_UpgradeDatabase.php 2012-04-29 19:24:39 UTC (rev 8751) @@ -68,10 +68,10 @@ // echo '</tr>'; } echo '<table class="selection"><tr>'; - echo '<th colspan="4"><font size="2" color="#616161"><b>'._('Database Updates Have Been Run').'</b></font></th></tr>'; + echo '<th colspan="4" class="header"><b>'._('Database Updates Have Been Run').'</b></th></tr>'; echo '<tr><td style="background-color: #fddbd... [truncated message content] |
From: <tim...@us...> - 2012-04-29 21:55:19
|
Revision: 8752 http://weberp.svn.sourceforge.net/weberp/?rev=8752&view=rev Author: tim_schofield Date: 2012-04-29 21:55:11 +0000 (Sun, 29 Apr 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/AccountGroups.php trunk/ContractBOM.php trunk/CustomerReceipt.php trunk/DeliveryDetails.php trunk/GLJournalInquiry.php trunk/OrderDetails.php trunk/POReport.php trunk/PO_OrderDetails.php trunk/Payments.php trunk/PcAssignCashToTab.php trunk/PcClaimExpensesFromTab.php trunk/PcExpensesTypeTab.php trunk/Prices_Customer.php trunk/RecurringSalesOrders.php trunk/ReprintGRN.php trunk/css/silverwolf/default.css Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/AccountGroups.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -306,7 +306,7 @@ echo '<table class="selection">'; echo '<tr> - <th colspan="2"><font size="2" color="#616161">' . _('Edit Account Group Details') . '</th> + <th colspan="2" class="header">' . _('Edit Account Group Details') . '</th> </tr>'; echo '<input type="hidden" name="SelectedAccountGroup" value="' . $_GET['SelectedAccountGroup'] . '" />'; echo '<input type="hidden" name="GroupName" value="' . $_POST['GroupName'] . '" />'; @@ -337,7 +337,7 @@ echo '<br /><table class="selection">'; echo '<input type="hidden" name="SelectedAccountGroup" value="' . $_POST['SelectedAccountGroup'] . '" />'; echo '<tr> - <th colspan="2"><font size="2" color="#616161">' . _('New Account Group Details') . '</th> + <th colspan="2" class="header">' . _('New Account Group Details') . '</th> </tr>'; echo '<tr> <td>' . _('Account Group Name') . ':' . '</td> @@ -406,7 +406,7 @@ </tr>'; echo '<tr> - <td colspan="2"><div class="centre"><input tabindex="6" type="submit" name="submit" value="' . _('Enter Information') . '" /></div></td> + <td colspan="2"><div class="centre"><button tabindex="6" type="submit" name="submit">' . _('Enter Information') . '</button></div></td> </tr>'; echo '</table><br />'; Modified: trunk/ContractBOM.php =================================================================== --- trunk/ContractBOM.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/ContractBOM.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -233,7 +233,7 @@ echo '<table cellpadding="2" class="selection">'; if (isset($_SESSION['Contract'.$identifier]->ContractRef)) { - echo '<tr><th colspan="7"><font color="#616161" size="2">' . _('Contract Reference:') .' '. $_SESSION['Contract'.$identifier]->ContractRef.'</font></th></tr>'; + echo '<tr><th colspan="7" class="header">' . _('Contract Reference:') .' '. $_SESSION['Contract'.$identifier]->ContractRef.'</th></tr>'; } echo '<tr> @@ -274,8 +274,8 @@ $DisplayTotal = locale_money_format($TotalCost,$_SESSION['Contract'.$identifier]->CurrCode); echo '<tr><td colspan="6" class="number">' . _('Total Cost') . '</td><td class="number"><b>' . $DisplayTotal . '</b></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="UpdateLines" value="' . _('Update Lines') . '" />'; - echo '<input type="submit" name="BackToHeader" value="' . _('Back To Contract Header') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="UpdateLines">' . _('Update Lines') . '</button>'; + echo '<button type="submit" name="BackToHeader">' . _('Back To Contract Header') . '</button></div>'; } /*Only display the contract BOM lines if there are any !! */ @@ -316,17 +316,17 @@ } echo '</select></td> - <td><font size="2">' . _('Enter text extracts in the description') . ':</font></td> + <td>' . _('Enter text extracts in the description') . ':</td> <td><input type="text" name="Keywords" size="20" maxlength="25" value="' . $_POST['Keywords'] . '" /></td></tr> <tr><td></td> - <td><font size="3"> <b>' . _('OR') . ' </b></font><font size="2">' . _('Enter extract of the Stock Code') . - ':</font></td> + <td><font size="3"> <b>' . _('OR') . ' </b></font>' . _('Enter extract of the Stock Code') . + ':</td> <td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> </tr> <tr><td></td> - <td><font size="3"><b>' . _('OR') . ' </b></font><font size="2"><a target="_blank" href="'.$rootpath.'/Stocks.php?">' . _('Create a New Stock Item') . '</a></font></td></tr> + <td><font size="3"><b>' . _('OR') . ' </b></font><a target="_blank" href="'.$rootpath.'/Stocks.php?">' . _('Create a New Stock Item') . '</a></td></tr> </table><br /> - <div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /> + <div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button> </div><br />'; @@ -335,7 +335,7 @@ if (isset($SearchResult)) { - echo '<table cellpadding="1">'; + echo '<table cellpadding="1" class="selection">'; $TableHeader = '<tr> <th>' . _('Code') . '</th> @@ -390,7 +390,7 @@ prnMsg( _('Only the first') . ' ' . $Maximum_Number_Of_Parts_To_Show . ' ' . _('can be displayed') . '. ' . _('Please restrict your search to only the parts required'),'info'); } - echo '<br /><div class="centre"><input type="submit" name="NewItem" value="' . _('Add to Contract Bill Of Material') .'" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="NewItem">' . _('Add to Contract Bill Of Material') .'</button></div>'; }#end if SearchResults to show echo '</form>'; Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/CustomerReceipt.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -832,7 +832,7 @@ $_SESSION['ReceiptBatch']->Narrative=''; } echo '<tr><td>' . _('Narrative') . ':</td><td><input tabindex="7" type="text" name="BatchNarrative" maxlength="50" size="52" value="' . $_SESSION['ReceiptBatch']->Narrative . '" /></td></tr>'; -echo '<tr><td colspan="3"><div class="centre"><input tabindex="8" type="submit" name="BatchInput" value="' . _('Accept') . '" /></div></td></tr>'; +echo '<tr><td colspan="3"><div class="centre"><button tabindex="8" type="submit" name="BatchInput">' . _('Accept') . '</button></div></td></tr>'; echo '</table><br />'; if (isset($_SESSION['ReceiptBatch'])){ @@ -935,7 +935,7 @@ if (isset($_POST['GLEntry']) AND isset($_SESSION['ReceiptBatch'])){ /* Set up a heading for the transaction entry for a GL Receipt */ echo '<br /><table class="selection">'; - echo '<th colspan="2"><font size="2" color="#616161">' . _('General Ledger Receipt Entry') . '</font></th>'; + echo '<th colspan="2" class="header">' . _('General Ledger Receipt Entry') . '</th>'; //Select the tag echo '<tr><td>' . _('Select Tag') . ':</td><td><select name="tag">'; @@ -1019,8 +1019,8 @@ echo '<td>' . _('Narrative') . ':</td>'; echo '<td><textarea tabindex="13" name="Narrative" cols="40" rows="1"></textarea></td>'; echo '</table>'; - echo '<br /><div class="centre"><input tabindex="14" type="submit" name="Process" value="' . _('Accept') . '" />'; - echo '<input tabindex="15" type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button tabindex="14" type="submit" name="Process">' . _('Accept') . '</button>'; + echo '<button tabindex="15" type="submit" name="Cancel">' . _('Cancel') . '</button></div>'; } elseif (isset($_SESSION['ReceiptBatch']) AND !isset($_POST['GLEntry'])){ @@ -1039,8 +1039,8 @@ echo '<td><input tabindex="11" type="text" name="CustInvNo" size="8" maxlength="8" /></td>'; echo '</tr></table>'; echo '<div class="centre"><br />'; - echo '<input tabindex="11" type="submit" name="Search" value="' . _('Search Now') . '" />'; - echo '<br/><br/><input tabindex="12" type="submit" name="GLEntry" value="' . _('Enter A GL Receipt') . '" /><br /></div>'; + echo '<button tabindex="11" type="submit" name="Search">' . _('Search Now') . '</button>'; + echo '<br/><br/><button tabindex="12" type="submit" name="GLEntry">' . _('Enter A GL Receipt') . '</button><br /></div>'; if (isset($CustomerSearchResult)) { @@ -1062,9 +1062,10 @@ } printf('<td><font size="1"> - <input type="submit" name="Select" value="%s" /></font></td> + <button type="submit" name="Select" value="%s" />%s</button></font></td> <td>%s</td></tr>', $myrow['debtorno'], + $myrow['debtorno'], $myrow['name']); $j++; @@ -1084,7 +1085,7 @@ } if (isset($_SESSION['ReceiptBatch']->Items) and count($_SESSION['ReceiptBatch']->Items) > 0){ - echo '<div class="centre"><br/><input tabindex="13" type="submit" name="CommitBatch" value="' . _('Accept and Process Batch') . '" /></div>'; + echo '<div class="centre"><br/><button tabindex="13" type="submit" name="CommitBatch">' . _('Accept and Process Batch') . '</button></div>'; } echo '</form>'; Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/DeliveryDetails.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -837,9 +837,9 @@ echo '<table cellpading="2" class="selection">'; if ($_SESSION['Items'.$identifier]->Quotation==1){ - echo '<tr><th colspan="7"><font size="2" color="#616161">'._('Quotation Summary').'</font></th></tr>'; + echo '<tr><th colspan="7" class="header">'._('Quotation Summary').'</th></tr>'; } else { - echo '<tr><th colspan="7"><font size="2" color="#616161">'._('Order Summary').'</font></th></tr>'; + echo '<tr><th colspan="7" class="header">'._('Order Summary').'</th></tr>'; } echo '<tr> <th>'. _('Item Code') .'</th> @@ -966,7 +966,7 @@ } echo '<br /><table class="selection">'; -echo '<tr><th colspan="2"><font color="#616161" size="3">'._('Delivery Details').'</font></th></tr>'; +echo '<tr><th colspan="2" class="header">'._('Delivery Details').'</th></tr>'; echo '<tr> <td>'. _('Deliver To') .':</td> <td><input type="text" size="42" maxlength="40" name="DeliverTo" value="' . $_SESSION['Items'.$identifier]->DeliverTo . '" /></td> @@ -1113,7 +1113,7 @@ echo '<td><input type="text" class="number" size="10" maxlength="12" name="FreightCost" value="' . $_SESSION['Items'.$identifier]->FreightCost . '" /></td>'; if ($_SESSION['DoFreightCalc']==true){ - echo '<td><input type="submit" name="Update" value="' . _('Recalc Freight Cost') . '" /></td></tr>'; + echo '<td><button type="submit" name="Update" value="" />' . _('Recalc Freight Cost') . '</button></td></tr>'; } if ((!isset($_POST['ShipVia']) OR $_POST['ShipVia']=='') AND isset($_SESSION['Items'.$identifier]->ShipVia)){ @@ -1150,13 +1150,13 @@ echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="BackToLineDetails" value="' . _('Modify Order Lines') . '" /><br />'; +echo '<br /><div class="centre"><button type="submit" name="BackToLineDetails">' . _('Modify Order Lines') . '</button><br />'; if ($_SESSION['ExistingOrder'.$identifier]==0){ - echo '<br /><br /><input type="submit" name="ProcessOrder" value="' . _('Place Order') . '" />'; - echo '<br /><br /><input type="submit" name="MakeRecurringOrder" value="' . _('Create Recurring Order') . '" />'; + echo '<br /><br /><button type="submit" name="ProcessOrder">' . _('Place Order') . '</button>'; + echo '<br /><br /><button type="submit" name="MakeRecurringOrder">' . _('Create Recurring Order') . '</button>'; } else { - echo '<br /><input type="submit" name="ProcessOrder" value="' . _('Commit Order Changes') . '" />'; + echo '<br /><button type="submit" name="ProcessOrder">' . _('Commit Order Changes') . '</button>'; } echo '</div></form>'; Modified: trunk/GLJournalInquiry.php =================================================================== --- trunk/GLJournalInquiry.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/GLJournalInquiry.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -11,7 +11,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '<tr><th colspan="3"><font color="#616161" size="2">' . _('Selection Criteria') . '</font></th></tr>'; + echo '<tr><th colspan="3" class="header">' . _('Selection Criteria') . '</th></tr>'; $sql = "SELECT typeno FROM systypes WHERE typeid=0"; $result = DB_query($sql, $db); @@ -28,8 +28,13 @@ MAX(trandate) AS todate FROM gltrans WHERE type=0"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); - $FromDate = $myrow['fromdate']; - $ToDate = $myrow['todate']; + if (isset($FromDate) and $FromDate != '') { + $FromDate = $myrow['fromdate']; + $ToDate = $myrow['todate']; + } else { + $FromDate=date('Y-m-d'); + $ToDate=date('Y-m-d'); + } echo '<tr><td>' . _('Journals Dated Between') . ':</td> <td>' . _('From') . ':'. '<input type="text" name="FromTransDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" value="' . ConvertSQLDate($FromDate) . '" /></td> @@ -37,7 +42,7 @@ </tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="Show">' . _('Show transactions'). '</button></div>'; echo '</form>'; } else { @@ -86,7 +91,7 @@ } if ($myrow['typeno']!=$LastJournal) { - echo '<tr><td colspan="8" bgcolor="#616161"></td></tr><tr> + echo '<tr><td colspan="8"</td></tr><tr> <td>'. ConvertSQLDate($myrow['trandate']) . '</td> <td class="number">'.$myrow['typeno'].'</td>'; @@ -114,7 +119,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="Return">' . _('Select Another Date'). '</button></div>'; echo '</form>'; } include('includes/footer.inc'); Modified: trunk/OrderDetails.php =================================================================== --- trunk/OrderDetails.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/OrderDetails.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -58,7 +58,7 @@ $myrow = DB_fetch_array($GetOrdHdrResult); $CustomerCurrency=$myrow['currcode']; echo '<table class="selection">'; - echo '<tr><th colspan="4"><font size="3" color="#616161">'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</font></th></tr>'; + echo '<tr><th colspan="4" class="header">'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</th></tr>'; echo '<tr> <th style="text-align: left">' . _('Customer Code') . ':</th> <td class="OddTableRows"><font><a href="' . $rootpath . '/SelectCustomer.php?Select=' . $myrow['debtorno'] . '">' . $myrow['debtorno'] . '</a></td> @@ -149,7 +149,7 @@ $OrderTotalWeight = 0; echo '<br /><table cellpadding="2" class="selection">'; - echo '<tr><th colspan="9"><font size="3" color="#616161">'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].'</font></th></tr>'; + echo '<tr><th colspan="9" class="header">'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].'</th></tr>'; echo '<tr> <th>' . _('Item Code') . '</th> <th>' . _('Item Description') . '</th> Modified: trunk/POReport.php =================================================================== --- trunk/POReport.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/POReport.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -630,7 +630,7 @@ else { $SortBy_Display = $Detail_Array[$_POST['SortBy']]; } - echo '<tr><th colspan="2"><font size="3" color="#616161">' . _('Header Details') . '</font></th></tr>'; + echo '<tr><th colspan="2" class="header">' . _('Header Details') . '</th></tr>'; echo '<tr><td>' . _('Purchase Order Report') . '</td><td>' . $_POST['ReportType'] . ' By ' . $SortBy_Display . '</td></tr>'; echo '<tr><td>' . _('Date Type') . '</td><td>' . $_POST['DateType'] . '</tr>'; echo '<tr><td>' . _('Date Range') . '</td><td>' . $_POST['FromDate'] . _(' To ') . $_POST['ToDate'] . '</td></tr>'; @@ -891,7 +891,7 @@ echo '<input type="hidden" name="Category" value="' . $_POST['Category'] . '" />'; echo '<input type="hidden" name="SortBy" value="' . $_POST['SortBy'] . '" />'; echo '<input type="hidden" name="SummaryType" value="' . $_POST['SummaryType'] . '" />'; - echo '<br /><div class="centre"><input type="submit" name="submitcsv" value="' . _('Export as csv file') . '" /></div></td>'; + echo '<br /><div class="centre"><button type="submit" name="submitcsv">' . _('Export as csv file') . '</button></div></td>'; echo '<br /><div class="centre"><a href="">' . _('Return to Selection') . '</a></div>'; echo '</form>'; } // End of if inputerror != 1 @@ -1600,10 +1600,10 @@ echo '</select></td><td> </td></tr>'; echo '<tr><td> </td></tr> <tr> - <td colspan="4"><div class="centre"><input type="submit" name="submit" value="' . _('Run Inquiry') . '" /></div></td> + <td colspan="4"><div class="centre"><button type="submit" name="submit">' . _('Run Inquiry') . '</button></div></td> </tr> <tr> - <td colspan="4"><div class="centre"><input type="submit" name="submitcsv" value="' . _('Export as csv file') . '" /></div></td> + <td colspan="4"><div class="centre"><button type="submit" name="submitcsv">' . _('Export as csv file') . '</button></div></td> </tr> </table> <br/>'; Modified: trunk/PO_OrderDetails.php =================================================================== --- trunk/PO_OrderDetails.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/PO_OrderDetails.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -85,7 +85,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt="" />' . ' ' . $title . '</p>'; echo '<table class="selection" cellpadding="2">'; -echo '<tr><th colspan="8"><font size="3" color="#616161">'. _('Order Header Details'). '</font></th></tr>'; +echo '<tr><th colspan="8" class="header">'. _('Order Header Details'). '</th></tr>'; echo '<tr><th style="text-align:left">' . _('Supplier Code'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['supplierid'] . '</a></td> <th style="text-align:left">' . _('Supplier Name'). '</td><td><a href="SelectSupplier.php?SupplierID='.$myrow['supplierid'].'">' . $myrow['suppname'] . '</a></td></tr>'; @@ -147,7 +147,7 @@ echo '<table class="selection" cellpadding="0">'; -echo '<tr><th colspan="8"><font size="3" color="#616161">'. _('Order Line Details'). '</font></th></tr>'; +echo '<tr><th colspan="8" class="header">'. _('Order Line Details'). '</th></tr>'; echo '<tr> <th>' . _('Item Code'). '</td> <th>' . _('Item Description'). '</td> @@ -185,22 +185,22 @@ } printf ('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td>%s</td> </tr>' , - $myrow['itemcode'], - $myrow['itemdescription'], - locale_number_format($myrow['quantityord'], $myrow['decimalplaces']), - locale_number_format($myrow['quantityrecd'], $myrow['decimalplaces']), - locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']), - locale_money_format($myrow['unitprice'], $OrderCurrCode), - locale_money_format($myrow['actprice'], $OrderCurrCode), - $DisplayReqdDate); + $myrow['itemcode'], + $myrow['itemdescription'], + locale_number_format($myrow['quantityord'], $myrow['decimalplaces']), + locale_number_format($myrow['quantityrecd'], $myrow['decimalplaces']), + locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']), + locale_money_format($myrow['unitprice'], $OrderCurrCode), + locale_money_format($myrow['actprice'], $OrderCurrCode), + $DisplayReqdDate); } Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/Payments.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -285,8 +285,8 @@ echo _('Has the cheque been printed') . '?<br /><br />'; echo '<input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '" />'; echo '<input type="hidden" name="BankAccount" value="' . $_POST['BankAccount'] . '" />'; - echo '<input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '" /> '; - echo '<input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; + echo '<button type="submit" name="ChequePrinted">' . _('Yes / Continue') . '</button> '; + echo '<button type="submit" name="PaymentCancelled">' . _('No / Cancel Payment') . '</button>'; } else { //Start a transaction to do the whole lot inside @@ -729,7 +729,7 @@ echo '<br /><table class="selection">'; -echo '<tr><th colspan="4"><font size="3" color="#616161">' . _('Payment'); +echo '<tr><th colspan="4" class="header">' . _('Payment'); if ($_SESSION['PaymentDetail'.$identifier]->SupplierID!=''){ echo ' ' . _('to') . ' ' . $_SESSION['PaymentDetail'.$identifier]->SuppName; @@ -739,7 +739,7 @@ echo ' ' . _('from the') . ' ' . $_SESSION['PaymentDetail'.$identifier]->BankAccountName; } -echo ' ' . _('on') . ' ' . $_SESSION['PaymentDetail'.$identifier]->DatePaid . '</font></th></tr>'; +echo ' ' . _('on') . ' ' . $_SESSION['PaymentDetail'.$identifier]->DatePaid . '</th></tr>'; $SQL = "SELECT bankaccountname, bankaccounts.accountcode, @@ -878,17 +878,15 @@ echo '<tr><td>' . _('Reference / Narrative') . ':</td> <td colspan="2"><input type="text" name="Narrative" maxlength="80" size="82" value="' . $_POST['Narrative'] . '" /> ' . _('(Max. length 80 characters)') . '</td> </tr>'; -echo '<tr><td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></td></tr>'; +echo '<tr><td colspan="3"><div class="centre"><button type="submit" name="UpdateHeader">' . _('Update'). '</button></td></tr>'; - echo '</table><br />'; - if ($_SESSION['CompanyRecord']['gllink_creditors']==1 AND $_SESSION['PaymentDetail'.$identifier]->SupplierID==''){ /* Set upthe form for the transaction entry for a GL Payment Analysis item */ echo '<br /><table class="selection">'; - echo '<tr><th colspan="2"><font size="3" color="#616161">' . _('General Ledger Payment Analysis Entry') . '</font></th></tr>'; + echo '<tr><th colspan="2" class="header">' . _('General Ledger Payment Analysis Entry') . '</th></tr>'; //Select the tag echo '<tr><td>' . _('Select Tag') . ':</td><td><select name="tag">'; @@ -939,7 +937,7 @@ echo '<option value="' . $myrow['groupname'] . '">' . $myrow['groupname'] . '</option>'; } } - echo '</select><input type="submit" name="UpdateCodes" value="Select" /></td></tr>'; + echo '</select><button type="submit" name="UpdateCodes">' . _('Select') . '</button></td></tr>'; } if (isset($_POST['GLGroup']) AND $_POST['GLGroup']!='') { @@ -1001,8 +999,8 @@ echo '</table><br />'; echo '<div class="centre"> - <input type="submit" name="Process" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + <button type="submit" name="Process">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button> </div>'; if (sizeOf($_SESSION['PaymentDetail'.$identifier]->GLItems)>0) { @@ -1029,17 +1027,17 @@ $TagName=$TagMyrow[0]; } echo '<tr> - <td align=left>' . $PaymentItem->cheque . '</td> - <td class="number">' . $PaymentItem->Amount . '</td> - <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> - <td>' . stripslashes($PaymentItem->Narrative) . '</td> - <td>' . $PaymentItem->tag . ' - ' . $TagName . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> + <td align=left>' . $PaymentItem->cheque . '</td> + <td class="number">' . $PaymentItem->Amount . '</td> + <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> + <td>' . stripslashes($PaymentItem->Narrative) . '</td> + <td>' . $PaymentItem->tag . ' - ' . $TagName . '</td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> </tr>'; $PaymentTotal += filter_currency_input($PaymentItem->Amount); } - echo '<tr><td></td><td class="number"><b>' . $PaymentTotal . '</b></td><td colspan="3"></td></tr></table><br />'; - echo '<input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; + echo '<tr><td></td><td class="number"><b>' . locale_money_format($PaymentTotal, $_SESSION['PaymentDetail'.$identifier]->AccountCurrency) . '</b></td><td colspan="3"></td></tr></table><br />'; + echo '<button type="submit" name="CommitBatch">' . _('Accept and Process Payment') . '</button>'; } } else { @@ -1070,7 +1068,7 @@ <td><input type="text" name="cheque" maxlength="12" size="12" /></td> </tr>'; echo '</table><br />'; - echo '<input type="submit" name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; + echo '<button type="submit" name="CommitBatch">' . _('Accept and Process Payment') . '</button>'; } echo '</form>'; Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/PcAssignCashToTab.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -188,8 +188,8 @@ echo '</select></td></tr>'; echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="process" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="process">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button></div>'; echo '</form>'; } elseif (isset($SelectedTabs)) { @@ -234,13 +234,13 @@ $result = DB_query($sql,$db); echo '<br /><table class="selection">'; - echo '<tr><th colspan="8"><font color="#616161" size="2">' . _('Details Of Petty Cash Tab ') . '' .$SelectedTabs. '</form></th></tr>'; + echo '<tr><th colspan="8" class="header">' . _('Details Of Petty Cash Tab ') . '' .$SelectedTabs. '</th></tr>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th colspan="8">' . _('Detail Of PC Tab Movements For Last ') .': '; echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> Days '; - echo '<input type="submit" name="Go" value="' . _('Go') . '" />'; + echo '<button type="submit" name="Go">' . _('Go') . '</button>'; echo '</th></tr></form>'; echo '<tr> <th>' . _('Date') . '</th> @@ -333,9 +333,9 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table class="selection">'; //Main table if (isset($_GET['SelectedIndex'])) { - echo '<tr><th colspan="2"><font color="#616161" size="3">'._('Update Cash Assignment').'</font></th></tr>'; + echo '<tr><th colspan="2" class="header">'._('Update Cash Assignment').'</th></tr>'; } else { - echo '<tr><th colspan="2"><font color="#616161" size="3">'._('New Cash Assignment').'</font></th></tr>'; + echo '<tr><th colspan="2" class="header">'._('New Cash Assignment').'</th></tr>'; } if ( isset($_GET['edit'])) { @@ -397,8 +397,9 @@ echo '</td></tr></table>'; // close main table echo '<br /><div class="centre"> - <input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + <button type="submit" name="submit">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button> + </div>'; echo '</form>'; Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/PcClaimExpensesFromTab.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -185,8 +185,8 @@ echo '</select></td></tr>'; echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="process" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="process">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button></div>'; echo '</form>'; @@ -204,7 +204,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table class="selection">'; - echo '<tr><th colspan="8"><font color="#616161" size="3">' . _('Petty Cash Tab') . ' ' .$SelectedTabs. '</font></th></tr>'; + echo '<tr><th colspan="8" class="header">' . _('Petty Cash Tab') . ' ' .$SelectedTabs. '</th></tr>'; echo '<tr><th colspan="8">' . _('Detail Of Movements For Last ') .': '; if(!isset ($Days)){ @@ -212,7 +212,7 @@ } echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> Days '; - echo '<input type="submit" name="Go" value="' . _('Go') . '" />'; + echo '<button type="submit" name="Go">' . _('Go') . '</button>'; echo '</th></tr></form>'; if (isset($_POST['Cancel'])) { @@ -329,6 +329,10 @@ $Amount['amount']=0; } + if(!isset($TabRow['currency'])) { + $TabRow['currency']=$_SESSION['CompanyRecord']['currencydefault']; + } + echo '<tr><td colspan="2" class="number">' . _('Current balance') . ':</td> <td class="number">'.locale_money_format($Amount['amount'],$TabRow['currency']).'</td></tr>'; @@ -419,8 +423,8 @@ echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; echo '<input type="hidden" name="Days" value="' .$Days. '" />'; echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button></div>'; echo '</form>'; } // end if user wish to delete Modified: trunk/PcExpensesTypeTab.php =================================================================== --- trunk/PcExpensesTypeTab.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/PcExpensesTypeTab.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -139,8 +139,8 @@ echo '</td></tr></table>'; // close main table echo '<br /><div class="centre"> - <input type="submit" name=process value="' . _('Accept') . '" /> - <input type="submit" name=Cancel value="' . _('Cancel') . '" /></div>'; + <button type="submit" name=process>' . _('Accept') . '</button> + <button type="submit" name=Cancel>' . _('Cancel') . '</button></div>'; echo '</form>'; @@ -157,7 +157,7 @@ $result = DB_query($sql,$db); echo '<br /><table class="selection">'; - echo '<tr><th colspan="3"><font size="2" color="#616161">' . _('Expense Codes for Type of Tab ') . ' ' .$SelectedTab. '</font></th></tr>'; + echo '<tr><th colspan="3" type="header">' . _('Expense Codes for Type of Tab ') . ' ' .$SelectedTab. '</th></tr>'; echo '<tr> <th>' . _('Expense Code') . '</th> <th>' . _('Description') . '</th> @@ -224,8 +224,8 @@ echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button></div>'; echo '</form>'; } // end if user wish to delete Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/Prices_Customer.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -32,7 +32,7 @@ } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . _('Special Customer Prices').'</p>'; -echo '<p class="page_title_text"><font color="blue"><b>' . $myrow['name'] . ' ' . _('in') . ' ' . $myrow['currcode'] . '<br />' . ' ' . _('for') . ' '; +echo '<p class="page_title_text">' . $myrow['name'] . ' ' . _('in') . ' ' . $myrow['currcode'] . '<br />' . ' ' . _('for') . ' '; $CurrCode = $myrow['currcode']; $SalesType = $myrow['salestype']; @@ -52,7 +52,7 @@ exit; } -echo $Item . ' - ' . $myrow['description'] . '</b></font></p>'; +echo $Item . ' - ' . $myrow['description'] . '</font></p>'; if (isset($_POST['submit'])) { @@ -218,14 +218,15 @@ if (DB_num_rows($result) == 0) { echo '<tr><td>' . _('There are no default prices set up for this part in this currency') . '</td></tr>'; } else { - echo '<tr><th colspan="6"><font color="#616161" size="2">' . _('Normal Price') . '</font></th></tr>'; - echo '<tr><th>' . _('Price') . '</th> - <th>' . _('UOM'). '</th> - <th>' . _('Conversion') . '<br />'._('Factor') . '</th> - <th>' . _('Decimal') . '<br />' . _('Places') . '</th> - <th>' . _('Start Date') . '</th> - <th>' . _('End Date') . '</th> - </tr>'; + echo '<tr><th colspan="6" class="header">' . _('Normal Price') . '</th></tr>'; + echo '<tr> + <th>' . _('Price') . '</th> + <th>' . _('UOM'). '</th> + <th>' . _('Conversion') . '<br />'._('Factor') . '</th> + <th>' . _('Decimal') . '<br />' . _('Places') . '</th> + <th>' . _('Start Date') . '</th> + <th>' . _('End Date') . '</th> + </tr>'; while ($myrow = DB_fetch_array($result)) { if ($myrow['enddate']=='0000-00-00'){ $EndDateDisplay = _('No End Date'); @@ -271,7 +272,7 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); echo '<table class="selection">'; -echo '<tr><th colspan="9"><font color="#616161" size="2">' . _('Special Prices') . '</font></th></tr>'; +echo '<tr><th colspan="9" class="header">' . _('Special Prices') . '</th></tr>'; if (DB_num_rows($result) == 0) { echo '<tr><td>' . _('There are no special prices set up for this part') . '</td></tr>'; @@ -451,7 +452,7 @@ </tr></table>'; -echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div>'; +echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div>'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/RecurringSalesOrders.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -313,7 +313,7 @@ echo '<table cellpadding="2" class="selection">'; -echo '<tr><th colspan="7"><font size="2" color="#616161"><b>'._('Order Line Details').'</b></font></th></tr>'; +echo '<tr><th colspan="7" class="header"><b>'._('Order Line Details').'</b></th></tr>'; echo '<tr> <th>'. _('Item Code') .'</th> <th>'. _('Item Description') .'</th> @@ -368,7 +368,7 @@ </table>'; echo '<br /><table class="selection">'; -echo '<tr><th colspan="7"><font size="2" color="#616161"><b>'._('Order Header Details').'</b></font></th></tr>'; +echo '<tr><th colspan="7" class="header"><b>'._('Order Header Details').'</b></th></tr>'; echo '<tr> <td>'. _('Deliver To') .':</td> @@ -510,14 +510,14 @@ echo '<br /><div class="centre">'; if ($NewRecurringOrder=='Yes'){ echo '<input type="hidden" name="NewRecurringOrder" value="Yes" />'; - echo '<input type="submit" name="Process" value="' . _('Create Recurring Order') . '" />'; + echo '<button type="submit" name="Process">' . _('Create Recurring Order') . '</button>'; } else { echo '<input type="hidden" name="NewRecurringOrder" value="No" />'; echo '<input type="hidden" name="ExistingRecurrOrderNo" value="' . $_POST['ExistingRecurrOrderNo'] . '" />'; - echo '<input type="submit" name="Process" value="' . _('Update Recurring Order Details') . '" />'; + echo '<button type="submit" name="Process">' . _('Update Recurring Order Details') . '</button>'; - echo '<br /><br /><input type="submit" name="DeleteRecurringOrder" value="' . _('Delete Recurring Order') . ' ' . $_POST['ExistingRecurrOrderNo'] . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this recurring order template?') . '\');" />'; + echo '<br /><br /><button type="submit" name="DeleteRecurringOrder" onclick="return confirm(\'' . _('Are you sure you wish to delete this recurring order template?') . '\');">' . _('Delete Recurring Order') . ' ' . $_POST['ExistingRecurrOrderNo'] . '</button>'; } echo '</form></div>'; Modified: trunk/ReprintGRN.php =================================================================== --- trunk/ReprintGRN.php 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/ReprintGRN.php 2012-04-29 21:55:11 UTC (rev 8752) @@ -13,10 +13,10 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; -echo '<tr><th colspan="2"><font size="2" color="#616161">' . _('Select a purchase order') . '</th></tr>'; +echo '<tr><th colspan="2" class="header">' . _('Select a purchase order') . '</th></tr>'; echo '<tr><td>' . _('Enter a Purchase Order Number') . '</td>'; echo '<td>' . '<input type="text" name="PONumber" class="number" size="7" value="'.$_POST['PONumber'].'" /></td></tr>'; -echo '<tr><td colspan="2" style="text-align: center">' . '<input type="submit" name="Show" value="Show GRNs" /></td></tr>'; +echo '<tr><td colspan="2" style="text-align: center">' . '<button type="submit" name="Show">' . _('Show GRNs') . '</button></td></tr>'; echo '</table>'; echo '</form>'; @@ -63,7 +63,7 @@ } $k=0; echo '<br /><table class="selection">'; - echo '<tr><th colspan="8"><font size="2" color="#616161">' . _('GRNs for Purchase Order No') .' ' . $_POST['PONumber'] . '</th></tr>'; + echo '<tr><th colspan="8" class="header">' . _('GRNs for Purchase Order No') .' ' . $_POST['PONumber'] . '</th></tr>'; echo '<tr><th>' . _('Supplier') . '</th>'; echo '<th>' . _('PO Order line') . '</th>'; echo '<th>' . _('GRN Number') . '</th>'; Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2012-04-29 19:24:39 UTC (rev 8751) +++ trunk/css/silverwolf/default.css 2012-04-29 21:55:11 UTC (rev 8752) @@ -265,21 +265,20 @@ } button { - background-color: #9F9F9F; - border-top: 1px solid #abbbcc; + background-color: #C4C4C4; + border-top: 1px solid #a1afbf; border-left: 1px solid #a7b6c7; border-bottom: 1px solid #a1afbf; border-right: 1px solid #a7b6c7; -webkit-border-radius: 12px; -moz-border-radius: 12px; - border-radius: 12px; - -webkit-box-shadow: inset 0 1px 0 0 white; - -moz-box-shadow: inset 0 1px 0 0 white; - box-shadow: inset 0 1px 0 0 white; + border-radius: 7px; + -webkit-box-shadow: inset 0 0px 0 0 white; + -moz-box-shadow: inset 0 0px 0 0 white; + box-shadow: inset 0 0px 0 0 white; color: #092442; font: normal 10px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - line-height: 1; - padding: 3px 3px 3px 3px; + padding: 1px 1px 1px 1px; margin-right: 3px; text-align: center; } @@ -298,7 +297,7 @@ border-right: 1px solid #9caaba; -webkit-box-shadow: inset 0 1px 0 0 #f2f2f2; -moz-box-shadow: inset 0 1px 0 0 #f2f2f2; - box-shadow: inset 0 1px 0 0 #f2f2f2; + box-shadow: inset 0 0px 0 0 #f2f2f2; color: #163659; cursor: pointer; } @@ -714,7 +713,7 @@ font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; padding-top: 2px; padding-bottom: 2px; - font-weight: bold; + font-weight: normal; font-size: 150%; color: white; background-color: #7A7A89; @@ -881,8 +880,8 @@ } .OsRow { - background-color: #234567; - color: white; + background-color: #FFDAE1; + color: #510D19; } /* From merge, uncomment to apply style .table_index { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-04-30 07:28:59
|
Revision: 8753 http://weberp.svn.sourceforge.net/weberp/?rev=8753&view=rev Author: tim_schofield Date: 2012-04-30 07:28:52 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/InternalStockRequest.php trunk/PurchData.php trunk/SelectProduct.php trunk/StockCostUpdate.php trunk/WhereUsedInquiry.php trunk/Z_SalesIntegrityCheck.php trunk/css/silverwolf/default.css trunk/includes/IndexArray.php Modified: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php 2012-04-29 21:55:11 UTC (rev 8752) +++ trunk/InternalStockRequest.php 2012-04-30 07:28:52 UTC (rev 8753) @@ -125,7 +125,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr> - <th colspan="2"><font size="2" color="navy">' . _('Edit the Request Line') . '</font></th> + <th colspan="2" class="header">' . _('Edit the Request Line') . '</th> </tr>'; echo '<tr> <td>' . _('Line number') . '</td> @@ -149,7 +149,7 @@ </tr>'; echo '<input type="hidden" name="LineNumber" value="' . $_SESSION['Request']->LineItems[$_GET['Edit']]->LineNumber . '" />'; echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="Edit" value="' . _('Update Line') . '" /></div></form>'; + echo '<div class="centre"><button type="submit" name="Edit">' . _('Update Line') . '</button></div></form>'; include('includes/footer.inc'); exit; } @@ -159,7 +159,7 @@ echo '<table class="selection">'; echo '<tr> - <th colspan="2"><font color="navy" size="2">' . _('Internal Stock Request Details') . '</font></th> + <th colspan="2" class="header">' . _('Internal Stock Request Details') . '</th> </tr>'; echo '<tr> <td>' . _('Department') . ':</td>'; @@ -209,7 +209,7 @@ echo '</table><br />'; -echo '<div class="centre"><input type="submit" name="Update" value="' . _('Update') . '" /></div>'; +echo '<div class="centre"><button type="submit" name="Update">' . _('Update') . '</button></div>'; echo '</div></form>'; @@ -224,7 +224,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<br /><table class="selection">'; echo '<tr> - <th colspan="7"><font size="2" color="navy">' . _('Details of Items Requested') . '</font></th> + <th colspan="7" class="header">' . _('Details of Items Requested') . '</th> </tr>'; echo '<tr> <th>'. _('Line Number') . '</th> @@ -257,7 +257,7 @@ } echo '</table><br />'; -echo '<div class="centre"><input type="submit" name="Submit" value="' . _('Submit') . '" /></div><br />'; +echo '<div class="centre"><button type="submit" name="Submit">' . _('Submit') . '</button></div><br />'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -309,7 +309,7 @@ echo '<td><input type="text" name="StockCode" size="15" maxlength="18" /></td>'; } echo '</tr></table><br />'; -echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br />'; +echo '<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button></div><br />'; echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; echo '</form>'; @@ -476,16 +476,16 @@ $ListPage++; } echo '</select> - <input type="submit" name="Go" value="' . _('Go') . '" /> - <input type="submit" name="Previous" value="' . _('Previous') . '" /> - <input type="submit" name="Next" value="' . _('Next') . '" />'; + <button type="submit" name="Go">' . _('Go') . '</button> + <button type="submit" name="Previous">' . _('Previous') . '</button> + <button type="submit" name="Next">' . _('Next') . '</button>'; echo '<input type="hidden" name=Keywords value="'.$_POST['Keywords'].'" />'; echo '<input type="hidden" name=StockCat value="'.$_POST['StockCat'].'" />'; echo '<input type="hidden" name=StockCode value="'.$_POST['StockCode'].'" />'; // echo '<input type="hidden" name=Search value="Search" />'; echo '<br /></div>'; } - echo '<table cellpadding="2">'; + echo '<table cellpadding="2" class="selection">'; echo '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> @@ -518,7 +518,7 @@ $ItemStatus =''; } - echo '<td><input type="submit" name="Select" value="' . $myrow['stockid'] . '" /></td> + echo '<td><button type="submit" name="Select" value="' . $myrow['stockid'] . '" />' . $myrow['stockid'] . '</button></td> <td>'.$myrow['description'].'</td> <td class="number">' . $qoh . '</td> <td>' . $myrow['units'] . '</td> @@ -540,16 +540,16 @@ $j = 1; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="orderform">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="table1">'; + echo '<table class="selection">'; echo '<tr><td> <input type="hidden" name="previous" value="'.($Offset-1).'" /> - <input tabindex="'.($j+8).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; + <button tabindex="'.($j+8).'" type="submit" name="Prev">'._('Prev').'</button></td>'; echo '<td style="text-align:center" colspan="6"> <input type="hidden" name="order_items" value="1" /> - <input tabindex="'.($j+9).'" type="submit" value="'._('Add to Requisition').'" /></td>'; + <button tabindex="'.($j+9).'" type="submit">'._('Add to Requisition').'</button></td>'; echo '<td> <input type="hidden" name="nextlist" value="'.($Offset+1).'" /> - <input tabindex="'.($j+10).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; + <button tabindex="'.($j+10).'" type="submit" name="Next">'._('Next').'</button></td></tr>'; echo '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> @@ -618,7 +618,7 @@ $PurchRow = DB_fetch_row($PurchResult); if ($PurchRow[0]!=null){ - $PurchQty = $PurchRow[0]/$PriceRow['conversionfactor']; + $PurchQty = $PurchRow[0]; } else { $PurchQty = 0; } @@ -659,7 +659,6 @@ </tr>'; echo '<input type="hidden" name="DecimalPlaces'.$i.'" value="' . $myrow['decimalplaces'] . '" />'; echo '<input type="hidden" name="ItemDescription'.$i.'" value="' . $myrow['description'] . '" />'; - echo '<input type="hidden" name="ConversionFactor'.$i.'" value="' . $PriceRow['conversionfactor'] . '" />'; echo '<input type="hidden" name="Units'.$i.'" value="' . $myrow['stockunits'] . '" />'; if ($j==1) { $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; @@ -669,11 +668,11 @@ } #end of while loop echo '<tr><td><input type="hidden" name="previous" value="'.($Offset-1).'" /> - <input tabindex="'.($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; + <button tabindex="'.($j+7).'" type="submit" name="Prev">'._('Prev').'</button></td>'; echo '<td style="text-align:center" colspan="6"><input type="hidden" name="order_items" value="1" /> - <input tabindex="'.($j+8).'" type="submit" value="'._('Add to Requisition').'" /></td>'; + <button tabindex="'.($j+8).'" type="submit">'._('Add to Requisition').'</button></td>'; echo '<td><input type="hidden" name="nextlist" value="'.($Offset+1).'" /> - <input tabindex="'.($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td><tr/>'; + <button tabindex="'.($j+9).'" type="submit" name="Next">'._('Next').'</button></td><tr/>'; echo '</table></form>'; echo $jsCall; Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2012-04-29 21:55:11 UTC (rev 8752) +++ trunk/PurchData.php 2012-04-30 07:28:52 UTC (rev 8753) @@ -297,7 +297,7 @@ echo '<td><input type="text" name="SupplierCode" size="10" maxlength="10" /></td>'; echo '</tr></table><br />'; echo '<div class="centre"> - <input type="submit" name="SearchSupplier" value="' . _('Find Suppliers Now') . '" /> + <button type="submit" name="SearchSupplier">' . _('Find Suppliers Now') . '</button> </div> </form>'; include ('includes/footer.inc'); @@ -394,7 +394,7 @@ echo '<tr class="OddTableRows">'; $k++; } - printf('<td><input type="submit" name="SupplierID" value="%s" /></td> + printf('<td><button type="submit" name="SupplierID" value="%s">%s</button></td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -402,6 +402,7 @@ <td>%s</td> </tr>', $myrow['supplierid'], + $myrow['supplierid'], $myrow['suppname'], $myrow['currcode'], $myrow['address1'], @@ -466,7 +467,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> - <th colspan="3"><font color="navy" size="3">' . _('Data for Purchasing') . ' ' . $StockID . ' ' . _('from') . ' '. $SupplierID . '</font></th> + <th colspan="3" class="header">' . _('Data for Purchasing') . ' ' . $StockID . ' ' . _('from') . ' '. $SupplierID . '</th> </tr>'; if (!isset($SupplierID)) { $SupplierID = ''; @@ -568,9 +569,9 @@ } echo '</select></td></tr></table><br /><div class="centre">'; if (isset($_GET['Edit'])) { - echo '<input type="submit" name="UpdateRecord" value="' . _('Update') . '" />'; + echo '<button type="submit" name="UpdateRecord">' . _('Update') . '</button>'; } else { - echo '<input type="submit" name="AddRecord" value="' . _('Add') . '" />'; + echo '<button type="submit" name="AddRecord">' . _('Add') . '</button>'; } echo '</div>'; echo '<div class="centre">'; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-04-29 21:55:11 UTC (rev 8752) +++ trunk/SelectProduct.php 2012-04-30 07:28:52 UTC (rev 8753) @@ -76,7 +76,7 @@ } echo '<table width="90%" class="selection"><tr><th colspan="3"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . ' ' . $StockID . ' - ' . $myrow['description'] . ' ' . $ItemStatus . '</b></th></tr>'; echo '<tr><td width="40%" valign="top"> - <table align="left">'; //nested table + <table align="left" style="background: transparent;">'; //nested table echo '<tr><th style="text-align:right;">' . _('Item Type:') . '</th> <td colspan="2" class="select">'; switch ($myrow['mbflag']) { @@ -192,7 +192,7 @@ } //end of if PricesSecuirty allows viewing of prices echo '</table>'; //end of first nested table // Item Category Property mod: display the item properties - echo '<table align="left">'; + echo '<table align="left" class="selection">'; $CatValResult = DB_query("SELECT categoryid FROM stockmaster WHERE stockid='" . $StockID . "'", $db); @@ -246,7 +246,7 @@ } //end loop round properties for the item category echo '</table>'; //end of Item Category Property mod echo '<td style="width: 15%; vertical-align: top"> - <table>'; //nested table to show QOH/orders + <table style="background: transparent">'; //nested table to show QOH/orders $QOH = 0; switch ($myrow['mbflag']) { case 'A': @@ -343,7 +343,7 @@ if (($myrow['mbflag'] == 'B' OR ($myrow['mbflag'] == 'M')) AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens']))){ - echo '<td width="50%" valign="top"><table> + echo '<td width="50%" valign="top"><table style="background: transparent"> <tr><th width="50%">' . _('Supplier') . '</th> <th width="15%">' . _('Cost') . '</th> <th width="5%">' . _('Curr') . '</th> @@ -474,7 +474,7 @@ echo '</td></tr></table>'; } else { // options (links) to pages. This requires stock id also to be passed. - echo '<table width="90%" cellpadding="4">'; + echo '<table width="90%" cellpadding="4" class="selection">'; echo '<tr> <th width="33%">' . _('Item Inquiries') . '</th> <th width="33%">' . _('Item Transactions') . '</th> @@ -527,7 +527,7 @@ echo '<input type="text" name="StockCode" size="15" maxlength="18" />'; } echo '</td></tr></table><br />'; -echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br />'; +echo '<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button></div><br />'; echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; echo '</form>'; // query for list of record(s) @@ -717,16 +717,16 @@ $ListPage++; } echo '</select> - <input type="submit" name="Go" value="' . _('Go') . '" /> - <input type="submit" name="Previous" value="' . _('Previous') . '" /> - <input type="submit" name="Next" value="' . _('Next') . '" />'; + <button type="submit" name="Go">' . _('Go') . '</button> + <button type="submit" name="Previous">' . _('Previous') . '</button> + <button type="submit" name="Next">' . _('Next') . '</button>'; echo '<input type="hidden" name=Keywords value="'.$_POST['Keywords'].'" />'; echo '<input type="hidden" name=StockCat value="'.$_POST['StockCat'].'" />'; echo '<input type="hidden" name=StockCode value="'.$_POST['StockCode'].'" />'; // echo '<input type="hidden" name=Search value="Search" />'; echo '<br /></div>'; } - echo '<table cellpadding="2">'; + echo '<table cellpadding="2" class="selection">'; $tableheader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> @@ -757,10 +757,10 @@ if ($myrow['discontinued']==1){ $ItemStatus = '<font class="bad">' . _('Obsolete') . '</font>'; } else { - $ItemStatus =''; + $ItemStatus = '<font class="good">' . _('Current') . '</font>'; } - echo '<td><input type="submit" name="Select" value="' . $myrow['stockid'] . '" /></td> + echo '<td><button type="submit" name="Select" value="' . $myrow['stockid'] . '" />' . $myrow['stockid'] . '</button></td> <td>'.$myrow['description'].'</td> <td class="number">' . $qoh . '</td> <td>' . $myrow['units'] . '</td> Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2012-04-29 21:55:11 UTC (rev 8752) +++ trunk/StockCostUpdate.php 2012-04-30 07:28:52 UTC (rev 8753) @@ -22,8 +22,12 @@ if (isset($_POST['UpdateData'])){ $_POST['MaterialCost'] = filter_currency_input($_POST['MaterialCost']); - $_POST['LabourCost'] = filter_currency_input($_POST['LabourCost']); - $_POST['OverheadCost'] = filter_currency_input($_POST['OverheadCost']); + if (isset($_POST['LabourCost'])) { + $_POST['LabourCost'] = filter_currency_input($_POST['LabourCost']); + } + if (isset($_POST['OverheadCost'])) { + $_POST['OverheadCost'] = filter_currency_input($_POST['OverheadCost']); + } $_POST['OldMaterialCost'] = filter_currency_input($_POST['OldMaterialCost']); $_POST['OldLabourCost'] = filter_currency_input($_POST['OldLabourCost']); @@ -193,7 +197,7 @@ echo '<input type="hidden" name="LabourCost" value="0" />'; echo '<input type="hidden" name="OverheadCost" value="0" />'; } - echo '</table><br /><div class="centre"><input type="submit" name="UpdateData" value="' . _('Update') . '" /><br /><br />'; + echo '</table><br /><div class="centre"><button type="submit" name="UpdateData">' . _('Update') . '</button><br />'; } if ($myrow['mbflag']!='D'){ echo '<div class="centre"><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; Modified: trunk/WhereUsedInquiry.php =================================================================== --- trunk/WhereUsedInquiry.php 2012-04-29 21:55:11 UTC (rev 8752) +++ trunk/WhereUsedInquiry.php 2012-04-30 07:28:52 UTC (rev 8753) @@ -18,15 +18,17 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"><div class="centre">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<table class="selection"> + <tr>'; if (isset($StockID)) { - echo _('Enter an Item Code') . ': <input type="text" name="StockID" size="21" maxlength="20" value="'.$StockID.'" />'; + echo '<td>' . _('Enter an Item Code') . ': </td><td><input type="text" name="StockID" size="21" maxlength="20" value="'.$StockID.'" /></td></tr>'; } else { - echo _('Enter an Item Code') . ': <input type="text" name="StockID" size="21" maxlength="20" />'; + echo '<td>' . _('Enter an Item Code') . ': </td><td><input type="text" name="StockID" size="21" maxlength="20" /></td></tr>'; } -echo '</div><br /><div class="centre"><button type="submit" name="ShowWhereUsed">' . _('Show Where Used') . '</button>'; +echo '<tr><td colspan="2"><div class="centre"><button type="submit" name="ShowWhereUsed">' . _('Show Where Used') . '</button></td></tr>'; -echo '</div><br />'; +echo '</table><br />'; if (isset($StockID)) { Modified: trunk/Z_SalesIntegrityCheck.php =================================================================== --- trunk/Z_SalesIntegrityCheck.php 2012-04-29 21:55:11 UTC (rev 8752) +++ trunk/Z_SalesIntegrityCheck.php 2012-04-30 07:28:52 UTC (rev 8753) @@ -10,12 +10,10 @@ $title = _('Sales Integrity'); include('includes/header.inc'); +echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" title="' . _('Sales Integrity Check') . '" alt="" />' . ' ' . _('Sales Integrity Check') . '</p>'; -echo '<div class="centre"><font size="4" color="blue"><u><b>' . _('Sales Integrity Check') . '</b></u></font></div>'; +echo '<table class="selection">'; -echo '<br /><br />'._('Check every Invoice has a Sales Order').'<br />'; -echo '<br /><br />'._('Check every Invoice has a Tax Entry').'<br />'; -echo '<br /><br />'._('Check every Invoice has a GL Entry').'<br />'; $SQL = "SELECT id, transno, order_, @@ -24,28 +22,42 @@ WHERE type = 10"; $Result = DB_query($SQL,$db); +echo '<tr><td>'._('Check every Invoice has a Sales Order').'</td></tr>'; while ($myrow = DB_fetch_array($Result)) { $SQL2 = "SELECT orderno, orddate FROM salesorders WHERE orderno = '" . $myrow['order_'] . "'"; $Result2 = DB_query($SQL2,$db); - + echo '<tr>'; if ( DB_num_rows($Result2) == 0) { - echo '<br />'._('Invoice '). ' '. $myrow['transno'] . ' : '; - echo '<font color=red>' . _('No Sales Order') . '</font>'; + echo '<td>'._('Invoice '). ' '. $myrow['transno'] . ' : </td>'; + echo '<td><font class="bad">' . _('No Sales Order') . '</font></td>'; + } else { + echo '<td></td><td><font class="good">' . _('Sales Order Exists') . '</font></td>'; } + echo '</tr>'; +} +DB_data_seek($Result, 0); +echo '<tr><td>' ._('Check every Invoice has a Tax Entry').'</td></tr>'; +while ($myrow = DB_fetch_array($Result)) { $SQL3 = "SELECT debtortransid FROM debtortranstaxes WHERE debtortransid = '" . $myrow['id'] . "'"; $Result3 = DB_query($SQL3,$db); if ( DB_num_rows($Result3) == 0) { - echo '<br />'. _('Invoice '). ' ' . $myrow['transno'] . ' : '; - echo '<font color=red>' . _('has no Tax Entry') . '</font>'; + echo '<td>'. _('Invoice '). ' ' . $myrow['transno'] . ' : </td>'; + echo '<td><font color=red>' . _('has no Tax Entry') . '</font></td>'; + } else { + echo '<td></td><td><font class="good">' . _('Tax Entry Exists') . '</font></td>'; } - + echo '</tr>'; +} +DB_data_seek($Result, 0); +echo '<br /><br />'._('Check every Invoice has a GL Entry').'<br />'; +while ($myrow = DB_fetch_array($Result)) { $SQL4 = "SELECT typeno FROM gltrans WHERE type = 10 Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2012-04-29 21:55:11 UTC (rev 8752) +++ trunk/css/silverwolf/default.css 2012-04-30 07:28:52 UTC (rev 8753) @@ -44,7 +44,7 @@ font-size: 100%; font-weight: normal; text-decoration: none; - color: #272736; + color: #595968; } /*links on any screen except quick menu which is overridden when mouse is hovering over them */ Modified: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php 2012-04-29 21:55:11 UTC (rev 8752) +++ trunk/includes/IndexArray.php 2012-04-30 07:28:52 UTC (rev 8753) @@ -551,11 +551,13 @@ $MenuItems['Utilities']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), _('Show Local Currency Total Suppliers Balances'), - _('Show General Transactions That Do Not Balance')); + _('Show General Transactions That Do Not Balance'), + _('Sales Integrity Check')); $MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', '/Z_CurrencySuppliersBalances.php', - '/Z_CheckGLTransBalance.php'); + '/Z_CheckGLTransBalance.php', + '/Z_SalesIntegrityCheck.php'); $MenuItems['Utilities']['Maintenance']['Caption'] = array (_('Maintain Language Files'), _('Make New Company'), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-04-30 08:08:36
|
Revision: 8754 http://weberp.svn.sourceforge.net/weberp/?rev=8754&view=rev Author: tim_schofield Date: 2012-04-30 08:08:30 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/SMTPServer.php trunk/SelectRecurringSalesOrder.php trunk/Shippers.php trunk/Shipt_Select.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCheck.php trunk/SupplierInvoice.php Modified: trunk/SMTPServer.php =================================================================== --- trunk/SMTPServer.php 2012-04-30 07:28:52 UTC (rev 8753) +++ trunk/SMTPServer.php 2012-04-30 08:08:30 UTC (rev 8754) @@ -57,7 +57,7 @@ <td><input type="password" name="password" value="'.$myrow['password'].'" /></td></tr>'; echo '<tr><td>'._('Timeout (seconds)').'</td> <td><input type="text" size="5" name=timeout class="number" value="'.$myrow['timeout'].'" /></td></tr>'; -echo '<tr><td colspan="2"><div class="centre"><input type="submit" name="submit" value="' . _('Update') . '" /></div></td></tr>'; +echo '<tr><td colspan="2"><div class="centre"><button type="submit" name="submit">' . _('Update') . '</button></div></td></tr>'; echo '</table></form>'; include('includes/footer.inc'); Modified: trunk/SelectRecurringSalesOrder.php =================================================================== --- trunk/SelectRecurringSalesOrder.php 2012-04-30 07:28:52 UTC (rev 8753) +++ trunk/SelectRecurringSalesOrder.php 2012-04-30 08:08:30 UTC (rev 8754) @@ -32,7 +32,7 @@ echo '</select></td></tr></table>'; -echo '<br /><div class="centre"><input type="submit" name="SearchRecurringOrders" value="' . _('Search Recurring Orders') . '" /></div>'; +echo '<br /><div class="centre"><button type="submit" name="SearchRecurringOrders">' . _('Search Recurring Orders') . '</button></div>'; if (isset($_POST['SearchRecurringOrders'])){ Modified: trunk/Shippers.php =================================================================== --- trunk/Shippers.php 2012-04-30 07:28:52 UTC (rev 8753) +++ trunk/Shippers.php 2012-04-30 08:08:30 UTC (rev 8754) @@ -190,7 +190,7 @@ </table> - <br /><div class="centre"><input type="submit" name="submit" value="'. _('Enter Information').'" /></div> + <br /><div class="centre"><button type="submit" name="submit" value="'. _('Enter Information').'" /></button></div> </form>'; Modified: trunk/Shipt_Select.php =================================================================== --- trunk/Shipt_Select.php 2012-04-30 07:28:52 UTC (rev 8753) +++ trunk/Shipt_Select.php 2012-04-30 08:08:30 UTC (rev 8754) @@ -199,13 +199,14 @@ } /* Code Description On Hand Orders Ostdg Units Code Description On Hand Orders Ostdg Units */ - printf('<td><input type="submit" name="SelectedStockItem" value="%s" /></td> + printf('<td><button type="submit" name="SelectedStockItem" value="%s" />%s</button></td> <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> <td>%s</td> </tr>', $myrow['stockid'], + $myrow['stockid'], $myrow['description'], $myrow['qoh'], $myrow['qord'], Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2012-04-30 07:28:52 UTC (rev 8753) +++ trunk/SpecialOrder.php 2012-04-30 08:08:30 UTC (rev 8754) @@ -112,15 +112,13 @@ $_SESSION['SPL'.$identifier]->BranchCode = $_POST['SelectBranch']; $_SESSION['SPL'.$identifier]->BranchName = $myrow['brname']; } -echo '<div class="centre">'; + if (!isset($_SESSION['SPL'.$identifier]->BranchCode)){ - echo '<br /> - <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL'.$identifier]->CustomerName . ' (' . $_SESSION['SPL'.$identifier]->CustCurrCode . ')'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Purchase from') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL'.$identifier]->CustomerName . ' (' . $_SESSION['SPL'.$identifier]->CustCurrCode . ')</p>'; } else { - echo '<br /> - <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL'.$identifier]->CustomerName . ' (' . $_SESSION['SPL'.$identifier]->CustCurrCode . ') - ' . _('delivered to') . ' ' . $_SESSION['SPL'.$identifier]->BranchName . ' ' . _('branch'); + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Purchase from') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL'.$identifier]->CustomerName . ' (' . $_SESSION['SPL'.$identifier]->CustCurrCode . ') - ' . _('delivered to') . ' ' . $_SESSION['SPL'.$identifier]->BranchName . ' ' . _('branch') . '</p>'; } -echo '</font></div>'; + /*if the branch details and delivery details have not been entered then select them from the list */ if (!isset($_SESSION['SPL'.$identifier]->BranchCode)){ @@ -132,14 +130,11 @@ if (DB_num_rows($BranchResult)>0) { - echo '<div class="centre">'; - echo '<br /> - <br />' . _('Select the customer branch to deliver the special to from the list below'); - echo '</div> - <br /> <table class="selection">'; + echo '<tr><th class="header" colspan="2">' . _('Select the customer branch to deliver the special to from the list below') . '</th></tr>'; + $TableHeader = '<tr> <th>' ._('Code') . '</th> <th>' . _('Branch Name') . '</th> @@ -159,10 +154,11 @@ $k++; } - printf('<td><input type="submit" name="SelectBranch" value="%s" /></td> + printf('<td><button type="submit" name="SelectBranch" value="%s" />%s</button></td> <td>%s</td> </tr>', $myrow['branchcode'], + $myrow['branchcode'], $myrow['brname']); //end of page full new headings if @@ -741,13 +737,11 @@ echo '</table>'; /* end of main table */ echo '<div class="centre"> - <input type="submit" name="EnterLine" value="' . _('Add Item to Order') . '" /> + <button type="submit" name="EnterLine">' . _('Add Item to Order') . '</button> <br /> + <button type="submit" name="Cancel">' . _('Start Again') . '</button> <br /> - <input type="submit" name="Cancel" value="' . _('Start Again') . '" /> - <br /> - <br /> - <input type="submit" name="Commit" value="' . _('Process This Order') . '" /> + <button type="submit" name="Commit" value="" />' . _('Process This Order') . '</button> </div> </form>'; Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2012-04-30 07:28:52 UTC (rev 8753) +++ trunk/StockAdjustments.php 2012-04-30 08:08:30 UTC (rev 8754) @@ -322,7 +322,7 @@ $_SESSION['Adjustment']->StandardCost=$myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost']; } echo '<br /><table class="selection">'; -echo '<tr><th colspan="4"><font color="blue" size="3">'._('Adjustment Details').'</font></th></tr>'; +echo '<tr><th colspan="4" class="header">'._('Adjustment Details').'</th></tr>'; if (!isset($_GET['Description'])) { $_GET['Description']=''; } @@ -341,9 +341,9 @@ } else { echo '<input type="text" name="StockCode" size="21" value="" maxlength="20" />'; } -echo '</td><td><input type="submit" name="CheckCode" value="'._('Check Part').'" /></td></tr>'; +echo '</td><td><button type="submit" name="CheckCode">'._('Check Part').'</button></td></tr>'; if (isset($_SESSION['Adjustment']) and mb_strlen($_SESSION['Adjustment']->ItemDescription)>1){ - echo '<tr><td colspan="3"><font color="blue" size="3">' . $_SESSION['Adjustment']->ItemDescription . ' ('._('In Units of').' ' . + echo '<tr><td colspan="3"><font size="3">' . $_SESSION['Adjustment']->ItemDescription . ' ('._('In Units of').' ' . $_SESSION['Adjustment']->PartUnit . ' ) - ' . _('Unit Cost').' = ' . locale_money_format($_SESSION['Adjustment']->StandardCost,$_SESSION['CompanyRecord']['currencydefault']) . '</font></td></tr>'; } @@ -410,7 +410,7 @@ echo '</select></td>'; // End select tag -echo '</table><div class="centre"><br /><input type="submit" name="EnterAdjustment" value="'. _('Enter Stock Adjustment'). '" /><br />'; +echo '</table><div class="centre"><br /><button type="submit" name="EnterAdjustment">'. _('Enter Stock Adjustment'). '</button><br />'; if (!isset($_POST['StockLocation'])) { $_POST['StockLocation']=''; Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2012-04-30 07:28:52 UTC (rev 8753) +++ trunk/StockCategories.php 2012-04-30 08:08:30 UTC (rev 8754) @@ -609,7 +609,7 @@ echo '<br /> <div class="centre"> - <input type="submit" name="submit" value="' . _('Enter Information') . '" /> + <button type="submit" name="submit">' . _('Enter Information') . '</button> </div> </form>'; Modified: trunk/StockCheck.php =================================================================== --- trunk/StockCheck.php 2012-04-30 07:28:52 UTC (rev 8753) +++ trunk/StockCheck.php 2012-04-30 08:08:30 UTC (rev 8754) @@ -334,7 +334,7 @@ echo '<input type="checkbox" name="NonZerosOnly" value="TRUE" />'; } - echo '</td></tr></table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print and Process') . '" /></div></form>'; + echo '</td></tr></table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print and Process') . '</button></div></form>'; } include('includes/footer.inc'); Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2012-04-30 07:28:52 UTC (rev 8753) +++ trunk/SupplierInvoice.php 2012-04-30 08:08:30 UTC (rev 8754) @@ -232,11 +232,10 @@ <th>' . _('Tax Authority') . '</th> </tr>'; - echo '<tr><td><font color="blue"><b>' . $_SESSION['SuppTrans']->SupplierID . ' - ' . - $_SESSION['SuppTrans']->SupplierName . '</b></font></td> - <th><font color="blue"><b>' . $_SESSION['SuppTrans']->CurrCode . '</b></font></th> - <td><font color="blue"><b>' . $_SESSION['SuppTrans']->TermsDescription . '</b></font></td> - <td><font color="blue"><b>' . $_SESSION['SuppTrans']->TaxGroupDescription . '</b></font></td> + echo '<tr><th class="header"><font size="1"><b>' . $_SESSION['SuppTrans']->SupplierID . ' - ' . $_SESSION['SuppTrans']->SupplierName . '</b></font></td> + <th class="header"><font size="1"><b>' . $_SESSION['SuppTrans']->CurrCode . '</b></font></th> + <th class="header"><font size="1"><b>' . $_SESSION['SuppTrans']->TermsDescription . '</b></font></th> + <th class="header"><font size="1"><b>' . $_SESSION['SuppTrans']->TaxGroupDescription . '</b></font></th> </tr> </table>'; @@ -299,8 +298,8 @@ } - echo '<tr><td colspan="5" class="number"><font color="blue">' . _('Total Value of Goods Charged') . ':</font></td> - <td class="number"><font color="blue"><u>' . locale_money_format($TotalGRNValue,$_SESSION['SuppTrans']->CurrCode) . '</u></font></td></tr>'; + echo '<tr><td colspan="5" class="number">' . _('Total Value of Goods Charged') . ':</td> + <td class="number"><u>' . locale_money_format($TotalGRNValue,$_SESSION['SuppTrans']->CurrCode) . '</u></td></tr>'; echo '</table>'; } @@ -332,8 +331,8 @@ } } - echo '<tr><td colspan="2" class="number"><font size="4" color="blue">' . _('Total') . ':</font></td> - <td class="number"><font size="4" color="blue"><u>' . locale_money_format($TotalShiptValue,$_SESSION['SuppTrans']->CurrCode) . '</u></font></td></tr></table>'; + echo '<tr><td colspan="2" class="number">' . _('Total') . ':</td> + <td class="number"><u>' . locale_money_format($TotalShiptValue,$_SESSION['SuppTrans']->CurrCode) . '</u></td></tr></table>'; } $TotalAssetValue = 0; @@ -369,8 +368,8 @@ } echo '<tr> - <td colspan="2" class="number"><font size="4" color="blue">' . _('Total') . ':</font></td> - <td class="number"><font size="4" color="blue"><u>' . locale_money_format($TotalAssetValue,$_SESSION['SuppTrans']->CurrCode) . '</u></font></td> + <td colspan="2" class="number">' . _('Total') . ':</td> + <td class="number"><u>' . locale_money_format($TotalAssetValue,$_SESSION['SuppTrans']->CurrCode) . '</u></td> </tr></table>'; } //end loop around assets added to invocie This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-04-30 16:41:45
|
Revision: 8757 http://weberp.svn.sourceforge.net/weberp/?rev=8757&view=rev Author: tim_schofield Date: 2012-04-30 16:41:37 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/ReverseGRN.php trunk/SalesAnalReptCols.php trunk/SalesAnalRepts.php trunk/SalesByTypePeriodInquiry.php trunk/SalesCategories.php trunk/SalesCategoryPeriodInquiry.php trunk/SalesGLPostings.php trunk/SalesGraph.php trunk/SalesInquiry.php trunk/SalesPeople.php trunk/SalesTopItemsInquiry.php trunk/SalesTypes.php trunk/SecurityTokens.php trunk/SelectAsset.php trunk/SelectCompletedOrder.php trunk/SelectContract.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/css/silverwolf/default.css trunk/reportwriter/admin/ReportCreator.php trunk/reportwriter/admin/forms/ReportsHome.html trunk/reportwriter/forms/FormsFilter.html trunk/reportwriter/forms/FormsList.html trunk/reportwriter/forms/ReportsFilter.html trunk/reportwriter/forms/TplFrmLine.html Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/ReverseGRN.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -353,7 +353,7 @@ <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="RecdAfterDate" value="' . $_POST['RecdAfterDate'] .'" maxlength="10" size="10" /></td> </tr>';; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="ShowGRNS" value="' . _('Show Outstanding Goods Received') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="ShowGRNS">' . _('Show Outstanding Goods Received') . '</button></div>'; if (isset($_POST['ShowGRNS'])){ $sql = "SELECT grnno, Modified: trunk/SalesAnalReptCols.php =================================================================== --- trunk/SalesAnalReptCols.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesAnalReptCols.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -507,7 +507,7 @@ echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div></form>'; } //end if record deleted no point displaying form to add record Modified: trunk/SalesAnalRepts.php =================================================================== --- trunk/SalesAnalRepts.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesAnalRepts.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -390,7 +390,7 @@ } else { echo '<table width="98%" class="selection"> <tr> - <th colspan="8"><font size="3" color="blue">' . _('Define A New Report') . '</font></th> + <th colspan="8" class="header">' . _('Define A New Report') . '</th> </tr>'; } @@ -500,7 +500,7 @@ echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div></form>'; } //end if record deleted no point displaying form to add record Modified: trunk/SalesByTypePeriodInquiry.php =================================================================== --- trunk/SalesByTypePeriodInquiry.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesByTypePeriodInquiry.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -24,7 +24,7 @@ echo '<table cellpadding="2" class="selection"> <tr><td valign="top"> - <table>'; + <table style="background: transparent; border:1px solid #A49999; border-radius:5px">'; echo '<tr><th colspan="2" class="centre">' . _('Date Selection') . '</th> </tr> @@ -79,7 +79,7 @@ } echo '</table> </td><td valign="top"> - <table>'; + <table style="background: transparent; border:1px solid #A49999; border-radius:5px">'; echo '<tr><th colspan="2" class="centre">' . _('Display Data') . '</th> </tr> @@ -126,7 +126,7 @@ echo '<br /> <div class="centre"> - <input tabindex="4" type="submit" name="ShowSales" value="' . _('Show Sales') . '" /> + <button tabindex="4" type="submit" name="ShowSales">' . _('Show Sales') . '</button> </div> </form> <br />'; @@ -545,11 +545,11 @@ } echo '<td colspan="2" class="number">' . _('Total') . ' ' . $LastPeriodHeading . '</td> <td class="number">' . $PrdTotalOrders . '</td> - <td class="number">' . locale_number_format($PrdTotalSales,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($PrdTotalRefunds,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($PrdTotalNetSales,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($PrdTotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($PrdTotalGP,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_money_format($PrdTotalSales,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($PrdTotalRefunds,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($PrdTotalNetSales,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($PrdTotalCost,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($PrdTotalGP,$_SESSION['CompanyRecord']['currencydefault']) . '</td> </tr>'; if ($k==1){ echo '<tr class="EvenTableRows"><td colspan="8"><hr /></td></tr>'; @@ -560,11 +560,11 @@ } echo '<td colspan="2" class="number">' . _('GRAND Total') . '</td> <td class="number">' . $CumulativeTotalOrders . '</td> - <td class="number">' . locale_number_format($CumulativeTotalSales,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalRefunds,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalNetSales,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalGP,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalSales,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalRefunds,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalNetSales,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalCost,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalGP,$_SESSION['CompanyRecord']['currencydefault']) . '</td> </tr>'; echo '</table>'; Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesCategories.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -324,7 +324,7 @@ } echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Submit Information') . '" /></div>'; +echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Submit Information') . '</button></div>'; echo '</form></p>'; @@ -387,7 +387,7 @@ } echo '</select>'; echo '</td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Add Inventory Item') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Add Inventory Item') . '</div>'; echo ''; echo '</form></p>'; } else { Modified: trunk/SalesCategoryPeriodInquiry.php =================================================================== --- trunk/SalesCategoryPeriodInquiry.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesCategoryPeriodInquiry.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -79,7 +79,7 @@ echo '</table>'; -echo '<br /><div class="centre"><input tabindex="4" type="submit" name="ShowSales" value="' . _('Show Sales') . '" />'; +echo '<br /><div class="centre"><button tabindex="4" type="submit" name="ShowSales">' . _('Show Sales') . '</button>'; echo '</div></form>'; echo '<br />'; @@ -191,11 +191,11 @@ } echo '<td>' . $SalesRow['categoryid'] . ' - ' . $SalesRow['categorydescription'] . '</td> - <td class="number">' . locale_number_format($SalesRow['salesvalue'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($SalesRow['returnvalue'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($SalesRow['salesvalue']+$SalesRow['returnvalue'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($SalesRow['cost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format(($SalesRow['salesvalue']+$SalesRow['returnvalue']-$SalesRow['cost']),$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_money_format($SalesRow['salesvalue'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($SalesRow['returnvalue'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($SalesRow['salesvalue']+$SalesRow['returnvalue'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($SalesRow['cost'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format(($SalesRow['salesvalue']+$SalesRow['returnvalue']-$SalesRow['cost']),$_SESSION['CompanyRecord']['currencydefault']) . '</td> </tr>'; $CumulativeTotalSales += $SalesRow['salesvalue']; @@ -206,18 +206,18 @@ } //loop around category sales for the period if ($k==1){ - echo '<tr class="EvenTableRows"><td colspan="8"><hr /></td></tr>'; + echo '<tr class="EvenTableRows"><td colspan="8" style="background: transparent;"><hr /></td></tr>'; echo '<tr class="OddTableRows">'; } else { - echo '<tr class="OddTableRows"><td colspan="8"><hr /></td></tr>'; + echo '<tr class="OddTableRows"><td colspan="8" style="background: transparent;"><hr /></td></tr>'; echo '<tr class="EvenTableRows">'; } echo '<td class="number">' . _('GRAND Total') . '</td> - <td class="number">' . locale_number_format($CumulativeTotalSales,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalRefunds,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalNetSales,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalCost,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalGP,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalSales,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalRefunds,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalNetSales,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalCost,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalGP,$_SESSION['CompanyRecord']['currencydefault']) . '</td> </tr>'; echo '</table>'; Modified: trunk/SalesGLPostings.php =================================================================== --- trunk/SalesGLPostings.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesGLPostings.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -405,7 +405,7 @@ </tr> </table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div>'; echo '</form>'; Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesGraph.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -178,7 +178,7 @@ echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="ShowGraph" value="' . _('Show Sales Graph') .'" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="ShowGraph">' . _('Show Sales Graph') .'</button></div>'; include('includes/footer.inc'); } else { Modified: trunk/SalesInquiry.php =================================================================== --- trunk/SalesInquiry.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesInquiry.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -1150,8 +1150,8 @@ echo '</tr> </table> <br />'; - echo '<div class="centre"><input type="submit" name="submit" value="' . _('Run Inquiry') . '" /></div><br /> - <div class="centre"><input type="submit" name="submitcsv" value="' . _('Export as csv file') . '" /></div></form>'; + echo '<div class="centre"><button type="submit" name="submit">' . _('Run Inquiry') . '</button></div><br /> + <div class="centre"><button type="submit" name="submitcsv">' . _('Export as csv file') . '</button></div></form>'; } // End of function display() Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesPeople.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -330,7 +330,7 @@ echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div>'; echo '</form>'; Modified: trunk/SalesTopItemsInquiry.php =================================================================== --- trunk/SalesTopItemsInquiry.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesTopItemsInquiry.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -20,7 +20,7 @@ echo '<table cellpadding="2" class="selection"> <tr><td valign="top"> - <table>'; + <table style="background: transparent;border: 1px solid #a1afbf;border-radius: 7px;">'; echo '<tr> <th colspan="2" class="centre">' . _('Date Selection') . '</th> @@ -81,7 +81,7 @@ } echo '</table></td> <td valign="top"> - <table>'; //new sub table to set parameters for order of display + <table style="background: transparent;border: 1px solid #a1afbf;border-radius: 7px;">'; if (!isset($_POST['OrderBy'])){ //default to order by net sales @@ -121,7 +121,7 @@ </table>'; -echo '<br /><div class="centre"><input tabindex="4" type="submit" name="ShowSales" value="' . _('Show Sales') . '" />'; +echo '<br /><div class="centre"><button tabindex="4" type="submit" name="ShowSales">' . _('Show Sales') . '</button>'; echo '</div></form>'; echo '<br />'; @@ -252,10 +252,10 @@ echo '<td>' . $i . '</td> <td>' . $SalesRow['stockid'] . ' - ' . $SalesRow['description'] . '</td> <td>' . $SalesRow['categorydescription'] . '</td> - <td class="number">' . locale_number_format($SalesRow['salesvalue'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($SalesRow['returnvalue'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($SalesRow['netsalesvalue'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($SalesRow['salesquantity'],'Variable') . '</td> + <td class="number">' . locale_money_format($SalesRow['salesvalue'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($SalesRow['returnvalue'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($SalesRow['netsalesvalue'],$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_number_format($SalesRow['salesquantity'],2) . '</td> </tr>'; $i++; @@ -274,10 +274,10 @@ echo '<tr class="EvenTableRows">'; } echo '<td class="number" colspan="3">' . _('GRAND Total') . '</td> - <td class="number">' . locale_number_format($CumulativeTotalSales,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalRefunds,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalNetSales,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format($CumulativeTotalQuantity,'Variable') . '</td> + <td class="number">' . locale_money_format($CumulativeTotalSales,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalRefunds,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_money_format($CumulativeTotalNetSales,$_SESSION['CompanyRecord']['currencydefault']) . '</td> + <td class="number">' . locale_number_format($CumulativeTotalQuantity,2) . '</td> </tr>'; echo '</table>'; Modified: trunk/SalesTypes.php =================================================================== --- trunk/SalesTypes.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SalesTypes.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -236,7 +236,7 @@ echo '<input type="hidden" name="SelectedType" value="' . $SelectedType . '" />'; echo '<input type="hidden" name="TypeAbbrev" value="' . $_POST['TypeAbbrev'] . '" />'; echo '<table class="selection">'; - echo '<tr><th colspan="4"><font size="2" color="blue"><b>' . _('Sales Type/Price List Setup') . '</b></font></th></tr>'; + echo '<tr><th colspan="4" class="header">' . _('Sales Type/Price List Setup') . '</th></tr>'; echo '<tr><td>' . _('Type Code') . ':</td><td>'; // We dont allow the user to change an existing type code @@ -248,7 +248,7 @@ // This is a new type so the user may volunteer a type code echo '<table class="selection">'; - echo '<tr><th colspan="4"><font size="2" color="blue"><b>' . _('Sales Type/Price List Setup') . '</b></font></th></tr>'; + echo '<tr><th colspan="4" class="header"><b>' . _('Sales Type/Price List Setup') . '</b></th></tr>'; echo '<tr><td>' . _('Type Code') . ':</td> <td><input type="text" ' . (in_array('SalesType',$Errors) ? 'class="inputerror"' : '' ) .' size="3" maxlength="2" name="TypeAbbrev" /></td></tr>'; @@ -261,8 +261,8 @@ echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button></div>'; echo '</form>'; Modified: trunk/SecurityTokens.php =================================================================== --- trunk/SecurityTokens.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SecurityTokens.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -53,11 +53,11 @@ echo '<td>'. _('Description') . '</td> <td><input type="text" size="30" maxlength="30" name="Description" value="'.$description.'" /></td><td> <input type="hidden" name="TokenID" value="'.$_GET['SelectedToken'].'" />'; - echo '<input type="submit" name="update" value="' . _('Update') . '" />'; + echo '<button type="submit" name="update">' . _('Update') . '</button>'; } else { echo '<td>'._('Token ID') . '<td><input type="text" name="TokenID" value="'.$_POST['TokenID'].'" /></td></tr> <tr><td>'. _('Description') . '</td><td><input type="text" size="70" maxlength="255" name="Description" value="'.$description.'" /></td><td>'; - echo '<input type="submit" name="submit" value="' . _('Insert') . '" />'; + echo '<button type="submit" name="submit">' . _('Insert') . '</button>'; } echo '</td></tr></table><p></p>'; Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SelectAsset.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -99,7 +99,7 @@ echo '<input type="text" name="AssetCode" size="15" maxlength="13" />'; } echo '</td></tr></table><br />'; -echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br /></form>'; +echo '<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button></div><br /></form>'; echo '<script type="text/javascript">defaultControl(document.forms[0].Keywords);</script>'; echo '</form>'; // query for list of record(s) @@ -230,19 +230,19 @@ $ListPage++; } echo '</select> - <input type="submit" name="Go" value="' . _('Go') . '" /> - <input type="submit" name="Previous" value="' . _('Previous') . '" /> - <input type="submit" name="Next" value="' . _('Next') . '" />'; + <button type="submit" name="Go">' . _('Go') . '</button> + <button type="submit" name="Previous">' . _('Previous') . '</button> + <button type="submit" name="Next">' . _('Next') . '</button>'; echo '<br /></div>'; } echo '<table cellpadding="2" class="selection">'; $tableheader = '<tr> - <th>' . _('Asset Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Asset Location') . '</th> - <th>' . _('Date Purchased') . '</th> - </tr>'; + <th>' . _('Asset Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Asset Location') . '</th> + <th>' . _('Date Purchased') . '</th> + </tr>'; echo $tableheader; $j = 1; $k = 0; //row counter to determine background colour @@ -258,7 +258,7 @@ echo '<tr class="OddTableRows">'; $k++; } - echo '<td><input type="submit" name="Select" value="' . $myrow['assetid'] .'" /></td> + echo '<td><button type="submit" name="Select">' . $myrow['assetid'] .'</button></td> <td>' . $myrow['description'] . '</td> <td>' . $myrow['locationdescription'] . '</td> <td>' . ConvertSQLDate($myrow['datepurchased']) . '</td> Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SelectCompletedOrder.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -438,7 +438,7 @@ if (!isset($OrderNumber) or $OrderNumber==''){ echo '<td>' . _('Order Number') . ':</td><td>' . '<input type="text" name="OrderNumber" maxlength="8" size="9" /></td><td>' . _('for all orders placed after') . ': </td><td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="OrdersAfterDate" maxlength="10" size="11" value="' . $_POST['OrdersAfterDate'] . '" /></td><td>' . - '<input type="submit" name="SearchOrders" value="' . _('Search Orders') . '" /></td></tr>'; + '<button type="submit" name="SearchOrders">' . _('Search Orders') . '</button></td></tr>'; echo '<tr><td></td><td>' . _('Customer Ref') . ':</td><td>' . '<input type="text" name="2CustomerRef" maxlength="8" size="9" /></td> <td></td><td colspan="2"><input type="checkbox" '.$ShowChecked.' name="completed" />'._('Show Completed orders only') . '</td></tr>'; } @@ -469,10 +469,10 @@ echo '<td><font size="3"><b> ' ._('OR') . ' </b></font><font size="1">' . _('Enter extract of the Stock Code') . ':</font></td>'; echo '<td><input type="text" name="StockCode" size="15" maxlength="18" /></td>'; echo '</tr>'; - echo '<tr><td colspan="4"><div class="centre"><input type="submit" name="SearchParts" value="' . _('Search Parts Now') . '" />'; + echo '<tr><td colspan="4"><div class="centre"><button type="submit" name="SearchParts">' . _('Search Parts Now') . '</button>'; if (count($_SESSION['AllowedPageSecurityTokens'])>1){ - echo '<input type="submit" name="ResetPart" value="' . _('Show All') . '" /></div>'; + echo '<button type="submit" name="ResetPart">' . _('Show All') . '</button></div>'; } echo '</td></tr></table>'; @@ -504,13 +504,14 @@ $k++; } - printf('<td><font size="1"><input type="submit" name="SelectedStockItem" value="%s" /></font></td> + printf('<td><font size="1"><button type="submit" name="SelectedStockItem" value="%s" />%s</button></font></td> <td><font size="1">%s</font></td> <td class="number"><font size="1">%s</font></td> <td class="number"><font size="1">%s</font></td> <td class="number"><font size="1">%s</font></td> <td><font size="1">%s</font></td></tr>', $myrow['stockid'], + $myrow['stockid'], $myrow['description'], $myrow['qoh'], $myrow['qoo'], Modified: trunk/SelectContract.php =================================================================== --- trunk/SelectContract.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SelectContract.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -12,7 +12,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<br /><div class="centre">'; +echo '<br /><table class="selection">'; if (isset($_GET['ContractRef'])){ $_POST['ContractRef']=$_GET['ContractRef']; @@ -21,7 +21,7 @@ $_POST['SelectedCustomer']=$_GET['SelectedCustomer']; } - +echo '<tr><td>'; if (isset($_POST['ContractRef']) AND $_POST['ContractRef']!='') { $_POST['ContractRef'] = trim($_POST['ContractRef']); echo _('Contract Reference') . ' - ' . $_POST['ContractRef']; @@ -31,11 +31,11 @@ echo '<input type="hidden" name="SelectedCustomer" value="' . $_POST['SelectedCustomer'] . '" />'; } } - +echo'</td>'; if (!isset($_POST['ContractRef']) or $_POST['ContractRef']==''){ - echo _('Contract Reference') . ': <input type="text" name="ContractRef" maxlength="20" size="20" /> '; - echo '<select name="Status">'; + echo '<td>' . _('Contract Reference') . ': <input type="text" name="ContractRef" maxlength="20" size="20" /></td> '; + echo '<td><select name="Status">'; if (isset($_GET['Status'])){ $_POST['Status']=$_GET['Status']; @@ -43,15 +43,15 @@ if (!isset($_POST['Status'])){ $_POST['Status']=4; } - + $statuses[] = _('Not Yet Quoted'); $statuses[] = _('Quoted - No Order Placed'); - $statuses[] = _('Order Placed'); + $statuses[] = _('Order Placed'); $statuses[] = _('Completed'); $statuses[] = _('All Contracts'); - + $status_count = count($statuses); - + for ( $i = 0; $i < $status_count; $i++ ) { if ( $i == $_POST['Status'] ) { echo '<option selected="selected" value="' . $i . '">' . $statuses[$i] . '</option>'; @@ -60,10 +60,10 @@ } } - echo '</select> '; + echo '</select></td> '; } -echo '<input type="submit" name="SearchContracts" value="' . _('Search') . '" />'; -echo ' <a href="' . $rootpath . '/Contracts.php">' . _('New Contract') . '</a></div></p>'; +echo '<td><button type="submit" name="SearchContracts">' . _('Search') . '</button></td>'; +echo '<td> <a href="' . $rootpath . '/Contracts.php">' . _('New Contract') . '</a></td></tr></table></p>'; //figure out the SQL required from the inputs available Modified: trunk/SelectGLAccount.php =================================================================== --- trunk/SelectGLAccount.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SelectGLAccount.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -93,41 +93,33 @@ </tr> </table><br />'; - echo '<div class="centre"><input type="submit" name="Search" value=' . _('Search Now') . '" /> - <input type="submit" action=reset value="' . _('Reset') .'" /></div>'; + echo '<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button> + <button type="submit">' . _('Reset') .'</button></div>'; if (isset($result) and DB_num_rows($result)>0) { echo '<br /><table cellpadding="2" class="selection">'; - $TableHeader = '<tr><th>' . _('Code') . '</th> - <th>' . _('Account Name') . '</th> - <th>' . _('Group') . '</th> - <th>' . _('Account Type') . '</th></tr>'; + echo '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Account Name') . '</th> + <th>' . _('Group') . '</th> + <th>' . _('Account Type') . '</th> + </tr>'; - echo $TableHeader; - - $j = 1; - while ($myrow=DB_fetch_array($result)) { - printf('<tr><td><font size="1"><input type="submit" name="Select" value="%s" /></font></td> + printf('<tr><td><font size="1"><button type="submit" name="Select" value="%s" />%s</button></font></td> <td><font size="1">%s</font></td> <td><font size="1">%s</font></td> <td><font size="1">%s</font></td> </tr>', $myrow['accountcode'], + $myrow['accountcode'], $myrow['accountname'], $myrow['group_'], $myrow['pl']); - $j++; - if ($j == 12){ - $j=1; - echo $TableHeader; - - } -//end of page full new headings if } //end of while loop Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/SelectOrderItems.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -660,8 +660,8 @@ echo '<td><input tabindex="3" type="text" name="CustPhone" size="15" maxlength="18" /></td>'; echo '</tr>'; echo '</table>'; - echo '<br /><div class="centre"><input tabindex="4" type="submit" name="SearchCust" value="' . _('Search Now') . '" />'; - echo '<input tabindex="5" type="reset" value="' . _('Reset') . '" /></div>'; + echo '<br /><div class="centre"><button tabindex="4" type="submit" name="SearchCust">' . _('Search Now') . '</button>'; + echo '<button tabindex="5" type="submit" value="" />' . _('Reset') . '</button></div>'; if (isset($result_CustSelect)) { @@ -695,7 +695,7 @@ } else { echo '<td></td>'; } - echo '<td><input tabindex="'.($j+5).'" type="submit" name="Submit" value="'.$myrow['brname'].'" /></td> + echo '<td><button tabindex="'.($j+5).'" type="submit" name="Submit" value="'.$myrow['brname'].'" />'.$myrow['brname'].'</button></td> <input type="hidden" name="Select" value="'.$myrow['debtorno'].' - '.$myrow['branchcode'].'" /> <td>'.$myrow['contactname'].'</td> <td>'.$myrow['phoneno'].'</td> @@ -1342,7 +1342,7 @@ echo '<br /> <table width="90%" cellpadding="2" class="selection"> - <tr bgcolor="#800000">'; + <tr>'; if($_SESSION['Items'.$identifier]->DefaultPOLine == 1){ echo '<th>' . _('PO Line') . '</th>'; } @@ -1533,11 +1533,11 @@ <td>' . $DisplayWeight . '</td> <td>' . _('Total Volume') . ':</td> <td>' . $DisplayVolume . '</td> - <tr/><table/>'; + </tr></table>'; - 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>'; + echo '<br /><div class="centre"><button type="submit" name="Recalculate">' . _('Re-Calculate') . '</button> + <button type="submit" name="DeliveryDetails">' . _('Enter Delivery Details and Confirm Order') . '</button></div>'; } # end of if lines /* Now show the stock item selection search stuff below */ @@ -1569,7 +1569,7 @@ 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 '<table class="table1">'; + echo '<table class="selection">'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th> @@ -1690,7 +1690,7 @@ } #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="'.($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; + <button tabindex="'.($j+8).'" type="submit">'._('Add to Sales Order').'</button></td>'; echo '</table>'; } //end of if Frequently Ordered Items > 0 @@ -1738,15 +1738,15 @@ echo '</td></tr>'; echo '<tr> - <td style="text-align:center" colspan="1"><input tabindex="4" type="submit" name="Search" value="' . _('Search Now') . '" /></td> - <td style="text-align:center" colspan="1"><input tabindex="5" type="submit" name="QuickEntry" value="' . _('Use Quick Entry') . '" /></td>'; + <td style="text-align:center" colspan="1"><button tabindex="4" type="submit" name="Search">' . _('Search Now') . '</button></td> + <td style="text-align:center" colspan="1"><button tabindex="5" type="submit" name="QuickEntry">' . _('Use Quick Entry') . '</button></td>'; if (!isset($_POST['PartSearch'])) { echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.Keywords);}</script>'; } 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> + echo '<td style="text-align:center" colspan="1"><button tabindex="6" type="submit" name="ChangeCustomer">' . _('Change Customer') . '</button></td> + <td style="text-align:center" colspan="1"><button tabindex="7" type="submit" name="SelectAsset">' . _('Fixed Asset Disposal') . '</button></td> </tr></table><br />'; } @@ -1757,16 +1757,16 @@ $j = 1; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '" method="post" name="orderform">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="table1">'; + echo '<table class="selection">'; echo '<tr><td> <input type="hidden" name="previous" value="'.($Offset-1).'" /> - <input tabindex="'.($j+8).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; + <button tabindex="'.($j+8).'" type="submit" name="Prev">'._('Prev').'</button></td>'; echo '<td style="text-align:center" colspan="7"> <input type="hidden" name="order_items" value="1" /> - <input tabindex="'.($j+9).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; + <button tabindex="'.($j+9).'" type="submit">'._('Add to Sales Order').'</button></td>'; echo '<td> <input type="hidden" name="nextlist" value="'.($Offset+1).'" /> - <input tabindex="'.($j+10).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; + <button tabindex="'.($j+10).'" type="submit" name="Next">'._('Next').'</button></td></tr>'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th> @@ -1929,11 +1929,11 @@ } #end of while loop echo '<tr><td><input type="hidden" name="previous" value="'.($Offset-1).'" /> - <input tabindex="'.($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; + <button tabindex="'.($j+7).'" type="submit" name="Prev">'._('Prev').'</button></td>'; echo '<td style="text-align:center" colspan="7"><input type="hidden" name="order_items" value="1" /> - <input tabindex="'.($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; + <button tabindex="'.($j+8).'" type="submit">'._('Add to Sales Order').'</button></td>'; echo '<td><input type="hidden" name="nextlist" value="'.($Offset+1).'" /> - <input tabindex="'.($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td><tr/>'; + <button tabindex="'.($j+9).'" type="submit" name="Next">'._('Next').'</button></td><tr/>'; echo '</table></form>'; echo $jsCall; @@ -1942,7 +1942,7 @@ 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 /> - <table border="1"> + <table class="selection"> <tr>'; /*do not display colum unless customer requires po line number by sales order line*/ if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){ @@ -1966,13 +1966,13 @@ } 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"><button type="submit" name="QuickEntry" value="" />' . _('Quick Entry') . '</button> + <button type="submit" name="PartSearch">' . _('Search Parts') . '</button></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 /> - <table border="1">'; + <table class="selection">'; /*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> @@ -1986,13 +1986,13 @@ echo '<option value="' . $AssetRow['assetid'] . '">' . $AssetRow['assetid'] . ' - ' . $AssetRow['description'] . '</option>'; } 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>'; + <br /><div class="centre"><button type="submit" name="AssetDisposalEntered" value="" />' . _('Add Asset To Order') . '</button> + <button type="submit" name="PartSearch">' . _('Search Parts') . '</button></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"><button type="submit" name="CancelOrder" onclick="return confirm(\'' . _('Are you sure you wish to cancel this entire order?') . '\');">' . _('Cancel Whole Order') . '</button></div>'; } }#end of else not selecting a customer Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/css/silverwolf/default.css 2012-04-30 16:41:37 UTC (rev 8757) @@ -273,9 +273,9 @@ -webkit-border-radius: 12px; -moz-border-radius: 12px; border-radius: 7px; - -webkit-box-shadow: inset 0 0px 0 0 white; - -moz-box-shadow: inset 0 0px 0 0 white; - box-shadow: inset 0 0px 0 0 white; + -moz-box-shadow: 0px 0px 2px 1px #CECECE; + -webkit-box-shadow: 0px 0px 2px 1px #CECECE; + box-shadow: 0px 0px 2px 1px #CECECE; color: #092442; font: normal 10px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; padding: 1px 1px 1px 1px; @@ -295,9 +295,9 @@ border-left: 1px solid #9caaba; border-bottom: 1px solid #96a3b3; border-right: 1px solid #9caaba; - -webkit-box-shadow: inset 0 1px 0 0 #f2f2f2; - -moz-box-shadow: inset 0 1px 0 0 #f2f2f2; - box-shadow: inset 0 0px 0 0 #f2f2f2; + -moz-box-shadow: 0px 0px 2px 1px #CECECE; + -webkit-box-shadow: 0px 0px 2px 1px #CECECE; + box-shadow: 0px 0px 2px 1px #CECECE; color: #163659; cursor: pointer; } Modified: trunk/reportwriter/admin/ReportCreator.php =================================================================== --- trunk/reportwriter/admin/ReportCreator.php 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/reportwriter/admin/ReportCreator.php 2012-04-30 16:41:37 UTC (rev 8757) @@ -2,12 +2,12 @@ /* $Revision: 1.6 $ */ /* -This script has the responsibility to gather basic information necessary to retrieve data for reports. -It is comprised of several steps designed to gather display preferences, database information, field +This script has the responsibility to gather basic information necessary to retrieve data for reports. +It is comprised of several steps designed to gather display preferences, database information, field information and filter/criteria information. The Report builder process is as follows: Step 1: (or script entry): displays the current listing of reports. Uses form ReportsHome.html as a UI. -Step 2: (action=step2): After the user has selected an option, this step is followed to enter a report +Step 2: (action=step2): After the user has selected an option, this step is followed to enter a report name and the type of report it is for grouping purposes. Step 3: Handles the page setup information. Step 4: Handles the database setup and link information. @@ -16,7 +16,6 @@ Export: Handled in action=step2, calls ExportReport to save report as a text file. Import: Handled in action=step8, calls an import function to read the setup information from a text file. */ - $DirectoryLevelsDeep = 2; $PathPrefix = '../../'; $PageSecurity = 2; // set security level for webERP @@ -24,7 +23,7 @@ require ($PathPrefix . 'includes/session.inc'); // Initialize some constants -$ReportLanguage = 'en_US'; // default language file +$ReportLanguage = 'en_US'; // default language file define('DBReports','reports'); // name of the databse holding the main report information (ReportID) define('DBRptFields','reportfields'); // name of the database holding the report fields define ('DefRptPath',$PathPrefix . 'companies/' . $_SESSION['DatabaseName'] . '/reportwriter/'); // path to default reports @@ -35,12 +34,16 @@ require_once('../languages/' . $ReportLanguage . '/reports.php'); require_once('defaults.php'); require('RCFunctions.inc'); +if (!isset($_GET['action'])) { + $_GET['action']=''; + $_POST['todo']= ''; +} $usrMsg = ''; // initialize array for return messages // a valid report id needs to be passed as a post field to do anything, except create new report if (!isset($_POST['ReportID'])) { // entered for the first time or created new report - $ReportID = ''; -} else { + $ReportID = ''; +} else { $ReportID = $_POST['ReportID']; if (isset($_POST['Type'])) { // then the type was passed from the previous form $Type=$_POST['Type']; @@ -58,7 +61,7 @@ if (!isset($_GET['action']) OR ($ReportID=='' AND $_POST['todo']<>RPT_BTN_ADDNEW AND $_POST['todo']<>RPT_BTN_IMPORT)) { // skip error message if back from import was pressed $DropDownString = RetrieveReports(); - if (isset($_GET['action'])) $usrMsg[] = array('message'=>FRM_NORPT, 'level'=>'error'); + if ($_GET['action']!='') $usrMsg[] = array('message'=>FRM_NORPT, 'level'=>'error'); $FormParams = PrepStep('1'); break; } @@ -79,7 +82,7 @@ $myrow = DB_fetch_array($Result); $_POST['ReportName'] = $myrow['reportname']; // continue like copy was pushed - case RPT_BTN_COPY: // Copy a report was selected + case RPT_BTN_COPY: // Copy a report was selected $FormParams = PrepStep('2'); break; case RPT_BTN_DEL: // after confirmation, delete the report and go to the main report admin menu @@ -101,7 +104,7 @@ break; } break; // End Step 2 - + case "step3": // entered from id setup page switch ($_POST['todo']) { case RPT_BTN_REPLACE: // Erase the default report and copy a new one with the same name @@ -173,8 +176,8 @@ $sql = "UPDATE ".DBReports." SET id=".$OrigID." WHERE id=0;"; $Result=DB_query($sql,$db,'','',false,true); // Set the report name and group name per the form - $sql = "UPDATE ".DBReports." SET - reportname = '" . DB_escape_string($_POST['ReportName']) . "' + $sql = "UPDATE ".DBReports." SET + reportname = '" . DB_escape_string($_POST['ReportName']) . "' WHERE id =".$ReportID.";"; $Result=DB_query($sql,$db,'','',false,true); // fetch the fields and duplicate @@ -182,7 +185,7 @@ $Result=DB_query($sql,$db,'','',false,true); while ($temp = DB_fetch_array($Result)) $field[] = $temp; foreach ($field as $row) { - $sql = "INSERT INTO ".DBRptFields." (reportid, entrytype, seqnum, fieldname, + $sql = "INSERT INTO ".DBRptFields." (reportid, entrytype, seqnum, fieldname, displaydesc, visible, columnbreak, params) VALUES (".$ReportID.", '".$row['entrytype']."', ".$row['seqnum'].", '".$row['fieldname']."', '".$row['displaydesc']."', '".$row['visible']."', @@ -196,7 +199,7 @@ $myrow = DB_fetch_array($Result); $FormParams = PrepStep('3'); break; - + case RPT_BTN_RENAME: // Rename a report was selected, fetch the report name and update // input error check reportname, blank duplicate, bad characters, etc. if ($_POST['ReportName']=='') { // no report name was entered, error and reload form @@ -225,7 +228,7 @@ $FormParams = PrepStep('1'); } break; - + case "step4": // entered from page setup page switch ($_POST['todo']) { case RPT_BTN_UPDATE: @@ -239,7 +242,7 @@ case RPT_BTN_CONT: // fetch the report information and go to the page setup screen $success = UpdatePageFields($ReportID); // read in the data for the next form - $sql = "SELECT table1, + $sql = "SELECT table1, table2, table2criteria, table3, table3criteria, table4, table4criteria, @@ -258,7 +261,7 @@ $FormParams = PrepStep('1'); } break; - + case "step5": // entered from dbsetup page switch ($_POST['todo']) { case RPT_BTN_BACK: @@ -282,16 +285,16 @@ } } $success = UpdateDBFields($ReportID); - if (!$success OR $_POST['todo']==RPT_BTN_UPDATE) { + if (!$success OR $_POST['todo']==RPT_BTN_UPDATE) { // update fields and stay on this form if (!$success) $usrMsg[] = array('message'=>RPT_DUPDB, 'level'=>'error'); // read back in new data for next screen (will set defaults as defined in the db) - $sql = "SELECT table1, - table2, table2criteria, - table3, table3criteria, - table4, table4criteria, - table5, table5criteria, - table6, table6criteria, + $sql = "SELECT table1, + table2, table2criteria, + table3, table3criteria, + table4, table4criteria, + table5, table5criteria, + table6, table6criteria, reportname FROM ".DBReports." WHERE id='".$ReportID."'"; $Result=DB_query($sql,$db,'','',false,true); @@ -309,7 +312,7 @@ $FormParams = PrepStep('1'); } break; - + case "step6": // entered from field setup page if (!isset($_POST['todo'])) { // then a sequence image button was pushed $SeqNum = $_POST['SeqNum']; //fetch the sequence number @@ -322,9 +325,9 @@ if ($SeqNum<DB_num_rows($Result)) $success = ChangeSequence($SeqNum, 'fieldlist', 'down'); $FieldListings = RetrieveFields('fieldlist'); } elseif (isset($_POST['ed_x'])) { // the sequence edit button was pushed - // pre fill form with the field to edit and change button name + // pre fill form with the field to edit and change button name $FieldListings = RetrieveFields('fieldlist'); - $sql = "SELECT * FROM ".DBRptFields." + $sql = "SELECT * FROM ".DBRptFields." WHERE reportid = ".$ReportID." AND entrytype = 'fieldlist' AND seqnum=".$SeqNum.";"; $Result=DB_query($sql,$db,'','',false,true); $FieldListings['defaults'] = DB_fetch_array($Result); @@ -338,12 +341,12 @@ } else { switch ($_POST['todo']) { case RPT_BTN_BACK: - $sql = "SELECT table1, - table2, table2criteria, - table3, table3criteria, - table4, table4criteria, - table5, table5criteria, - table6, table6criteria, + $sql = "SELECT table1, + table2, table2criteria, + table3, table3criteria, + table4, table4criteria, + table5, table5criteria, + table6, table6criteria, reportname FROM ".DBReports." WHERE id='".$ReportID."'"; $Result=DB_query($sql,$db,'','',false,true); @@ -372,7 +375,7 @@ $reportname = $_POST['ReportName']; $FormParams = PrepStep('5'); break; - } + } if ($_POST['todo']==RPT_BTN_ADDNEW) { // add new so insert $_POST['SeqNum'] = InsertSequence($_POST['SeqNum'], 'fieldlist'); } else { // exists, so update it. @@ -388,7 +391,7 @@ case RPT_BTN_PROP: // Enter the properties of a given field // see what form needs to be loaded and load based on index stored in params variable $SeqNum = $_POST['SeqNum']; - $sql = "SELECT id, displaydesc, params FROM ".DBRptFields." + $sql = "SELECT id, displaydesc, params FROM ".DBRptFields." WHERE reportid = ".$ReportID." AND entrytype='fieldlist' AND seqnum = ".$SeqNum.";"; $Result = DB_query($sql,$db,'','',false,true); $myrow = DB_fetch_assoc($Result); @@ -417,13 +420,13 @@ } } break; - + case "step6a": // entered from properties page for fields $ButtonValue = RPT_BTN_ADDNEW; // default the field button to Add New unless overidden by the edit image pressed $reportname = $_POST['ReportName']; $SeqNum = $_POST['SeqNum']; // first fetch the original Params - $sql = "SELECT id, params FROM ".DBRptFields." + $sql = "SELECT id, params FROM ".DBRptFields." WHERE reportid = ".$ReportID." AND entrytype='fieldlist' AND seqnum = ".$SeqNum.";"; $Result = DB_query($sql,$db,'','',false,true); $myrow = DB_fetch_assoc($Result); @@ -439,9 +442,9 @@ $ButtonValue = RPT_BTN_CHANGE; } } - // Update field properties + // Update field properties $FormParams = PrepStep('prop'); - $FormParams['id'] = $myrow['id']; + $FormParams['id'] = $myrow['id']; } else { // fetch the choices with the form post data foreach ($_POST as $key=>$value) $Params[$key]=$value; @@ -458,36 +461,36 @@ $Index = $_POST['FieldIndex']; if ($Index<>'') $Params['Seq'] = array_merge(array_slice($Params['Seq'],0,$Index),array_slice($Params['Seq'],$Index+1)); } else { // it's the add button, error check - if ($_POST['TotalField']=='') { + if ($_POST['TotalField']=='') { $usrMsg[] = array('message'=>RPT_BADFLD, 'level'=>'error'); // reload form with bad data entered as field defaults, ready to be editted $DisplayName =$_POST['DisplayName']; $FormParams = PrepStep('prop'); - $FormParams['id'] = $myrow['id']; + $FormParams['id'] = $myrow['id']; break; - } + } $Params['Seq'][] = $_POST['TotalField']; } - // Update field properties + // Update field properties $sql = "UPDATE ".DBRptFields." SET params='".serialize($Params)."' WHERE id = ".$_POST['ID'].";"; $Result=DB_query($sql,$db,'','',false,true); $Params['TotalField']=''; $FormParams = PrepStep('prop'); - $FormParams['id'] = $myrow['id']; + $FormParams['id'] = $myrow['id']; break; case RPT_BTN_CHANGE: case RPT_BTN_ADDNEW: // Error Check input, see if user entered a bad fieldname or description, error and reload - if ($_POST['TblField']=='' OR ($Params['index']=='Tbl' AND $_POST['TblDesc']=='')) { + if ($_POST['TblField']=='' OR ($Params['index']=='Tbl' AND $_POST['TblDesc']=='')) { $usrMsg[] = array('message'=>RPT_BADFLD, 'level'=>'error'); // reload form with bad data entered as field defaults, ready to be editted if ($_POST['todo']==RPT_BTN_ADDNEW) $ButtonValue = RPT_BTN_ADDNEW; else $ButtonValue = RPT_BTN_CHANGE; $DisplayName =$_POST['DisplayName']; $FormParams = PrepStep('prop'); - $FormParams['id'] = $myrow['id']; + $FormParams['id'] = $myrow['id']; break; - } + } if ($_POST['todo']==RPT_BTN_ADDNEW) $success = InsertFormSeq($Params,'insert'); else $success = InsertFormSeq($Params, 'update'); // continue on @@ -512,7 +515,7 @@ $Params['TblDesc'] = ''; $Params['Processing'] = ''; } - // Update field properties + // Update field properties $sql = "UPDATE ".DBRptFields." SET params='".serialize($Params)."' WHERE id = ".$_POST['ID'].";"; $Result=DB_query($sql,$db,'','',false,true); // check for update errors and reload @@ -522,7 +525,7 @@ } else { // print error message if need be and reload parameter form $DisplayName =$_POST['DisplayName']; $FormParams = PrepStep('prop'); - $FormParams['id'] = $myrow['id']; + $FormParams['id'] = $myrow['id']; } break; default: // bail to reports home @@ -532,7 +535,7 @@ } } break; - + case "step7": // entered from criteria setup page $OverrideDefaults = false; if (!isset($_POST['todo'])) { // then a sequence image button was pushed @@ -546,8 +549,8 @@ if ($SeqNum<DB_num_rows($Result)) $success = ChangeSequence($_POST['SeqNum'], $EntryType, 'down'); } elseif (isset($_POST['ed_x'])) { // the sequence edit button was pushed $OverrideDefaults = true; - // pre fill form with the field to edit and change button name - $sql = "SELECT * FROM ".DBRptFields." + // pre fill form with the field to edit and change button name + $sql = "SELECT * FROM ".DBRptFields." WHERE reportid = ".$ReportID." AND entrytype = '".$EntryType."' AND seqnum=".$SeqNum.";"; $Result=DB_query($sql,$db,'','',false,true); $NewDefaults['defaults'] = DB_fetch_array($Result); @@ -598,13 +601,13 @@ if (isset($_POST['EntryType'])) $EntryType = $_POST['EntryType']; else $EntryType = ''; // build date string of choices from user $DateString = ''; - for ($i=1; $i<=count($DateChoices); $i++) { + for ($i=1; $i<=count($DateChoices); $i++) { if (isset($_POST['DateRange'.$i])) $DateString .= $_POST['DateRange'.$i]; } // error check input for date if ($DateString=='' OR $DateString=='a') { // then the report is date independent $_POST['DateField'] = ''; // clear the date field since we don't need it - $IsValidField = true; // + $IsValidField = true; // } else { // check the input for a valid fieldname $IsValidField = ValidateField($ReportID, $_POST['DateField'], 'TestField'); } @@ -667,7 +670,7 @@ } } break; // End Step 7 - + case "step8": // Entered from import report form switch ($_POST['todo']) { case RPT_BTN_IMPORT: // Error check input and import the new report Modified: trunk/reportwriter/admin/forms/ReportsHome.html =================================================================== --- trunk/reportwriter/admin/forms/ReportsHome.html 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/reportwriter/admin/forms/ReportsHome.html 2012-04-30 16:41:37 UTC (rev 8757) @@ -1,24 +1,24 @@ <h2 align="center"><?php echo $FormParams['heading']; ?></h2> <form name="reporthome" method="post" action="ReportCreator.php?action=step2"> - <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> - <table align="center" border="0" cellspacing="0" cellpadding="0"> +<input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> + <table class="selection" cellspacing="0" cellpadding="0"> <tr> <td> - <table border="1"> + <table class="selection"> <?php echo $DropDownString; ?> </table> </td> <td valign="top"> - <table> + <table class="selection"> <tr> <td><p> </p> - <p><input name="todo" type="submit" value="<?php echo RPT_BTN_ADDNEW; ?>" /></p> - <p><input name="todo" type="submit" value="<?php echo RPT_BTN_EDIT; ?>" /></p> - <p><input name="todo" type="submit" value="<?php echo RPT_BTN_RENAME; ?>" /></p> - <p><input name="todo" type="submit" value="<?php echo RPT_BTN_COPY; ?>" /></p> - <p><input name="todo" type="submit" value="<?php echo RPT_BTN_DEL; ?>" onClick="return confirm('<?php echo RPT_REPDEL; ?>')" /></p> - <p><input name="todo" type="submit" value="<?php echo RPT_BTN_IMPORT; ?>" /></p> - <p><input name="todo" type="submit" value="<?php echo RPT_BTN_EXPORT; ?>" /></p> + <p><button name="todo" type="submit" value="<?php echo RPT_BTN_ADDNEW; ?>" /><?php echo RPT_BTN_ADDNEW; ?></button></p> + <p><button name="todo" type="submit" value="<?php echo RPT_BTN_EDIT; ?>" /><?php echo RPT_BTN_EDIT; ?></button></p> + <p><button name="todo" type="submit" value="<?php echo RPT_BTN_RENAME; ?>" /><?php echo RPT_BTN_RENAME; ?></button></p> + <p><button name="todo" type="submit" value="<?php echo RPT_BTN_COPY; ?>" /><?php echo RPT_BTN_COPY; ?></button></p> + <p><button name="todo" type="submit" value="<?php echo RPT_BTN_DEL; ?>" onClick="return confirm('<?php echo RPT_REPDEL; ?>')" /><?php echo RPT_BTN_DEL; ?></button></p> + <p><button name="todo" type="submit" value="<?php echo RPT_BTN_IMPORT; ?>" /><?php echo RPT_BTN_IMPORT; ?></button></p> + <p><button name="todo" type="submit" value="<?php echo RPT_BTN_EXPORT; ?>" /><?php echo RPT_BTN_EXPORT; ?></button></p> </td> </tr> </table> Modified: trunk/reportwriter/forms/FormsFilter.html =================================================================== --- trunk/reportwriter/forms/FormsFilter.html 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/reportwriter/forms/FormsFilter.html 2012-04-30 16:41:37 UTC (rev 8757) @@ -8,8 +8,8 @@ <input name="FormFilter" type="hidden" value="1" /> <table align="center" width="550" border="1" cellspacing="1" cellpadding="1"> <tr> - <td colspan="2"><input name="todo" type="submit" id="todo" value="<?php echo RPT_BTN_CANCEL; ?>" /></td> - <td colspan="2"><div align="right"><input name="todo" type="submit" id="todo" value="<?php echo RPT_BTN_EXPPDF; ?>" /></div></td> + <td colspan="2"><button name="todo" type="submit" id="todo"><?php echo RPT_BTN_CANCEL; ?></button></td> + <td colspan="2"><div align="right"><button name="todo" type="submit" id="todo"><?php echo RPT_BTN_EXPPDF; ?></button></div></td> </tr> <tr> <td colspan="4"><div align="center"><?php echo RPT_CRITERIA; ?></div></td> Modified: trunk/reportwriter/forms/FormsList.html =================================================================== --- trunk/reportwriter/forms/FormsList.html 2012-04-30 12:29:18 UTC (rev 8756) +++ trunk/reportwriter/forms/FormsList.html 2012-04-30 16:41:37 UTC (rev 8757) @@ -7,9 +7,9 @@ <tr bgcolor="#CCCCCC"><td colspan="3" align="center"><?php echo RPT_FORMOUTPUT; ?></td></tr> <?php echo $OutputString; ?> <tr> - <td width="33%"><input type="submit" name="todo" value="<?php echo RPT_BTN_CANCEL; ?>" /></td> - <td width="33%" align="center"><input type="submit" name="todo" value="<?php echo RPT_BTN_CRIT; ?>" /></td> - <td width="33%" align="right"><input type="submit" name="todo" value="<?php echo RPT_BTN_EXPPDF; ?>" /></td> + <td width="33%"><button type="submit" name="todo"><?php echo RPT_BTN_CANCEL; ?></button></td> + <td width="33%" align="center"><button type="submit" name="to... [truncated message content] |
From: <tim...@us...> - 2012-05-01 14:15:48
|
Revision: 8759 http://weberp.svn.sourceforge.net/weberp/?rev=8759&view=rev Author: tim_schofield Date: 2012-05-01 14:15:40 +0000 (Tue, 01 May 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/PO_AuthorisationLevels.php trunk/PO_AuthoriseMyOrders.php trunk/PO_Header.php trunk/PO_Items.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/ReorderLevel.php trunk/ReorderLevelLocation.php Modified: trunk/PO_AuthorisationLevels.php =================================================================== --- trunk/PO_AuthorisationLevels.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PO_AuthorisationLevels.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -10,9 +10,10 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/group_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; $User=''; $Currency=''; -$CanCreate=1; -$OffHold=1; +$CanCreate=0; +$OffHold=0; $AuthLevel=0; +$InputError=0; if (isset($_POST['Submit'])) { if (isset($_POST['CanCreate']) and $_POST['CanCreate']=='on') { $CanCreate=0; @@ -27,13 +28,24 @@ if ($_POST['AuthLevel']=='') { $_POST['AuthLevel']=0; } + if ($_POST['UserID']=='') { + prnMsg(_('You must select a user from the list'), 'error'); + echo '<br />'; + $InputError=1; + } + if ($_POST['CurrCode']=='') { + prnMsg(_('You must select a currency from the list'), 'error'); + echo '<br />'; + $InputError=1; + } + $sql="SELECT COUNT(*) FROM purchorderauth WHERE userid='".$_POST['UserID']."' AND currabrev='".$_POST['CurrCode']."'"; $result=DB_query($sql, $db); $myrow=DB_fetch_array($result); - if ($myrow[0]==0) { + if ($myrow[0]==0 and $InputError==0) { $sql="INSERT INTO purchorderauth ( userid, currabrev, @@ -129,16 +141,8 @@ echo '<td><a href="'.$rootpath.'/PO_AuthorisationLevels.php?Delete=Yes&UserID=' . $myrow['userid'] . '&Currency='.$myrow['currabrev'].'">'._('Delete').'</td></tr>'; } -echo '</table><br /><br />'; +echo '</table><br />'; -if (!isset($_GET['Edit'])) { - $UserID=$_SESSION['UserID']; - $Currency=$_SESSION['CompanyRecord']['currencydefault']; - $CanCreate='No'; - $OffHold='No'; - $AuthLevel=0; -} - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="form1">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; @@ -150,6 +154,7 @@ echo '<tr><td>'._('User ID').'</td><td><select name="UserID">'; $usersql="SELECT userid FROM www_users"; $userresult=DB_query($usersql,$db); + echo '<option value=""></option>'; while ($myrow=DB_fetch_array($userresult)) { if ($myrow['userid']==$UserID) { echo '<option selected="True" value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; @@ -192,6 +197,7 @@ echo '<input type="hidden" name="CurrCode" value="'.$Currency.'" />'; } else { echo '<tr><td>'._('Currency').'</td><td><select name="CurrCode">'; + echo '<option value=""></option>'; $currencysql="SELECT currabrev,currency FROM currencies"; $currencyresult=DB_query($currencysql,$db); while ($myrow=DB_fetch_array($currencyresult)) { @@ -205,27 +211,31 @@ } echo '<tr><td>'._('User can create orders').'</td>'; -if ($CanCreate=='No') { +if (isset($CanCreate) and $CanCreate=='No') { echo '<td><input type="checkbox" name="CanCreate" /></td></tr>'; } else { echo '<td><input type="checkbox" checked="True" name="CanCreate" /></td></tr>'; } echo '<tr><td>'._('User can release invoices').'</td>'; -if ($OffHold=='No') { +if (isset($OffHold) and $OffHold=='No') { echo '<td><input type="checkbox" name="OffHold" /></td></tr>'; } else { echo '<td><input type="checkbox" checked="True" name="OffHold" /></td></tr>'; } echo '<tr><td>'._('User can authorise orders up to :').'</td>'; -echo '<td><input type="input" name="AuthLevel" size="11" class="number" value="'.locale_money_format($AuthLevel, $Currency).'" /></td></tr>'; +if ($Currency!='') { + echo '<td><input type="input" name="AuthLevel" size="11" class="number" value="'.locale_money_format($AuthLevel, $Currency).'" /></td></tr>'; +} else { + echo '<td><input type="input" name="AuthLevel" size="11" class="number" value="0" /></td></tr>'; +} echo '</table>'; if (isset($_GET['Edit'])) { - echo '<br /><div class="centre"><input type="submit" name="Update" value="'._('Update Information').'" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="Update">'._('Update Information').'</button></div><br /></form>'; } else { - echo '<br /><div class="centre"><input type="submit" name="Submit" value="'._('Enter Information').'" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="Submit">'._('Enter Information').'</button></div><br /></form>'; } include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PO_AuthoriseMyOrders.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -125,7 +125,7 @@ } } //end while header loop echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="updateall" value="' . _('Update'). '" /></form>'; +echo '<br /><div class="centre"><button type="submit" name="updateall" value="" />' . _('Update'). '</button></div><br /></form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PO_Header.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -544,8 +544,8 @@ <td><input type="text" name="SuppCode" size="15" maxlength="18" /></td> </tr> </table><br /><div class="centre"> - <input type="submit" name="SearchSuppliers" value="' . _('Search Now') . '" /> - <input type="submit" action="reset" value="' . _('Reset') . '" /></div>'; + <button type="submit" name="SearchSuppliers">' . _('Search Now') . '</button> + <button type="submit" action="reset">' . _('Reset') . '</button></div>'; echo '<script type="text/javascript">defaultControl(document.forms[0].Keywords);</script>'; @@ -575,7 +575,7 @@ $k++; } - echo '<td><input type="submit" style="width:100%" name="Select" value="'.$myrow['supplierid'].'" /></td> + echo '<td><button type="submit" style="width:100%" name="Select">'.$myrow['supplierid'].'</button></td> <td>'.$myrow['suppname'].'</td><td>'; for ($i=1; $i<=6; $i++) { @@ -722,13 +722,10 @@ } echo '<br /><table width="80%"> - <tr> - <th><font color="blue" size="4"><b>' . _('Order Initiation Details') . '</b></font></th> - <th><font color="blue" size="4"><b>' . _('Order Status') . '</b></font></th> - </tr> <tr><td style="width:50%">'; //sub table starts echo '<table class="selection" width="100%">'; + echo '<tr><th colspan="3" class="header">' . _('Order Initiation Details') . '</th></tr>'; echo '<tr><td>' . _('PO Date') . ':</td><td>'; if ($_SESSION['ExistingOrder'.$identifier]!=0){ echo ConvertSQLDate($_SESSION['PO'.$identifier]->Orig_OrderDate); @@ -788,8 +785,8 @@ <td><select name="RePrint" onChange="ReloadForm(form1.AllowRePrint)"> <option selected="True" value="0">' . _('No') . '</option> <option value="1">' . _('Yes') . '</option> - </select></td>'; - echo '<td><input type="submit" name="AllowRePrint" value="Update" /></td></tr>'; + </select>'; + echo '<button type="submit" name="AllowRePrint">' . _('Update') . '</button></td></tr>'; } elseif ($Printed) { echo '<tr><td colspan="2"><a target="_blank" href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['ExistingOrder'.$identifier] . '&identifier='.$identifier. '">' . _('Reprint Now') . '</a></td></tr>'; } @@ -797,6 +794,8 @@ echo '</table>'; echo '<td style="width:50%" valign="top"><table class="selection" width="100%">'; + echo '<tr><th colspan="3" class="header">' . _('Order Status') . '</th></th></tr>'; + if($_SESSION['ExistingOrder'.$identifier] != 0 and $_SESSION['PO'.$identifier]->Status == PurchOrder::STATUS_PRINTED){ echo '<tr><td><a href="' .$rootpath . '/GoodsReceived.php?&PONumber=' . $_SESSION['PO'.$identifier]->OrderNo . '&identifier='.$identifier.'">'._('Receive this order').'</a></td></tr>'; } @@ -849,21 +848,26 @@ <td><input type="text" name="StatusComments" size="50" /></td></tr> <tr><td colspan="2"><b>' . html_entity_decode($_SESSION['PO'.$identifier]->StatComments,ENT_QUOTES,'UTF-8') .'</b></td></tr>'; //need to use single quotes as double quotes inside the string of StatusComments - echo "<input type='hidden' name='StatusCommentsComplete' value='" . addslashes(html_entity_decode($_SESSION['PO'.$identifier]->StatComments,ENT_QUOTES,'UTF-8')) ."' />"; - echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') .'" /></td>'; + echo '<input type="hidden" name="StatusCommentsComplete" value="' . addslashes(html_entity_decode($_SESSION['PO'.$identifier]->StatComments,ENT_QUOTES,'UTF-8')) . '" />'; + echo '<tr><td><button type="submit" name="UpdateStatus">' . _('Status Update') .'</button></td>'; echo '</tr></table></td>'; echo '<table width="80%"> <tr> - <th><font color="blue" size="4"><b>' . _('Warehouse Info') . '</b></font></th> - <th><font color="blue" size="4"><b>' . _('Supplier Info') . '</b></font></th> + + </tr> <tr><td valign="top">'; /*nested table level1 */ - echo '<table class="selection" width="100%"><tr><td>' . _('Warehouse') . ':</td> - <td><select name="StkLocation" onChange="ReloadForm(form1.LookupDeliveryAddress)">'; + echo '<table class="selection" width="100%"> + <tr> + <th colspan="3" class="header">' . _('Warehouse Info') . '</th> + </tr> + <tr> + <td>' . _('Warehouse') . ':</td> + <td><select name="StkLocation" onChange="ReloadForm(form1.LookupDeliveryAddress)">'; $sql = "SELECT loccode, locationname @@ -880,7 +884,7 @@ } echo '</select> - <input type="submit" name="LookupDeliveryAddress" value="' ._('Select') . '" /></td> + <button type="submit" name="LookupDeliveryAddress">' ._('Select') . '</button></td> </tr>'; /* If this is the first time @@ -1010,8 +1014,13 @@ /* end of sub table */ echo '</td><td>'; /*sub table nested */ - echo '<table class="selection" width="100%"><tr><td>' . _('Supplier Selection') . ':</td><td> - <select name="Keywords" onChange="ReloadForm(form1.SearchSuppliers)">'; + echo '<table class="selection" width="100%"> + <tr> + <th class="header" colspan="3">' . _('Supplier Info') . '</th> + </tr> + <tr> + <td>' . _('Supplier Selection') . ':</td> + <td><select name="Keywords" onChange="ReloadForm(form1.SearchSuppliers)">'; $SuppCoResult = DB_query("SELECT supplierid, suppname FROM suppliers ORDER BY suppname",$db); @@ -1024,7 +1033,7 @@ } echo '</select> '; - echo '<input type="submit" name="SearchSuppliers" value="' . _('Select Now') . '" /></td></tr>'; + echo '<button type="submit" name="SearchSuppliers">' . _('Select Now') . '</button></td></tr>'; echo '</td></tr><tr><td>' . _('Supplier Contact') . ':</td><td> <select name="SupplierContact">'; @@ -1094,7 +1103,7 @@ } echo '</td></tr></table>'; /*end of sub table */ - echo '</td></tr><tr><th colspan="4"><font color="blue" size="4"><b>' . _('Comments'); + echo '</td></tr><tr><td colspan="2"><table class="selection" width="100%"><tr><th colspan="4" class="header">' . _('Comments') . ':</b></font></th></tr>'; $Default_Comments = ''; @@ -1102,13 +1111,14 @@ $_POST['Comments']=$Default_Comments; } - echo ':</b></font></th></tr><tr><td colspan="4"><textarea name="Comments" style="width:100%" rows="5">' . $_POST['Comments'] . '</textarea>'; + echo '<tr><td colspan="4"><textarea name="Comments" style="width:100%" rows="5">' . $_POST['Comments'] . '</textarea>'; + echo '</table></td></tr>'; echo '</table>'; echo '</td></tr></table><br />'; /* end of main table */ - echo '<div class="centre"><input type="submit" name="EnterLines" value="' . _('Enter Line Items') . '" /></div>'; + echo '<div class="centre"><button type="submit" name="EnterLines">' . _('Enter Line Items') . '</button></div>'; } /*end of if supplier selected */ Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PO_Items.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -961,7 +961,6 @@ <td><input type="text" class="number" name="Price' . $POLine->LineNo . '" size="11" value="' .$DisplayPrice.'" /></td> <td class="number">' . $DisplayLineTotal . '</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="11" value="' .$POLine->ReqDelDate .'" /></td> - <td>'.$POLine->PODetailRec.'</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier. '&Delete=' . $POLine->LineNo . '">' . _('Delete') . '</a></td></tr>'; $_SESSION['PO'.$identifier]->Total = $_SESSION['PO'.$identifier]->Total + $LineTotal; } @@ -969,8 +968,8 @@ $DisplayTotal = locale_money_format($_SESSION['PO'.$identifier]->Total,$_SESSION['PO'.$identifier]->CurrCode); echo '<tr><td colspan="6" class="number">' . _('TOTAL') . _(' excluding Tax') . '</td><td class="number"><b>' . $DisplayTotal . '</b></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="UpdateLines" value="Update Order Lines" />'; - echo ' <input type="submit" name="Commit" value="Process Order" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="UpdateLines">' . _('Update Order Lines') . '</button>'; + echo ' <button type="submit" name="Commit">' . _('Process Order') . '</button></div>'; if (!isset($_POST['NewItem']) and isset($_GET['Edit'])) { /*show a form for putting in a new line item with or without a stock entry */ @@ -1020,7 +1019,7 @@ <tr><td>'._('Delivery Date').'</td> <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ReqDelDate" size="11" value="'.$_SESSION['PO'.$identifier]->DeliveryDate .'" /></td></tr>'; echo '</table>'; - echo '<div class="centre"><input type="submit" name="EnterLine" value="Enter Item" /></div>'; + echo '<div class="centre"><button type="submit" name="EnterLine">' . _('Enter Item') . '</button></div>'; } /* Now show the stock item selection search stuff below */ @@ -1036,9 +1035,9 @@ $DbgMsg = _('The SQL used to retrieve the category details but failed was'); $result1 = DB_query($sql,$db,$ErrMsg,$DbgMsg); - echo '<table class="selection"><tr><th colspan="3"><font size="3" color="blue">'. _('Search For Stock Items') . '</th>'; + echo '<table class="selection"><tr><th colspan="3" class="header">'. _('Search For Stock Items') . '</th>'; - echo ':</font></tr><tr><td><select name="StockCat">'; + echo ':</tr><tr><td><select name="StockCat">'; echo '<option selected="True" value="All">' . _('All') . '</option>'; while ($myrow1 = DB_fetch_array($result1)) { @@ -1071,8 +1070,8 @@ <tr><td></td> <td><font size="3"><b>' . _('OR') . ' </b></font><a target="_blank" href="'.$rootpath.'/Stocks.php">' . _('Create a New Stock Item') . '</a></td></tr> </table><br /> - <div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /> - <input type="submit" name="NonStockOrder" value="' . _('Order a non stock item') . '" /> + <div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button> + <button type="submit" name="NonStockOrder">' . _('Order a non stock item') . '</button> </div><br />'; @@ -1158,7 +1157,7 @@ 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>'; + echo '<a name="end"></a><br /><div class="centre"><button type="submit" name="NewItem" value="" />' . _('Order some') . '</button></div>'; }#end if SearchResults to show echo '</form>'; Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PO_PDFPurchOrder.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -417,7 +417,7 @@ } else { echo '</table>'; } - echo '<br /><div class="centre"><input type="submit" name="DoIt" value="' . _('OK') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="DoIt">' . _('OK') . '</button></div>'; echo '</form>'; include('includes/footer.inc'); } Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PO_SelectOSPurchOrder.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -181,7 +181,7 @@ } else { echo '<option value="Rejected">' . _('Rejected') . '</option>'; } - echo '</select> <input type="submit" name="SearchOrders" value="' . _('Search Purchase Orders') . '" /></td></tr></table>'; + echo '</select> <button type="submit" name="SearchOrders">' . _('Search Purchase Orders') . '</button></td></tr></table>'; } $SQL="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; @@ -205,8 +205,8 @@ echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td></tr><tr><td></td>'; echo '<td><font size="4"><b>' . _('OR') . '</b></font><font size="1">' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</font></td>'; echo '<td><input type="text" name="StockCode" size="15" maxlength="18" /></td></tr></table><br />'; -echo '<table><tr><td><input type="submit" name="SearchParts" value="' . _('Search Parts Now') . '" />'; -echo '<input type="submit" name="ResetPart" value="' . _('Show All') . '" /></td></tr></table>'; +echo '<table><tr><td><button type="submit" name="SearchParts">' . _('Search Parts Now') . '</button>'; +echo '<button type="submit" name="ResetPart">' . _('Show All') . '</button></td></tr></table>'; echo '<br />'; @@ -233,12 +233,13 @@ $k=1; } - printf('<td><input type="submit" name="SelectedStockItem" value="%s" /></td> + printf('<td><button type="submit" name="SelectedStockItem" value="%s">%s</button></td> <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> <td>%s</td></tr>', $myrow['stockid'], + $myrow['stockid'], $myrow['description'], locale_number_format($myrow['qoh'], $myrow['decimalplaces']), locale_number_format($myrow['qord'], $myrow['decimalplaces']), Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PO_SelectPurchOrder.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -157,11 +157,11 @@ } else { echo '<option value="Complete">' . _('Completed') . '</option>'; } - echo '</select> <input type="submit" name="SearchOrders" value="' . _('Search Purchase Orders') . '" /></td></tr></table>'; + echo '</select> <button type="submit" name="SearchOrders">' . _('Search Purchase Orders') . '</button></td></tr></table>'; } $SQL = "SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; $result1 = DB_query($SQL, $db); -echo '<br /><br /><table class="selection"><tr><td>'; +echo '<br /><table class="selection"><tr><td>'; echo '<font size="1">' . _('To search for purchase orders for a specific part use the part selection facilities below') . '</font>'; echo '<tr><td><font size="1">' . _('Select a stock category') . ':</font><select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { @@ -175,8 +175,8 @@ echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td></tr><tr><td></td>'; echo '<td><font size="3"><b>' . _('OR') . ' </b></font><font size="1">' . _('Enter extract of the') . '<b>' . _('Stock Code') . '</b>:</font></td>'; echo '<td><input type="text" name="StockCode" size="15" maxlength="18" /></td></tr>'; -echo '<tr><td colspan="3"><div class="centre"><input type="submit" name="SearchParts" value="' . _('Search Parts Now') . '" />'; -echo '<input type="submit" name="ResetPart" value="' . _('Show All') . '" /></div></td></tr>'; +echo '<tr><td colspan="3"><div class="centre"><button type="submit" name="SearchParts">' . _('Search Parts Now') . '</button>'; +echo '<button type="submit" name="ResetPart">' . _('Show All') . '</button></div></td></tr>'; echo '</table><br /><br />'; if (isset($StockItemsResult)) { echo '<table cellpadding="2" class="selection">'; @@ -197,7 +197,7 @@ echo '<tr class="OddTableRows">'; $k = 1; } - echo '<td><input type="submit" name="SelectedStockItem" value="' . $myrow['stockid'] . '" /></td> + echo '<td><button type="submit" name="SelectedStockItem" value="' . $myrow['stockid'] . '">' . $myrow['stockid'] . '</button></td> <td>' . $myrow['description'] . '</td> <td class="number">' . locale_number_format($myrow['qoh'], $myrow['decimalplaces']) . '</td> <td class="number">' . locale_number_format($myrow['qord'], $myrow['decimalplaces']) . '</td> Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/Prices.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -224,7 +224,7 @@ echo '<tr><th colspan="8"><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo _('Pricing for part') . ':<input type="text" name="Item" maxsize="22" value="' . $Item . '" maxlength="20" /> - <input type="submit" name="NewPart" value="' . _('Review Prices') . '" />'; + <button type="submit" name="NewPart">' . _('Review Prices') . '</button>'; echo '</th></tr></form>'; echo '<tr> @@ -335,7 +335,7 @@ } echo '<br /><table class="selection">'; - echo '<tr><th colspan="5"><font color="blue" size="3"><b>' . $Item . ' - ' . $PartDescription . '</b></font></th></tr>'; + echo '<tr><th colspan="5" class="header"><b>' . $Item . ' - ' . $PartDescription . '</b></th></tr>'; echo '<tr><td>' . _('Sales Type Price List') . ':</td><td><select name="TypeAbbrev">'; @@ -425,8 +425,8 @@ echo '</table>'; echo '<br /><div class="centre">'; - echo '<input type="submit" name="submit" value="'. _('Enter') . '/' . _('Amend Price') . '" />'; - echo '</div>'; + echo '<button type="submit" name="submit">'. _('Enter') . '/' . _('Amend Price') . '</button>'; + echo '</div><br />'; } } Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PricesBasedOnMarkUp.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -161,8 +161,9 @@ <td><input type="text" name="IncreasePercent" class="number" size="4" maxlength="4" value="' . $_POST['IncreasePercent'] . '" /></td></tr></table>'; -echo '<p><div class="centre"> - <input type="submit" name="UpdatePrices" value="' . _('Update Prices') . '\' onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');" /></div></p>'; +echo '<br /><div class="centre"> + <button type="submit" name="UpdatePrices" onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');" />' . _('Update Prices') . '</button> + </div>'; echo '</form>'; Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PricesByCost.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -221,8 +221,8 @@ } //end of looping echo '<input type="hidden" name="Counter" value="' . $PriceCounter . '" />'; echo '<tr> - <td colspan="12" style="text-align:center"><input type="submit" name="submit" value="' . _('Update') . '" /> - <a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><input type="submit" value="' . _('Back') . '" /><a/></td> + <td colspan="12" style="text-align:center"><button type="submit" name="submit">' . _('Update') . '</button> + <a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><button type="submit">' . _('Back') . '</button><a/></td> </tr></form>'; } else { prnMsg(_('There were no prices meeting the criteria specified to review'),'info'); @@ -230,7 +230,7 @@ } } else { /*The option to submit was not hit so display form */ echo '<div class="page_help_text">' . _('Use this report to display price list with the cost.') . '</div><br />'; - echo '<br /><br /><form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"><table class="selection">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; $SQL = "SELECT categoryid, categorydescription @@ -283,7 +283,7 @@ } //end while loop DB_data_seek($result, 0); echo '</select></td></tr>'; - echo '</table><br /><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div></p>'; + echo '</table><br /><div class="centre"><button type="submit" name="submit">' . _('Submit') . '</button></div>'; } /*end of else not submit */ include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PrintCustStatements.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -423,10 +423,10 @@ <tr><td>'. _('Ending Customer statement to print (Customer code)').'</td><td> <input type="text" maxlength="6" size="7" name="ToCust" value="zzzzzz" /></td></tr></table> <br /><div class="centre"> - <input type="submit" name="PrintPDF" value="' . _('Print All Statements in the Range Selected').'" /> + <button type="submit" name="PrintPDF">' . _('Print All Statements in the Range Selected').'</button> </div>'; } - echo '<br /><br /><br />'; + echo '<br />'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PrintCustTrans.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -362,7 +362,7 @@ } } /* end loop to print invoices */ -if (($InvOrCredit == 'Invoice' or $InvOrCredit == 'Credit') and isset($PrintPDF)) { +if (isset($InvOrCredit) and ($InvOrCredit == 'Invoice' or $InvOrCredit == 'Credit') and isset($PrintPDF)) { if (isset($_GET['Email'])) { //email the invoice to address supplied include ('includes/header.inc'); @@ -416,12 +416,12 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Start invoice/credit note number to print') . '</td><td><input type="text" class="number" maxlength="6" size="7" name="FromTransNo" /></td></tr>'; echo '<tr><td>' . _('End invoice/credit note number to print') . '</td><td><input type="text" class="number" maxlength="6" size="7" name="ToTransNo" /></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="Print" value="' . _('Print') . '" /><br />'; - echo '<input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="Print">' . _('Print') . '</button><br />'; + echo '<br /><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div>'; $sql = "SELECT typeno FROM systypes WHERE typeid=10"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); - echo '<div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br />' . _('If only a single invoice is required') . ', ' . _('enter the invoice number to print in the Start transaction number to print field and leave the End transaction number to print field blank') . '. ' . _('Only use the end invoice to print field if you wish to print a sequential range of invoices') . ''; + echo '<br /><div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br />' . _('If only a single invoice is required') . ', ' . _('enter the invoice number to print in the Start transaction number to print field and leave the End transaction number to print field blank') . '. ' . _('Only use the end invoice to print field if you wish to print a sequential range of invoices') . ''; $sql = "SELECT typeno FROM systypes WHERE typeid=11"; $result = DB_query($sql, $db); $myrow = DB_fetch_row($result); Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/PrintCustTransPortrait.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -560,15 +560,15 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Start invoice/credit note number to print') . '</td><td><input class="number" type="text" maxlength="6" size="7" name="FromTransNo" /></td></tr>'; echo '<tr><td>' . _('End invoice/credit note number to print') . '</td><td><input class="number" type="text" maxlength="6" size="7" name="ToTransNo" /></td></tr></table>'; - echo '<div class="centre"><br /><input type="submit" name="Print" value="' . _('Print Preview') . '" /><br />'; - echo '<input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '<div class="centre"><br /><button type="submit" name="Print">' . _('Print Preview') . '</button><br />'; + echo '<br /><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div>'; $sql = "SELECT typeno FROM systypes WHERE typeid=10"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); - echo '<div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br />' . + echo '<br /><div class="page_help_text"><b>' . _('The last invoice created was number') . ' ' . $myrow[0] . '</b><br />' . _('if only a single invoice is required') . ', ' . _('enter the invoice number to print in the Start transaction number to print field and leave the End transaction number to print field blank') . '. ' . _('Only use the end invoice to print field if you wish to print a sequential range of invoices') . ''; Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/ReorderLevel.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -251,7 +251,7 @@ echo '</table> <br /> <div class="centre"> - <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + <button type="submit" name="PrintPDF">' . _('Print PDF') . '</button> </div>'; include('includes/footer.inc'); Modified: trunk/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2012-05-01 13:53:11 UTC (rev 8758) +++ trunk/ReorderLevelLocation.php 2012-05-01 14:15:40 UTC (rev 8759) @@ -35,7 +35,9 @@ $order="locstock.stockid"; } - $sql="SELECT locstock.stockid, stockmaster.description, + $sql="SELECT locstock.stockid, + stockmaster.description, + stockmaster.decimalplaces, locstock.reorderlevel, (SELECT SUM(salesorderdetails.qtyinvoiced) FROM salesorderdetails,salesorders @@ -59,9 +61,9 @@ $ResultLocation = DB_query($sqlloc,$db); $Location=DB_fetch_array($ResultLocation); - echo'<p class="page_title_text" align="center"><strong>' . _('Location : ') . '' . $Location['locationname'] . ' </strong></p>'; - echo'<p class="page_title_text" align="center"><strong>' . _('Number Of Days Sales : ') . '' . $_POST['NumberOfDays'] . '' . _(' Days ') . ' </strong></p>'; - echo '<table>'; + echo'<p class="page_title_text" align="center">' . _('Location : ') . '' . $Location['locationname'] . '</p>'; + echo'<p class="page_title_text" align="center">' . _('Number Of Days Sales : ') . '' . $_POST['NumberOfDays'] . '' . _(' Days ') . '</p>'; + echo '<table class="selection">'; echo '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Total Invoiced').'<br />'._('At All Locations') . '</th> @@ -133,20 +135,20 @@ $ohin = DB_query($sqlohin,$db); $ohinRow = DB_fetch_array($ohin); - echo'<td>'.$myrow['stockid'].'</td> + echo '<td>'.$myrow['stockid'].'</td> <td>'.$myrow['description'].'</td> - <td class="number">'.$QtyInvoiceAll.'</td> - <td class="number">'.$QtyInvoice.'</td> - <td class="number">'.$ohRow['0'].'</td> - <td class="number">'.$ohinRow['0'].'</td> - <td><input type="text" class="number" name="ReorderLevel' . $i .'" maxlength="3" size="4" value="'. $myrow['reorderlevel'] .'" /> + <td class="number">'.locale_number_format($QtyInvoiceAll,$myrow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($QtyInvoice,$myrow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($ohRow['0'],$myrow['decimalplaces']).'</td> + <td class="number">'.locale_number_format($ohinRow['0'],$myrow['decimalplaces']).'</td> + <td><input type="text" class="number" name="ReorderLevel' . $i .'" maxlength="10" size="12" value="'. locale_number_format($myrow['reorderlevel'],$myrow['decimalplaces']) .'" /> <input type="hidden" name="StockID' . $i . '" value="' . $myrow['stockid'] . '" /></td> </tr> '; $i++; } //end of looping echo'<tr> - <td style="text-align:center" colspan="7"><input type="submit" name="submit" value="' . _('Update') . '" /></td> + <td style="text-align:center" colspan="7"><button type="submit" name="submit">' . _('Update') . '</button></td> </tr></form>'; @@ -196,7 +198,7 @@ echo '<option value="2">'. _('Code') . '</option>'; echo '</select></td></tr>'; - echo '</table><br /><p><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div></p>'; + echo '</table><br /><p><div class="centre"><button type="submit" name="submit">' . _('Submit') . '</button></div></p>'; } /*end of else not submit */ include('includes/footer.inc'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-01 15:16:59
|
Revision: 8760 http://weberp.svn.sourceforge.net/weberp/?rev=8760&view=rev Author: tim_schofield Date: 2012-05-01 15:16:51 +0000 (Tue, 01 May 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/Labels.php trunk/PDFPrintLabel.php trunk/css/labelsDim.png trunk/css/paramsLabel.png trunk/includes/session.inc Modified: trunk/Labels.php =================================================================== --- trunk/Labels.php 2012-05-01 14:15:40 UTC (rev 8759) +++ trunk/Labels.php 2012-05-01 15:16:51 UTC (rev 8760) @@ -1,546 +1,452 @@ -<?php -/** - * <b>Labels XML file Managment</b> - * This programa maintains the XML file containing the label defintions - * used to print the products prices tickets - * @author Marcos R Garcia <addsmgt at gmail dot com> - * @version 1.1 - * Last changes: 2010-08-31 - * -**/ - -/* $Revision= 1.1; $ */ -$Version_adds= 1.1; - -/** Error reporting */ - -include('includes/session.inc'); -$title=_('Label Templates Maintainance'); -include('includes/header.inc'); - -$debug=false; -include('includes/DefineLabelClass.php'); - -$allLabels = //!< The variable $allLabels is the global variable that contains the list - getXMLFile(LABELS_FILE); //!< of all the label objects defined until now. In case of a fresh - //!< installation or an empty XML labels file it holds a NULL value. - -if ($debug) { - echo "<br />" ; - echo "<pre>"; - print_r($_POST); - echo "</pre>"; -//exit(); -} - -/** Check if some action has been requested -*/ -$showList=true; // By default will show the tamplates list - -/** - * Save the changes in template? - */ -if (isset($_POST['Update'])) { - // Get the data from the user input & validate it (not new) - $label=getData($_POST, false, $ok); - // If all OK try to update the requested label - if (!$ok OR !updateLabel($label)) { - // show the data label from the input data as update data (id read only)} - showLabel($label, _('Correct data'), $theme, false); - $showList=false; - } - -/** - * Save the data for a new template? - */ -} elseif (isset($_POST['Save'])) { - // Get the data from the user input & validate it for new id - $label=getData($_POST, true, $ok); - if (!$ok OR !createLabel($label)) { // - showLabel($label, _('Correct data'), $theme, false); - $showList=false; - } - -/** - * Get the data from an old one to create a new template? - */ -} elseif (isset($_POST['Copy'])) { - $label=$allLabels->getLabel($_POST['labelID']); - $label->id = _('New ID'); // Well, where did I get it? of course from the user, but .. - showLabel($label, _('Edit data new label'), $theme, false); - $showList=false; - -/** - * Change some data from an old template? - */ -} elseif (isset($_POST['Edit'])) { - $label=$allLabels->getLabel($_POST['labelID']); - showLabel($label, _('Edit data label'), $theme, true); - $showList=false; - -/** - * Eliminate an unnecesary template? - */ -} elseif (isset($_POST['Delete'])) { - $allLabels=deleteLabel($allLabels, $_POST['labelID']); - -/** - * Create a new template? - */ -} elseif (isset($_POST['New'])) { - showLabel(null, _('New label'), $theme); - $showList=false; - -/** - * Do nothing? only show the list (if it exist)) - */ -} elseif (isset($_POST['Cancel'])) { - ; // showLabelList - -/** - * No action requested, show all or get the first one - */ -} else { - if ($allLabels==null OR count($allLabels->label)<1) { - showLabel(null, _('There is no labels, create a new one'), $theme); - $showList=false; - } -} - -/** - * The default is to show the list of labels templates yet defined, - * the exception occurs when previously has been selected a particular - * template, for edit, copy or to create a new one - */ -if ($showList) { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; - showLabelsList($allLabels->label); -} -include('includes/footer.inc'); -exit(); - -/*! \brief getData - Gets the input data from the user's submit - * - * This code constructs a new objet Label from the form's data - * provided by the user. It validates the data too. - * @param $data The array of strings gived by the user - * @param $new This flag indicates that the labels is new, so check no repeated id - * @param $ok The variable where the routine gives the validation result. - * @return The Label object constructed qith the data, included errors. - */ -function getData($data, $new, &$ok) { - $ok = validData($data, $new); - return newLabel($data); -} - -function validData($data, $new) { - global $allLabels, $DimensionTags, $DataTags; - -// Check the heading data - $errors=array(); - if ($new) { - if (empty($data['id'])) - $errors[]=_('Id required'); - elseif ($allLabels!=null AND $allLabels->findLabel($data['id'])!==false) - $errors[]=_('This id exist in previous list'); - } - if (empty($data['description'])) - $errors=_('the description is required'); - -// Check the dimensions data - foreach ($DimensionTags as $iTag=>$tag) { - if ($tag['type']=='s') continue; // select type does not require validation - $dd = trim($data[$iTag]); - $desc=$tag['desc']; - switch ($tag['type']) { - case 'n': - if (!is_numeric($dd)) - $errors[]= _('The value of').' '.$desc.' '._('would be numeric'); - elseif ((float)$data[$iTag]<=0) - $errors[]= _('The value of').' '.$desc.' '._('requires a positive value').$dd; - break; - case 'i': - if (!is_numeric($dd) OR (int)$data[$iTag]<=0) - $errors[]= _('The value of').' '.$tag['desc'].' '._('would be a positive integer'); - break; - } - } - // Checking consistency between data - // Rh > He - $tag = $DimensionTags[$iTag='Rh']; - if ((float)$data['Rh'] < (float)$data['He'] ) { - $desc=$tag['desc']; - $errors[]= _('The value of').' '.$desc.' '._('requires to be greater than the height of the labels'); - } - // Sh >= rows*Rh+Tm - $tag = $DimensionTags[$iTag='Sh']; - if ((float)$data['Sh'] <= (float)$data['Tm'] + ( (int)$data['Rows']*((float)$data['Rh']) ) ) { - $desc=$tag['desc']; - $errors[]= _('The value of').' '.$desc.' '._('requires to be greater than the height of all the rows, including the top margin'); - } - // Cw > Wi - $tag = $DimensionTags[$iTag='Cw']; - if ((float)$data['Cw'] < (float)$data['Wi'] ) { - $desc=$tag['desc']; - $errors[]= _('The value of').' '.$desc.' '._('requires to be greater than the width of the labels'); - } - // Sw >= Cols*Cw+Lm - $tag = $DimensionTags[$iTag='Sw']; - if ((float)$data['Sw'] <= (float)$data['Lm'] + ( (int)$data['Cols']*((float)$data['Cw']) ) ) { - $desc=$tag['desc']; - $errors[]= _('The value of').' '.$desc.' '._('requires to be greater than the width of all the cols, including the left margin'); - } - - $rowCount=0; - $jRow=0; - foreach ($data['row'] as $iRow=>$row) { - $jRow++; - if (empty($row)) continue; // The empty row indicates no data - $rowCount++; // we have data - - if (!is_numeric($row) ) $row=0; - else $row = (float)$row; - if ($row<=0) - $errors[]= _('The vert. pos. value would be positive') ." ($jRow)"; - elseif ((float)$row>(float)$data['He']) - $errors[]= _('The value of the vert. pos. would be less than')." ". $data['He'] ."($jRow)"; - - // now the rest of the line data is validated - foreach ($DataTags as $iTag=>$tag) { - if ($tag['type']=='s' // select type does not require validation - OR $iTag == 'row') continue; // the row is just validated - $dd = trim($data[$iTag][$iRow]); - $desc=$tag['desc']; - if ($tag['type']=='n') { - if (!is_numeric($dd)) - $errors[]= _('The value of').' '.$desc.' '._('would be numeric')." ($jRow)"; - elseif (empty($dd) OR (float)$dd<=0) - $errors[]= _('The value of').' '.$desc.' '._('requires a positive value')." ($jRow)"; - } - switch ($iTag) { - case 'font': - if ((float)$dd+$row >= (float)$data['He']) { - $errors[]= _('The value of').' '.$desc.' '._('in this position exceeds the label height'). - " ($jRow)"; - } - break; - case 'pos': - $posD = (float)$dd; - break; - case 'max': - if ((float)$dd+$posD >= (float)$data['Wi']) { - $errors[]= _('The position and lenght of the string leads the text to get out of the label'). - " ($jRow)"; - } - break; - } - } - } - // Display the errors detected - if (count($errors)>0) { - foreach($errors as $err) - prnMsg($err); - return false; - } - return true; // all data are valid! -} - -/*! \brief Shows the label requested - * - * It shows the data label from the input $data as update data (id read only) - * if the third parameter is true or a fresh data label (new label). It is - * possible that the combination $data valid and $readonly false occurs when - * invalid data needs to be recaptured because an error in a new label capture. - */ -function showLabel($label, $msg, $theme, $readonly=false) { - global $rootpath; - if ($label==null) - $label = newLabel(); - if ($readonly) { - $name = "Update"; - $value = _('Update'); - } else { - $name = "Save"; - $value = _('Save'); - } - - $vCancel = _('Cancel'); - - $tableGD = setTableGD($label, $readonly); - $tableLines = setTableLines($label->data->line); - - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $msg.'</p>'; - - echo '<br /> - <form action="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'" method="post"> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <div class="centre"> - <table border="2" cellspacing="4" class="selection"> - <tbody> - <tr> - <td align="center"><img src="'.$rootpath.'/css/paramsLabel.png" align="top" border="0" /></td> - <td>'.$tableGD.'</td> - </tr> - <tr> - <td align="center"><img src="'.$rootpath.'/css/labelsDim.png" align="top" border="0" /></td> - <td>'.$tableLines.'</td> - </tr> - </tbody> - </table> - <br /><input type="submit" name="'.$name.'" value="'.$value.'" /> - <input type="submit" name="Cancel" value="'.$vCancel.'" /> - </form>'; -} - -function setTableGD($label, $readonly) { - global $GlobalTags, $DimensionTags; - $html=' - <table border="0" cellspacing="1" class="selection">'; - $html .= setDataFields($GlobalTags, 0, $label, $specialTag='id', $readonly); - $html .= setDataFields($DimensionTags, 1, $label->dimensions); - $html .= ' - </table>'; - return $html; -} - -function setDataFields($tags, $withTagId, $data, $specialTag=false, $readonly=false) { - $iCol=0; - $html = ''; - foreach ($tags as $iTag=>$tag) { - $vDat = (is_object($data) AND isset($data->$iTag))?$data->$iTag:''; - if ($tag['type']=='s') { - $input ='<select name="'. $iTag . '">'; - foreach ($tag['values'] as $i=>$val) { - $xSel = ($vDat==$i)?' selected' : ''; - $input .= ' - <option value="'. $i .'"'. $xSel .'>'.$val.'</option>'; - } - $input .= ' - </select>'; - } else { - $ro=''; - if ($readonly AND $specialTag==$iTag) - $ro='readonly="True" '; - $input = '<input type="text" name="'. $iTag .'" value="'. $vDat .'" size="'. $tag['sz'] .'" maxlength="'. $tag['maxsz'] .'"'. $ro .' />'; - } - if (!$iCol++) // when zero begins a line - $html .= ' - <tr>'; - else - $iCol=0; - $wTag= $withTagId ? (' ('.$iTag.')') :''; - $html .= ' - <td align="right">' . $tag['desc'] . $wTag . ':</td> - <td>' . $input . '</td>'; - if (!$iCol) - $html .= ' - </tr>'; - } - if ($iCol) // if the count ends in an odd count, add the end of line - $html .= ' - </tr>'; - - return $html; -} - -function setTableLines($lineArray) { - global $DataTags; - $html=' - <table border="0" cellspacing="1" class="selection">'; - $html .= setTableHeader($DataTags); - - $iCount=MAX_LINES_PER_LABEL; - foreach ($lineArray as $i=>$data) { - - $iCount--; - $html .= setLineFields($DataTags, $data); - } - while ($iCount-->0) - $html .= setLineFields($DataTags, null); - $html .= ' - </table>'; - return $html; -} - -function setTableHeader($tags) { - $html= ' - <tr>'; - foreach ($tags as $tit) - $html .= ' - <th>' . $tit['desc'] . '</th>'; - return $html . ' - </tr>'; -} - -function setLineFields($tags, $data) { - $html = ' - <tr>'; - foreach ($tags as $iTag=>$tag) { - $vDat = ($data!=null AND isset($data->$iTag))?$data->$iTag:''; - if ($tag['type']=='s') { - $input ='<select name="'. $iTag . '[]">'; - foreach ($tag['values'] as $kI=>$kVal) { - $xSel = ($vDat==$kI) ? ' selected':''; - $input .= ' - <option value="'. $kI .'"'. $xSel .'>'.$kVal.'</option>'; - } - $input .= ' - </select>'; - } else { - $input = '<input type="text" name="'. $iTag .'[]" value="'. $vDat .'" size="'. $tag['sz'] .'" maxlength="'. $tag['maxsz'] .'" />'; - } - $html .= ' - <td align="center">' . $input . '</td>'; - } - $html .= ' - </tr>'; - return $html; -} - -/*! \brief Shows the current label list -* -* When the user begin or finishes an maintance action, the program -* shows the current list, in particular, the ID and the description of the label. -* -* @param $list The label object list to be displayed -* @return Nothing -*/ -function showLabelsList($list) { - $txt= //*< - array(_('Label id'),_('Description'), _('Label array'), - _('New'), _('Edit'), _('Copy'), _('Delete'), - _('Do you really want to erase the label') - ); - // The header of the list - echo '<script type="text/javascript"> - function submitForm(formID, action, value) { - document.getElementById(\'action\').name=action; - document.getElementById(\'labelID\').value=value; - document.getElementById(formID).submit(); - } - function areYouSure(form, action, value) { - var r=confirm("'.$txt[7].'"); - if (r) { - submitForm(form, action, value); - } - } - </script> - <form action="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'" method="post" id="form1" target="_self"> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <input type="hidden" name="action" id="action" value="" /> - <input type="hidden" name="labelID" id="labelID" value="" /> - </form> - <div class="centre"> - <table class="selection"> - <thead> - <tr> - <th>'.$txt[0].'</th> - <th>'.$txt[1].'</th> - <th>'.$txt[2].'</th> - <th><input type="submit" name="new" onclick="submitForm(\'form1\',\'New\',\'\');" value="'.$txt[3].'" /> - </th> - </tr> - </thead> - <tbody>'; - foreach ($list as $label) { - $dim = (string)$label->dimensions->Rows. " x ". (string)$label->dimensions->Cols; - echo ' - <tr><td>'. $label->id . '</td> - <td>'. $label->description . '</td> - <td><div class="centre">'. $dim . '</div></td> - <td><input type="submit" onclick="submitForm('. "'form1','Edit','". $label->id . "');" .'" value="' . $txt[4]. '" /> - <input type="submit" onclick="submitForm('. "'form1','Copy','". $label->id . "');" .'" value="' . $txt[5]. '" /> - <input type="submit" onclick="areYouSure('. "'form1','Delete','". $label->id . "');" .'" value="' . $txt[6]. '" /> - </td> - </tr>'; - } - echo ' - </tbody> - </table> - </div>'; -} - -/*! \brief Generates a new label -* -* After the user gives the label data, this routine tries to insert -* the new label in the current list. -* -* @param $label The object label that will replace an old one -* @return True when the update was ok -*/ -function createLabel($label) { - global $allLabels; - $new = emptyList(); - $done=false; - if ($allLabels!=null) { - foreach ($allLabels as $oldLabel) { - if (!$done AND (string)$oldLabel->id >= (string)$label->id) { - $new->addLabel($label); - $done=true; - } - $new->addLabel($oldLabel); // inser data in the list, replacing the old one - } - } - if (!$done) - $new->addLabel($label); - $allLabels = $new; - rewrite($allLabels); // rewrite it to the XML file - return true; -} - -/*! \brief Update the label data -* -* After the user modifies the label data this routine tries to update -* the corresponding structure in the label list with the object given. -* If the label with the id of the new one is found, the object could -* be accepted in the list and written to the XML file. -* -* @param $label The object label that will replace an old one -* @return True when the update was ok -*/ -function updateLabel($label) { - global $allLabels; - $new = emptyList(); - foreach ($allLabels as $oldLabel) { - if ((string)$oldLabel->id == (string)$label->id) - $new->addLabel($label); - else - $new->addLabel($oldLabel); // inser data in the list, replacing the old one - } - $allLabels = $new; - rewrite($allLabels); // rewrite it to the XML file - return true; -} - -/*! \brief Label elimination from the list. - * - * This routine eliminates one label from the global list $allLabels. It - * just find the index that correspond to the id given as input data. - * Because this function is called from the selection of a button with - * correct data, it would be unsual that some error exist, but it is - * included the code for the validation of some this strange case. - * - * @param $labelID is the identifier of the label to delete. - * @see $allLabels - * @return true in case of success - */ -function deleteLabel($list, $labelID) { - $new = emptyList(); - foreach ($list as $label) { - if ((string)$label->id!=$labelID) - $new->addLabel($label); - } - rewrite($new); - return $new; -} - -function rewrite($list) { - // First rename the previous XML file - if (is_file(LABELS_FILE) AND !rename(LABELS_FILE, LABELS_FILE.".bak")) - abortMsg(_('Could not rename the previous file.')); - $result=$list->asXML(LABELS_FILE); - if (!$result) - abortMsg(_('Could not create the new XML file.').': '.LABELS_FILE); -} - +<?php + +/* $Id: Labels.php 4950 2012-02-22 06:26:38Z daintree $*/ + +include('includes/session.inc'); +$title = _('Label Templates'); +include('includes/header.inc'); + +//define PaperSize array sizes in pdf points +$PaperSize = array('A4', + 'A4_Landscape', + 'A5', + 'A5_Landscape', + 'A3', + 'A3_Landscape', + 'Letter', + 'Letter_Landscape', + 'Legal', + 'Legal_Landscape', + '28mm_x_45mm_label'); + + +echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Label Template Maintenance') + . '" alt="" />' . $title. ' + </p>'; + +if (isset($_POST['SelectedLabelID'])){ + $SelectedLabelID =$_POST['SelectedLabelID']; + if (ctype_digit($_POST['NoOfFieldsDefined'])){ //Now Process any field updates + + for ($i=0;$i<=$_POST['NoOfFieldsDefined'];$i++){ + + if (ctype_digit($_POST['VPos' . $i]) + AND ctype_digit($_POST['HPos' . $i]) + AND ctype_digit($_POST['FontSize' . $i])){ // if all entries are integers + + $result =DB_query("UPDATE labelfields SET fieldvalue='" . $_POST['FieldName' . $i] . "', + vpos='" . $_POST['VPos' . $i] . "', + hpos='" . $_POST['HPos' . $i] . "', + fontsize='" . $_POST['FontSize' . $i] . "', + barcode='" . $_POST['Barcode' . $i] . "' + WHERE labelfieldid='" . $_POST['LabelFieldID' . $i] . "'", + $db); + } else { + prnMsg (_('Entries for Vertical Position Horizonal Position and Font Size must be integers.'),'error'); + } + } + } + if (ctype_digit($_POST['VPos']) AND ctype_digit($_POST['HPos']) AND ctype_digit($_POST['FontSize'])){ + //insert the new label field entered + $result = DB_query("INSERT INTO labelfields (labelid, + fieldvalue, + vpos, + hpos, + fontsize, + barcode) + VALUES ('" . $SelectedLabelID . "', + '" . $_POST['FieldName'] . "', + '" . $_POST['VPos'] . "', + '" . $_POST['HPos'] . "', + '" . $_POST['FontSize'] . "', + '" . $_POST['Barcode'] . "')", + $db); + } +} elseif(isset($_GET['SelectedLabelID'])){ + $SelectedLabelID =$_GET['SelectedLabelID']; + if (isset($_GET['DeleteField'])){ //then process any deleted fields + $result = DB_query("DELETE FROM labelfields WHERE labelfieldid='" . $_GET['DeleteField'] . "'",$db); + } +} + +if (isset($_POST['submit'])) { + $InputError = 0; + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + if ( trim( $_POST['Description'] ) == '' ) { + $InputError = 1; + prnMsg( _('The label description may not be empty'), 'error'); + } + $Message = ''; + if (isset($SelectedLabelID)) { + + /*SelectedLabelID could also exist if submit had not been clicked this code + would not run in this case cos submit is false of course see the + delete code below*/ + + $sql = "UPDATE labels SET papersize ='" . $_POST['PaperSize'] . "', + description = '" . $_POST['Description'] . "', + height = '" . $_POST['Height'] . "', + topmargin = '". $_POST['TopMargin'] . "', + width = '". $_POST['Width'] . "', + leftmargin = '". $_POST['LeftMargin'] . "', + rowheight = '". $_POST['RowHeight'] . "', + columnwidth = '". $_POST['ColumnWidth'] . "' + WHERE labelid = '" . $SelectedLabelID . "'"; + + $ErrMsg = _('The update of this label template failed because'); + $result = DB_query($sql,$db,$ErrMsg); + + $Message = _('The label template has been updated'); + + } elseif ($InputError !=1) { + + /*Selected label is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new label form */ + + $sql = "INSERT INTO labels (papersize, + description, + height, + topmargin, + width, + leftmargin, + rowheight, + columnwidth) + VALUES ('" . $_POST['PaperSize'] . "', + '" . $_POST['Description'] . "', + '" . $_POST['Height'] . "', + '" . $_POST['TopMargin'] . "', + '" . $_POST['Width'] . "', + '" . $_POST['LeftMargin'] . "', + '" . $_POST['RowHeight'] . "', + '" . $_POST['ColumnWidth'] . "')"; + + $ErrMsg = _('The addition of this label failed because'); + $result = DB_query($sql,$db,$ErrMsg); + $Message = _('The new label template has been added to the database'); + } + //run the SQL from either of the above possibilites + if (isset($InputError) AND $InputError !=1) { + unset( $_POST['PaperSize']); + unset( $_POST['Description']); + unset( $_POST['Width']); + unset( $_POST['Height']); + unset( $_POST['TopMargin']); + unset( $_POST['LeftMargin']); + unset( $_POST['ColumnWidth']); + unset( $_POST['RowHeight']); + + } + + prnMsg($Message); + +} elseif (isset($_GET['delete'])) { +//the link to delete a selected record was clicked instead of the submit button + + /*Cascade deletes in TaxAuthLevels */ + $result = DB_query("DELETE FROM labelfields WHERE labelid= '" . $SelectedLabelID . "'",$db); + $result = DB_query("DELETE FROM labels WHERE labelid= '" . $SelectedLabelID . "'",$db); + prnMsg(_('The selected label template has been deleted'),'success'); + unset ($SelectedLabelID); +} + +if (!isset($SelectedLabelID)) { + +/* It could still be the second time the page has been run and a record has been selected for modification - SelectedLabelID will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true and the list of label templates will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ + + $sql = "SELECT labelid, + description, + papersize, + height, + width, + topmargin, + leftmargin, + rowheight, + columnwidth + FROM labels"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The defined label templates could not be retrieved because'); + $DbgMsg = _('The following SQL to retrieve the label templates was used'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + + if (DB_num_rows($result)>0){ + echo '<br /><table class="selection"> + <tr> + <th>' . _('Description') . '</th> + <th>' . _('Page Size') . '</th> + <th>' . _('Height') . '</th> + <th>' . _('Width') . '</th> + <th>' . _('Row Height') . '</th> + <th>' . _('Column Width') . '</th> + </tr>'; + $k=0; + while ($myrow = DB_fetch_array($result)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td><a href="%sSelectedLabelID=%s">' . _('Edit') . '</a></td> + <td><a href="%sSelectedLabelID=%s&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this label?') . '\');">' . _('Delete') . '</a></td> + </tr>', + $myrow['description'], + $myrow['papersize'], + $myrow['height'], + $myrow['width'], + $myrow['rowheight'], + $myrow['columnwidth'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', + $myrow['labelid'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', + $myrow['labelid'], + $rootpath . '/LabelFields.php?', + $myrow['labelid']); + + } + //END WHILE LIST LOOP + + //end of ifs and buts! + + echo '</table><p>'; + } //end if there are label definitions to show +} + +if (isset($SelectedLabelID)) { + echo '<div class="centre"> + <a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">' . _('Review all defined label records') . '</a> + </div>'; +} + +echo '<p><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +if (isset($SelectedLabelID)) { + //editing an existing label + + $sql = "SELECT papersize, + description, + height, + width, + topmargin, + leftmargin, + rowheight, + columnwidth + FROM labels + WHERE labelid='" . $SelectedLabelID . "'"; + + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + + $_POST['PaperSize'] = $myrow['papersize']; + $_POST['Description'] = $myrow['description']; + $_POST['Height'] = $myrow['height']; + $_POST['TopMargin'] = $myrow['topmargin']; + $_POST['Width'] = $myrow['width']; + $_POST['LeftMargin'] = $myrow['leftmargin']; + $_POST['RowHeight'] = $myrow['rowheight']; + $_POST['ColumnWidth'] = $myrow['columnwidth']; + + echo '<input type="hidden" name="SelectedLabelID" value="' . $SelectedLabelID . '" />'; + +} //end of if $SelectedLabelID only do the else when a new record is being entered + + +if (!isset($_POST['Description'])) { + $_POST['Description']=''; +} +echo '<table class="selection"> + <tr> + <td><table style="background: transparent"><tr><th><img src="css/paramsLabel.png"></th></tr></table></td> + <th><table style="background: transparent"> + <tr> + <td>' . _('Label Description') . ':</td> + <td><input type="text" name="Description" size="21" maxlength="20" value="' . $_POST['Description'] . '" /></td> + </tr> + <tr> + <td>' . _('Label Paper Size') . ':</td> + <td><select name="PaperSize">'; + +foreach($PaperSize as $PaperType) { + if (isset($_POST['PaperSize']) AND $PaperType==$_POST['PaperSize']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $PaperType . '">' . $PaperType . '</option>'; + +} //end while loop + +echo '</select></td> + </tr>'; + +if (!isset($_POST['Height'])) { + $_POST['Height']=0; +} +if (!isset($_POST['TopMargin'])) { + $_POST['TopMargin']=5; +} +if (!isset($_POST['Width'])) { + $_POST['Width']=0; +} +if (!isset($_POST['LeftMargin'])) { + $_POST['LeftMargin']=10; +} +if (!isset($_POST['RowHeight'])) { + $_POST['RowHeight']=0; +} + +if (!isset($_POST['ColumnWidth'])) { + $_POST['ColumnWidth']=0; +} +echo '<tr> + <td>' . _('Label Height') . ' - (He):</td> + <td><input type="text" name="Height" size="4" maxlength="4" value="' . $_POST['Height'] . '" /></td> + </tr> + <tr> + <td>' . _('Label Width') . ' - (Wi):</td> + <td><input type="text" name="Width" size="4" maxlength="4" value="' . $_POST['Width'] . '" /></td> + </tr> + <tr> + <td>' . _('Top Margin') . ' - (Tm):</td> + <td><input type="text" name="TopMargin" size="4" maxlength="4" value="' . $_POST['TopMargin'] . '" /></td> + </tr> + <tr> + <td>' . _('Left Margin') . ' - (Lm):</td> + <td><input type="text" name="LeftMargin" size="4" maxlength="4" value="' . $_POST['LeftMargin'] . '" /></td> + </tr> + <tr> + <td>' . _('Row Height') . ' - (Rh):</td> + <td><input type="text" name="RowHeight" size="4" maxlength="4" value="' . $_POST['RowHeight'] . '" /></td> + </tr> + <tr> + <td>' . _('Column Width') . ' - (Cw):</td> + <td><input type="text" name="ColumnWidth" size="4" maxlength="4" value="' . $_POST['ColumnWidth'] . '" /></td> + </tr> + </table></td></tr> + </td></tr> + </table>'; + +if (isset($SelectedLabelID)) { + //get the fields to show + $SQL = "SELECT labelfieldid, + labelid, + fieldvalue, + vpos, + hpos, + fontsize, + barcode + FROM labelfields + WHERE labelid = '" . $SelectedLabelID . "' + ORDER BY vpos DESC"; + $ErrMsg = _('Could note get the label fields because'); + $result = DB_query($SQL,$db,$ErrMsg); + $i=0; + echo '<table class="selection"> + <tr> + <td><table style="background: transparent"><tr><th><img src="css/labelsDim.png"></th></tr></table></td> + <td valign="top"><table style="background: transparent;"> + <tr> + <th>' . _('Field') . '</th> + <th>' . _('Vertical') . '<br />' . _('Position') . '<br />(VPos)</th> + <th>' . _('Horizonal') . '<br />' . _('Position') . '<br />(HPos)</th> + <th>' . _('Font Size') . '</th> + <th>' . _('Bar-code') . '</th> + </tr>'; + if (DB_num_rows($result)>0){ + $k=0; + while ($myrow = DB_fetch_array($result)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + echo '<input type="hidden" name="LabelFieldID' . $i . '" value="' . $myrow['labelfieldid'] . '" /> + <td><select name="FieldName' . $i . '">'; + if ($myrow['fieldvalue']=='itemcode'){ + echo '<option selected="selected" value="itemcode">' . _('Item Code') . '</option>'; + } else { + echo '<option value="itemcode">' . _('Item Code') . '</option>'; + } + if ($myrow['fieldvalue']=='itemdescription'){ + echo '<option selected="selected" value="itemdescription">' . _('Item Description') . '</option>'; + } else { + echo '<option value="itemdescription">' . _('Item Descrption') . '</option>'; + } + if ($myrow['fieldvalue']=='barcode'){ + echo '<option selected="selected" value="barcode">' . _('Item Barcode') . '</option>'; + } else { + echo '<option value="barcode">' . _('Item Barcode') . '</option>'; + } + if ($myrow['fieldvalue']=='price'){ + echo '<option selected="selected" value="price">' . _('Price') . '</option>'; + } else { + echo '<option value="price">' . _('Price') . '</option>'; + } + echo '</select></td> + <td><input type="text" name="VPos' . $i . '" size="4" maxlength="4" value="' . $myrow['vpos'] . '" /></td> + <td><input type="text" name="HPos' . $i . '" size="4" maxlength="4" value="' . $myrow['hpos'] . '" /></td> + <td><input type="text" name="FontSize' . $i . '" size="4" maxlength="4" value="' . $myrow['fontsize'] . '" /></td> + <td><select name="Barcode' . $i . '">'; + if ($myrow['barcode']==0){ + echo '<option selected="selected" value="0">' . _('No') . '</option> + <option value="1">' . _('Yes') . '</option>'; + } else { + echo '<option selected="selected" value="1">' . _('Yes') . '</option> + <option value="0">' . _('No') . '</option>'; + } + echo '</select></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?SelectedLabelID=' . $SelectedLabelID . '&DeleteField=' . $myrow['labelfieldid'] .' onclick="return confirm(\'' . _('Are you sure you wish to delete this label field?') . '\');">' . _('Delete') . '</a></td> + </tr>'; + $i++; + } + //END WHILE LIST LOOP + $i--; //last increment needs to be wound back + + } //end if there are label definitions to show + echo '<input type="hidden" name="NoOfFieldsDefined" value="' . $i . '" />'; + + echo '<tr> + <td><select name="FieldName"> + <option value="itemcode">' . _('Item Code') . '</option> + <option value="itemdescription">' . _('Item Descrption') . '</option> + <option value="barcode">' . _('Item Barcode') . '</option> + <option value="price">' . _('Price') . '</option> + </select></td> + <td><input type="text" size="4" maxlength="4" name="VPos" /></td> + <td><input type="text" size="4" maxlength="4" name="HPos" /></td> + <td><input type="text" size="4" maxlength="4" name="FontSize" /></td> + <td><select name="Barcode"> + <option value="1">' . _('Yes') . '</option> + <option selected="selected" value="0">' . _('No') . '</option> + </select></td> + </tr> + </table> + </td> + </tr> + </table> + <p />'; +} + +echo '<br /> + <div class="centre"> + <button type="submit" name="submit">' . _('Enter Information') . '</button> + </div><br /> + </form>'; + +include('includes/footer.inc'); + ?> \ No newline at end of file Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2012-05-01 14:15:40 UTC (rev 8759) +++ trunk/PDFPrintLabel.php 2012-05-01 15:16:51 UTC (rev 8760) @@ -1,513 +1,313 @@ <?php +/* $Id: PDFPriceLabels.php 5228 2012-04-06 02:48:00Z vvs2012 $*/ -/* $Id: PDFPrintLabel.php 4285 2010-12-22 16:01:51Z tim_schofield $*/ - -$Version_adds= '1.2'; - include('includes/session.inc'); -require_once('includes/DefineLabelClass.php'); -$MsgErr=null; -$DecimalPlaces=2; -$pdf= null; +$PtsPerMM = 2.83465; //pdf points per mm - $AllLabels = //!< The variable $AllLabels is the global variable that contains the list - getXMLFile(LABELS_FILE); //!< of all the label objects defined until now. In case of a fresh - //!< installation or an empty XML labels file it holds a NULL value. -// If there is no label templates, the user could select to set up a new one -if ($AllLabels==null) { - abortMsg( _('There isn\'t any label template to select for printing. Click') . - ' <a href="Labels.php"><b>' . _('HERE'). '</b></a> '. _('to set up a new one') ); -} +if (isset($_POST['ShowLabels']) + AND isset($_POST['FromCriteria']) + AND mb_strlen($_POST['FromCriteria'])>=1 + AND isset($_POST['ToCriteria']) + AND mb_strlen($_POST['ToCriteria'])>=1){ -/** - * The option print was selected, first it is checked if there are enough data - * to print the labels. - */ -if (isset($_POST['PrintPDF']) OR isset($_POST['PDFTest']) ) { - if (!isset($_POST['QtyByItem']) OR (int)$_POST['QtyByItem']<1) - $MsgErr = _('You must specify the number of labels per item required'); - else { - if (count($_POST['StockID'])<1) - $MsgErr = _('You must select the items to be printed'); - else { - // - $label = $AllLabels->getLabel($_POST['LabelID']); - list($dimensions, $lines) = resizeLabel($label); - $formatPage = getPageDimensions($dimensions); - list($Page_Width, - $Page_Height, - $Top_Margin, - $Bottom_Margin, - $Left_Margin, - $Right_Margin) = $formatPage; + $title = _('Print Labels'); + include('includes/header.inc'); - // Do it! - $PaperSize = 'User_special'; // Don't use any of the predefined sizes - $DocumentPaper='LETTER'; - $DocumentOrientation='P'; // Correccion para la version trunk :( - include('includes/PDFStarter.php'); - if (mb_substr($_SESSION['VersionNumber'],0,1)>=4) { - $pdf->setPageFormat($formatPage); - } - $ok = printLabels( - $dimensions, - $lines, - intval($_POST['QtyByItem']), - $_POST['Currency'], - $_POST['SalesType'], - $_POST['StockID'], - FormatDateForSQL($_POST['EffectiveDate'])); + $SQL = "SELECT prices.stockid, + stockmaster.description, + stockmaster.barcode, + prices.price, + currencies.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + INNER JOIN prices + ON stockmaster.stockid=prices.stockid + INNER JOIN currencies + ON prices.currabrev=currencies.currabrev + WHERE stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' + AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + AND prices.typeabbrev='" . $_POST['SalesType'] . "' + AND prices.currabrev='" . $_POST['Currency'] . "' + AND prices.startdate<='" . FormatDateForSQL($_POST['EffectiveDate']) . "' + AND (prices.enddate='0000-00-00' OR prices.enddate>'" . FormatDateForSQL($_POST['EffectiveDate']) . "') + AND prices.debtorno='' + ORDER BY prices.currabrev, + stockmaster.categoryid, + stockmaster.stockid, + prices.startdate"; - if ($ok) - exit(); // the print was success - else // Has been ocurred an error - $MsgErr = _('There was an error. Consult your IT staff'); + $LabelsResult = DB_query($SQL,$db,'','',false,false); + + if (DB_error_no($db) !=0) { + prnMsg( _('The Price Labels could not be retrieved by the SQL because'). ' - ' . DB_error_msg($db), 'error'); + echo '<br /><a href="' .$rootpath .'/index.php">'. _('Back to the menu'). '</a>'; + if ($debug==1){ + prnMsg(_('For debugging purposes the SQL used was:') . $SQL,'error'); } + include('includes/footer.inc'); + exit; } -} - -/** - * There is not activated option print, then show the window for capture the printing - * options. - */ - -$title = _('Print Price Labels'); -include('includes/header.inc'); - -if ($MsgErr!=null) { - prnMsg($MsgErr,'warn'); -} - -showLabelOptions(); - -include('includes/footer.inc'); -exit(); - -function showLabelOptions() { - global $AllLabels, $DecimalPlaces, $rootpath, $theme; - $txt = array( - _('Label Sticker Printing'), - _('Select label type'), - _('Number of labels per item'), - _('Price list'), - _('Currency'), - _('Category'), - _('Effective Date'), - _('Update values') - ); - if (!isset($_POST['LabelID'])) - $_POST['LabelID']=(string)$AllLabels->label[0]->id; - $OptionLabels = selLabels($_POST['LabelID']); - if (!isset($_POST['QtyByItem'])) - $_POST['QtyByItem']=1; - if (!isset($_POST['SalesType'])) - $_POST['SalesType']=$_SESSION['DefaultPriceList']; - $OptionSales = selSalesType($_POST['SalesType']); - - if (!isset($_POST['Currency'])){ - $_POST['Currency']=$_SESSION['CompanyRecord']['currencydefault']; + if (DB_num_rows($LabelsResult)==0){ + prnMsg(_('There were no price labels to print out for the category specified'),'warn'); + echo '<br /><a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'. _('Back').'</a>'; + include('includes/footer.inc'); + exit; } - $DecimalPlaces=getDecimalPlaces($_POST['Currency']); - $OptionCurrency = selCurrency($_POST['Currency']); - if (!isset($_POST['Category'])) - $_POST['Category']=''; - $OptionsCategory = selCategory($_POST['Category']); - $TableItems = tableItems($_POST['Category'], $okItems); - - if (!isset($_POST['EffectiveDate'])){ - $_POST['EffectiveDate']=Date($_SESSION['DefaultDateFormat']); - } - - $SendButton = '<br /><div class="centre"><input type="submit" name="PrintPDF" value="'. _('Print labels') .'" /> - <input type="submit" name="PDFTest" value="'. _('Print labels with borders') .'" /></div>'; - $iTxt=0; - - echo "<script type=\"text/javascript\"> - function setAll(all) { - var x=document.getElementById('form1'); - for (var i=0;i<x.length;i++) { - if (x.elements[i].id=='item'); - x.elements[i].checked=all.checked; - } - } - </script>"; - - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' .$txt[$iTxt++].'</p>'; - echo '<form name ="form1" action="'.htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8').'" method="post" id="form1">'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection">'; - echo '<tbody>'; - echo '<tr> - <td class="number">'.$txt[$iTxt++].':</td> - <td><select name="LabelID">'. - $OptionLabels - .'</select></td> - </tr>'; - echo '<tr> - <td class="number">'.$txt[$iTxt++].':</td> - <td><input type="text" class="number" name="QtyByItem" value="'.$_POST['QtyByItem'].'" size="2" maxlength="4" /></td> - </tr>'; - echo '<tr> - <td class="number">'.$txt[$iTxt++].':</td> - <td><select name="SalesType" onChange="ReloadForm(form1.refresh)"> - '.$OptionSales.' - </select></td> + echo '<table class="selection"> + <tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Print') . ' ?</th> </tr>'; - echo '<td class="number">'.$txt[$iTxt++].':</td> - <td><select name="Currency" onChange="ReloadForm(form1.refresh)"> - '.$OptionCurrency.' - </select></td> + $i=0; + while ($LabelRow = DB_fetch_array($LabelsResult)){ + echo '<tr> + <td>' . $LabelRow['stockid'] . '</td> + <td>' . $LabelRow['description'] . '</td> + <td class="number">' . locale_number_format($LabelRow['price'],$LabelRow['decimalplaces']) . '</td> + <td><input type="checkbox" checked="checked" name="PrintLabel' . $i .'" /></td> </tr>'; - echo '<tr> - <td class="number">'.$txt[$iTxt++].':</td> - <td><select name="Category" onChange="ReloadForm(form1.refresh)"> - '.$OptionsCategory.' - </select> </td> - </tr>'; - echo '<tr><td class="number">'.$txt[$iTxt++].':</td> - <td><input type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="EffectiveDate" size="11" maxlength="10" value="' . $_POST['EffectiveDate'] . '" /></td> - </tr>'; - echo '<tr> - <th colspan="2"> - <input type="submit" name="refresh" value="Refresh options" /> - </th>'; - echo '<tr> - <td colspan="2"> - '.$TableItems.' - </td> - </tr>'; - - echo '</tbody> - </table> - '.$SendButton.' - </form>'; + echo '<input type="hidden" name="StockID' . $i . '" value="' . $LabelRow['stockid'] . '" /> + <input type="hidden" name="Description' . $i . '" value="' . $LabelRow['description'] . '" /> + <input type="hidden" name="Barcode' . $i . '" value="' . $LabelRow['barcode'] . '" /> + <input type="hidden" name="Price' . $i . '" value="' . locale_number_format($LabelRow['price'],$LabelRow['decimalplaces']) . '" />'; + $i++; + } + $i--; + echo '</table> + <input type="hidden" name="NoOfLabels" value="' . $i . '" /> + <input type="hidden" name="LabelID" value="' . $_POST['LabelID'] . '" /> + <br /> + <div class="centre"> + <input type="submit" name="PrintLabels" value="'. _('Print Labels'). '" /> + </div> + </form>'; + exit; } +if (isset($_POST['PrintLabels']) + AND isset($_POST['NoOfLabels'])) { -function selLabels($type) { - global $AllLabels; - $list=array(); + $result = DB_query("SELECT papersize, + description, + width*" . $PtsPerMM . " as label_width, + height*" . $PtsPerMM . " as label_height, + rowheight*" . $PtsPerMM . " as label_rowheight, + columnwidth*" . $PtsPerMM . " as label_columnwidth, + topmargin*" . $PtsPerMM . " as label_topmargin, + leftmargin*" . $PtsPerMM . " as label_leftmargin + FROM labels + WHERE labelid='" . $_POST['LabelID'] . "'", + $db); + $LabelDimensions = DB_fetch_array($result); + $PaperSize = $LabelDimensions['papersize']; + include('includes/PDFStarter.php'); + $Top_Margin = $LabelDimensions['label_topmargin']; + $Left_Margin = $LabelDimensions['label_leftmargin']; - foreach ($AllLabels->label as $label) - $list[(string)$label->id] = (string)$label->description; + $pdf->addInfo('Title', $LabelDimensions['description'] . ' ' . _('Price Labels') ); + $pdf->addInfo('Subject', $LabelDimensions['description'] . ' ' . _('Price Labels') ); - return selectOptions($list, $type); -} + $result = DB_query("SELECT fieldvalue, + vpos, + hpos, + fontsize, + barcode + FROM labelfields + WHERE labelid = '" . $_POST['LabelID'] . "'", + $db); + $LabelFields = array(); + $i=0; + while ($LabelFieldRow = DB_fetch_array($result)){ + if ($LabelFieldRow['fieldvalue'] == 'itemcode'){ + $LabelFields[$i]['FieldValue'] = 'stockid'; + } elseif ($LabelFieldRow['fieldvalue'] == 'itemdescription'){ + $LabelFields[$i]['FieldValue'] = 'description'; + } else { + $LabelFields[$i]['FieldValue'] = $LabelFieldRow['fieldvalue']; + } + $LabelFields[$i]['VPos'] = $LabelFieldRow['vpos']*$PtsPerMM; + $LabelFields[$i]['HPos'] = $LabelFieldRow['hpos']*$PtsPerMM; + $LabelFields[$i]['FontSize'] = $LabelFieldRow['fontsize']; + $LabelFields[$i]['Barcode'] = $LabelFieldRow['barcode']; + $i++; + } -function selSalesType($type) { - return selectTable("SELECT typeabbrev, sales_type FROM salestypes ORDER BY sales_type", $type); -} + $style = array( + 'position' => '', + 'align' => 'C', + 'stretch' => false, + 'fitwidth' => true, + 'cellfitalign' => '', + 'border' => false, + 'hpadding' => 'auto', + 'vpadding' => 'auto', + 'fgcolor' => array(0,0,0), + 'bgcolor' => false, //array(255,255,255), + 'text' => false, + 'font' => 'helvetica', + 'fontsize' => 8, + 'stretchtext' => 4 ); -function selCurrency($curr) { - return selectTable("SELECT currabrev, currency FROM currencies", $curr); -} + $PageNumber=1; + //go down first then accross + $YPos = $Page_Height - $Top_Margin; //top of current label + $XPos = $Left_Margin; // left of current label -function selCategory(&$categ) { - return selectTable("SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription", $categ); -} + for ($i=0;$i <= $_POST['NoOfLabels'];$i++){ + if ($_POST['PrintLabel'.$i]=='on'){ -function selectTable($sql, &$currentKey) { - global $db; - $result = DB_query($sql, $db); - while ($myrow=DB_fetch_row($result)) { - if (empty($currentKey)) - $currentKey=$myrow[0]; - $list[$myrow[0]] = $myrow[1]; - } - DB_free_result($result); - return selectOptions($list, $currentKey); -} + foreach ($LabelFields as $Field){ + //print_r($Field); -function selectOptions($list, $currentKey) { - $html=''; - foreach ($list as $key=>$value) { - $xs = ($currentKey==$key) ? " selected":""; - $html .= ' - <option value="'. $key .'"'. $xs .'>'. $value. '</option>'; - } - return $html; -} + if ($Field['FieldValue']== 'price'){ + $Value = $_POST['Price' . $i]; + } elseif ($Field['FieldValue']== 'stockid'){ + $Value = $_POST['StockID' . $i]; + } elseif ($Field['FieldValue']== 'description'){ + $Value = $_POST['Description' . $i]; + } elseif ($Field['FieldValue']== 'barcode'){ + $Value = $_POST['Barcode' . $i]; + } + if ($Field['FieldValue'] == 'price'){ //need to format for the number of decimal places + $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos'],$Field['FontSize'],$_POST['Price' . $i],'center'); + } elseif($Field['Barcode']==1) { -function tableItems($CategoryID, &$ok) { - global $db, $DecimalPlaces; + /* write1DBarcode($code, $type, $x='', $y='', $w='', $h='', $xres='', $style='', $align='') + * Note that the YPos for this function is based on the opposite origin for the Y axis i.e from the bottom not from the top! + */ - if (empty($CategoryID)) { - $ok=false; - return noneButton( _('Select a Category') ); - } - $result = getStockItems($CategoryID, $_POST['Currency'], $_POST['SalesType'], FormatDateForSQL($_POST['EffectiveDate'])); - if (!DB_num_rows($result)) { - $ok=false; - return noneButton( _('This category has no items to show') ); - } + $pdf->write1DBarcode(str_replace('_','',$Value), 'C128',$XPos+$Field['HPos'],$Page_Height - $YPos+$LabelDimensions['label_height']-$Field['VPos']-$Field['FontSize'],$LabelDimensions['label_width']-$Field['HPos'], $Field['FontSize'], 0.4, $style, 'N'); + } else { + $LeftOvers = $pdf->addTextWrap($XPos+$Field['HPos'],$YPos-$LabelDimensions['label_height']+$Field['VPos'],$LabelDimensions['label_width']-$Field['HPos']-20,$Field['FontSize'],$Value); + } + } // end loop through label fields + //setup $YPos and $XPos for the next label + if (($YPos - $LabelDimensions['label_rowheight']) < $LabelDimensions['label_height']){ + /* not enough space below the above label to print a new label + * so the above was the last label in the column + * need to start either a new column or new page + */ + if (($Page_Width - $XPos - $LabelDimensions['label_columnwidth']) < $LabelDimensions['label_width']) { + /* Not enough space to start a new column so we are into a new page + */ + $pdf->newPage(); + $PageNumber++; + $YPos = $Page_Height - $Top_Margin; //top of next label + $XPos = $Left_Margin; // left of next label + } else { + /* There is enough space for another column */ + $YPos = $Page_Height - $Top_Margin; //back to the top of next label column + $XPos += $LabelDimensions['label_columnwidth']; // left of next label + } + } else { + /* There is space below to print a label + */ + $YPos -= $LabelDimensions['label_rowheight']; //Top of next label + } + } //this label is set to print + } //loop through labels selected to print - $txt=array( - _('Code'), _('Description'), _('Price').'<br />('.$_POST['Currency'].')', - _('All') - ); - $ix=0; - // The table's header - $html= '<table border="0" width="100%"> - <thead> - <tr> - <th>'.$txt[$ix++].'</th> - <th>'.$txt[$ix++].'</th> - <th>'.$txt[$ix++].'</th> - <th colspan="2" align="center">'.$txt[$ix++].' - <input type="checkbox" checked="True" onclick="setAll(this);" /> - </th> - </tr> - </thead> - <tbody>'; - $ok=true; - $odd=true; - while ($myrow=DB_fetch_array($result)) { - $price = locale_money_format($myrow['price'],$_POST['Currency']); - $oddEven=$odd?'Odd':'Even'; - $odd = !$odd; - $html .= '<tr class="'.$oddEven.'TableRows"> - <td>'.$myrow['stockid'].'</td> - <td>'.$myrow['description'].'</td> - <td class="number">'.$price.'</td> - <td><div class="centre"> - <input type="checkbox" checked="True" name="StockID['.$myrow['stockid'].']" id="item" /> - </div> - </td> - <td> </td> - </tr>'; - } - return $html . ' - </tbody> - </table> - </div>'; -} + $FileName=$_SESSION['DatabaseName']. '_' . _('Price_Labels') . '_' . date('Y-m-d').'.pdf'; + ob_clean(); + $pdf->OutputD($FileName); + $pdf->__destruct(); -function noneButton($msg) { - return ' - <div class="centre"> - <input type="button" disabled name="None" value="'. $msg . '" /> - </div>'; -} +} else { /*The option to print PDF was not hit */ -/** - * This access to item data includes its price. - * The routine works in two contexts: when only the category is given - * it looks for all the items - */ -function getStockItems($CategoryID, $CurrCode, $SalesType, $EffectiveDate, $StockID=false) { - global $db, $Today; - if ($StockID!==false) { - $WhereClause = "stockmaster.stockid='$StockID' LIMIT 1"; - } else { - $WhereClause = "stockmaster.categoryid='$CategoryID' ORDER BY stockmaster.stockid"; - } + $title= _('Price Labels'); + include('includes/header.inc'); - $WhereClause = " stockmaster.discontinued!=1 AND " . $WhereClause; + echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Price Labels') . '" alt="" /> + ' . ' ' . _('Print Price Labels') . '</p>'; - $sql="SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.longdescription, - stockmaster.barcode, - prices.price - FROM stockmaster LEFT JOIN prices ON stockmaster.stockid=prices.stockid - AND prices.currabrev = '" . $CurrCode . "' - AND prices.typeabbrev= '" . $SalesType . "' - AND prices.startdate <= '" . $EffectiveDate . "' - AND (prices.enddate >= '" . $EffectiveDate . "' OR prices.enddate='0000-00-00') - AND prices.debtorno='' - WHERE " . $WhereClause; + if (!isset($_POST['FromCriteria']) OR !isset($_POST['ToCriteria'])) { - return DB_query($sql, $db); -} + /*if $FromCriteria is not set then show a form to allow input */ -function getStockData($StockID, $Currency, $salesType, $EffectiveDate) { - $result = getStockItems(null, $Currency, $salesType, $EffectiveDate, $StockID); - return DB_fetch_array($result); -} + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; + echo '<tr> + <td>' . _('Label to print') . ':</td> + <td><select name="LabelID">'; -/** - * Change de scale of data given by points - * Returns two array for the dimension and lines of data - */ -function resizeLabel($label) { - global $DimensionTags, $DataTags; + $LabelResult = DB_query("SELECT labelid, description FROM labels",$db); + while ($LabelRow = DB_fetch_array($LabelResult)){ + echo '<option value="' . $LabelRow['labelid'] . '">' . $LabelRow['description'] . '</option>'; + } + echo '</select></td> + </tr> + <tr> + <td>'. _('From Inventory Category Code') .':</td> + <td><select name="FromCriteria">'; - //<* Values required from the beggining - $scales=array('pt'=>1, 'in'=>72, 'mm'=>(float)72/25.4, 'cm'=>(float)72/2.54); + $CatResult= DB_query("SELECT categoryid, categorydescription FROM stockcategory ORDER BY categoryid",$db); + while ($myrow = DB_fetch_array($CatResult)){ + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; + } + echo '</select></td></tr>'; - $obj = $label->dimensions; - $unit = (string)$obj->Unit; - if ( array_key_exists($unit , $scales) ) - $factor = $scales[$unit]; - else - abortMsg( _('Unit not defined in scale operation! Correct the template') ); + echo '<tr><td>' . _('To Inventory Category Code'). ':</td> + <td><select name="ToCriteria">'; - $dims = array(); - foreach ($DimensionTags as $iTag=>$tag) { - if ($tag['type']=='n') // it is a data numeric - $dims[$iTag] = round(((float)$obj->$iTag)*$factor, 3); - elseif ($tag['type']=='i') - $dims[$iTag] = (int)$obj->$iTag; - } + /*Set the index for the categories result set back to 0 */ + DB_data_seek($CatResult,0); - $obj = $label->data; - $line = array(); - $i=0; - foreach ($obj->line as $labelLine) { - $line[$i] = array(); - foreach ($DataTags as $iTag=>$tag) { - if ($tag['type']=='n') // it is a data numeric - $line[$i][$iTag]= round(((float)$labelLine->$iTag)*$factor, 3); - else - $line[$i][$iTag]=(string)$labelLine->$iTag; // field to use in printing data + While ($myrow = DB_fetch_array($CatResult)){ + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; } - $i++; - } - return array($dims, $line); -} + echo '</select></td></tr>'; -/** - * Returns the following data: - * $Page_Width, - * $Page_Height, - * $Top_Margin, - * $Bottom_Margin, - * $Left_Margin, - * $Right_Margin - */ -function getPageDimensions($dimensions) { - $bm =(float)$dimensions['Sh'] - ( (float)$dimensions['Tm'] + - (int)$dimensions['Rows']*(float)$dimensions['He']); - $rm =(float)$dimensions['Sw'] - ( (float)$dimensions['Lm'] + - (int)$dimensions['Cols']*(float)$dimensions['Wi']); - return array( - (float)$dimensions['Sw'], - (float)$dimensions['Sh'], - (float)$dimensions['Tm'], 0, -// ($bm>0?$bm:0), - (float)$dimensions['Lm'], 0 -// ($rm>0?$rm:0) - ); -} + echo '<tr><td>' . _('For Sales Type/Price List').':</td> + <td><select name="SalesType">'; + $sql = "SELECT sales_type, typeabbrev FROM salestypes"; + $SalesTypesResult=DB_query($sql,$db); -function printLabels($dimensions, $lines, $qtyByItem, $Currency, $salesType, $StockIDList, $EffectiveDate) { - global $pdf, $DecimalPlaces, $Version; - $row = $col = 0; + while ($myrow=DB_fetch_array($SalesTypesResult)){ + if ($_SESSION['DefaultPriceList']==$myrow['typeabbrev']){ + echo '<option selected="selected" value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + } else { + echo '<option value="' . $myrow['typeabbrev'] . '">' . $myrow['sales_type'] . '</option>'; + } + } + echo '</select></td></tr>'; - $DecimalPlaces=getDecimalPlaces($Currency); + echo '<tr><td>' . _('For Currency').':</td> + <td><select name="Currency">'; + $sql = "SELECT currabrev, country, currency FROM currencies"; + $CurrenciesResult=DB_query($sql,$db); - foreach ($StockIDList as $StockID=>$on) { // At least there is one item - $itemData = getStockData($StockID, $Currency, $salesType, $EffectiveDate); - $num=$qtyByItem; - while ($num-- > 0) { // Print $num labels per item - printStockid($itemData, $dimensions, $lines, $Currency, $row, $col); - if (++$col>=$dimensions['Cols']) { - $col=0; - if (++$row>=$dimensions['Rows']) { - $row=0; - $pdf->newpage(); - } + while ($myrow=DB_fetch_array($CurrenciesResult)){ + if ($_SESSION['CompanyRecord']['currencydefault']==$myrow['currabrev']){ + echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' - ' .$myrow['currency'] . '</option>'; + } else { + echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' - ' .$myrow['currency'] . '</option>'; } } - } - /* if ($row OR $col) // it seems to be unnecesary. - $pdf->newpage(); */ + echo '</select></td></tr>'; - // now, emit the PDF file (if not errors!) - if (mb_substr($_SESSION['VersionNumber'],0,1)>=4) { - $pdf->OutputD($_SESSION['DatabaseName'] . '_Labels_' . date('Y-m-d') . '.pdf');//UldisN - $pdf->__destruct(); //UldisN - } else { - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); + echo '<tr><td>' . _('Effective As At') . ':</td>'; + echo '<td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />'; + echo '</td></tr>'; - if ($len<=20){ - return false; - } else{ - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename=Labels.pdf'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); + echo '</table> + <br /> + <div class="centre"> + <button type="submit" name="ShowLabels">'. _('Print Labels'). '</button> + </div> + </form>'; - $pdf->Stream(); - } } - return true; // All fine!! -} + include('includes/footer.inc'); -/*! \brief The heart of the program (perhaps the liver) - * - * It shows the data label from the input $data as update data (id read only) - * if the third parameter is true or a fresh data label (new label). It is - * possible that the combination $data valid and $readonly false occurs when - * invalid data needs to be recaptured because an error in a new label capture. - */ -function printStockid($itemData, $labelDim, $dataParams, $Currency, $row, $col) { - global $pdf, $DecimalPlaces; -//echo $row.':'.$col.'<br />'; - // Calculate the bottom left corner position - $iX = $labelDim['Lm'] + $col * $labelDim['Cw']; - $iY = $labelDim['Sh'] - ($labelDim['Tm'] + ($row+1) * $labelDim['Rh']); +} /*end of else not PrintPDF */ - if (isset($_POST['PDFTest'])) { - $pdf->line($iX, $iY+$labelDim['He'], $iX+$labelDim['Wi'], $iY+$labelDim['He']); // top - $pdf->line($iX, $iY, $iX+$labelDim['Wi'], $iY); // bottom - $pdf->line($iX, $iY, $iX, $iY+$labelDim['He']); // left - $pdf->line($iX+$labelDim['Wi'], $iY, $iX+$labelDim['Wi'], $iY+$labelDim['He']); - } - // Now, for every data, write down the correspondig text - $descrip= $ldescrip=''; - foreach ($dataParams as $line) { - unset($resid); // unlink the previous residue - unset($txt); - $adj='left'; - switch ($line['dat']) { - case 'code': - $txt = $itemData['stockid']; - break; - c... [truncated message content] |
From: <tim...@us...> - 2012-05-01 17:37:20
|
Revision: 8761 http://weberp.svn.sourceforge.net/weberp/?rev=8761&view=rev Author: tim_schofield Date: 2012-05-01 17:37:13 +0000 (Tue, 01 May 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/PDFDIFOT.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPrintLabel.php trunk/PDFRemittanceAdvice.php trunk/PDFStockCheckComparison.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/PDFStockTransfer_departments.php trunk/PDFSuppTransListing.php trunk/includes/IndexArray.php Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFDIFOT.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -83,8 +83,8 @@ </table> <br /> <div class="centre"> - <input type="submit" name="Go" value="' . _('Create PDF') . '" /> - </div>'; + <button type="submit" name="Go">' . _('Create PDF') . '</button> + </div><br />'; if ($InputError==1){ prnMsg($msg,'error'); Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFLowGP.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -141,7 +141,7 @@ <td><input type="text" class="number" name="GPMin" maxlength="6" size="6" value="' . locale_number_format($_POST['GPMin'],2) . '" /> %</td> </tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; } include('includes/footer.inc'); Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFOrderStatus.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -64,7 +64,7 @@ echo '<tr><td>' . _('Back Order Only') . ':</td><td><select name="BackOrders">'; echo '<option selected="True" value="Yes">' . _('Only Show Back Orders') . '</option>'; echo '<option value="No">' . _('Show All Orders') . '</option>'; - echo '</select></td></tr></table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; + echo '</select></td></tr></table><br /><div class="centre"><button type="submit" name="Go">' . _('Create PDF') . '</button></div><br />'; include('includes/footer.inc'); exit; Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFOrdersInvoiced.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -73,7 +73,7 @@ } echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="Go">' . _('Create PDF') . '</button></div><br />'; include('includes/footer.inc'); exit; Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFPeriodStockTransListing.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -71,7 +71,7 @@ } echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="Go">' . _('Create PDF') . '</button></div><br />'; include('includes/footer.inc'); exit; Modified: trunk/PDFPickingList.php =================================================================== --- trunk/PDFPickingList.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFPickingList.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -37,7 +37,7 @@ } echo '</select></td></tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Print Picking Lists') . '" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="Process">' . _('Print Picking Lists') . '</buton></div><br /></form>'; include('includes/footer.inc'); exit(); } Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFPrintLabel.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -86,8 +86,8 @@ <input type="hidden" name="LabelID" value="' . $_POST['LabelID'] . '" /> <br /> <div class="centre"> - <input type="submit" name="PrintLabels" value="'. _('Print Labels'). '" /> - </div> + <button type="submit" name="PrintLabels">'. _('Print Labels'). '</button> + </div><br /> </form>'; exit; } Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFRemittanceAdvice.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -135,6 +135,8 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print Transfer Note') . '" alt="" />' . ' ' . $title.'</p><br />'; + if (!isset($_POST['FromCriteria']) or mb_strlen($_POST['FromCriteria'])<1){ $DefaultFromCriteria = '1'; } else { @@ -145,7 +147,7 @@ } else { $DefaultToCriteria = $_POST['ToCriteria']; } - echo '<tr><td>' . _('From Supplier Code') . ':</font></td> + echo '<table class="selection"><tr><td>' . _('From Supplier Code') . ':</font></td> <td><input type="text" maxlength="6" size="7" name="FromCriteria" value="' . $DefaultFromCriteria . '" /></td></tr>'; echo '<tr><td>' . _('To Supplier Code') . ':</td> <td><input type="text" maxlength="6" size="7" name="ToCriteria" value="' . $DefaultToCriteria . '" /></td></tr>'; @@ -159,7 +161,7 @@ echo '<tr><td>' . _('Date Of Payment') . ':</td> <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="PaymentDate" maxlength="11" size="12" value="' . $DefaultDate . '" /></td></tr>'; - echo '</table><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div></form>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div></form><br />'; include ('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFStockCheckComparison.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -350,7 +350,7 @@ echo '<option selected="True" value="Leave">' . _('Do not Adjust System stock to Nil') . '</option>'; } - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF'). '"></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF'). '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/PDFStockLocTransfer.php =================================================================== --- trunk/PDFStockLocTransfer.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFStockLocTransfer.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -4,7 +4,7 @@ /* $Revision: 1.12 $ */ -$title = _('Stock Location Transfer Docket Error'); +$title = _('Stock Location Transfer Docket Reprint'); include('includes/session.inc'); include('includes/PDFStarter.php'); @@ -19,9 +19,9 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Reprint transfer docket').'</p><br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table><tr><td>'._('Transfer docket to reprint').'</td>'; - echo '<td><input type="text" class="number" size="10" name="TransferNo" /></td></tr></table>'; - echo '<div class="centre"><input type="submit" name="Print" value="' . _('Print') .'" />'; + echo '<table class="selection"><tr><td>'._('Transfer docket to reprint').'</td>'; + echo '<td><input type="text" class="number" size="10" name="TransferNo" /></td></tr></table><br />'; + echo '<div class="centre"><button type="submit" name="Print">' . _('Create PDF') .'</button></div><br />'; include ('includes/footer.inc'); exit; } Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFStockTransfer.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -24,7 +24,7 @@ echo '<td>'._('Print Stock Transfer Note').' : '.'</td>'; echo '<td><input type="text" class="number" name="TransferNo" maxlength="10" size="11" /></td></tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Print Transfer Note') . '"></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="Process">' . _('Print Transfer Note') . '</button></div></form></br />'; include('includes/footer.inc'); exit(); } Modified: trunk/PDFStockTransfer_departments.php =================================================================== --- trunk/PDFStockTransfer_departments.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFStockTransfer_departments.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -16,16 +16,16 @@ } if (!isset($_GET['TransferNo'])){ //still not set from a post then //open a form for entering a transfer number - $title = _('Transfer'); + $title = _('Print an Internal Transfer Note'); include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print Transfer Note') . '" alt="" />' . ' ' . $title.'</p><br />'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr>'; - echo '<td>'._('Imprimir Nota de Despacho').' : '.'</td>'; + echo '<td>'._('Internal Transfer number to print').' : '.'</td>'; echo '<td><input type=text class="number" name="TransferNo" maxlength=10 size=11 /></td></tr>'; echo '</table>'; - echo '<br><div class="centre"><input type="submit" name="Process" value="' . _('Imprimir Nota') . '"></div></form>'; + echo '<br><div class="centre"><button type="submit" name="Process">' . _('Print Transfer Note') . '</button></div></form><br />'; include('includes/footer.inc'); exit(); } @@ -43,11 +43,19 @@ /*Print out the category totals */ -$sql="SELECT stockmaster.stockid, stockmaster.description, dispatchitems.quantity, departments.description as namedepartments,loccode,despatchdate -FROM dispatch, dispatchitems, stockmaster, departments -WHERE departments.departmentid=dispatch.departmentid and stockmaster.stockid = dispatchitems.itemid -AND dispatch.dispatchid = dispatchitems.dispatchid -AND dispatchitems.`dispatchid` ='".$_GET['TransferNo']."'"; +$sql = "SELECT stockmaster.stockid, + stockmaster.description, + dispatchitems.quantity, + departments.description as namedepartments, + loccode,despatchdate + FROM dispatch + INNER JOIN dispatchitems + ON dispatch.dispatchid = dispatchitems.dispatchid + INNER JOIN stockmaster + ON stockmaster.stockid = dispatchitems.itemid + INNER JOIN departments + ON departments.departmentid=dispatch.departmentid + WHERE dispatchitems.`dispatchid` ='".$_GET['TransferNo']."'"; $result=DB_query($sql, $db); if (DB_num_rows($result) == 0){ Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/PDFSuppTransListing.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -40,13 +40,17 @@ echo '<option value="21">' . _('Credit Notes').'</option>'; echo '<option value="22">' . _('Payments').'</option>'; - echo '</select></td></tr>'; + echo '</select></td></tr>'; - echo '</select></td></tr></table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; + echo '</table><br /> + <div class="centre"> + <button type="submit" name="Go">' . _('Create PDF') . '</button> + </div><br /> + </form>'; - include('includes/footer.inc'); - exit; + include('includes/footer.inc'); + exit; } else { include('includes/ConnectDB.inc'); Modified: trunk/includes/IndexArray.php =================================================================== --- trunk/includes/IndexArray.php 2012-05-01 15:16:51 UTC (rev 8760) +++ trunk/includes/IndexArray.php 2012-05-01 17:37:13 UTC (rev 8761) @@ -216,6 +216,7 @@ $MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), _('Print Price Labels'), _('Reprint GRN'), + _('Reprint A Stock Transfer Note'), _('Inventory Item Movements'), _('Inventory Item Status'), _('Inventory Item Usage'), @@ -239,6 +240,7 @@ $MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', '/PDFPrintLabel.php', '/ReprintGRN.php', + '/PDFStockLocTransfer.php', '/StockMovements.php', '/StockStatus.php', '/StockUsage.php', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-01 20:43:02
|
Revision: 8762 http://weberp.svn.sourceforge.net/weberp/?rev=8762&view=rev Author: tim_schofield Date: 2012-05-01 20:42:55 +0000 (Tue, 01 May 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MRPReschedules.php trunk/MRPShortages.php trunk/Manufacturers.php trunk/OffersReceived.php trunk/OutstandingGRNs.php trunk/PDFBankingSummary.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFCustomerList.php trunk/PDFDeliveryDifferences.php trunk/PageSecurity.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/PcAuthorizeExpenses.php trunk/PcExpenses.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRP.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -552,7 +552,7 @@ } echo '<table cellpadding="5"><tr><td valign="top">'; echo '<table class="selection">'; - echo '<tr><th colspan="3"><font color="blue" size="3">'._('Last Run Details').'</font></th></tr>'; + echo '<tr><th colspan="3" class="header">'._('Last Run Details').'</th></tr>'; echo '<tr>'; echo '<td>' . _('Last Run Time') . ':  </td><td>' . $myrow['runtime'] . '</td></tr>'; echo '<td>' . _('Location') . ':  </td><td>' . $myrow['location'] . '</td></tr>'; @@ -567,7 +567,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; // Generate selections for Location - echo '<tr><th colspan="3"><font color="blue" size="3">'._('This Run Details').'</font></th></tr>'; + echo '<tr><th colspan="3" class="header">'._('This Run Details').'</th></tr>'; echo '<tr> <td>' . _('Location') . '</td> <td><select name="location[]" multiple> @@ -594,7 +594,7 @@ echo '<td><input type="checkbox" name="pansizeflag" value="y" checked="True" /></td></tr>'; echo '<tr><td>' ._('Use Shrinkage?') . ':</td>'; echo '<td><input type="checkbox" name="shrinkageflag" value="y" checked="True" /></td></tr>'; - echo '</table></td></tr></table><div class="centre"><br /><br /><input type="submit" name="submit" value="' . _('Run MRP') . '" /></div>'; + echo '</table></td></tr></table><div class="centre"><br /><button type="submit" name="submit">' . _('Run MRP') . '</button></div></br />'; echo '</form>'; } // End of Main program logic ------------------------------------------------------- Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRPCalendar.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -216,7 +216,7 @@ $result = DB_query($sql,$db,$ErrMsg); echo '<br /><table class="selection"> - <tr bgcolor =#800000> + <tr> <th>' . _('Date') . '</th> <th>' . _('Manufacturing Date') . '</th> </tr>'; @@ -236,12 +236,10 @@ } //END WHILE LIST LOOP echo '</table>'; - echo '<br /><br />'; + unset ($ChangeDate); display($db,$ChangeDate); - - } // End of function listall() @@ -257,7 +255,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"><br /><br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class="selection">'; + echo '<table class="selection">'; echo '<tr> <td>' . _('From Date') . ':</td> @@ -297,8 +295,8 @@ <td><input type="checkbox" name="Friday" value="Friday" /></td> </tr> </table><br /> - <div class="centre"><input type="submit" name="submit" value="' . _('Create Calendar') . '" /> - <input type="submit" name="listall" value="' . _('List Date Range') . '" /></div>'; + <div class="centre"><button type="submit" name="submit">' . _('Create Calendar') . '</button> + <button type="submit" name="listall">' . _('List Date Range') . '</button></div>'; if (!isset($_POST['ChangeDate'])) { $_POST['ChangeDate']=date($_SESSION['DefaultDateFormat']); @@ -308,7 +306,7 @@ echo '<tr> <td>' . _('Change Date Status') . ':</td> <td><input type="text" name="ChangeDate" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" size="12" maxlength="12" value="' . $_POST['ChangeDate'] . '" /></td> - <td><input type="submit" name="update" value="' . _('Update') . '" /></td></tr></table>'; + <td><button type="submit" name="update">' . _('Update') . '</button></td></tr></table>'; echo '<br /><br /><div class="centre"></div>'; echo '</form>'; Modified: trunk/MRPCreateDemands.php =================================================================== --- trunk/MRPCreateDemands.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRPCreateDemands.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -242,7 +242,7 @@ ':</td><td><input type ="text" class="number" name="Excludeamt" size="8" value="0" />'; echo '<tr><td>' . _('Multiplier') . ':</td><td><input type ="text" class="number" name="Multiplier" size="2" value="1" /><tr><td></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Submit') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Submit') . '</button></div><br />'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/MRPDemandTypes.php =================================================================== --- trunk/MRPDemandTypes.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRPDemandTypes.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -108,9 +108,10 @@ $result = DB_query($sql,$db); echo '<table class="selection"> - <tr BGCOLOR =#800000><th>' . _('Demand Type') . '</th> - <th>' . _('Description') . '</th> - </tr></font>'; + <tr> + <th>' . _('Demand Type') . '</th> + <th>' . _('Description') . '</th> + </tr>'; while ($myrow = DB_fetch_row($result)) { @@ -177,7 +178,7 @@ </tr> </table>'; -echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div>'; +echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div><br />'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRPDemands.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -100,7 +100,7 @@ $k++; } $tabindex=$j+4; - echo '<td><input tabindex="'.$tabindex.'" type="submit" name="StockID" value="'.$myrow['stockid'].'" /></td> + echo '<td><button tabindex="'.$tabindex.'" type="submit" name="StockID" value="'.$myrow['stockid'].'">'.$myrow['stockid'].'</button></td> <td>'.$myrow['description'].'</td></tr>'; $j++; } //end of while loop @@ -282,7 +282,7 @@ $result = DB_query($sql,$db,$ErrMsg); echo '<table class="selection"> - <tr bgcolor =#800000><th>' . _('Part Number') . '</th> + <tr><th>' . _('Part Number') . '</th> <th>' . _('Description') . '</th> <th>' . _('Demand Type') . '</th> <th>' . _('Quantity') . '</th> @@ -328,7 +328,7 @@ <td><input tabindex="2" type="text" name="StockCode" size="15" maxlength="20" /></td> <td><font size="3"><b>' . _('OR') . '</b></font></td> <td><a href="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?&listall=yes"><font size="3">' . _('List All Demands') .'</font></a></td></tr> - <tr><td colspan="7"><div class="centre"><input tabindex="3" type="submit" name="Search" value="' . _('Search Now') . '" /></div></td></tr></table>'; + <tr><td colspan="7"><div class="centre"><button tabindex="3" type="submit" name="Search">' . _('Search Now') . '</button></div></td></tr></table>'; } else { if (isset($DemandID)) { //editing an existing MRP demand @@ -397,12 +397,12 @@ echo '</select></td></tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" />  '; - echo '<input type="submit" name="listsome" value="' . _('List Selection') . '" />  '; - echo '<input type="submit" name="deletesome" value="' . _('Delete Demand Type') . '" />'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button>  '; + echo '<button type="submit" name="listsome">' . _('List Selection') . '</button>  '; + echo '<button type="submit" name="deletesome">' . _('Delete Demand Type') . '</button></div><br />'; // If mrpdemand record exists, display option to delete it if ((isset($DemandID)) AND (DB_num_rows($result) > 0)) { - echo '<br /><br /><a href=" ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?delete=yes&StockID='.$StockID.'&DemandID=' . $DemandID . '">' . _('Or Delete Record') ; + echo '<br /><br /><a href=" ' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?delete=yes&StockID='.$StockID.'&DemandID=' . $DemandID . '">' . _('Or Delete Record') .'</a>'; } } echo '</form>'; Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRPPlannedPurchaseOrders.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -274,7 +274,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Cut Off Date') . ':</td> <td><input type ="text" class="date" alt="'.$_SESSION['DefaultDateFormat'] . '" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'" /></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div></form>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div></form><br />'; include('includes/footer.inc'); Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRPPlannedWorkOrders.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -246,7 +246,7 @@ echo '<form action="MRPConvertWorkOrders.php" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '<tr><th colspan="9"><font size="3" color="blue">Consolidation: ' . $_POST['Consolidation'] . + echo '<tr><th colspan="9" class="header">' . _('Consolidation') . ': ' . $_POST['Consolidation'] . ' Cutoff Date: ' . $_POST['cutoffdate'] . '</font></th></tr>'; echo '<tr><th></th> <th>' . _('Code') . '</th> @@ -323,7 +323,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<br /><br /><form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; + echo '<br /><form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; echo '<option selected="True" value="None">' . _('None') . '</option>'; @@ -337,8 +337,8 @@ echo '<tr><td>' . _('Cut Off Date') . ':</td> <td><input type ="text" class="date" alt="'.$_SESSION['DefaultDateFormat'] .'" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'" /></tr>'; echo '</table><br /><div class="centre"> - <input type="submit" name="Review" value="' . _('Review') . '" /> - <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + <button type="submit" name="Review">' . _('Review') . '</button> + <button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRPReport.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -545,7 +545,7 @@ echo '<input type="text" name="StockCode" size="15" maxlength="18" />'; } echo '</td></tr></table><br />'; - echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br /></form>'; + echo '<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button></div><br /></form>'; echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; echo '</form>'; if (!isset($_POST['Search'])) { @@ -722,16 +722,16 @@ $ListPage++; } echo '</select> - <input type="submit" name="Go" value="' . _('Go') . '" /> - <input type="submit" name="Previous" value="' . _('Previous') . '" /> - <input type="submit" name="Next" value="' . _('Next') . '" />'; + <button type="submit" name="Go">' . _('Go') . '</button> + <button type="submit" name="Previous">' . _('Previous') . '</button> + <button type="submit" name="Next">' . _('Next') . '</button>'; echo '<input type="hidden" name="Keywords" value="'.$_POST['Keywords'].'" />'; echo '<input type="hidden" name="StockCat" value="'.$_POST['StockCat'].'" />'; echo '<input type="hidden" name="StockCode" value="'.$_POST['StockCode'].'" />'; // echo '<input type="hidden" name=Search value="Search" />'; echo '<br /></div>'; } - echo '<table cellpadding="2">'; + echo '<table cellpadding="2" class="selection">'; $tableheader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> @@ -759,7 +759,7 @@ } else { $qoh = locale_number_format($myrow['qoh'], $myrow['decimalplaces']); } - echo '<td><input type="submit" name="Select" value="'.$myrow['stockid'].'" /></td> + echo '<td><button type="submit" name="Select" value="'.$myrow['stockid'].'">'.$myrow['stockid'].'</button></td> <td>'.$myrow['description'].'</td> <td class="number">'.$qoh.'</td> <td>'.$myrow['units'].'</td> Modified: trunk/MRPReschedules.php =================================================================== --- trunk/MRPReschedules.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRPReschedules.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -124,7 +124,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Stock') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<br /><br /><form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; + echo '<br /><form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; echo '<option selected="True" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; @@ -136,7 +136,7 @@ echo '<option value="PO">' . _('Purchase Orders Only').'</option>'; echo '</select></td></tr>'; echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '<div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/MRPShortages.php =================================================================== --- trunk/MRPShortages.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/MRPShortages.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -283,7 +283,7 @@ echo '<option selected="True" value="yes">' . _('Print With Alternating Highlighted Lines').'</option>'; echo '<option value="no">' . _('Plain Print').'</option>'; echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/Manufacturers.php =================================================================== --- trunk/Manufacturers.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/Manufacturers.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -17,7 +17,7 @@ if (isset($_POST['Create'])) { $ManufacturerID = 0; - $_POST['New'] = "Yes"; + $_POST['New'] = 'Yes'; }; echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Manufacturing Companies') . '" alt="" />' . ' ' .$title . '</p></div>'; @@ -204,9 +204,9 @@ echo '<td>' . $myrow['email'].'</td>'; echo '<td><a href="'.$rootpath . '/Manufacturers.php?ManufacturerID='.$myrow['id'].'">'._('Edit').'</a></td></tr>'; } - echo '</table><br /><div class="centre">'; - echo '<br /><input tabindex="3" type="submit" name="Create" value="' . _('Create New Manufacturer') . '" />'; - echo '</div></form>'; + echo '</table><div class="centre">'; + echo '<br /><button tabindex="3" type="submit" name="Create">' . _('Create New Manufacturer') . '</button>'; + echo '</div><br /></form>'; include('includes/footer.inc'); exit; @@ -281,12 +281,12 @@ if (isset($_POST['Create'])) { - echo '</table><br /><div class="centre"><input tabindex="12" type="submit" name="submit" value="' . _('Insert New Manufacturer') . '" /></div>'; + echo '</table><br /><div class="centre"><button tabindex="12" type="submit" name="submit">' . _('Insert New Manufacturer') . '</button></div><br />'; echo '</form>'; } else if (isset($_POST['amend'])) { - echo '</table><br /><div class="centre"><input tabindex="13" type="submit" name="update" value="' . _('Update Manufacturer') . '" /><br />'; + echo '</table><br /><div class="centre"><button tabindex="13" type="submit" name="update">' . _('Update Manufacturer') . '</button><br />'; prnMsg ( _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no suppliers are using this manufacturer before the deletion is processed'), 'warn'); - echo '<br /><input tabindex="14" type="submit" name="delete" value="' . _('Delete Manufacturer') . '" onclick="return confirm("' . _('Are you sure you wish to delete this manufacturer?') . '");" /></form></div>'; + echo '<br /><button tabindex="14" type="submit" name="delete" onclick="return confirm("' . _('Are you sure you wish to delete this manufacturer?') . '");" />' . _('Delete Manufacturer') . '</button></form></div>'; echo '</form>'; } Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/OffersReceived.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -47,7 +47,7 @@ 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 '<tr><td colspan="12"><div class="centre"><button type="submit" name=select>' . _('Enter Information') . '</button></div></td></tr>'; echo '</table>'; echo '</form>'; } @@ -122,7 +122,7 @@ echo '<td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'" /></td>'; echo '</tr>'; } - echo '<tr><td colspan="12"><div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div></td></tr>'; + echo '<tr><td colspan="12"><div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div></td></tr>'; echo '</form></table>'; } else if(isset($_POST['submit']) and isset($_POST['supplierid'])) { include ('includes/htmlMimeMail.php'); Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/OutstandingGRNs.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -163,7 +163,7 @@ echo '<tr><td>' . _('To Supplier Code'). ':</td> <td><input type="text" name="ToCriteria" value="zzzzzzz" /></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/PDFBankingSummary.php =================================================================== --- trunk/PDFBankingSummary.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PDFBankingSummary.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -31,7 +31,7 @@ echo '<option value="'.$myrow['transno'].'">'._('Batch') .' '. $myrow['transno'].' - '.ConvertSqlDate($myrow['transdate']).'</option>'; } echo '</select></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="EnterBatchNo" value="' . _('Create PDF') . '" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="EnterBatchNo">' . _('Create PDF') . '</button></div></form><br />'; include ('includes/footer.inc'); exit; Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PDFChequeListing.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -59,7 +59,7 @@ echo '<tr><td>' . _('Email the report off') . ':</td><td><select name="Email">'; echo '<option selected="True" value="No">' . _('No') . '</option>'; echo '<option value="Yes">' . _('Yes') . '</option>'; - echo '</select></td></tr></table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; + echo '</select></td></tr></table><br /><div class="centre"><button type="submit" name="Go">' . _('Create PDF') . '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PDFCustTransListing.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -42,7 +42,7 @@ echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="Go">' . _('Create PDF') . '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/PDFCustomerList.php =================================================================== --- trunk/PDFCustomerList.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PDFCustomerList.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -409,7 +409,7 @@ <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ActivitySince" size="10" maxlength="10" value="' . $DefaultActivitySince . '" /></td> </tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="'. _('Print PDF'). '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">'. _('Print PDF'). '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PDFDeliveryDifferences.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -60,7 +60,7 @@ echo '<tr><td>' . _('Email the report off') . ':</td><td><select name="Email">'; echo '<option selected="True" value="No">' . _('No') . '</option>'; echo '<option value="Yes">' . _('Yes') . '</option>'; - echo '</select></td></tr></table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; + echo '</select></td></tr></table><br /><div class="centre"><button type="submit" name="Go">' . _('Create PDF') . '</button></div><br />'; if ($InputError==1){ prnMsg($msg,'error'); Modified: trunk/PageSecurity.php =================================================================== --- trunk/PageSecurity.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PageSecurity.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -52,7 +52,7 @@ echo '</table><br />'; -echo '<div class="centre"><input type="submit" name="Update" value="'._('Update Security Levels').'" /></div><br /></form>'; +echo '<div class="centre"><button type="submit" name="Update">' . _('Update Security Levels') . '</button></div><br /></form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PaymentMethods.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -279,7 +279,7 @@ echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div><br />'; echo '</form>'; Modified: trunk/PaymentTerms.php =================================================================== --- trunk/PaymentTerms.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PaymentTerms.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -177,7 +177,7 @@ $result = DB_query($sql, $db); echo '<table class="selection">'; - echo '<tr><th colspan="6"><font color="blue" size="3">'._('Payment Terms.').'</font></th></tr>'; + echo '<tr><th colspan="6" class="header">'._('Payment Terms.').'</th></tr>'; echo '<tr><th>' . _('Term Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Following Month On') . '</th> @@ -248,7 +248,7 @@ echo '<input type="hidden" name="SelectedTerms" value="' . $SelectedTerms . '" />'; echo '<input type="hidden" name="TermsIndicator" value="' . $_POST['TermsIndicator'] . '" />'; echo '<br /><table class="selection">'; - echo '<tr><th colspan="6"><font color="blue" size="3">'._('Update Payment Terms.').'</font></th></tr>'; + echo '<tr><th colspan="6" class="header">'._('Update Payment Terms.').'</th></tr>'; echo '<tr><td>' . _('Term Code') . ':</td><td>'; echo $_POST['TermsIndicator'] . '</td></tr>'; @@ -261,7 +261,7 @@ if (!isset($_POST['Terms'])) $_POST['Terms']=''; echo '<table class="selection">'; - echo '<tr><th colspan="6"><font color="blue" size="3">'._('New Payment Terms.').'</font></th></tr>'; + echo '<tr><th colspan="6" class="header">'._('New Payment Terms.').'</th></tr>'; echo '<tr><td>' . _('Term Code') . ':</td> <td><input type="text" name="TermsIndicator" ' . (in_array('TermsIndicator',$Errors) ? 'class="inputerror"' : '' ) .' value="' . $_POST['TermsIndicator'] . '" size="3" maxlength="2" /></td></tr>'; } @@ -285,7 +285,7 @@ echo '<input type="text" name="DayNumber" class="number" size="4" maxlength="3" value="' . $DayInFollowingMonth . '" />'; } } - echo '</td></tr></table><br /><div class="centre"><input type="submit" name="submit" value="'._('Enter Information').'" /></form></div>'; + echo '</td></tr></table><br /><div class="centre"><button type="submit" name="submit">'._('Enter Information').'</button></form></div><br />'; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PcAuthorizeExpenses.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -76,7 +76,7 @@ echo '<br /><table class="selection">'; echo '<tr><th colspan="7">' . _('Detail Of Movement For Last ') .': '; echo '<input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> Days '; - echo '<input type="submit" name="Go" value="' . _('Go') . '" /></tr></th>'; + echo '<button type="submit" name="Go">' . _('Go') . '</button></tr></th>'; echo '</form>'; $sql = "SELECT pcashdetails.counterindex, @@ -309,7 +309,7 @@ // Do the postings include ('includes/GLPostings.inc'); - echo'</table><br /><div class="centre"><input type="submit" name="submit" value="' . _('Update') . '" /></div></form>'; + echo'</table><br /><div class="centre"><button type="submit" name="submit">' . _('Update') . '</button></div></form><br />'; } else { /*The option to submit was not hit so display form */ @@ -340,8 +340,8 @@ echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="process" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="process">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button></div><br />'; echo '</form>'; } /*end of else not submit */ Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PcExpenses.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -341,8 +341,8 @@ echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button></div><br />'; echo '</form>'; Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PcReportTab.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -68,8 +68,8 @@ echo '<tr><td>' . _('To Date:') .'</td><td>'; echo '<input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" />'; echo '</td></tr></table><br />'; - echo '<div class="centre"><input type="submit" name="ShowTB" value="' . _('Show HTML') .'" />'; - echo '<input type="submit" name="PrintPDF" value="'._('PrintPDF').'" /></div>'; + echo '<div class="centre"><button type="submit" name="ShowTB">' . _('Show HTML') .'</button>'; + echo '<button type="submit" name="PrintPDF">'._('PrintPDF').'</button></div><br />'; } else if (isset($_POST['PrintPDF'])) { @@ -446,7 +446,7 @@ </tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="SelectDifferentDate" value="' . _('Select A Different Date') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="SelectDifferentDate">' . _('Select A Different Date') . '</button></div><br />'; } echo '</form>'; include('includes/footer.inc'); Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PcTabs.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -483,8 +483,8 @@ echo '</select></td></tr>'; echo '</table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button></div><br />'; echo '</form>'; Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2012-05-01 17:37:13 UTC (rev 8761) +++ trunk/PcTypeTabs.php 2012-05-01 20:42:55 UTC (rev 8762) @@ -122,7 +122,7 @@ echo '<br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><div class="centre"><input type="submit" name=return value="' . _('Return to list of tab types') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name=return value="' . _('Return to list of tab types') . '" /></button></div>'; echo '</form>'; include('includes/footer.inc'); exit; @@ -191,7 +191,7 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class="selection">'; //Main table + echo '<table class="selection">'; //Main table if ( isset($SelectedTab) AND $SelectedTab!='' ) { @@ -233,8 +233,8 @@ echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Accept') . '</button> + <button type="submit" name="Cancel">' . _('Cancel') . '</button></div><br />'; echo '</form>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-01 21:44:17
|
Revision: 8763 http://weberp.svn.sourceforge.net/weberp/?rev=8763&view=rev Author: tim_schofield Date: 2012-05-01 21:44:11 +0000 (Tue, 01 May 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/GoodsReceived.php trunk/GoodsReceivedControlled.php trunk/InternalStockRequestAuthorisation.php trunk/InternalStockRequestFulfill.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/Locations.php Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2012-05-01 20:42:55 UTC (rev 8762) +++ trunk/GoodsReceived.php 2012-05-01 21:44:11 UTC (rev 8763) @@ -259,20 +259,20 @@ if ($SomethingReceived==0 AND isset($_POST['ProcessGoodsReceived'])){ /*Then dont bother proceeding cos nothing to do ! */ prnMsg(_('There is nothing to process') . '. ' . _('Please enter valid quantities greater than zero'),'warn'); - echo '<div class="centre"><input type="submit" name="Update" value="' . _('Update') . '" /></div>'; + echo '<div class="centre"><button type="submit" name="Update">' . _('Update') . '</button></div>'; } elseif ($NegativesFound){ prnMsg(_('Negative stocks would result by processing a negative delivery - quantities must be changed or the stock quantity of the item going negative corrected before this delivery will be processed.'),'error'); - echo '<div class="centre"><input type="submit" name="Update" value="' . _('Update') . '" />'; + echo '<div class="centre"><button type="submit" name="Update">' . _('Update') . '</button>'; }elseif ($DeliveryQuantityTooLarge==1 AND isset($_POST['ProcessGoodsReceived'])){ prnMsg(_('Entered quantities cannot be greater than the quantity entered on the purchase invoice including the allowed over-receive percentage'). ' ' . '(' . $_SESSION['OverReceiveProportion'] .'%)','error'); echo '<br />'; prnMsg(_('Modify the ordered items on the purchase invoice if you wish to increase the quantities'),'info'); - echo '<div class="centre"><input type="submit" name="Update" value="' . _('Update') . '" />'; + echo '<div class="centre"><button type="submit" name="Update">' . _('Update') . '</button>'; } elseif (isset($_POST['ProcessGoodsReceived']) AND $SomethingReceived==1 AND $InputError == false){ @@ -744,8 +744,8 @@ echo '<br /><div class="centre"><a href="' . $rootpath . '/PO_Items.php">' . _('Modify Order Items'). '</a></div>'; - echo '<br /><div class="centre"><input type="submit" name="Update" value="' . _('Update') . '" /></div><br />'; - echo '<div class="centre"><input type="submit" name="ProcessGoodsReceived" value="' . _('Process Goods Received') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="Update">' . _('Update') . '</button></div><br />'; + echo '<div class="centre"><button type="submit" name="ProcessGoodsReceived">' . _('Process Goods Received') . '</button></div><br />'; } echo '</form>'; Modified: trunk/GoodsReceivedControlled.php =================================================================== --- trunk/GoodsReceivedControlled.php 2012-05-01 20:42:55 UTC (rev 8762) +++ trunk/GoodsReceivedControlled.php 2012-05-01 21:44:11 UTC (rev 8763) @@ -61,8 +61,6 @@ $ShowExisting = false; include ('includes/InputSerialItems.php'); -//echo '<br /><input type="submit" name=\'AddBatches\' value=\'Enter\'><br />'; - /*TotalQuantity set inside this include file from the sum of the bundles of the item selected for dispatch */ $_SESSION['PO']->LineItems[$LineItem->LineNo]->ReceiveQty = $TotalQuantity; Modified: trunk/InternalStockRequestAuthorisation.php =================================================================== --- trunk/InternalStockRequestAuthorisation.php 2012-05-01 20:42:55 UTC (rev 8762) +++ trunk/InternalStockRequestAuthorisation.php 2012-05-01 21:44:11 UTC (rev 8763) @@ -105,7 +105,7 @@ </tr>'; } //end while header loop echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="updateall" value="' . _('Update'). '" /></form>'; +echo '<br /><div class="centre"><button type="submit" name="updateall">' . _('Update'). '</button></div><br /></form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/InternalStockRequestFulfill.php =================================================================== --- trunk/InternalStockRequestFulfill.php 2012-05-01 20:42:55 UTC (rev 8762) +++ trunk/InternalStockRequestFulfill.php 2012-05-01 21:44:11 UTC (rev 8763) @@ -220,7 +220,7 @@ } echo '</select></td></tr>'; echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="EnterAdjustment" value="'. _('Show Requests'). '" /></div>'; + echo '<div class="centre"><button type="submit" name="EnterAdjustment">'. _('Show Requests'). '</button></div><br />'; include('includes/footer.inc'); exit; } @@ -250,7 +250,7 @@ if (DB_num_rows($result)==0) { prnMsg( _('There are no outstanding authorised requests for this location'), 'info'); echo '<br />'; - echo '<div class="centre"><a href="' . $_SESSION['FormID'] . '">' . _('Select another location') . '</a></div>'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select another location') . '</a></div>'; include('includes/footer.inc'); exit; } @@ -336,7 +336,7 @@ echo '</table></td></tr>'; } //end while header loop echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></form>'; + echo '<br /><div class="centre"><button type="submit" name="UpdateAll">' . _('Update'). '</button></form>'; } include('includes/footer.inc'); Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2012-05-01 20:42:55 UTC (rev 8762) +++ trunk/InventoryPlanning.php 2012-05-01 21:44:11 UTC (rev 8763) @@ -440,7 +440,7 @@ </td> </tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div></form>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br /></form>'; } include('includes/footer.inc'); Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2012-05-01 20:42:55 UTC (rev 8762) +++ trunk/InventoryPlanningPrefSupplier.php 2012-05-01 21:44:11 UTC (rev 8763) @@ -516,7 +516,7 @@ } echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/InventoryQuantities.php =================================================================== --- trunk/InventoryQuantities.php 2012-05-01 20:42:55 UTC (rev 8762) +++ trunk/InventoryQuantities.php 2012-05-01 21:44:11 UTC (rev 8763) @@ -146,7 +146,7 @@ echo '<div class="page_help_text">' . _('Use this report to display the quantity of Inventory items in different categories.') . '</div><br />'; - echo '<br /><br /><form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table>'; + echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr><td>'; echo '<tr><td>' . _('Selection') . ':</td><td><select name="Selection">'; @@ -183,7 +183,7 @@ } } echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-05-01 20:42:55 UTC (rev 8762) +++ trunk/InventoryValuation.php 2012-05-01 21:44:11 UTC (rev 8763) @@ -239,7 +239,7 @@ echo '<option value="Yes">' . _('Detailed Report') . '</option>'; echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; } include('includes/footer.inc'); Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2012-05-01 20:42:55 UTC (rev 8762) +++ trunk/Locations.php 2012-05-01 21:44:11 UTC (rev 8763) @@ -367,11 +367,9 @@ //end of ifs and buts! -echo '<br />'; if (isset($SelectedLocation)) { echo '<a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Review Records') . '</a>'; } -echo '<br />'; if (!isset($_GET['delete'])) { @@ -423,7 +421,7 @@ echo '<input type="hidden" name="SelectedLocation" value="' . $SelectedLocation . '" />'; echo '<input type="hidden" name="LocCode" value="' . $_POST['LocCode'] . '" />'; echo '<table class="selection">'; - echo '<tr><th colspan="2"><font size="3" color="blue">'._('Amend Location details').'</font></th></tr>'; + echo '<tr><th colspan="2" class="header">'._('Amend Location details').'</th></tr>'; echo '<tr><td>' . _('Location Code') . ':</td><td>'; echo $_POST['LocCode'] . '</td></tr>'; } else { //end of if $SelectedLocation only do the else when a new record is being entered @@ -515,7 +513,7 @@ */ echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div>'; + echo '<div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div><br />'; echo '</form>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-02 08:22:37
|
Revision: 8764 http://weberp.svn.sourceforge.net/weberp/?rev=8764&view=rev Author: tim_schofield Date: 2012-05-02 08:22:25 +0000 (Wed, 02 May 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLAccounts.php trunk/GLBalanceSheet.php trunk/GLBudgets.php trunk/GLJournal.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTags.php trunk/GLTrialBalance.php Added Paths: ----------- trunk/sql/mysql/updates/110.php Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLAccountCSV.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -25,7 +25,7 @@ $DefaultPeriodDate = Date ('Y-m-d', Mktime(0,0,0,Date('m'),0,Date('Y'))); /*Show a form to allow input of criteria for the report */ -echo '<table> +echo '<table class="selection"> <tr> <td>'._('Selected Accounts') . ':</td> <td><select name="Account[]" multiple>'; @@ -79,7 +79,7 @@ // End select tag echo '</table><br /> -<div class="centre"><input type="submit" name="MakeCSV" value="'._('Make CSV File').'" /></div></form>'; +<div class="centre"><button type="submit" name="MakeCSV">'._('Make CSV File').'</button></div><br /></form>'; /* End of the Form rest of script is what happens if the show button is hit*/ @@ -265,7 +265,7 @@ } /*end for each SelectedAccount */ fclose($fp); - echo '<p><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '</p><br />'; + echo '<div class="centre"><a href="' . $FileName . '">' . _('click here') . '</a> ' . _('to view the file') . '</div><br />'; } /* end of if CreateCSV button hit */ include('includes/footer.inc'); Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLAccountInquiry.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -75,7 +75,7 @@ } } echo '</select></td></tr><table>'; -echo '<p><div class="centre"><input type="submit" name="Show" value="'._('Show Account Transactions').'" /></div></p></form>'; +echo '<p><div class="centre"><button type="submit" name="Show">'._('Show Account Transactions').'</button></div></p></form>'; /* End of the Form rest of script is what happens if the show button is hit*/ @@ -178,14 +178,14 @@ $RunningTotal =$ChartDetailRow['bfwd']; if ($RunningTotal < 0 ){ //its a credit balance b/fwd - echo '<tr bgcolor="#FDFEEF"> + echo '<tr> <td colspan="3"><b>' . _('Brought Forward Balance') . '</b><td> </td></td> <td class="number"><b>' . locale_money_format(-$RunningTotal,$_SESSION['CompanyRecord']['currencydefault']) . '</b></td> <td></td> </tr>'; } else { //its a debit balance b/fwd - echo '<tr bgcolor="#FDFEEF"> + echo '<tr> <td colspan="3"><b>' . _('Brought Forward Balance') . '</b></td> <td class="number"><b>' . locale_money_format($RunningTotal,$_SESSION['CompanyRecord']['currencydefault']) . '</b></td> <td colspan="2"></td> @@ -214,7 +214,7 @@ $ChartDetailsResult = DB_query($sql,$db,$ErrMsg); $ChartDetailRow = DB_fetch_array($ChartDetailsResult); - echo '<tr bgcolor="#FDFEEF"> + echo '<tr> <td colspan="3"><b>' . _('Total for period') . ' ' . $PeriodNo . '</b></td>'; if ($PeriodTotal < 0 ){ //its a credit balance b/fwd if ($PandLAccount==True) { @@ -291,7 +291,7 @@ } - echo '<tr bgcolor="#FDFEEF"><td colspan="3"><b>'; + echo '<tr><td colspan="3"><b>'; if ($PandLAccount==True){ echo _('Total Period Movement'); } else { /*its a balance sheet account*/ Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLAccountReport.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -244,7 +244,7 @@ $DefaultPeriodDate = Date ('Y-m-d', Mktime(0,0,0,Date('m'),0,Date('Y'))); /*Show a form to allow input of criteria for the report */ - echo '<table> + echo '<table class="selection"> <tr> <td>'._('Selected Accounts') . ':</td> <td><select name="Account[]" multiple>'; @@ -305,7 +305,7 @@ echo '</table><br /> <div class="centre"> - <input type="submit" name="RunReport" value="' ._('Run Report'). '" /></div> + <button type="submit" name="RunReport">' ._('Run Report'). '</button></div><br /> </form>'; include ('includes/footer.inc'); Modified: trunk/GLAccounts.php =================================================================== --- trunk/GLAccounts.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLAccounts.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -273,7 +273,7 @@ echo '</select></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="'. _('Enter Information') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">'. _('Enter Information') . '</button></div>'; echo '</form>'; Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLBalanceSheet.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -51,8 +51,8 @@ echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="ShowBalanceSheet" value="'._('Show on Screen (HTML)').'" /></div>'; - echo '<br /><div class="centre"><input type="submit" name="PrintPDF" value="'._('Produce PDF Report').'" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="ShowBalanceSheet">'._('Show on Screen (HTML)').'</button></div>'; + echo '<br /><div class="centre"><button type="submit" name="PrintPDF">'._('Produce PDF Report').'</button></div>'; /*Now do the posting while the user is thinking about the period to select*/ include ('includes/GLPostings.inc'); @@ -347,8 +347,7 @@ $AccountsResult = DB_query($SQL,$db,_('No general ledger accounts were returned by the SQL because')); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/preview.gif" title="' . _('Search') . '" alt="" /> ' . _('HTML View') . '</p>'; - echo '<div class=invoice><table class="selection"><tr><th colspan="6"><div class="centre"><font size="4" color="blue"><b>' . - _('Balance Sheet as at') . ' ' . $BalanceDate .'</b></font></div></th></tr>'; + echo '<div class=invoice><table class="selection"><tr><th colspan="6" class="header">' . _('Balance Sheet as at') . ' ' . $BalanceDate .'</th></tr>'; if ($_POST['Detail']=='Detailed'){ $TableHeader = '<tr> @@ -483,7 +482,7 @@ if ($_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <th colspan="6" class="header" style="text-align: left">%s</th> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -498,7 +497,7 @@ if ($_POST['Detail']=='Detailed'){ $ActGrp = $myrow['groupname']; printf('<tr> - <td colspan="6"><font size="2" color="blue"><b>%s</b></font></td> + <th colspan="6" class="header" style="text-align: left">%s</th> </tr>', $myrow['groupname']); echo $TableHeader; @@ -626,7 +625,7 @@ if (isset($myrow['sectioninaccounts']) and $_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <th colspan="6" class="header" style="text-align: left">%s</th> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -655,7 +654,7 @@ </tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="SelectADifferentPeriod" value="'._('Select A Different Balance Date').'" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="SelectADifferentPeriod">'._('Select A Different Balance Date').'</button></div><br />'; } echo '</form>'; Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLBudgets.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -29,7 +29,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="selectaccount">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<table>'; +echo '<table class="selection">'; echo '<br /><tr><td>'. _('Select GL Account'). ':</td><td><select name="SelectedAccount" onChange="ReloadForm(selectaccount.Select)">'; @@ -66,9 +66,9 @@ echo '<input type="hidden" name="PrevAccount" value="'.$PrevCode.'" />'; echo '<input type="hidden" name="NextAccount" value="'.$NextCode.'" />'; echo '</table>'; -echo '<br /><table><tr><td><input type="submit" name="Previous" value="' . _('Prev Account') . '" /></td>'; -echo '<td><input type="submit" name="Select" value="' . _('Select Account') . '" /></td>'; -echo '<td><input type="submit" name="Next" value="' . _('Next Account') . '" /></td></tr>'; +echo '<br /><table><tr><td><button type="submit" name="Previous">' . _('Prev Account') . '</button></td>'; +echo '<td><button type="submit" name="Select">' . _('Select Account') . '</button></td>'; +echo '<td><button type="submit" name="Next">' . _('Next Account') . '</td></tr>'; echo '</table><br />'; echo '</form>'; @@ -208,13 +208,13 @@ <td><input class="number" type="text" size="14" name="AnnualAmountTY" value="'.locale_money_format(0, $_SESSION['CompanyRecord']['currencydefault']).'" /></td> <td></td> <td><input onChange="numberFormat(this,2)" class="number" type="text" size="14" name="AnnualAmount" value="'.locale_money_format(0, $_SESSION['CompanyRecord']['currencydefault']).'" /></td>'; - echo '<td><input type="submit" name="apportion" value="' . _('Apportion Budget') . '" /></td>'; + echo '<td><button type="submit" name="apportion">' . _('Apportion Budget') . '</button></td>'; echo '</tr>'; echo '</table>'; echo '<input type="hidden" name="SelectedAccount" value="'.$SelectedAccount.'" />'; echo '<script>defaultControl(document.form.1next);</script>'; - echo '<br /><div class="centre"><input type="submit" name="update" value="' . _('Update') . '" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="update">' . _('Update') . '</button></div><br /></form>'; $SQL="SELECT MIN(periodno) FROM periods"; $result=DB_query($SQL,$db); Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLJournal.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -44,7 +44,7 @@ $_SESSION['JournalDetail']->JournalType = $_POST['JournalType']; } -if (isset($_POST['CommitBatch']) and $_POST['CommitBatch']==_('Accept and Process Journal')){ +if (isset($_POST['CommitBatch'])){ /* once the GL analysis of the journal is entered process all the data in the session cookie into the DB @@ -130,7 +130,7 @@ /* User hit delete the line from the journal */ $_SESSION['JournalDetail']->Remove_GLEntry($_GET['Delete']); -} elseif (isset($_POST['Process']) and $_POST['Process']==_('Accept')){ //user hit submit a new GL Analysis line into the journal +} elseif (isset($_POST['Process'])){ //user hit submit a new GL Analysis line into the journal if($_POST['GLCode']!='') { $extract = explode(' - ',$_POST['GLCode']); $_POST['GLCode'] = $extract[0]; @@ -258,7 +258,7 @@ echo '<table class="selection" width="70%">'; /* Set upthe form for the transaction entry for a GL Payment Analysis item */ -echo '<tr><th colspan="3"><div class="centre"><font size="3" color="blue"><b>' . _('Journal Line Entry') . '</b></font></div></th></tr>'; +echo '<tr><th colspan="3" class="header">' . _('Journal Line Entry') . '</th></tr>'; /*now set up a GLCode field to select from avaialble GL accounts */ echo '<tr><th>' . _('GL Tag') . '</th>'; @@ -331,12 +331,12 @@ echo '<td><input type="text" name="GLNarrative" maxlength="100" size="100" value="' . $_POST['GLNarrative'] . '" /></td>'; echo '</tr></table><br />'; /*Close the main table */ -echo '<div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /></div><br /><br />'; +echo '<div class="centre"><button type="submit" name="Process">' . _('Accept') . '</button></div><br /><br />'; echo '<table class="selection" width="85%">'; -echo '<tr><th colspan="6"><div class="centre"><font size="3" color="blue"><b>' . _('Journal Summary') . '</b></font></div></th></tr>'; +echo '<tr><th colspan="6" class="header">' . _('Journal Summary') . '</th></tr>'; echo '<tr> <th>'._('GL Tag').'</th> <th>'._('GL Account').'</th> @@ -399,7 +399,7 @@ echo '</table>'; if (ABS($_SESSION['JournalDetail']->JournalTotal)<0.001 AND $_SESSION['JournalDetail']->GLItemCounter > 0){ - echo '<br /><br /><div class="centre"><input type="submit" name="CommitBatch" value="'._('Accept and Process Journal').'" /></div>'; + echo '<br /><br /><div class="centre"><button type="submit" name="CommitBatch">'._('Accept and Process Journal').'</button></div>'; } elseif(count($_SESSION['JournalDetail']->GLEntries)>0) { echo '<br /><br />'; prnMsg(_('The journal must balance ie debits equal to credits before it can be processed'),'warn'); Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLProfit_Loss.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -95,8 +95,8 @@ echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="ShowPL" value="'._('Show on Screen (HTML)').'" /></div>'; - echo '<br /><div class="centre"><input type="submit" name="PrintPDF" value="'._('Produce PDF Report').'" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="ShowPL">'._('Show on Screen (HTML)').'</button></div>'; + echo '<br /><div class="centre"><button type="submit" name="PrintPDF">'._('Produce PDF Report').'</button></div>'; /*Now do the posting while the user is thinking about the period to select*/ @@ -851,7 +851,7 @@ if ($_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <th colspan="6" class="header" style="text-align: left">%s</th> `</tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -871,7 +871,7 @@ $ActGrp = $myrow['groupname']; if ($_POST['Detail']=='Detailed'){ printf('<tr> - <th colspan="8"><font size="3" color="blue"><b>%s</b></font></th> + <th colspan="8" class="header" style="text-align: left">%s</th> </tr>', $myrow['groupname']); echo $TableHeader; @@ -1157,7 +1157,7 @@ if ($_POST['Detail']=='Detailed' and isset($Sections[$myrow['sectioninaccounts']])){ printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <th colspan="6" class="header" style="text-align: left">%s</th> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -1170,8 +1170,8 @@ <td colspan="6"><hr /></td> </tr>'; - printf('<tr bgcolor="#ffffff"> - <td colspan="2"><font size="4" color="blue"><b>'._('Profit').' - '._('Loss').'</b></font></td> + printf('<tr> + <th colspan="2" class="header" style="text-align: left">'._('Profit').' - '._('Loss').'</th> <td></td> <td class="number">%s</td> <td></td> @@ -1226,7 +1226,7 @@ </tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="SelectADifferentPeriod" value="' . _('Select A Different Period') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="SelectADifferentPeriod">' . _('Select A Different Period') . '</button></div><br />'; } echo '</form>'; include('includes/footer.inc'); Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLTagProfit_Loss.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -112,8 +112,9 @@ echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="ShowPL" value="'._('Show Statement of Income and Expenditure').'" /><br />'; - echo '<br /><input type="submit" name="PrintPDF" value="'._('PrintPDF').'" /></div>'; + echo '<div class="centre"> + <button type="submit" name="ShowPL">'._('Show Statement of Income and Expenditure').'</button><br /><br /> + <button type="submit" name="PrintPDF">'._('PrintPDF').'</button></div><br />'; /*Now do the posting while the user is thinking about the period to select*/ @@ -506,8 +507,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . $title . '</p>'; echo '<table cellpadding="2" class="selection">'; - echo '<tr><th colspan="9"><div class="centre"><font size="3" color="blue"><b>' . _('Statement of Income and Expenditure for Tag'). ' ' . - $myrow[0]._('during the'). ' ' . $NumberOfMonths . ' ' . _('months to'). ' ' . $PeriodToDate . '</b></font></div></th></tr>'; + echo '<tr><th colspan="9" class="header">' . _('Statement of Income and Expenditure for Tag'). ' ' . $myrow[0]._('during the'). ' ' . $NumberOfMonths . ' ' . _('months to'). ' ' . $PeriodToDate . '</th></tr>'; if ($_POST['Detail']=='Detailed'){ $TableHeader = '<tr> @@ -697,7 +697,7 @@ if ($_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <th colspan="6" class="header" style="text-align: left;">%s</td> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -717,7 +717,7 @@ $ActGrp = $myrow['groupname']; if ($_POST['Detail']=='Detailed'){ printf('<tr> - <td colspan="6"><font size="2" color="blue"><b>%s</b></font></td> + <td colspan="6" class="header" style="text-align: left;">%s</td> </tr>', $myrow['groupname']); echo $TableHeader; @@ -930,7 +930,7 @@ if ($_POST['Detail']=='Detailed' and isset($Sections[$myrow['sectioninaccounts']])){ printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <th colspan="6" class="header" style="text-align: left;">%s</th> </tr>', $Sections[$myrow['sectioninaccounts']]); } @@ -943,8 +943,8 @@ <td colspan="6"><hr /></td> </tr>'; - printf('<tr bgcolor="#ffffff"> - <td colspan="2"><font size="4" color="blue"><b>'._('Surplus').' - '._('Deficit').'</b></font></td> + printf('<tr> + <th colspan="2" class="header" style="text-align: left;">'._('Surplus').' - '._('Deficit').'</th> <td></td> <td class="number">%s</td> </tr>', @@ -957,7 +957,7 @@ </tr>'; echo '</table>'; - echo '<div class="centre"><input type="submit" name="SelectADifferentPeriod" value="'._('Select A Different Period').'" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="SelectADifferentPeriod">'._('Select A Different Period').'</button></div><br />'; } echo '</form>'; include('includes/footer.inc'); Modified: trunk/GLTags.php =================================================================== --- trunk/GLTags.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLTags.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -32,7 +32,7 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" name="form">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<br /><table><tr>'; +echo '<br /><table class="selection"><tr>'; echo '<td>'. _('Description') . '</td> @@ -40,9 +40,9 @@ <input type="hidden" name="reference" value="'.$_GET['SelectedTag'].'" />'; if (isset($_GET['Action']) and $_GET['Action']=='edit') { - echo '<input type="submit" name="update" value="' . _('Update') . '" />'; + echo '<button type="submit" name="update">' . _('Update') . '</button>'; } else { - echo '<input type="submit" name="submit" value="' . _('Insert') . '" />'; + echo '<button type="submit" name="submit">' . _('Insert') . '</button>'; } echo '</td></tr></table><p></p>'; Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2012-05-01 21:44:11 UTC (rev 8763) +++ trunk/GLTrialBalance.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -90,8 +90,8 @@ } echo '</select></td></tr></table><br />'; - echo '<div class="centre"><input type="submit" name="ShowTB" value="' . _('Show Trial Balance') .'" />'; - echo '<input type="submit" name="PrintPDF" value="'._('PrintPDF').'" /></div>'; + echo '<div class="centre"><button type="submit" name="ShowTB">' . _('Show Trial Balance') .'</button>'; + echo '<button type="submit" name="PrintPDF">'._('PrintPDF').'</button></div><br />'; /*Now do the posting while the user is thinking about the period to select*/ @@ -431,8 +431,7 @@ Account Code , Account Name , Month Actual, Month Budget, Period Actual, Period Budget */ echo '<table cellpadding="2" class="selection">'; - echo '<tr><th colspan="6"><font size="3" color="blue"><b>'. _('Trial Balance for the month of ') . $PeriodToDate . - _(' and for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate .'</b></font></th></tr>'; + echo '<tr><th colspan="6" class="header">'. _('Trial Balance for the month of ') . $PeriodToDate . _(' and for the ') . $NumberOfMonths . _(' months to ') . $PeriodToDate .'</th></tr>'; $TableHeader = '<tr> <th>' . _('Account') . '</th> <th>' . _('Account Name') . '</th> @@ -546,7 +545,7 @@ $ParentGroups[$Level]=$myrow['groupname']; $ActGrp = $myrow['groupname']; printf('<tr> - <td colspan="6"><font size="4" color="blue"><b>%s</b></font></td> + <th colspan="6" class="header" style="text-align: left">%s</td> </tr>', $myrow['groupname']); echo $TableHeader; @@ -695,7 +694,7 @@ printf('<tr bgcolor="#ffffff"> - <td colspan="2"><font color="blue"><b>' . _('Check Totals') . '</b></font></td> + <td colspan="2"><font color="black"><b>' . _('Check Totals') . '</b></font></td> <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> @@ -707,7 +706,7 @@ locale_money_format($CheckPeriodBudget,$_SESSION['CompanyRecord']['currencydefault'])); echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="SelectADifferentPeriod" value="' . _('Select A Different Period') . '" /></div>'; + echo '<div class="centre"><button type="submit" name="SelectADifferentPeriod">' . _('Select A Different Period') . '</button></div><br />'; } echo '</form>'; include('includes/footer.inc'); Added: trunk/sql/mysql/updates/110.php =================================================================== --- trunk/sql/mysql/updates/110.php (rev 0) +++ trunk/sql/mysql/updates/110.php 2012-05-02 08:22:25 UTC (rev 8764) @@ -0,0 +1,34 @@ +<?php + +/* Include the new script for printing quotations in Portrait + */ + +Createtable('labels', "CREATE TABLE IF NOT EXISTS `labels` ( + `labelid` tinyint(11) NOT NULL AUTO_INCREMENT, + `description` varchar(50) NOT NULL, + `papersize` varchar(20) NOT NULL, + `height` tinyint(11) NOT NULL, + `width` tinyint(11) NOT NULL, + `topmargin` tinyint(11) NOT NULL, + `leftmargin` tinyint(11) NOT NULL, + `rowheight` tinyint(11) NOT NULL, + `columnwidth` tinyint(11) NOT NULL, + PRIMARY KEY (`labelid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1", $db); + +Createtable('labelfields', "CREATE TABLE IF NOT EXISTS `labelfields` ( + `labelfieldid` int(11) NOT NULL AUTO_INCREMENT, + `labelid` tinyint(4) NOT NULL, + `fieldvalue` varchar(20) CHARACTER SET utf8 NOT NULL, + `vpos` tinyint(4) NOT NULL, + `hpos` tinyint(4) NOT NULL, + `fontsize` tinyint(4) NOT NULL, + `barcode` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`labelfieldid`), + KEY `labelid` (`labelid`), + KEY `vpos` (`vpos`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8", $db); + +UpdateDBNo(basename(__FILE__, '.php'), $db); + +?> \ 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: <tim...@us...> - 2012-05-02 15:27:01
|
Revision: 8766 http://weberp.svn.sourceforge.net/weberp/?rev=8766&view=rev Author: tim_schofield Date: 2012-05-02 15:11:26 +0000 (Wed, 02 May 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/AddCustomerContacts.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/Currencies.php trunk/CustEDISetup.php trunk/CustLoginSetup.php trunk/CustWhereAlloc.php trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/CustomerInquiry.php trunk/CustomerTransInquiry.php trunk/CustomerTypes.php trunk/Customers.php trunk/DailyBankTransactions.php trunk/DailySalesInquiry.php trunk/DebtorsAtPeriodEnd.php trunk/Departments.php trunk/DiscountCategories.php trunk/DiscountMatrix.php trunk/EDIMessageFormat.php trunk/EmailCustTrans.php trunk/ExchangeRateTrend.php trunk/Factors.php trunk/FixedAssetCategories.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetLocations.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/FormDesigner.php trunk/FreightCosts.php trunk/GeocodeSetup.php trunk/css/silverwolf/default.css trunk/includes/footer.inc Modified: trunk/AddCustomerContacts.php =================================================================== --- trunk/AddCustomerContacts.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/AddCustomerContacts.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -169,7 +169,7 @@ if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'">'; + echo '<br /><form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?DebtorNo='.$DebtorNo.'">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($Id)) { @@ -252,7 +252,7 @@ echo '<tr> <td colspan="2"> <div class="centre"> - <input type="submit" name="submit" value="'. _('Enter Information') . '" /> + <button type="submit" name="submit">'. _('Enter Information') . '</button> </div> </td> </tr> Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/CreditStatus.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -241,7 +241,7 @@ } else { echo '<td><input tabindex="3" type="checkbox" name="DisallowInvoices" /></td></tr>'; } - echo '</table><br /><div class="centre"><input tabindex="4" type="submit" name="submit" value="' . _('Enter Information') . '" /></div></form>'; + echo '</table><br /><div class="centre"><button tabindex="4" type="submit" name="submit" value="" />' . _('Enter Information') . '</button></div><br /></form>'; } //end if record deleted no point displaying form to add record include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/Credit_Invoice.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -1246,6 +1246,7 @@ trandate, periodno, account, + defaulttag, narrative, amount) VALUES (11, @@ -1253,6 +1254,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $COGSAccount . "', + '" . $_SESSION['DefaultTag'] . "', '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . filter_number_input($CreditLine->QtyDispatched) . " @ " . $CreditLine->StandardCost . "', '-" . filter_number_input(round($CreditLine->StandardCost * $CreditLine->QtyDispatched,2)) . "' )"; @@ -1270,6 +1272,7 @@ trandate, periodno, account, + defaulttag, narrative, amount) VALUES (11, @@ -1277,6 +1280,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_POST['WriteOffGLCode'] . "', + '" . $_SESSION['DefaultTag'] . "', '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . filter_number_input($CreditLine->QtyDispatched) . " @ " . $CreditLine->StandardCost . "', '" . filter_number_input(round($CreditLine->StandardCost * $CreditLine->QtyDispatched,2)) . "')"; } else { @@ -1286,6 +1290,7 @@ trandate, periodno, account, + defaulttag, narrative, amount) VALUES (11, @@ -1293,6 +1298,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', + '" . $_SESSION['DefaultTag'] . "', '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . filter_number_input($CreditLine->QtyDispatched) . " @ " . $CreditLine->StandardCost . "', '" . filter_number_input(round($CreditLine->StandardCost * $CreditLine->QtyDispatched,2)) . "')"; } @@ -1313,6 +1319,7 @@ trandate, periodno, account, + defaulttag, narrative, amount) VALUES (11, @@ -1320,6 +1327,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', + '" . $_SESSION['DefaultTag'] . "', '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . filter_number_input($CreditLine->QtyDispatched) . " @ " . $CreditLine->Price . "', '" . filter_number_input(round(($CreditLine->Price * $CreditLine->QtyDispatched)/$_SESSION['CurrencyRate'],2)) . "' )"; @@ -1335,6 +1343,7 @@ trandate, periodno, account, + defaulttag, narrative, amount) VALUES (11, @@ -1342,6 +1351,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', + '" . $_SESSION['DefaultTag'] . "', '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', '-" . filter_number_input(round(($CreditLine->Price * $CreditLine->QtyDispatched * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate'],2)) . "' )"; @@ -1363,6 +1373,7 @@ trandate, periodno, account, + defaulttag, narrative, amount) VALUES (11, @@ -1370,6 +1381,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', + '" . $_SESSION['DefaultTag'] . "', '" . $_SESSION['CreditItems']->DebtorNo . "', '-" . filter_number_input(round(($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate'],2)) . "' )"; @@ -1389,6 +1401,7 @@ trandate, periodno, account, + defaulttag, narrative, amount) VALUES (11, @@ -1396,6 +1409,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', + '" . $_SESSION['DefaultTag'] . "', '" . $_SESSION['CreditItems']->DebtorNo . "', '" . filter_number_input(round($_SESSION['CreditItems']->FreightCost/$_SESSION['CurrencyRate'],2)) . "' )"; @@ -1413,6 +1427,7 @@ trandate, periodno, account, + defaulttag, narrative, amount ) @@ -1422,6 +1437,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', + '" . $_SESSION['DefaultTag'] . "', '" . $_SESSION['CreditItems']->DebtorNo . "', '" . filter_number_input($TaxAmount/$_SESSION['CurrencyRate']) . "' )"; @@ -1515,16 +1531,16 @@ echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountname'].'</option>'; } } - echo "</select></td></tr>"; + echo '</select></td></tr>'; } if (!isset($_POST['CreditText'])) { $_POST['CreditText'] = ''; } $j++; echo '<tr><td>' . _('Credit note text') . '</td><td><textarea tabindex="'.$j.'" name="CreditText" cols="31" rows="5">' . $_POST['CreditText'] . '</textarea></td></tr>'; - echo '</table><br /><div class="centre"><input tabindex="'.$j.'" type="submit" name="Update" value="' . _('Update') . '" /><br />'; + echo '</table><br /><div class="centre"><button tabindex="'.$j.'" type="submit" name="Update">' . _('Update') . '</button><br />'; $j++; - echo '<input type="submit" tabindex="'.$j++.'" name="ProcessCredit" value="' . _('Process Credit') .'" /></div>'; + echo '<button type="submit" tabindex="'.$j++.'" name="ProcessCredit">' . _('Process Credit') .'</button></div>'; } echo '</form>'; Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/Currencies.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -50,7 +50,7 @@ $Errors[$i] = 'Abbreviation'; $i++; } - if (mb_strlen($_POST['Abbreviation']) > 3) { + if (strlen($_POST['Abbreviation']) > 3) { $InputError = 1; prnMsg(_('The currency abbreviation must be 3 characters or less long and for automated currency updates to work correctly be one of the ISO4217 currency codes'),'error'); $Errors[$i] = 'Abbreviation'; @@ -68,22 +68,24 @@ $Errors[$i] = 'DecimalPlaces'; $i++; } - if (mb_strlen($_POST['Country']) > 50) { + if (strlen($_POST['CurrencyName']) > 20) { $InputError = 1; + prnMsg(_('The currency name must be 20 characters or less long'),'error'); + $Errors[$i] = 'CurrencyName'; + $i++; + } + if (strlen($_POST['Country']) > 50) { + $InputError = 1; prnMsg(_('The currency country must be 50 characters or less long'),'error'); $Errors[$i] = 'Country'; $i++; } - if (mb_strlen($_POST['HundredsName']) > 15) { + if (strlen($_POST['HundredsName']) > 15) { $InputError = 1; prnMsg(_('The hundredths name must be 15 characters or less long'),'error'); $Errors[$i] = 'HundredsName'; $i++; } - if (($FunctionalCurrency != '') and (isset($SelectedCurrency) and $SelectedCurrency==$FunctionalCurrency)){ - $InputError = 1; - prnMsg(_('The functional currency cannot be modified or deleted'),'error'); - } if (mb_strstr($_POST['Abbreviation'],"'") OR mb_strstr($_POST['Abbreviation'],'+') OR mb_strstr($_POST['Abbreviation'],"\"") OR mb_strstr($_POST['Abbreviation'],'&') OR mb_strstr($_POST['Abbreviation'],' ') OR mb_strstr($_POST['Abbreviation'],"\\") OR mb_strstr($_POST['Abbreviation'],'.') OR mb_strstr($_POST['Abbreviation'],'"')) { $InputError = 1; prnMsg( _('The currency code cannot contain any of the following characters') . " . - ' & + \" " . _('or a space'),'error'); @@ -221,7 +223,7 @@ $k++; } // Lets show the country flag - $ImageFile = 'flags/' . mb_strtoupper($myrow[1]) . '.gif'; + $ImageFile = 'flags/' . strtoupper($myrow[1]) . '.gif'; if(!file_exists($ImageFile)){ $ImageFile = 'flags/blank.gif'; @@ -264,7 +266,9 @@ <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td colspan="4">%s</td> + <td colspan="2">%s</td> + <td><a href="%s&SelectedCurrency=%s">%s</a></td> + <td><a href="%s/ExchangeRateTrend.php?%s">' . _('Graph') . '</a></td> </tr>', $ImageFile, $myrow['currabrev'], @@ -273,7 +277,15 @@ $myrow['hundredsname'], $myrow['decimalplaces'], 1, - _('Functional Currency')); + _('Functional Currency'), + htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', + $myrow['currabrev'], + _('Edit'), + htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?', + $myrow['currabrev'], + _('Delete'), + $rootpath, + 'CurrencyToShow=' . $myrow['currabrev']); } } //END WHILE LIST LOOP @@ -349,8 +361,12 @@ echo '</td></tr>'; echo '<tr><td>'._('Exchange Rate').':</td>'; echo '<td>'; - if (!isset($_POST['ExchangeRate'])) {$_POST['ExchangeRate']='0';} - echo '<input ' . (in_array('ExchangeRate',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="ExchangeRate" size="10" maxlength="9" value="'. locale_number_format($_POST['ExchangeRate'],5).'" />'; + if (!isset($_POST['ExchangeRate'])) {$_POST['ExchangeRate']='1';} + if ($myrow[1]!=$FunctionalCurrency){ + echo '<input ' . (in_array('ExchangeRate',$Errors) ? 'class="inputerror"' : '' ) .' type="text" class="number" name="ExchangeRate" size="10" maxlength="9" value="'. locale_number_format($_POST['ExchangeRate'],5).'" />'; + } else { + echo '<input ' . (in_array('ExchangeRate',$Errors) ? 'class="inputerror"' : '' ) .' readonly type="text" class="number" name="ExchangeRate" size="10" maxlength="9" value="'. locale_number_format($_POST['ExchangeRate'],5).'" />'; + } echo '</td></tr>'; echo '<tr><td>'._('Decimal Places to Show').':</td>'; echo '<td>'; @@ -359,7 +375,7 @@ echo '</td></tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="'._('Enter Information').'" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">'._('Enter Information').'</button></div><br />'; echo '</form>'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/CustEDISetup.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -71,7 +71,7 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<br /><table class="selection">'; +echo '<table class="selection">'; $sql = "SELECT debtorno, name, @@ -149,7 +149,7 @@ <td><input tabindex="7" type="text" name="EDIServerPwd" size="20" maxlength="20" value="' . $myrow['ediserverpwd'] . '" /></td></tr>'; } -echo '</table><br /><div class="centre"><input tabindex="8" type="submit" name="submit" value="'._('Update EDI Configuration').'" /></div></form>'; +echo '</table><br /><div class="centre"><button tabindex="8" type="submit" name="submit">'._('Update EDI Configuration').'</button></div><br /></form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/CustLoginSetup.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -593,7 +593,7 @@ echo '</table><br /> - <div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div></form>'; + <div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div><br /></form>'; if (isset($_GET['SelectedUser'])) { echo '<script type="text/javascript">defaultControl(document.forms[0].Password);</script>'; Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/CustWhereAlloc.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -36,7 +36,7 @@ <td><input tabindex="2" type="text" name="TransNo" maxlength="10" size="10" value="'. $_POST['TransNo'] . '" /></td>'; echo '</tr></table><br /> - <div class="centre"><input tabindex="3" type="submit" name="ShowResults" value="'._('Show How Allocated').'" /></div>'; + <div class="centre"><button tabindex="3" type="submit" name="ShowResults">'._('Show How Allocated').'</button></div><br />'; if (isset($_POST['ShowResults']) AND $_POST['TransNo']==''){ echo '<br />'; @@ -90,13 +90,14 @@ echo '<tr><th colspan="6"><div class="centre"><font size="3" color="blue"><b>'._('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />'._('Transaction Total').': '. locale_money_format($myrow['totamt'],$myrow['currcode']) . '</font></b></div></th></tr>'; - $tableheader = '<tr><th>'._('Type').'</th> - <th>'._('Number').'</th> - <th>'._('Reference').'</th> - <th>'._('Ex Rate').'</th> - <th>'._('Amount').'</th> - <th>'._('Alloc').'</th> - </tr>'; + $tableheader = '<tr> + <th>'._('Type').'</th> + <th>'._('Number').'</th> + <th>'._('Reference').'</th> + <th>'._('Ex Rate').'</th> + <th>'._('Amount').'</th> + <th>'._('Alloc').'</th> + </tr>'; echo $tableheader; $RowCounter = 1; Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/CustomerAllocations.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -418,7 +418,7 @@ <td class="number"><b><u>' . locale_money_format($TotalAllocated,$_SESSION['Alloc']->CurrCode) . '</u></b></td>'; $j++; echo '<td rowspan="2"> - <input tabindex='.$j.' type="submit" name="RefreshAllocTotal" value="' . _('Recalculate Total To Allocate') . '" /></td>'; + <button tabindex='.$j.' type="submit" name="RefreshAllocTotal">' . _('Recalculate Total To Allocate') . '</button></td>'; echo '<tr> <td colspan="5" class="number"><b>'._('Left to allocate').'</b></td> @@ -426,8 +426,8 @@ </tr>'; echo '</table><br />'; echo '<input type="hidden" name="TotalNumberOfAllocs" value="' . $Counter . '" />'; - echo '<div class="centre"><input tabindex="'.$j.'" type="submit" name="UpdateDatabase" value="' . _('Process Allocations') . '" />'; - echo '<input tabindex="'.$j.'" type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + echo '<div class="centre"><button tabindex="'.$j.'" type="submit" name="UpdateDatabase">' . _('Process Allocations') . '</button>'; + echo '<button tabindex="'.$j.'" type="submit" name="Cancel">' . _('Cancel') . '</button></div><br />'; } elseif (isset($_GET['DebtorNo'])) { // Page called with customer code Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/CustomerBranches.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -811,7 +811,7 @@ if (!isset($_POST['CustBranchCode'])) {$_POST['CustBranchCode']='';} echo '<td><input tabindex="27" type="text" name="CustBranchCode" size="31" maxlength="30" value="'. $_POST['CustBranchCode'].'" /></td></tr>'; echo '</table>'; - echo '<br /><div class="centre"><input tabindex="28" type="submit" name="submit" value="' . _('Enter Branch') . '" /></div>'; + echo '<br /><div class="centre"><button tabindex="28" type="submit" name="submit">' . _('Enter Branch') . '</button></div><br />'; echo '</form>'; } //end if record deleted no point displaying form to add record Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/CustomerInquiry.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -145,10 +145,15 @@ </tr> </table>'; -echo '<br /><div class="centre"><form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; +echo '<br /><form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo _('Show all transactions after') . ': <input tabindex="1" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" id="datepicker" name="TransAfterDate" value="' . $_POST['TransAfterDate'] . '" maxlength="10" size="12" />' . - ' <input tabindex="2" type="submit" name="Refresh Inquiry" value="' . _('Refresh Inquiry') . '" /></div></form><br />'; +echo '<table class="selection"> + <tr> + <td>' . _('Show all transactions after') . ': </td> + <td><input tabindex="1" type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" id="datepicker" name="TransAfterDate" value="' . $_POST['TransAfterDate'] . '" maxlength="10" size="12" /></td> + <td><button tabindex="2" type="submit" name="Refresh Inquiry">' . _('Refresh Inquiry') . '</button></td> + </tr> + </table></form><br />'; $DateAfterCriteria = FormatDateForSQL($_POST['TransAfterDate']); @@ -185,21 +190,22 @@ echo '<table class="selection" cellpadding="2">'; $tableheader = '<tr> - <th>' . _('Type') . '</th> - <th>' . _('Number') . '</th> - <th>' . _('Date') . '</th> - <th>' . _('Branch') . '</th> - <th>' . _('Reference') . '</th> - <th>' . _('Comments') . '</th> - <th>' . _('Order') . '</th> - <th>' . _('Total') . '</th> - <th>' . _('Allocated') . '</th> - <th>' . _('Balance') . '</th> - <th>' . _('More Info') . '</th> - <th>' . _('More Info') . '</th> - <th>' . _('More Info') . '</th> - <th>' . _('More Info') . '</th> - <th>' . _('More Info') . '</th></tr>'; + <th>' . _('Type') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Branch') . '</th> + <th>' . _('Reference') . '</th> + <th>' . _('Comments') . '</th> + <th>' . _('Order') . '</th> + <th>' . _('Total') . '</th> + <th>' . _('Allocated') . '</th> + <th>' . _('Balance') . '</th> + <th>' . _('More Info') . '</th> + <th>' . _('More Info') . '</th> + <th>' . _('More Info') . '</th> + <th>' . _('More Info') . '</th> + <th>' . _('More Info') . '</th> + </tr>'; echo $tableheader; Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/CustomerTransInquiry.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -44,9 +44,9 @@ echo '<td>' . _('From') . ':</td><td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="FromDate" maxlength="10" size="11" value="' . $_POST['FromDate'] . '" /></td>'; echo '<td>' . _('To') . ':</td><td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" /></td>'; -echo '</tr></table><br /><div class="centre"><input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Transactions') . '" />'; +echo '</tr></table><br /><div class="centre"><button tabindex="4" type="submit" name="ShowResults">' . _('Show Transactions') . '</button>'; -echo '</form></div>'; +echo '</div><br /></form>'; if (isset($_POST['ShowResults']) and $_POST['TransType'] != ''){ $SQL_FromDate = FormatDateForSQL($_POST['FromDate']); @@ -77,7 +77,7 @@ $DbgMsg = _('The SQL that failed was'); $TransResult = DB_query($sql, $db,$ErrMsg,$DbgMsg); - echo '<br /><table cellpadding="2" class="selection">'; + echo '<table cellpadding="2" class="selection">'; $tableheader = '<tr> <th>' . _('Type') . '</th> Modified: trunk/CustomerTypes.php =================================================================== --- trunk/CustomerTypes.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/CustomerTypes.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -222,7 +222,7 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class="selection">'; //Main table + echo '<table class="selection">'; //Main table // The user wish to EDIT an existing type @@ -263,7 +263,7 @@ echo '</td></tr></table>'; // close main table - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Accept') . '</button></div><br />'; echo '</form>'; Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/Customers.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -593,8 +593,8 @@ echo'</table></td></tr></table>'; if ($DataError ==0){ - echo '<br /><div class="centre"><input tabindex="20" type="submit" name="submit" value="' . _('Add New Customer') . '" /> - <input tabindex="21" type="submit" action="reset" value="' . _('Reset') . '" /></div>'; + echo '<br /><div class="centre"><button tabindex="20" type="submit" name="submit">' . _('Add New Customer') . '</button> + <button tabindex="21" type="submit" action="reset">' . _('Reset') . '</button></div>'; } echo '</form>'; @@ -890,7 +890,7 @@ $result = DB_query($sql,$db); echo '<table class="selection">'; - echo '<caption>' . _('Customer Contacts') . '</caption>'; + echo '<tr><th class="header" colspan="6">' . _('Customer Contacts') . '</th></tr>'; if (isset($_GET['Modify'])) { echo '<tr> @@ -904,7 +904,7 @@ <th>' . _('Role') . '</th> <th>' . _('Phone Number') . '</th> <th>' . _('Notes') . '</th> - <th colspan="2"><input type="submit" name="addcontact" value="Add Contact" /></th></tr>'; + <th colspan="2"><button type="submit" name="addcontact">' . _('Add Contact') . '</button></th></tr>'; } $k=0; //row colour counter @@ -987,7 +987,7 @@ <td><textarea name="notes">'.$_POST['notes'].'</textarea></td> </tr> <tr> - <td colspan="2"><input type="submit" name="update" value="update" /></td> + <td colspan="2"><button type="submit" name="update">' . _('update') . '</button></td> </tr> </table>'; } @@ -1018,11 +1018,11 @@ } if (isset($_POST['New']) and $_POST['New']) { - echo '<div class="centre"><input type="submit" name="submit" value="' . _('Add New Customer') . '" /> - <input type="submit" name="reset" value="' . _('Reset') . '" /></div></form>'; + echo '<div class="centre"><button type="submit" name="submit">' . _('Add New Customer') . '</button> + <button type="submit" name="reset">' . _('Reset') . '</button></div></form>'; } else if (!isset($_GET['Modify'])){ - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Update Customer') . '" />'; - echo ' <input type="submit" name="delete" value="' . _('Delete Customer') . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Update Customer') . '</button>'; + echo ' <button type="submit" name="delete" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete Customer') . '</button></div><br /></form>'; } else { echo '</form>'; } Modified: trunk/DailyBankTransactions.php =================================================================== --- trunk/DailyBankTransactions.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/DailyBankTransactions.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -51,7 +51,7 @@ </tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="Show" value="' . _('Show transactions'). '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="Show">' . _('Show transactions'). '</button></div><br />'; echo '</form>'; } else { $SQL = "SELECT bankaccountname, @@ -127,7 +127,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><div class="centre"><input type="submit" name="Return" value="' . _('Select Another Date'). '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="Return">' . _('Select Another Date'). '</button></div><br />'; echo '</form>'; } include('includes/footer.inc'); Modified: trunk/DailySalesInquiry.php =================================================================== --- trunk/DailySalesInquiry.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/DailySalesInquiry.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -23,7 +23,7 @@ echo '<table class="selection"> <tr> <td>' . _('Month to Show') . ':</td> - <td><select tabindex="1" name="MonthToShow">'; + <td><select tabindex="1" name="MonthToShow" onChange="ReloadForm(ShowResults)">'; $PeriodsResult = DB_query("SELECT periodno, lastdate_in_period FROM periods",$db); @@ -37,7 +37,7 @@ } echo '</select></td> <td>' . _('Salesperson') . ':</td> - <td><select tabindex="2" name="Salesperson">'; + <td><select tabindex="2" name="Salesperson" onChange="ReloadForm(ShowResults)">'; $SalespeopleResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); if (!isset($_POST['Salesperson'])){ @@ -60,7 +60,7 @@ </table> <br /> <div class="centre"> - <input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Daily Sales For The Selected Month') . '" /> + <button tabindex="4" type="submit" name="ShowResults">' . _('Show Daily Sales For The Selected Month') . '</button> </div> </form> <br />'; Modified: trunk/DebtorsAtPeriodEnd.php =================================================================== --- trunk/DebtorsAtPeriodEnd.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/DebtorsAtPeriodEnd.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -150,7 +150,7 @@ echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input tabindex="5" type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button tabindex="5" type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/Departments.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -251,7 +251,7 @@ echo '</select></td></tr>'; echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="Submit" value="' . _('Enter Information') . '" /></div>'; + echo '<div class="centre"><button type="submit" name="Submit">' . _('Enter Information') . '</button></div><br />'; echo '</form>'; Modified: trunk/DiscountCategories.php =================================================================== --- trunk/DiscountCategories.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/DiscountCategories.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -84,7 +84,7 @@ } echo '</select></td>'; - echo '<td><input type="submit" name="select" value="'._('Select').'" /></td> + echo '<td><button type="submit" name="select">'._('Select').'</button></td> </tr> </table> <br />'; @@ -127,12 +127,12 @@ <td><input type="text" name="PartID" size="10" maxlength="10" value="' . $_POST['PartID'] . '" /></td> <td>' . _('Partial description') . ':</td> <td><input type="text" name="PartDesc" size="10" value="' . $_POST['PartDesc'] .'" maxlength="10" /></td> - <td><input type="submit" name="search" value="' . _('Search') .'" /></td> + <td><button type="submit" name="search">' . _('Search') .'</button></td> </tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="submit" value="'. _('Update Item') .'" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">'. _('Update Item') .'</button></div>'; if (isset($_POST['search'])) { if ($_POST['PartID']!='' and $_POST['PartDesc']=='') @@ -149,7 +149,7 @@ if (!isset($_POST['stockID'])) { echo _('Select a part code').':<br />'; while ($myrow=DB_fetch_array($result)) { - echo '<input type="submit" name="stockID" value="'.$myrow['stockid'].'" /><br />'; + echo '<button type="submit" name="stockID">'.$myrow['stockid'].'</button><br />'; } } } @@ -168,7 +168,7 @@ echo '<option value="'.$myrow['categoryid'].'">'.$myrow['categorydescription'].'</option>'; } echo '</select></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="SubmitCategory" value="'. _('Update Items') .'" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="SubmitCategory">'. _('Update Items') .'</button></div>'; } echo '</form>'; @@ -198,8 +198,8 @@ echo '<br /><table class="selection">'; echo '<tr> - <th>'. _('Discount Category') .'</th> - <th>'. _('Item') .'</th></tr>'; + <th>'. _('Discount Category') .'</th> + <th>'. _('Item') .'</th></tr>'; $k=0; //row colour counter @@ -244,7 +244,7 @@ echo '</select></td></tr> </table> <br />'; - echo '<div class="centre"><input type="submit" name="selectchoice" value="'._('Select').'" /></div>'; + echo '<div class="centre"><button type="submit" name="selectchoice">'._('Select').'</button></div><br />'; } include('includes/footer.inc'); Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/DiscountMatrix.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -139,7 +139,7 @@ echo '</table><br />'; echo '<div class="centre"> - <input tabindex="5" type="submit" name="submit" value="' . _('Enter Information') . '" /></div><br />'; + <button tabindex="5" type="submit" name="submit">' . _('Enter Information') . '</button></div><br />'; $sql = "SELECT sales_type, salestype, @@ -155,10 +155,12 @@ $result = DB_query($sql,$db); echo '<table class="selection">'; -echo '<tr><th>' . _('Sales Type') . '</th> - <th>' . _('Discount Category') . '</th> - <th>' . _('Quantity Break') . '</th> - <th>' . _('Discount Rate') . ' %' . '</th></tr>'; +echo '<tr> + <th>' . _('Sales Type') . '</th> + <th>' . _('Discount Category') . '</th> + <th>' . _('Quantity Break') . '</th> + <th>' . _('Discount Rate') . ' %' . '</th> + </tr>'; $k=0; //row colour counter @@ -173,16 +175,16 @@ $DeleteURL = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?Delete=yes&SalesType=' . $myrow['salestype'] . '&DiscountCategory=' . $myrow['discountcategory'] . '&QuantityBreak=' . $myrow['quantitybreak']; printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><a href="%s">' . _('Delete') . '</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><a href="%s">' . _('Delete') . '</td> </tr>', - $myrow['sales_type'], - $myrow['discountcategory'], - $myrow['quantitybreak'], - $myrow['discountrate']*100 , - $DeleteURL); + $myrow['sales_type'], + $myrow['discountcategory'], + $myrow['quantitybreak'], + $myrow['discountrate']*100 , + $DeleteURL); } Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/EDIMessageFormat.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -162,7 +162,7 @@ echo '</table><br />'; if (DB_num_rows($result)==0){ echo '<div class="centre"> - <input tabindex="1" type="submit" name="NewEDIInvMsg" value="' . _('Create New EDI Invoice Message From Default Template') . '" /> + <button tabindex="1" type="submit" name="NewEDIInvMsg">' . _('Create New EDI Invoice Message From Default Template') . '</button> </div><br />'; } } //end of ifs SelectedLine is not set @@ -243,9 +243,9 @@ echo '</td></tr>'; echo '</table><br />'; if (isset($_GET['SelectedMessageLine'])) { - echo '<div class="centre"><input tabindex="5" type="submit" name="update" value="'. _('Update Information'). '" /></div>'; + echo '<div class="centre"><button tabindex="5" type="submit" name="update">'. _('Update Information'). '</button></div><br />'; } else { - echo '<div class="centre"><input tabindex="5" type="submit" name="submit" value="'. _('Enter Information'). '" /></div>'; + echo '<div class="centre"><button tabindex="5" type="submit" name="submit">'. _('Enter Information'). '</button></div><br />'; } echo '</form>'; Modified: trunk/EmailCustTrans.php =================================================================== --- trunk/EmailCustTrans.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/EmailCustTrans.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -34,6 +34,7 @@ include ('includes/header.inc'); +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/email.gif" title="' . _('Contract') . '" alt="" /> ' . $title . '</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -41,7 +42,7 @@ echo '<input type="hidden" name="TransNo" value="' . $_GET['FromTransNo'] . '" />'; echo '<input type="hidden" name="InvOrCredit" value="' . $_GET['InvOrCredit'] . '" />'; -echo '<br /><table>'; +echo '<br /><table class="selection">'; $SQL = "SELECT email FROM custbranch INNER JOIN debtortrans @@ -64,7 +65,7 @@ <td><input type="text" name="EmailAddr" maxlength="60" size="60" value="' . $EmailAddress . '" /></td> </table>'; -echo '<br /><div class="centre"><input type="submit" name="DoIt" value="' . _('OK') . '" />'; -echo '</div></form>'; +echo '<br /><div class="centre"><button type="submit" name="DoIt">' . _('OK') . '</button>'; +echo '</div><br /></form>'; include ('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/ExchangeRateTrend.php =================================================================== --- trunk/ExchangeRateTrend.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/ExchangeRateTrend.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -24,7 +24,7 @@ echo '<form method="post" name=update action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p>'; - echo '<table>'; // First column + echo '<table class="selection">'; // First column $SQL = "SELECT currabrev, country, @@ -51,7 +51,7 @@ echo '</table>'; /*close off the table in the third column */ - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Accept') . '</button></div>'; echo '</form>'; @@ -65,7 +65,7 @@ $image = 'http://www.x-rates.com/d/' . $graph; echo '<br /></div><table class="selection">'; - echo '<tr><th><div class="centre"><font size="4" color="blue"><b><U>' . $FunctionalCurrency . ' / ' . $CurrencyToShow . '</b></U></font></th></tr>'; + echo '<tr><th class="header">' . $FunctionalCurrency . ' / ' . $CurrencyToShow . '</th></tr>'; echo '<tr><td><img src=' . $image . ' alt="Trend Currently Unavailable" /></td></tr>'; echo '</table>'; Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/Factors.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -17,7 +17,7 @@ if (isset($_POST['Create'])) { $FactorID = 0; - $_POST['New'] = "Yes"; + $_POST['New'] = 'Yes'; }; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Factor Companies') . '" alt="" />' . ' ' .$title . '</p>'; @@ -205,8 +205,8 @@ echo '<td><a href="'.$rootpath . '/Factors.php?FactorID='.$myrow['id'].'">'._('Edit').'</a></td></tr>'; } echo '</table><br /><div class="centre">'; - echo '<br /><input tabindex="3" type="submit" name="Create" value="' . _('Create New Factor') . '" />'; - echo '</div></form>'; + echo '<br /><button tabindex="3" type="submit" name="Create">' . _('Create New Factor') . '</button>'; + echo '</div><br /></form>'; include('includes/footer.inc'); exit; @@ -282,11 +282,11 @@ if (isset($_POST['Create'])) { - echo '</table><br /><div class="centre"><input tabindex="12" type="submit" name="submit" value="' . _('Insert New Factor') . '" /></div>'; + echo '</table><br /><div class="centre"><button tabindex="12" type="submit" name="submit">' . _('Insert New Factor') . '</button></div>'; } else if (isset($_POST['amend'])) { - echo '</table><p><div class="centre"><input tabindex="13" type="submit" name="update" value="' . _('Update Factor') . '" /></p>'; + echo '</table><p><div class="centre"><button tabindex="13" type="submit" name="update">' . _('Update Factor') . '</button></p>'; prnMsg ( _('There is no second warning if you hit the delete button below') . '. ' . _('However checks will be made to ensure there are no suppliers are using this factor before the deletion is processed'), 'warn'); - echo '<br /><input tabindex="14" type="submit" name="delete" value="' . _('Delete Factor') . '" onclick="return confirm(' . _('Are you sure you wish to delete this factoring company?') . '");" /></form></div>'; + echo '<br /><button tabindex="14" type="submit" name="delete" onclick="return confirm(' . _('Are you sure you wish to delete this factoring company?') . '");" />' . _('Delete Factor') . '</button></form></div>'; } Modified: trunk/FixedAssetCategories.php =================================================================== --- trunk/FixedAssetCategories.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/FixedAssetCategories.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -325,7 +325,7 @@ echo '</select></td></tr></table><br />'; -echo '<div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '" /></div>'; +echo '<div class="centre"><button type="submit" name="submit">' . _('Enter Information') . '</button></div>'; echo '</form><br />'; Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/FixedAssetDepreciation.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -89,7 +89,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Fixed Asset Depreciation') . '" alt="" />' . ' ' . $title . '</p>'; -echo '<table>'; +echo '<table class="selection">'; $Heading = '<tr><th>' . _('Asset ID') . '</th> <th>' . _('Description') . '</th> <th>' . _('Date Purchased') . '</th> @@ -275,7 +275,7 @@ echo '<td>'._('Date to Process Depreciation'). ':</td> <td>' . $_POST['ProcessDate'] .'</td>'; } - echo '<td><div class="centre"><input type="submit" name="CommitDepreciation" value="'._('Commit Depreciation').'" /></div>'; + echo '<td><div class="centre"><button type="submit" name="CommitDepreciation">'._('Commit Depreciation').'</button></div>'; echo '</tr></table><br />'; echo '</form>'; } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/FixedAssetItems.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -582,15 +582,15 @@ </table>'; if ($New==0) { - echo '<div class="centre"><br /><input type="submit" name="submit" value="' . _('Insert New Fixed Asset') . '" />'; + echo '<div class="centre"><br /><button type="submit" name="submit">' . _('Insert New Fixed Asset') . '</button>'; } else { - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Update') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="submit">' . _('Update') . '</button></div>'; prnMsg( _('Only click the Delete button if you are sure you wish to delete the asset. Only assets with a zero book value can be deleted'), 'warn', _('WARNING')); - echo '<br /><div class="centre"><input type="submit" name="delete" value="' . _('Delete This Asset') . '" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="delete" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');">' . _('Delete This Asset') . '</button></div>'; } -echo '</form></div>'; +echo '</div></form><br />'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/FixedAssetLocations.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -149,13 +149,13 @@ echo '<div class="centre">'; if (isset($_GET['SelectedLocation'])) { - echo '<input type="submit" name="update" value="' . _('Update Information') . '" />'; + echo '<button type="submit" name="update">' . _('Update Information') . '</button>'; echo '<br />'; - echo '<br /><div class="centre"><input type="submit" name="delete" value="' . _('Delete This Location') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="delete">' . _('Delete This Location') . '</button></div>'; } else { - echo '<input type="submit" name="submit" value="' . _('Enter Information') . '" />'; + echo '<button type="submit" name="submit">' . _('Enter Information') . '</button>'; } -echo '</div>'; +echo '</div><br />'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/FixedAssetRegister.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -77,9 +77,9 @@ } else { echo '<form name="RegisterForm" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<div class="centre">' ._('From') . ':' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate'] . '</div>'; - echo '<br /><table width="80%" cellspacing="1" class="selection"><tr>'; - echo '<th>' . _('Asset ID') . '</th>'; + echo '<br /><table width="80%" cellspacing="1" class="selection">'; + echo '<tr><th class="header" colspan="13">' ._('From') . ':' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate'] . '</th></tr>'; + echo '<tr><th>' . _('Asset ID') . '</th>'; echo '<th>' . _('Description') . '</th>'; echo '<th>' . _('Serial Number') . '</th>'; echo '<th>' . _('Location') . '</th>'; @@ -232,8 +232,8 @@ echo '<th class="number">' . locale_money_format($TotalNBV, $_SESSION['CompanyRecord']['currencydefault']) . '</th>'; echo '<th class="number">' . locale_money_format($TotalDisposals, $_SESSION['CompanyRecord']['currencydefault']) . '</th></tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="pdf" value="' . _('Print as a pdf') . '" /> '; - echo '<input type="submit" name="csv" value="' . _('Print as CSV') . '" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="pdf">' . _('Print as a pdf') . '</button> '; + echo '<button type="submit" name="csv">' . _('Print as CSV') . '</button></div><br /></form>'; } } else { include ('includes/header.inc'); @@ -293,9 +293,9 @@ echo '</tr>'; echo '</table><br />'; - echo '<div class="centre"><input type="submit" name="submit" value="' . _('Show Assets') . '" /> '; - echo '<input type="submit" name="pdf" value="' . _('Print as a pdf') . '" /> '; - echo '<input type="submit" name = "csv" value= "' . _('Print as CSV') . '" /></div>'; + echo '<div class="centre"><button type="submit" name="submit">' . _('Show Assets') . '</button> '; + echo '<button type="submit" name="pdf">' . _('Print as a pdf') . '</button> '; + echo '<button type="submit" name = "csv">' . _('Print as CSV') . '</button></div><br />'; echo '</form>'; } include ('includes/footer.inc'); Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/FixedAssetTransfer.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -27,12 +27,13 @@ echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<table class="selection"><tr>'; - echo '<td>'. _('In Asset Category') . ': '; - echo '<select name="AssetCat">'; + echo '<table class="selection"> + <tr> + <td>'. _('In Asset Category') . ': + <select name="AssetCat">'; if (!isset($_POST['AssetCat'])) { - $_POST['AssetCat'] = ""; + $_POST['AssetCat'] = ''; } while ($myrow = DB_fetch_array($result)) { @@ -44,16 +45,16 @@ } echo '</select>'; - echo '<td>'. _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>'; + echo '<td>'. _('Enter partial') . '<b> ' . _('Description') . '</b>:</td>'; if (isset($_POST['Keywords'])) { - echo '<input type="text" name="Keywords" value="' . trim($_POST['Keywords'],'%') . '" size="20" maxlength="25" />'; + echo '<td><input type="text" name="Keywords" value="' . trim($_POST['Keywords'],'%') . '" size="20" maxlength="25" /></td></tr>'; } else { - echo '<input type="text" name="Keywords" size="20" maxlength="25" />'; + echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td></tr>'; } - echo '</td></tr><tr><td></td>'; + echo '<tr><td></td>'; echo '<td><font size="3"><b>' . _('OR').' ' . '</b></font>' . _('Enter partial') .' <b>'. _('Asset Code') . '</b>:</td>'; echo '<td>'; @@ -64,9 +65,24 @@ echo '<input type="text" name="AssetID" size="15" maxlength="18" />'; } - echo '</td></tr></table><br />'; + echo '</td></tr>'; - echo '<div class="centre"><input type="submit" name="Search" value="'. _('Search Now') . '" /></div></form><br />'; + echo '<tr><td></td>'; + + echo '<td><font size="3"><b>' . _('OR').' ' . '</b></font>' . _('Enter partial') .' <b>'. _('Serial Number') . '</b>:</td>'; + echo '<td>'; + + if (isset($_POST['AssetID'])) { + echo '<input type="text" name="SerialNumber" value="'. trim($_POST['SerialNumber'],'%') . '" size="15" maxlength="18" />'; + } else { + echo '<input type="text" name="SerialNumber" size="15" maxlength="18" />'; + } + + echo '</td></tr>'; + + echo '</table><br />'; + + echo '<div class="centre"><button type="submit" name="Search">'. _('Search Now') . '</button></div></form><br />'; } if (isset($_POST['Search'])) { @@ -101,6 +117,7 @@ AND fixedassets.assetid " . LIKE . "'".$_POST['AssetID']."' AND fixedassets.serialno " . LIKE . "'".$_POST['SerialNumber']."'"; $Result=DB_query($sql, $db); + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="'. htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><th>'._('Asset ID') . '</th> @@ -138,7 +155,7 @@ echo '<input type="hidden" name="Keywords" value="' . $_POST['Keywords'].'" />'; echo '<input type="hidden" name="AssetID" value="' . $_POST['AssetID'].'" />'; echo '<input type="hidden" name="Search" value="' . $_POST['Search'].'" />'; - echo '<td><input type="submit" name="Move'.$myrow['assetid'].'" value="Move" /></td>'; + echo '<td><button type="submit" name="Move'.$myrow['assetid'].'">' . _('Move') . '</button></td>'; echo '</tr>'; } echo '</table></form>'; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2012-05-02 15:10:27 UTC (rev 8765) +++ trunk/FormDesigner.php 2012-05-02 15:11:26 UTC (rev 8766) @@ -132,7 +132,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; echo '<form method="post" id="ChooseForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table><tr>'; + echo '<table class="selection"><tr>'; echo '<td>'. _('Select the form to edit') .'</td><td><select name="FormName">'; /* Iterate throght the appropriate companies FormDesigns/ directory * and extract the form name from each of the xml files found */ @@ -146,7 +146,7 @@ closedir($handle); } echo '</select></td></tr></table>'; - echo '<br /><div class="centre"><input tabindex="6" type="submit" name="submit" value="' . _('Edit Form Layout') . '" /></div>'; + echo '<br /><div class="centre"><button tabindex="6" type="submit" name="submit">' . _('Edit Form Layout') . '</button></div><br />'; echo '</form>'; include('includes/footer.inc'); exit; @@ -162,11 +162,11 @@ $Papers=array('A4_Landscape', 'A4_Portrait', 'A5_Landscape', 'A5_Portrait', 'A3_Landscape', 'A3_Portrait', 'letter_Portrait', 'letter_Landscape', 'legal_Portrait', 'legal_Landscape'); // Possible paper sizes/orientations echo '<form method="post" id="Form" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<input name=FormName type="hidden" value="'.$_POST['FormName'].'" />'; -echo '<table width=95% border=1>'; //Start of outer table -echo '<tr><th width=33%>'._('Form Name').'<input type="text" name="formname" value="'.$FormDesign['name'].'" /></th>'; +echo '<input name="FormName" type="hidden" value="'.$_POST['FormName'].'" />'; +echo '<table width="95%" class="selection">'; //Start of outer table +echo '<tr><th width="33%" class="header">'._('Form Name').' <input type="text" name="formname" value="'.$FormDesign['name'].'" /></th>'; /* Select the paper size/orientation */ -echo '<th width=33%>'._('Paper Size').'<select name="PaperSize">'; +echo '<th width="33%" class="header">'._('Paper Size').' <select name="PaperSize">'; foreach ($Papers as $Paper) { if (mb_substr($Paper,-8)=='Portrait') { $PaperValue=mb_substr($Paper,0,mb_strlen($Paper)-9); @@ -181,12 +181,12 @@ } echo '</select></th>'; /* and the standard line height for the form */ -echo '<th width="33%">'._('Line Height').'<input type="text" class="number" name="LineHeight" size="3" maxlength="3" value="'.$FormDesign->LineHeight.'" /></th></tr><tr>'; +echo '<th width="33%" class="header">'._('Line Height').' <input type="text" class="number" name="LineHeight" size="3" maxlength="3" value="'.$FormDesign->LineHeight.'" /></th></tr><tr>'; $counter=1; // Count how many sub tables are in the row foreach ($FormDesign as $key) { switch ($key['type']) { case 'image': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="8">'.$key['name'].'</th></tr>'; + echo '<td colspan="1" valign="top"><table width="100%" class="selection"><tr><th colspan="8" class="header">'.$key['name'].'</th></tr>'; echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'" /></td>'; @@ -195,19 +195,19 @@ $counter=$counter+1; break; case 'SimpleText': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'."\n"; + echo '<td colspan="1" valign="top"><table width="100%" class="selection"><tr><th colspan="6" class="header">'.$key['name'].'</th></tr>'."\n"; SimpleTextLine($key); echo '</table></td>'; $counter=$counter+1; break; case 'MultiLineText': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="4">'.$key['name'].'</th></tr>'."\n"; + echo '<td colspan="1" valign="top"><table width="100%" class="selection"><tr><th colspan="4" class="header">'.$key['name'].'</th></tr>'."\n"; MultiTextLine($key); echo '</table></td>'; $counter=$counter+1; break; case 'ElementArray': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="7">'.$key['name'].'</th></tr>'."\n"; + echo '<td colspan="1" valign="top"><table width="100%" class="selection"><tr><th colspan="7" class="header">'.$key['name'].'</th></tr>'."\n"; foreach ($key as $subkey) { if ($subkey['type']=='SimpleText') { echo '<tr>'; @@ -234,7 +234,7 @@ $counter=$counter+1; break; case 'CurvedRectangle': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'; + echo '<td colspan="1" valign="top"><table width="100%" class="selection"><tr><th colspan="6" class="header">'.$key['name'].'</th></tr>'; echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'" /></td></tr><tr>'; @@ -244,7 +244,7 @@ $counter=$counter+1; break; case 'Rectangle': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'; + echo '<td colspan="1" valign="top"><table width="100%" class="selection"><tr><th colspan="6" class="header">'.$key['name'].'</th></tr>'; echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td></tr><tr>'; echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'" /></td>'; @@ -253,7 +253,7 @@ $counter=$counter+1; break; case 'Line': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'; + echo '<td colspan="1" valign="top"><table width="100%" class="selection"><tr><th colspan="6" class="header">'.$key['name'].'</th></tr>'; echo '<td class="number">'._('Start x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'startx" size="4" maxlength="4" value="'.$key->startx.'" /></td>'; echo '<td class="number">'._('Start y co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'starty" size="4" maxlength="4" value="'.$key->starty.'" /></td></tr><tr>'; echo '<td class="number">'._('End x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'endx" size="4" maxlength="4" value="'.$key->endx.'" /></td>'; @@ -268,8 +268,8 @@ } } echo '</tr></table>'; //End of outer table -echo '<br /><div class="centre"><input tabindex="6" type="submit" name="preview" value="' . _('Preview the Form Layout') . '" /></div>'; -echo '<br /><div class="centre"><input tabindex="6" type="submit" name="save" value="' . _('Save the Form Layout') . '" /></div>'; +echo '<br /><div class="centre"><button tabindex="6" type="submit" name="preview">' . _('Preview the Form Layout') . '</button></div>'; +echo '<br /><div class="centre"><button tabindex="6" type="submit" name="save">' . _('Save the Form Layout') . '</button></div><br />'; echo '</form>'; include('includes/footer.inc'); ?> \ No newline at end of file ... [truncated message content] |
From: <tim...@us...> - 2012-05-02 20:52:30
|
Revision: 8767 http://weberp.svn.sourceforge.net/weberp/?rev=8767&view=rev Author: tim_schofield Date: 2012-05-02 20:52:23 +0000 (Wed, 02 May 2012) Log Message: ----------- Layout improvements, new css and buttons Modified Paths: -------------- trunk/BOMIndentedReverse.php trunk/BOMInquiry.php trunk/BOMListing.php trunk/BOMs.php trunk/COGSGLPostings.php trunk/CompanyPreferences.php trunk/ConfirmDispatch_Invoice.php trunk/ContractCosting.php trunk/ContractOtherReqts.php trunk/CopyBOM.php trunk/CounterSales.php trunk/Credit_Invoice.php Modified: trunk/BOMIndentedReverse.php =================================================================== --- trunk/BOMIndentedReverse.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/BOMIndentedReverse.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -246,7 +246,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<br /><br /><form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; + echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Part') . ':</td>'; echo '<td><input type ="text" name="Part" size="20" />'; @@ -254,7 +254,7 @@ echo '<option selected="True" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; echo '<option value="no">' . _('Plain Print') . '</option>'; echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/BOMInquiry.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -13,6 +13,8 @@ } if (!isset($_POST['StockID'])) { + + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p><br />'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> <div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to view the costed bill of materials') . '.' . '<br /><font size="1">' . @@ -22,7 +24,7 @@ ' <b>' . _('description') . '</b>:</font></td><td><input tabindex="1" type="text" name="Keywords" size="20" maxlength="25" /></td> <td><font size="3"><b>' . _('OR') . '</b></font></td><td><font size="1">' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</font></td><td><input tabindex="2" type="text" name="StockCode" size="15" maxlength="20" /></td> - </tr></table><br /><div class="centre"><input tabindex="3" type="submit" name="Search" value="' . _('Search Now') . '" /></div><br />'; + </tr></table><br /><div class="centre"><button tabindex="3" type="submit" name="Search">' . _('Search Now') . '</button></div><br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; } @@ -87,7 +89,7 @@ if (isset($_POST['Search']) and isset($result) AND !isset($SelectedParent)) { - echo '<br /><hr /><br /><table class="selection" cellpadding="2">'; + echo '<br /><table class="selection" cellpadding="2">'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('On Hand') . '</th> @@ -112,11 +114,12 @@ $StockOnHand = number_format($myrow['totalonhand'],2); } $tabindex=$j+4; - printf('<td><input tabindex="'.$tabindex.'" type="submit" name="StockID" value="%s" /></td> + printf('<td><button tabindex="'.$tabindex.'" type="submit" name="StockID" value="%s">%s</button></td> <td>%s</td> <td class="number">%s</td> <td>%s</td></tr>', $myrow['stockid'], + $myrow['stockid'], $myrow['description'], $StockOnHand, $myrow['units'] @@ -163,8 +166,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; echo '<table class="selection" cellpadding="2">'; - echo '<tr><th colspan="5"><div class="centre"><font size="4"><b>' . $myrow[0] . ' : ' . _('per') . ' ' . $myrow[1] . - '</b></font></div></th></tr>'; + echo '<tr><th colspan="5" class="header">' . $myrow[0] . ' : ' . _('per') . ' ' . $myrow[1] . '</div></th></tr>'; $TableHeader = '<tr> <th>' . _('Component') . '</th> <th>' . _('Description') . '</th> @@ -228,7 +230,7 @@ echo '</table>'; } } else { //no stock item entered - prnMsg(_('Enter a stock item code above') . ', ' . _('to view the costed bill of material for'),'info'); + prnMsg(_('Select a stock item code above') . ', ' . _('to view the costed bill of material for'),'info'); } if (!isset($_POST['StockID']) or $_POST['StockID']=='') { Modified: trunk/BOMListing.php =================================================================== --- trunk/BOMListing.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/BOMListing.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -125,7 +125,7 @@ echo '<tr><td>' . _('To Inventory Part Code') . ':' . '</td><td><input tabindex="2" type="text" name="ToCriteria" size="20" maxlength="20" value="zzzzzzz" /></td></tr>'; - echo '</table><br /><div class="centre"><input tabindex="3" type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button tabindex="3" type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; echo '<script>defaultControl(document.forms[0].FromCriteria);</script>'; } include('includes/footer.inc');; Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/BOMs.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -413,7 +413,7 @@ break; } - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select a Different BOM') . '</a></div><br />'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Select a Different BOM') . '</a></div><br />'; echo '<table class="selection">'; // Display Manufatured Parent Items $sql = "SELECT bom.parent, @@ -500,7 +500,7 @@ echo '</div></td></tr>'; } echo '</table><br /><table class="selection">'; - echo '<tr><th colspan="13"><div class="centre"><font color="blue" size="3"><b>'.$SelectedParent .' - ' . $myrow[0] . ' ('. $MBdesc. ') </font></b></th></tr>'; + echo '<tr><th colspan="13" class="header">'.$SelectedParent .' - ' . $myrow[0] . ' ('. $MBdesc. ')</th></tr>'; // *** POPAD&T $BOMTree = array(); @@ -587,7 +587,7 @@ /* echo "Enter the details of a new component in the fields below. <br />Click on 'Enter Information' to add the new component, once all fields are completed."; */ echo '<table class="selection">'; - echo '<tr><th colspan="13"><div class="centre"><font color="blue" size="3"><b>'. _('New Component Details') .'</font></b></th></tr>'; + echo '<tr><th colspan="13" class="header">'. _('New Component Details') .'</th></tr>'; echo '<tr><td>' . _('Component code') . ':</td><td>'; echo '<select ' . (in_array('ComponentCode',$Errors) ? 'class="selecterror"' : '' ) .' tabindex="1" name="Component">'; @@ -714,7 +714,7 @@ echo '<input type="hidden" name="AutoIssue" value="0" />'; } - echo '</table><br /><div class="centre"><input tabindex="8" type="submit" name="Submit" value="' . _('Enter Information') . '" /></form></div>'; + echo '</table><br /><div class="centre"><button tabindex="8" type="submit" name="Submit">' . _('Enter Information') . '</button></div><br /></form>'; } //end if record deleted no point displaying form to add record @@ -792,7 +792,7 @@ ' <b>' . _('description') . '</b>:</font></td><td><input tabindex="1" type="text" name="Keywords" size="20" maxlength="25" /></td> <td><font size="3"><b>' . _('OR') . '</b></font></td><td><font size="1">' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</font></td><td><input tabindex="2" type="text" name="StockCode" size="15" maxlength="18" /></td> - </tr></table><br /><div class="centre"><input tabindex="3" type="submit" name="Search" value="' . _('Search Now') . '" /></div>'; + </tr></table><br /><div class="centre"><button tabindex="3" type="submit" name="Search">' . _('Search Now') . '</button></div><br />'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['Search']) and isset($result) AND !isset($SelectedParent)) { @@ -822,15 +822,16 @@ $StockOnHand = number_format($myrow['totalonhand'],2); } $tab = $j+3; - printf('<td><input tabindex="'.$tab.'" type="submit" name="Select" value="%s" /></td> + printf('<td><button tabindex="'.$tab.'" type="submit" name="Select" value="%s" />%s</button></td> <td>%s</td> - <td class="number">%s</td> - <td>%s</td></tr>', - $myrow['stockid'], - $myrow['description'], - $StockOnHand, - $myrow['units'] - ); + <td class="number">%s</td> + <td>%s</td></tr>', + $myrow['stockid'], + $myrow['stockid'], + $myrow['description'], + $StockOnHand, + $myrow['units'] + ); $j++; //end of page full new headings if Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/COGSGLPostings.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -344,7 +344,7 @@ DB_free_result($result); echo '</select></td></tr></table>'; -echo '<br /><div class="centre"><input tabindex="5" type="submit" name="submit" value="' . _('Enter Information') . '" /></form></div>'; +echo '<br /><div class="centre"><button tabindex="5" type="submit" name="submit">' . _('Enter Information') . '</button></div><br /></form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/CompanyPreferences.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -473,7 +473,7 @@ echo '</select></td></tr>'; -echo '</table><br /><div class="centre"><input tabindex="26" type="submit" name="submit" value="' . _('Update') . '" /></div>'; +echo '</table><br /><div class="centre"><button tabindex="26" type="submit" name="submit">' . _('Update') . '</button></div><br />'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/ConfirmDispatch_Invoice.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -554,7 +554,7 @@ -if (isset($_POST['ProcessInvoice']) and $_POST['ProcessInvoice'] != ""){ +if (isset($_POST['ProcessInvoice'])){ /* SQL to process the postings for sales invoices... @@ -625,7 +625,7 @@ if ($NegativesFound){ echo '<div class="centre"> - <input type="submit" name=Update value="' . _('Update'). '" /></div>'; + <button type="submit" name=Update>' . _('Update'). '</button></div>'; include('includes/footer.inc'); exit; } @@ -1666,10 +1666,10 @@ $j++; echo '</table> <br /><div class="centre"> - <input type="submit" tabindex="'.$j.'" name="Update" value="' . _('Update'). '" /><br />'; + <button type="submit" tabindex="'.$j.'" name="Update">' . _('Update'). '</button><br />'; $j++; - echo '<br /><input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /></div>'; + echo '<br /><button type="submit" tabindex="'.$j.'" name="ProcessInvoice">'._('Process Invoice').'</button></div><br />'; echo '<input type="hidden" name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '" />'; } Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/ContractCosting.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -408,7 +408,7 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedContract=' . $_SESSION['Contract'.$identifier]->ContractRef . '&identifier=' . $identifier . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><div class="centre"><input type="submit" name="CloseContract" value="' . _('Close Contract') . '" onclick="return confirm(\'' . _('Closing the contract will prevent further stock being issued to it and charges being made against it. Variances will be taken to the profit and loss account. Are You Sure?') . '\');" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="CloseContract" onclick="return confirm(\'' . _('Closing the contract will prevent further stock being issued to it and charges being made against it. Variances will be taken to the profit and loss account. Are You Sure?') . '\');">' . _('Close Contract') . '</button></div>'; echo '</form>'; } Modified: trunk/ContractOtherReqts.php =================================================================== --- trunk/ContractOtherReqts.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/ContractOtherReqts.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -122,8 +122,8 @@ $DisplayTotal = locale_money_format($TotalCost,$_SESSION['Contract'.$identifier]->CurrCode); echo '<tr><td colspan="4" class="number">' . _('Total Other Requirements Cost') . '</td><td class="number"><b>' . $DisplayTotal . '</b></td></tr></table>'; - echo '<br /><div class="centre"><input type="submit" name="UpdateLines" value="' . _('Update Other Requirements Lines') . '" />'; - echo ' <input type="submit" name="BackToHeader" value="' . _('Back To Contract Header') . '" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="UpdateLines">' . _('Update Other Requirements Lines') . '</button>'; + echo '<button type="submit" name="BackToHeader">' . _('Back To Contract Header') . '</button></div>'; } /*Only display the contract other requirements lines if there are any !! */ @@ -135,14 +135,14 @@ $_POST['CostPerUnit']=0; } echo '<table class="selection"> - <tr><th colspan="2">' . _('Enter New Requirements') . '</th></tr> + <tr><th colspan="2" class="header">' . _('Enter New Requirements') . '</th></tr> <tr><td>' . _('Requirement Description') . '</td> <td><textarea name="RequirementDescription" cols="30" rows="3">' . $_POST['RequirementDescription'] . '</textarea></td></tr>'; echo '<tr><td>' . _('Quantity Required') . ':</td><td><input type="text" class="number" name="Quantity" size="10" maxlength="10" value="' . $_POST['Quantity'] . '" /></td></tr>'; echo '<tr><td>' . _('Cost Per Unit') . ':</td><td><input type="text" class="number" name="CostPerUnit" size="10" maxlength="10" value="' . $_POST['CostPerUnit'] . '" /></td></tr>'; echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="EnterNewRequirement" value="' . _('Enter New Contract Requirement') . '" /></div>'; +echo '<br /><div class="centre"><button type="submit" name="EnterNewRequirement">' . _('Enter New Contract Requirement') . '</button></div><br />'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/CopyBOM.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -161,7 +161,7 @@ echo '</select>'; } echo '</table>'; - echo '<br /><div class="centre"><input type="submit" name="Submit" value="Submit" /></div></form>'; + echo '<br /><div class="centre"><button type="submit" name="Submit" value="" />' , _('Submit') . '</button></div><br /></form>'; include('includes/footer.inc'); } Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/CounterSales.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -21,6 +21,7 @@ } else { $identifier=$_GET['identifier']; } + if (isset($_SESSION['Items'.$identifier])){ //update the Items object variable with the data posted from the form $_SESSION['Items'.$identifier]->CustRef = _('Cash Sale'); @@ -556,7 +557,7 @@ ($DiscountPercentage/100), 0, $Narrative, - 'Yes', /*Update DB */ + 'No', /*Update DB */ $_POST['ItemDue_' . $OrderLine->LineNumber], $_POST['POLine_' . $OrderLine->LineNumber], filter_number_input($_POST['GPPercent_' . $OrderLine->LineNumber])); @@ -761,7 +762,7 @@ echo '<br /> <table width="90%" cellpadding="2" class="selection"> - <tr bgcolor="#800000">'; + <tr>'; echo '<th>' . _('Item Code') . '</th> <th>' . _('Item Description') . '</th> <th>' . _('Quantity') . '</th> @@ -887,7 +888,7 @@ <td><textarea name="Comments" cols="23" rows="5">' . stripcslashes($_SESSION['Items'.$identifier]->Comments) .'</textarea></td> </tr>'; echo '</table>'; //end the sub table in the first column of master table - echo '</td><th valign="bottom">'; //for the master table + echo '</td><th style="vertical-align: top;border-width: 0px;">'; //for the master table echo '<table class="selection">'; // a new nested table in the second column of master table //now the payment stuff in this column $PaymentMethodsResult = DB_query("SELECT paymentid, paymentname FROM paymentmethods",$db); @@ -922,8 +923,8 @@ echo '</table>'; //end the sub table in the second column of master table echo '</th></tr></table>'; //end of column/row/master table - echo '<br /><div class="centre"><input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> - <input type="submit" name="ProcessSale" value="' . _('Process The Sale') . '" /></div><br />'; + echo '<br /><div class="centre"><button type="submit" name="Recalculate">' . _('Re-Calculate') . '</button> + <button type="submit" name="ProcessSale">' . _('Process The Sale') . '</button></div><br />'; } # end of if lines @@ -931,7 +932,7 @@ * Invoice Processing Here * ********************************** * */ -if (isset($_POST['ProcessSale']) and $_POST['ProcessSale'] != ""){ +if (isset($_POST['ProcessSale'])){ $InputError = false; //always assume the best //but check for the worst @@ -1542,32 +1543,32 @@ $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); if (isset($OrderLine->SerialItems)) { - foreach ($OrderLine->SerialItems['Number'] as $i => $SerialItemNumber) { - $Batch[$SerialItemNumber]=$OrderLine->SerialItems['Quantity'][$i]; - $SQL="UPDATE stockserialitems - SET quantity=quantity-".filter_number_input($OrderLine->SerialItems['Quantity'][$i]*$OrderLine->ConversionFactor)." - WHERE stockid='".$OrderLine->StockID."' - AND serialno='".$SerialItemNumber."'"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Batch numbers could not be updated'); - $DbgMsg = _('The following SQL to update the stock batch record was used'); - $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + foreach ($OrderLine->SerialItems['Number'] as $i => $SerialItemNumber) { + $Batch[$SerialItemNumber]=$OrderLine->SerialItems['Quantity'][$i]; + $SQL="UPDATE stockserialitems + SET quantity=quantity-".filter_number_input($OrderLine->SerialItems['Quantity'][$i]*$OrderLine->ConversionFactor)." + WHERE stockid='".$OrderLine->StockID."' + AND serialno='".$SerialItemNumber."'"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Batch numbers could not be updated'); + $DbgMsg = _('The following SQL to update the stock batch record was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); - $SQL="INSERT INTO stockserialmoves - (stockmoveno, - stockid, - serialno, - moveqty) - VALUES ( - '" . $StkMoveNo . "', - '" . $OrderLine->StockID . "', - '" . $SerialItemNumber . "', - '-" . filter_number_input($OrderLine->SerialItems['Quantity'][$i]*$OrderLine->ConversionFactor) . "' - )"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Batch numbers could not be updated'); - $DbgMsg = _('The following SQL to insert the stock batch movement was used'); - $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + $SQL="INSERT INTO stockserialmoves + (stockmoveno, + stockid, + serialno, + moveqty) + VALUES ( + '" . $StkMoveNo . "', + '" . $OrderLine->StockID . "', + '" . $SerialItemNumber . "', + '-" . filter_number_input($OrderLine->SerialItems['Quantity'][$i]*$OrderLine->ConversionFactor) . "' + )"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Batch numbers could not be updated'); + $DbgMsg = _('The following SQL to insert the stock batch movement was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + } } - } /*Insert the taxes that applied to this line */ foreach ($OrderLine->Taxes as $Tax) { @@ -2035,7 +2036,7 @@ if ($_SESSION['InvoicePortraitFormat']==0){ echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this receipt'). '</a><br /><br />'; } else { - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PDFReceipt.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this receipt'). '</a><br /><br />'; } echo '<br /><br /><a href="' .htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Start a new Counter Sale') . '</a></div>'; @@ -2196,7 +2197,7 @@ #end of while loop for Frequently Ordered Items echo '<td style="text-align:center" colspan="8"> <input type="hidden" name="OrderItems" value="1" /> - <input type="submit" value="'._('Add to Sale').'" /></td>'; + <button type="submit">'._('Add to Sale').'</button></td>'; echo '</table>'; } //end of if Frequently Ordered Items > 0 if (isset($msg)){ @@ -2230,7 +2231,7 @@ if (!isset($_POST['Keywords'])) { $_POST['Keywords']=''; } - + if (!isset($_POST['StockCode'])) { $_POST['StockCode']=''; } @@ -2243,8 +2244,8 @@ <input tabindex="3" type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> </tr><tr> - <td style="text-align:center"><input tabindex="4" type="submit" name="Search" value="' . _('Search Now') . '" /></td> - <td style="text-align:center"><input tabindex="5" type="submit" name="QuickEntry" value="' . _('Use Quick Entry') . '" /></td>'; + <td style="text-align:center"><button tabindex="4" type="submit" name="Search">' . _('Search Now') . '</button></td> + <td style="text-align:center"><button tabindex="5" type="submit" name="QuickEntry">' . _('Use Quick Entry') . '</button></td>'; if (!isset($_POST['PartSearch'])) { echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.Keywords);}</script>'; @@ -2265,12 +2266,12 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; echo '<tr><td><input type="hidden" name="previous" value="'.locale_number_format($Offset-1,0).'" /> - <input type="submit" name="Prev" value="'._('Prev').'" /></td>'; + <button type="submit" name="Prev">'._('Prev').'</button></td>'; echo '<td style="text-align:center" colspan="6"> <input type="hidden" name="OrderItems" value="1" /> - <input type="submit" value="'._('Add to Sale').'" /></td>'; + <button type="submit">'._('Add to Sale').'</button></td>'; echo '<td><input type="hidden" name="NextList" value="'.locale_number_format($Offset+1,0).'" /> - <input type="submit" name="Next" value="'._('Next').'" /></td></tr>'; + <button type="submit" name="Next">'._('Next').'</button></td></tr>'; $TableHeader = '<tr><th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th> @@ -2400,14 +2401,14 @@ echo '<tr><td> <input type="hidden" name="previous" value="'.locale_number_format($Offset-1,0).'" /> - <input type="submit" name="Prev" value="'._('Prev').'" /></td>'; + <button type="submit" name="Prev">'._('Prev').'</button></td>'; echo '<td style="text-align:center" colspan="6"> <input type="hidden" name="OrderItems" value="1" /> - <input type="submit" value="'._('Add to Sale').'" /> + <button type="submit">'._('Add to Sale').'</button> </td>'; echo '<td> <input type="hidden" name="NextList" value="'.locale_number_format($Offset+1,0).'" /> - <input type="submit" name="Next" value="'._('Next').'" /> + <button type="submit" name="Next">'._('Next').'</button> </td></tr>'; echo '</table></form>'; echo $jsCall; @@ -2441,12 +2442,12 @@ } 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"><button type="submit" name="QuickEntry">' . _('Quick Entry') . '</button> + <button type="submit" name="PartSearch">' . _('Search Parts') . '</button></div>'; } if ($_SESSION['Items'.$identifier]->ItemsOrdered >=1){ - echo '<br /><div class="centre"><input type="submit" name="CancelOrder" value="' . _('Cancel Sale') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel this sale?') . '\');" /></div>'; + echo '<br /><div class="centre"><button type="submit" name="CancelOrder" onclick="return confirm(\'' . _('Are you sure you wish to cancel this sale?') . '\');">' . _('Cancel Sale') . '</button></div>'; } } echo '</form>'; Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-05-02 15:11:26 UTC (rev 8766) +++ trunk/Credit_Invoice.php 2012-05-02 20:52:23 UTC (rev 8767) @@ -147,7 +147,8 @@ $myrow['mbflag'], $myrow['trandate'], 0, - $myrow['discountcategory'], + $myrow['discountcategory'],# + 0, $myrow['controlled'], $myrow['serialised'], $myrow['decimalplaces'], @@ -266,10 +267,7 @@ echo '<table cellpadding="2" class="selection"><tr>'; - echo '<tr><th colspan="13">'; - echo '<div class="centre"><font color="blue" size="4"><b>' . _('Credit Invoice') . ' ' . $_SESSION['ProcessingCredit'] . '</b> - <b>'.' - ' . $_SESSION['CreditItems']->CustomerName . '</b></font> - <font size="3" color="blue"> - ' . _('Credit Note amounts stated in') . ' ' . $_SESSION['CreditItems']->DefaultCurrency . '</div></font>'; + echo '<tr><th colspan="13" class="header">' . _('Credit Invoice') . ' ' . $_SESSION['ProcessingCredit'] . '<b>'.' - ' . $_SESSION['CreditItems']->CustomerName . '</b> ' . _('Credit Note amounts stated in') . ' ' . $_SESSION['CreditItems']->DefaultCurrency . '</th>'; echo '</th></tr>'; echo '<th>' . _('Item Code') . '</th> <th>' . _('Item Description') . '</th> @@ -351,6 +349,11 @@ echo '<td class="number">'; } + $sql="SELECT taxid FROM taxauthorities"; + $result=DB_query($sql, $db); + while ($myrow=DB_fetch_array($result)) { + $TaxTotals[$myrow['taxid']]=0; + } $i=0; // initialise the number of taxes iterated through $TaxLineTotal =0; //initialise tax total for the line if (is_array($LnItm->Taxes) ){ @@ -1538,9 +1541,9 @@ } $j++; echo '<tr><td>' . _('Credit note text') . '</td><td><textarea tabindex="'.$j.'" name="CreditText" cols="31" rows="5">' . $_POST['CreditText'] . '</textarea></td></tr>'; - echo '</table><br /><div class="centre"><button tabindex="'.$j.'" type="submit" name="Update">' . _('Update') . '</button><br />'; + echo '</table><br /><div class="centre"><button tabindex="'.$j.'" type="submit" name="Update">' . _('Update') . '</button></div><br />'; $j++; - echo '<button type="submit" tabindex="'.$j++.'" name="ProcessCredit">' . _('Process Credit') .'</button></div>'; + echo '<div class="centre"><button type="submit" tabindex="'.$j++.'" name="ProcessCredit">' . _('Process Credit') .'</button></div><br />'; } echo '</form>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-03 08:52:24
|
Revision: 8768 http://weberp.svn.sourceforge.net/weberp/?rev=8768&view=rev Author: tim_schofield Date: 2012-05-03 08:52:13 +0000 (Thu, 03 May 2012) Log Message: ----------- Order By changed to Category Description Modified Paths: -------------- trunk/InventoryPlanning.php trunk/InventoryValuation.php Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2012-05-02 20:52:23 UTC (rev 8767) +++ trunk/InventoryPlanning.php 2012-05-03 08:52:13 UTC (rev 8768) @@ -385,7 +385,7 @@ <td>' . _('From Inventory Category Code') . ':</td> <td><select name="FromCriteria">'; - $sql="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categoryid"; + $sql="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; $CatResult= DB_query($sql,$db); while ($myrow = DB_fetch_array($CatResult)){ echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] .'</option>'; Modified: trunk/InventoryValuation.php =================================================================== --- trunk/InventoryValuation.php 2012-05-02 20:52:23 UTC (rev 8767) +++ trunk/InventoryValuation.php 2012-05-03 08:52:13 UTC (rev 8768) @@ -206,7 +206,7 @@ echo '<table class="selection"><tr><td>' . _('From Inventory Category Code') . ':</font></td><td><select name=FromCriteria>'; - $sql="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categoryid"; + $sql="SELECT categoryid, categorydescription FROM stockcategory ORDER BY categorydescription"; $CatResult= DB_query($sql,$db); while ($myrow = DB_fetch_array($CatResult)){ echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categoryid'] . ' - ' . $myrow['categorydescription'] . '</option>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-03 13:40:34
|
Revision: 8770 http://weberp.svn.sourceforge.net/weberp/?rev=8770&view=rev Author: tim_schofield Date: 2012-05-03 13:40:22 +0000 (Thu, 03 May 2012) Log Message: ----------- Merges from kcmc branch Modified Paths: -------------- trunk/AccountSections.php trunk/AddCustomerNotes.php trunk/AgedDebtors.php trunk/AgedSuppliers.php trunk/Areas.php trunk/AuditTrail.php trunk/BOMExtendedQty.php trunk/BOMIndented.php trunk/BankAccounts.php trunk/BankMatching.php trunk/BankReconciliation.php trunk/ConfirmDispatch_Invoice.php trunk/CopyBOM.php trunk/DeliveryDetails.php trunk/PcTypeTabs.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectSalesOrder.php trunk/Shippers.php trunk/SpecialOrder.php trunk/SupplierAllocations.php trunk/css/silverwolf/default.css Modified: trunk/AccountSections.php =================================================================== --- trunk/AccountSections.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/AccountSections.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -205,6 +205,8 @@ if (! isset($_GET['delete'])) { + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p> + <br />'; echo '<form method="post" name="AccountSections" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -255,7 +257,7 @@ <td><input tabindex="2" ' . (in_array('SectionName',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="SectionName" size="30" maxlength="30" value="' . $_POST['SectionName'] . '" /></td> </tr>'; - echo '<tr><td colspan="2"><div class="centre"><input tabindex="3" type="submit" name="submit" value="' . _('Enter Information') . '" /></div></td></tr>'; + echo '<tr><td colspan="2"><div class="centre"><button tabindex="3" type="submit" name="submit">' . _('Enter Information') . '</button></div></td></tr>'; echo '</table><br />'; if (!isset($_GET['SelectedSectionID']) or $_GET['SelectedSectionID']=='') { Modified: trunk/AddCustomerNotes.php =================================================================== --- trunk/AddCustomerNotes.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/AddCustomerNotes.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -238,7 +238,7 @@ echo '<tr> <td colspan="2"> <div class="centre"> - <input type="submit" name="submit" value="'._('Enter Information').'" /> + <button type="submit" name="submit">'._('Enter Information').'</button> </div> </td> </tr> Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/AgedDebtors.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -508,8 +508,8 @@ </table> <br /> <div class="centre"> - <input tabindex="7" type="submit" name="PrintPDF" value="' . _('Print PDF') , '" /> - </div>'; + <button tabindex="7" type="submit" name="PrintPDF">' . _('Print PDF') , '</button> + </div><br />'; } include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/AgedSuppliers.php =================================================================== --- trunk/AgedSuppliers.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/AgedSuppliers.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -320,8 +320,8 @@ </table> <br /> <div class="centre"> - <input tabindex="6" type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> - </div>'; + <button tabindex="6" type="submit" name="PrintPDF">' . _('Print PDF') . '</button> + </div><br />'; } include('includes/footer.inc'); } /*end of else not PrintPDF */ Modified: trunk/Areas.php =================================================================== --- trunk/Areas.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/Areas.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -178,9 +178,11 @@ if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"><br />'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; + if (isset($SelectedArea)) { //editing an existing area @@ -224,7 +226,7 @@ echo '<tr> <td colspan="2"> <div class="centre"> - <input tabindex="3" type="submit" name="submit" value="' . _('Enter Information') .'" /> + <button tabindex="3" type="submit" name="submit">' . _('Enter Information') .'</button> </div> </td> </tr> Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/AuditTrail.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -77,7 +77,7 @@ echo '<td><input type="text" name="ContainingText" size="20" maxlength="20" value="'. $_POST['ContainingText'] . '"></td></tr>'; echo '</table><br />'; -echo '<div class="centre"><input tabindex="5" type="submit" name="View" value="' . _('View') . '" /></div>'; +echo '<div class="centre"><button tabindex="5" type="submit" name="View">' . _('View') . '</button></div><br />'; echo '</form>'; // View the audit trail Modified: trunk/BOMExtendedQty.php =================================================================== --- trunk/BOMExtendedQty.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/BOMExtendedQty.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -250,9 +250,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<br /> - <br /> - <form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"> + echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . ' method="post"> <table class="selection"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> <tr> @@ -278,12 +276,10 @@ </select></td> </tr> </table> - <br /> - <br /> <div class="centre"> <br /> - <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> - </div>'; + <button type="submit" name="PrintPDF">' . _('Print PDF') . '</button> + </div><br />'; include('includes/footer.inc'); Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/BOMIndented.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -252,7 +252,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p><br />'; - echo '<br /><br /><form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; + echo '<form action=' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . ' method="post"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Part') . ':</td>'; echo '<td><input type ="text" name="Part" size="20" />'; @@ -266,7 +266,7 @@ echo '<option selected="True" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; echo '<option value="no">' . _('Plain Print') . '</option>'; echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; + echo '</table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print PDF') . '</button></div><br />'; include('includes/footer.inc'); Modified: trunk/BankAccounts.php =================================================================== --- trunk/BankAccounts.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/BankAccounts.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -213,7 +213,7 @@ } elseif ($myrow['invoice']==2) { $DefaultBankAccount=_('Currency Default'); } - printf('<td>%s<br /><font size="2">%s</font></td> + printf('<td>%s<br />%s</td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -395,7 +395,7 @@ echo '</select></td>'; echo '</tr></table><br /> - <div class="centre"><input tabindex="7" type="submit" name="submit" value="'. _('Enter Information') .'" /></div>'; + <div class="centre"><button tabindex="7" type="submit" name="submit">'. _('Enter Information') .'</button></div><br />'; echo '</form>'; include('includes/footer.inc'); Modified: trunk/BankMatching.php =================================================================== --- trunk/BankMatching.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/BankMatching.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -149,7 +149,7 @@ echo '</table> <br /> <div class="centre"> - <input tabindex="6" type="submit" name="ShowTransactions" value="' . _('Show selected') . ' ' . $TypeName . '" /> + <button tabindex="6" type="submit" name="ShowTransactions">' . _('Show selected') . ' ' . $TypeName . '</button> <p> <a href="' . $rootpath . '/BankReconciliation.php">' . _('Show reconciliation') . '</a> </p> @@ -330,8 +330,8 @@ <br /> <div class="centre"> <input type="hidden" name="RowCounter" value="' . $i . '" /> - <input type="submit" name="Update" value="' . _('Update Matching') . '" /> - </div>'; + <button type="submit" name="Update">' . _('Update Matching') . '</button> + </div><br />'; } echo '</form>'; include('includes/footer.inc'); Modified: trunk/BankReconciliation.php =================================================================== --- trunk/BankReconciliation.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/BankReconciliation.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -123,7 +123,7 @@ include ('includes/GLPostings.inc'); -echo '</table><br /><div class="centre"><input type="submit" tabindex="2" name="ShowRec" value="' . _('Show bank reconciliation statement') . '"></div><br />'; +echo '</table><br /><div class="centre"><button type="submit" tabindex="2" name="ShowRec">' . _('Show bank reconciliation statement') . '</button></div><br />'; if (isset($_POST['ShowRec']) OR isset($_POST['DoExchangeDifference'])){ @@ -323,7 +323,7 @@ echo '<input type="hidden" name="DoExchangeDifference" value="' . $FXStatementBalance . '" />'; echo '<tr><td colspan="6">' . _('Enter the actual bank statement balance') . ' (' . $BankCurrCode . ')</b></td> <td class="number"><input type="text" name="BankStatementBalance" maxlength="15" size="15" value="' . $_POST['BankStatementBalance'] . '" /><td></tr>'; - echo '<tr><td colspan="7" align="center"><input type="submit" name="PostExchangeDifference" value="' . _('Calculate and Post Exchange Difference') . '" onclick="return confirm(\'' . _('This will create a general ledger journal to write off the exchange difference in the current balance of the account. It is important that the exchange rate above reflects the current value of the bank account currency') . ' - ' . _('Are You Sure?') . '\');" /></td></tr>'; + echo '<tr><td colspan="7" align="center"><button type="submit" name="PostExchangeDifference" onclick="return confirm(\'' . _('This will create a general ledger journal to write off the exchange difference in the current balance of the account. It is important that the exchange rate above reflects the current value of the bank account currency') . ' - ' . _('Are You Sure?') . '\');">' . _('Calculate and Post Exchange Difference') . '</button></td></tr>'; } @@ -333,7 +333,7 @@ echo '<tr><td colspan="7"><hr></td></tr> <tr><td colspan="7">' . _('It is normal for foreign currency accounts to have exchange differences that need to be reflected as the exchange rate varies. This reconciliation is prepared using the exchange rate set up in the currencies table (see the set-up tab). This table must be maintained with the current exchange rate before running the reconciliation. If you wish to create a journal to reflect the exchange difference based on the current exchange rate to correct the reconciliation to the actual bank statement balance click below.') . '</td></tr>'; - echo '<tr><td colspan="7" align="center"><input type="submit" name="DoExchangeDifference" value="' . _('Calculate and Post Exchange Difference') . '" /></td></tr>'; + echo '<tr><td colspan="7" align="center"><button type="submit" name="DoExchangeDifference">' . _('Calculate and Post Exchange Difference') . '</button></td></tr>'; } echo '</table>'; } Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/ConfirmDispatch_Invoice.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -625,7 +625,7 @@ if ($NegativesFound){ echo '<div class="centre"> - <button type="submit" name=Update>' . _('Update'). '</button></div>'; + <button type="submit" name="Update">' . _('Update'). '</button></div>'; include('includes/footer.inc'); exit; } Modified: trunk/CopyBOM.php =================================================================== --- trunk/CopyBOM.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/CopyBOM.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -161,7 +161,7 @@ echo '</select>'; } echo '</table>'; - echo '<br /><div class="centre"><button type="submit" name="Submit" value="" />' , _('Submit') . '</button></div><br /></form>'; + echo '<br /><div class="centre"><button type="submit" name="Submit">' , _('Submit') . '</button></div><br /></form>'; include('includes/footer.inc'); } Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/DeliveryDetails.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -1113,7 +1113,7 @@ echo '<td><input type="text" class="number" size="10" maxlength="12" name="FreightCost" value="' . $_SESSION['Items'.$identifier]->FreightCost . '" /></td>'; if ($_SESSION['DoFreightCalc']==true){ - echo '<td><button type="submit" name="Update" value="" />' . _('Recalc Freight Cost') . '</button></td></tr>'; + echo '<td><button type="submit" name="Update">' . _('Recalc Freight Cost') . '</button></td></tr>'; } if ((!isset($_POST['ShipVia']) OR $_POST['ShipVia']=='') AND isset($_SESSION['Items'.$identifier]->ShipVia)){ Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/PcTypeTabs.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -122,7 +122,7 @@ echo '<br />'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><div class="centre"><button type="submit" name=return value="' . _('Return to list of tab types') . '" /></button></div>'; + echo '<br /><div class="centre"><button type="submit" name="return">' . _('Return to list of tab types') . '</button></div>'; echo '</form>'; include('includes/footer.inc'); exit; Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/SelectCustomer.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -317,7 +317,7 @@ $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="" />' . ' ' . _('Customer Notes') . '</div><br />'; - echo '<table width="45%" class+"selection">'; + echo '<table width="45%" class="selection">'; echo '<tr> <th>' . _('date') . '</th> <th>' . _('note') . '</th> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/SelectOrderItems.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -661,7 +661,7 @@ echo '</tr>'; echo '</table>'; echo '<br /><div class="centre"><button tabindex="4" type="submit" name="SearchCust">' . _('Search Now') . '</button>'; - echo '<button tabindex="5" type="submit" value="" />' . _('Reset') . '</button></div>'; + echo '<button tabindex="5" type="submit">' . _('Reset') . '</button></div>'; if (isset($result_CustSelect)) { @@ -1966,7 +1966,7 @@ } echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.part_1);}</script>'; - echo '</table><br /><div class="centre"><button type="submit" name="QuickEntry" value="" />' . _('Quick Entry') . '</button> + echo '</table><br /><div class="centre"><button type="submit" name="QuickEntry">' . _('Quick Entry') . '</button> <button type="submit" name="PartSearch">' . _('Search Parts') . '</button></div>'; } elseif (isset($_POST['SelectAsset'])){ @@ -1986,7 +1986,7 @@ echo '<option value="' . $AssetRow['assetid'] . '">' . $AssetRow['assetid'] . ' - ' . $AssetRow['description'] . '</option>'; } echo '</select></td></tr></table> - <br /><div class="centre"><button type="submit" name="AssetDisposalEntered" value="" />' . _('Add Asset To Order') . '</button> + <br /><div class="centre"><button type="submit" name="AssetDisposalEntered">' . _('Add Asset To Order') . '</button> <button type="submit" name="PartSearch">' . _('Search Parts') . '</button></div>'; } //end of if it is a Quick Entry screen/part search or asset selection form to display Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/SelectSalesOrder.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -592,7 +592,7 @@ $k++; } - printf('<td><button type="submit" name="SelectedStockItem" value="%s">%s</td> + printf('<td><button type="submit" name="SelectedStockItem" value="%s">%s</button></td> <td>%s</td> <td class="number">%s</td> <td>%s</td> @@ -974,7 +974,7 @@ }//end while loop through orders to display if ($_POST['Quotations']=='Orders_Only' AND $AuthRow['cancreate']==0){ //cancreate==0 means can create POs echo '<tr><th colspan="8"></th><th></th><th colspan="2" class="number"> - <button type="submit" name="PlacePO" value="" onclick="return confirm(\'' . _('This will create purchase orders for all the items on the checked sales orders above, based on the preferred supplier purchasing data held in the system. Are You Absolutely Sure?') . '\');">' . _('Place') . "\n" . _('PO') . '</button></th></tr>'; + <button type="submit" name="PlacePO" onclick="return confirm(\'' . _('This will create purchase orders for all the items on the checked sales orders above, based on the preferred supplier purchasing data held in the system. Are You Absolutely Sure?') . '\');">' . _('Place') . "\n" . _('PO') . '</button></th></tr>'; } echo '<tr><td colspan="9" class="number">'; if ($_POST['Quotations']=='Orders_Only'){ Modified: trunk/Shippers.php =================================================================== --- trunk/Shippers.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/Shippers.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -190,7 +190,7 @@ </table> - <br /><div class="centre"><button type="submit" name="submit" value="'. _('Enter Information').'" /></button></div> + <br /><div class="centre"><button type="submit" name="submit">'. _('Enter Information').'</button></div> </form>'; Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/SpecialOrder.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -741,7 +741,7 @@ <br /> <button type="submit" name="Cancel">' . _('Start Again') . '</button> <br /> - <button type="submit" name="Commit" value="" />' . _('Process This Order') . '</button> + <button type="submit" name="Commit">' . _('Process This Order') . '</button> </div> </form>'; Modified: trunk/SupplierAllocations.php =================================================================== --- trunk/SupplierAllocations.php 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/SupplierAllocations.php 2012-05-03 13:40:22 UTC (rev 8770) @@ -529,7 +529,7 @@ echo '<div class="centre"><input type="hidden" name="TotalNumberOfAllocs" value="' . $Counter . '" />'; echo '<br /><button type="submit" name="RefreshAllocTotal">' . _('Recalculate Total To Allocate') . '</button>'; - echo '<button type="submit" name="UpdateDatabase">' . _('Process Allocations') . '</button></div></button>'; + echo '<button type="submit" name="UpdateDatabase">' . _('Process Allocations') . '</button></div>'; } elseif(isset($_GET['SupplierID'])){ Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2012-05-03 08:52:24 UTC (rev 8769) +++ trunk/css/silverwolf/default.css 2012-05-03 13:40:22 UTC (rev 8770) @@ -601,10 +601,12 @@ .main_menu_unselected { background: #aaa; border: 1px solid #777; + border-radius: 5px; /* position: relative; it's not a div but a table */ text-align: center; white-space: nowrap; height: 16pt; + margin-bottom: 10px; } .main_menu_unselected:hover { @@ -623,6 +625,7 @@ .main_menu_selected { background: #241D1D; border: 1px solid #888; + border-radius: 5px; /* position: relative; it's not a div but a table */ text-align: center; white-space: nowrap; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-03 20:27:28
|
Revision: 8777 http://weberp.svn.sourceforge.net/weberp/?rev=8777&view=rev Author: tim_schofield Date: 2012-05-03 19:31:14 +0000 (Thu, 03 May 2012) Log Message: ----------- Standardise customer search into standard functions Modified Paths: -------------- trunk/SelectOrderItems.php trunk/css/silverwolf/default.css trunk/includes/CustomerSearch.php Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2012-05-03 14:17:57 UTC (rev 8776) +++ trunk/SelectOrderItems.php 2012-05-03 19:31:14 UTC (rev 8777) @@ -2,6 +2,7 @@ /* $Id$*/ include('includes/DefineCartClass.php'); +include('includes/CustomerSearch.php'); /* Session started in session.inc for password checking and authorisation level check config.php is in turn included in session.inc*/ @@ -317,115 +318,30 @@ } } -if (isset($_POST['SearchCust']) AND $_SESSION['RequireCustomerSelection']==1 AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ +if (isset($_POST['Search']) AND $_SESSION['RequireCustomerSelection']==1 AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ - if (($_POST['CustKeywords']!='') AND (($_POST['CustCode']!='') OR ($_POST['CustPhone']!=''))) { - prnMsg( _('Customer Branch Name keywords have been used in preference to the Customer Branch Code or Branch Phone Number entered'), 'warn'); - } - elseif (($_POST['CustCode']!='') AND ($_POST['CustPhone']!='')) { - prnMsg(_('Customer Branch Code has been used in preference to the Customer Branch Phone Number entered'), 'warn'); - } else { - if (mb_strlen($_POST['CustKeywords'])>0) { - //insert wildcard characters in spaces - $_POST['CustKeywords'] = mb_strtoupper(trim($_POST['CustKeywords'])); - $SearchString = '%' . str_replace(' ', '%', $_POST['CustKeywords']) . '%'; + $result_CustSelect = CustomerSearchSQL($db); - $SQL = "SELECT custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode, - custbranch.debtorno, - debtorsmaster.name - FROM custbranch - LEFT JOIN debtorsmaster - ON custbranch.debtorno=debtorsmaster.debtorno - WHERE custbranch.brname " . LIKE . " '$SearchString'"; +} /*end of if search for customer codes/names */ - if ($_SESSION['SalesmanLogin']!=''){ - $SQL .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'"; - } - $SQL .= " AND custbranch.disabletrans=0 - ORDER BY custbranch.debtorno, custbranch.branchcode"; - - } elseif (mb_strlen($_POST['CustCode'])>0){ - - $_POST['CustCode'] = mb_strtoupper(trim($_POST['CustCode'])); - - $SQL = "SELECT custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode, - custbranch.debtorno, - debtorsmaster.name - FROM custbranch - LEFT JOIN debtorsmaster - ON custbranch.debtorno=debtorsmaster.debtorno - WHERE custbranch.debtorno " . LIKE . " '%" . $_POST['CustCode'] . "%' - OR custbranch.branchcode " . LIKE . " '%" . $_POST['CustCode'] . "%'"; - - if ($_SESSION['SalesmanLogin']!=''){ - $SQL .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'"; - } - $SQL .= " AND custbranch.disabletrans=0 - ORDER BY custbranch.debtorno"; - } elseif (mb_strlen($_POST['CustPhone'])>0){ - $SQL = "SELECT custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode, - custbranch.debtorno, - debtorsmaster.name - FROM custbranch - LEFT JOIN debtorsmaster - ON custbranch.debtorno=debtorsmaster.debtorno - WHERE custbranch.phoneno " . LIKE . " '%" . $_POST['CustPhone'] . "%'"; - - if ($_SESSION['SalesmanLogin']!=''){ - $SQL .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'"; - } - - $SQL .= " AND custbranch.disabletrans=0 - ORDER BY custbranch.debtorno"; - } else { - $SQL = "SELECT custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode, - custbranch.debtorno, - debtorsmaster.name - FROM custbranch - LEFT JOIN debtorsmaster - ON custbranch.debtorno=debtorsmaster.debtorno"; - if ($_SESSION['SalesmanLogin']!=''){ - $SQL .= " AND custbranch.salesman='" . $_SESSION['SalesmanLogin'] . "'"; - } +/*Need to figure out the number of the form variable that the user clicked on */ +if (!isset($_POST['Select'])) { + for ($i=0; $i< count($_POST); $i++){ //loop through the returned customers + if(isset($_POST['SubmitCustomerSelection'.$i])){ + break; } + } + if ($i!=count($_POST)){ + $_POST['Select'] = $_POST['SelectedCustomer'.$i]; + $_SESSION['Items'.$identifier]->Branch = $_POST['SelectedBranch'.$i]; + unset($_POST['Search']); + } +} - $ErrMsg = _('The searched customer records requested cannot be retrieved because'); - $result_CustSelect = DB_query($SQL,$db,$ErrMsg); - - if (DB_num_rows($result_CustSelect)==1){ - $myrow=DB_fetch_array($result_CustSelect); - $_POST['Select'] = $myrow['debtorno'] . ' - ' . $myrow['branchcode']; - } elseif (DB_num_rows($result_CustSelect)==0){ - prnMsg(_('No Customer Branch records contain the search criteria') . ' - ' . _('please try again') . ' - ' . _('Note a Customer Branch Name may be different to the Customer Name'),'info'); - } - } /*one of keywords or custcode was more than a zero length string */ -} /*end of if search for customer codes/names */ - - // will only be true if page called from customer selection form or set because only one customer // record returned from a search so parse the $Select string into customer code and branch code */ if (isset($_POST['Select']) and $_POST['Select']!='') { - $_SESSION['Items'.$identifier]->Branch = mb_substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); - - $_POST['Select'] = mb_substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); - // Now check to ensure this account is not on hold */ $sql = "SELECT debtorsmaster.name, holdreasons.dissallowinvoices, @@ -641,74 +557,10 @@ OR !isset($_SESSION['Items'.$identifier]->DebtorNo) OR $_SESSION['Items'.$identifier]->DebtorNo=='') { + ShowCustomerSearchFields($rootpath, $theme, $db); - 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 '<br /><form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier=' . $identifier . '" name="SelectCustomer" method="post">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - - echo '<table cellpadding="3" class="selection">'; - echo '<tr>'; - echo '<td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td>'; - echo '<td><input tabindex="1" type="text" name="CustKeywords" size="20" maxlength="25" /></td>'; - echo '<td><h2>' . _('OR') . '</h2></td>'; - echo '<td><h5>' . _('Part of the Customer Branch Code') . ':</h5></td>'; - echo '<td><input tabindex="2" type="text" name="CustCode" size="15" maxlength="18" /></td>'; - echo '<td><h2>' . _('OR') . '</h2></td>'; - echo '<td><h5>' . _('Part of the Branch Phone Number') . ':</h5></td>'; - echo '<td><input tabindex="3" type="text" name="CustPhone" size="15" maxlength="18" /></td>'; - echo '</tr>'; - echo '</table>'; - echo '<br /><div class="centre"><button tabindex="4" type="submit" name="SearchCust">' . _('Search Now') . '</button>'; - echo '<button tabindex="5" type="submit">' . _('Reset') . '</button></div>'; - if (isset($result_CustSelect)) { - - echo '<table cellpadding="2" class="selection">'; - - $TableHeader = '<br /><tr> - <th>' . _('Customer') . '</th> - <th>' . _('Branch') . '</th> - <th>' . _('Contact') . '</th> - <th>' . _('Phone') . '</th> - <th>' . _('Fax') . '</th> - </tr>'; - echo $TableHeader; - - $j = 1; - $k = 0; //row counter to determine background colour - $LastCustomer=''; - while ($myrow=DB_fetch_array($result_CustSelect)) { - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?identifier='.$identifier . '" name="SelectParts" method="post">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - if ($LastCustomer != $myrow['name']) { - echo '<td>'.$myrow['name'].'</td>'; - } else { - echo '<td></td>'; - } - echo '<td><button tabindex="'.($j+5).'" type="submit" name="Submit" value="'.$myrow['brname'].'" />'.$myrow['brname'].'</button></td> - <input type="hidden" name="Select" value="'.$myrow['debtorno'].' - '.$myrow['branchcode'].'" /> - <td>'.$myrow['contactname'].'</td> - <td>'.$myrow['phoneno'].'</td> - <td>'.$myrow['faxno'].'</td> - </tr></form>'; - $LastCustomer=$myrow['name']; - $j++; -//end of page full new headings if - } -//end of while loop - - echo '</table>'; - + ShowReturnedCustomers($result_CustSelect); }//end if results to show //end if RequireCustomerSelection Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2012-05-03 14:17:57 UTC (rev 8776) +++ trunk/css/silverwolf/default.css 2012-05-03 19:31:14 UTC (rev 8777) @@ -121,6 +121,7 @@ table.selection { margin-bottom: 5px; + background: #EEE7E7; background: -moz-linear-gradient(left, #EEE7E7, #9CA4AE); background: -webkit-linear-gradient(left, #EEE7E7, #9CA4AE); border: solid #A49999 1px; @@ -264,50 +265,36 @@ border-radius: 3px; } -button { - background-color: #C4C4C4; - border-top: 1px solid #a1afbf; - border-left: 1px solid #a7b6c7; - border-bottom: 1px solid #a1afbf; - border-right: 1px solid #a7b6c7; - -webkit-border-radius: 12px; - -moz-border-radius: 12px; - border-radius: 7px; - -moz-box-shadow: 0px 0px 2px 1px #CECECE; - -webkit-box-shadow: 0px 0px 2px 1px #CECECE; - box-shadow: 0px 0px 2px 1px #CECECE; - color: #092442; - font: normal 10px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; - padding: 1px 1px 1px 1px; - margin-right: 3px; - text-align: center; -} - button:hover { - background-color: #ccd9e8; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ccd9e8), color-stop(100%, #c1d4e8)); - background-image: -webkit-linear-gradient(top, #ccd9e8, #c1d4e8); - background-image: -moz-linear-gradient(top, #ccd9e8, #c1d4e8); - background-image: -ms-linear-gradient(top, #ccd9e8, #c1d4e8); - background-image: -o-linear-gradient(top, #ccd9e8, #c1d4e8); - background-image: linear-gradient(top, #ccd9e8, #c1d4e8); - border-top: 1px solid #a1afbf; - border-left: 1px solid #9caaba; - border-bottom: 1px solid #96a3b3; - border-right: 1px solid #9caaba; - -moz-box-shadow: 0px 0px 2px 1px #CECECE; - -webkit-box-shadow: 0px 0px 2px 1px #CECECE; - box-shadow: 0px 0px 2px 1px #CECECE; - color: #163659; - cursor: pointer; -} - +button { + border-top: 1px solid #96d1f8; + background: #c1cfd9; + background: -webkit-gradient(linear, left top, left bottom, from(#9CA4AE), to(#EEE7E7)); + background: -webkit-linear-gradient(top, #9CA4AE, #EEE7E7); + background: -moz-linear-gradient(top, #9CA4AE, #EEE7E7); + background: -ms-linear-gradient(top, #9CA4AE, #EEE7E7); + background: -o-linear-gradient(top, #9CA4AE, #EEE7E7); + padding: 2px 3px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0; + -moz-box-shadow: rgba(0,0,0,1) 0 1px 0; + box-shadow: rgba(0,0,0,1) 0 1px 0; + color: #484848; + font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + font-size: 10px; + vertical-align: middle; + } +button:hover { + border-top-color: #638094; + background: #638094; + color: #ccc; + } button:active { - border: 1px solid #8c98a7; - -webkit-box-shadow: inset 0 0 4px 2px #abbccf, 0 0 1px 0 #eeeeee; - -moz-box-shadow: inset 0 0 4px 2px #abbccf, 0 0 1px 0 #eeeeee; - box-shadow: inset 0 0 4px 2px #abbccf, 0 0 1px 0 #eeeeee;} - + border-top-color: #1b435e; + background: #1b435e; + } input.number { text-align: right; } Modified: trunk/includes/CustomerSearch.php =================================================================== --- trunk/includes/CustomerSearch.php 2012-05-03 14:17:57 UTC (rev 8776) +++ trunk/includes/CustomerSearch.php 2012-05-03 19:31:14 UTC (rev 8777) @@ -99,15 +99,14 @@ } echo '</td></tr></table><br />'; - echo '<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button> - <button type="submit" name="CSV">' . _('CSV Format') . '</button></div>'; + echo '<div class="centre"><button type="submit" name="Search">' . _('Search Now') . '</button></div>'; if (isset($_SESSION['SalesmanLogin']) and $_SESSION['SalesmanLogin'] != '') { prnMsg(_('Your account enables you to see only customers allocated to you'), 'warn', _('Note: Sales-person Login')); } } function CustomerSearchSQL($db) { - if (isset($_POST['Search']) OR isset($_POST['CSV']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { + if (isset($_POST['Search']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { if (isset($_POST['Search'])) { $_POST['PageOffset'] = 1; } @@ -235,15 +234,6 @@ $RowIndex = 0; } if (DB_num_rows($result) <> 0) { - if (isset($_POST['CSV'])) { - $FileName = $_SESSION['reports_dir'] . '/Customer_Listing_' . Date('Y-m-d') . '.csv'; - echo '<br /><p class="page_title_text"><a href="' . $FileName . '">' . _('Click to view the csv Search Result') . '</p>'; - $fp = fopen($FileName, 'w'); - while ($myrow2 = DB_fetch_array($result)) { - fwrite($fp, $myrow2['debtorno'] . ',' . str_replace(',', '', $myrow2['name']) . ',' . str_replace(',', '', $myrow2['address1']) . ',' . str_replace(',', '', $myrow2['address2']) . ',' . str_replace(',', '', $myrow2['address3']) . ',' . str_replace(',', '', $myrow2['address4']) . ',' . str_replace(',', '', $myrow2['contactname']) . ',' . str_replace(',', '', $myrow2['typename']) . ',' . $myrow2['phoneno'] . ',' . $myrow2['faxno'] . "\n"); - } - echo '</div>'; - } if (!isset($_POST['CSV'])) { DB_data_seek($result, ($_POST['PageOffset'] - 1) * $_SESSION['DisplayRecordsMax']); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-04 09:33:45
|
Revision: 8782 http://weberp.svn.sourceforge.net/weberp/?rev=8782&view=rev Author: tim_schofield Date: 2012-05-04 09:33:33 +0000 (Fri, 04 May 2012) Log Message: ----------- Improve the customer search for large data sets Modified Paths: -------------- trunk/SelectCustomer.php trunk/companies/weberpdemo/logo.png trunk/includes/CustomerSearch.php Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-05-04 02:09:55 UTC (rev 8781) +++ trunk/SelectCustomer.php 2012-05-04 09:33:33 UTC (rev 8782) @@ -85,13 +85,9 @@ $_POST['Go'] = ''; } if (!isset($_POST['PageOffset'])) { - $_POST['PageOffset'] = 1; -} else { - if ($_POST['PageOffset'] == 0) { - $_POST['PageOffset'] = 1; - } + $_POST['PageOffset'] = 0; } -$result=CustomerSearchSQL($db); +$result=CustomerSearchSQL($_POST['PageOffset'], $db); if (!isset($_POST['Search']) and isset($_POST['JustSelectedACustomer']) and empty($_SESSION['CustomerID'])){ /*Need to figure out the number of the form variable that the user clicked on */ for ($i=0; $i< count($_POST); $i++){ //loop through the returned customers Modified: trunk/companies/weberpdemo/logo.png =================================================================== --- trunk/companies/weberpdemo/logo.png 2012-05-04 02:09:55 UTC (rev 8781) +++ trunk/companies/weberpdemo/logo.png 2012-05-04 09:33:33 UTC (rev 8782) @@ -1,678 +1,606 @@ \x89PNG |
From: <tim...@us...> - 2012-05-04 10:45:22
|
Revision: 8786 http://weberp.svn.sourceforge.net/weberp/?rev=8786&view=rev Author: tim_schofield Date: 2012-05-04 10:45:11 +0000 (Fri, 04 May 2012) Log Message: ----------- Improve the customer search for large data sets Modified Paths: -------------- trunk/SelectCustomer.php trunk/includes/CustomerSearch.php Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-05-04 10:45:00 UTC (rev 8785) +++ trunk/SelectCustomer.php 2012-05-04 10:45:11 UTC (rev 8786) @@ -87,7 +87,7 @@ if (!isset($_POST['PageOffset'])) { $_POST['PageOffset'] = 0; } -$result=CustomerSearchSQL($_POST['PageOffset'], $db); +$result=CustomerSearchSQL($db); if (!isset($_POST['Search']) and isset($_POST['JustSelectedACustomer']) and empty($_SESSION['CustomerID'])){ /*Need to figure out the number of the form variable that the user clicked on */ for ($i=0; $i< count($_POST); $i++){ //loop through the returned customers Modified: trunk/includes/CustomerSearch.php =================================================================== --- trunk/includes/CustomerSearch.php 2012-05-04 10:45:00 UTC (rev 8785) +++ trunk/includes/CustomerSearch.php 2012-05-04 10:45:11 UTC (rev 8786) @@ -105,8 +105,19 @@ } } -function CustomerSearchSQL($OffSet, $db) { +function CustomerSearchSQL($db) { if (isset($_POST['Search']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { + $ListPageMax = ceil($_SESSION['ListCount'] / $_SESSION['DisplayRecordsMax']); + if (isset($_POST['Next'])) { + if ($_POST['PageOffset'] < $ListPageMax) { + $_POST['PageOffset'] = $_POST['PageOffset'] + 1; + } + } + if (isset($_POST['Previous'])) { + if ($_POST['PageOffset'] > 1) { + $_POST['PageOffset'] = $_POST['PageOffset'] - 1; + } + } if (isset($_POST['Search'])) { $_POST['PageOffset'] = 1; } @@ -175,7 +186,7 @@ $CountResult=DB_query($SQL, $db); $_SESSION['ListCount']=DB_num_rows($CountResult); $SQL.= " ORDER BY debtorsmaster.name"; - $SQL.= " LIMIT ".($OffSet*$_SESSION['DisplayRecordsMax']).", ".$_SESSION['DisplayRecordsMax']; + $SQL.= " LIMIT ".($_POST['PageOffset']*$_SESSION['DisplayRecordsMax']).", ".$_SESSION['DisplayRecordsMax']; $ErrMsg = _('The searched customer records requested cannot be retrieved because'); $result = DB_query($SQL, $db, $ErrMsg); @@ -189,17 +200,6 @@ function ShowReturnedCustomers($result) { unset($_SESSION['CustomerID']); - $ListPageMax = ceil($_SESSION['ListCount'] / $_SESSION['DisplayRecordsMax']); - if (isset($_POST['Next'])) { - if ($_POST['PageOffset'] < $ListPageMax) { - $_POST['PageOffset'] = $_POST['PageOffset'] + 1; - } - } - if (isset($_POST['Previous'])) { - if ($_POST['PageOffset'] > 1) { - $_POST['PageOffset'] = $_POST['PageOffset'] - 1; - } - } echo '<input type="hidden" name="PageOffset" value="' . $_POST['PageOffset'] . '" />'; if ($ListPageMax > 1) { echo '<br /><div class="centre"> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-04 10:45:36
|
Revision: 8787 http://weberp.svn.sourceforge.net/weberp/?rev=8787&view=rev Author: tim_schofield Date: 2012-05-04 10:45:27 +0000 (Fri, 04 May 2012) Log Message: ----------- Improve the customer search for large data sets Modified Paths: -------------- trunk/SelectCustomer.php trunk/includes/CustomerSearch.php Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-05-04 10:45:11 UTC (rev 8786) +++ trunk/SelectCustomer.php 2012-05-04 10:45:27 UTC (rev 8787) @@ -80,15 +80,8 @@ } unset($result); $msg = ''; -if (isset($_POST['Go1']) or isset($_POST['Go2'])) { - $_POST['PageOffset'] = (isset($_POST['Go1']) ? $_POST['PageOffset1'] : $_POST['PageOffset2']); - $_POST['Go'] = ''; -} -if (!isset($_POST['PageOffset'])) { - $_POST['PageOffset'] = 0; -} $result=CustomerSearchSQL($db); -if (!isset($_POST['Search']) and isset($_POST['JustSelectedACustomer']) and empty($_SESSION['CustomerID'])){ +if (!isset($_POST['Search']) and !isset($_POST['Next']) and !isset($_POST['Previous']) and !isset($_POST['Go1']) and !isset($_POST['Go2']) and isset($_POST['JustSelectedACustomer']) and empty($_SESSION['CustomerID'])){ /*Need to figure out the number of the form variable that the user clicked on */ for ($i=0; $i< count($_POST); $i++){ //loop through the returned customers if(isset($_POST['SubmitCustomerSelection'.$i])){ @@ -104,7 +97,7 @@ } } -if ($_SESSION['CustomerID'] != '' AND !isset($_POST['Search']) AND !isset($_POST['CSV'])) { +if ($_SESSION['CustomerID'] != '' AND !isset($_POST['Search'])) { $SQL = "SELECT debtorsmaster.name, debtorsmaster.currcode, custbranch.phoneno @@ -162,7 +155,7 @@ } echo '</td></tr></table>'; } -if (mb_strlen($msg)>1){ +if (strlen($msg)>1){ prnMsg($msg, 'info'); } ShowCustomerSearchFields($rootpath, $theme, $db); Modified: trunk/includes/CustomerSearch.php =================================================================== --- trunk/includes/CustomerSearch.php 2012-05-04 10:45:11 UTC (rev 8786) +++ trunk/includes/CustomerSearch.php 2012-05-04 10:45:27 UTC (rev 8787) @@ -106,19 +106,13 @@ } function CustomerSearchSQL($db) { - if (isset($_POST['Search']) OR isset($_POST['Go']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { - $ListPageMax = ceil($_SESSION['ListCount'] / $_SESSION['DisplayRecordsMax']); - if (isset($_POST['Next'])) { - if ($_POST['PageOffset'] < $ListPageMax) { - $_POST['PageOffset'] = $_POST['PageOffset'] + 1; - } + if (isset($_POST['Search']) OR isset($_POST['Go1']) OR isset($_POST['Go2']) OR isset($_POST['Next']) OR isset($_POST['Previous'])) { + if (isset($_POST['Go1']) or isset($_POST['Go2'])) { + $_POST['PageOffset'] = (isset($_POST['Go1']) ? $_POST['PageOffset1'] : $_POST['PageOffset2']); + echo $_POST['PageOffset']; + $_POST['Go'] = ''; } - if (isset($_POST['Previous'])) { - if ($_POST['PageOffset'] > 1) { - $_POST['PageOffset'] = $_POST['PageOffset'] - 1; - } - } - if (isset($_POST['Search'])) { + if (!isset($_POST['PageOffset'])) { $_POST['PageOffset'] = 1; } if ($_POST['Keywords'] AND (($_POST['CustCode']) OR ($_POST['CustPhone']) OR ($_POST['CustType']))) { @@ -185,8 +179,19 @@ } $CountResult=DB_query($SQL, $db); $_SESSION['ListCount']=DB_num_rows($CountResult); + $_SESSION['ListPageMax'] = ceil($_SESSION['ListCount'] / $_SESSION['DisplayRecordsMax']); + if (isset($_POST['Next'])) { + if ($_POST['PageOffset'] < $_SESSION['ListPageMax']) { + $_POST['PageOffset'] = $_POST['PageOffset'] + 1; + } + } + if (isset($_POST['Previous'])) { + if ($_POST['PageOffset'] > 1) { + $_POST['PageOffset'] = $_POST['PageOffset'] - 1; + } + } $SQL.= " ORDER BY debtorsmaster.name"; - $SQL.= " LIMIT ".($_POST['PageOffset']*$_SESSION['DisplayRecordsMax']).", ".$_SESSION['DisplayRecordsMax']; + $SQL.= " LIMIT ".(($_POST['PageOffset']-1)*$_SESSION['DisplayRecordsMax']).", ".$_SESSION['DisplayRecordsMax']; $ErrMsg = _('The searched customer records requested cannot be retrieved because'); $result = DB_query($SQL, $db, $ErrMsg); @@ -201,11 +206,11 @@ function ShowReturnedCustomers($result) { unset($_SESSION['CustomerID']); echo '<input type="hidden" name="PageOffset" value="' . $_POST['PageOffset'] . '" />'; - if ($ListPageMax > 1) { - echo '<br /><div class="centre"> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; + if ($_SESSION['ListPageMax'] > 1) { + echo '<br /><div class="centre"> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $_SESSION['ListPageMax'] . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; echo '<select name="PageOffset1">'; $ListPage = 1; - while ($ListPage <= $ListPageMax) { + while ($ListPage <= $_SESSION['ListPageMax']) { if ($ListPage == $_POST['PageOffset']) { echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; } else { @@ -263,11 +268,11 @@ } //end if results to show - if (isset($ListPageMax) and $ListPageMax > 1) { - echo '<br /><div class="centre"> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $ListPageMax . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; + if (isset($_SESSION['ListPageMax']) and $_SESSION['ListPageMax'] > 1) { + echo '<br /><div class="centre"> ' . $_POST['PageOffset'] . ' ' . _('of') . ' ' . $_SESSION['ListPageMax'] . ' ' . _('pages') . '. ' . _('Go to Page') . ': '; echo '<select name="PageOffset2">'; $ListPage = 1; - while ($ListPage <= $ListPageMax) { + while ($ListPage <= $_SESSION['ListPageMax']) { if ($ListPage == $_POST['PageOffset']) { echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; } else { @@ -283,6 +288,7 @@ //end if results to show echo '</div></form>'; unset($_SESSION['ListCount']); + unset($_SESSION['ListPageMax']); } ?> \ 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: <tim...@us...> - 2012-05-07 17:35:31
|
Revision: 8823 http://weberp.svn.sourceforge.net/weberp/?rev=8823&view=rev Author: tim_schofield Date: 2012-05-07 17:35:24 +0000 (Mon, 07 May 2012) Log Message: ----------- Add indexes to debtorsmaster Modified Paths: -------------- trunk/includes/UpgradeDB_mysql.inc Added Paths: ----------- trunk/sql/mysql/updates/111.php Modified: trunk/includes/UpgradeDB_mysql.inc =================================================================== --- trunk/includes/UpgradeDB_mysql.inc 2012-05-07 07:36:32 UTC (rev 8822) +++ trunk/includes/UpgradeDB_mysql.inc 2012-05-07 17:35:24 UTC (rev 8823) @@ -37,6 +37,28 @@ } } +function AddIndex($Columns, $Table, $Name, $db) { + if (DB_table_exists($Table, $db)) { + $sql="SHOW INDEX FROM " . $Table . " WHERE Key_name='".$Name."'"; + $result = DB_query($sql, $db); + } + if (DB_num_rows($result)==0) { + $sql="ALTER TABLE `".$Table."` ADD INDEX ".$Name." (`".$Columns[0]."`"; + for ($i=1; $i<sizeOf($Columns); $i++) { + $sql.=",".$Columns[$i]; + } + $sql.=")"; + $response=executeSQL($sql, $db, False); + if ($response==0) { + OutputResult( _('The index has been inserted') , 'success'); + } else { + OutputResult( _('The column could not be inserted') , 'error'); + } + } else { + OutputResult( _('The column already exists') , 'info'); + } +} + function DropColumn($Column, $Table, $db) { global $SQLFile; if (DB_table_exists($Table, $db)) { Added: trunk/sql/mysql/updates/111.php =================================================================== --- trunk/sql/mysql/updates/111.php (rev 0) +++ trunk/sql/mysql/updates/111.php 2012-05-07 17:35:24 UTC (rev 8823) @@ -0,0 +1,11 @@ +<?php + +/* Include the new script for printing quotations in Portrait + */ + +AddIndex(array('debtorno', 'typeid'), 'debtorsmaster', 'debtorsmaster_idx1', $db); +AddIndex(array('name'), 'debtorsmaster', 'debtorsmaster_idx2', $db); + +UpdateDBNo(basename(__FILE__, '.php'), $db); + +?> \ 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: <tim...@us...> - 2012-05-07 18:46:16
|
Revision: 8827 http://weberp.svn.sourceforge.net/weberp/?rev=8827&view=rev Author: tim_schofield Date: 2012-05-07 18:46:10 +0000 (Mon, 07 May 2012) Log Message: ----------- Improvements to stock check sheets Modified Paths: -------------- trunk/StockCheck.php trunk/includes/PDFStockCheckPageHeader.inc Modified: trunk/StockCheck.php =================================================================== --- trunk/StockCheck.php 2012-05-07 18:45:58 UTC (rev 8826) +++ trunk/StockCheck.php 2012-05-07 18:46:10 UTC (rev 8827) @@ -161,7 +161,7 @@ while ($InventoryPlan = DB_fetch_array($InventoryResult,$db)){ if ($Category!=$InventoryPlan['categoryid']){ - $FontSize=12; + $FontSize=10; if ($Category!=''){ /*Then it's NOT the first time round */ /*draw a line under the CATEGORY TOTAL*/ $pdf->line($Left_Margin, $YPos-2,$Page_Width-$Right_Margin, $YPos-2); @@ -172,7 +172,7 @@ $Category = $InventoryPlan['categoryid']; } - $FontSize=10; + $FontSize=8; $YPos -=$line_height; if (isset($_POST['ShowInfo']) and $_POST['ShowInfo']==true){ @@ -334,7 +334,7 @@ echo '<input type="checkbox" name="NonZerosOnly" value="TRUE" />'; } - echo '</td></tr></table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print and Process') . '</button></div></form>'; + echo '</td></tr></table><br /><div class="centre"><button type="submit" name="PrintPDF">' . _('Print and Process') . '</button></div></form><br />'; } include('includes/footer.inc'); Modified: trunk/includes/PDFStockCheckPageHeader.inc =================================================================== --- trunk/includes/PDFStockCheckPageHeader.inc 2012-05-07 18:45:58 UTC (rev 8826) +++ trunk/includes/PDFStockCheckPageHeader.inc 2012-05-07 18:46:10 UTC (rev 8827) @@ -5,7 +5,7 @@ $pdf->newPage(); } -$FontSize=12; +$FontSize=10; $YPos= $Page_Height-$Top_Margin; $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,300,$FontSize,$_SESSION['CompanyRecord']['coyname']); @@ -23,6 +23,7 @@ $pdf->line($Left_Margin, $YPos+$BoxHeight,$Left_Margin, $YPos- $BoxHeight); $pdf->line($Left_Margin, $YPos-$BoxHeight,$Page_Width-$Right_Margin, $YPos-$BoxHeight); $pdf->line($Page_Width-$Right_Margin, $YPos+$BoxHeight,$Page_Width-$Right_Margin, $YPos-$BoxHeight); +$pdf->line($Left_Margin, $Bottom_Margin+24,$Page_Width-$Right_Margin, $Bottom_Margin+24); /*set up the headings */ $Xpos = $Left_Margin+1; @@ -33,13 +34,17 @@ $LeftOvers = $pdf->addTextWrap($Xpos,$YPos,300-$Left_Margin,$FontSize,_('Item'), 'centre'); if (isset($_POST['ShowInfo']) and $_POST['ShowInfo']==true){ /*draw vertical lines */ - $pdf->line(415, $YPos-$line_height,415, $Bottom_Margin+24); - $pdf->line(475, $YPos-$line_height,475, $Bottom_Margin+24); - $LeftOvers = $pdf->addTextWrap(341,$YPos,60,$FontSize,_('QOH'), 'centre'); - $LeftOvers = $pdf->addTextWrap(341+61,$YPos,80,$FontSize,_('Cust Ords'), 'centre'); - $LeftOvers = $pdf->addTextWrap(341+61+61,$YPos,80,$FontSize,_('Available'), 'centre'); + $pdf->line($Left_Margin, $YPos+$BoxHeight,$Left_Margin, $Bottom_Margin+24); + $pdf->line($Page_Width-$Right_Margin, $YPos+$BoxHeight,$Page_Width-$Right_Margin, $Bottom_Margin+24); + $pdf->line(415, $YPos+$BoxHeight,415, $Bottom_Margin+24); + $pdf->line(475, $YPos+$BoxHeight,475, $Bottom_Margin+24); + $LeftOvers = $pdf->addTextWrap(370,$YPos,60,$FontSize,_('QOH'), 'centre'); + $LeftOvers = $pdf->addTextWrap(370+45,$YPos,80,$FontSize,_('Cust Ords'), 'centre'); + $LeftOvers = $pdf->addTextWrap(370+45+61,$YPos,80,$FontSize,_('Available'), 'centre'); } else { /*draw vertical lines */ + $pdf->line($Left_Margin, $YPos+$BoxHeight,$Left_Margin, $Bottom_Margin+24); + $pdf->line($Page_Width-$Right_Margin, $YPos+$BoxHeight,$Page_Width-$Right_Margin, $Bottom_Margin+24); $pdf->line(435, $YPos+$BoxHeight,435, $Bottom_Margin+24); $LeftOvers = $pdf->addTextWrap(371,$YPos,60,$FontSize,_('Quantity'), 'centre'); $LeftOvers = $pdf->addTextWrap(341+61+61,$YPos,80,$FontSize,_('Remarks'), 'centre'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-08 10:12:34
|
Revision: 8832 http://weberp.svn.sourceforge.net/weberp/?rev=8832&view=rev Author: tim_schofield Date: 2012-05-08 10:12:24 +0000 (Tue, 08 May 2012) Log Message: ----------- Fix bug where new transfer object instance was not being created when entering through Selectproduct.php Modified Paths: -------------- trunk/SelectProduct.php trunk/StockTransfers.php Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-05-08 10:12:13 UTC (rev 8831) +++ trunk/SelectProduct.php 2012-05-08 10:12:24 UTC (rev 8832) @@ -416,7 +416,7 @@ /* Stock Transactions */ if ($Its_A_Kitset_Assembly_Or_Dummy == false) { echo '<a href="' . $rootpath . '/StockAdjustments.php?StockID=' . $StockID . '">' . _('Quantity Adjustments') . '</a><br />'; - echo '<a href="' . $rootpath . '/StockTransfers.php?StockID=' . $StockID . '">' . _('Location Transfers') . '</a><br />'; + echo '<a href="' . $rootpath . '/StockTransfers.php?StockID=' . $StockID . '&NewTransfer=Yes">' . _('Location Transfers') . '</a><br />'; if (function_exists('imagecreatefrompng')){ $StockImgLink = 'GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. '&StockID='.urlencode($StockID). Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2012-05-08 10:12:13 UTC (rev 8831) +++ trunk/StockTransfers.php 2012-05-08 10:12:24 UTC (rev 8832) @@ -73,10 +73,10 @@ if ($NewTransfer){ $_SESSION['Transfer']= new StockTransfer(0, - $_POST['StockLocationFrom'], '', - $_POST['StockLocationTo'], '', + '', + '', Date($_SESSION['DefaultDateFormat']) ); $result = DB_query("SELECT description, @@ -96,7 +96,7 @@ $myrow = DB_fetch_array($result); $_SESSION['Transfer']->TransferItem[0] = new LineItem ( trim(mb_strtoupper($_POST['StockID'])), $myrow['description'], - $_POST['Quantity'], + 0, $myrow['units'], $myrow['controlled'], $myrow['serialised'], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-05-08 18:24:59
|
Revision: 8841 http://weberp.svn.sourceforge.net/weberp/?rev=8841&view=rev Author: tim_schofield Date: 2012-05-08 18:24:53 +0000 (Tue, 08 May 2012) Log Message: ----------- Fix bugs in uploading batch/serial numbers from a file Modified Paths: -------------- trunk/GoodsReceived.php trunk/GoodsReceivedControlled.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsFile.php Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2012-05-08 11:48:23 UTC (rev 8840) +++ trunk/GoodsReceived.php 2012-05-08 18:24:53 UTC (rev 8841) @@ -11,6 +11,7 @@ include('includes/SQL_CommonFunctions.inc'); if (empty($identifier)) { $identifier=''; + unset($_SESSION['CurImportFile']); } $title = _('Receive Purchase Orders'); include('includes/header.inc'); @@ -183,6 +184,11 @@ echo '<td class="number">' . $DisplayLineTotal . '</td>'; } + if ($LnItm->Completed ==1){ + echo '<td><input type="checkbox" name="Complete_'. $LnItm->LineNo . '" checked="True" /></td>'; + } else { + echo '<td><input type="checkbox" name="Complete_'. $LnItm->LineNo . '" /></td>'; + } if ($LnItm->Controlled == 1) { if ($LnItm->Serialised==1){ @@ -193,13 +199,6 @@ _('Enter Batches'). '</a></td>'; } } - - if ($LnItm->Completed ==1){ - echo '<td><input type="checkbox" name="Complete_'. $LnItm->LineNo . '" checked="True" /></td>'; - } else { - echo '<td><input type="checkbox" name="Complete_'. $LnItm->LineNo . '" /></td>'; - } - echo '</tr>'; }//foreach(LineItem) echo '<script>defaultControl(document.forms[0].RecvQty_'.$LnItm->LineNo.');</script>'; Modified: trunk/GoodsReceivedControlled.php =================================================================== --- trunk/GoodsReceivedControlled.php 2012-05-08 11:48:23 UTC (rev 8840) +++ trunk/GoodsReceivedControlled.php 2012-05-08 18:24:53 UTC (rev 8841) @@ -10,6 +10,10 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); +if (isset($_POST['InvalidImports'])) { + $invalid_imports=$_POST['InvalidImports']; +} + if (!isset($_SESSION['PO'])) { /* This page can only be called with a purchase order number for receiving*/ echo '<div class="centre"><a href="' . $rootpath . '/PO_SelectOSPurchOrder.php">'. @@ -46,13 +50,10 @@ /******************************************** Get the page going.... ********************************************/ -echo '<div class="centre">'; -echo '<br /><a href="'.$rootpath.'/GoodsReceived.php">'. _('Back To Purchase Order'). ' # '. $_SESSION['PO']->OrderNo . '</a>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="" alt="" />'. _('Receive controlled item'). ' '. $LineItem->StockID . ' - ' . $LineItem->ItemDescription . + ' ' . _('on order') . ' ' . $_SESSION['PO']->OrderNo . ' ' . _('from') . ' ' . $_SESSION['PO']->SupplierName . '</p>'; -echo '<br /><font size="2"><b>'. _('Receive controlled item'). ' '. $LineItem->StockID . ' - ' . $LineItem->ItemDescription . - ' ' . _('on order') . ' ' . $_SESSION['PO']->OrderNo . ' ' . _('from') . ' ' . $_SESSION['PO']->SupplierName . '</b></font></div>'; - /** vars needed by InputSerialItem : **/ $LocationOut = $_SESSION['PO']->Location; $ItemMustExist = false; @@ -60,7 +61,12 @@ $InOutModifier=1; $ShowExisting = false; include ('includes/InputSerialItems.php'); +echo '<div style="text-align: right">'; +echo '<br /><a href="'.$rootpath.'/GoodsReceived.php">'. _('Back To Purchase Order'). ' # '. $_SESSION['PO']->OrderNo . '</a>'; + +echo '</div>'; + /*TotalQuantity set inside this include file from the sum of the bundles of the item selected for dispatch */ $_SESSION['PO']->LineItems[$LineItem->LineNo]->ReceiveQty = $TotalQuantity; Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2012-05-08 11:48:23 UTC (rev 8840) +++ trunk/includes/InputSerialItems.php 2012-05-08 18:24:53 UTC (rev 8841) @@ -20,18 +20,18 @@ $LineNo=0; } /* - Entry Types: - Keyed Mode: 'Qty' Rows of Input Fields. Upto X shown per page (100 max) - Barcode Mode: Part Keyed, part not. 1st, 'Qty' of barcodes entered. Then extra data as/if - necessary - FileUpload Mode: File Uploaded must fulfill item requirements when parsed... no form based data - entry. 1-upload, 2-parse&validate, 3-bad>1 good>4, 4-import. - switch the type we are updating from, w/ some rules... - Qty < X - Default to keyed - X < Qty < Y - Default to barcode - Y < Qty - Default to upload + Entry Types: + Keyed Mode: 'Qty' Rows of Input Fields. Upto X shown per page (100 max) + Barcode Mode: Part Keyed, part not. 1st, 'Qty' of barcodes entered. Then extra data as/if + necessary + FileUpload Mode: File Uploaded must fulfill item requirements when parsed... no form based data + entry. 1-upload, 2-parse&validate, 3-bad>1 good>4, 4-import. + switch the type we are updating from, w/ some rules... + Qty < X - Default to keyed + X < Qty < Y - Default to barcode + Y < Qty - Default to upload - possibly override setting elsewhere. + possibly override setting elsewhere. */ if (!isset($RecvQty)) { $RecvQty=0; @@ -84,7 +84,7 @@ echo _('File Upload'); echo ' <input type="file" name="ImportFile" onClick="document.getElementById(\'FileEntry\').checked=true;" />'; echo '</td></tr><tr><td colspan="3">'; -echo '<div class="centre"><input type="submit" value="'. _('Set Entry Type'). ':" /></div>'; +echo '<div class="centre"><button type="submit">'. _('Set Entry Type'). ':</button></div>'; echo '</td></tr></table>'; echo '</form>'; @@ -121,7 +121,7 @@ if ($_POST['EntryType'] == 'FILE'){ include('includes/InputSerialItemsFile.php'); } elseif ($_POST['EntryType'] == 'SEQUENCE'){ - include('includes/InputSerialItemsSequential.php'); + include('includes/InputSerialItemsSequential.php'); } else { /*KEYED or BARCODE */ include('includes/InputSerialItemsKeyed.php'); } Modified: trunk/includes/InputSerialItemsFile.php =================================================================== --- trunk/includes/InputSerialItemsFile.php 2012-05-08 11:48:23 UTC (rev 8840) +++ trunk/includes/InputSerialItemsFile.php 2012-05-08 18:24:53 UTC (rev 8841) @@ -21,12 +21,12 @@ } echo '<div class="centre">'; -echo '<table>'; +echo '<table class="selection">'; echo $tableheader; $TotalQuantity = 0; /*Variable to accumulate total quantity received */ $RowCounter =0; - +$k=0; /*Display the batches already entered with quantities if not serialised */ foreach ($LineItem->SerialItems as $Bundle){ @@ -44,7 +44,7 @@ echo '<td>' . $Bundle->BundleRef . '</td>'; if ($LineItem->Serialised==0){ - echo '<td align="right">' . number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; + echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; } } @@ -61,7 +61,7 @@ echo '<tr><td colspan="2"><hr /></td></tr>'; } -echo '</table><hr />'; +echo '</table><br />'; //echo "<table><tr><td>"; //DISPLAY FILE INFO @@ -71,7 +71,7 @@ $_SESSION['CurImportFile'] = ''; $LineItem->SerialItemsValid=false; } -if ($_FILES['ImportFile']['name'] == '' and $_SESSION['CurImportFile'] == ''){ +if ((isset($_FILES['ImportFile']) and $_FILES['ImportFile']['name'] == '') and $_SESSION['CurImportFile'] == ''){ $msg = _('Please Choose a file and then click Set Entry Type to upload a file for import'); prnMsg($msg); $LineItem->SerialItemsValid=false; @@ -79,24 +79,24 @@ include('includes/footer.inc'); exit(); } -if ($_FILES['ImportFile']['error'] != '' and !isset($_SESSION['CurImportFile'])){ +if ((isset($_FILES['ImportFile']) and $_FILES['ImportFile']['error'] != '') and !isset($_SESSION['CurImportFile'])){ echo _('There was a problem with the uploaded file') . '. ' . _('We received').':<br />'. _('Name').':'.$_FILES['ImportFile']['name'].'<br />'. _('Size').':'.number_format($_FILES['ImportFile']['size']/1024,2).'kb<br />'. _('Type').':'.$_FILES['ImportFile']['type'].'<br />'; echo '<br />'._('Error was').' '.$_FILES['ImportFile']['error'].'<br />'; $LineItem->SerialItemsValid=false; - echo '</td></tr></table>'; + echo '</td></tr></table><br />'; include('includes/footer.inc'); exit(); -} elseif ($_FILES['ImportFile']['name']!=''){ +} elseif ((isset($_FILES['ImportFile']) and $_FILES['ImportFile']['name']!='')){ //User has uploaded importfile. reset items, then just 'get hold' of it for later. $LineItem->SerialItems=array(); $LineItem->SerialItemsValid=false; $_SESSION['CurImportFile']['Processed']=false; $_SESSION['CurImportFile'] = $_FILES['ImportFile']; - $_SESSION['CurImportFile']['tmp_name'] = './reports/'.$LineItem->StockID.'_'.$LineNo.'_'.uniqid(4); + $_SESSION['CurImportFile']['tmp_name'] = $_SERVER['DOCUMENT_ROOT'].$rootpath.$PathPrefix . '/' . $_SESSION['reports_dir'] . '/'.$LineItem->StockID.'_'.$LineNo.'_'.uniqid(4); if (!move_uploaded_file($_FILES['ImportFile']['tmp_name'],$_SESSION['CurImportFile']['tmp_name'])){ prnMsg(_('Error moving temporary file') . '. ' . _('Please check your configuration'),'error' ); $LineItem->SerialItemsValid=false; @@ -104,44 +104,60 @@ include('includes/footer.inc'); exit; } - + $_SESSION['CurImportFile']['Processed']=false; if ($_FILES['ImportFile']['name']!=''){ - echo _('Successfully received').':<br />'; + prnMsg( _('Successfully received'), 'success');; $ShowFileInfo = true; } } elseif (isset($_SESSION['CurImportFile']) and $_SESSION['CurImportFile']['Processed'] ) { //file exists, some action performed... - echo _('Working with'). ':<br />'; $ShowFileInfo = true; } elseif ($LineItem->SerialItemsValid and $_SESSION['CurImportFile']['Processed']){ - $ShowInfo = true; + $ShowFileInfo = true; } if ($ShowFileInfo){ /******************************************** Display file info for visual verification ********************************************/ - echo '<table>'; - echo '<tr><td>'._('Name').':</td><td>'.$_SESSION['CurImportFile']['name'].'</td></tr> - <tr><td>'. _('Size') .':</td><td>' . number_format($_SESSION['CurImportFile']['size']/1024,4) . 'kb</td></tr> - <tr><td>'. _('Type') .':</td><td>' . $_SESSION['CurImportFile']['type'] . '</td></tr> - <tr><td>'. _('TempName') .':</td><td>' . $_SESSION['CurImportFile']['tmp_name'] . '</td></tr> - <tr><td>'. _('Status') .':</td><td>' . - ($LineItem->SerialItemsValid?getMsg(_('Valid'),'success'):getMsg(_('Invalid'),'error')) . '</td></tr> - </table>'. - $invalid_imports.' '. _('out of') .' '.$TotalLines.' '. _('records are invalid').'<br />'; + $File=$_SESSION['CurImportFile']['tmp_name']; + $TotalLines = 0; + $Handle = fopen($File, 'r'); + while(!feof($Handle)){ + $Line = fgets($Handle); + $TotalLines++; + } + fclose($Handle); + if ($Line=='') { + $TotalLines--; + } + + echo '<br /><table class="selection" width="33%">'; + echo '<tr> + <td>'._('Name').':</td> + <td>'.$_SESSION['CurImportFile']['name'].'</td> + </tr> + <tr> + <td>'. _('Size') .':</td> + <td>' . number_format($_SESSION['CurImportFile']['size']/1024,4) . 'kb</td> + </tr> + <tr> + <td>'. _('Type') .':</td> + <td>' . $_SESSION['CurImportFile']['type'] . '</td> + </tr> + <tr> + <td>'. _('TempName') .':</td> + <td>' . basename($_SESSION['CurImportFile']['tmp_name']) . '</td> + </tr> + <tr> + <td>'. _('Status') .':</td> + <td>' . ($invalid_imports==0?getMsg(_('Valid'),'success'):getMsg(_('Invalid'),'error')) . '</td> + </tr> + </table><br />'; $filename = $_SESSION['CurImportFile']['tmp_name']; } -if (!$LineItem->SerialItemsValid and !$_SESSION['CurImportFile']['Processed']){ +if ($invalid_imports>0 and !$_SESSION['CurImportFile']['Processed']){ // IF all items are not valid, show the raw first 10 lines of the file. maybe it will help. - $filename = $_SESSION['CurImportFile']['tmp_name']; - $handle = fopen($filename, 'r'); - $i=0; - while (!feof($handle) and $i < 10) { - $contents .= fgets($handle, 4096); - $i++; - } - fclose($handle); echo '<br /><form method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -159,16 +175,34 @@ echo '</pre>'; } else { + echo '<br /><form method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<button type="submit" name="ValidateFile">' . _('Update Batches') . '</button> + <input type="hidden" name="LineNo" value="' . $LineNo . '" /> + <input type="hidden" name="InvalidImports" value="' . $invalid_imports . '" /> + <input type="hidden" name="StockID" value="' . $StockID . '" /> + <input type="hidden" name="EntryType" value="FILE" /><br />'; //Otherwise we have all valid records. show the first (100) for visual verification. - echo _('Below are the 1st 100 records as parsed'); - echo '<hr width="20%">'; + echo '<br /><table class="selection"> + <tr> + <th class="header" colspan="2">' . _('Below are the 1st 100 records as parsed') . '</th> + </tr> + <tr> + <th>' . _('Batch Number') . '</th> + <th>' . _('Quantity') . '</th> + </tr>'; + $i=0; foreach($LineItem->SerialItems as $SItem){ - echo $SItem->BundleRef.'<br />'; + echo '<tr> + <td>' . $SItem->BundleRef . '</td> + <td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td> + </tr>'; $i++; if ($i == 100) { break; - } + } } + echo '</table></form>'; } ?> \ 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: <tim...@us...> - 2012-05-08 19:36:58
|
Revision: 8843 http://weberp.svn.sourceforge.net/weberp/?rev=8843&view=rev Author: tim_schofield Date: 2012-05-08 19:36:52 +0000 (Tue, 08 May 2012) Log Message: ----------- Improvements to dispatch of serial/batch numbers Modified Paths: -------------- trunk/ConfirmDispatchControlled_Invoice.php trunk/includes/OutputSerialItems.php Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2012-05-08 18:27:26 UTC (rev 8842) +++ trunk/ConfirmDispatchControlled_Invoice.php 2012-05-08 19:36:52 UTC (rev 8843) @@ -11,6 +11,8 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="" alt="" />' . ' ' . $title . '</p>'; + if (isset($_GET['LineNo'])){ $LineNo = (int)$_GET['LineNo']; } elseif (isset($_POST['LineNo'])){ @@ -54,10 +56,8 @@ ********************************************/ echo '<div class="centre">'; -echo '<br /><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="" alt="" />'. _('Dispatch of up to').' '. number_format($LineItem->Quantity-$LineItem->QtyInv, $LineItem->DecimalPlaces). ' '. _('Controlled items').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('on order').' ' . $_SESSION['Items']->OrderNo . ' '. _('to'). ' ' . $_SESSION['Items']->CustomerName . '</p>'; -echo '<br /><font size="2"><b>'. _('Dispatch of up to').' '. number_format($LineItem->Quantity-$LineItem->QtyInv, $LineItem->DecimalPlaces). ' '. _('Controlled items').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('on order').' ' . $_SESSION['Items']->OrderNo . ' '. _('to'). ' ' . $_SESSION['Items']->CustomerName . '</b></font></div>'; - /** vars needed by InputSerialItem : **/ $StockID = $LineItem->StockID; $RecvQty = $LineItem->Quantity-$LineItem->QtyInv; @@ -72,6 +72,8 @@ of the item selected for dispatch */ $_SESSION['Items']->LineItems[$LineNo]->QtyDispatched = $TotalQuantity; +echo '<br /><div style="text-align: right"><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a></div>'; + include('includes/footer.inc'); exit; ?> \ No newline at end of file Modified: trunk/includes/OutputSerialItems.php =================================================================== --- trunk/includes/OutputSerialItems.php 2012-05-08 18:27:26 UTC (rev 8842) +++ trunk/includes/OutputSerialItems.php 2012-05-08 19:36:52 UTC (rev 8843) @@ -197,7 +197,7 @@ } echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="AddBatches" value="'. _('Enter'). '" /></div>'; +echo '<br /><div class="centre"><button type="submit" name="AddBatches" value="">'. _('Enter'). '</button></div>'; echo '</form></td><td valign=top>'; $ShowExisting=True; $_POST['EntryType']='Sequential'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |