From: <ice...@us...> - 2013-07-19 15:00:54
|
Revision: 6113 http://sourceforge.net/p/web-erp/reponame/6113 Author: icedlava Date: 2013-07-19 15:00:51 +0000 (Fri, 19 Jul 2013) Log Message: ----------- Fix a few syntax errors. Modified Paths: -------------- trunk/BOMIndented.php trunk/GLTags.php Modified: trunk/BOMIndented.php =================================================================== --- trunk/BOMIndented.php 2013-07-19 10:07:00 UTC (rev 6112) +++ trunk/BOMIndented.php 2013-07-19 15:00:51 UTC (rev 6113) @@ -11,7 +11,7 @@ include('includes/PDFStarter.php'); $pdf->addInfo('Title',_('Indented BOM Listing')); $pdf->addInfo('Subject',_('Indented BOM Listing')); - $FontSize=9;put + $FontSize=9; $PageNumber=1; $line_height=12; Modified: trunk/GLTags.php =================================================================== --- trunk/GLTags.php 2013-07-19 10:07:00 UTC (rev 6112) +++ trunk/GLTags.php 2013-07-19 15:00:51 UTC (rev 6113) @@ -65,7 +65,7 @@ <td><input type="hidden" name="reference" value="'.$_GET['SelectedTag'].'" />'; if (isset($_GET['Action']) AND $_GET['Action']=='edit') { - echo '<input type="submit" name="update" value="' . _('Update') . '" />';0 + echo '<input type="submit" name="update" value="' . _('Update') . '" />'; } else { echo '<input type="submit" name="submit" value="' . _('Insert') . '" />'; } |
From: <dai...@us...> - 2013-07-19 22:19:43
|
Revision: 6114 http://sourceforge.net/p/web-erp/reponame/6114 Author: daintree Date: 2013-07-19 22:19:41 +0000 (Fri, 19 Jul 2013) Log Message: ----------- editing Tims tutorial into the API manual Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/doc/Manual/ManualAPITutorial.html Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-07-19 15:00:51 UTC (rev 6113) +++ trunk/ConfirmDispatch_Invoice.php 2013-07-19 22:19:41 UTC (rev 6114) @@ -1677,7 +1677,7 @@ $j++; echo '<tr> <td>' ._('Invoice Text'). ':</td> - <td><textarea tabindex="'.$j.'" name="InvoiceText" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> + <td><textarea tabindex="'.$j.'" name="InvoiceText" pattern=".{0,20}" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> </tr>'; $j++; Modified: trunk/doc/Manual/ManualAPITutorial.html =================================================================== --- trunk/doc/Manual/ManualAPITutorial.html 2013-07-19 15:00:51 UTC (rev 6113) +++ trunk/doc/Manual/ManualAPITutorial.html 2013-07-19 22:19:41 UTC (rev 6114) @@ -15,18 +15,18 @@ In fact the XML-RPC "Server" in is just the script http://www.yourdomain.com//api/api_xml-rpc.php</p> <p>There is no daemon background process running continuously to field calls to the "server" it is just a script that is http posted to by the XML-RPC call sending the XML encoded method to be run together with the necessary parameters to the API - the server script runs the API php functions exposed by the xml-rpc methods and returns the XML-RPC response as an XML payload. The phpxmlrpc class does the packaging converting the PHP variables and arrays to the XML required for the XML-RPC call and also has the functions to convert the XML response into something useable in PHP without having to write the XML parsing routines.</p> <p>There is one hardcoded parameter that needs to be set in the api before you start to use it. The database name - the company database - to use with the api is defined in the file api/api_php.php - the variable -<blockquote><i>$api_DatabaseName='demo';</i></blockquote> +<blockquote><i>$api_DatabaseName="demo";</i></blockquote> <p>should be set before attempting to use the api.</p> <p> It is worthwhile reading a how-to on XML-RPC with PHP which explains in more detail what is going on as a primer for the concepts.</p> <p> The beauty of XML-RPC is that the client calling the XML-RPC server and performing native functions can be called from any language (with XML-RPC bindings). I have used Vala, Genie and Python. Python particularly has been very straight forward as it has an xmlrpclib bundled with it. Of course a PHP client is also possible and is demonstrated below.</p> <p> -The API help is actually produced by an xml-rpc call to the API using the system.listMethods method (this is a phpxmlrpc method - not a API method). Aother system xml-rpc method of phpxmlrpc class is used to return the details of each method's parameters required. So the help file not only documents each of the API methods it is itself and illustration of how the API can be used!!</p> +The API help is actually produced by an xml-rpc call to the API using the system.listMethods method (this is a phpxmlrpc method - not a API method). Aother system xml-rpc method of phpxmlrpc class is used to return the details of each method"s parameters required. So the help file not only documents each of the API methods it is itself and illustration of how the API can be used!!</p> <p>In the narrative below, the word "<i>Server</i>" is used to refer to the host webERP installation - in fact the <i>"server"</i> this is the script webERP/xml-rpc/api_xmlrpc.php</p> <p>The API is configured by default to use the company database weberpdemo, and this is hard coded in the script api/api_php.php on line 6: <blockquote><i> -$api_DatabaseName='weberpdemo'; +$api_DatabaseName="weberpdemo"; </i></blockquote> <p>This database should be changed manually before the API can be used to the company database that you wish the API to access. Note that the API can only work on one company in a webERP installation. This is a limitation of the design.</p> <p>Below is a simple example of how to use the API.</p> @@ -52,15 +52,15 @@ <br /> <br />/* The trap for me was that each parameter needs to be run through xmlrpcval() - to create the necessary xml required for the rpc call if one of the parameters required is an array then it needs to be processing into xml for the rpc call through php_xmlrpc_encode()*/ <br /> -<br />$Parameters['StockID'] = new xmlrpcval('DVD-TOPGUN'); //the stockid of the item we wish to know the balance for +<br />$Parameters["StockID"] = new xmlrpcval("DVD-TOPGUN"); //the stockid of the item we wish to know the balance for <br /> <br />//assuming the demo username and password will work ! <br /> -<br />$Parameters['Username'] = new xmlrpcval('admin'); +<br />$Parameters["Username"] = new xmlrpcval("admin"); <br /> -<br />$Parameters['Password'] = new xmlrpcval(''); +<br />$Parameters["Password"] = new xmlrpcval(""); <br /> -<br />$Msg = new xmlrpcmsg('.xmlrpc_GetStockBalance', $Parameters); +<br />$Msg = new xmlrpcmsg(".xmlrpc_GetStockBalance", $Parameters); <br /> <br />$Client = new xmlrpc_client($ServerURL); <br /> @@ -80,7 +80,7 @@ <br /> <br />for ($i=0; $i < sizeof($Answer[1]);$i++) { <br /> -<br /><blockquote>echo '' . $Answer[1][$i]['loccode'] . ' has ' . $Answer[1][$i]['quantity'] . ' on hand';</blockquote> +<br /><blockquote>echo "" . $Answer[1][$i]["loccode"] . " has " . $Answer[1][$i]["quantity"] . " on hand";</blockquote> <br /> <br />} <br /></blockquote> @@ -97,209 +97,351 @@ CreateCreditNote - to create a credit note from some base header data and an array of line items (as an associative array. In the same way as the InvoiceSalesOrder function this does all the same processing as a standard credit note from the interface in .</p> <p> There are some example scripts on the wiki showing how a number of the API XML-RPC functions are called - these scripts should be put on a web-server outside a installation - all you need to do is edit the config.inc file to give the system your username and password and the URL of your installation you wish to connect to. As always playing with the examples helps to figure out how it all works.</p> +<br /> +<h2>An Example Client</h2> +<p>For this example we will build a small PHP application that will first interrogate webERP for a full list of available stock locations, build them into an HTML drop down list and then allow a user to input a stock item code and return the quantity of stock of that item at the selected location. We will use PHP for simplicity but any language that has an xmlrpc library (just about every language) can be used to write a client.</p> +<p>Firstly we need the xmlrpc library, so we copy the xmlrpc sub-directory from webERP to this new project.</p> +<p>The basic code will look like this, and be saved into a file called index.php:</p> +<blockquote><i> +<html> + <head> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> + </head> + <body> + <form action="index.html" method="post"> + Stock Code:<input type="text" name="StockID" /><br /> + Location:<select name="location"> + <?php // Here will go the available stock locations from webERP?> + </select><br /> + <input type="submit" name="submit" value="Submit" /> + </form> + </body> +</html> +</blockquote></i> +<p>As its name suggests, the xmlrpc function calls are made by sending an XML file with the function name and the parameters to the server, and receive an XML file back from the server.</p> +<p>To assist with this, the phpxmlrpc library that webERP uses (and we will use as well for our client) contains methods to encode our function call as XML, and to decode the XML that we receive back.</p> +<p>First off we need to include the xmlrpc library in our file, so immediately above the HTML, we need the following:</p> +<blockquote><i> +<?php + include "xmlrpc/lib/xmlrpc.inc"; + $xmlrpc_internalencoding="UTF-8"; + include "xmlrpc/lib/xmlrpcs.inc"; +?> +</blockquote></i> +<p>To populate the drop down box with the stock locations in it the API function called webERP.xmlrpc_GetLocationList() is used. This function takes two parameters, a valid userid for the webERP instance, and the password for that user. Using the demo credentials is admin/weberp. Also, the file api_php.php must have the $api_databasename set to whatever the name of the database is on your target webERP installation.</p> +<p>The function to get the inventory locations will look like this, and be at the bottom of the file, within a PHP code section (ie <?php ?>).</p> +<blockquote><i> +<br /> function GetLocations() { +<br /> +<br /> //Encode the user/password combination +<br /> $UserID = php_xmlrpc_encode("admin"); +<br /> $Password = php_xmlrpc_encode("webERP"); +<br /> +<br /> //Create a client object to use for xmlrpc call +<br /> $Client = new xmlrpc_client("http://localhost/webERP/api/api_xml-rpc.php"); +<br /> +<br /> //Create a message object, containing the parameters and the function name +<br /> $Message = new xmlrpcmsg("webERP.xmlrpc_GetLocationList", array($UserID, $Password)); +</blockquote></i> +<p>The most common error just return no authorisation with no information about why this has happened. Most webERP API/XML-RPC calls returns an array containing two elements, the first - $Response[0] containing an integer code, and the second the result of the call, if one is expected. If the integer code is zero, this indicates success. Any other code indicates an error. These are the errors and the codes that are returned to represent them: +<blockquote><i> +<br />NoAuthorisation - 1 +<br />IncorrectDebtorNumberLength - 1000 +<br />DebtorNoAlreadyExists - 1001 +<br />IncorrectDebtorNameLength - 1002 +<br />InvalidAddressLine - 1003 +<br />CurrencyCodeNotSetup - 1004 +<br />SalesTypeNotSetup - 1005 +<br />InvalidClientSinceDate - 1006 +<br />HoldReasonNotSetup - 1007 +<br />PaymentTermsNotSetup - 1008 +<br />InvalidDiscount - 1009 +<br />InvalidPaymentDiscount - 1010 +<br />InvalidLastPaid - 1011 +<br />InvalidLastPaidDate - 1012 +<br />InvalidCreditLimit - 1013 +<br />InvalidInvAddrBranch - 1014 +<br />InvalidDiscountCode - 1015 +<br />InvalidEDIInvoices - 1016 +<br />InvalidEDIOrders - 1017 +<br />InvalidEDIReference - 1018 +<br />InvalidEDITransport - 1019 +<br />InvalidEDIAddress - 1020 +<br />InvalidEDIServerUser - 1021 +<br />InvalidEDIServerPassword - 1022 +<br />InvalidTaxRef - 1023 +<br />InvalidCustomerPOLine - 1024 +<br />DatabaseUpdateFailed - 1025 +<br />NoDebtorNumber - 1026 +<br />DebtorDoesntExist - 1027 +<br />IncorrectBranchNumberLength - 1028 +<br />BranchNoAlreadyExists - 1029 +<br />IncorrectBranchNameLength - 1030 +<br />InvalidEstDeliveryDays - 1031 +<br />AreaCodeNotSetup - 1032 +<br />SalesmanCodeNotSetup - 1033 +<br />InvalidFwdDate - 1034 +<br />InvalidPhoneNumber - 1035 +<br />InvalidFaxNumber - 1036 +<br />InvalidContactName - 1037 +<br />InvalidEmailAddress - 1038 +<br />LocationCodeNotSetup - 1039 +<br />TaxGroupIdNotSetup - 1040 +<br />ShipperNotSetup - 1041 +<br />InvalidDeliverBlind - 1042 +<br />InvalidDisableTrans - 1043 +<br />InvalidSpecialInstructions - 1044 +<br />InvalidCustBranchCode - 1045 +<br />BranchNoDoesntExist - 1046 +<br />StockCodeDoesntExist - 1047 +<br />StockCategoryDoesntExist - 1048 +<br />IncorrectStockDescriptionLength - 1049 +<br />IncorrectUnitsLength - 1050 +<br />IncorrectMBFlag - 1051 +<br />InvalidCurCostDate - 1052 +<br />InvalidActualCost - 1053 +<br />InvalidLowestLevel - 1054 +<br />InvalidDiscontinued - 1055 +<br />InvalidEOQ - 1056 +<br />InvalidVolume - 1057 +<br />InvalidKgs - 1058 +<br />IncorrectBarCodeLength - 1059 +<br />IncorrectDiscountCategory - 1060 +<br />TaxCategoriesDoesntExist - 1061 +<br />InvalidSerialised - 1062 +<br />IncorrectAppendFile - 1063 +<br />InvalidPerishable - 1064 +<br />InvalidDecmalPlaces - 1065 +<br />IncorrectLongStockDescriptionLength - 1066 +<br />StockCodeAlreadyExists - 1067 +<br />TransactionNumberAlreadyExists - 1068 +<br />InvalidTranDate - 1069 +<br />InvalidSettled - 1070 +<br />IncorrectReference - 1071 +<br />IncorrectTpe - 1072 +<br />InvalidOrderNumbers - 1073 +<br />InvalidExchangeRate - 1074 +<br />InvalidOVAmount - 1075 +<br />InvalidOVGst - 1076 +<br />InvalidOVFreight - 1077 +<br />InvalidDiffOnExchange - 1078 +<br />InvalidAllocation - 1079 +<br />IncorrectInvoiceText - 1080 +<br />InvalidShipVia - 1081 +<br />InvalidEdiSent - 1082 +<br />InvalidConsignment - 1083 +<br />InvalidLastCost - 1084 +<br />InvalidMaterialCost - 1085 +<br />InvalidLabourCost - 1086 +<br />InvalidOverheadCost - 1087 +<br />InvalidCustomerRef - 1088 +<br />InvalidBuyerName - 1089 +<br />InvalidComments - 1090 +<br />InvalidOrderDate - 1091 +<br />InvalidDeliverTo - 1092 +<br />InvalidFreightCost - 1094 +<br />InvalidDeliveryDate - 1095 +<br />InvalidQuotationFlag - 1096 +<br />OrderHeaderNotSetup - 1097 +<br />InvalidUnitPrice - 1098 +<br />InvalidQuantity - 1099 +<br />InvalidDiscountPercent - 1100 +<br />InvalidNarrative - 1101 +<br />InvalidItemDueDate - 1102 +<br />InvalidPOLine - 1103 +<br />GLAccountCodeAlreadyExists - 1104 +<br />IncorrectAccountNameLength - 1105 +<br />AccountGroupDoesntExist - 1106 +<br />GLAccountSectionAlreadyExists - 1107 +<br />IncorrectSectionNameLength - 1108 +<br />GLAccountGroupAlreadyExists - 1109 +<br />GLAccountSectionDoesntExist - 1110 +<br />InvalidPandL - 1111 +<br />InvalidSequenceInTB - 1112 +<br />GLAccountGroupDoesntExist - 1113 +<br />InvalidLatitude - 1114 +<br />InvalidLongitude - 1115 +<br />CustomerTypeNotSetup - 1116 +<br />NoPricesSetup - 1117 +<br />InvalidInvoicedQuantity - 1118 +<br />InvalidActualDispatchDate - 1119 +<br />InvalidCompletedFlag - 1120 +<br />InvalidCategoryID - 1121 +<br />InvalidCategoryDescription - 1122 +<br />InvalidStockType - 1123 +<br />GLAccountCodeDoesntExists - 1124 +<br />StockCategoryAlreadyExists - 1125 +<br />SupplierNoAlreadyExists - 1126 +<br />IncorrectSupplierNameLength - 1127 +<br />InvalidSupplierSinceDate - 1128 +<br />InvalidBankAccount - 1129 +<br />InvalidBankReference - 1130 +<br />InvalidBankPartics - 1131 +<br />InvalidRemittanceFlag - 1132 +<br />FactorCompanyNotSetup - 1133 +<br />SupplierNoDoesntExists - 1134 +<br />InvalidSuppliersUOM - 1135 +<br />InvalidConversionFactor - 1136 +<br />InvalidSupplierDescription - 1137 +<br />InvalidLeadTime - 1138 +<br />InvalidPreferredFlag - 1139 +<br />StockSupplierLineDoesntExist - 1140 +<br />InvalidRequiredByDate - 1141 +<br />InvalidStartDate - 1142 +<br />InvalidCostIssued - 1143 +<br />InvalidQuantityRequired - 1144 +<br />InvalidQuantityReceived - 1145 +<br />InvalidStandardCost - 1146 +<br />IncorrectSerialNumber - 1147 +<br />WorkOrderDoesntExist - 1148 +<br />InvalidIssuedQuantity - 1149 +<br />InvalidTransactionDate - 1150 +<br />InvalidReceivedQuantity - 1151 +<br />ItemNotControlled - 1152 +<br />ItemSerialised - 1153 +<br />BatchNumberDoesntExist - 1154 +<br />BatchIsEmpty - 1155 +<br />NoSuchArea - 1156 +<br />NoSuchSalesMan - 1157 +<br />NoCompanyRecord - 1158 +<br />NoReadOrder - 1159 +<br />NoReadOrderLines - 1160 +<br />NoTaxProvince - 1161 +<br />TaxRatesFailed - 1162 +<br />NoReadCustomerBranch - 1163 +<br />NoReadItem - 1164 +<br />MustBeReceiptOrCreditNote - 1165 +<br />NoTransactionToAllocate - 1166 +</blockquote></i> +<p>As you can see error code 1 indicates "NoAuthorisation" which will be the error returned if the user name or password is incorrect and also if the name of the database to be used in the api call is not specified correctly in the file webERP/api/api_php.php in the variable:</p> +<blockquote><i> +$api_DatabaseName="weberpdemo"; +</blockquote></i> +<p>To catch the errors we create a session variable to hold any error messages that happen, so that we can show the to the user. So the initialisation code at the top of index.php becomes:</p> +<blockquote><i><?php +<br />include "xmlrpc/lib/xmlrpc.inc"; +<br />$xmlrpc_internalencoding="UTF-8"; +<br />include "xmlrpc/lib/xmlrpcs.inc"; +<br />$_SESSION["Errors"] = array(); +?> +</i></blockquote> +<p>and then at the bottom of the output we have a loop to output these errors:</p> +<blockquote><i> +<br />foreach ($_SESSION["Errors"] as $Error) { +<br />echo $Error; +<br />} +</i></blockquote> +<br />Now we just need to capture that error. We need to put this code at the bottom of the GetLocations() function so that it now reads: +<blockquote><i> +<br />if ($ReturnValue[0] == 0) { +<br /> return $ReturnValue[1]; +<br />} elseif ($ReturnValue[0] == 1) { +<br /> $_SESSION["Errors"][] = "Incorrect login/password credentials used"; +<br />} +</i></blockquote> +<br />Now run the index.php script again in your browser and you should get output similar to this: +<br /> +<br />We just need to put this code at the bottom of our other functions, and then they will all be able to catch this error. +<br /> +<br />Now if we put the proper password back in index.php should work as before. +<br /> +<br />Now try entering a stock code that you know doesn"t exist and see what happens. I entered a part code called "wrong" and this is what I see. +<br /> +<br />This is not very helpful output so we need catch this error. A quick look here shows that error code 1047 is "StockCodeDoesntExist" and this should be returned if the code we entered is wrong. So we need to capture error 1047 in the GetStockQuantity() function. The code at the end of this function now becomes: +<blockquote><i> +<br />} elseif ($ReturnValue[0] == 1) { +<br />$_SESSION["Errors"][] = "Incorrect login/password credentials used"; +<br />} elseif ($ReturnValue[0] == 1047) { +<br />$_SESSION["Errors"][] = "The stock code you entered does not exist"; +<br />} +</blockquote></i> +<br />So now the function is checking that the user/password is correct and also checking that the stock code is correct and providing useful feedback in the case of any problems. We could go on and check for other errors but this should be enough for now. +<br /> +<br />To do this we need a function much like the one we used to extract the array of location codes. Here is the full code: +<blockquote><i> +<br /> function LocationName($LocationCode) { +<br /> +<br />//Encode the data items +<br /> $UserID = php_xmlrpc_encode("admin"); +<br /> $Password = php_xmlrpc_encode("webERP"); +<br /> $Code = php_xmlrpc_encode($LocationCode); +<br /> +<br /> //Create a client object to use for xmlrpc call and set its debug level to zero +<br /> $Client = new xmlrpc_client("http://localhost/webERP/api/api_xml-rpc.php"); +<br /> $Client->setDebug(0); +<br /> +<br /> //Create a message object, containing the parameters and the function name +<br /> $Message = new xmlrpcmsg("webERP.xmlrpc_GetLocationDetails", array($Code, $UserID, $Password)); +<br /> +<br /> //Use the client object to send the message object to the server, returning the response +<br /> $Response = $Client->send($Message); +<br /> +<br /> //Decode the response and return the array +<br /> $ReturnValue = php_xmlrpc_decode($Response->value()); +<br /> if ($ReturnValue[0] == 0) { +<br /> return $ReturnValue[1]["locationname"]; +<br /> } +<br /> } +</blockquote></i> +<br /> +<p>The first section encodes the parameters as XML. The first two parameters are always the userid/password combination, and for this function call we need a third parameter, which is the code of the location that we require the name of. The second section is identical to the previous function and creates an instance of the XML-RPC client class. The third section then creates an instance of the message class, with the first parameter being the full name of the API function being called, in this case webERP.xmlrpc_GetLocationDetails, and then the second parameter is an array of the encoded parameters, (location code, userid, password). This message is then sent to the server, and the response decoded into an array called $ReturnValue.</p> +<p>As last time the first element of the array signifies whether the function was successful (a zero), or any other integer for an error code. The second element is an associative array of details for that location. The key of each element is the field name for that value. In our case we just want the location name, so we return the element ["locationname"]. If it was the telephone number we were interested in we would just return the ["tel"] element.</p> +<p>Changing the line in the HTML where we fill the drop down box to:</p> +<blockquote><i> +echo <option value=" . $LocationCode . "> . LocationName($LocationCode) . "</option>"; +</blockquote></i> +<p>The full name of the location appears in the drop down the list, but the value returned by the form is still just the code.</p> +<p>All that is left to complete our client, is to type a stock code in the text box, submit the form and return the amount of stock for that code at the chosen location. First we need to insert some PHP code in the HTML to handle the form being sent:</p> - - -However we did not touch on what would happen if something goes wrong. Load up the application, and you should see a screen similar to this one: - - -Now load index.php into our editor and change the password on line 38 from 'webERP' to 'wrong'. Now if we reload index.php we get this screen. - -As you can see it cannot fetch any locations as the authentication does not work on this webERP instance. However it provides us with no information about why this has happened. If you recall from the tutorials regarding the writing of the client, the XML-RPC call returns an array containing two elements, the first - $Response[0] in our client - contains an integer code, and the second the result of the inquiry, if one is expected. If the integer code is zero, this indicates success. Any other code indicates an error. These error code can be found listed here. As you can see error code 1 indicates 'NoAuthorisation' which will be the error returned if the user name or password is incorrect. - -To catch the errors we create a session variable (not the best way I know, but convenient for this tutorial) to hold any error messages that happen, so that we can show the to the user. So the initialisation code at the top of index.php becomes: - -<?php - include 'xmlrpc/lib/xmlrpc.inc'; - $xmlrpc_internalencoding='UTF-8'; - include 'xmlrpc/lib/xmlrpcs.inc'; - $_SESSION['Errors'] = array(); -?> - -and then at the bottom of the output we have a loop to output these errors: - -foreach ($_SESSION['Errors'] as $Error) { - echo $Error; -} - -Now we just need to capture that error. We need to put this code at the bottom of the GetLocations() function so that it now reads: - -if ($ReturnValue[0] == 0) { - return $ReturnValue[1]; -} elseif ($ReturnValue[0] == 1) { - $_SESSION['Errors'][] = 'Incorrect login/password credentials used'; -} - -Now run the index.php script again in your browser and you should get out put similar to this: - -We just need to put this code at the bottom of our other functions, and then they will all be able to catch this error. - -Now if we put the proper password back in index.php should work as before. - - -Now try entering a stock code that you know doesn't exist and see what happens. I entered a part code called 'wrong' and this is what I see. - -This is not very helpful output so we need catch this error. A quick look here shows that error code 1047 is 'StockCodeDoesntExist' and this should be returned if the code we entered is wrong. So we need to capture error 1047 in the GetStockQuantity() function. The code at the end of this function now becomes: - -} elseif ($ReturnValue[0] == 1) { - $_SESSION['Errors'][] = 'Incorrect login/password credentials used'; -} elseif ($ReturnValue[0] == 1047) { - $_SESSION['Errors'][] = 'The stock code you entered does not exist'; -} - -So now the function is checking that the user/password is correct and also checking that the stock code is correct and providing useful feedback in the case of any problems. We could go on and check for other errors but this should be enough for now. - - - -To do this we need a function much like the one we used to extract the array of location codes. Here is the full code: - - function LocationName($LocationCode) { - - //Encode the data items - $UserID = php_xmlrpc_encode("admin"); - $Password = php_xmlrpc_encode("webERP"); - $Code = php_xmlrpc_encode($LocationCode); - - //Create a client object to use for xmlrpc call and set its debug level to zero - $Client = new xmlrpc_client("http://localhost/webERP/api/api_xml-rpc.php"); - $Client->setDebug(0); - - //Create a message object, containing the parameters and the function name - $Message = new xmlrpcmsg('webERP.xmlrpc_GetLocationDetails', array($Code, $UserID, $Password)); - - //Use the client object to send the message object to the server, returning the response - $Response = $Client->send($Message); - - //Decode the response and return the array - $ReturnValue = php_xmlrpc_decode($Response->value()); - if ($ReturnValue[0] == 0) { - return $ReturnValue[1]['locationname']; - } - } - -The first section encodes the parameters as XML. The first two parameters are always the userid/password combination, and for this function call we need a third parameter, which is the code of the location that we require the name of. The second section is identical to the previous function and creates an instance of the XML-RPC client class. The third section then creates an instance of the message class, with the first parameter being the full name of the API function being called, in this case webERP.xmlrpc_GetLocationDetails, and then the second parameter is an array of the encoded parameters, (location code, userid, password). This message is then sent to the server, and the response decoded into an array called $ReturnValue. - -As last time the first element of the array signifies whether the function was successful (a zero), or any other integer for an error code. The second element is an associative array of details for that location. The key of each element is the field name for that value. In our case we just want the location name, so we return the element ['locationname']. If it was the telephone number we were interested in we would just return the ['tel'] element. - -Changing the line in the HTML where we fill the drop down box to: - -echo '<option value="'.$LocationCode.'">'.LocationName($LocationCode).'</option>'; - -we can see that the web page in our browser now looks a little better. - -The full name of the location appears in the drop down the list, but the value returned by the form is still just the code. - -All that is left to complete our client, is to type a stock code in the text box, submit the form and return the amount of stock for that code at the chosen location. First we need to insert some PHP code in the HTML to handle the form being sent: - -<?php - if (isset($_POST['submit'])) { - echo 'The quantity of '.$_POST['StockID'].' at '.$_POST['location'] . ' is : ''.GetStockQuantity($_POST['StockID'], $_POST['location']); - } - ?> - -As you can see this calls another PHP function - GetStockQuantity() - that retrieves the stock quantity for the required item at the required location. Looking at the API function reference in the manual the API function we require is webERP.xmlrpc_GetStockBalance. However this time there is a small addition we require as this function returns an array containing the stock balances at all the locations for the given stock item. - -The full code for the PHP function is: - - - function GetStockQuantity($StockID, $LocationCode) { - //Encode the data items - $UserID = php_xmlrpc_encode("admin"); - $Password = php_xmlrpc_encode("webERP"); - $StockCode = php_xmlrpc_encode($StockID); - - //Create a client object to use for xmlrpc call and set its debug level to zero - $Client = new xmlrpc_client("http://localhost/webERP/api/api_xml-rpc.php"); - $Client->setDebug(0); - //Create a message object, containing the parameters and the function name - $Message = new xmlrpcmsg('webERP.xmlrpc_GetStockBalance', array($StockCode, $UserID, $Password)); - //Use the client object to send the message object to the server, returning the response - $Response = $Client->send($Message); - //Decode the response and return the array - $ReturnValue = php_xmlrpc_decode($Response->value()); - if ($ReturnValue[0] == 0) { - $Items = $ReturnValue[1]; - for ($i=0; $i<sizeOf($Items); $i++) { - if ($Items[$i]['loccode']==$LocationCode) { - return $Items[$i]['quantity']; - } - } - } - } - -I wont go through this in details as it is mostly the same as the previous functions. The key section is the last: - - $ReturnValue = php_xmlrpc_decode($Response->value()); - if ($ReturnValue[0] == 0) { - $Items = $ReturnValue[1]; - for ($i=0; $i<sizeOf($Items); $i++) { - if ($Items[$i]['loccode']==$LocationCode) { - return $Items[$i]['quantity']; - } - } - } - -Here the RPC returns an array of locations with the stock quantities for each location, and we filter out the location we need. - - -Showing that we have returned the correct numbers. - - -The Client: - -For this tutorial we will build a small PHP application that will first interrogate webERP for a full list of available stock locations, build them into an HTML drop down list and then allow a user to input a stock item code and return the quantity of stock of that item at the selected location. We will use PHP for simplicity but any language that has an xmlrpc library (just about every language) can be used to write a client. It is a lengthy post, so I am splitting it into two parts. This is part 1. - -Firstly we need the xmlrpc library, so we copy the xmlrpc sub-directory from webERP to this new project. - -The basic code will look like this, and be saved into a file called index.php: - -<html> - <head> - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - </head> - <body> - <form action="index.html" method="post"> - Stock Code:<input type="text" name="StockID" /><br /> - Location:<select name="location"> - <?php // Here will go the available stock locations from webERP?> - </select><br /> - <input type="submit" name="submit" value="Submit" /> - </form> - </body> -</html> - - -As it\x92s name suggests, the xmlrpc function calls are made by sending an XML file with the function name and the parameters to the server, and receive an XML file back from the server. - -To assist with this, the phpxmlrpc library that webERP uses (and we will use as well for our client) contains methods to encode our function call as XML, and to decode the XML that we receive back. - -First off we need to include the xmlrpc library in our file, so immediately above the HTML, we need the following: - -<?php - include 'xmlrpc/lib/xmlrpc.inc'; - $xmlrpc_internalencoding='UTF-8'; - include 'xmlrpc/lib/xmlrpcs.inc'; -?> - -Running this page in our browser looks like this: -Not very pretty but you can see the idea. - -Now the next thing we need is the code to populate the drop down box with the stock locations in it. Looking at the API function reference in the manual we see a function called webERP.xmlrpc_GetLocationList(). Obviously this is the function we require. Looking at the reference, the function takes two parameters, a valid userid for the webERP instance, and the password for that user. In my case that is admin/webERP as in the standard demo setup, you must change yours to be whatever the name of the database is on your target webERP installation. - -We require a PHP function to return a list of locations to populate the drop down list. The function will look like this, and be at the bottom of the file, within a PHP code section (ie <?php ?>). - - function GetLocations() { - - //Encode the user/password combination - $UserID = php_xmlrpc_encode("admin"); - $Password = php_xmlrpc_encode("webERP"); - - //Create a client object to use for xmlrpc call - $Client = new xmlrpc_client("http://localhost/webERP/api/api_xml-rpc.php"); - - //Create a message object, containing the parameters and the function name - $Message = new xmlrpcmsg('webERP.xmlrpc_GetLocationList', array($UserID, $Password)); - +<blockquote><i> +<br /> if (isset($_POST["submit"])) { +<br /> echo "The quantity of " . $_POST["StockID"] . " at " . $_POST["location"] . " is : " . GetStockQuantity($_POST["StockID"], $_POST["location"]); +<br /> } +</blockquote></i> +<p>As you can see this calls another PHP function - GetStockQuantity() - that retrieves the stock quantity for the required item at the required location. Looking at the API function reference in the manual the API function we require is webERP.xmlrpc_GetStockBalance. However this time there is a small addition we require as this function returns an array containing the stock balances at all the locations for the given stock item.</p> +<p>The full code for the PHP function is:</p> +<blockquote><i> +<br />function GetStockQuantity($StockID, $LocationCode) { +<br /> //Encode the data items +<br /> $UserID = php_xmlrpc_encode("admin"); +<br /> $Password = php_xmlrpc_encode("webERP"); +<br /> $StockCode = php_xmlrpc_encode($StockID); +<br /> +<br /> //Create a client object to use for xmlrpc call and set its debug level to zero +<br /> $Client = new xmlrpc_client("http://localhost/webERP/api/api_xml-rpc.php"); +<br /> $Client->setDebug(0); +<br /> //Create a message object, containing the parameters and the function name +<br /> $Message = new xmlrpcmsg("webERP.xmlrpc_GetStockBalance", array($StockCode, $UserID, $Password)); +<br /> //Use the client object to send the message object to the server, returning the response +<br /> $Response = $Client->send($Message); +<br /> //Decode the response and return the array +<br /> $ReturnValue = php_xmlrpc_decode($Response->value()); +<br /> if ($ReturnValue[0] == 0) { +<br /> $Items = $ReturnValue[1]; +<br /> for ($i=0; $i<sizeOf($Items); $i++) { +<br /> if ($Items[$i]["loccode"]==$LocationCode) { +<br /> return $Items[$i]["quantity"]; +<br /> } +<br /> } +<br /> } +<br /> } +</blockquote></i> +<br /> +<p>I wont go through this in details as it is mostly the same as the previous functions. The key section is the last:</p> +<blockquote><i> +<br /> $ReturnValue = php_xmlrpc_decode($Response->value()); +<br /> if ($ReturnValue[0] == 0) { +<br /> $Items = $ReturnValue[1]; +<br /> for ($i=0; $i<sizeOf($Items); $i++) { +<br /> if ($Items[$i]["loccode"]==$LocationCode) { +<br /> return $Items[$i]["quantity"]; +<br /> } +<br /> } +<br /> } +</blockquote></i> +<br />Here the RPC returns an array of locations with the stock quantities for each location, and we filter out the location we need. +<br /> +<br />Showing that we have returned the correct numbers. \ No newline at end of file |
From: <dai...@us...> - 2013-07-20 00:32:16
|
Revision: 6115 http://sourceforge.net/p/web-erp/reponame/6115 Author: daintree Date: 2013-07-20 00:32:12 +0000 (Sat, 20 Jul 2013) Log Message: ----------- Tims javascript table sorting function Modified Paths: -------------- trunk/SelectProduct.php trunk/css/aguapop/default.css trunk/css/default/default.css trunk/css/fluid/default.css trunk/css/fresh/default.css trunk/css/gel/default.css trunk/css/professional/default.css trunk/css/professional-rtl/default.css trunk/css/silverwolf/default.css trunk/doc/Change.log trunk/javascripts/MiscFunctions.js Added Paths: ----------- trunk/css/aguapop/images/ascending.png trunk/css/aguapop/images/descending.png trunk/css/default/images/ascending.png trunk/css/default/images/descending.png trunk/css/fluid/images/ascending.png trunk/css/fluid/images/descending.png trunk/css/fresh/images/ascending.png trunk/css/fresh/images/descending.png trunk/css/gel/images/ascending.png trunk/css/gel/images/descending.png trunk/css/professional/images/ascending.png trunk/css/professional/images/descending.png trunk/css/professional-rtl/images/ascending.png trunk/css/professional-rtl/images/descending.png trunk/css/silverwolf/images/ascending.png trunk/css/silverwolf/images/descending.png trunk/css/wood/images/ascending.png trunk/css/wood/images/descending.png Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/SelectProduct.php 2013-07-20 00:32:12 UTC (rev 6115) @@ -765,8 +765,8 @@ echo '<table id="ItemSearchTable" class="selection">'; $TableHeader = '<tr> <th>' . _('Stock Status') . '</th> - <th class="sort-header" onclick="SortSelect(this)">' . _('Code') . '</th> - <th class="sort-header" onclick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Description') . '</th> <th>' . _('Total Qty On Hand') . '</th> <th>' . _('Units') . '</th> </tr>'; @@ -803,11 +803,14 @@ <td>' . $myrow['units'] . '</td> <td><a target="_blank" href="' . $RootPath . '/StockStatus.php?StockID=' . $myrow['stockid'].'">' . _('View') . '</a></td> </tr>'; +/* $j++; + if ($j == 20 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) { $j = 1; echo $TableHeader; } + */ $RowIndex = $RowIndex + 1; //end of page full new headings if } Modified: trunk/css/aguapop/default.css =================================================================== --- trunk/css/aguapop/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/aguapop/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -70,15 +70,24 @@ font-weight:normal; padding:3px; } + +th.ascending { + cursor: s-resize; + color:green; + background: url(images/ascending.png) center right no-repeat; +} + +th.descending { + cursor: n-resize; + color:blue; + background: url(images/descending.png) centre right no-repeat; +} th.number { text-align: right; font-weight: normal; background-color: skyblue; color: white; } -th.SortableColumn { - cursor: s-resize; -} td { font-family: Arial, Verdana, Helvetica, sans-serif; text-align: left; Added: trunk/css/aguapop/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/aguapop/images/ascending.png =================================================================== --- trunk/css/aguapop/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/aguapop/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/aguapop/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/aguapop/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/aguapop/images/descending.png =================================================================== --- trunk/css/aguapop/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/aguapop/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/aguapop/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/default/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -30,7 +30,7 @@ padding:5px; font-weight:bold; color:black; - TEXT-ALIGN:center; + text-align:center; } p.good{ font-weight:bold; @@ -54,35 +54,19 @@ background-color:#B06161; color:white; } -th.sort-header { + +th.ascending { cursor: s-resize; + color:#B06161; + background: url(images/ascending.png) center right no-repeat; } -th.sort-header::-moz-selection, -th.sort-header::selection { - background:transparent; - } -table th.sort-header:after { - content:''; - float:right; - margin-top:7px; - border-width:0 4px 4px; - border-style:solid; - border-color:#404040 transparent; - visibility:hidden; - } -table th.sort-header:hover:after { - visibility:visible; - } -table th.sort-up:after, -table th.sort-down:after, -table th.sort-down:hover:after { - visibility:visible; - opacity:0.4; - } -table th.sort-up:after { - border-bottom:none; - border-width:4px 4px 0; + +th.descending { + cursor: n-resize; + color:#B06161; + background: url(images/descending.png) centre right no-repeat; } + th.number{ text-align:right; font-weight:normal; @@ -133,9 +117,9 @@ background-color:#EEEEEE; } div.error{ -background-color:#fddbdb; -color:red; -border:1px solid red; + background-color:#fddbdb; + color:red; + border:1px solid red; } div.warn{ background-color:#f5dbfd; Added: trunk/css/default/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/default/images/ascending.png =================================================================== --- trunk/css/default/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/default/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/default/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/default/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/default/images/descending.png =================================================================== --- trunk/css/default/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/default/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/default/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/fluid/default.css =================================================================== --- trunk/css/fluid/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fluid/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -56,9 +56,16 @@ color:#330000; text-align:right; } -th.SortableColumn { - cursor: s-resize; + +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; } + +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} td{ font-family:Arial, Verdana, Helvetica; text-align:left; Added: trunk/css/fluid/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/fluid/images/ascending.png =================================================================== --- trunk/css/fluid/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fluid/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/fluid/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/fluid/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/fluid/images/descending.png =================================================================== --- trunk/css/fluid/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fluid/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/fluid/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/fresh/default.css =================================================================== --- trunk/css/fresh/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fresh/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -75,9 +75,14 @@ background-color: #800000; color: white; } -th.SortableColumn { - cursor: s-resize; +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; } +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} td { text-align: left; } Added: trunk/css/fresh/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/fresh/images/ascending.png =================================================================== --- trunk/css/fresh/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fresh/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/fresh/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/fresh/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/fresh/images/descending.png =================================================================== --- trunk/css/fresh/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/fresh/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/fresh/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/gel/default.css =================================================================== --- trunk/css/gel/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/gel/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -74,9 +74,17 @@ background-color: #ccc; color: #330000; } -th.SortableColumn { - cursor: s-resize; +th.ascending { + cursor: s-resize; + color:green; + background: url(images/ascending.png) center right no-repeat; } + +th.descending { + cursor: n-resize; + color:blue; + background: url(images/descending.png) centre right no-repeat; +} td { font-family: Arial, Verdana, Helvetica, sans-serif; text-align: left; Added: trunk/css/gel/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/gel/images/ascending.png =================================================================== --- trunk/css/gel/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/gel/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/gel/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/gel/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/gel/images/descending.png =================================================================== --- trunk/css/gel/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/gel/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/gel/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/professional/default.css =================================================================== --- trunk/css/professional/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -94,15 +94,20 @@ color: #330000; text-align: center; } +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; +} +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} th.number { font-weight: normal; background-color: #cccce5; color: #330000; text-align: right; } -th.SortableColumn { - cursor: s-resize; -} div.error { background-color:#fddbdb; color: red; Added: trunk/css/professional/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/professional/images/ascending.png =================================================================== --- trunk/css/professional/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/professional/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/professional/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/professional/images/descending.png =================================================================== --- trunk/css/professional/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/professional/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/professional-rtl/default.css =================================================================== --- trunk/css/professional-rtl/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional-rtl/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -84,7 +84,6 @@ td.number { text-align: right; } - .EvenTableRows { background-color: #CCCCCC; } @@ -106,9 +105,14 @@ color: #330000; text-align: right; } -th.SortableColumn { - cursor: s-resize; +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; } +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} div.error { background-color:#fddbdb; color: red; Added: trunk/css/professional-rtl/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/professional-rtl/images/ascending.png =================================================================== --- trunk/css/professional-rtl/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional-rtl/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/professional-rtl/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/professional-rtl/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/professional-rtl/images/descending.png =================================================================== --- trunk/css/professional-rtl/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/professional-rtl/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/professional-rtl/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/silverwolf/default.css 2013-07-20 00:32:12 UTC (rev 6115) @@ -76,9 +76,15 @@ text-align:right; vertical-align:middle; } -th.SortableColumn { - cursor: s-resize; +th.ascending { + cursor: s-resize; + background: url(images/ascending.png) center right no-repeat; } + +th.descending { + cursor: n-resize; + background: url(images/descending.png) centre right no-repeat; +} td{ font-family:Arial, Verdana, Helvetica, sans-serif; font-size:100%; Added: trunk/css/silverwolf/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/silverwolf/images/ascending.png =================================================================== --- trunk/css/silverwolf/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/silverwolf/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/silverwolf/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/silverwolf/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/silverwolf/images/descending.png =================================================================== --- trunk/css/silverwolf/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/silverwolf/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/silverwolf/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/wood/images/ascending.png =================================================================== (Binary files differ) Index: trunk/css/wood/images/ascending.png =================================================================== --- trunk/css/wood/images/ascending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/wood/images/ascending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/wood/images/ascending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/css/wood/images/descending.png =================================================================== (Binary files differ) Index: trunk/css/wood/images/descending.png =================================================================== --- trunk/css/wood/images/descending.png 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/css/wood/images/descending.png 2013-07-20 00:32:12 UTC (rev 6115) Property changes on: trunk/css/wood/images/descending.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/doc/Change.log 2013-07-20 00:32:12 UTC (rev 6115) @@ -1,18 +1,21 @@ webERP Change Log -19/7/2013 Exson: add required to the input field of WWW_Access.php -7/19/2013: Exson make the WWW_Access.php html5 compatible -7/18/2013: Exson: Move the hidden input after the html document type definition. Reported by Tim. -07/18/2013 Exson: fixed the LanguageSetup.php extra language mark introduced by handle locale number. Reported by Tim. -07/18/2013: Exson: Fixed the missing negative mark problem reported by Tim. -07/18/2013: Exson add a locale style check to pass the style to MisFunctions.js to do locale number format validation in LanguageSetup.php. -07/18/2013 Exson: modify the MisFunctions.js to improve the locale number validation feature. -17/7/2013 icedlava: stripslashes on Description for consistency with LongDescription but why- only until we fix source of this problem in the code -17/7/2013 icedlava: add checkbox option in UI to clear item image -17/7/2013 Exson: Add space bar as a accepted charcode for number input in MiscFunctions.js -16/7/2013 icedlava: Add date check on purchase price effective date. -16/7/2013 icedlava: AllowCompanySelectionBox comparison fix to allow boolean value to evaluate correctly -14/7/2013 Exson: Add new directory for new installer and add those default installation sql file. -14/7/2013 Exson: Rewrite the installer by removing the save.php file and revise the index.php file. + +20/7/13 Phil: Added Tim's javascript as modified a bit to use different styles to allow sorting of tables - images for styles to all themes and added th.ascending th.descending to theme/default.css scripts +19/7/13 Phil: Swag of scripts updated for html5 <input type="tel" "email" pattern required="required" autofocus="autofocus" as per http://www.weberp.org/wiki/TransitionToHtml5 also added many title="" tooltips +19/7/13 Exson: add required to the input field of WWW_Access.php +19/7/13: Exson make the WWW_Access.php html5 compatible +18/7/13: Exson: Move the hidden input after the html document type definition. Reported by Tim. +18/7/13 Exson: fixed the LanguageSetup.php extra language mark introduced by handle locale number. Reported by Tim. +18/7/13: Exson: Fixed the missing negative mark problem reported by Tim. +18/7/13: Exson add a locale style check to pass the style to MisFunctions.js to do locale number format validation in LanguageSetup.php. +18/7/13 Exson: modify the MisFunctions.js to improve the locale number validation feature. +17/7/13 icedlava: stripslashes on Description for consistency with LongDescription but why- only until we fix source of this problem in the code +17/7/13 icedlava: add checkbox option in UI to clear item image +17/7/13 Exson: Add space bar as a accepted charcode for number input in MiscFunctions.js +16/7/13 icedlava: Add date check on purchase price effective date. +16/7/13 icedlava: AllowCompanySelectionBox comparison fix to allow boolean value to evaluate correctly +14/7/13 Exson: Add new directory for new installer and add those default installation sql file. +14/7/13 Exson: Rewrite the installer by removing the save.php file and revise the index.php file. 24/6/13 Phil: webSHOP ShopParameters.php script and new configuration variables to allow integrated shop 21/6/13 Phil: ContractCosting.php fix references to contract issues object which should just have been an array. 18/6/13 Phil: Reworked the display of stock category properties on the SelectProduct.php inquiry Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2013-07-19 22:19:41 UTC (rev 6114) +++ trunk/javascripts/MiscFunctions.js 2013-07-20 00:32:12 UTC (rev 6115) @@ -259,13 +259,12 @@ for (var j = 0, col; col = row.cells[j]; j++) { if (row.cells[j].innerHTML==columnText) { columnNumber=j; - s=getComputedStyle(row.cells[j], null); - if (s.cursor=="s-resize") { - row.cells[j].style.cursor="n-resize"; + if (selElem.className=="ascending") { + selElem.className='descending'; direction="a"; } else { - row.cells[j].style.cursor="s-resize"; - direction="d"; + selElem.className='ascending'; + direction="a"; } } } |
From: <te...@us...> - 2013-07-20 02:09:24
|
Revision: 6116 http://sourceforge.net/p/web-erp/reponame/6116 Author: tehonu Date: 2013-07-20 02:09:20 +0000 (Sat, 20 Jul 2013) Log Message: ----------- Added active field to sales categories to show / hide it on webSHOP Modified Paths: -------------- trunk/SalesCategories.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2013-07-20 00:32:12 UTC (rev 6115) +++ trunk/SalesCategories.php 2013-07-20 02:09:20 UTC (rev 6116) @@ -88,7 +88,8 @@ would not run in this case cos submit is false of course see the Delete code below*/ - $sql = "UPDATE salescat SET salescatname = '" . $_POST['SalesCatName'] . "' + $sql = "UPDATE salescat SET salescatname = '" . $_POST['SalesCatName'] . "', + active = '" . $_POST['Active'] . "' WHERE salescatid = '" .$SelectedCategory . "'"; $msg = _('The Sales category record has been updated'); } elseif ($InputError !=1) { @@ -96,9 +97,11 @@ /*Selected category is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new stock category form */ $sql = "INSERT INTO salescat (salescatname, - parentcatid) + parentcatid, + active) VALUES ( '" . $_POST['SalesCatName'] . "', - '" . (isset($ParentCategory)?($ParentCategory):('NULL')) . "')"; + '" . (isset($ParentCategory)?($ParentCategory):('NULL')) . "', + '" . $_POST['Active'] . "')"; $msg = _('A new Sales category record has been added'); } @@ -110,6 +113,7 @@ unset ($SelectedCategory); unset($_POST['SalesCatName']); + unset($_POST['Active']); unset($EditName); } elseif (isset($_GET['Delete']) AND isset($EditName)) { @@ -222,7 +226,8 @@ or deletion of the records*/ $sql = "SELECT salescatid, - salescatname + salescatname, + active FROM salescat WHERE parentcatid". (isset($ParentCategory)?('='.$ParentCategory):' =0') . " ORDER BY salescatname"; @@ -234,7 +239,10 @@ prnMsg(_('There are no categories defined at this level.')); } else { echo '<table class="selection">'; - echo '<tr><th>' . _('Sub Category') . '</th></tr>'; + echo '<tr> + <th>' . _('Sub Category') . '</th> + <th>' . _('Active?') . '</th> + </tr>'; $k=0; //row colour counter @@ -252,15 +260,21 @@ } else { $CatImgLink = _('No Image'); } - + if ($myrow['active'] == 1){ + $Active = _('Yes'); + }else{ + $Active = _('No'); + } printf('<td>%s</td> + <td>%s</td> <td><a href="%sParentCategory=%s">' . _('Select') . '</td> <td><a href="%sSelectedCategory=%s&ParentCategory=%s">' . _('Edit') . '</td> <td><a href="%sSelectedCategory=%s&Delete=yes&EditName=1&ParentCategory=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this sales category?') . '\');">' . _('Delete') .'</a></td> <td>%s</td> </tr>', $myrow['salescatname'], + $Active, htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['salescatid'], htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', @@ -293,7 +307,8 @@ $sql = "SELECT salescatid, parentcatid, - salescatname + salescatname, + active FROM salescat WHERE salescatid='". $SelectedCategory."'"; @@ -303,6 +318,7 @@ $_POST['SalesCatId'] = $myrow['salescatid']; $_POST['ParentCategory'] = $myrow['parentcatid']; $_POST['SalesCatName'] = $myrow['salescatname']; + $_POST['Active'] = $myrow['active']; echo '<input type="hidden" name="SelectedCategory" value="' . $SelectedCategory . '" />'; echo '<input type="hidden" name="ParentCategory" value="' . (isset($_POST['ParentCatId'])?($_POST['ParentCategory']):('0')) . '" />'; @@ -327,6 +343,20 @@ <td>' . _('Category Name') . ':</td> <td><input type="text" name="SalesCatName" size="20" maxlength="20" value="' . $_POST['SalesCatName'] . '" /></td> </tr>'; + +echo '<tr> + <td>' . _('Display in webSHOP?') . ':</td> + <td><select name="Active">'; +if ($_POST['Active'] == '1') { + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + echo '<option value="0">' . _('No') . '</option>'; +} else { + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + echo '<option value="1">' . _('Yes') . '</option>'; +} +echo '</select></td> + </tr>'; + // Image upload only if we have a selected category if (isset($SelectedCategory)) { echo '<tr> Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-20 00:32:12 UTC (rev 6115) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-20 02:09:20 UTC (rev 6116) @@ -180,5 +180,7 @@ INSERT INTO config VALUES ('ShopShowTopCategoryMenu','1'); INSERT INTO config VALUES ('ShopShowLogoAndShopName','1'); +ALTER TABLE `salescat` ADD `active` INT NOT NULL DEFAULT '1' COMMENT '1 if active 0 if inactive'; + UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <te...@us...> - 2013-07-20 11:32:02
|
Revision: 6117 http://sourceforge.net/p/web-erp/reponame/6117 Author: tehonu Date: 2013-07-20 11:31:59 +0000 (Sat, 20 Jul 2013) Log Message: ----------- added webSHOP manager email Modified Paths: -------------- trunk/ShopParameters.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-20 02:09:20 UTC (rev 6116) +++ trunk/ShopParameters.php 2013-07-20 11:31:59 UTC (rev 6117) @@ -31,6 +31,9 @@ if ($_SESSION['ShopTitle'] != $_POST['X_ShopTitle'] ) { $SQL[] = "UPDATE config SET confvalue = '" . DB_escape_string($_POST['X_ShopTitle']) ."' WHERE confname = 'ShopTitle'"; } + if ($_SESSION['ShopManagerEmail'] != $_POST['X_ShopManagerEmail'] ) { + $SQL[] = "UPDATE config SET confvalue = '" . DB_escape_string($_POST['X_ShopManagerEmail']) ."' WHERE confname = 'ShopManagerEmail'"; + } if ($_SESSION['ShopPrivacyStatement'] != $_POST['X_ShopPrivacyStatement'] ) { $SQL[] = "UPDATE config SET confvalue = '" . DB_escape_string($_POST['X_ShopPrivacyStatement']) ."' WHERE confname = 'ShopPrivacyStatement'"; } @@ -232,6 +235,13 @@ <td><input type="text" name="X_ShopTitle" required size="40" maxlength="40" value="' . $_SESSION['ShopTitle'] . '" /></td> <td>' . _('Enter the title of the shop that will be displayed on the main webSHOP page. Useful for SEO purposes.') . '</td> </tr>'; + +//Shop Manager Email +echo '<tr> + <td>' . _('Shop Manager Email') . ':</td> + <td><input type="text" name="X_ShopManagerEmail" required size="50" maxlength="50" value="' . $_SESSION['ShopManagerEmail'] . '" /></td> + <td>' . _('Enter the email address of the webSHOP manager.') . '</td> + </tr>'; // Shop Customer echo '<tr> Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-20 02:09:20 UTC (rev 6116) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-20 11:31:59 UTC (rev 6117) @@ -182,5 +182,7 @@ ALTER TABLE `salescat` ADD `active` INT NOT NULL DEFAULT '1' COMMENT '1 if active 0 if inactive'; +INSERT INTO config VALUES ('ShopManagerEmail',''); + UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2013-07-21 10:55:02
|
Revision: 6122 http://sourceforge.net/p/web-erp/reponame/6122 Author: daintree Date: 2013-07-21 10:54:58 +0000 (Sun, 21 Jul 2013) Log Message: ----------- Phil: Set default tax cat at stock category level Modified Paths: -------------- trunk/BOMInquiry.php trunk/SelectProduct.php trunk/StockCategories.php trunk/Stocks.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/BOMInquiry.php =================================================================== --- trunk/BOMInquiry.php 2013-07-21 10:20:02 UTC (rev 6121) +++ trunk/BOMInquiry.php 2013-07-21 10:54:58 UTC (rev 6122) @@ -173,9 +173,10 @@ FROM bom INNER JOIN stockmaster ON bom.component = stockmaster.stockid WHERE bom.parent = '" . $StockID . "' - AND bom.effectiveafter < Now() - AND bom.effectiveto > Now()"; - + AND bom.effectiveafter < '" . Date('Y-m-d') . "' + AND (bom.effectiveto > '" . Date('Y-m-d') . "' + OR bom.effectiveto='0000-00-00')"; + $ErrMsg = _('The bill of material could not be retrieved because'); $BOMResult = DB_query ($sql,$db,$ErrMsg); Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2013-07-21 10:20:02 UTC (rev 6121) +++ trunk/SelectProduct.php 2013-07-21 10:54:58 UTC (rev 6122) @@ -182,9 +182,10 @@ FROM bom INNER JOIN stockmaster ON bom.component=stockmaster.stockid - WHERE bom.parent='" . $StockID . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'", $db); + WHERE bom.parent = '" . $StockID . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "' + AND (bom.effectiveto > '" . Date('Y-m-d') . "' + OR bom.effectiveto='0000-00-00')";", $db); $CostRow = DB_fetch_row($CostResult); $Cost = $CostRow[0]; } else { Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2013-07-21 10:20:02 UTC (rev 6121) +++ trunk/StockCategories.php 2013-07-21 10:54:58 UTC (rev 6122) @@ -72,6 +72,7 @@ $sql = "UPDATE stockcategory SET stocktype = '" . $_POST['StockType'] . "', categorydescription = '" . $_POST['CategoryDescription'] . "', + defaulttaxcatid = '" . $_POST['DefaultTaxCatID'] . "', stockact = " . $_POST['StockAct'] . ", adjglact = " . $_POST['AdjGLAct'] . ", issueglact = " . $_POST['IssueGLAct'] . ", @@ -142,6 +143,7 @@ $sql = "INSERT INTO stockcategory (categoryid, stocktype, categorydescription, + defaulttaxcatid, stockact, adjglact, issueglact, @@ -152,6 +154,7 @@ '" . $_POST['CategoryID'] . "', '" . $_POST['StockType'] . "', '" . $_POST['CategoryDescription'] . "', + '" . $_POST['DefaultTaxCatID'] . "', '" . $_POST['StockAct'] . "', '" . $_POST['AdjGLAct'] . "', '" . $_POST['IssueGLAct'] . "', @@ -307,7 +310,8 @@ issueglact, purchpricevaract, materialuseagevarac, - wipact + wipact, + defaulttaxcatid FROM stockcategory WHERE categoryid='" . $SelectedCategory . "'"; @@ -323,6 +327,7 @@ $_POST['PurchPriceVarAct'] = $myrow['purchpricevaract']; $_POST['MaterialUseageVarAc'] = $myrow['materialuseagevarac']; $_POST['WIPAct'] = $myrow['wipact']; + $_POST['DefaultTaxCatID'] = $myrow['defaulttaxcatid']; } echo '<input type="hidden" name="SelectedCategory" value="' . $SelectedCategory . '" />'; echo '<input type="hidden" name="CategoryID" value="' . $_POST['CategoryID'] . '" />'; @@ -339,7 +344,7 @@ echo '<table class="selection"> <tr> <td>' . _('Category Code') . ':</td> - <td><input type="text" name="CategoryID" size="7" maxlength="6" value="' . $_POST['CategoryID'] . '" /></td> + <td><input type="text" name="CategoryID" required="required" autofocus="autofocus" pattern="[0-9a-zA-Z_]*{1,6}" title="' . _('Enter up to six alphanumeric characters or underscore as a code for this stock category') . '" size="7" maxlength="6" value="' . $_POST['CategoryID'] . '" /></td> </tr>'; } @@ -370,7 +375,7 @@ echo '<tr> <td>' . _('Category Description') . ':</td> - <td><input type="text" name="CategoryDescription" size="22" maxlength="20" value="' . $_POST['CategoryDescription'] . '" /></td> + <td><input type="text" name="CategoryDescription" required="required" title="' . _('A description of the inventory category is required') . '" size="22" maxlength="20" value="' . $_POST['CategoryDescription'] . '" /></td> </tr>'; @@ -401,6 +406,27 @@ echo '</select></td> </tr>'; +echo '<tr> + <td>' . _('Default Tax Category') . ':</td> + <td><select name="DefaultTaxCatID">'; +$sql = "SELECT taxcatid, taxcatname FROM taxcategories ORDER BY taxcatname"; +$result = DB_query($sql, $db); + +if (!isset($_POST['DefaultTaxCatID'])){ + $_POST['DefaultTaxCatID'] = $_SESSION['DefaultTaxCategory']; +} + +while ($myrow = DB_fetch_array($result)) { + if ($_POST['DefaultTaxCatID'] == $myrow['taxcatid']){ + echo '<option selected="selected" value="' . $myrow['taxcatid'] . '">' . $myrow['taxcatname'] . '</option>'; + } else { + echo '<option value="' . $myrow['taxcatid'] . '">' . $myrow['taxcatname'] . '</option>'; + } +} //end while loop + +echo '</select></td> + </tr>'; + echo '<tr><td><input type="submit" name="UpdateTypes" style="visibility:hidden;width:1px" value="Not Seen" />'; if (isset($_POST['StockType']) and $_POST['StockType']=='L') { $Result = $PnLAccountsResult; Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2013-07-21 10:20:02 UTC (rev 6121) +++ trunk/Stocks.php 2013-07-21 10:54:58 UTC (rev 6122) @@ -566,7 +566,9 @@ WHERE stockid='" . $StockID ."'",$db); if (DB_num_rows($result)==1){ prnMsg(_('The stock code entered is actually already in the database - duplicate stock codes are prohibited by the system. Try choosing an alternative stock code'),'error'); - exit; + InputError = 1; + $Errors[$i] = 'StockID'; + $i++; } else { $sql = "INSERT INTO stockmaster (stockid, description, @@ -844,7 +846,7 @@ } -echo '<form id="ItemForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<form name="ItemForm" enctype="multipart/form-data" method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<div>'; if (isset($StockID)){ echo '<table width="100%"> @@ -867,7 +869,7 @@ if ($New==1) { echo '<tr> <td>'. _('Item Code'). ':</td> - <td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' type="text" value="'.$StockID.'" name="StockID" size="21" maxlength="20" /></td> + <td><input ' . (in_array('StockID',$Errors) ? 'class="inputerror"' : '' ) .' autofocus="autofocus" required="required" pattern="[0-9a-zA-Z_]*{1,20}" type="text" value="'.$StockID.'" name="StockID" size="20" maxlength="20" /></td> </tr>'; } else { echo '<tr> @@ -955,7 +957,7 @@ } echo '<tr> <td>' . _('Part Description') . ' (' . _('short') . '):</td> - <td><input ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) .' type="text" name="Description" size="52" maxlength="50" value="' . stripslashes($Description) . '" /></td> + <td><input ' . (in_array('Description',$Errors) ? 'class="inputerror"' : '' ) .' type="text" ' . ($New==0?'autofocus="autofocus"':'') . ' name="Description" required="required" size="52" maxlength="50" value="' . stripslashes($Description) . '" /></td> </tr>'; foreach ($ItemDescriptionLanguages as $DescriptionLanguage) { Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-21 10:20:02 UTC (rev 6121) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-07-21 10:54:58 UTC (rev 6122) @@ -180,6 +180,7 @@ INSERT INTO config VALUES ('ShopShowTopCategoryMenu','1'); INSERT INTO config VALUES ('ShopShowLogoAndShopName','1'); +ALTER TABLE `stockcategory` ADD `defaulttaxcatid` TINYINT NOT NULL DEFAULT '1' ALTER TABLE `salescat` ADD `active` INT NOT NULL DEFAULT '1' COMMENT '1 if active 0 if inactive'; INSERT INTO config VALUES ('ShopManagerEmail',''); |
From: <te...@us...> - 2013-07-21 12:49:45
|
Revision: 6126 http://sourceforge.net/p/web-erp/reponame/6126 Author: tehonu Date: 2013-07-21 12:49:43 +0000 (Sun, 21 Jul 2013) Log Message: ----------- Change from type text to email as suggested by Tim Modified Paths: -------------- trunk/ShopParameters.php trunk/SystemParameters.php Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-07-21 12:43:50 UTC (rev 6125) +++ trunk/ShopParameters.php 2013-07-21 12:49:43 UTC (rev 6126) @@ -239,7 +239,7 @@ //Shop Manager Email echo '<tr> <td>' . _('Shop Manager Email') . ':</td> - <td><input type="text" name="X_ShopManagerEmail" required size="50" maxlength="50" value="' . $_SESSION['ShopManagerEmail'] . '" /></td> + <td><input type="email" name="X_ShopManagerEmail" required size="50" maxlength="50" value="' . $_SESSION['ShopManagerEmail'] . '" /></td> <td>' . _('Enter the email address of the webSHOP manager.') . '</td> </tr>'; Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2013-07-21 12:43:50 UTC (rev 6125) +++ trunk/SystemParameters.php 2013-07-21 12:49:43 UTC (rev 6126) @@ -1107,15 +1107,15 @@ echo '</select></td><td>' . _('This location is the location where work orders will be created from when the auto create work orders option is activated') . '</td></tr>'; echo '<tr style="outline: 1px solid"><td>' . _('Factory Manager Email Address') . ':</td> - <td><input type="text" name="X_FactoryManagerEmail" size="50" maxlength="50" value="' . $_SESSION['FactoryManagerEmail'] . '" /></td> + <td><input type="email" name="X_FactoryManagerEmail" size="50" maxlength="50" value="' . $_SESSION['FactoryManagerEmail'] . '" /></td> <td>' . _('Work orders automatically created when sales orders are entered will be emailed to this address') .'</td></tr>'; echo '<tr style="outline: 1px solid"><td>' . _('Purchasing Manager Email Address') . ':</td> - <td><input type="text" name="X_PurchasingManagerEmail" size="50" maxlength="50" value="' . $_SESSION['PurchasingManagerEmail'] . '" /></td> + <td><input type="email" name="X_PurchasingManagerEmail" size="50" maxlength="50" value="' . $_SESSION['PurchasingManagerEmail'] . '" /></td> <td>' . _('The email address for the purchasing manager, used to receive notifications by the tendering system') .'</td></tr>'; echo '<tr style="outline: 1px solid"><td>' . _('Inventory Manager Email Address') . ':</td> - <td><input type="text" name="X_InventoryManagerEmail" size="50" maxlength="50" value="' . $_SESSION['InventoryManagerEmail'] . '" /></td> + <td><input type="email" name="X_InventoryManagerEmail" size="50" maxlength="50" value="' . $_SESSION['InventoryManagerEmail'] . '" /></td> <td>' . _('The email address for the inventory manager, where notifications of all manual stock adjustments created are sent by the system. Leave blank if no emails should be sent to the factory manager for manual stock adjustments') .'</td></tr>'; echo '<tr style="outline: 1px solid"> |
From: <ice...@us...> - 2013-07-22 10:27:09
|
Revision: 6134 http://sourceforge.net/p/web-erp/reponame/6134 Author: icedlava Date: 2013-07-22 10:27:07 +0000 (Mon, 22 Jul 2013) Log Message: ----------- Small cleanup on a few typos. Modified Paths: -------------- trunk/PO_Items.php trunk/SelectProduct.php trunk/Stocks.php Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2013-07-22 01:55:02 UTC (rev 6133) +++ trunk/PO_Items.php 2013-07-22 10:27:07 UTC (rev 6134) @@ -498,8 +498,6 @@ if ($AllowUpdate == true){ //adding the non-stock item - //adding the non-stock item - $_SESSION['PO'.$identifier]->add_to_order($_SESSION['PO'.$identifier]->LinesOnOrder+1, '', 0, /*Serialised */ Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2013-07-22 01:55:02 UTC (rev 6133) +++ trunk/SelectProduct.php 2013-07-22 10:27:07 UTC (rev 6134) @@ -184,8 +184,9 @@ ON bom.component=stockmaster.stockid WHERE bom.parent = '" . $StockID . "' AND bom.effectiveafter < '" . Date('Y-m-d') . "' - AND (bom.effectiveto > '" . Date('Y-m-d') . "' - OR bom.effectiveto='0000-00-00')";", $db); + AND (bom.effectiveto > '" . Date('Y-m-d') . "' + OR bom.effectiveto='0000-00-00')", + $db); $CostRow = DB_fetch_row($CostResult); $Cost = $CostRow[0]; } else { @@ -199,7 +200,7 @@ echo '</table>'; //end of first nested table // Item Category Property mod: display the item properties echo '<table>'; - + $sql = "SELECT stkcatpropid, label, controltype, @@ -447,8 +448,8 @@ } echo '<div class="centre">' . $StockImgLink . '</div>'; - - + + if (($myrow['mbflag'] == 'B') AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens'])) AND $myrow['discontinued']==0){ Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2013-07-22 01:55:02 UTC (rev 6133) +++ trunk/Stocks.php 2013-07-22 10:27:07 UTC (rev 6134) @@ -566,7 +566,7 @@ WHERE stockid='" . $StockID ."'",$db); if (DB_num_rows($result)==1){ prnMsg(_('The stock code entered is actually already in the database - duplicate stock codes are prohibited by the system. Try choosing an alternative stock code'),'error'); - InputError = 1; + $InputError = 1; $Errors[$i] = 'StockID'; $i++; } else { |
From: <rc...@us...> - 2013-07-22 16:45:07
|
Revision: 6137 http://sourceforge.net/p/web-erp/reponame/6137 Author: rchacon Date: 2013-07-22 16:45:04 +0000 (Mon, 22 Jul 2013) Log Message: ----------- Relative alignment of the rightmost column. Modified Paths: -------------- trunk/PDFQuotation.php trunk/PDFQuotationPortrait.php trunk/includes/PDFQuotationPageHeader.inc trunk/includes/PDFQuotationPortraitPageHeader.inc Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2013-07-22 14:16:56 UTC (rev 6136) +++ trunk/PDFQuotation.php 2013-07-22 16:45:04 UTC (rev 6137) @@ -203,7 +203,7 @@ } $LeftOvers = $pdf->addTextWrap(585,$YPos,85,$FontSize,$DisplayTaxClass,'right'); $LeftOvers = $pdf->addTextWrap(650,$YPos,85,$FontSize,$DisplayTaxAmount,'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,$DisplayTotal,'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, $DisplayTotal,'right'); if (mb_strlen($myrow2['narrative'])>1){ $YPos -= ($line_height); $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,870,$FontSize,$myrow2['narrative']); @@ -229,15 +229,15 @@ include ('includes/PDFQuotationPageHeader.inc'); } //end if need a new page headed up - $YPos -= ($line_height); - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Excluding Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,locale_number_format($QuotationTotalEx,$myrow['currdecimalplaces']),'right'); + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90-655, $YPos, 655, $FontSize, _('Quotation Excluding Tax'),'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, locale_number_format($QuotationTotalEx,$myrow['currdecimalplaces']), 'right'); $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Total Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,locale_number_format($TaxTotal,$myrow['currdecimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90-655, $YPos, 655, $FontSize, _('Total Tax'), 'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, locale_number_format($TaxTotal,$myrow['currdecimalplaces']), 'right'); $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Including Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,locale_number_format($QuotationTotal,$myrow['currdecimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90-655, $YPos, 655, $FontSize, _('Quotation Including Tax'),'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, locale_number_format($QuotationTotal,$myrow['currdecimalplaces']), 'right'); $YPos -= ($line_height); $LeftOvers = $pdf->addTextWrap($XPos,$YPos,30,10,_('Notes:')); Modified: trunk/PDFQuotationPortrait.php =================================================================== --- trunk/PDFQuotationPortrait.php 2013-07-22 14:16:56 UTC (rev 6136) +++ trunk/PDFQuotationPortrait.php 2013-07-22 16:45:04 UTC (rev 6137) @@ -203,7 +203,7 @@ } $LeftOvers = $pdf->addTextWrap(330,$YPos,85,$FontSize,$DisplayTaxClass,'right'); $LeftOvers = $pdf->addTextWrap(410,$YPos,85,$FontSize,$DisplayTaxAmount,'center'); - $LeftOvers = $pdf->addTextWrap(460,$YPos,90,$FontSize,$DisplayTotal,'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, $DisplayTotal,'right'); if (mb_strlen($myrow2['narrative'])>1){ $YPos -= 10; $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,750,10,$myrow2['narrative']); @@ -247,15 +247,15 @@ } } } - $YPos -= ($line_height); - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Total Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,locale_number_format($TaxTotal,$myrow['currdecimalplaces']),'right'); + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90-655, $YPos, 655, $FontSize, _('Quotation Excluding Tax'),'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, locale_number_format($QuotationTotalEx,$myrow['currdecimalplaces']), 'right'); $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Excluding Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,locale_number_format($QuotationTotalEx,$myrow['currdecimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90-655, $YPos, 655, $FontSize, _('Total Tax'), 'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, locale_number_format($TaxTotal,$myrow['currdecimalplaces']), 'right'); $YPos -= 12; - $LeftOvers = $pdf->addTextWrap(40,$YPos,655,$FontSize,_('Quotation Including Tax'),'right'); - $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,locale_number_format($QuotationTotal,$myrow['currdecimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90-655, $YPos, 655, $FontSize, _('Quotation Including Tax'),'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, locale_number_format($QuotationTotal,$myrow['currdecimalplaces']), 'right'); } /*end if there are line details to show on the quotation*/ Modified: trunk/includes/PDFQuotationPageHeader.inc =================================================================== --- trunk/includes/PDFQuotationPageHeader.inc 2013-07-22 14:16:56 UTC (rev 6136) +++ trunk/includes/PDFQuotationPageHeader.inc 2013-07-22 16:45:04 UTC (rev 6137) @@ -107,7 +107,7 @@ $LeftOvers = $pdf->addTextWrap(535,$YPos,85,$FontSize, _('Discount'),'right'); $LeftOvers = $pdf->addTextWrap(585,$YPos,85,$FontSize, _('Tax Class'),'right'); $LeftOvers = $pdf->addTextWrap(650,$YPos,85,$FontSize, _('Tax Amount'),'right'); -$LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize, _('Total'),'right'); +$LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, _('Total'),'right'); /*draw a box with nice round corner for entering line items */ /*90 degree arc at top right of box 0 degrees starts a bottom */ Modified: trunk/includes/PDFQuotationPortraitPageHeader.inc =================================================================== --- trunk/includes/PDFQuotationPortraitPageHeader.inc 2013-07-22 14:16:56 UTC (rev 6136) +++ trunk/includes/PDFQuotationPortraitPageHeader.inc 2013-07-22 16:45:04 UTC (rev 6137) @@ -106,7 +106,7 @@ $LeftOvers = $pdf->addTextWrap(280,$YPos,85,$FontSize, _('Discount'),'right'); $LeftOvers = $pdf->addTextWrap(330,$YPos,85,$FontSize, _('Tax Class'),'right'); $LeftOvers = $pdf->addTextWrap(400,$YPos,85,$FontSize, _('Tax Amount'),'right'); -$LeftOvers = $pdf->addTextWrap(450,$YPos,90,$FontSize, _('Total'),'right'); +$LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-90, $YPos, 90, $FontSize, _('Total'),'right'); /*draw a box with nice round corner for entering line items */ @@ -136,4 +136,4 @@ $FontSize =12; -?> \ No newline at end of file +?> |
From: <dai...@us...> - 2013-07-25 06:32:28
|
Revision: 6144 http://sourceforge.net/p/web-erp/reponame/6144 Author: daintree Date: 2013-07-25 06:32:24 +0000 (Thu, 25 Jul 2013) Log Message: ----------- html5 work Modified Paths: -------------- trunk/GLBalanceSheet.php trunk/ImportBankTrans.php trunk/ImportBankTransAnalysis.php trunk/Locations.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/MRPReport.php trunk/MailingGroupMaintenance.php trunk/MaintenanceReminders.php trunk/MaintenanceTasks.php trunk/Manufacturers.php trunk/WWW_Users.php Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/GLBalanceSheet.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -23,14 +23,15 @@ echo '<div class="page_help_text">' . _('Balance Sheet (or statement of financial position) is a summary of balances. Assets, liabilities and ownership equity are listed as of a specific date, such as the end of its financial year. Of the four basic financial statements, the balance sheet is the only statement which applies to a single point in time.') . '<br />' . _('The balance sheet has three parts: assets, liabilities and ownership equity. The main categories of assets are listed first and are followed by the liabilities. The difference between the assets and the liabilities is known as equity or the net assets or the net worth or capital of the company and according to the accounting equation, net worth must equal assets minus liabilities.') . '<br />' - . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div> - <form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> - <div> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <table class="selection"> + . _('webERP is an "accrual" based system (not a "cash based" system). Accrual systems include items when they are invoiced to the customer, and when expenses are owed based on the supplier invoice date.') . '</div>'; + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection"> <tr> <td>'._('Select the balance date').':</td> - <td><select required="required" autofocus="autofocus" name="BalancePeriodEnd">'; + <td><select required="required" name="BalancePeriodEnd">'; $periodno=GetPeriod(Date($_SESSION['DefaultDateFormat']), $db); $sql = "SELECT lastdate_in_period FROM periods WHERE periodno='".$periodno . "'"; @@ -53,14 +54,17 @@ echo '<tr> <td>'._('Detail Or Summary').':</td> - <td><select required="required" name="Detail"> + <td><select required="required" name="Detail" title="' . _('Selecting Summary will show on the totals at the account group level') . '" > <option value="Summary">'._('Summary') . '</option> <option selected="selected" value="Detailed">'._('All Accounts') . '</option> </select></td> - </tr>'; + </tr> + <tr> + <td>' . _('Show all Accounts including zero balances') . '</td> + <td><input type="checkbox" title="' . _('Check this box to display all accounts including those accounts with no balance') . '" name="ShowZeroBalances"></td> + </tr> + </table>'; - echo '</table>'; - echo '<br /> <div class="centre"> <input type="submit" name="ShowBalanceSheet" value="'._('Show on Screen (HTML)').'" /> @@ -218,9 +222,9 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_number_format($SectionBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_number_format($SectionBalanceLY,$_SESSION['CompanyRecord']['decimalplaces']),'right'); $YPos -= (2 * $line_height); - if ($YPos < $Bottom_Margin){ - include('includes/PDFBalanceSheetPageHeader.inc'); - } + if ($YPos < $Bottom_Margin){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } } $SectionBalanceLY = 0; $SectionBalance = 0; @@ -237,11 +241,11 @@ } if ($myrow['groupname']!= $ActGrp){ - if ($YPos < $Bottom_Margin + $line_height){ - include('includes/PDFBalanceSheetPageHeader.inc'); - } - $FontSize =8; - $pdf->setFont('','B'); + if ($YPos < $Bottom_Margin + $line_height){ + include('includes/PDFBalanceSheetPageHeader.inc'); + } + $FontSize =8; + $pdf->setFont('','B'); if ($myrow['parentgroupname']==$ActGrp AND $ActGrp!=''){ $Level++; } @@ -266,14 +270,16 @@ $CheckTotal += $AccountBalance; - if ($_POST['Detail']=='Detailed'){ - $FontSize =8; - $pdf->setFont('',''); - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,$myrow['accountcode']); - $LeftOvers = $pdf->addTextWrap($Left_Margin+55,$YPos,200,$FontSize,$myrow['accountname']); - $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); - $YPos -= $line_height; + if ($_POST['Detail']=='Detailed') { + if (isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountBalance <> 0 OR $LYAccountBalance <> 0))){ + $FontSize =8; + $pdf->setFont('',''); + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,50,$FontSize,$myrow['accountcode']); + $LeftOvers = $pdf->addTextWrap($Left_Margin+55,$YPos,200,$FontSize,$myrow['accountname']); + $LeftOvers = $pdf->addTextWrap($Left_Margin+250,$YPos,100,$FontSize,locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,100,$FontSize,locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $YPos -= $line_height; + } } if ($YPos < ($Bottom_Margin)){ include('includes/PDFBalanceSheetPageHeader.inc'); @@ -563,29 +569,30 @@ if ($_POST['Detail']=='Detailed'){ - - if ($k==1){ - echo '<tr class="OddTableRows">'; - $k=0; - } else { - echo '<tr class="EvenTableRows">'; - $k++; + if (isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountBalance <> 0 OR $LYAccountBalance <> 0))){ + if ($k==1){ + echo '<tr class="OddTableRows">'; + $k=0; + } else { + echo '<tr class="EvenTableRows">'; + $k++; + } + + $ActEnquiryURL = '<a href="' . $RootPath . '/GLAccountInquiry.php?Period=' . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . '</a>'; + + printf('<td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> + <td></td> + </tr>', + $ActEnquiryURL, + htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), + locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']), + locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces'])); + $j++; } - - $ActEnquiryURL = '<a href="' . $RootPath . '/GLAccountInquiry.php?Period=' . $_POST['BalancePeriodEnd'] . '&Account=' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . '</a>'; - - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> - <td></td> - </tr>', - $ActEnquiryURL, - htmlspecialchars($myrow['accountname'],ENT_QUOTES,'UTF-8',false), - locale_number_format($AccountBalance,$_SESSION['CompanyRecord']['decimalplaces']), - locale_number_format($LYAccountBalance,$_SESSION['CompanyRecord']['decimalplaces'])); - $j++; } } //end of loop Modified: trunk/ImportBankTrans.php =================================================================== --- trunk/ImportBankTrans.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/ImportBankTrans.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -20,7 +20,7 @@ echo '<table> <tr> <td>'. _('MT940 format Bank Statement File to import').'</td> - <td><input type="file" id="ImportFile" name="ImportFile"></td> + <td><input type="file" id="ImportFile" autofocus="autofocus" required="required" title="' . _('Select the file that contains the bank transactions in MT940 format') . '" name="ImportFile"></td> </tr> </table>'; echo '<div class="centre"><input type="submit" name="Import" value="Process"></div>'; @@ -595,7 +595,7 @@ echo '<tr> <td>' . _('Exchange Rate to Use When Processing Transactions') . '</td> - <td><input type="text" class="number" name="ExchangeRate" value="' . $_SESSION['Statement']->ExchangeRate . '" /></td> + <td><input type="text" class="number" required="required" name="ExchangeRate" value="' . $_SESSION['Statement']->ExchangeRate . '" /></td> </tr>'; } else { echo '<input type="hidden" name="ExchangeRate" value="1" />'; Modified: trunk/ImportBankTransAnalysis.php =================================================================== --- trunk/ImportBankTransAnalysis.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/ImportBankTransAnalysis.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -167,7 +167,7 @@ $result = DB_query("SELECT debtorno, name FROM debtorsmaster - WHERE currcode='" . $_SESSION['Statement']->CurrCode . "' + WHERE currcode='" . $_SESSION['Statement']->CurrCode . "' ORDER BY name",$db); if ($_SESSION['Trans'][$TransID]->DebtorNo ==''){ echo '<option selected value="">' . _('GL Receipt') . '</option>'; @@ -261,7 +261,7 @@ } echo '<tr> <td>' . _('Account Code') . ':</td> - <td><input type="text" name="GLCode" size=12 maxlength=11 value="' . $_POST['GLCode'] . '"></td> + <td><input type="text" name="GLCode" size="12" required="required" maxlength="11" value="' . $_POST['GLCode'] . '"></td> </tr>'; echo '<tr> <td>' . _('Account Selection') . ':<br />(' . _('If you know the code enter it above') . '<br />' . _('otherwise select the account from the list') . ')</td> @@ -286,7 +286,7 @@ } echo '<tr> <td>' . _('Amount') . ':</td> - <td><input type="text" class="number" name="Amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '"></td> + <td><input type="text" class="number" name="Amount" required="required" size="12" maxlength="11" value="' . locale_number_format($_POST['Amount'],$_SESSION['Statement']->CurrDecimalPlaces) . '"></td> </tr>'; if (!isset($_POST['Narrative'])) { Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/Locations.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -497,7 +497,7 @@ </tr>'; echo '<tr> <td>' . _('Location Code') . ':</td> - <td><input type="text" name="LocCode" value="' . $_POST['LocCode'] . '" size="5" maxlength="5" /></td> + <td><input type="text" autofocus="autofocus" required="required" title="' . _('Enter up to five characters for the inventory location code') . '" pattern="[0-9a-zA-Z_]*" name="LocCode" value="' . $_POST['LocCode'] . '" size="5" maxlength="5" /></td> </tr>'; } if (!isset($_POST['LocationName'])) { @@ -545,11 +545,11 @@ echo '<tr> <td>' . _('Location Name') . ':' . '</td> - <td><input type="text" name="LocationName" value="'. $_POST['LocationName'] . '" size="51" maxlength="50" /></td> + <td><input type="text" name="LocationName" required="required" value="'. $_POST['LocationName'] . '" title="' . _('Enter the inventory location name this could be either a warehouse or a factory') . '" namesize="51" maxlength="50" /></td> </tr> <tr> <td>' . _('Contact for deliveries') . ':' . '</td> - <td><input type="text" name="Contact" value="' . $_POST['Contact'] . '" size="31" maxlength="30" /></td> + <td><input type="text" name="Contact" required="required" value="' . $_POST['Contact'] . '" title="' . _('Enter the name of the responsible person to contact for this inventory location') . '" size="31" maxlength="30" /></td> </tr> <tr> <td>' . _('Delivery Address 1') . ':' . '</td> @@ -577,15 +577,15 @@ </tr> <tr> <td>' . _('Telephone No') . ':' . '</td> - <td><input type="text" name="Tel" value="' . $_POST['Tel'] . '" size="31" maxlength="30" /></td> + <td><input type="tel" name="Tel" pattern="[0-9\+\s]*]" value="' . $_POST['Tel'] . '" size="31" maxlength="30" /></td> </tr> <tr> <td>' . _('Facsimile No') . ':' . '</td> - <td><input type="text" name="Fax" value="' . $_POST['Fax'] . '" size="31" maxlength="30" /></td> + <td><input type="tel" name="Fax" pattern="[0-9\+\s]*]" value="' . $_POST['Fax'] . '" size="31" maxlength="30" /></td> </tr> <tr> <td>' . _('Email') . ':' . '</td> - <td><input type="text" name="Email" value="' . $_POST['Email'] . '" size="31" maxlength="55" /></td> + <td><input type="email" name="Email" value="' . $_POST['Email'] . '" size="31" maxlength="55" /></td> </tr> <tr> <td>' . _('Tax Province') . ':' . '</td> @@ -604,11 +604,11 @@ </tr> <tr> <td>' . _('Default Counter Sales Customer Code') . ':' . '</td> - <td><input type="text" name="CashSaleCustomer" value="' . $_POST['CashSaleCustomer'] . '" size="11" maxlength="10" /></td> + <td><input type="text" name="CashSaleCustomer" pattern="[0-9a-zA-Z_]*" title="' . _('If counter sales are being used for this location then an existing customer account code needs to be entered here. All sales created from the counter sales will be recorded against this customer account') . '" value="' . $_POST['CashSaleCustomer'] . '" size="11" maxlength="10" /></td> </tr> <tr> <td>' . _('Counter Sales Branch Code') . ':' . '</td> - <td><input type="text" name="CashSaleBranch" value="' . $_POST['CashSaleBranch'] . '" size="11" maxlength="10" /></td> + <td><input type="text" name="CashSaleBranch" pattern="[0-9a-zA-Z_]*" title="' . _('If counter sales are being used for this location then an existing customer branch code for the customer account code entered above needs to be entered here. All sales created from the counter sales will be recorded against this branch') . '" value="' . $_POST['CashSaleBranch'] . '" size="11" maxlength="10" /></td> </tr>'; echo '<tr> <td>' . _('Allow internal requests?') . ':</td> Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRP.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -301,7 +301,7 @@ FROM mrpdemands, stockmaster WHERE mrpdemands.stockid = stockmaster.stockid AND stockmaster.discontinued = 0"; - if ($_POST['usemrpdemands'] == 'y') { + if ($_POST['UserMRPDemands'] == 'y') { $result = DB_query($sql,$db); prnMsg(_('Loading requirements based on mrpdemands'),'info'); flush(); @@ -515,10 +515,10 @@ leeway) VALUES ('" . date('Y-m-d') . "', '" . $locparm . "', - '" . $_POST['pansizeflag'] . "', - '" . $_POST['shrinkageflag'] . "', - '" . $_POST['eoqflag'] . "', - '" . $_POST['usemrpdemands'] . "', + '" . $_POST['PanSizeFlag'] . "', + '" . $_POST['ShrinkageFlag'] . "', + '" . $_POST['EOQFlag'] . "', + '" . $_POST['UserMRPDemands'] . "', '" . filter_number_format($_POST['Leeway']) . "')"; $result = DB_query($sql,$db); @@ -534,10 +534,10 @@ $myrow = DB_fetch_array($result); - $leeway = $myrow['leeway']; - $usemrpdemands = _('No'); + $Leeway = $myrow['leeway']; + $UserMRPDemands = _('No'); if ($myrow['usemrpdemands'] == 'y') { - $usemrpdemands = _('Yes'); + $UserMRPDemands = _('Yes'); } $useeoq = _('No'); if ($myrow['eoqflag'] == 'y') { @@ -564,11 +564,11 @@ </tr> <tr> <td>' . _('Days Leeway') . ':</td> - <td>' . $leeway . '</td> + <td>' . $Leeway . '</td> </tr> <tr> <td>' . _('Use MRP Demands') . ':</td> - <td>' . $usemrpdemands . '</td> + <td>' . $UserMRPDemands . '</td> </tr> <tr> <td>' . _('Use EOQ') . ':</td> @@ -593,40 +593,40 @@ </tr> <tr> <td>' . _('Location') . '</td> - <td><select name="location[]" multiple="multiple"> + <td><select required="required" autofocus="autofocus" name="location[]" multiple="multiple"> <option value="All" selected="selected">' . _('All') . '</option>'; $sql = "SELECT loccode, locationname FROM locations"; - $result = DB_query($sql,$db); - while ($myrow = DB_fetch_array($result)) { + $Result = DB_query($sql,$db); + while ($myrow = DB_fetch_array($Result)) { echo '<option value="'; echo $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } //end while loop echo '</select></td></tr>'; - if (!isset($leeway)){ - $leeway =0; + if (!isset($Leeway)){ + $Leeway =0; } echo '<tr> <td>' . _('Days Leeway') . ':</td> - <td><input type="text" name="Leeway" class="number" size="4" value="' . $leeway . '" /></td> + <td><input type="text" required="required" name="Leeway" class="integer" size="4" value="' . $Leeway . '" /></td> </tr> <tr> <td>' ._('Use MRP Demands?') . ':</td> - <td><input type="checkbox" name="usemrpdemands" value="y" checked="checked" /></td> + <td><input type="checkbox" name="UserMRPDemands" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use EOQ?') . ':</td> - <td><input type="checkbox" name="eoqflag" value="y" checked="checked" /></td> + <td><input type="checkbox" name="EOQFlag" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use Pan Size?') . ':</td> - <td><input type="checkbox" name="pansizeflag" value="y" checked="checked" /></td> + <td><input type="checkbox" name="PanSizeFlag" value="y" checked="checked" /></td> </tr> <tr> <td>' ._('Use Shrinkage?') . ':</td> - <td><input type="checkbox" name="shrinkageflag" value="y" checked="checked" /></td> + <td><input type="checkbox" name="ShrinkageFlag" value="y" checked="checked" /></td> </tr> </table> <div class="centre"> @@ -753,7 +753,7 @@ foreach($Requirements as $Requirement) { // First, inflate requirement if there is a shrinkage factor // Should the quantity be rounded? - if ($_POST['shrinkageflag'] == 'y' AND $ShrinkFactor > 0) { + if ($_POST['ShrinkageFlag'] == 'y' AND $ShrinkFactor > 0) { $Requirement['quantity'] = ($Requirement['quantity'] * 100) / (100 - $ShrinkFactor); $Requirement['quantity'] = round($Requirement['quantity'],$DecimalPlaces); } @@ -765,7 +765,7 @@ $ExcessQty = 0; } if ($PlannedQty > 0) { - if ($_POST['eoqflag'] == 'y' AND $eoq > $PlannedQty) { + if ($_POST['EOQFlag'] == 'y' AND $eoq > $PlannedQty) { $ExcessQty = $eoq - $PlannedQty; $PlannedQty = $eoq; } @@ -775,7 +775,7 @@ // multiplied by the pansize. For instance, with a planned qty of 17 with a pansize // of 5, divide 17 by 5 to get 3 with a remainder of 2, which is rounded up to 4 // and then multiplied by 5 - the pansize - to get 20 - if ($_POST['pansizeflag'] == 'y' AND $PanSize != 0 AND $PlannedQty != 0) { + if ($_POST['PanSizeFlag'] == 'y' AND $PanSize != 0 AND $PlannedQty != 0) { $PlannedQty = ceil($PlannedQty / $PanSize) * $PanSize; } Modified: trunk/MRPCalendar.php =================================================================== --- trunk/MRPCalendar.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRPCalendar.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -25,10 +25,10 @@ submit($db,$ChangeDate); } elseif (isset($_POST['update'])) { update($db,$ChangeDate); -} elseif (isset($_POST['listall'])) { - listall($db); +} elseif (isset($_POST['ListAll'])) { + ShowDays($db); } else { - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); } function submit(&$db,&$ChangeDate) //####SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT_SUBMIT#### @@ -70,7 +70,7 @@ } if ($InputError == 1) { - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); return; } @@ -135,7 +135,7 @@ $resultupdate = DB_query($sql,$db,$ErrMsg); } prnMsg(_('The MRP Calendar has been created'),'success'); - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); } // End of function submit() @@ -158,7 +158,7 @@ } if ($InputError == 1) { - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); return; } @@ -175,7 +175,7 @@ $resultupdate = DB_query($sql,$db,$ErrMsg); prnMsg(_('The MRP calendar record for') . ' ' . $ChangeDate . ' ' . _('has been updated'),'success'); unset ($ChangeDate); - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); // Have to update daynumber any time change a date from or to a manufacturing date // Update daynumber. Set it so non-manufacturing days will have the same daynumber as a valid @@ -197,7 +197,7 @@ } // End of function update() -function listall(&$db) {//####LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_#### +function ShowDays(&$db) {//####LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_LISTALL_#### // List all records in date range $FromDate = FormatDateForSQL($_POST['FromDate']); @@ -238,12 +238,12 @@ echo '</table>'; echo '<br /><br />'; unset ($ChangeDate); - display($db,$ChangeDate); + ShowInputForm($db,$ChangeDate); -} // End of function listall() +} // End of function ShowDays() -function display(&$db,&$ChangeDate) {//####DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_##### +function ShowInputForm(&$db,&$ChangeDate) {//####DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_DISPLAY_##### // Display form fields. This function is called the first time // the page is called, and is also invoked at the end of all of the other functions. @@ -262,9 +262,9 @@ echo '<tr> <td>' . _('From Date') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] . '" /></td></tr> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="FromDate" required="required" autofocus="autofocus" size="10" maxlength="10" value="' . $_POST['FromDate'] . '" /></td></tr> <tr><td>' . _('To Date') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] .'" name="ToDate" required="required" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> </tr> <tr><td></td></tr> <tr><td></td></tr> @@ -300,7 +300,7 @@ </table><br /> <div class="centre"> <input type="submit" name="submit" value="' . _('Create Calendar') . '" /> - <input type="submit" name="listall" value="' . _('List Date Range') . '" /> + <input type="submit" name="ListAll" value="' . _('List Date Range') . '" /> </div>'; if (!isset($_POST['ChangeDate'])) { @@ -320,7 +320,7 @@ </div> </form>'; -} // End of function display() +} // End of function ShowInputForm() include('includes/footer.inc'); ?> Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRPPlannedPurchaseOrders.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -268,18 +268,31 @@ <div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; - echo '<option selected="selected" value="None">' . _('None') . '</option>'; - echo '<option value="Weekly">' . _('Weekly') . '</option>'; - echo '<option value="Monthly">' . _('Monthly') . '</option>'; - echo '</select></td></tr>'; - echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; - echo '<option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; - echo '<option value="no">' . _('Plain Print') . '</option>'; - 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> + echo '<tr> + <td>' . _('Consolidation') . ':</td> + <td><select required="required" name="Consolidation"> + <option selected="selected" value="None">' . _('None') . '</option> + <option value="Weekly">' . _('Weekly') . '</option> + <option value="Monthly">' . _('Monthly') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Print Option') . ':</td> + <td><select name="Fill"> + <option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option> + <option value="no">' . _('Plain Print') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Cut Off Date') . ':</td> + <td><input type ="text" required="required" class="date" alt="'.$_SESSION['DefaultDateFormat'] . + '" name="cutoffdate" size="10" value="'.date($_SESSION['DefaultDateFormat']).'" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> </div> </form>'; Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRPPlannedWorkOrders.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -324,22 +324,30 @@ echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '<tr><td>' . _('Consolidation') . ':</td><td><select name="Consolidation">'; - echo '<option selected="selected" value="None">' . _('None') . '</option>'; - echo '<option value="Weekly">' . _('Weekly') . '</option>'; - echo '<option value="Monthly">' . _('Monthly') . '</option>'; - echo '</select></td></tr>'; - - echo '<tr><td>' . _('Print Option') . ':</td><td><select name="Fill">'; - echo '<option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option>'; - echo '<option value="no">' . _('Plain Print') . '</option>'; - 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><div class="centre"><input type="submit" name="Review" value="' . _('Review') . '" /> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /></div>'; - echo '</div> + echo '<tr> + <td>' . _('Consolidation') . ':</td> + <td><select name="Consolidation"> + <option selected="selected" value="None">' . _('None') . '</option> + <option value="Weekly">' . _('Weekly') . '</option> + <option value="Monthly">' . _('Monthly') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Print Option') . ':</td><td> + <select name="Fill"> + <option selected="selected" value="yes">' . _('Print With Alternating Highlighted Lines') . '</option> + <option value="no">' . _('Plain Print') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Cut Off Date') . ':</td> + <td><input type ="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="cutoffdate" required="required" autofocus="autofocus" size="10" value="' .date($_SESSION['DefaultDateFormat']).'" /></td> + </tr> + </table> + <div class="centre"> + <input type="submit" name="Review" value="' . _('Review') . '" /> <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> + </div> </form>'; include('includes/footer.inc'); Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MRPReport.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -535,9 +535,9 @@ echo '</select></td>'; echo '<td>' . _('Enter partial') . '<b> ' . _('Description') . '</b>:</td><td>'; if (isset($_POST['Keywords'])) { - echo '<input type="text" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" />'; + echo '<input type="text" autofocus="autofocus" name="Keywords" value="' . $_POST['Keywords'] . '" size="20" maxlength="25" />'; } else { - echo '<input type="text" name="Keywords" size="20" maxlength="25" />'; + echo '<input type="text" autofocus="autofocus" name="Keywords" size="20" maxlength="25" />'; } echo '</td></tr><tr><td></td>'; echo '<td><h3><b>' . _('OR') . ' ' . '</b></h3>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; Modified: trunk/MailingGroupMaintenance.php =================================================================== --- trunk/MailingGroupMaintenance.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MailingGroupMaintenance.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -140,7 +140,7 @@ <form id="MailGroups" action="<?php echo htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'); ?>" method="post" /> <input type="hidden" name="FormID" value="<?php echo $_SESSION['FormID']; ?>" /> <label for="MailGroup"><?php echo _('Mail Group'); ?></label> - <input type="text" name="MailGroup" maxlength="100" size="20" /> + <input type="text" required="required" autofocus="autofocus" name="MailGroup" maxlength="100" size="20" /> <input type="hidden" name="Clean" value="1" /> <input type="submit" name="Enter" value="<?php echo _('Submit'); ?>" /> </form> @@ -233,7 +233,7 @@ ?> <td><?php echo $myrow['userid']; ?></td> <td><?php echo $myrow['realname']; ?></td> - <td><a href="<?php echo htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?UserId='.$myrow['userid'].'&GroupName='.$GroupName.'&Remove=1&GroupId='.$GroupId; ?>" onclick="return confirm('Are you sure to remove this users?'); " /><?php echo _('Remove'); ?></a></td> + <td><a href="<?php echo htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8').'?UserId='.$myrow['userid'].'&GroupName='.$GroupName.'&Remove=1&GroupId='.$GroupId; ?>" onclick="return confirm('" . _('Are you sure you wish to remove this user from this mail group?'). "); " /><?php echo _('Remove'); ?></a></td> <td> </td> <td> </td> <td> </td> @@ -251,8 +251,8 @@ ?> </tr> - + <?php } ?> Modified: trunk/MaintenanceReminders.php =================================================================== --- trunk/MaintenanceReminders.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MaintenanceReminders.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -26,7 +26,7 @@ if ($LastUserResponsible!=''){ ${'Mail' . $myrow['userresponsible']}->setText($MailText); $SendResult = ${'Mail' . $myrow['userresponsible']}->send(array($LastUserEmail)); - $MailText = "You have the following maintenance task(s) falling due or over-due:\n"; + $MailText = _('You have the following maintenance task(s) falling due or over-due:') . "\n"; } $LastUserResponsible = $myrow['userresponsible']; $LastUserEmail = $myrow['email']; @@ -74,7 +74,7 @@ ${'Mail' . $myrow['manager']}->setSubject('Overdue Maintenance Tasks Reminder'); ${'Mail' . $myrow['manager']}->setFrom('Do_not_reply <>'); } - $MailText .= "Asset: " . $myrow['description'] . "\nTask: " . $myrow['taskdescription'] . "\nDue: " . ConvertSQLDate($myrow['duedate']); + $MailText .= _('Asset:') .' ' . $myrow['description'] . "\n" . _('Task:') . ' ' . $myrow['taskdescription'] . "\n" . _('Due:') . ' ' . ConvertSQLDate($myrow['duedate']); $MailText . "\n\n"; } if (DB_num_rows($result)>0){ Modified: trunk/MaintenanceTasks.php =================================================================== --- trunk/MaintenanceTasks.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/MaintenanceTasks.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -130,7 +130,8 @@ if (isset($_GET['Edit'])) { echo '<tr> - <td>'._('Task ID').'</td><td>'.$_GET['TaskID'].'</td> + <td>'._('Task ID').'</td> + <td>'.$_GET['TaskID'].'</td> </tr>'; echo '<input type="hidden" name="TaskID" value="'.$_GET['TaskID'].'" />'; $sql="SELECT assetid, @@ -169,7 +170,7 @@ echo '<tr> <td>'._('Asset to Maintain').':</td> - <td><select name="AssetID">'; + <td><select required="required" name="AssetID">'; $AssetSQL="SELECT assetid, description FROM fixedassets"; $AssetResult=DB_query($AssetSQL,$db); while ($myrow=DB_fetch_array($AssetResult)) { @@ -184,17 +185,17 @@ echo '<tr> <td>'._('Task Description').':</td> - <td><textarea name="TaskDescription" cols="40" rows="3">' . $_POST['TaskDescription'] . '</textarea></td> + <td><textarea name="TaskDescription" required="required" cols="40" rows="3">' . $_POST['TaskDescription'] . '</textarea></td> </tr>'; echo '<tr> <td>'._('Days Before Task Due').':</td> - <td><input type="text" class="number" name="FrequencyDays" size="5" maxlength="5" value="' . $_POST['FrequencyDays'] . '" /></td> + <td><input type="text" class="integer" required="required" name="FrequencyDays" size="5" maxlength="5" value="' . $_POST['FrequencyDays'] . '" /></td> </tr>'; echo '<tr> <td>'._('Responsible').':</td> - <td><select name="UserResponsible">'; + <td><select required="required" name="UserResponsible">'; $UserSQL="SELECT userid FROM www_users"; $UserResult=DB_query($UserSQL,$db); while ($myrow=DB_fetch_array($UserResult)) { @@ -209,7 +210,7 @@ echo '<tr> <td>'._('Manager').':</td> - <td><select name="Manager">'; + <td><select required="required" name="Manager">'; if ($_POST['Manager']==''){ echo '<option selected="selected" value="">' . _('No Manager') . '</option>'; } else { Modified: trunk/Manufacturers.php =================================================================== --- trunk/Manufacturers.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/Manufacturers.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -290,7 +290,7 @@ echo '<tr> <td>' . _('Brand Name') . ':' . '</td> - <td><input type="text" name="ManufacturersName" value="'. $_POST['ManufacturersName'] . '" size="32" maxlength="32" /></td> + <td><input type="text" required="required" autofocus="autofocus" name="ManufacturersName" value="'. $_POST['ManufacturersName'] . '" size="32" maxlength="32" /></td> </tr> <tr> <td>' . _('Brand URL') . ':' . '</td> Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2013-07-24 11:04:00 UTC (rev 6143) +++ trunk/WWW_Users.php 2013-07-25 06:32:24 UTC (rev 6144) @@ -420,7 +420,7 @@ echo '<table class="selection"> <tr> <td>' . _('User Login') . ':</td> - <td><input pattern="(?!^([aA]{1}[dD]{1}[mM]{1}[iI]{1}[nN]{1})$)[^?+.&\\>< ]{4,}" type="text" required="true" name="UserID" size="22" maxlength="20" placeholder="'._('Not less than 4 characters').'" title="'._('Please input not less than 4 characters and canot be admin or contains illegal characters').'" /></td> + <td><input pattern="(?!^([aA]{1}[dD]{1}[mM]{1}[iI]{1}[nN]{1})$)[^?+.&\\>< ]{4,}" type="text" required="required" name="UserID" size="22" maxlength="20" placeholder="'._('Not less than 4 characters').'" title="'._('Please input not less than 4 characters and canot be admin or contains illegal characters').'" /></td> </tr>'; /*set the default modules to show to all @@ -452,19 +452,19 @@ } echo '<tr> <td>' . _('Password') . ':</td> - <td><input type="password" pattern=".{5,}" name="Password" size="22" maxlength="20" value="' . $_POST['Password'] . '" placeholder="'._('not less than 5 characters').'" title="'._('Please enter not less than 5 characters and cannot same as users id').'" /></td> + <td><input type="password" pattern=".{5,}" reuired="required" name="Password" size="22" maxlength="20" value="' . $_POST['Password'] . '" placeholder="'._('not less than 5 characters').'" title="'._('Please enter not less than 5 characters and cannot same as the users id').'" /></td> </tr>'; echo '<tr> <td>' . _('Full Name') . ':</td> - <td><input type="text" name="RealName" value="' . $_POST['RealName'] . '" size="36" maxlength="35" /></td> + <td><input type="text" name="RealName" required="required" value="' . $_POST['RealName'] . '" size="36" maxlength="35" /></td> </tr>'; echo '<tr> <td>' . _('Telephone No') . ':</td> - <td><input name="Phone" value="' . $_POST['Phone'] . '" size="32" maxlength="30" /></td> + <td><input type="tel" name="Phone" pattern="[0-9+\s]*" value="' . $_POST['Phone'] . '" size="32" maxlength="30" /></td> </tr>'; echo '<tr> <td>' . _('Email Address') .':</td> - <td><input type="email" name="Email" value="' . $_POST['Email'] .'" size="32" maxlength="55" title="'._('The input must be email').'" /></td> + <td><input type="email" name="Email" required="required" value="' . $_POST['Email'] .'" size="32" maxlength="55" title="'._('A valid email address is required').'" /></td> </tr>'; echo '<tr> <td>' . _('Security Role') . ':</td> @@ -482,7 +482,9 @@ </tr>'; -echo '<tr><td>' . _('User Can Create Tenders') . ':</td><td><select name="CanCreateTender">'; +echo '<tr> + <td>' . _('User Can Create Tenders') . ':</td> + <td><select name="CanCreateTender">'; if ($_POST['CanCreateTender']==0){ echo '<option selected="selected" value="0">' . _('No') . '</option>'; @@ -522,17 +524,17 @@ } echo '<tr> <td>' . _('Customer Code') . ':</td> - <td><input type="text" name="Cust" size="10" maxlength="10" value="' . $_POST['Cust'] . '" /></td> + <td><input type="text" name="Cust" pattern="[0-9a-zA-Z_]*" title="' . _('If this user login is to be associated with a customer account, enter the customer account code') . '" size="10" maxlength="10" value="' . $_POST['Cust'] . '" /></td> </tr>'; echo '<tr> <td>' . _('Branch Code') . ':</td> - <td><input type="text" name="BranchCode" size="10" maxlength="10" value="' . $_POST['BranchCode'] .'" /></td> + <td><input type="text" name="BranchCode" pattern="[0-9a-zA-Z_]*" title="' . _('If this user login is to be associated with a customer account a valid branch for the customer account must be entered.') . '" size="10" maxlength="10" value="' . $_POST['BranchCode'] .'" /></td> </tr>'; echo '<tr> <td>' . _('Supplier Code') . ':</td> - <td><input type="text" name="SupplierID" size="10" maxlength="10" value="' . $_POST['SupplierID'] .'" /></td> + <td><input type="text" name="SupplierID" pattern="[0-9a-zA-Z_]*" size="10" maxlength="10" value="' . $_POST['SupplierID'] .'" /></td> </tr>'; echo '<tr> @@ -609,7 +611,7 @@ echo '<tr> <td>' . _('Theme') . ':</td> - <td><select name="Theme">'; + <td><select required="required" name="Theme">'; $ThemeDirectories = scandir('css/'); @@ -634,7 +636,7 @@ echo '<tr> <td>' . _('Language') . ':</td> - <td><select name="UserLanguage">'; + <td><select required="required" name="UserLanguage">'; foreach ($LanguagesArray as $LanguageEntry => $LanguageName){ if (isset($_POST['UserLanguage']) AND $_POST['UserLanguage'] == $LanguageEntry){ @@ -716,7 +718,7 @@ echo '<tr> <td>' . _('Account Status') . ':</td> - <td><select name="Blocked">'; + <td><select required="required" name="Blocked">'; if ($_POST['Blocked']==0){ echo '<option selected="selected" value="0">' . _('Open') . '</option>'; echo '<option value="1">' . _('Blocked') . '</option>'; |
From: <dai...@us...> - 2013-07-26 11:43:20
|
Revision: 6148 http://sourceforge.net/p/web-erp/reponame/6148 Author: daintree Date: 2013-07-26 11:43:16 +0000 (Fri, 26 Jul 2013) Log Message: ----------- html5 Modified Paths: -------------- trunk/NoSalesItems.php trunk/WWW_Users.php trunk/css/default/default.css trunk/includes/DefineCartClass.php Modified: trunk/NoSalesItems.php =================================================================== --- trunk/NoSalesItems.php 2013-07-26 03:08:39 UTC (rev 6147) +++ trunk/NoSalesItems.php 2013-07-26 11:43:16 UTC (rev 6148) @@ -16,10 +16,10 @@ //select location echo '<tr> - <td>'._('Select Location') . '</td> - <td>:</td> - <td><select name="Location[]" multiple="multiple"> - <option value="All" selected="selected">' . _('All') . '</option>';; + <td>'._('Select Location') . '</td> + <td>:</td> + <td><select name="Location[]" multiple="multiple"> + <option value="All" selected="selected">' . _('All') . '</option>';; $sql = "SELECT loccode,locationname FROM locations ORDER BY locationname"; $locationresult = DB_query($sql, $db); @@ -81,7 +81,7 @@ echo '<tr> <td>' . _('Number Of Days') . ' </td> <td>:</td> - <td><input class="number" tabindex="3" type="text" name="NumberOfDays" size="8" maxlength="8" value="30" /></td> + <td><input class="integer" tabindex="3" type="text" required="required" title="' . _('Enter the number of days to examine the sales for') . '" name="NumberOfDays" size="8" maxlength="8" value="30" /></td> </tr> </table> <br /> Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2013-07-26 03:08:39 UTC (rev 6147) +++ trunk/WWW_Users.php 2013-07-26 11:43:16 UTC (rev 6148) @@ -420,7 +420,7 @@ echo '<table class="selection"> <tr> <td>' . _('User Login') . ':</td> - <td><input pattern="(?!^([aA]{1}[dD]{1}[mM]{1}[iI]{1}[nN]{1})$)[^?+.&\\>< ]{4,}" type="text" required="required" name="UserID" size="22" maxlength="20" placeholder="'._('Not less than 4 characters').'" title="'._('Please input not less than 4 characters and canot be admin or contains illegal characters').'" /></td> + <td><input pattern="(?!^([aA]{1}[dD]{1}[mM]{1}[iI]{1}[nN]{1})$)[^?+.&\\>< ]{4,}" type="text" required="required" name="UserID" size="22" maxlength="20" placeholder="'._('At least 4 characters').'" title="'._('Please input not less than 4 characters and canot be admin or contains illegal characters').'" /></td> </tr>'; /*set the default modules to show to all @@ -452,19 +452,19 @@ } echo '<tr> <td>' . _('Password') . ':</td> - <td><input type="password" pattern=".{5,}" reuired="required" name="Password" size="22" maxlength="20" value="' . $_POST['Password'] . '" placeholder="'._('not less than 5 characters').'" title="'._('Please enter not less than 5 characters and cannot same as the users id').'" /></td> + <td><input type="password" pattern=".{5,}" name="Password" ' . (!isset($SelectedUser) ? 'required="required"' : '') . ' size="22" maxlength="20" value="' . $_POST['Password'] . '" placeholder="'._('At least 5 characters').'" title="'._('Passwords must be 5 characters or more and cannot same as the users id. A mix of upper and lower case and some non-alphanumeric characters are recommended.').'" /></td> </tr>'; echo '<tr> <td>' . _('Full Name') . ':</td> - <td><input type="text" name="RealName" required="required" value="' . $_POST['RealName'] . '" size="36" maxlength="35" /></td> + <td><input type="text" name="RealName" ' . (isset($SelectedUser) ? 'autofocus="autofocus"' : '') . ' required="required" value="' . $_POST['RealName'] . '" size="36" maxlength="35" /></td> </tr>'; echo '<tr> <td>' . _('Telephone No') . ':</td> - <td><input type="tel" name="Phone" pattern="[0-9+\s]*" value="' . $_POST['Phone'] . '" size="32" maxlength="30" /></td> + <td><input type="tel" name="Phone" pattern="[0-9+()\s]*" value="' . $_POST['Phone'] . '" size="32" maxlength="30" /></td> </tr>'; echo '<tr> <td>' . _('Email Address') .':</td> - <td><input type="email" name="Email" required="required" value="' . $_POST['Email'] .'" size="32" maxlength="55" title="'._('A valid email address is required').'" /></td> + <td><input type="email" name="Email" placeholder="' . _('e.g. us...@do...') . '" required="required" value="' . $_POST['Email'] .'" size="32" maxlength="55" title="'._('A valid email address is required').'" /></td> </tr>'; echo '<tr> <td>' . _('Security Role') . ':</td> @@ -737,10 +737,5 @@ </div> </form>'; -if (isset($_GET['SelectedUser'])) { - echo '<script type="text/javascript">defaultControl(document.forms[0].Password);</script>'; -} else { - echo '<script type="text/javascript">defaultControl(document.forms[0].UserID);</script>'; -} include('includes/footer.inc'); ?> Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2013-07-26 03:08:39 UTC (rev 6147) +++ trunk/css/default/default.css 2013-07-26 11:43:16 UTC (rev 6148) @@ -9,7 +9,7 @@ font-family:Arial, Verdana, Helvetica, sans-serif; font-size:10pt; margin:0; - padding:0 + padding:0; } a{ Modified: trunk/includes/DefineCartClass.php =================================================================== --- trunk/includes/DefineCartClass.php 2013-07-26 03:08:39 UTC (rev 6147) +++ trunk/includes/DefineCartClass.php 2013-07-26 11:43:16 UTC (rev 6148) @@ -166,7 +166,7 @@ " . $Qty . ", " . $Price . ", " . $Disc . ",' - " . $ItemDue . "', + " . FormatDateForSQL($ItemDue) . "', " . $POLine . ")"; $result = DB_query($sql, $db , |
From: <dai...@us...> - 2013-07-28 10:17:00
|
Revision: 6153 http://sourceforge.net/p/web-erp/reponame/6153 Author: daintree Date: 2013-07-28 10:16:57 +0000 (Sun, 28 Jul 2013) Log Message: ----------- HTML5 Modified Paths: -------------- trunk/CustomerAllocations.php trunk/PDFBankingSummary.php trunk/PcAssignCashToTab.php trunk/PcAuthorizeExpenses.php trunk/PcClaimExpensesFromTab.php trunk/PcExpenses.php trunk/PcReportTab.php trunk/PcTabs.php trunk/PcTypeTabs.php Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2013-07-27 14:35:20 UTC (rev 6152) +++ trunk/CustomerAllocations.php 2013-07-28 10:16:57 UTC (rev 6153) @@ -40,10 +40,18 @@ $TotalAllocated = 0; $TotalDiffOnExch = 0; + echo '<br />Total number of potential allocations = ' . $_POST['TotalNumberOfAllocs']; + + for ($AllocCounter=0;$AllocCounter < $_POST['TotalNumberOfAllocs']; $AllocCounter++) { // loop through amounts allocated using AllocnItm->ID for each record + echo '<br />Counter = ' . $AllocCounter; if (isset($_POST['Amt' . $AllocCounter])) { - // allocatable charge amounts + + + echo ' - Amount allocated' . $_POST['Amt' . $AllocCounter] . ' for ' . $_POST['AllocID' . $AllocCounter]; + + // allocatable charge amounts if (!is_numeric(filter_number_format($_POST['Amt' . $AllocCounter]))) { $_POST['Amt' . $AllocCounter] = 0; } @@ -72,10 +80,7 @@ } if ($TotalAllocated + $_SESSION['Alloc']->TransAmt > 0.008) { - prnMsg(_('Allocation could not be processed because the amount allocated is more than the').' ' . - $_SESSION['Alloc']->TransTypeName . ' '._('being allocated') . '<br />' . _('Total allocated').' = ' . - $TotalAllocated . ' '._('and the total amount of the') .' ' . $_SESSION['Alloc']->TransTypeName . ' '. - _('was').' ' . -$_SESSION['Alloc']->TransAmt,'error'); + prnMsg(_('Allocation could not be processed because the amount allocated is more than the').' ' . $_SESSION['Alloc']->TransTypeName . ' '._('being allocated') . '<br />' . _('Total allocated').' = ' . $TotalAllocated . ' '._('and the total amount of the') .' ' . $_SESSION['Alloc']->TransTypeName . ' ' . _('was').' ' . -$_SESSION['Alloc']->TransAmt,'error'); $InputError=1; } } @@ -85,53 +90,53 @@ // //========[ START TRANSACTION ]=========== // - $error = ''; - $Result=DB_Txn_Begin($db); + $Error = ''; + $Result= DB_Txn_Begin($db); $AllAllocations = 0; foreach ($_SESSION['Alloc']->Allocs as $AllocnItem) { if ($AllocnItem->PrevAllocRecordID != 'NA') { // original allocation has changed so delete the old allocation record $SQL = "DELETE FROM custallocns WHERE id = '" . $AllocnItem->PrevAllocRecordID . "'"; if( !$Result = DB_query($SQL,$db) ) { - $error = 'Could not delete old allocation record'; + $Error = _('Could not delete old allocation record'); } } -// if ($AllocnItem->OrigAlloc != $AllocnItem->AllocAmt) // has previous allocated amount changed? -// { - if ($AllocnItem->AllocAmt > 0) { - $SQL = "INSERT INTO - custallocns ( - datealloc, - amt, - transid_allocfrom, - transid_allocto - ) VALUES ( - '" . date('Y-m-d') . "', - '" . $AllocnItem->AllocAmt . "', - '" . $_SESSION['Alloc']->AllocTrans . "', - '" . $AllocnItem->ID . "' - )"; - if( !$Result = DB_query($SQL,$db) ) { - $error = 'Could not change allocation record'; - } + if ($AllocnItem->AllocAmt > 0) { + $SQL = "INSERT INTO + custallocns ( + datealloc, + amt, + transid_allocfrom, + transid_allocto + ) VALUES ( + '" . date('Y-m-d') . "', + '" . $AllocnItem->AllocAmt . "', + '" . $_SESSION['Alloc']->AllocTrans . "', + '" . $AllocnItem->ID . "' + )"; + if( !$Result = DB_query($SQL,$db) ) { + $Error = _('Could not change allocation record'); } - $NewAllocTotal = $AllocnItem->PrevAlloc + $AllocnItem->AllocAmt; - $AllAllocations = $AllAllocations + $AllocnItem->AllocAmt; - $Settled = (abs($NewAllocTotal-$AllocnItem->TransAmount) < 0.005) ? 1 : 0; + } + $NewAllocTotal = $AllocnItem->PrevAlloc + $AllocnItem->AllocAmt; + $AllAllocations = $AllAllocations + $AllocnItem->AllocAmt; + $Settled = (abs($NewAllocTotal-$AllocnItem->TransAmount) < 0.005) ? 1 : 0; - $SQL = "UPDATE debtortrans - SET diffonexch='" . $AllocnItem->DiffOnExch . "', - alloc = '" . $NewAllocTotal . "', - settled = '" . $Settled . "' - WHERE id = '" . $AllocnItem->ID."'"; - if( !$Result = DB_query($SQL,$db) ) { - $error = 'Could not update difference on exchange'; - } -// } + $SQL = "UPDATE debtortrans + SET diffonexch='" . $AllocnItem->DiffOnExch . "', + alloc = '" . $NewAllocTotal . "', + settled = '" . $Settled . "' + WHERE id = '" . $AllocnItem->ID."'"; + if( !$Result = DB_query($SQL,$db) ) { + $Error = _('Could not update difference on exchange'); + } } - $Settled = (abs($TotalAllocated + $_SESSION['Alloc']->TransAmt) < 0.01) ? 1 : 0; - + if (abs($TotalAllocated + $_SESSION['Alloc']->TransAmt) < 0.01) { + $Settled = 1; + } else { + $Settled = 0; + } // Update the receipt or credit note $SQL = "UPDATE debtortrans SET alloc = '" . -$AllAllocations . "', @@ -140,7 +145,7 @@ WHERE id = '" . $_POST['AllocTrans']."'"; if( !$Result = DB_query($SQL,$db) ) { - $error = 'Could not update receipt or credit note'; + $Error = _('Could not update receipt or credit note'); } // If GLLink to debtors active post diff on exchange to GL @@ -169,7 +174,7 @@ '" . $MovtInDiffOnExch . "' )"; if( !$Result = DB_query($SQL,$db) ) { - $error = 'Could not update exchange difference in General Ledger'; + $Error = _('Could not update exchange difference in General Ledger'); } $SQL = "INSERT INTO gltrans ( @@ -190,7 +195,7 @@ '" . -$MovtInDiffOnExch . "' )"; if( !$Result = DB_query($SQL,$db) ) { - $error = 'Could not update debtors control in General Ledger'; + $Error = _('Could not update debtors control in General Ledger'); } } @@ -199,11 +204,11 @@ // //========[ COMMIT TRANSACTION ]=========== // - if ( empty($error) ) { + if (empty($Error) ) { $Result = DB_Txn_Commit($db); } else { $Result = DB_Txn_Rollback($db); - prnMsg($error,'error'); + prnMsg($Error,'error'); } unset($_SESSION['Alloc']); unset($_POST['AllocTrans']); @@ -211,25 +216,26 @@ } if (isset($_GET['AllocTrans'])) { + if (isset($_SESSION['Alloc'])) { unset($_SESSION['Alloc']->Allocs); unset($_SESSION['Alloc']); } $_SESSION['Alloc'] = new Allocation; - $_POST['AllocTrans'] = $_GET['AllocTrans']; // Set AllocTrans when page first called + $_POST['AllocTrans'] = $_GET['AllocTrans']; // Set AllocTrans when page first called $SQL= "SELECT systypes.typename, - debtortrans.type, - debtortrans.transno, - debtortrans.trandate, - debtortrans.debtorno, - debtorsmaster.name, - debtortrans.rate, - (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount) as total, - debtortrans.diffonexch, - debtortrans.alloc, - currencies.decimalplaces + debtortrans.type, + debtortrans.transno, + debtortrans.trandate, + debtortrans.debtorno, + debtorsmaster.name, + debtortrans.rate, + (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount) as total, + debtortrans.diffonexch, + debtortrans.alloc, + currencies.decimalplaces FROM debtortrans INNER JOIN systypes ON debtortrans.type = systypes.typeid INNER JOIN debtorsmaster @@ -339,26 +345,22 @@ </tr>'; if (isset($_POST['AllocTrans'])) { - // Page called with trans number - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<input type="hidden" name="AllocTrans" value="' . $_POST['AllocTrans'] . '" />'; - - // Show trans already allocated and potential new allocations - - echo '<table class="selection">'; - echo '<tr> + /* Page called with trans number + Show trans already allocated and potential new allocations + */ + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="AllocTrans" value="' . $_POST['AllocTrans'] . '" /> + <table class="selection"> + <tr> <th colspan="7"> <div class="centre"> <b>' . $_SESSION['Alloc']->DebtorNo . ' - ' . $_SESSION['Alloc']->CustomerName . '</b> </div>'; if ($_SESSION['Alloc']->TransExRate != 1) { - echo '<br />' . _('Amount in customer currency') . ' <b>' . - locale_number_format(-$_SESSION['Alloc']->TransAmt,$_SESSION['Alloc']->CurrDecimalPlaces) . - '</b><i> ('._('converted into local currency at an exchange rate of'). ' ' - . $_SESSION['Alloc']->TransExRate . ')</i>'; + echo '<br />' . _('Amount in customer currency') . ' <b>' . locale_number_format(-$_SESSION['Alloc']->TransAmt,$_SESSION['Alloc']->CurrDecimalPlaces) . '</b><i> (' . _('converted into local currency at an exchange rate of'). ' ' . $_SESSION['Alloc']->TransExRate . ')</i>'; } echo '</th> </tr> @@ -374,7 +376,7 @@ $Counter = 0; $TotalAllocated = 0; - $balance = 0; + $Balance = 0; $j=0; foreach ($_SESSION['Alloc']->Allocs as $AllocnItem) { $YetToAlloc = ($AllocnItem->TransAmount - $AllocnItem->PrevAlloc); @@ -397,9 +399,9 @@ $j++; if ($AllocnItem->TransAmount < 0) { - $balance+=$YetToAlloc; + $Balance+=$YetToAlloc; echo '<td>' . $curTrans .'</td> - <td class="number">' . locale_number_format($balance,$_SESSION['Alloc']->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($Balance,$_SESSION['Alloc']->CurrDecimalPlaces) . '</td> </tr>'; } else { echo '<td class="number"><input type="hidden" name="YetToAlloc' . $Counter . '" value="' . round($YetToAlloc,$_SESSION['Alloc']->CurrDecimalPlaces) . '" />'; @@ -410,11 +412,11 @@ } else { echo ' />'; } - $balance += $YetToAlloc-$AllocnItem->AllocAmt; + $Balance += $YetToAlloc-$AllocnItem->AllocAmt; $j++; echo '<input tabindex="' . $j . '" type="text" class="number" ' . ($j==1 ? 'autofocus="autofocus"' :'') . ' name="Amt' . $Counter .'" title="' . _('Enter the amount of this transaction to be allocated. Nothing should be entered here if the entire transaction is to be allocated, use the check box') . '" maxlength="12" size="13" value="' . locale_number_format(round($AllocnItem->AllocAmt,$_SESSION['Alloc']->CurrDecimalPlaces),$_SESSION['Alloc']->CurrDecimalPlaces) . '" /> <input type="hidden" name="AllocID' . $Counter . '" value="' . $AllocnItem->ID . '" ></td> - <td class="number">' . locale_number_format($balance,$_SESSION['Alloc']->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($Balance,$_SESSION['Alloc']->CurrDecimalPlaces) . '</td> </tr>'; } $TotalAllocated += round($AllocnItem->AllocAmt,$_SESSION['Alloc']->CurrDecimalPlaces); @@ -495,8 +497,9 @@ <td>' . ConvertSQLDate($myrow['trandate']) . '</td> <td class="number">' . locale_number_format($myrow['total'],$myrow['currdecimalplaces']) . '</td> <td class="number">' . locale_number_format($myrow['total']-$myrow['alloc'],$myrow['currdecimalplaces']) . '</td> - <td>' . $myrow['currcode'] . '</td>'; - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'). '?AllocTrans=' . $myrow['id'] . '">' . _('Allocate') . '</a></td></tr>'; + <td>' . $myrow['currcode'] . '</td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'). '?AllocTrans=' . $myrow['id'] . '">' . _('Allocate') . '</a></td> + </tr>'; } echo '</table>'; } else { @@ -559,7 +562,7 @@ $BalRow = DB_fetch_array($BalResult); $Balance = $BalRow['total']; } - $CurrentTransaction ++; + $CurrentTransaction++; $CurrCode = $myrow['currcode']; $CurrDecimalPlaces = $myrow['currdecimalplaces']; if (isset($Balance) AND abs($Balance) < -0.01 ) { @@ -574,16 +577,16 @@ $k++; } - echo '<td>' . $myrow['typename'] .'</td> - <td>' . $myrow['name'] . '</td> - <td>' . $myrow['debtorno'] . '</td> - <td>' . $myrow['transno'] . '</td> - <td>' . ConvertSQLDate($myrow['trandate']) . '</td> - <td class="number">' . locale_number_format($myrow['total'],$CurrDecimalPlaces) . '</td> - <td class="number">' . locale_number_format($myrow['total']-$myrow['alloc'],$CurrDecimalPlaces) . '</td> - <td>' . $CurrCode . '</td> - <td>' . $AllocateLink . '</td> - </tr>'; + echo '<td>' . $myrow['typename'] .'</td> + <td>' . $myrow['name'] . '</td> + <td>' . $myrow['debtorno'] . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . ConvertSQLDate($myrow['trandate']) . '</td> + <td class="number">' . locale_number_format($myrow['total'],$CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($myrow['total']-$myrow['alloc'],$CurrDecimalPlaces) . '</td> + <td>' . $CurrCode . '</td> + <td>' . $AllocateLink . '</td> + </tr>'; } //end loop around unallocated receipts and credit notes Modified: trunk/PDFBankingSummary.php =================================================================== --- trunk/PDFBankingSummary.php 2013-07-27 14:35:20 UTC (rev 6152) +++ trunk/PDFBankingSummary.php 2013-07-28 10:16:57 UTC (rev 6153) @@ -30,10 +30,11 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection">'; - echo '<tr><td>' . _('Select the batch number of receipts to be printed') . ':</td>'; - echo '<td><select name="BatchNo">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Select the batch number of receipts to be printed') . ':</td> + <td><select required="required" autofocus="autofocus" name="BatchNo">'; while ($myrow=DB_fetch_array($result)) { echo '<option value="'.$myrow['transno'].'">'._('Batch') .' '. $myrow['transno'].' - '.ConvertSqlDate($myrow['transdate']).'</option>'; } Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2013-07-27 14:35:20 UTC (rev 6152) +++ trunk/PcAssignCashToTab.php 2013-07-28 10:16:57 UTC (rev 6153) @@ -4,8 +4,8 @@ include('includes/session.inc'); $Title = _('Assignment of Cash to Petty Cash Tab'); /* webERP manual links before header.inc */ -$ViewTopic= "PettyCash"; -$BookMark = "CashAssignment"; +$ViewTopic= 'PettyCash'; +$BookMark = 'CashAssignment'; include('includes/header.inc'); if (isset($_POST['SelectedTabs'])){ @@ -35,7 +35,7 @@ unset($_POST['Receipt']); } -if (isset($_POST['process'])) { +if (isset($_POST['Process'])) { if ($SelectedTabs=='') { prnMsg(_('You Must First Select a Petty Cash Tab To Assign Cash'),'error'); unset($SelectedTabs); @@ -178,7 +178,7 @@ echo '<br /> <div class="centre"> - <input type="submit" name="process" value="' . _('Accept') . '" /> + <input type="submit" name="Process" value="' . _('Accept') . '" /> <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> </div>'; echo '</div> @@ -186,7 +186,7 @@ } //end of ifs and buts! -if (isset($_POST['process']) OR isset($SelectedTabs)) { +if (isset($_POST['Process']) OR isset($SelectedTabs)) { if (!isset($_POST['submit'])) { echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/money_add.png" title="' . @@ -224,23 +224,24 @@ ORDER BY date, counterindex ASC"; $result = DB_query($sql,$db); - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection">'; - 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 '</th></tr>'; - echo '<tr> - <th>' . _('Date') . '</th> - <th>' . _('Expense Code') . '</th> - <th>' . _('Amount') . '</th> - <th>' . _('Authorised') . '</th> - <th>' . _('Notes') . '</th> - <th>' . _('Receipt') . '</th> - </tr>'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <th colspan="8">' . _('Detail Of PC Tab Movements For Last') .': + <input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" /> + <input type="text" class="number" name="Days" value="' . $Days . '" maxlength="3" size="4" /> ' . _('Days') . ' + <input type="submit" name="Go" value="' . _('Go') . '" /></th> + </tr> + <tr> + <th>' . _('Date') . '</th> + <th>' . _('Expense Code') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Authorised') . '</th> + <th>' . _('Notes') . '</th> + <th>' . _('Receipt') . '</th> + </tr>'; $k=0; //row colour counter @@ -317,9 +318,9 @@ $Amount['0']=0; } - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if ( isset($_GET['edit'])) { $sql = "SELECT * FROM pcashdetails @@ -334,10 +335,10 @@ $_POST['Notes'] = $myrow['notes']; $_POST['Receipt'] = $myrow['receipt']; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="SelectedIndex" value="' . $SelectedIndex. '" />'; - echo '<input type="hidden" name="CurrentAmount" value="' . $Amount[0]. '" />'; - echo '<input type="hidden" name="Days" value="' . $Days . '" />'; + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" /> + <input type="hidden" name="SelectedIndex" value="' . $SelectedIndex. '" /> + <input type="hidden" name="CurrentAmount" value="' . $Amount[0]. '" /> + <input type="hidden" name="Days" value="' . $Days . '" />'; } /* Ricard: needs revision of this date initialization */ @@ -345,17 +346,23 @@ $_POST['Date']=Date($_SESSION['DefaultDateFormat']); } - echo '<br /><table class="selection">'; //Main table + echo '<br /> + <table class="selection">'; //Main table if (isset($_GET['SelectedIndex'])) { - echo '<tr><th colspan="2"><h3>'._('Update Cash Assignment').'</h3></th></tr>'; + echo '<tr> + <th colspan="2"><h3>'._('Update Cash Assignment').'</h3></th> + </tr>'; } else { - echo '<tr><th colspan="2"><h3>'._('New Cash Assignment').'</h3></th></tr>'; + echo '<tr> + <th colspan="2"><h3>'._('New Cash Assignment').'</h3></th> + </tr>'; } - echo '<tr><td>' . _('Cash Assignation Date') . ':</td>'; + echo '<tr> + <td>' . _('Cash Assignation Date') . ':</td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" required="required" autofocus="autofocus" size="10" maxlength="10" value="' . $_POST['Date'] . '" /></td> + </tr>'; - echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size="10" maxlength="10" value="' . $_POST['Date'] . '" /></td></tr>'; - if (!isset($_POST['Amount'])) { $_POST['Amount']=0; } @@ -369,8 +376,10 @@ $_POST['Notes']=''; } - echo '<tr><td>' . _('Notes') . ':</td> - <td><input type="text" name="Notes" size="50" maxlength="49" value="' . $_POST['Notes'] . '" /></td></tr>'; + echo '<tr> + <td>' . _('Notes') . ':</td> + <td><input type="text" name="Notes" size="50" maxlength="49" value="' . $_POST['Notes'] . '" /></td> + </tr>'; if (!isset($_POST['Receipt'])) { $_POST['Receipt']=''; @@ -379,21 +388,18 @@ echo '<tr> <td>' . _('Receipt') . ':</td> <td><input type="text" name="Receipt" size="50" maxlength="49" value="' . $_POST['Receipt'] . '" /></td> - </tr>'; - - echo '</table>'; // close main table - - echo '<input type="hidden" name="CurrentAmount" value="' . $Amount['0']. '" />'; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - - echo '<br /><div class="centre"> + </tr> + </table> + <input type="hidden" name="CurrentAmount" value="' . $Amount['0']. '" /> + <input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" /> + <input type="hidden" name="Days" value="' .$Days. '" /> + <br /> + <div class="centre"> <input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div> + </div> + </form>'; - echo '</div> - </form>'; - } // end if user wish to delete } Modified: trunk/PcAuthorizeExpenses.php =================================================================== --- trunk/PcAuthorizeExpenses.php 2013-07-27 14:35:20 UTC (rev 6152) +++ trunk/PcAuthorizeExpenses.php 2013-07-28 10:16:57 UTC (rev 6153) @@ -4,8 +4,8 @@ include('includes/session.inc'); $Title = _('Authorisation of Petty Cash Expenses'); /* webERP manual links before header.inc */ -$ViewTopic= "PettyCash"; -$BookMark = "AuthorizeExpense"; +$ViewTopic= 'PettyCash'; +$BookMark = 'AuthorizeExpense'; include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -57,11 +57,13 @@ if(!isset ($Days)){ $Days=30; } - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - 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') . '" /></th></tr>'; + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" /> + <br /> + <table class="selection"> + <tr> + <th colspan="7">' . _('Detail Of Movement For Last ') .':<input type="text" class="intger" name="Days" value="' . $Days . '" maxlength="3" size="4" />' . _('Days'); + echo '<input type="submit" name="Go" value="' . _('Go') . '" /></th> + </tr>'; $sql = "SELECT pcashdetails.counterindex, pcashdetails.tabcode, @@ -285,18 +287,22 @@ // Do the postings include ('includes/GLPostings.inc'); - echo '</table><br /><div class="centre"><input type="submit" name="Submit" value="' . _('Update') . '" /></div> - </div> - </form>'; + echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="Submit" value="' . _('Update') . '" /></div> + </div> + </form>'; } else { /*The option to submit was not hit so display form */ -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; -echo '<div>'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<br /><table class="selection">'; //Main table +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <br /> + <table class="selection">'; //Main table $SQL = "SELECT tabcode FROM pctabs @@ -304,8 +310,9 @@ $result = DB_query($SQL,$db); -echo '<tr><td>' . _('Authorise expenses to Petty Cash Tab') . ':</td> - <td><select name="SelectedTabs">'; +echo '<tr> + <td>' . _('Authorise expenses to Petty Cash Tab') . ':</td> + <td><select name="SelectedTabs" required="required" autofocus="autofocus" >'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['SelectTabs']) and $myrow['tabcode']==$_POST['SelectTabs']) { @@ -317,14 +324,18 @@ } //end while loop get type of tab - echo '</select></td></tr>'; - echo '</table>'; // close main table + echo '</select></td> + </tr> + </table>'; // close main table DB_free_result($result); - echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - echo '</div>'; - echo '</form>'; + echo '<br /> + <div class="centre"> + <input type="submit" name="Process" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div> + </div> + </form>'; } /*end of else not submit */ include('includes/footer.inc'); ?> Modified: trunk/PcClaimExpensesFromTab.php =================================================================== --- trunk/PcClaimExpensesFromTab.php 2013-07-27 14:35:20 UTC (rev 6152) +++ trunk/PcClaimExpensesFromTab.php 2013-07-28 10:16:57 UTC (rev 6153) @@ -5,8 +5,8 @@ include('includes/session.inc'); $Title = _('Claim Petty Cash Expenses From Tab'); /* webERP manual links before header.inc */ -$ViewTopic= "PettyCash"; -$BookMark = "ExpenseClaim"; +$ViewTopic= 'PettyCash'; +$BookMark = 'ExpenseClaim'; include('includes/header.inc'); @@ -65,16 +65,16 @@ if ($_POST['SelectedExpense']=='') { $InputError=1; prnMsg(_('You have not selected an expense to claim on this tab'),'error'); - } elseif ($_POST['amount']==0) { + } elseif ($_POST['Amount']==0) { $InputError = 1; - prnMsg( _('The Amount must be greater than 0'),'error'); + prnMsg( _('The amount must be greater than 0'),'error'); } if (isset($SelectedIndex) AND $InputError !=1) { $sql = "UPDATE pcashdetails SET date = '".FormatDateForSQL($_POST['Date'])."', codeexpense = '" . $_POST['SelectedExpense'] . "', - amount = '" .-filter_number_format($_POST['amount']) . "', + amount = '" .-filter_number_format($_POST['Amount']) . "', notes = '" . $_POST['Notes'] . "', receipt = '" . $_POST['Receipt'] . "' WHERE counterindex = '".$SelectedIndex."'"; @@ -99,7 +99,7 @@ '" . $_POST['SelectedTabs'] . "', '".FormatDateForSQL($_POST['Date'])."', '" . $_POST['SelectedExpense'] . "', - '" . -filter_number_format($_POST['amount']) . "', + '" . -filter_number_format($_POST['Amount']) . "', 0, 0, '" . $_POST['Notes'] . "', @@ -115,7 +115,7 @@ prnMsg($msg,'success'); unset($_POST['SelectedExpense']); - unset($_POST['amount']); + unset($_POST['Amount']); unset($_POST['Date']); unset($_POST['Notes']); unset($_POST['Receipt']); @@ -169,9 +169,13 @@ echo '</table>'; // close main table DB_free_result($result); - echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - echo '</div>'; - echo '</form>'; + echo '<br /> + <div class="centre"> + <input type="submit" name="Process" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div> + </div> + </form>'; } else { // isset($SelectedTabs) @@ -181,12 +185,16 @@ echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select another tab') . '</a></div>'; if (! isset($_GET['edit']) OR isset ($_POST['GO'])){ - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br /><table class="selection">'; - echo '<tr><th colspan="8"><h3>' . _('Petty Cash Tab') . ' ' .$SelectedTabs. '</h3></th></tr>'; - echo '<tr><th colspan="8">' . _('Detail Of Movements For Last ') .': '; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <br /> + <table class="selection"> + <tr> + <th colspan="8"><h3>' . _('Petty Cash Tab') . ' ' .$SelectedTabs. '</h3></th> + </tr> + <tr> + <th colspan="8">' . _('Detail Of Movements For Last ') .': '; if(!isset ($Days)){ @@ -202,14 +210,14 @@ $myrow=DB_fetch_array($result); $CurrDecimalPlaces = $myrow['decimalplaces']; - 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="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" /> + <input type="text" class="integer" name="Days" value="' . $Days . '" maxlength="3" size="4" /> ' . _('Days'); echo '<input type="submit" name="Go" value="' . _('Go') . '" />'; echo '</th></tr>'; if (isset($_POST['Cancel'])) { unset($_POST['SelectedExpense']); - unset($_POST['amount']); + unset($_POST['Amount']); unset($_POST['Date']); unset($_POST['Notes']); unset($_POST['Receipt']); @@ -296,31 +304,31 @@ } //END WHILE LIST LOOP - $sqlamount="SELECT sum(amount) + $sqlAmount="SELECT sum(amount) FROM pcashdetails WHERE tabcode='".$SelectedTabs."'"; - $ResultAmount = DB_query($sqlamount,$db); + $ResultAmount = DB_query($sqlAmount,$db); $Amount=DB_fetch_array($ResultAmount); if (!isset($Amount['0'])) { $Amount['0']=0; } - echo '<tr><td colspan="2" style="text-align:right" >' . _('Current balance') . ':</td> - <td class="number">'.locale_number_format($Amount['0'],$CurrDecimalPlaces) . '</td></tr>'; - - - echo '</table>'; - echo '</div> - </form>'; + echo '<tr> + <td colspan="2" style="text-align:right" >' . _('Current balance') . ':</td> + <td class="number">'.locale_number_format($Amount['0'],$CurrDecimalPlaces) . '</td> + </tr> + </table> + </div> + </form>'; } if (! isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if ( isset($_GET['edit'])) { $sql = "SELECT * @@ -336,9 +344,9 @@ $_POST['Notes'] = $myrow['notes']; $_POST['Receipt'] = $myrow['receipt']; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="SelectedIndex" value="' . $SelectedIndex. '" />'; - echo '<input type="hidden" name="Days" value="' .$Days. '" />'; + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" /> + <input type="hidden" name="SelectedIndex" value="' . $SelectedIndex. '" /> + <input type="hidden" name="Days" value="' . $Days . '" />'; }//end of Get Edit @@ -347,9 +355,13 @@ } echo '<br /><table class="selection">'; //Main table - echo '<tr><td>' . _('Date Of Expense') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="Date" size="10" maxlength="10" value="' . $_POST['Date']. '" /></td></tr>'; - echo '<tr><td>' . _('Code Of Expense') . ':</td><td><select name="SelectedExpense">'; + echo '<tr> + <td>' . _('Date Of Expense') . ':</td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="Date" size="10" required="required" autofocus="autofocus" maxlength="10" value="' . $_POST['Date']. '" /></td> + </tr> + <tr> + <td>' . _('Code Of Expense') . ':</td> + <td><select required="required" name="SelectedExpense">'; DB_free_result($result); @@ -373,37 +385,46 @@ } //end while loop - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; if (!isset($_POST['Amount'])) { $_POST['Amount']=0; } - echo '<tr><td>' . _('Amount') . ':</td> - <td><input type="text" class="number" name="amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '" /></td></tr>'; + echo '<tr> + <td>' . _('Amount') . ':</td> + <td><input type="text" class="number" required="required" name="Amount" size="12" maxlength="11" value="' . $_POST['Amount'] . '" /></td> + </tr>'; if (!isset($_POST['Notes'])) { $_POST['Notes']=''; } - echo '<tr><td>' . _('Notes') . ':</td> - <td><input type="text" name="Notes" size="50" maxlength="49" value="' . $_POST['Notes'] . '" /></td></tr>'; + echo '<tr> + <td>' . _('Notes') . ':</td> + <td><input type="text" name="Notes" size="50" maxlength="49" value="' . $_POST['Notes'] . '" /></td> + </tr>'; if (!isset($_POST['Receipt'])) { $_POST['Receipt']=''; } - echo '<tr><td>' . _('Receipt') . ':</td> - <td><input type="text" name="Receipt" size="50" maxlength="49" value="' . $_POST['Receipt'] . '" /></td></tr>'; - echo '</table>'; // close main table + echo '<tr> + <td>' . _('Receipt') . ':</td> + <td><input type="text" name="Receipt" size="50" maxlength="49" value="' . $_POST['Receipt'] . '" /></td> + </tr> + </table> + <input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" /> + <input type="hidden" name="Days" value="' .$Days. '" /> + <br /> + <div class="centre"> + <input type="submit" name="submit" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div> + </div> + </form>'; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; - echo '<input type="hidden" name="Days" value="' .$Days. '" />'; - - echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Accept') . '" /><input type="submit" name="Cancel" value="' . _('Cancel') . '" /></div>'; - echo '</div> - </form>'; - } // end if user wish to delete } Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2013-07-27 14:35:20 UTC (rev 6152) +++ trunk/PcExpenses.php 2013-07-28 10:16:57 UTC (rev 6153) @@ -284,7 +284,7 @@ echo '<table class="selection"> <tr> <td>' . _('Code Of Expense') . ':</td> - <td><input type="text"' . (in_array('CodeExpense',$Errors) ? 'class="inputerror"' : '' ) .' name="CodeExpense" /></td> + <td><input type="text"' . (in_array('CodeExpense',$Errors) ? 'class="inputerror"' : '' ) .' name="CodeExpense" required="required" autofocus="autofocus" /></td> </tr>'; } Modified: trunk/PcReportTab.php =================================================================== --- trunk/PcReportTab.php 2013-07-27 14:35:20 UTC (rev 6152) +++ trunk/PcReportTab.php 2013-07-28 10:16:57 UTC (rev 6153) @@ -20,9 +20,9 @@ echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/money_add.png" title="' . _('Payment Entry') . '" alt="" />' . ' ' . $Title . '</p>'; - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['FromDate'])){ $_POST['FromDate']=Date($_SESSION['DefaultDateFormat'], mktime(0,0,0,Date('m'),1,Date('Y'))); @@ -33,8 +33,10 @@ } /*Show a form to allow input of criteria for Tabs to show */ - echo '<table class="selection">'; - echo '<tr><td>' . _('Code Of Petty Cash Tab') . ':</td><td><select name="SelectedTabs">'; + echo '<table class="selection"> + <tr> + <td>' . _('Code Of Petty Cash Tab') . ':</td> + <td><select name="SelectedTabs">'; $SQL = "SELECT tabcode FROM pctabs @@ -57,17 +59,24 @@ DB_free_result($result); - echo '</select></td></tr>'; - echo'<tr><td>' . _('From Date :') . '</td><td>'; - echo '<input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="FromDate" maxlength="10" size="11" value="' . $_POST['FromDate'] . '" />'; - echo '</td></tr>'; - 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> - </form>'; + echo '</select></td> + </tr> + <tr> + <td>' . _('From Date :') . '</td> + <td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="FromDate" maxlength="10" size="11" value="' . $_POST['FromDate'] . '" /></td> + </tr> + <tr> + <td>' . _('To Date:') .'</td> + <td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="ShowTB" value="' . _('Show HTML') .'" /> + <input type="submit" name="PrintPDF" value="' . _('PrintPDF') . '" /> + </div> + </div> + </form>'; } else if (isset($_POST['PrintPDF'])) { Modified: trunk/PcTabs.php =================================================================== --- trunk/PcTabs.php 2013-07-27 14:35:20 UTC (rev 6152) +++ trunk/PcTabs.php 2013-07-28 10:16:57 UTC (rev 6153) @@ -260,10 +260,10 @@ } if (!isset($_GET['delete'])) { - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<br />'; //Main table + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <br />'; //Main table if ( isset($SelectedTab) AND $SelectedTab!='' ) { @@ -292,10 +292,10 @@ <td>' . $_POST['TabCode'] . '</td> </tr>'; } else { - // This is a new type so the user may volunteer a type code + // This is a new type so the user must enter a type code echo '<table class="selection"> <tr><td>' . _('Tab Code') . ':</td> - <td><input type="text"' . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) .' name="TabCode" /></td></tr>'; + <td><input type="text"' . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) .' name="TabCode" required="required" autofocus="autofocus" /></td></tr>'; } @@ -303,7 +303,8 @@ $_POST['typetabdescription']=''; } - echo '<tr><td>' . _('User Name') . ':</td> + echo '<tr> + <td>' . _('User Name') . ':</td> <td><select name="SelectUser">'; $SQL = "SELECT userid, @@ -322,10 +323,12 @@ } //end while loop get user - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; DB_free_result($result); - echo '<tr><td>' . _('Type Of Tab') . ':</td> + echo '<tr> + <td>' . _('Type Of Tab') . ':</td> <td><select name="SelectTabs">'; $SQL = "SELECT typetabcode, @@ -348,7 +351,8 @@ echo '</select></td></tr>'; DB_free_result($result); - echo '<tr><td>' . _('Currency') . ':</td> + echo '<tr> + <td>' . _('Currency') . ':</td> <td><select name="SelectCurrency">'; $SQL = "SELECT currency, currabrev FROM currencies"; @@ -365,17 +369,20 @@ } //end while loop get type of tab - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; DB_free_result($result); if (!isset($_POST['TabLimit'])) { $_POST['TabLimit']=0; } - echo '<tr><td>' . _('Limit Of Tab') . ':</td> - <td><input type="text" class="number" name="TabLimit" size="12" maxlength="11" value="' . $_POST['TabLimit'] . '" /></td></tr>'; + echo '<tr> + <td>' . _('Limit Of Tab') . ':</td> + <td><input type="text" class="integer" name="TabLimit" size="12" maxlength="11" value="' . $_POST['TabLimit'] . '" /></td></tr>'; - echo '<tr><td>' . _('Assigner') . ':</td> + echo '<tr> + <td>' . _('Assigner') . ':</td> <td><select name="SelectAssigner">'; $SQL = "SELECT userid, @@ -395,10 +402,13 @@ } //end while loop get assigner - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; DB_free_result($result); - echo '<tr><td>' . _('Authoriser') . ":</td><td><select name='SelectAuthoriser'>"; + echo '<tr> + <td>' . _('Authoriser') . ':</td> + <td><select name="SelectAuthoriser">'; $SQL = "SELECT userid, realname @@ -417,10 +427,12 @@ } //end while loop get authoriser - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; DB_free_result($result); - echo '<tr><td>' . _('GL Account Cash Assignment') . ':</td> + echo '<tr> + <td>' . _('GL Account Cash Assignment') . ':</td> <td><select name="GLAccountCash">'; $SQL = "SELECT chartmaster.accountcode, @@ -441,10 +453,12 @@ } //end while loop - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; DB_free_result($result); - echo '<tr><td>' . _('GL Account Petty Cash Tab') . ':</td> + echo '<tr> + <td>' . _('GL Account Petty Cash Tab') . ':</td> <td><select name="GLAccountPcashTab">'; $SQL = "SELECT accountcode, accountname @@ -463,15 +477,19 @@ } //end while loop - echo '</select></td></tr>'; - echo '</table>'; // close main table + echo '</select></td> + </tr> + </table>'; // close main table DB_free_result($result); - 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"> + <input type="submit" name="Submit" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div> + </div> + </form>'; - echo '</div> - </form>'; - } // end if user wish to delete include('includes/footer.inc'); Modified: trunk/PcTypeTabs.php =================================================================== --- trunk/PcTypeTabs.php 2013-07-27 14:35:20 UTC (rev 6152) +++ trunk/PcTypeTabs.php 2013-07-28 10:16:57 UTC (rev 6153) @@ -127,9 +127,12 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<div>'; 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 '</div> - </form>'; + echo '<br /> + <div class="centre"> + <input type="submit" name="Return" value="' . _('Return to list of tab types') . '" /> + </div> + </div> + </form>'; include('includes/footer.inc'); exit; } else { @@ -212,10 +215,11 @@ $_POST['TypeTabCode'] = $myrow['typetabcode']; $_POST['TypeTabDescription'] = $myrow['typetabdescription']; - echo '<input type="hidden" name="SelectedTab" value="' . $SelectedTab . '" />'; - echo '<input type="hidden" name="TypeTabCode" value="' . $_POST['TypeTabCode']. '" />'; - echo '<table class="selection"> - <tr><td>' . _('Code Of Type Of Tab') . ':</td> + echo '<input type="hidden" name="SelectedTab" value="' . $SelectedTab . '" /> + <input type="hidden" name="TypeTabCode" value="' . $_POST['TypeTabCode']. '" /> + <table class="selection"> + <tr> + <td>' . _('Code Of Type Of Tab') . ':</td> <td>' . $_POST['TypeTabCode'] . '</td> </tr>'; @@ -230,7 +234,7 @@ echo '<table class="selection"> <tr> <td>' . _('Code Of Type Of Tab') . ':</td> - <td><input type="text" ' . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) .' name="TypeTabCode" /></td> + <td><input type="text" ' . (in_array('TypeTabCode',$Errors) ? 'class="inputerror"' : '' ) .' required="required" autofocus="autofocus" pattern="[0-9a-zA-Z_]*" name="TypeTabCode" title="' . _('Only alpha-numeric characters and the underscore character are allowed') . '" /></td> </tr>'; } @@ -243,9 +247,8 @@ <td><input type="text" name="TypeTabDescription" size="50" maxlength="49" value="' . $_POST['TypeTabDescription'] . '" /></td> </tr>'; - echo '</table>'; // close main table - - echo '<br /> + echo '</table> + <br /> <div class="centre"> <input type="submit" name="submit" value="' . _('Accept') . '" /> <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> |
From: <ice...@us...> - 2013-07-28 15:24:40
|
Revision: 6156 http://sourceforge.net/p/web-erp/reponame/6156 Author: icedlava Date: 2013-07-28 15:24:37 +0000 (Sun, 28 Jul 2013) Log Message: ----------- Small grammar correction installer. For now with installer testing, add field name change in stock master table. Modified Paths: -------------- trunk/install/index.php trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/install/index.php =================================================================== --- trunk/install/index.php 2013-07-28 15:17:13 UTC (rev 6155) +++ trunk/install/index.php 2013-07-28 15:24:37 UTC (rev 6156) @@ -719,7 +719,7 @@ <ul> <li>'._('During installation you may see different status messages.').'</li> <li>'._('When there is an error message you must correct the error to continue.').'</li> - <li>'._('If you see a warning message you should take notice of before you proceed.').'</li> + <li>'._('If you see a warning message you should take notice before you proceed.').'</li> <li>'._('If you are unsure of an option value, you may keep the default setting.').'</li> </ul>'; ?> Modified: trunk/sql/mysql/weberp-demo.sql =================================================================== --- trunk/sql/mysql/weberp-demo.sql 2013-07-28 15:17:13 UTC (rev 6155) +++ trunk/sql/mysql/weberp-demo.sql 2013-07-28 15:24:37 UTC (rev 6156) @@ -2461,7 +2461,7 @@ `controlled` tinyint(4) NOT NULL DEFAULT '0', `eoq` double NOT NULL DEFAULT '0', `volume` decimal(20,4) NOT NULL DEFAULT '0.0000', - `kgs` decimal(20,4) NOT NULL DEFAULT '0.0000', + `grossweight` decimal(20,4) NOT NULL DEFAULT '0.0000', `barcode` varchar(50) NOT NULL DEFAULT '', `discountcategory` char(2) NOT NULL DEFAULT '', `taxcatid` tinyint(4) NOT NULL DEFAULT '1', Modified: trunk/sql/mysql/weberp-new.sql =================================================================== --- trunk/sql/mysql/weberp-new.sql 2013-07-28 15:17:13 UTC (rev 6155) +++ trunk/sql/mysql/weberp-new.sql 2013-07-28 15:24:37 UTC (rev 6156) @@ -2459,7 +2459,7 @@ `controlled` tinyint(4) NOT NULL DEFAULT '0', `eoq` double NOT NULL DEFAULT '0', `volume` decimal(20,4) NOT NULL DEFAULT '0.0000', - `kgs` decimal(20,4) NOT NULL DEFAULT '0.0000', + `grossweight` decimal(20,4) NOT NULL DEFAULT '0.0000', `barcode` varchar(50) NOT NULL DEFAULT '', `discountcategory` char(2) NOT NULL DEFAULT '', `taxcatid` tinyint(4) NOT NULL DEFAULT '1', |
From: <rc...@us...> - 2013-07-29 02:07:45
|
Revision: 6160 http://sourceforge.net/p/web-erp/reponame/6160 Author: rchacon Date: 2013-07-29 02:07:42 +0000 (Mon, 29 Jul 2013) Log Message: ----------- Minor changes: MainMenuLinksArray.php: GL Maintenance menu, descending reordering of accounting size divisions. PDFQuotationPortraitPageHeader.inc: Corrects the script name and deletes unused code. Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/includes/PDFQuotationPortraitPageHeader.inc trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2013-07-29 00:57:51 UTC (rev 6159) +++ trunk/includes/MainMenuLinksArray.php 2013-07-29 02:07:42 UTC (rev 6160) @@ -357,11 +357,11 @@ '/GLTagProfit_Loss.php', '/Tax.php' ); -$MenuItems['GL']['Maintenance']['Caption'] = array ( _('GL Accounts'), - _('GL Budgets'), - _('Account Groups'), - _('Account Sections'), - _('GL Tags') ); +$MenuItems['GL']['Maintenance']['Caption'] = array ( _('Account Sections'), + _('Account Groups'), + _('GL Accounts'), + _('GL Budgets'), + _('GL Tags') ); $MenuItems['GL']['Maintenance']['URL'] = array ('/GLAccounts.php', '/GLBudgets.php', Modified: trunk/includes/PDFQuotationPortraitPageHeader.inc =================================================================== --- trunk/includes/PDFQuotationPortraitPageHeader.inc 2013-07-29 00:57:51 UTC (rev 6159) +++ trunk/includes/PDFQuotationPortraitPageHeader.inc 2013-07-29 02:07:42 UTC (rev 6160) @@ -1,5 +1,5 @@ <?php -/* $Id: PDFQuotationPortrait.php 4491 2011-02-15 06:31:08Z daintree $ */ +/* $Id: PDFQuotationPortraitPageHeader.inc 4491 2011-02-15 06:31:08Z daintree $ */ if ($PageNumber>1){ $pdf->newPage(); @@ -88,15 +88,6 @@ $pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*3, 200, $FontSize, _('Date'). ': '.ConvertSQLDate($myrow['orddate']), 'right'); $pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*4, 200, $FontSize, _('Page').': '.$PageNumber, 'right'); -/*$pdf->addText(490, 790,$FontSize, _('Number'). ':'); -$pdf->addText(535, 790,$FontSize, $_GET['QuotationNo']); -$pdf->addText(490, 790-15,$FontSize, _('Your Ref'). ':'); -$pdf->addText(520, 790-15,$FontSize, $myrow['customerref']); -$pdf->addText(490, 790-30,$FontSize, _('Date'). ':'); -$pdf->addText(520, 790-30,$FontSize, ConvertSQLDate($myrow['orddate'])); -$pdf->addText(490, 790-45,$FontSize, _('Page'). ':'); -$pdf->addText(520, 790-45,$FontSize, $PageNumber);*/ - $pdf->addText($Page_Width/2-10, $YPos+15, $FontSize, _('All amounts stated in') . ' - ' . $myrow['currcode']); $YPos -= 45; Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2013-07-29 00:57:51 UTC (rev 6159) +++ trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2013-07-29 02:07:42 UTC (rev 6160) @@ -9,7 +9,7 @@ "Project-Id-Version: weberp 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-06-11 10:50-0600\n" +"PO-Revision-Date: 2013-07-24 07:50-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: French <none>\n" "MIME-Version: 1.0\n" @@ -3575,7 +3575,7 @@ #: includes/PDFTransPageHeader.inc:206 #: includes/PDFTransPageHeaderPortrait.inc:261 msgid "Item Code" -msgstr "Code" +msgstr "Code article" # JDN #: ConfirmDispatch_Invoice.php:287 ContractCosting.php:80 |
From: <dai...@us...> - 2013-07-30 10:30:55
|
Revision: 6165 http://sourceforge.net/p/web-erp/reponame/6165 Author: daintree Date: 2013-07-30 10:30:51 +0000 (Tue, 30 Jul 2013) Log Message: ----------- HTML 5 work Modified Paths: -------------- trunk/CustomerBranches.php trunk/GLProfit_Loss.php trunk/OffersReceived.php trunk/OutstandingGRNs.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFPriceList.php trunk/PDFPrintLabel.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php trunk/doc/Change.log Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/CustomerBranches.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -52,7 +52,7 @@ if (ContainsIllegalCharacters($_POST['BranchCode']) OR mb_strstr($_POST['BranchCode'],' ') OR mb_strstr($_POST['BranchCode'],'-')) { $InputError = 1; - prnMsg(_('The Branch code cannot contain any of the following characters')." - & \'",'error'); + prnMsg(_('The Branch code cannot contain any of the following characters')." - & \' < >",'error'); $Errors[$i] = 'BranchCode'; $i++; } @@ -446,9 +446,9 @@ <table class="selection"> <tr> <td><div class="centre">'; - echo '<b>'.$TotalEnable.'</b> ' . _('Branches are enabled.') . '<br />'; - echo '<b>'.$TotalDisable.'</b> ' . _('Branches are disabled.') . '<br />'; - echo '<b>'.($TotalEnable+$TotalDisable). '</b> ' . _('Total Branches') . '</div></td> + echo '<b>' . $TotalEnable.'</b> ' . _('Branches are enabled.') . '<br />'; + echo '<b>' . $TotalDisable.'</b> ' . _('Branches are disabled.') . '<br />'; + echo '<b>' . ($TotalEnable+$TotalDisable). '</b> ' . _('Total Branches') . '</div></td> </tr> </table>'; } else { Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/GLProfit_Loss.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -109,6 +109,10 @@ </select> </td> </tr> + <tr> + <td>' . _('Show all Accounts including zero balances') . '</td> + <td><input type="checkbox" title="' . _('Check this box to display all accounts including those accounts with no balance') . '" name="ShowZeroBalances"></td> + </tr> </table> <br /> <div class="centre"> @@ -404,16 +408,19 @@ if ($_POST['Detail'] == 'Detailed') { $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,60,$FontSize,$myrow['accountcode']); $LeftOvers = $pdf->addTextWrap($Left_Margin+60,$YPos,190,$FontSize,$myrow['accountname']); - if ($Section == 1) { /*Income*/ - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']),'right'); - } else { - $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + if (isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountPeriodActual <> 0 OR $AccountPeriodBudget <> 0 OR $AccountPeriodLY <> 0))){ //condition for pdf + + if ($Section == 1) { /*Income*/ + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + } else { + $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,70,$FontSize,locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+370,$YPos,70,$FontSize,locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+430,$YPos,70,$FontSize,locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces']),'right'); + } + $YPos -= $line_height; } - $YPos -= $line_height; } } //end of loop @@ -969,42 +976,42 @@ echo '<tr class="OddTableRows">'; $k++; } - - $ActEnquiryURL = '<a href="' . $RootPath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>'; - - if ($Section ==1){ - printf('<td>%s</td> - <td>%s</td> - <td></td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> - </tr>', - $ActEnquiryURL, - htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false), - locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']), - locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']), - locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces'])); - } else { - printf('<td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> - <td></td> - <td class="number">%s</td> - <td></td> - </tr>', - $ActEnquiryURL, - htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false), - locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']), - locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']), - locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces'])); + if (isset($_POST['ShowZeroBalances']) OR (!isset($_POST['ShowZeroBalances']) AND ($AccountPeriodActual <> 0 OR $AccountPeriodBudget <> 0 OR $AccountPeriodLY <> 0))){ + $ActEnquiryURL = '<a href="' . $RootPath . '/GLAccountInquiry.php?Period=' . $_POST['ToPeriod'] . '&Account=' . $myrow['accountcode'] . '&Show=Yes">' . $myrow['accountcode'] . '</a>'; + + if ($Section ==1){ + printf('<td>%s</td> + <td>%s</td> + <td></td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> + </tr>', + $ActEnquiryURL, + htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false), + locale_number_format(-$AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']), + locale_number_format(-$AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']), + locale_number_format(-$AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces'])); + } else { + printf('<td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> + <td></td> + <td class="number">%s</td> + <td></td> + </tr>', + $ActEnquiryURL, + htmlspecialchars($myrow['accountname'], ENT_QUOTES,'UTF-8', false), + locale_number_format($AccountPeriodActual,$_SESSION['CompanyRecord']['decimalplaces']), + locale_number_format($AccountPeriodBudget,$_SESSION['CompanyRecord']['decimalplaces']), + locale_number_format($AccountPeriodLY,$_SESSION['CompanyRecord']['decimalplaces'])); + } + $j++; } - - $j++; } } //end of loop Modified: trunk/OffersReceived.php =================================================================== --- trunk/OffersReceived.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/OffersReceived.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -13,7 +13,7 @@ currcode, paymentterms FROM suppliers - WHERE supplierid='".$_POST['supplierid']."'"; + WHERE supplierid='" . $_POST['supplierid'] . "'"; $result = DB_query($sql, $db); $myrow=DB_fetch_array($result); $SupplierName=$myrow['suppname']; @@ -31,24 +31,24 @@ ON offers.currcode=purchorderauth.currabrev LEFT JOIN suppliers ON suppliers.supplierid=offers.supplierid - WHERE purchorderauth.userid='".$_SESSION['UserID']."' + WHERE purchorderauth.userid='" . $_SESSION['UserID'] . "' AND offers.expirydate>'" . date('Y-m-d') . "' AND purchorderauth.cancreate=0"; $result=DB_query($sql, $db); if (DB_num_rows($result)==0) { prnMsg(_('There are no offers outstanding that you are authorised to deal with'), 'information'); } else { - echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Select Supplier') . '" alt="" /> + echo '<p class="page_title_text"><img src="' . $RootPath.'/css/' . $Theme.'/images/supplier.png" title="' . _('Select Supplier') . '" alt="" /> ' . ' ' . _('Select Supplier') . '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">'; echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"> <tr> - <td>'._('Select Supplier').'</td> + <td>' . _('Select Supplier').'</td> <td><select name=supplierid>'; while ($myrow=DB_fetch_array($result)) { - echo '<option value="'.$myrow['supplierid'].'">'.$myrow['suppname'].'</option>'; + echo '<option value="' . $myrow['supplierid'].'">' . $myrow['suppname'].'</option>'; } echo '</select></td> </tr> @@ -97,23 +97,23 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> - <img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . ' + <img src="' . $RootPath.'/css/' . $Theme.'/images/supplier.png" title="' . _('Supplier Offers') . '" alt="" />' . ' ' . _('Supplier Offers') . ' </p>'; echo '<table class="selection"> <tr> - <th>'._('Offer ID').'</th> - <th>'._('Supplier').'</th> - <th>'._('Stock Item').'</th> - <th>'._('Quantity').'</th> - <th>'._('Units').'</th> - <th>'._('Price').'</th> - <th>'._('Total').'</th> - <th>'._('Currency').'</th> - <th>'._('Offer Expires').'</th> - <th>'._('Accept').'</th> - <th>'._('Reject').'</th> - <th>'._('Defer').'</th> + <th>' . _('Offer ID').'</th> + <th>' . _('Supplier').'</th> + <th>' . _('Stock Item').'</th> + <th>' . _('Quantity').'</th> + <th>' . _('Units').'</th> + <th>' . _('Price').'</th> + <th>' . _('Total').'</th> + <th>' . _('Currency').'</th> + <th>' . _('Offer Expires').'</th> + <th>' . _('Accept').'</th> + <th>' . _('Reject').'</th> + <th>' . _('Defer').'</th> </tr>'; $k=0; echo 'The result has rows '.DB_num_rows($result).'<br/>'; @@ -125,19 +125,19 @@ echo '<tr class="OddTableRows">'; $k++; } - echo '<td>'.$myrow['offerid'].'</td> - <td>'.$myrow['suppname'].'</td> - <td>'.$myrow['description'].'</td> + echo '<td>' . $myrow['offerid'].'</td> + <td>' . $myrow['suppname'].'</td> + <td>' . $myrow['description'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$myrow['decimalplaces']).'</td> - <td>'.$myrow['uom'].'</td> + <td>' . $myrow['uom'].'</td> <td class="number">'.locale_number_format($myrow['price'],$myrow['currdecimalplaces']).'</td> <td class="number">'.locale_number_format($myrow['price']*$myrow['quantity'],$myrow['currdecimalplaces']).'</td> - <td>'.$myrow['currcode'].'</td> - <td>'.$myrow['expirydate'].'</td> - <td><input type="radio" name="action'.$myrow['offerid'].'" value="1" /></td> - <td><input type="radio" name="action'.$myrow['offerid'].'" value="2" /></td> - <td><input type="radio" checked name="action'.$myrow['offerid'].'" value="3" /></td> - <td><input type="hidden" name="supplierid" value="'.$myrow['supplierid'].'" /></td> + <td>' . $myrow['currcode'].'</td> + <td>' . $myrow['expirydate'].'</td> + <td><input type="radio" name="action' . $myrow['offerid'] . '" value="1" /></td> + <td><input type="radio" name="action' . $myrow['offerid'] . '" value="2" /></td> + <td><input type="radio" checked name="action' . $myrow['offerid'] . '" value="3" /></td> + <td><input type="hidden" name="supplierid" value="' . $myrow['supplierid'] . '" /></td> </tr>'; } echo '<tr> @@ -152,27 +152,27 @@ </form>'; } else if(isset($_POST['submit']) and isset($_POST['supplierid'])) { include ('includes/htmlMimeMail.php'); - $accepts=array(); + $Accepts=array(); $RejectsArray=array(); - $defers=array(); + $Defers=array(); foreach ($_POST as $key => $value) { if(mb_substr($key,0,6)=='action') { $OfferID=mb_substr($key,6); switch ($value) { case 1: - $accepts[]=$OfferID; + $Accepts[]=$OfferID; break; case 2: $RejectsArray[]=$OfferID; break; case 3: - $defers[]=$OfferID; + $Defers[]=$OfferID; break; } } } - if (sizeOf($accepts)>0){ - $MailText=_('This email has been automatically generated by the webERP installation at'). ' ' . $_SESSION['CompanyRecord']['coyname']."\n"; + if (sizeOf($Accepts)>0){ + $MailText=_('This email has been automatically generated by the webERP installation at'). ' ' . $_SESSION['CompanyRecord']['coyname'] . "\n"; $MailText.=_('The following offers you made have been accepted')."\n"; $MailText.=_('An official order will be sent to you in due course')."\n\n"; $sql="SELECT rate FROM currencies where currabrev='" . $CurrCode ."'"; @@ -192,18 +192,18 @@ stat_comment, paymentterms) VALUES ( - '".$OrderNo."', - '".$_POST['supplierid']."', + '" . $OrderNo."', + '" . $_POST['supplierid'] . "', '".date('Y-m-d')."', - '".$Rate."', - '".$_SESSION['UserID']."', - '".$_SESSION['DefaultFactoryLocation']."', + '" . $Rate."', + '" . $_SESSION['UserID'] . "', + '" . $_SESSION['DefaultFactoryLocation'] . "', '".date('Y-m-d')."', '"._('Pending')."', '"._('Automatically generated from tendering system')."', - '".$PaymentTerms."')"; + '" . $PaymentTerms."')"; DB_query($sql, $db); - foreach ($accepts as $AcceptID) { + foreach ($Accepts as $AcceptID) { $sql="SELECT offers.quantity, offers.price, offers.uom, @@ -212,10 +212,10 @@ FROM offers LEFT JOIN stockmaster ON offers.stockid=stockmaster.stockid - WHERE offerid='".$AcceptID."'"; + WHERE offerid='" . $AcceptID."'"; $result= DB_query($sql, $db); $myrow=DB_fetch_array($result); - $MailText.=$myrow['description']."\t"._('Quantity').' '.$myrow['quantity']."\t"._('Price').' '. + $MailText.=$myrow['description'] . "\t"._('Quantity').' ' . $myrow['quantity'] . "\t"._('Price').' '. locale_number_format($myrow['price'])."\n"; $sql="INSERT INTO purchorderdetails (orderno, itemcode, @@ -225,20 +225,20 @@ actprice, quantityord, suppliersunit) - VALUES ('".$OrderNo."', - '".$myrow['stockid']."', + VALUES ('" . $OrderNo."', + '" . $myrow['stockid'] . "', '".date('Y-m-d')."', '".DB_escape_string($myrow['description'])."', - '".$myrow['price']."', - '".$myrow['price']."', - '".$myrow['quantity']."', - '".$myrow['uom']."')"; + '" . $myrow['price'] . "', + '" . $myrow['price'] . "', + '" . $myrow['quantity'] . "', + '" . $myrow['uom'] . "')"; $result=DB_query($sql, $db); - $sql="DELETE FROM offers WHERE offerid='".$AcceptID."'"; + $sql="DELETE FROM offers WHERE offerid='" . $AcceptID."'"; $result=DB_query($sql, $db); } $mail = new htmlMimeMail(); - $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been accepted')); + $mail->setSubject(_('Your offer to').' ' . $_SESSION['CompanyRecord']['coyname'].' ' . _('has been accepted')); $mail->setText($MailText); $Recipients = GetMailList('OffersReceivedResultRecipients'); if (sizeOf($Recipients) == 0) { @@ -254,16 +254,16 @@ $result = SendMailBySmtp($mail,$Recipients); } if($result){ - prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purchase orders and an email sent to') - .' '.$Email."\n"._('Please review the order contents').' '.'<a href="'.$RootPath . - '/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>', 'success'); + prnMsg(_('The accepted offers from').' ' . $SupplierName.' ' . _('have been converted to purchase orders and an email sent to') + .' ' . $Email."\n"._('Please review the order contents').' '.'<a href="' . $RootPath . + '/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">' . _('here').'</a>', 'success'); }else{ - prnMsg(_('The accepted offers from').' '.$SupplierName.' '._('have been converted to purcharse orders but failed to mail, you can view the order contents').' '.'<a href="'.$RootPath.'/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">'._('here').'</a>','warn'); + prnMsg(_('The accepted offers from').' ' . $SupplierName.' ' . _('have been converted to purcharse orders but failed to mail, you can view the order contents').' '.'<a href="' . $RootPath.'/PO_Header.php?ModifyOrderNumber=' . $OrderNo.'">' . _('here').'</a>','warn'); } } if (sizeOf($RejectsArray)>0){ $MailText=_('This email has been automatically generated by the webERP installation at').' '. - $_SESSION['CompanyRecord']['coyname']."\n"; + $_SESSION['CompanyRecord']['coyname'] . "\n"; $MailText.=_('The following offers you made have been rejected')."\n\n"; foreach ($RejectsArray as $RejectID) { $sql="SELECT offers.quantity, @@ -272,7 +272,7 @@ FROM offers LEFT JOIN stockmaster ON offers.stockid=stockmaster.stockid - WHERE offerid='".$RejectID."'"; + WHERE offerid='" . $RejectID."'"; $result= DB_query($sql, $db); $myrow=DB_fetch_array($result); $MailText .= $myrow['description'] . "\t" . _('Quantity') . ' ' . $myrow['quantity'] . "\t" . _('Price') . ' ' . locale_number_format($myrow['price'])."\n"; @@ -280,7 +280,7 @@ $result=DB_query($sql, $db); } $mail = new htmlMimeMail(); - $mail->setSubject(_('Your offer to').' '.$_SESSION['CompanyRecord']['coyname'].' '._('has been rejected')); + $mail->setSubject(_('Your offer to').' ' . $_SESSION['CompanyRecord']['coyname'].' ' . _('has been rejected')); $mail->setText($MailText); $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . ' <' . $_SESSION['CompanyRecord']['email'] . '>'); $Recipients = GetMailList('OffersReceivedResultRecipients'); @@ -297,11 +297,11 @@ $result = SendmailBySmtp($mail,$Recipients); } if($result){ - prnMsg(_('The rejected offers from').' '.$SupplierName.' '._('have been removed from the system and an email sent to') - .' '.$Email, 'success'); + prnMsg(_('The rejected offers from').' ' . $SupplierName.' ' . _('have been removed from the system and an email sent to') + .' ' . $Email, 'success'); }else{ - prnMsg(_('The rejected offers from').' '.$SupplierName.' '._('have been removed from the system and but no email was not sent to') - .' '.$Email, 'warn'); + prnMsg(_('The rejected offers from').' ' . $SupplierName.' ' . _('have been removed from the system and but no email was not sent to') + .' ' . $Email, 'warn'); } } Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/OutstandingGRNs.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -265,11 +265,11 @@ echo '<tr> <td>' . _('From Supplier Code') . ':</td> - <td><input type="text" name="FromCriteria" value="0" /></td> + <td><input type="text" name="FromCriteria" required="required" autofocus="autofocus" pattern="[0-9a-zA-Z]*" value="0" /></td> </tr> <tr> <td>' . _('To Supplier Code'). ':</td> - <td><input type="text" name="ToCriteria" value="zzzzzzz" /></td> + <td><input type="text" name="ToCriteria" required="required" pattern="[0-9a-zA-Z]*" value="zzzzzzz" /></td> </tr> </table> <br /> Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PDFDIFOT.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -30,12 +30,12 @@ echo '<table class="selection"> <tr> <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> - <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '" /></td> + <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '" /></td> + </tr> + <tr> + <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td> + <td><input type="text" required="required" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> </tr>'; - echo '<tr> - <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td> - <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> - </tr>'; if (!isset($_POST['DaysAcceptable'])){ $_POST['DaysAcceptable'] = 1; @@ -43,9 +43,11 @@ echo '<tr> <td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ':</td> - <td><input type="text" class="number" name="DaysAcceptable" maxlength="2" size="2" value="' . $_POST['DaysAcceptable'] . '" /></td> - </tr>'; - echo '<tr><td>' . _('Inventory Category') . '</td><td>'; + <td><input type="text" class="integer" name="DaysAcceptable" maxlength="2" size="2" value="' . $_POST['DaysAcceptable'] . '" /></td> + </tr> + <tr> + <td>' . _('Inventory Category') . '</td> + <td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); @@ -60,9 +62,10 @@ echo '</select></td></tr>'; - echo '<tr><td>' . _('Inventory Location') . ':</td> - <td><select name="Location">'; - echo '<option selected="selected" value="All">' . _('All Locations') . '</option>'; + echo '<tr> + <td>' . _('Inventory Location') . ':</td> + <td><select name="Location"> + <option selected="selected" value="All">' . _('All Locations') . '</option>'; $result= DB_query("SELECT loccode, locationname FROM locations",$db); while ($myrow=DB_fetch_array($result)){ @@ -70,7 +73,8 @@ } echo '</select></td></tr>'; - echo '<tr><td>' . _('Email the report off') . ':</td> + echo '<tr> + <td>' . _('Email the report off') . ':</td> <td><select name="Email"> <option selected="selected" value="No">' . _('No') . '</option> <option value="Yes">' . _('Yes') . '</option> @@ -80,9 +84,9 @@ <br /> <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> - </div>'; - echo '</div> - </form>'; + </div> + </div> + </form>'; if ($InputError==1){ prnMsg($msg,'error'); Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PDFDeliveryDifferences.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -30,10 +30,11 @@ echo '<table class="selection"> <tr> <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '" /></td> + <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '" /></td> </tr>'; echo '<tr> - <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td> + <td><input type="text" required="required" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> </tr>'; echo '<tr> <td>' . _('Inventory Category') . '</td> @@ -56,9 +57,8 @@ } echo '</select></td> - </tr>'; - - echo '<tr> + </tr> + <tr> <td>' . _('Inventory Location') . ':</td> <td><select name="Location"> <option selected="selected" value="All">' . _('All Locations') . '</option>'; @@ -80,9 +80,9 @@ <br /> <div class="centre"> <input type="submit" name="Go" value="' . _('Create PDF') . '" /> - </div>'; - echo '</div> - </form>'; + </div> + </div> + </form>'; if ($InputError==1){ prnMsg($msg,'error'); Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PDFLowGP.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -128,25 +128,25 @@ echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection">'; - echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] . '" /></td> - </tr>'; - - echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> - </tr>'; - - echo '<tr><td>' . _('Show sales with GP % below') . ':</td> - <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '" /></td> - </tr>'; - - echo '</table> - <br /> - <div class="centre"> - <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> - </div>'; - echo '</div> - </form>'; + echo '<tr> + <td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size="10" maxlength="10" value="' . $_POST['FromDate'] . '" /></td> + </tr> + <tr> + <td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input type="text" required="required" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '" /></td> + </tr> + <tr> + <td>' . _('Show sales with GP % below') . ':</td> + <td><input type="text" class="integer" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '" /> + </div> + </div> + </form>'; } include('includes/footer.inc'); Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PDFOrderStatus.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -30,51 +30,58 @@ echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . $Title . '" alt="" />' . ' ' . _('Order Status Report') . '</p>'; echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"> - <tr> - <td>' . _('Enter the date from which orders are to be listed') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '" /></td> - </tr>'; - echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td><td>'; - echo '<input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td></tr>'; - echo '<tr><td>' . _('Inventory Category') . '</td><td>'; + echo '<div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Enter the date from which orders are to be listed') . ':</td> + <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '" /></td> + </tr> + <tr> + <td>' . _('Enter the date to which orders are to be listed') . ':</td> + <td><input type="text" required="required" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + </tr> + <tr> + <td>' . _('Inventory Category') . '</td> + <td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); - echo '<select name="CategoryID">'; - echo '<option selected="selected" value="All">' . _('Over All Categories') . '</option>'; + echo '<select required="required" name="CategoryID"> + <option selected="selected" value="All">' . _('Over All Categories') . '</option>'; while ($myrow=DB_fetch_array($result)){ echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } - echo '</select></td></tr>'; + echo '</select></td> + </tr> + <tr> + <td>' . _('Inventory Location') . ':</td> + <td><select name="Location"> + <option selected="selected" value="All">' . _('All Locations') . '</option>'; - echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">'; - echo '<option selected="selected" value="All">' . _('All Locations') . '</option>'; - $result= DB_query("SELECT loccode, locationname FROM locations",$db); while ($myrow=DB_fetch_array($result)){ echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } echo '</select></td></tr>'; - echo '<tr><td>' . _('Back Order Only') . ':</td> - <td><select name="BackOrders"> - <option selected="selected" value="Yes">' . _('Only Show Back Orders') . '</option> - <option value="No">' . _('Show All Orders') . '</option> - </select></td> - </tr> - </table> - <br /> - <div class="centre"> - <input type="submit" name="Go" value="' . _('Create PDF') . '" /> - </div>'; - echo '</div> - </form>'; + echo '<tr> + <td>' . _('Back Order Only') . ':</td> + <td><select name="BackOrders"> + <option selected="selected" value="Yes">' . _('Only Show Back Orders') . '</option> + <option value="No">' . _('Show All Orders') . '</option> + </select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="Go" value="' . _('Create PDF') . '" /> + </div> + </div> + </form>'; include('includes/footer.inc'); exit; Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PDFOrdersInvoiced.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -35,43 +35,50 @@ echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"> - <tr> - <td>' . _('Enter the date from which orders are to be listed') . ':</td> - <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '" /></td> - </tr>'; - echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td> - <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td></tr>'; - echo '<tr><td>' . _('Inventory Category') . '</td><td>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Enter the date from which orders are to be listed') . ':</td> + <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '" /></td> + </tr> + <tr> + <td>' . _('Enter the date to which orders are to be listed') . ':</td> + <td><input type="text" required="required" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + </tr> + <tr> + <td>' . _('Inventory Category') . '</td> + <td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); - - echo '<select name="CategoryID">'; + echo '<select required="required" name="CategoryID">'; echo '<option selected="selected" value="All">' . _('Over All Categories') . '</option>'; while ($myrow=DB_fetch_array($result)){ echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } - echo '</select></td></tr>'; + echo '</select></td> + </tr> + <tr> + <td>' . _('Inventory Location') . ':</td> + <td><select required="required" name="Location"> + <option selected="selected" value="All">' . _('All Locations') . '</option>'; - echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">'; - echo '<option selected="selected" value="All">' . _('All Locations') . '</option>'; - $result= DB_query("SELECT loccode, locationname FROM locations",$db); while ($myrow=DB_fetch_array($result)){ echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } - echo '</select></td></tr>'; + echo '</select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="Go" value="' . _('Create PDF') . '" /> + </div> + </div> + </form>'; - echo '</table> - <br /> - <div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '" /></div>'; - echo '</div> - </form>'; - include('includes/footer.inc'); exit; } else { Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PDFPeriodStockTransListing.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -24,31 +24,29 @@ prnMsg($msg,'error'); } - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection">'; - echo '<tr> - <td>' . _('Enter the date from which the transactions are to be listed') . ':</td> - <td><input type="text" name="FromDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> - </tr>'; - echo '<tr> - <td>' . _('Enter the date to which the transactions are to be listed') . ':</td> - <td><input type="text" name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> - </tr>'; - - echo '<tr><td>' . _('Transaction type') . '</td><td>'; - - echo '<select name="TransType">'; - - echo '<option value="10">' . _('Sales Invoice').'</option> - <option value="11">' . _('Sales Credit Note').'</option> - <option value="16">' . _('Location Transfer').'</option> - <option value="17">' . _('Stock Adjustment').'</option> - <option value="25">' . _('Purchase Order Delivery').'</option> - <option value="26">' . _('Work Order Receipt').'</option> - <option value="28">' . _('Work Order Issue').'</option> - </select></td> + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Enter the date from which the transactions are to be listed') . ':</td> + <td><input type="text" required="required" autofocus="autofocus" name="FromDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + </tr> + <tr> + <td>' . _('Enter the date to which the transactions are to be listed') . ':</td> + <td><input type="text" required="required" name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + </tr> + <tr> + <td>' . _('Transaction type') . '</td> + <td><select name="TransType"> + <option value="10">' . _('Sales Invoice').'</option> + <option value="11">' . _('Sales Credit Note').'</option> + <option value="16">' . _('Location Transfer').'</option> + <option value="17">' . _('Stock Adjustment').'</option> + <option value="25">' . _('Purchase Order Delivery').'</option> + <option value="26">' . _('Work Order Receipt').'</option> + <option value="28">' . _('Work Order Issue').'</option> + </select></td> </tr>'; $sql = "SELECT loccode, locationname FROM locations"; @@ -56,7 +54,7 @@ echo '<tr> <td>' . _('For Stock Location') . ':</td> - <td><select name="StockLocation"> + <td><select required="required" name="StockLocation"> <option value="All">' . _('All') . '</option>'; while ($myrow=DB_fetch_array($resultStkLocs)){ Modified: trunk/PDFPickingList.php =================================================================== --- trunk/PDFPickingList.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PDFPickingList.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -26,16 +26,17 @@ FROM locations"; $result=DB_query($sql, $db); echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/sales.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title.'</p><br />'; - echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection"> + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" name="form"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> <tr> <td>'._('Create picking lists for all deliveries to be made on').' : '.'</td> - <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength="10" size="11" value="'.date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)).'" /></td> - </tr>'; - echo '<tr><td>'._('From Warehouse').' : '.'</td> - <td><select name="loccode">'; + <td><input type="text" required="required" autofocus="autofocus" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength="10" size="11" value="' . date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)) . '" /></td> + </tr> + <tr> + <td>'._('From Warehouse').' : '.'</td> + <td><select required="required" name="loccode">'; while ($myrow=DB_fetch_array($result)) { echo '<option value="'.$myrow['loccode'].'">'.$myrow['locationname'].'</option>'; } Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PDFPriceList.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -288,25 +288,31 @@ } echo '</select></td></tr>'; - echo '<tr><td>' . _('Show Gross Profit %') . ':</td> - <td><select name="ShowGPPercentages">'; - echo '<option selected="selected" value="No">'. _('Prices Only') . '</option>'; - echo '<option value="Yes">'. _('Show GP % too') . '</option>'; - echo '</select></td></tr>'; - - echo '<tr><td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials">'; - echo '<option selected="selected" value="Sales Type Prices">'. _('Default Sales Type Prices') . '</option>'; - echo '<option value="Customer Special Prices Only">'. _('Customer Special Prices Only') . '</option>'; - echo '<option value="Full Description">'. _('Full Description') . '</option>'; - echo '</select></td></tr>'; - - 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>'; - - echo '</table><br /><div class="centre"><input type="submit" name="PrintPDF" value="'. _('Print PDF'). '" /></div>'; - echo '</div> - </form>'; + echo '<tr> + <td>' . _('Show Gross Profit %') . ':</td> + <td><select name="ShowGPPercentages"> + <option selected="selected" value="No">'. _('Prices Only') . '</option> + <option value="Yes">'. _('Show GP % too') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Price Listing Type'). ':</td><td><select name="CustomerSpecials"> + <option selected="selected" value="Sales Type Prices">'. _('Default Sales Type Prices') . '</option> + <option value="Customer Special Prices Only">'. _('Customer Special Prices Only') . '</option> + <option value="Full Description">'. _('Full Description') . '</option> + </select></td> + </tr> + <tr> + <td>' . _('Effective As At') . ':</td> + <td><input type="text" required="required" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="'. _('Print PDF'). '" /> + </div> + </div> + </form>'; } include('includes/footer.inc'); @@ -376,4 +382,4 @@ $PageNumber++; } -?> +?> \ No newline at end of file Modified: trunk/PDFPrintLabel.php =================================================================== --- trunk/PDFPrintLabel.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PDFPrintLabel.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -280,7 +280,7 @@ echo '<table class="selection">'; echo '<tr> <td>' . _('Label to print') . ':</td> - <td><select name="LabelID">'; + <td><select required="required" autofocus="autofocus" name="LabelID">'; $LabelResult = DB_query("SELECT labelid, description FROM labels",$db); while ($LabelRow = DB_fetch_array($LabelResult)){ @@ -335,10 +335,11 @@ echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' - ' .$myrow['currency'] . '</option>'; } } - echo '</select></td></tr>'; - - 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 '</select></td> + </tr> + <tr> + <td>' . _('Effective As At') . ':</td> + <td><input type="text" size="11" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveDate" value="' . Date($_SESSION['DefaultDateFormat']) . '" />'; echo '</td></tr>'; echo '</table> Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PaymentMethods.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -265,18 +265,18 @@ } echo '<tr> <td>' . _('Payment Method') . ':' . '</td> - <td><input type="text" '. (in_array('MethodName',$Errors) ? 'class="inputerror"' : '' ) .' name="MethodName" size="30" maxlength="30" value="' . $_POST['MethodName'] . '" /></td> + <td><input type="text" '. (in_array('MethodName',$Errors) ? 'class="inputerror"' : '' ) .' name="MethodName" autofocus="autofocus" required="required" size="30" maxlength="30" value="' . $_POST['MethodName'] . '" /></td> </tr>'; echo '<tr> <td>' . _('Use For Payments') . ':' . '</td> - <td><select name="ForPayment"> + <td><select required="required" name="ForPayment"> <option' . ($_POST['ForPayment'] ? ' selected="selected"' : '') .' value="1">' . _('Yes') . '</option> <option' . ($_POST['ForPayment'] ? '' : ' selected="selected"') .' value="0">' . _('No') . '</option> </select></td> </tr>'; echo '<tr> <td>' . _('Use For Receipts') . ':' . '</td> - <td><select name="ForReceipt"> + <td><select required="required" name="ForReceipt"> <option' . ($_POST['ForReceipt'] ? ' selected="selected"' : '') .' value="1">' . _('Yes') . '</option> <option' . ($_POST['ForReceipt'] ? '' : ' selected="selected"') .' value="0">' . _('No') . '</option> </select></td> Modified: trunk/PaymentTerms.php =================================================================== --- trunk/PaymentTerms.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/PaymentTerms.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -277,13 +277,13 @@ </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> + <td><input type="text" name="TermsIndicator"' . (in_array('TermsIndicator',$Errors) ? 'class="inputerror"' : '' ) .' autofocus="autofocus" required="required" pattern="[0-9a-ZA-Z_]*" title="' . _('A 2 character code to identify this payment term. Any alpha-numeric characters can be used') . '" value="' . $_POST['TermsIndicator'] . '" size="3" maxlength="2" /></td> </tr>'; } echo '<tr> <td>'. _('Terms Description'). ':</td> - <td><input type="text"' . (in_array('Terms',$Errors) ? 'class="inputerror"' : '' ) .' name="Terms" value="'.$_POST['Terms']. '" size="35" maxlength="40" /></td> + <td><input type="text"' . (in_array('Terms',$Errors) ? 'class="inputerror"' : '' ) .' name="Terms" ' . (isset($SelectedTerms)? 'autofocus="autofocus"': '') . ' required="required" value="'.$_POST['Terms']. '" title="' . _('A description of the payment terms is required') . '" size="35" maxlength="40" /></td> </tr> <tr> <td>'._('Due After A Given No. Of Days').':</td> @@ -294,7 +294,7 @@ echo ' /></td> </tr> <tr><td>'._('Days (Or Day In Following Month)').':</td> - <td><input type="text"' . (in_array('DayNumber',$Errors) ? 'class="inputerror"' : '' ) .' name="DayNumber" class="number" size="4" maxlength="3" value="'; + <td><input type="text" ' . (in_array('DayNumber',$Errors) ? 'class="inputerror"' : '' ) .' name="DayNumber" required="required" class="integer" size="4" maxlength="3" value="'; if ($DaysBeforeDue !=0) { echo locale_number_format($DaysBeforeDue,0); } else { Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/Payments.php 2013-07-30 10:30:51 UTC (rev 6165) @@ -743,12 +743,12 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'] . '?identifier=' . $identifier) . '" method="post">'; echo '<div>'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <br /> + <table class="selection"> + <tr> + <th colspan="4"><h3>' . _('Payment'); -echo '<br /><table class="selection">'; - -echo '<tr><th colspan="4"><h3>' . _('Payment'); - if ($_SESSION['PaymentDetail' . $identifier]->SupplierID!=''){ echo ' ' . _('to') . ' ' . $_SESSION['PaymentDetail' . $identifier]->SuppName; } @@ -771,7 +771,7 @@ echo '<tr> <td>' . _('Bank Account') . ':</td> - <td><select name="BankAccount" onchange="ReloadForm(UpdateHeader)">'; + <td><select name="BankAccount" autofocus="autofocus" required="required" title="' . _('Select the bank account that the payment has been made from') . '" onchange="ReloadForm(UpdateHeader)">'; if (DB_num_rows($AccountsResults)==0){ echo '</select></td> @@ -797,13 +797,14 @@ echo '<tr> <td>' . _('Date Paid') . ':</td> - <td><input type="text" name="DatePaid" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" size="11" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_SESSION['PaymentDetail' . $identifier]->DatePaid . '" /></td> + <td><input type="text" name="DatePaid" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" required="required" maxlength="10" size="11" onchange="isDate(this, this.value, '."'".$_SESSION['DefaultDateFormat']."'".')" value="' . $_SESSION['PaymentDetail' . $identifier]->DatePaid . '" /></td> </tr>'; if ($_SESSION['PaymentDetail' . $identifier]->SupplierID==''){ - echo '<tr><td>' . _('Currency of Payment') . ':</td> - <td><select name="Currency" onchange="ReloadForm(UpdateHeader)">'; + echo '<tr> + <td>' . _('Currency of Payment') . ':</td> + <td><select name="Currency" required="required" onchange="ReloadForm(UpdateHeader)">'; $SQL = "SELECT currency, currabrev, rate FROM currencies"; $result=DB_query($SQL,$db); @@ -859,7 +860,7 @@ } echo '<tr> <td>' . _('Payment Exchange Rate') . ':</td> - <td><input class="number" type="text" name="ExRate" maxlength="10" size="12" value="' . $_POST['ExRate'] . '" /></td> + <td><input class="number" type="text" name="ExRate" maxlength="10" size="12" title="' . _('The exchange rate between the currency of the bank account currency and the currency of the payment') . '" value="' . $_POST['ExRate'] . '" /></td> <td>' . $SuggestedExRateText . ' <i>' . _('The exchange rate between the currency of the bank account currency and the currency of the payment') . '. 1 ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->Currency . '</i></td> </tr>'; } @@ -876,7 +877,7 @@ } echo '<tr> <td>' . _('Functional Exchange Rate') . ':</td> - <td><input type="text" name="FunctionalExRate" maxlength="10" size="12" value="' . $_POST['FunctionalExRate'] . '" /></td> + <td><input type="text" name="FunctionalExRate" maxlength="10" size="12" class="number" title="' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '" value="' . $_POST['FunctionalExRate'] . '" /></td> <td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . '</i></td> </tr>'; } @@ -911,31 +912,27 @@ if (!isset($_POST['Narrative'])) { $_POST['Narrative']=''; } - +if (!isset($_POST['Currency'])){ + $_POST['Currency'] = $_SESSION['CompanyRecord']['currencydefault']; +} echo '<tr> <td>' . _('Reference / Narrative') . ':</td> <td colspan="2"><input type="text" name="Narrative" maxlength="80" size="82" value="' . stripslashes($_POST['Narrative'] ) . '" /> ' . _('(Max. length 80 characters)') . '</td> </tr> + <td><input type="hidden" name="PreviousCurrency" value="' . $_POST['Currency'].'" /></td> + <td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></div></td> + </tr> + </table> + <br />'; - - <td><input type="hidden" name="PreviousCurrency" value="'.$_POST['Currency'].'" /></td> - - - <td colspan="3"><div class="centre"><input type="submit" name="UpdateHeader" value="' . _('Update'). '" /></div></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"><h3>' . _('General Ledger Payment Analysis Entry') . '</h3></th></tr>'; - - //Select the Tag echo '<tr> + <th colspan="2"><h3>' . _('General Ledger Payment Analysis Entry') . '</h3></th> + </tr> + <tr> <td>' . _('Select Tag') . ':</td> <td><select name="Tag">'; @@ -961,12 +958,13 @@ if (isset($_POST['GLManualCode'])) { echo '<tr> <td>' . _('Enter GL Account Manually') . ':</td> - <td><input type="text" class="number" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . ' value="'. $_POST['GLManualCode'] .'" /></td> + <td><input type="text" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,\'' . _('The account code') . ' \' + this.value + \'' . _('doesnt exist') . '\')" value="'. $_POST['GLManualCode'] .'" /></td> </tr>'; } else { echo '<tr> <td>' . _('Enter GL Account Manually') . ':</td> - <td><input type="text" class="number" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" /></td></tr>'; + <td><input type="text" name="GLManualCode" maxlength="12" size="12" onchange="return inArray(this, GLCode.options,\'' . _('The account code') . ' \' + this.value + \'' . _('doesnt exist') . '\')" /></td> + </tr>'; } echo '<tr> @@ -1050,11 +1048,12 @@ if (isset($_POST['GLAmount'])) { echo '<tr> <td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail' . $identifier]->Currency . '):</td> - <td><input type="text" name="GLAmount" maxlength="12" size="12" class="number" value="' . $_POST['GLAmount'] . '" /></td> + <td><input type="text" required="required" name="GLAmount" maxlength="12" size="12" class="number" value="' . $_POST['GLAmount'] . '" /></td> </tr>'; } else { - echo '<tr><td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail' . $identifier]->Currency . '):</td> - <td><input type="text" name="GLAmount" maxlength="12" size="12" class="number" /></td> + echo '<tr> + <td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail' . $identifier]->Currency . '):</td> + <td><input type="text" required="required" name="GLAmount" maxlength="12" size="12" class="number" value="0" /></td> </tr>'; } @@ -1134,4 +1133,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2013-07-30 07:39:19 UTC (rev 6164) +++ trunk/doc/Change.log 2013-07-30 10:30:51 UTC (rev 6165) @@ -1,5 +1,6 @@ webERP Change Log +29/7/13 Serge Gélinas: Profit and loss now has option to show all accounts and by default just shows those with a balance 25/7/13 Serge Gélinas: Balance sheet now has option to show all accounts and by default just shows those with a balance 24/7/13 Exson: Fixed that empty password should be allowed. Reported by Tim. 24/7/13 Exson: Add the html5 mark for some input fields in WWW_Users.php. |
From: <rc...@us...> - 2013-07-31 18:22:07
|
Revision: 6166 http://sourceforge.net/p/web-erp/reponame/6166 Author: rchacon Date: 2013-07-31 18:22:03 +0000 (Wed, 31 Jul 2013) Log Message: ----------- Introduces column relative alignment. More width for description. Modified Paths: -------------- trunk/PDFStockLocTransfer.php trunk/includes/PDFStockLocTransferHeader.inc Modified: trunk/PDFStockLocTransfer.php =================================================================== --- trunk/PDFStockLocTransfer.php 2013-07-30 10:30:51 UTC (rev 6165) +++ trunk/PDFStockLocTransfer.php 2013-07-31 18:22:03 UTC (rev 6166) @@ -77,10 +77,10 @@ do { - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,100,$FontSize,$TransferRow['stockid'], 'left'); - $LeftOvers = $pdf->addTextWrap(150,$YPos,200,$FontSize,$TransferRow['description'], 'left'); - $LeftOvers = $pdf->addTextWrap(350,$YPos,60,$FontSize,locale_number_format($TransferRow['shipqty'],$TransferRow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap(470,$YPos,60,$FontSize,locale_number_format($TransferRow['recqty'],$TransferRow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 100, $FontSize, $TransferRow['stockid'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+100, $YPos, 250, $FontSize, $TransferRow['description'], 'left'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-100-100, $YPos, 100, $FontSize, locale_number_format($TransferRow['shipqty'],$TransferRow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-100, $YPos, 100, $FontSize, locale_number_format($TransferRow['recqty'],$TransferRow['decimalplaces']), 'right'); $pdf->line($Left_Margin, $YPos-2,$Page_Width-$Right_Margin, $YPos-2); @@ -94,4 +94,4 @@ } while ($TransferRow = DB_fetch_array($result)); $pdf->OutputD($_SESSION['DatabaseName'] . '_StockLocTrfShipment_' . date('Y-m-d') . '.pdf'); $pdf->__destruct(); -?> \ No newline at end of file +?> Modified: trunk/includes/PDFStockLocTransferHeader.inc =================================================================== --- trunk/includes/PDFStockLocTransferHeader.inc 2013-07-30 10:30:51 UTC (rev 6165) +++ trunk/includes/PDFStockLocTransferHeader.inc 2013-07-31 18:22:03 UTC (rev 6166) @@ -45,12 +45,12 @@ /*set up the headings */ $Xpos = $Left_Margin+1; -$LeftOvers = $pdf->addTextWrap($Xpos,$YPos,100-$Left_Margin,$FontSize,_('Item Code'), 'centre'); -$LeftOvers = $pdf->addTextWrap(150,$YPos,150-$Left_Margin,$FontSize,_('Description'), 'centre'); -$LeftOvers = $pdf->addTextWrap(341,$YPos,120,$FontSize,_('Qty Shipped'), 'centre'); -$LeftOvers = $pdf->addTextWrap(341+120,$YPos,120,$FontSize,_('Qty Received'), 'centre'); +$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 100, $FontSize, _('Item Code'), 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+100, $YPos, 250, $FontSize, _('Description'), 'left'); +$LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-100-100, $YPos, 100, $FontSize, _('Qty Shipped'), 'right'); +$LeftOvers = $pdf->addTextWrap($Page_Width-$Right_Margin-100, $YPos, 100, $FontSize, _('Qty Received'), 'right'); $FontSize=10; $YPos -= 30; -?> \ No newline at end of file +?> |
From: <ice...@us...> - 2013-08-03 09:09:48
|
Revision: 6170 http://sourceforge.net/p/web-erp/reponame/6170 Author: icedlava Date: 2013-08-03 09:09:45 +0000 (Sat, 03 Aug 2013) Log Message: ----------- Obfuscate database name in login, do not show company in login if directory/company not wanted (eg weberpdemo). One method - other is using small file in each company directory but this method reduces load time/code. Modified Paths: -------------- trunk/Z_MakeNewCompany.php trunk/config.distrib.php trunk/includes/ConnectDB.inc trunk/includes/Login.php trunk/install/index.php Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2013-08-03 01:06:12 UTC (rev 6169) +++ trunk/Z_MakeNewCompany.php 2013-08-03 09:09:45 UTC (rev 6170) @@ -12,7 +12,6 @@ header ('Location:' . $RootPath . '/CompanyPreferences.php?' . SID); exit; } - $Title = _('Make New Company Database Utility'); include('includes/header.inc'); @@ -25,25 +24,24 @@ exit; } +if (isset($_POST['submit']) AND isset($_POST['NewDatabase'])) { -if (isset($_POST['submit']) AND isset($_POST['NewCompany'])) { - - if(mb_strlen($_POST['NewCompany'])>32 - OR ContainsIllegalCharacters($_POST['NewCompany'])){ - prnMsg(_('Company abbreviations must not contain spaces, \& or " or \''),'error'); + if(mb_strlen($_POST['NewDatabase'])>32 + OR ContainsIllegalCharacters($_POST['NewDatabase'])){ + prnMsg(_('Company database must not contain spaces, \& or " or \''),'error'); } else { - $_POST['NewCompany'] = strtolower($_POST['NewCompany']); + $_POST['NewDatabase'] = strtolower($_POST['NewDatabase']); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID . '">'; echo '<div class="centre">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /* check for directory existence */ - if (!file_exists('./companies/' . $_POST['NewCompany']) + if (!file_exists('./companies/' . $_POST['NewDatabase']) AND (isset($_FILES['LogoFile']) AND $_FILES['LogoFile']['name'] !='')) { $result = $_FILES['LogoFile']['error']; $UploadTheLogo = 'Yes'; //Assume all is well to start off with - $filename = './companies/' . $_POST['NewCompany'] . '/logo.jpg'; + $filename = './companies/' . $_POST['NewDatabase'] . '/logo.jpg'; //But check for the worst if (mb_strtoupper(mb_substr(trim($_FILES['LogoFile']['name']),mb_strlen($_FILES['LogoFile']['name'])-3))!='JPG'){ @@ -67,11 +65,11 @@ if ($_POST['CreateDB']==TRUE){ /* Need to read in the sql script and process the queries to initate a new DB */ - $result = DB_query('CREATE DATABASE ' . $_POST['NewCompany'],$db); + $result = DB_query('CREATE DATABASE ' . $_POST['NewDatabase'],$db); if ($DBType=='postgres'){ - $PgConnStr = 'dbname=' . $_POST['NewCompany']; + $PgConnStr = 'dbname=' . $_POST['NewDatabase']; if ( isset($host) && ($host != "")) { $PgConnStr = 'host=' . $host . ' ' . $PgConnStr; } @@ -87,10 +85,10 @@ $SQLScriptFile = file('./sql/pg/weberp-new.psql'); } elseif ($DBType =='mysql') { //its a mysql db < 4.1 - mysql_select_db($_POST['NewCompany'],$db); + mysql_select_db($_POST['NewDatabase'],$db); $SQLScriptFile = file('./sql/mysql/weberp-new.sql'); } elseif ($DBType =='mysqli') { //its a mysql db using the >4.1 library functions - mysqli_select_db($db,$_POST['NewCompany']); + mysqli_select_db($db,$_POST['NewDatabase']); $SQLScriptFile = file('./sql/mysql/weberp-new.sql'); } @@ -129,18 +127,18 @@ } //end if CreateDB was checked prnMsg (_('Attempting to create the new company directories') . '.....<br />', 'info'); - $Result = mkdir('./companies/' . $_POST['NewCompany']); - $Result = mkdir('./companies/' . $_POST['NewCompany'] . '/part_pics'); - $Result = mkdir('./companies/' . $_POST['NewCompany'] . '/EDI_Incoming_Orders'); - $Result = mkdir('./companies/' . $_POST['NewCompany'] . '/reports'); - $Result = mkdir('./companies/' . $_POST['NewCompany'] . '/EDI_Sent'); - $Result = mkdir('./companies/' . $_POST['NewCompany'] . '/EDI_Pending'); - $Result = mkdir('./companies/' . $_POST['NewCompany'] . '/FormDesigns'); - $Result = mkdir('./companies/' . $_POST['NewCompany'] . '/reportwriter'); + $Result = mkdir('./companies/' . $_POST['NewDatabase']); + $Result = mkdir('./companies/' . $_POST['NewDatabase'] . '/part_pics'); + $Result = mkdir('./companies/' . $_POST['NewDatabase'] . '/EDI_Incoming_Orders'); + $Result = mkdir('./companies/' . $_POST['NewDatabase'] . '/reports'); + $Result = mkdir('./companies/' . $_POST['NewDatabase'] . '/EDI_Sent'); + $Result = mkdir('./companies/' . $_POST['NewDatabase'] . '/EDI_Pending'); + $Result = mkdir('./companies/' . $_POST['NewDatabase'] . '/FormDesigns'); + $Result = mkdir('./companies/' . $_POST['NewDatabase'] . '/reportwriter'); - copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/GoodsReceived.xml', './companies/' .$_POST['NewCompany'] . '/FormDesigns/GoodsReceived.xml'); - copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/PickingList.xml', './companies/' .$_POST['NewCompany'] . '/FormDesigns/PickingList.xml'); - copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/PurchaseOrder.xml', './companies/' .$_POST['NewCompany'] . '/FormDesigns/PurchaseOrder.xml'); + copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/GoodsReceived.xml', './companies/' .$_POST['NewDatabase'] . '/FormDesigns/GoodsReceived.xml'); + copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/PickingList.xml', './companies/' .$_POST['NewDatabase'] . '/FormDesigns/PickingList.xml'); + copy ('./companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/PurchaseOrder.xml', './companies/' .$_POST['NewDatabase'] . '/FormDesigns/PurchaseOrder.xml'); /*OK Now upload the logo */ if ($UploadTheLogo=='Yes'){ @@ -167,7 +165,7 @@ exit; } - $_SESSION['DatabaseName'] = $_POST['NewCompany']; + $_SESSION['DatabaseName'] = $_POST['NewDatabase']; unset ($_SESSION['CustomerID']); unset ($_SESSION['SupplierID']); @@ -175,20 +173,37 @@ unset ($_SESSION['Items']); unset ($_SESSION['CreditItems']); - $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewCompany'] . "/EDI__Sent' WHERE confname='EDI_MsgSent'"; + //now update the config.php file if using the obfuscated database login else we don't want it there + if (isset($CompanyList) && is_array($CompanyList)) { + $ConfigFile = './config.php'; + $config_php = join('', file($ConfigFile)); + $config_php = preg_replace('/\/\/End Installed companies-do not change this line/', "\$CompanyList[] = array('database'=>'".$_POST['NewDatabase']."' ,'company'=>'".htmlspecialchars($_POST['NewCompany'],ENT_QUOTES,'UTF-8')."');\n//End Installed companies-do not change this line", $config_php); + if (!$fp = fopen($ConfigFile, 'wb')) { + prnMsg(_("Cannot open the configuration file: ").$ConfigFile.". Please add the following line to the end of the file:\n\$CompanyList[] = array('database'=>'".$_POST['NewDatabase']."' ,'company'=>'".htmlspecialchars($_POST['NewCompany'],ENT_QUOTES,'UTF-8').");",'error'); + } else { + fwrite ($fp, $config_php); + fclose ($fp); + } + } + + $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/EDI__Sent' WHERE confname='EDI_MsgSent'"; $result = DB_query($SQL,$db); - $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewCompany'] . "/EDI_Incoming_Orders' WHERE confname='EDI_Incoming_Orders'"; + $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/EDI_Incoming_Orders' WHERE confname='EDI_Incoming_Orders'"; $result = DB_query($SQL,$db); - $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewCompany'] . "/part_pics' WHERE confname='part_pics_dir'"; + $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/part_pics' WHERE confname='part_pics_dir'"; $result = DB_query($SQL,$db); - $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewCompany'] . "/reports' WHERE confname='reports_dir'"; + $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/reports' WHERE confname='reports_dir'"; $result = DB_query($SQL,$db); - $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewCompany'] . "/EDI_Pending' WHERE confname='EDI_MsgPending'"; + $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/EDI_Pending' WHERE confname='EDI_MsgPending'"; $result = DB_query($SQL,$db); + //add new company + $SQL = "UPDATE companies SET coyname='".$_POST['NewCompany']."' where coycode = 1"; + $result = DB_query($SQL,$db); $ForceConfigReload=true; include('includes/GetConfig.php'); + prnMsg (_('The new company database has been created for' . ' ' . $_POST['NewCompany'] . '. ' . _('The company details and parameters should now be set up for the new company. NB: Only a single user "demo" is defined with the password "weberp" in the new company database. A new system administrator user should be defined for the new company and this account deleted immediately.')), 'info'); echo '<p><a href="' . $RootPath . '/CompanyPreferences.php">' . _('Set Up New Company Details') . '</a>'; @@ -214,9 +229,11 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table><tr>'; -echo '<td>' . _('Enter up to 32 character lower case character abbreviation for the company') . '</td> +echo '<td>' . _('Enter the name of the database used for the comopany up to 32 characters in lower case') . ':</td> + <td><input type="text" size="33" maxlength="32" name="NewDatabase" /></td> + </tr> + <td>' . _('Enter a unique name for the company of up to 50 characters') . ':</td> <td><input type="text" size="33" maxlength="32" name="NewCompany" /></td> - </tr> <tr> <td>'. _('Logo Image File (.jpg)') . ':</td><td><input type="file" id="LogoFile" name="LogoFile" /></td> </tr> Modified: trunk/config.distrib.php =================================================================== --- trunk/config.distrib.php 2013-08-03 01:06:12 UTC (rev 6169) +++ trunk/config.distrib.php 2013-08-03 09:09:45 UTC (rev 6170) @@ -5,7 +5,7 @@ // User configurable variables //--------------------------------------------------- -//DefaultLanguage to use for the login screen and the setup of new users +//DefaultLanguage to use for the login screen and the setup of new users //The users' language selection will override $DefaultLanguage ='en_GB.utf8'; @@ -45,7 +45,7 @@ // depending if you allow the user to select the name of the company or must use the default one described at $DefaultCompany // If set to 'ShowSelectionBox' webERP examines each of the directories under the companies directory to determine all the companies that can be logged into // a new company directory together with the necessary subdirectories is created each time a new company is created by Z_MakeNewCompany.php -// It would also be inappropiate in some environments to show the name of the company (database name) --> Choose 'Hide'. +// It would also be inappropiate in some environments to show the name of the company (database name) --> Choose 'Hide'. // Options: // 'ShowSelectionBox' (default) // 'ShowInputBox' @@ -53,9 +53,9 @@ $AllowCompanySelectionBox = 'ShowSelectionBox'; -//If $AllowCompanySelectionBox is not 'ShowSelectionBox' above then the $DefaultCompany string is entered in the login screen as a default -//otherwise the user is expected to know the name of the company to log into. -$DefaultCompany = 'weberpdemo'; +//If $AllowCompanySelectionBox is not 'ShowSelectionBox' above then the $DefaultDatabase string is used to determined the default Company +//entered in the login screen as a default, otherwise the user is expected to know the name of the company to log into. +$DefaultDatabase = 'weberpdemo'; //The maximum time that a login session can be idle before automatic logout //time is in seconds 3600 seconds in an hour @@ -85,7 +85,7 @@ //The $RootPath is used in most scripts to tell the script the installation details of the files. //NOTE: In some windows installation this command doesn't work and the administrator must set this to the path of the installation manually: -//eg. if the files are under the webserver root directory then rootpath =''; +//eg. if the files are under the webserver root directory then rootpath =''; //if they are under webERP then webERP is the rootpath - notice no additional slashes are necessary. $RootPath = dirname(htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8')); Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2013-08-03 01:06:12 UTC (rev 6169) +++ trunk/includes/ConnectDB.inc 2013-08-03 09:09:45 UTC (rev 6170) @@ -7,22 +7,41 @@ $Version='4.11.0'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); - if (!isset($_SESSION['DatabaseName'])){ //need to get the database name from the file structure if (isset($_POST['CompanyNameField'])){ - if (ContainsIllegalCharacters($_POST['CompanyNameField'])){ - prnMsg(_('The company database being logged into cannot contain any of the illegal characters'),'error'); - echo '<br /><a href="index.php">' . _('Back to login page') . '</a>'; - exit; - } - if (is_dir('companies/' . $_POST['CompanyNameField']) AND $_POST['CompanyNameField'] != '..'){ - $_SESSION['DatabaseName'] = $_POST['CompanyNameField']; - include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); - } else { - prnMsg(_('The company name entered' . ' (' . $_POST['CompanyNameField'] . ') ' . 'is not configured for use with this installation of webERP. Check that a directory named ' . $_POST['CompanyNameField'] . ' is set up under the companies sub-directory.'),'error'); - prnMsg(_('Check the company name entered' . ' (' . $_POST['CompanyNameField'] . ') ' . 'is the same as the database name.'),'error'); - prnMsg(_('The company name abbreviation entered at login must also have a company directory defined. See your system administrator'),'error'); - } + if (isset($CompanyList) && is_array($CompanyList)) { + foreach ($CompanyList as $key => $CompanyEntry){ + if (is_dir('./companies/'.strtolower($CompanyEntry['database']).'') && ($key == $_POST['CompanyNameField']) ){ + $_SESSION['DatabaseName'] = $CompanyEntry['database']; + include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); + break; + } + } + if (!isset($_SESSION['DatabaseName'])) { + prnMsg(_('You do not seem to have a database configured correctly to use with webERP. Check you database exists and there is a corresponding directory in the \'companies\' directory of the same name. Contact your system administrator for assistance.'),'error'); + exit; + } + if (ContainsIllegalCharacters( $_SESSION['DatabaseName'])){ + prnMsg(_('The company database being logged into cannot contain any of the illegal characters'),'error'); + echo '<br /><a href="index.php">' . _('Back to login page') . '</a>'; + exit; + } + } else { //provision for old setup + if (ContainsIllegalCharacters($_POST['CompanyNameField'])){ + prnMsg(_('The company database being logged into cannot contain any of the illegal characters'),'error'); + echo '<br /><a href="index.php">' . _('Back to login page') . '</a>'; + exit; + } + if (is_dir('companies/' . $_POST['CompanyNameField']) AND $_POST['CompanyNameField'] != '..'){ + $_SESSION['DatabaseName'] = $_POST['CompanyNameField']; + include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); + } else { + prnMsg(_('The company name entered' . ' (' . $_POST['CompanyNameField'] . ') ' . 'is not configured for use with this installation of webERP. Check that a directory named ' . $_POST['CompanyNameField'] . ' is set up under the companies sub-directory.'),'error'); + prnMsg(_('Check the company name entered' . ' (' . $_POST['CompanyNameField'] . ') ' . 'is the same as the database name.'),'error'); + prnMsg(_('The company name abbreviation entered at login must also have a company directory defined. See your system administrator'),'error'); + } + } + } elseif (isset($DatabaseName)) { /* Scripts that do not require a login must have the $DatabaseName variable set in hard code */ $_SESSION['DatabaseName'] = $DatabaseName; include_once ($PathPrefix . 'includes/ConnectDB_' . $DBType . '.inc'); @@ -31,4 +50,4 @@ include_once($PathPrefix .'includes/ConnectDB_' . $DBType . '.inc'); } -?> +?> \ No newline at end of file Modified: trunk/includes/Login.php =================================================================== --- trunk/includes/Login.php 2013-08-03 01:06:12 UTC (rev 6169) +++ trunk/includes/Login.php 2013-08-03 09:09:45 UTC (rev 6170) @@ -27,6 +27,7 @@ echo _('Your webserver is configured to enable Magic Quotes. This may cause problems if you use punctuation (such as quotes) when doing data entry. You should contact your webmaster to disable Magic Quotes'); echo '</p>'; } + ?> <div id="container"> @@ -47,16 +48,28 @@ // Show selection box ($AllowCompanySelectionBox == 'ShowSelectionBox') echo _('Company'); echo '<select name="CompanyNameField">'; - $Companies = scandir('companies/', 0); - foreach ($Companies as $CompanyEntry){ + if (isset($CompanyList) && is_array($CompanyList)) { + foreach ($CompanyList as $key => $CompanyEntry){ + if (is_dir('companies/' . $CompanyEntry['database']) ){ + if ($CompanyEntry['database'] == $DefaultDatabase) { + echo '<option selected="selected" label="'.$CompanyEntry['company'].'" value="'.$key.'">'.$CompanyEntry['company'].'</option>'; + } else { + echo '<option label="'.$CompanyEntry['company'].'" value="'.$key.'">'.$CompanyEntry['company'].'</option>'; + } + } + } + } else { //provision for backward compat + $Companies = scandir('companies/', 0); + foreach ($Companies as $CompanyEntry){ if (is_dir('companies/' . $CompanyEntry) AND $CompanyEntry != '..' AND $CompanyEntry != '' AND $CompanyEntry!='.svn' AND $CompanyEntry!='.'){ - if ($CompanyEntry==$DefaultCompany) { + if ($CompanyEntry==$DefaultDatabase) { echo '<option selected="selected" label="'.$CompanyEntry.'" value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; } else { echo '<option label="'.$CompanyEntry.'" value="'.$CompanyEntry.'">'.$CompanyEntry.'</option>'; } } } + } echo '</select>'; } ?> Modified: trunk/install/index.php =================================================================== --- trunk/install/index.php 2013-08-03 01:06:12 UTC (rev 6169) +++ trunk/install/index.php 2013-08-03 09:09:45 UTC (rev 6170) @@ -148,7 +148,6 @@ prnMsg(_('It seems that the system has been already installed. If you want to install again, please remove the config.php file first'),'error'); exit; } - if(isset($_POST['Install'])){//confirm the final install data, the last validation step before we submit the data //first do necessary validation //Since user may have changed the DatabaseName so we need check it again @@ -158,12 +157,29 @@ //The mysql database name cannot contains illegal characters such as "/","\","." etc //and it should not contains illegal characters as file name such as "?""%"<"">"" " etc - if(preg_match(',[/\\\?%:\|<>\.\s"]+,',$_POST['CompanyName'])){ + if(!preg_match(',[a-zA-Z0-9_\&\-\ ]*,',$_POST['CompanyName'])){ $InputError = 1; + prnMsg(_('The Company names can only contain alphanumeric characters plus -,_, & and spaces'),'error'); + + } + $CompanyName= $_POST['CompanyName']; + }else{ + $InputError = 1; + prnMsg(_('The Company Name name should not be empty'),'error'); + } + //provision for differing database post inputs - need to review and make these consistent + if ( (isset($_POST['DatabaseName']) && !empty($_POST['DatabaseName'])) && (!isset($_POST['Database']) || empty($_POST['Database']))) $_POST['Database'] = $_POST['DatabaseName']; + if(!empty($_POST['Database'])){ + //validate the Database name setting + //The mysql database name cannot contains illegal characters such as "/","\","." etc + //and it should not contains illegal characters as file name such as "?""%"<"">"" " etc + + if(!preg_match(',[a-zA-Z0-9_\&\-\ ]*,',$_POST['Database'])){ + $InputError = 1; prnMsg(_('The database name should not contains illegal characters such as "/\?%:|<>" blank etc'),'error'); } - $DatabaseName = $_POST['CompanyName']; + $DatabaseName = $_POST['Database']; }else{ $InputError = 1; prnMsg(_('The database name should not be empty'),'error'); @@ -176,8 +192,11 @@ prnMsg(_('The timezone must be legal'),'error'); } } + $OnlyDemo = 0; + $DualCompany = 0; + $NewCompany = 0; if(!empty($_POST['Demo']) and $_POST['Demo'] == 'on'){ - if(strtolower($DatabaseName) == 'weberpdemo'){//user select to install the weberpdemo + if(strtolower($DatabaseName) === 'weberpdemo'){//user select to install the weberpdemo $OnlyDemo = 1; }else{ @@ -278,6 +297,7 @@ }else{ //start to installation + $CompanyList = array(); $Path_To_Root = '..'; $Config_File = $Path_To_Root . '/config.php'; if((isset($DualCompany) and $DualCompany == 1) or (isset($NewCompany) and $NewCompany == 1)){ @@ -302,6 +322,16 @@ $Result = copy ($Path_To_Root . '/logo_server.jpg',$CompanyDir.'/logo.jpg'); } } + if ( isset($NewCompany) and ($NewCompany == 1)) { + $CompanyList[] = array('database' => $DatabaseName, 'company' => $CompanyName); + } elseif (isset($DualCompany) and $DualCompany == 1) { + $CompanyList[] = array('database' => $DatabaseName, 'company' => $CompanyName); + $CompanyList[] = array('database' => 'weberpdemo', 'company' => _('WebERP Demo Company')); + } else { + //make sure we have at least the demo + $CompanyList[] = array('database' => 'weberpdemo', 'company' => _('WebERP Demo Company')); + } + //$msg holds the text of the new config.php file $msg = "<?php\n\n"; $msg .= "// User configurable variables\n"; @@ -328,9 +358,9 @@ $msg .= "\$SysAdminEmail = '".$AdminEmail."';\n"; } if(isset($NewCompany)){ - $msg .= "\$DefaultCompany = '".$DatabaseName."';\n"; + $msg .= "\$DefaultDatabase = '".$DatabaseName."';\n"; }else{ - $msg .= "\$DefaultCompany = '".$DatabaseName."';\n"; + $msg .= "\$DefaultDatabase = 'weberpdemo';\n"; } $msg .= "\$SessionLifeTime = 3600;\n"; $msg .= "\$MaximumExecutionTime = 120;\n"; @@ -347,6 +377,13 @@ $msg .= " \$RootPath = '';\n"; $msg .= "}\n"; $msg .= "error_reporting (E_ALL & ~E_NOTICE);\n"; + $msg .= "//Installed companies \n"; + foreach ($CompanyList as $k=>$compinfo) + { + $msg .= "\$CompanyList[".$k."] = array('database'=>'".$compinfo['database']."' ,'company'=>'".htmlspecialchars($compinfo['company'],ENT_QUOTES,'UTF-8')."' );\n"; //simpler to manipulate this way + } + $msg .= "//End Installed companies-do not change this line\n"; + $msg .= "//Make sure there is nothing - not even spaces after this last ?>\n"; $msg .= "?>"; //write the config.php file since we have test the writability of the root path and companies, @@ -371,12 +408,10 @@ } }elseif($DBConnectType == 'mysql'){ $Db = mysql_connect($HostName,$UserName,$Password); - - - if(!$Db){ - prnMsg(_('Failed to connect the database, the error is ').mysql_connect_error(),'error'); + if(!$Db){ + prnMsg(_('Failed to connect the database, the error is ').mysql_connect_error(),'error'); + } } - } $NewSQLFile = $Path_To_Root.'/sql/mysql/coa/'.$COA; $DemoSQLFile = $Path_To_Root.'/sql/mysql/coa/weberp-demo.sql'; if(!empty($DualCompany) and $DualCompany == 1){ @@ -385,9 +420,9 @@ $result = ($DBConnectType == 'mysqli') ? mysqli_query($Db,$sql) : mysql_query($sql,$Db); if(!$result){ if($DBConnectType == 'mysqli'){ - prnMsg(_('Failed to create database '.' '.$DatabaseName.' and the error is '.' '.mysqli_error($Db)),'error'); + prnMsg(_('Failed to create database '.$DatabaseName.' and the error is '.' '.mysqli_error($Db)),'error'); }else{ - prnMsg(_('Failed to create database '.' '.$DatabaseName.' and the error is '.' '.mysql_error($Db)),'error'); + prnMsg(_('Failed to create database '.$DatabaseName.' and the error is '.' '.mysql_error($Db)),'error'); } } @@ -404,7 +439,7 @@ } PopulateSQLData($NewSQLFile,false,$Db,$DBConnectType,$DatabaseName); - DBUpdate($Db,$DatabaseName,$DBConnectType,$AdminPassword,$Email,$UserLanguage,$DatabaseName); + DBUpdate($Db,$DatabaseName,$DBConnectType,$AdminPassword,$Email,$UserLanguage,$CompanyName); PopulateSQLData(false,$DemoSQLFile,$Db,$DBConnectType,'weberpdemo'); DBUpdate($Db,'weberpdemo',$DBConnectType,$AdminPassword,$Email,$UserLanguage,'weberpdemo'); @@ -414,18 +449,18 @@ $result = ($DBConnectType == 'mysqli')? mysqli_query($Db,$sql) : mysql_query($sql,$Db); if(!$result){ if($DBConnectType == 'mysqli'){ - prnMsg(_('Failed to create database weberpdemo and the error is '.' '.mysqli_error($Db)),'error'); + prnMsg(_('Failed to create database '.$DatabaseName.' and the error is '.' '.mysqli_error($Db)),'error'); }else{ - prnMsg(_('Failed to create database weberpdemo and the error is '.' '.mysql_error($Db)),'error'); + prnMsg(_('Failed to create database '.$DatabaseName.' and the error is '.' '.mysql_error($Db)),'error'); } } PopulateSQLData($NewSQLFile,false,$Db,$DBConnectType,$DatabaseName); - DBUpdate($Db,$DatabaseName,$DBConnectType,$AdminPassword,$Email,$UserLanguage,$DatabaseName); + DBUpdate($Db,$DatabaseName,$DBConnectType,$AdminPassword,$Email,$UserLanguage,$CompanyName); - }elseif(!empty($OnlyDemo) and $OnlyDemo == 1){//only install the demo data + }else { //if(!empty($OnlyDemo) and $OnlyDemo == 1){//only install the demo data $sql = 'CREATE DATABASE IF NOT EXISTS `weberpdemo`'; $result = ($DBConnectType == 'mysqli') ? mysqli_query($Db,$sql) : mysql_query($sql,$Db); if(!$result){ @@ -967,7 +1002,6 @@ //@para $MysqlEx is refer to the php mysql extention if it's false, it means the php configuration only support mysql instead of mysqli //The purpose of this function is to display the final screen for users to input company, admin user accounts etc informatioin function CompanySetup($UserLanguage,$HostName,$UserName,$Password,$DatabaseName,$MysqlExt = FALSE){//display the company setup for users - ?> <h1><?php echo _('webERP Installation Wizard'); ?></h1> <!--<p style="text-align:center;"><?php echo _("Please enter the company name and please pay attention the company will be as same as the database name"); ?></p>--> @@ -980,8 +1014,8 @@ <ul> <li> <label for="CompanyName"><?php echo _("Company Name"); ?>: </label> - <input type="text" name="CompanyName" required="true" value="<?php echo $DatabaseName; ?>" maxlength="50" /> - <span><?php echo _('Currently, must be the same as the database name'); ?></span> + <input type="text" name="CompanyName" required="true" pattern="[a-zA-Z0-9_\'\&\-\ ]*" value="<?php echo $CompanyName; ?>" maxlength="50" /> + <span><?php echo _('The name of your company'); ?></span> </li> <li> <label for="COA"><?php echo _("Chart of Accounts"); ?>: </label> @@ -1002,7 +1036,7 @@ } ?> </select> - <span><?php echo _('Will be installed as starter Chart of Accounts'); ?> </span> + <span><?php echo _('A starter Chart of Accounts (use weberp-new.sql if having empty db problems)'); ?> </span> </li> <li> <label for="TimeZone"><?php echo _("Time Zone"); ?>: </label> @@ -1059,7 +1093,7 @@ </fieldset> <input type="hidden" name="HostName" value="<?php echo $HostName; ?>" /> <input type="hidden" name="UserName" value="<?php echo $UserName; ?>" /> - + <input type="hidden" name="DatabaseName" value="<?php echo $DatabaseName; ?>" /> <input type="hidden" name="Password" value="<?php echo $Password; ?>" /> <input type="hidden" name="MysqlExt" value="<?php echo $MysqlExt; ?>" /> <input type="hidden" name="UserLanguage" value="<?php echo $UserLanguage; ?>" /> |
From: <ice...@us...> - 2013-08-03 10:46:17
|
Revision: 6171 http://sourceforge.net/p/web-erp/reponame/6171 Author: icedlava Date: 2013-08-03 10:46:15 +0000 (Sat, 03 Aug 2013) Log Message: ----------- Need to ensure we have entity decoded data without slashes to start with, then addslashes for PHP, and htmlentities for output display. Post var have been preprocessed - need to clean them. Modified Paths: -------------- trunk/Z_MakeNewCompany.php trunk/includes/Login.php trunk/install/index.php Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2013-08-03 09:09:45 UTC (rev 6170) +++ trunk/Z_MakeNewCompany.php 2013-08-03 10:46:15 UTC (rev 6171) @@ -30,7 +30,6 @@ OR ContainsIllegalCharacters($_POST['NewDatabase'])){ prnMsg(_('Company database must not contain spaces, \& or " or \''),'error'); } else { - $_POST['NewDatabase'] = strtolower($_POST['NewDatabase']); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?' . SID . '">'; echo '<div class="centre">'; @@ -165,19 +164,14 @@ exit; } - $_SESSION['DatabaseName'] = $_POST['NewDatabase']; - unset ($_SESSION['CustomerID']); - unset ($_SESSION['SupplierID']); - unset ($_SESSION['StockID']); - unset ($_SESSION['Items']); - unset ($_SESSION['CreditItems']); - //now update the config.php file if using the obfuscated database login else we don't want it there if (isset($CompanyList) && is_array($CompanyList)) { $ConfigFile = './config.php'; $config_php = join('', file($ConfigFile)); - $config_php = preg_replace('/\/\/End Installed companies-do not change this line/', "\$CompanyList[] = array('database'=>'".$_POST['NewDatabase']."' ,'company'=>'".htmlspecialchars($_POST['NewCompany'],ENT_QUOTES,'UTF-8')."');\n//End Installed companies-do not change this line", $config_php); + //fix the Post var - it is being preprocessed with slashes and entity encoded which we do not want here + $_POST['NewCompany'] = html_entity_decode($_POST['NewCompany'],ENT_QUOTES,'UTF-8'); + $config_php = preg_replace('/\/\/End Installed companies-do not change this line/', "\$CompanyList[] = array('database'=>'".$_POST['NewDatabase']."' ,'company'=>'".$_POST['NewCompany']."');\n//End Installed companies-do not change this line", $config_php); if (!$fp = fopen($ConfigFile, 'wb')) { prnMsg(_("Cannot open the configuration file: ").$ConfigFile.". Please add the following line to the end of the file:\n\$CompanyList[] = array('database'=>'".$_POST['NewDatabase']."' ,'company'=>'".htmlspecialchars($_POST['NewCompany'],ENT_QUOTES,'UTF-8').");",'error'); } else { @@ -186,6 +180,14 @@ } } + $_SESSION['DatabaseName'] = $_POST['NewDatabase']; + + unset ($_SESSION['CustomerID']); + unset ($_SESSION['SupplierID']); + unset ($_SESSION['StockID']); + unset ($_SESSION['Items']); + unset ($_SESSION['CreditItems']); + $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/EDI__Sent' WHERE confname='EDI_MsgSent'"; $result = DB_query($SQL,$db); $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/EDI_Incoming_Orders' WHERE confname='EDI_Incoming_Orders'"; @@ -204,7 +206,7 @@ include('includes/GetConfig.php'); - prnMsg (_('The new company database has been created for' . ' ' . $_POST['NewCompany'] . '. ' . _('The company details and parameters should now be set up for the new company. NB: Only a single user "demo" is defined with the password "weberp" in the new company database. A new system administrator user should be defined for the new company and this account deleted immediately.')), 'info'); + prnMsg (_('The new company database has been created for' . ' ' . htmlspecialchars($_POST['NewCompany'],ENT_QUOTES,'UTF-8') . '. ' . _('The company details and parameters should now be set up for the new company. NB: Only a single user "demo" is defined with the password "weberp" in the new company database. A new system administrator user should be defined for the new company and this account deleted immediately.')), 'info'); echo '<p><a href="' . $RootPath . '/CompanyPreferences.php">' . _('Set Up New Company Details') . '</a>'; echo '<p><a href="' . $RootPath . '/SystemParameters.php">' . _('Set Up Configuration Details') . '</a>'; @@ -229,7 +231,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table><tr>'; -echo '<td>' . _('Enter the name of the database used for the comopany up to 32 characters in lower case') . ':</td> +echo '<td>' . _('Enter the name of the database used for the company up to 32 characters in lower case') . ':</td> <td><input type="text" size="33" maxlength="32" name="NewDatabase" /></td> </tr> <td>' . _('Enter a unique name for the company of up to 50 characters') . ':</td> Modified: trunk/includes/Login.php =================================================================== --- trunk/includes/Login.php 2013-08-03 09:09:45 UTC (rev 6170) +++ trunk/includes/Login.php 2013-08-03 10:46:15 UTC (rev 6171) @@ -52,9 +52,9 @@ foreach ($CompanyList as $key => $CompanyEntry){ if (is_dir('companies/' . $CompanyEntry['database']) ){ if ($CompanyEntry['database'] == $DefaultDatabase) { - echo '<option selected="selected" label="'.$CompanyEntry['company'].'" value="'.$key.'">'.$CompanyEntry['company'].'</option>'; + echo '<option selected="selected" label="'.htmlspecialchars($CompanyEntry['company'],ENT_QUOTES,'UTF-8').'" value="'.$key.'">'.htmlspecialchars($CompanyEntry['company'],ENT_QUOTES,'UTF-8').'</option>'; } else { - echo '<option label="'.$CompanyEntry['company'].'" value="'.$key.'">'.$CompanyEntry['company'].'</option>'; + echo '<option label="'.htmlspecialchars($CompanyEntry['company'],ENT_QUOTES,'UTF-8').'" value="'.$key.'">'.htmlspecialchars($CompanyEntry['company'],ENT_QUOTES,'UTF-8').'</option>'; } } } Modified: trunk/install/index.php =================================================================== --- trunk/install/index.php 2013-08-03 09:09:45 UTC (rev 6170) +++ trunk/install/index.php 2013-08-03 10:46:15 UTC (rev 6171) @@ -380,7 +380,7 @@ $msg .= "//Installed companies \n"; foreach ($CompanyList as $k=>$compinfo) { - $msg .= "\$CompanyList[".$k."] = array('database'=>'".$compinfo['database']."' ,'company'=>'".htmlspecialchars($compinfo['company'],ENT_QUOTES,'UTF-8')."' );\n"; //simpler to manipulate this way + $msg .= "\$CompanyList[".$k."] = array('database'=>'".$compinfo['database']."' ,'company'=>'".addslashes($compinfo['company'])."' );\n"; //simpler to manipulate this way } $msg .= "//End Installed companies-do not change this line\n"; $msg .= "//Make sure there is nothing - not even spaces after this last ?>\n"; |
From: <ice...@us...> - 2013-08-03 15:17:49
|
Revision: 6172 http://sourceforge.net/p/web-erp/reponame/6172 Author: icedlava Date: 2013-08-03 15:17:46 +0000 (Sat, 03 Aug 2013) Log Message: ----------- Update the Manual - Using the webERP Installer - rework of some text to match new installer, and updated screen shots. Modified Paths: -------------- trunk/doc/Change.log trunk/doc/Manual/ManualGettingStarted.html trunk/doc/Manual/images/Installer_1.jpg trunk/doc/Manual/images/Installer_2.jpg trunk/includes/Login.php trunk/install/index.php Added Paths: ----------- trunk/doc/Manual/images/Installer_1a.jpg trunk/doc/Manual/images/Installer_3.jpg Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2013-08-03 10:46:15 UTC (rev 6171) +++ trunk/doc/Change.log 2013-08-03 15:17:46 UTC (rev 6172) @@ -1,21 +1,28 @@ webERP Change Log - +04/8/13 icedlava: Update Manual - Using the webERP Installer - rework of some text due to new installer, and updated screen shots +03/8/13 icedlava: Obfuscate database name in login, do not show company in login if directory/company not wanted. 29/7/13 Serge Gélinas: Profit and loss now has option to show all accounts and by default just shows those with a balance +29/7/13 icedlava: Hard code the page title in Installer html, previously missing - no language strings available at this time - used English +28/7/13 icedlava: Installer - strip inline styles, add html5/css to pretty up, fix small typo/bugs and spelling/grammar. No logic changes. +28/7/13 icedlava: Allow ampersands in company name eg Matthew & Sons Ltd +26/7/13 icedlava: Move Supplier Contact Detail review link to top of page away from Delete button +26/7/13 icedlava: Fix Form Designer xml for GL Journal +26/7/13 icedlava: Fix PO PDF Preview when $result returns Bool in some environments. 25/7/13 Serge Gélinas: Balance sheet now has option to show all accounts and by default just shows those with a balance -24/7/13 Exson: Fixed that empty password should be allowed. Reported by Tim. +24/7/13 Exson: Fixed that empty password should be allowed. Reported by Tim. 24/7/13 Exson: Add the html5 mark for some input fields in WWW_Users.php. 22/7/13 Exson: Fixed the document.form not defined error in GLJournal.php. 22/7/13 Thumb: Fixed the onchange overwritten problem for number class in MiscFunctions.js. Reported by Tim for GLJournal.php lost Credit and Debit mutually exclusive feature. 21/07/13 Exson: allowed the input of numeric format like .5 in MiscFunctions.js rLocalNumber() function. Reported by Tim. -7/21/13 Exson: Fixed the keyChar control to avoid backspace mistake. -7/21/13 Exson: Fixed the number class function in MiscFunctions.js prevent character 0 from input for integer. Reported by Icedlava +7/21/13 Exson: Fixed the keyChar control to avoid backspace mistake. +7/21/13 Exson: Fixed the number class function in MiscFunctions.js prevent character 0 from input for integer. Reported by Icedlava 20/7/13 Phil: Added Tim's javascript as modified a bit to use different styles to allow sorting of tables - images for styles to all themes and added th.ascending th.descending to theme/default.css scripts 19/7/13 Phil: Swag of scripts updated for html5 <input type="tel" "email" pattern required="required" autofocus="autofocus" as per http://www.weberp.org/wiki/TransitionToHtml5 also added many title="" tooltips 19/7/13 Exson: add required to the input field of WWW_Access.php 19/7/13: Exson make the WWW_Access.php html5 compatible 18/7/13: Exson: Move the hidden input after the html document type definition. Reported by Tim. -18/7/13 Exson: fixed the LanguageSetup.php extra language mark introduced by handle locale number. Reported by Tim. -18/7/13: Exson: Fixed the missing negative mark problem reported by Tim. +18/7/13 Exson: fixed the LanguageSetup.php extra language mark introduced by handle locale number. Reported by Tim. +18/7/13: Exson: Fixed the missing negative mark problem reported by Tim. 18/7/13: Exson add a locale style check to pass the style to MisFunctions.js to do locale number format validation in LanguageSetup.php. 18/7/13 Exson: modify the MisFunctions.js to improve the locale number validation feature. 17/7/13 icedlava: stripslashes on Description for consistency with LongDescription but why- only until we fix source of this problem in the code Modified: trunk/doc/Manual/ManualGettingStarted.html =================================================================== --- trunk/doc/Manual/ManualGettingStarted.html 2013-08-03 10:46:15 UTC (rev 6171) +++ trunk/doc/Manual/ManualGettingStarted.html 2013-08-03 15:17:46 UTC (rev 6172) @@ -39,38 +39,49 @@ <h2>Using the webERP Installer</h2> -<p>Assuming that a web server with PHP functionality is operational and a MySQL database server is available either on the same machine or on the network and that the web-server is running under a user that is able to write to the webERP installation directory then a new installation can proceed.</p> +<p>A new installation of webERP requires the following to start:</p> + <ul> + <li>A functioning web server running a minimum of PHP version 5.1</li> + <li>A MySQL database server available either on the same machine or on the network</li> + <li>The web server is running under a user that is able to write to the webERP web directory</li> + <li>The database user must have privileges to create a database and tables</li> + </ul> +<ol> + <li>Copy all of the downloaded webERP files to a directory under the web server's document root directory. At this point there should be no 'config.php' file in the webERP directory.</li> + <li>Enter the URL for the new webERP directory into your web browser, and the installer welcome screen will display:</li> -<ul> - <li>An installation must first copy the scripts to a directory under the web-server's document root directory. Then from a browser enter the URL for the new webERP directory and the installer screen will display:</li> - <li style="list-style: none; display: inline"> <p align="center"><img src="images/Installer_1.jpg"></p> </li> - <li>The installer checks that all the pre-requistes are met for an installation. You will note from the screen shot above that this installation does not have sufficient privileges to install webERP because the web-server is unable to write to the webERP directory. <b>It is first necessary to change the permissions on the directory where webERP is installed to ensure that the user that the web-server runs as is able to write a new configuration file to the web space.</b> Cpanel and Plesk have facilities to enable this change to the permissions. Any messages on this screen displayed in red need to be resolved before the installation can proceed. Do not attempt to run the installer while red messages persist.</li> + <li>The installer welcome screen provides information on the type of messages you might receive during installation. At this page, you must also select your preferred language from the drop down selection box. Click on Next Step to go to the next phase of installation.</li> + <li style="list-style: none; display: inline"> + <p align="center"><img src="images/Installer_1a.jpg"></p> + </li> - <li>Many of the fields required will be populated correctly by default - but all entries should be reviewed to ensure that they are correct. The installer will not be able to determine the host (computer) where the mysql database server is installed and this must be entered.</li> - - <li>The user name and the password to the mysql database server are also required.</li> - + <li>The installer checks that all the pre-requistes are met for an installation. You will note from the screen shot above that this installation does not have sufficient privileges to install webERP because the web server is unable to write to the webERP directory. <b>It is necessary to change the permissions on the directory where webERP is installed to ensure that the user that the web-server runs as is able to write a new configuration file to the web space.</b> Cpanel and Plesk have facilities to enable this change to the permissions. Any error messages displayed in red need to be resolved before the installation can proceed. Do not attempt to run the installer while red messages persist. Fix the error and then click on Check Again to restart from the prior step.</li> <li style="list-style: none; display: inline"> <p align="center"><img src="images/Installer_2.jpg"></p> </li> + <li>If your web server fulfills all requirements for the installation, clicking on Next Step will display the Database Settings screen. Many of the fields required will be populated correctly by default - but all entries should be reviewed to ensure that they are correct. The installer will not be able to determine the host (computer) where the mysql database server is installed and this must be entered. Help appears when you click into an input field.</li> - <li>The name of the company entered in the installer screen will become the name of the mysql database created. Perhaps an abbreviated name for the company without spaces is ideal. weberpdemo is the name of the weberpdemo database and that is a good place to test webERP functionality. You should change this to the name of your company in a live enviroment.</li> + <li>The user name and the password to the mysql database server are also required. The mysql database user must have permission to create a database and tables. Once the required information is entered and checked, click on Next Screen to continue.</li> - <li>It is possible to install the demo database rather than the new empty database to use for a new installation by clicking the check box.</li> + <li style="list-style: none; display: inline"> + <p align="center"><img src="images/Installer_3.jpg"></p> + </li> + <li>The next installer screen displays Company Settings, Options and Administrator Account settings. The name of the company entered in the installer screen will be used in the log in screen and in various reports and screens in your final webERP instsallation.</li> + <li>The Chart of Accounts will be loaded into your webERP installation as a set of starter accounts. T There is a larger file but this may result in errors as your mysql server must be able to handle larger packet sizes. Leave the default selection of 'weberp-new.sql' if in any doubt as it is smaller and should load with default mysql settings.</li> + <li>The logo for the business used on invoices and statments, orders etc. can be uploaded to the appropriate place on the web-server by selecting it on the installer screen. The logo should be a .jpg file and just a small image no more than 170 px accross and 80 pixels high.</li> <li>The time-zone is important if your installation is to display the correct time on the local browsers in the country where the business is domiciled. e.g. it is possible to use a US web-server, and operate the business from France. If no entry was entered for the time-zone then the browser would display the time where the web-server was (in the USA) but it is more appropriate to display the time where the business operates from. It is possible to select from any of the PHP defined time-zones.</li> + <li>The Installation Option section enables you to choose to install the demo database in addition to your own Company database. This will provide you with a demo company loaded with some data to test with.</li> - <li>The logo for the business used on invoices and statments, orders etc. can be uploaded to the appropriate place on the web-server by selecting it on the installer screen. The logo should be a .jpg file and just a small image no more than 170 px accross and 80 pixels high.</li> + <li>Finally the webERP user Administrator account option section enables you to input an email address and choose a new password for the default 'admin' account.</li> - <li>Finally the webERP user "admin" is created, and the password for this user needs to be defined from entries on the installer screen. It is also possible to specify your email address which is stored in the database.</li> -</ul> +<li>Click on the INSTALL button to finalise installation. This might take a while as the installer will create required databases, create a special directory for your webERP install in the 'companies' directory, and writes out the webERP configuration file, config.php. Wait until the login screen appears. You now have a fresh webERP installation from which to start the configuration of the company, see below.</li> +<p> </p> -<p>Hitting the install webERP button will then create the database for the company with the user admin given the password details and provide a fresh webERP installation from which to start the configuration of the company, see below.</p> - <div class="floatright"> <a class="minitext" href="#top">⬆ Top</a> </div> Modified: trunk/doc/Manual/images/Installer_1.jpg =================================================================== (Binary files differ) Added: trunk/doc/Manual/images/Installer_1a.jpg =================================================================== (Binary files differ) Index: trunk/doc/Manual/images/Installer_1a.jpg =================================================================== --- trunk/doc/Manual/images/Installer_1a.jpg 2013-08-03 10:46:15 UTC (rev 6171) +++ trunk/doc/Manual/images/Installer_1a.jpg 2013-08-03 15:17:46 UTC (rev 6172) Property changes on: trunk/doc/Manual/images/Installer_1a.jpg ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/doc/Manual/images/Installer_2.jpg =================================================================== (Binary files differ) Added: trunk/doc/Manual/images/Installer_3.jpg =================================================================== (Binary files differ) Index: trunk/doc/Manual/images/Installer_3.jpg =================================================================== --- trunk/doc/Manual/images/Installer_3.jpg 2013-08-03 10:46:15 UTC (rev 6171) +++ trunk/doc/Manual/images/Installer_3.jpg 2013-08-03 15:17:46 UTC (rev 6172) Property changes on: trunk/doc/Manual/images/Installer_3.jpg ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/includes/Login.php =================================================================== --- trunk/includes/Login.php 2013-08-03 10:46:15 UTC (rev 6171) +++ trunk/includes/Login.php 2013-08-03 15:17:46 UTC (rev 6172) @@ -46,7 +46,7 @@ echo _('Company') . '<input type="text" name="CompanyNameField" autofocus="autofocus" required="required" value="' . $DefaultCompany . '" />'; } else { // Show selection box ($AllowCompanySelectionBox == 'ShowSelectionBox') - echo _('Company'); + echo _('Company:').'<br />'; echo '<select name="CompanyNameField">'; if (isset($CompanyList) && is_array($CompanyList)) { foreach ($CompanyList as $key => $CompanyEntry){ Modified: trunk/install/index.php =================================================================== --- trunk/install/index.php 2013-08-03 10:46:15 UTC (rev 6171) +++ trunk/install/index.php 2013-08-03 15:17:46 UTC (rev 6172) @@ -129,6 +129,10 @@ $Language = 'en_US.utf8'; $DefaultLanguage = 'en_US.utf8'; } + //This is the first step - let us initialise some variables (esp. important if installer is rerun) + $DatabaseName = ''; + $DefaultDatabase = ''; + }else{ $Language = $_POST['Language']; @@ -454,8 +458,6 @@ prnMsg(_('Failed to create database '.$DatabaseName.' and the error is '.' '.mysql_error($Db)),'error'); } - - } PopulateSQLData($NewSQLFile,false,$Db,$DBConnectType,$DatabaseName); DBUpdate($Db,$DatabaseName,$DBConnectType,$AdminPassword,$Email,$UserLanguage,$CompanyName); @@ -471,7 +473,6 @@ } - } PopulateSQLData(false,$DemoSQLFile,$Db,$DBConnectType,'weberpdemo'); DBUpdate($Db,'weberpdemo',$DBConnectType,$AdminPassword,$Email,$UserLanguage,'weberpdemo'); @@ -896,7 +897,7 @@ <legend><?php echo _('Database settings'); ?></legend> <div class="page_help_text"> <p> - <?php echo _('Please enter your MySQL Database information below. The database name is also used at log in time to choose the company for use.'); ?><br /> + <?php echo _('Please enter your MySQL Database information below.'); ?><br /> <span><?php echo _('* Denotes required field'); ?></span> </p> </div> @@ -919,7 +920,7 @@ <li> <label for="UserName"><?php echo _('Database User Name'); ?>: </label> <input type="text" name="UserName" id="UserName" value="root" placeholder="<?php echo _('A valid database user name'); ?>" maxlength="16" required="true" />  - <span><?php echo _('Must be a user that has permission to create a database.'); ?></span> + <span><?php echo _('Must be a user that has permission to create a database'); ?></span> </li> <li> <label for="Password"><?php echo _('Password'); ?>: </label> |
From: <rc...@us...> - 2013-08-10 18:23:55
|
Revision: 6187 http://sourceforge.net/p/web-erp/reponame/6187 Author: rchacon Date: 2013-08-10 18:23:52 +0000 (Sat, 10 Aug 2013) Log Message: ----------- Minor changes: Exchanging the order of Purchases and Payables. Clean-up spaces. Changed caption to "Sales Order Inquiry". Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2013-08-10 01:37:27 UTC (rev 6186) +++ trunk/includes/MainMenuLinksArray.php 2013-08-10 18:23:52 UTC (rev 6187) @@ -1,9 +1,13 @@ <?php -$ModuleLink = array('orders', 'AR', 'AP', 'PO', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'Utilities'); + +/* $Id: MainMenuLinksArray.php 5982 2013-05-23 04:22:02Z tehonu $*/ +// webERP menus. + +$ModuleLink = array('orders', 'AR', 'PO', 'AP', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'Utilities'); $ReportList = array('orders'=>'ord', 'AR'=>'ar', + 'PO'=>'prch', 'AP'=>'ap', - 'PO'=>'prch', 'stock'=>'inv', 'manuf'=>'man', 'GL'=>'gl', @@ -16,8 +20,8 @@ /*The headings showing on the tabs accross the main index used also in WWW_Users for defining what should be visible to the user */ $ModuleList = array(_('Sales'), _('Receivables'), + _('Purchases'), _('Payables'), - _('Purchases'), _('Inventory'), _('Manufacturing'), _('General Ledger'), @@ -44,7 +48,7 @@ '/SelectRecurringSalesOrder.php', '/RecurringSalesOrdersProcess.php'); -$MenuItems['orders']['Reports']['Caption'] = array( _('Order Inquiry'), +$MenuItems['orders']['Reports']['Caption'] = array( _('Sales Order Inquiry'), _('Print Price Lists'), _('Order Status Report'), _('Orders Invoiced Reports'), @@ -82,16 +86,16 @@ $MenuItems['orders']['Maintenance']['URL'] = array( '/SelectContract.php', '/Contracts.php', - '/SellThroughSupport.php' ); + '/SellThroughSupport.php'); $MenuItems['AR']['Transactions']['Caption'] = array (_('Select Order to Invoice'), _('Create A Credit Note'), _('Enter Receipts'), - _('Allocate Receipts or Credit Notes') ); + _('Allocate Receipts or Credit Notes')); $MenuItems['AR']['Transactions']['URL'] = array ('/SelectSalesOrder.php', '/SelectCreditItems.php?NewCredit=Yes', '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', - '/CustomerAllocations.php' ); + '/CustomerAllocations.php'); $MenuItems['AR']['Reports']['Caption'] = array (_('Where Allocated Inquiry'), _('Print Invoices or Credit Notes'), @@ -121,17 +125,17 @@ '/PDFCustomerList.php', '/SalesGraph.php', '/PDFCustTransListing.php', - '/CustomerTransInquiry.php' ); + '/CustomerTransInquiry.php'); $MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'), - _('Select Customer') ); + _('Select Customer')); $MenuItems['AR']['Maintenance']['URL'] = array ('/Customers.php', - '/SelectCustomer.php' ); + '/SelectCustomer.php'); $MenuItems['AP']['Transactions']['Caption'] = array (_('Select Supplier'), - _('Supplier Allocations') ); + _('Supplier Allocations')); $MenuItems['AP']['Transactions']['URL'] = array ('/SelectSupplier.php', - '/SupplierAllocations.php' ); + '/SupplierAllocations.php'); $MenuItems['AP']['Reports']['Caption'] = array (_('Aged Supplier Report'), _('Payment Run Report'), @@ -139,7 +143,7 @@ _('Outstanding GRNs Report'), _('Supplier Balances At A Prior Month End'), _('List Daily Transactions'), - _('Supplier Transaction Inquiries') ); + _('Supplier Transaction Inquiries')); $MenuItems['AP']['Reports']['URL'] = array ('/AgedSuppliers.php', '/SuppPaymentRun.php', @@ -151,10 +155,10 @@ $MenuItems['AP']['Maintenance']['Caption'] = array (_('Add Supplier'), _('Select Supplier'), - _('Maintain Factor Companies') ); + _('Maintain Factor Companies')); $MenuItems['AP']['Maintenance']['URL'] = array ('/Suppliers.php', '/SelectSupplier.php', - '/Factors.php' ); + '/Factors.php'); $MenuItems['PO']['Transactions']['Caption'] = array (_('Purchase Orders'), _('Add Purchase Order'), @@ -163,7 +167,7 @@ _('Process Tenders and Offers'), _('Orders to Authorise'), _('Shipment Entry'), - _('Select A Shipment') ); + _('Select A Shipment')); $MenuItems['PO']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', '/PO_Header.php?NewOrder=Yes', '/SupplierTenderCreate.php?New=Yes', @@ -171,17 +175,17 @@ '/OffersReceived.php', '/PO_AuthoriseMyOrders.php', '/SelectSupplier.php', - '/Shipt_Select.php' ); + '/Shipt_Select.php'); $MenuItems['PO']['Reports']['Caption'] = array (_('Purchase Order Inquiry'), _('Purchase Order Detail Or Summary Inquiries'), - _('Supplier Price List') ); + _('Supplier Price List')); $MenuItems['PO']['Reports']['URL'] = array ('/PO_SelectPurchOrder.php', '/POReport.php', - '/SuppPriceList.php' ); + '/SuppPriceList.php'); -$MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists') ); +$MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists')); $MenuItems['PO']['Maintenance']['URL'] = array ('/SupplierPriceList.php'); @@ -194,7 +198,7 @@ _('Enter Stock Counts'), _('Create a New Internal Stock Request'), _('Authorise Internal Stock Requests'), - _('Fulfill Internal Stock Requests') ); + _('Fulfill Internal Stock Requests')); $MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', '/StockLocTransfer.php', @@ -205,7 +209,7 @@ '/StockCounts.php', '/InternalStockRequest.php?New=Yes', '/InternalStockRequestAuthorisation.php', - '/InternalStockRequestFulfill.php' ); + '/InternalStockRequestFulfill.php'); $MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), _('Print Price Labels'), @@ -228,7 +232,7 @@ _('Historical Stock Quantity By Location/Category'), _('List Negative Stocks'), _('Period Stock Transaction Listing'), - _('Stock Transfer Note') ); + _('Stock Transfer Note')); $MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', '/PDFPrintLabel.php', @@ -251,7 +255,7 @@ '/StockQuantityByDate.php', '/PDFStockNegatives.php', '/PDFPeriodStockTransListing.php', - '/PDFStockTransfer.php' ); + '/PDFStockTransfer.php'); $MenuItems['stock']['Maintenance']['Caption'] = array (_('Add A New Item'), _('Select An Item'), @@ -259,7 +263,7 @@ _('Brands Maintenance'), _('Add or Update Prices Based On Costs'), _('View or Update Prices Based On Costs'), - _('Reorder Level By Category/Location') ); + _('Reorder Level By Category/Location')); $MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', '/SelectProduct.php', @@ -267,13 +271,13 @@ '/Manufacturers.php', '/PricesBasedOnMarkUp.php', '/PricesByCost.php', - '/ReorderLevelLocation.php' ); + '/ReorderLevelLocation.php'); $MenuItems['manuf']['Transactions']['Caption'] = array (_('Work Order Entry'), - _('Select A Work Order') ); + _('Select A Work Order')); $MenuItems['manuf']['Transactions']['URL'] = array ('/WorkOrderEntry.php', - '/SelectWorkOrder.php' ); + '/SelectWorkOrder.php'); $MenuItems['manuf']['Reports']['Caption'] = array (_('Select A Work Order'), _('Costed Bill Of Material Inquiry'), @@ -287,7 +291,7 @@ _('MRP Shortages'), _('MRP Suggested Purchase Orders'), _('MRP Suggested Work Orders'), - _('MRP Reschedules Required') ); + _('MRP Reschedules Required')); $MenuItems['manuf']['Reports']['URL'] = array ('/SelectWorkOrder.php', '/BOMInquiry.php', @@ -301,35 +305,35 @@ '/MRPShortages.php', '/MRPPlannedPurchaseOrders.php', '/MRPPlannedWorkOrders.php', - '/MRPReschedules.php' ); + '/MRPReschedules.php'); $MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), _('Bills Of Material'), _('Copy a Bill Of Materials Between Items'), _('Master Schedule'), _('Auto Create Master Schedule'), - _('MRP Calculation') ); + _('MRP Calculation')); $MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', '/BOMs.php', '/CopyBOM.php', '/MRPDemands.php', '/MRPCreateDemands.php', - '/MRP.php' ); + '/MRP.php'); $MenuItems['GL']['Transactions']['Caption'] = array (_('Bank Account Payments Entry'), _('Bank Account Receipts Entry'), _('Import Bank Transactions'), _('Journal Entry'), _('Bank Account Payments Matching'), - _('Bank Account Receipts Matching') ); + _('Bank Account Receipts Matching')); $MenuItems['GL']['Transactions']['URL'] = array ('/Payments.php?NewPayment=Yes', '/CustomerReceipt.php?NewReceipt=Yes&Type=GL', '/ImportBankTrans.php', '/GLJournal.php?NewJournal=Yes', '/BankMatching.php?Type=Payments', - '/BankMatching.php?Type=Receipts' ); + '/BankMatching.php?Type=Receipts'); $MenuItems['GL']['Reports']['Caption'] = array (_('Trial Balance'), _('Account Inquiry'), @@ -342,7 +346,7 @@ _('Profit and Loss Statement'), _('Balance Sheet'), _('Tag Reports'), - _('Tax Reports') ); + _('Tax Reports')); $MenuItems['GL']['Reports']['URL'] = array ('/GLTrialBalance.php', '/SelectGLAccount.php', @@ -355,29 +359,29 @@ '/GLProfit_Loss.php', '/GLBalanceSheet.php', '/GLTagProfit_Loss.php', - '/Tax.php' ); + '/Tax.php'); $MenuItems['GL']['Maintenance']['Caption'] = array ( _('Account Sections'), _('Account Groups'), _('GL Accounts'), _('GL Budgets'), - _('GL Tags') ); + _('GL Tags')); $MenuItems['GL']['Maintenance']['URL'] = array ( '/AccountSections.php', '/AccountGroups.php', '/GLAccounts.php', '/GLBudgets.php', - '/GLTags.php' ); + '/GLTags.php'); $MenuItems['FA']['Transactions']['Caption'] = array (_('Add a new Asset'), _('Select an Asset'), _('Change Asset Location'), - _('Depreciation Journal') ); + _('Depreciation Journal')); $MenuItems['FA']['Transactions']['URL'] = array ('/FixedAssetItems.php', '/SelectAsset.php', '/FixedAssetTransfer.php', - '/FixedAssetDepreciation.php' ); + '/FixedAssetDepreciation.php'); $MenuItems['FA']['Reports']['Caption'] = array (_('Asset Register'), _('My Maintenance Schedule'), @@ -389,19 +393,19 @@ $MenuItems['FA']['Maintenance']['Caption'] = array (_('Asset Categories Maintenance'), _('Add or Maintain Asset Locations'), - _('Maintenance Tasks') ); + _('Maintenance Tasks')); $MenuItems['FA']['Maintenance']['URL'] = array ('/FixedAssetCategories.php', '/FixedAssetLocations.php', - '/MaintenanceTasks.php' ); + '/MaintenanceTasks.php'); $MenuItems['PC']['Transactions']['Caption'] = array (_('Assign Cash to PC Tab'), _('Claim Expenses From PC Tab'), - _('Expenses Authorisation') ); + _('Expenses Authorisation')); $MenuItems['PC']['Transactions']['URL'] = array ('/PcAssignCashToTab.php', '/PcClaimExpensesFromTab.php', - '/PcAuthorizeExpenses.php' ); + '/PcAuthorizeExpenses.php'); $MenuItems['PC']['Reports']['Caption'] = array (_('PC Tab General Report'), ); @@ -410,12 +414,12 @@ $MenuItems['PC']['Maintenance']['Caption'] = array (_('Types of PC Tabs'), _('PC Tabs'), _('PC Expenses'), - _('Expenses for Type of PC Tab') ); + _('Expenses for Type of PC Tab')); $MenuItems['PC']['Maintenance']['URL'] = array ('/PcTypeTabs.php', '/PcTabs.php', '/PcExpenses.php', - '/PcExpensesTypeTab.php' ); + '/PcExpensesTypeTab.php'); $MenuItems['system']['Transactions']['Caption'] = array (_('Company Preferences'), _('Configuration Settings'), @@ -472,7 +476,7 @@ _('Sales GL Interface Postings'), _('COGS GL Interface Postings'), _('Freight Costs Maintenance'), - _('Discount Matrix') ); + _('Discount Matrix')); $MenuItems['system']['Reports']['URL'] = array ('/SalesTypes.php', '/CustomerTypes.php', @@ -487,7 +491,7 @@ '/SalesGLPostings.php', '/COGSGLPostings.php', '/FreightCosts.php', - '/DiscountMatrix.php' ); + '/DiscountMatrix.php'); $MenuItems['system']['Maintenance']['Caption'] = array (_('Inventory Categories Maintenance'), _('Inventory Locations Maintenance'), @@ -497,7 +501,7 @@ _('MRP Demand Types'), _('Maintain Internal Departments'), _('Maintain Internal Stock Categories to User Roles'), - _('Label Templates Maintenance') ); + _('Label Templates Maintenance')); $MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', '/Locations.php', @@ -507,7 +511,7 @@ '/MRPDemandTypes.php', '/Departments.php', '/InternalStockCategoriesByRole.php', - '/Labels.php' ); + '/Labels.php'); $MenuItems['Utilities']['Transactions']['Caption'] = array (_('Import GL Payments Receipts Or Journals From CSV'), _('Change A Customer Code'), @@ -563,5 +567,5 @@ '/Z_UpdateChartDetailsBFwd.php', '/Z_RePostGLFromPeriod.php', '/Z_DeleteOldPrices.php', - '/Z_ImportPriceList.php' ); + '/Z_ImportPriceList.php'); ?> Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2013-08-10 01:37:27 UTC (rev 6186) +++ trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2013-08-10 18:23:52 UTC (rev 6187) @@ -9,7 +9,7 @@ "Project-Id-Version: WebERP 4.09.1/trunk\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-06-01 11:21-0600\n" +"PO-Revision-Date: 2013-08-10 10:47-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: Deutsch <web...@li...>\n" "MIME-Version: 1.0\n" @@ -41203,7 +41203,7 @@ #: includes/MainMenuLinksArray.php:47 includes/MainMenuLinksArray #: (puppypc32158's conflicted copy 2013-06-24).php:47 -msgid "Order Inquiry" +msgid "Sales Order Inquiry" msgstr "Auftragsauswertung" #: includes/MainMenuLinksArray.php:48 includes/MainMenuLinksArray @@ -47086,8 +47086,8 @@ #~ "currency codes" #~ msgstr "" #~ "Der Währungsschlüssel darf maximal 3 Zeichen lang sein, damit die " -#~ "automatischen Kursaktualisierungen funktionieren muss es einer der ISO-" -#~ "4217-Schlüssel sein." +#~ "automatischen Kursaktualisierungen funktionieren muss es einer der " +#~ "ISO-4217-Schlüssel sein." #~ msgid "The currency name must be 20 characters or less long" #~ msgstr "Die Währungsbezeichnung darf bis zu 20 Zeichen haben" Modified: trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot =================================================================== --- trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot 2013-08-10 01:37:27 UTC (rev 6186) +++ trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot 2013-08-10 18:23:52 UTC (rev 6187) @@ -36203,7 +36203,7 @@ #: includes/MainMenuLinksArray.php:47 #: includes/MainMenuLinksArray (puppypc32158's conflicted copy 2013-06-24).php:47 -msgid "Order Inquiry" +msgid "Sales Order Inquiry" msgstr "" #: includes/MainMenuLinksArray.php:48 Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2013-08-10 01:37:27 UTC (rev 6186) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2013-08-10 18:23:52 UTC (rev 6187) @@ -8,7 +8,7 @@ "Project-Id-Version: WebERP 4.081\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-07-15 09:49-0600\n" +"PO-Revision-Date: 2013-08-10 12:17-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "MIME-Version: 1.0\n" @@ -41595,10 +41595,9 @@ msgid "Process Recurring Orders" msgstr "Procesar Pedidos Frecuentes" -#: includes/MainMenuLinksArray.php:47 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:47 -msgid "Order Inquiry" -msgstr "Consultar Pedidos" +#: includes/MainMenuLinksArray.php:47 +msgid "Sales Order Inquiry" +msgstr "Consultar órdenes de venta" #: includes/MainMenuLinksArray.php:48 includes/MainMenuLinksArray #: (puppypc32158's conflicted copy 2013-06-24).php:48 Modified: trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po 2013-08-10 01:37:27 UTC (rev 6186) +++ trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po 2013-08-10 18:23:52 UTC (rev 6187) @@ -10,7 +10,7 @@ "Project-Id-Version: WebERP 4.10.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-06-01 11:26-0600\n" +"PO-Revision-Date: 2013-08-10 10:50-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: french <none>\n" "MIME-Version: 1.0\n" @@ -41877,7 +41877,7 @@ #: includes/MainMenuLinksArray.php:47 includes/MainMenuLinksArray #: (puppypc32158's conflicted copy 2013-06-24).php:47 -msgid "Order Inquiry" +msgid "Sales Order Inquiry" msgstr "Rechercher une Commande" #: includes/MainMenuLinksArray.php:48 includes/MainMenuLinksArray Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2013-08-10 01:37:27 UTC (rev 6186) +++ trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2013-08-10 18:23:52 UTC (rev 6187) @@ -9,7 +9,7 @@ "Project-Id-Version: weberp 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-07-24 07:50-0600\n" +"PO-Revision-Date: 2013-08-10 10:51-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: French <none>\n" "MIME-Version: 1.0\n" @@ -42374,7 +42374,7 @@ #: includes/MainMenuLinksArray.php:47 includes/MainMenuLinksArray #: (puppypc32158's conflicted copy 2013-06-24).php:47 -msgid "Order Inquiry" +msgid "Sales Order Inquiry" msgstr "Commande" #: includes/MainMenuLinksArray.php:48 includes/MainMenuLinksArray |
From: <rc...@us...> - 2013-08-12 01:29:49
|
Revision: 6190 http://sourceforge.net/p/web-erp/reponame/6190 Author: rchacon Date: 2013-08-12 01:29:43 +0000 (Mon, 12 Aug 2013) Log Message: ----------- Standardizes msgid "Enter An Order or Quotation" and "Add Purchase Order" to "New Sales Order" and "New Purchase Order". Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2013-08-11 23:45:59 UTC (rev 6189) +++ trunk/includes/MainMenuLinksArray.php 2013-08-12 01:29:43 UTC (rev 6190) @@ -30,7 +30,7 @@ _('Setup'), _('Utilities')); -$MenuItems['orders']['Transactions']['Caption'] = array( _('Enter An Order or Quotation'), +$MenuItems['orders']['Transactions']['Caption'] = array(_('New Sales Order or Quotation'), _('Enter Counter Sales'), _('Enter Counter Returns'), _('Print Picking Lists'), @@ -39,7 +39,7 @@ _('Recurring Order Template'), _('Process Recurring Orders')); -$MenuItems['orders']['Transactions']['URL'] = array( '/SelectOrderItems.php?NewOrder=Yes', +$MenuItems['orders']['Transactions']['URL'] = array('/SelectOrderItems.php?NewOrder=Yes', '/CounterSales.php', '/CounterReturns.php', '/PDFPickingList.php', @@ -81,23 +81,23 @@ '/PDFSellThroughSupportClaim.php'); $MenuItems['orders']['Maintenance']['Caption'] = array( _('Select Contract'), - _('Create Contract'), - _('Sell Through Support Deals')); + _('Create Contract'), + _('Sell Through Support Deals')); $MenuItems['orders']['Maintenance']['URL'] = array( '/SelectContract.php', '/Contracts.php', '/SellThroughSupport.php'); -$MenuItems['AR']['Transactions']['Caption'] = array (_('Select Order to Invoice'), - _('Create A Credit Note'), - _('Enter Receipts'), - _('Allocate Receipts or Credit Notes')); -$MenuItems['AR']['Transactions']['URL'] = array ('/SelectSalesOrder.php', - '/SelectCreditItems.php?NewCredit=Yes', - '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', - '/CustomerAllocations.php'); +$MenuItems['AR']['Transactions']['Caption'] = array(_('Select Order to Invoice'), + _('Create A Credit Note'), + _('Enter Receipts'), + _('Allocate Receipts or Credit Notes')); +$MenuItems['AR']['Transactions']['URL'] = array('/SelectSalesOrder.php', + '/SelectCreditItems.php?NewCredit=Yes', + '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', + '/CustomerAllocations.php'); -$MenuItems['AR']['Reports']['Caption'] = array (_('Where Allocated Inquiry'), +$MenuItems['AR']['Reports']['Caption'] = array( _('Where Allocated Inquiry'), _('Print Invoices or Credit Notes'), _('Print Statements'), _('Sales Analysis Reports'), @@ -115,7 +115,7 @@ $PrintInvoicesOrCreditNotesScript = '/PrintCustTransPortrait.php'; } -$MenuItems['AR']['Reports']['URL'] = array ('/CustWhereAlloc.php', +$MenuItems['AR']['Reports']['URL'] = array( '/CustWhereAlloc.php', $PrintInvoicesOrCreditNotesScript, '/PrintCustStatements.php', '/SalesAnalRepts.php', @@ -127,17 +127,17 @@ '/PDFCustTransListing.php', '/CustomerTransInquiry.php'); -$MenuItems['AR']['Maintenance']['Caption'] = array (_('Add Customer'), +$MenuItems['AR']['Maintenance']['Caption'] = array( _('Add Customer'), _('Select Customer')); -$MenuItems['AR']['Maintenance']['URL'] = array ('/Customers.php', +$MenuItems['AR']['Maintenance']['URL'] = array( '/Customers.php', '/SelectCustomer.php'); -$MenuItems['AP']['Transactions']['Caption'] = array (_('Select Supplier'), +$MenuItems['AP']['Transactions']['Caption'] = array(_('Select Supplier'), _('Supplier Allocations')); -$MenuItems['AP']['Transactions']['URL'] = array ('/SelectSupplier.php', +$MenuItems['AP']['Transactions']['URL'] = array('/SelectSupplier.php', '/SupplierAllocations.php'); -$MenuItems['AP']['Reports']['Caption'] = array (_('Aged Supplier Report'), +$MenuItems['AP']['Reports']['Caption'] = array( _('Aged Supplier Report'), _('Payment Run Report'), _('Remittance Advices'), _('Outstanding GRNs Report'), @@ -145,7 +145,7 @@ _('List Daily Transactions'), _('Supplier Transaction Inquiries')); -$MenuItems['AP']['Reports']['URL'] = array ('/AgedSuppliers.php', +$MenuItems['AP']['Reports']['URL'] = array( '/AgedSuppliers.php', '/SuppPaymentRun.php', '/PDFRemittanceAdvice.php', '/OutstandingGRNs.php', @@ -153,43 +153,43 @@ '/PDFSuppTransListing.php', '/SupplierTransInquiry.php'); -$MenuItems['AP']['Maintenance']['Caption'] = array (_('Add Supplier'), +$MenuItems['AP']['Maintenance']['Caption'] = array( _('Add Supplier'), _('Select Supplier'), _('Maintain Factor Companies')); -$MenuItems['AP']['Maintenance']['URL'] = array ('/Suppliers.php', +$MenuItems['AP']['Maintenance']['URL'] = array( '/Suppliers.php', '/SelectSupplier.php', '/Factors.php'); -$MenuItems['PO']['Transactions']['Caption'] = array (_('Purchase Orders'), - _('Add Purchase Order'), +$MenuItems['PO']['Transactions']['Caption'] = array(_('New Purchase Order'), + _('Purchase Orders'), _('Create a New Tender'), _('Edit Existing Tenders'), _('Process Tenders and Offers'), _('Orders to Authorise'), _('Shipment Entry'), _('Select A Shipment')); -$MenuItems['PO']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', - '/PO_Header.php?NewOrder=Yes', - '/SupplierTenderCreate.php?New=Yes', - '/SupplierTenderCreate.php?Edit=Yes', - '/OffersReceived.php', - '/PO_AuthoriseMyOrders.php', - '/SelectSupplier.php', - '/Shipt_Select.php'); +$MenuItems['PO']['Transactions']['URL'] = array( '/PO_Header.php?NewOrder=Yes', + '/PO_SelectOSPurchOrder.php', + '/SupplierTenderCreate.php?New=Yes', + '/SupplierTenderCreate.php?Edit=Yes', + '/OffersReceived.php', + '/PO_AuthoriseMyOrders.php', + '/SelectSupplier.php', + '/Shipt_Select.php'); -$MenuItems['PO']['Reports']['Caption'] = array (_('Purchase Order Inquiry'), +$MenuItems['PO']['Reports']['Caption'] = array( _('Purchase Order Inquiry'), _('Purchase Order Detail Or Summary Inquiries'), _('Supplier Price List')); -$MenuItems['PO']['Reports']['URL'] = array ('/PO_SelectPurchOrder.php', +$MenuItems['PO']['Reports']['URL'] = array( '/PO_SelectPurchOrder.php', '/POReport.php', '/SuppPriceList.php'); -$MenuItems['PO']['Maintenance']['Caption'] = array (_('Maintain Supplier Price Lists')); +$MenuItems['PO']['Maintenance']['Caption'] = array(_('Maintain Supplier Price Lists')); -$MenuItems['PO']['Maintenance']['URL'] = array ('/SupplierPriceList.php'); +$MenuItems['PO']['Maintenance']['URL'] = array('/SupplierPriceList.php'); -$MenuItems['stock']['Transactions']['Caption'] = array (_('Receive Purchase Orders'), +$MenuItems['stock']['Transactions']['Caption'] = array( _('Receive Purchase Orders'), _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), _('Bulk Inventory Transfer') . ' - ' . _('Receive'), _('Inventory Location Transfers'), @@ -200,7 +200,7 @@ _('Authorise Internal Stock Requests'), _('Fulfill Internal Stock Requests')); -$MenuItems['stock']['Transactions']['URL'] = array ('/PO_SelectOSPurchOrder.php', +$MenuItems['stock']['Transactions']['URL'] = array( '/PO_SelectOSPurchOrder.php', '/StockLocTransfer.php', '/StockLocTransferReceive.php', '/StockTransfers.php?New=Yes', @@ -211,7 +211,7 @@ '/InternalStockRequestAuthorisation.php', '/InternalStockRequestFulfill.php'); -$MenuItems['stock']['Reports']['Caption'] = array (_('Serial Item Research Tool'), +$MenuItems['stock']['Reports']['Caption'] = array( _('Serial Item Research Tool'), _('Print Price Labels'), _('Reprint GRN'), _('Inventory Item Movements'), @@ -234,7 +234,7 @@ _('Period Stock Transaction Listing'), _('Stock Transfer Note')); -$MenuItems['stock']['Reports']['URL'] = array ('/StockSerialItemResearch.php', +$MenuItems['stock']['Reports']['URL'] = array( '/StockSerialItemResearch.php', '/PDFPrintLabel.php', '/ReprintGRN.php', '/StockMovements.php', @@ -257,7 +257,7 @@ '/PDFPeriodStockTransListing.php', '/PDFStockTransfer.php'); -$MenuItems['stock']['Maintenance']['Caption'] = array (_('Add A New Item'), +$MenuItems['stock']['Maintenance']['Caption'] = array( _('Add A New Item'), _('Select An Item'), _('Sales Category Maintenance'), _('Brands Maintenance'), @@ -265,7 +265,7 @@ _('View or Update Prices Based On Costs'), _('Reorder Level By Category/Location')); -$MenuItems['stock']['Maintenance']['URL'] = array ('/Stocks.php', +$MenuItems['stock']['Maintenance']['URL'] = array( '/Stocks.php', '/SelectProduct.php', '/SalesCategories.php', '/Manufacturers.php', @@ -273,13 +273,13 @@ '/PricesByCost.php', '/ReorderLevelLocation.php'); -$MenuItems['manuf']['Transactions']['Caption'] = array (_('Work Order Entry'), +$MenuItems['manuf']['Transactions']['Caption'] = array( _('Work Order Entry'), _('Select A Work Order')); -$MenuItems['manuf']['Transactions']['URL'] = array ('/WorkOrderEntry.php', +$MenuItems['manuf']['Transactions']['URL'] = array( '/WorkOrderEntry.php', '/SelectWorkOrder.php'); -$MenuItems['manuf']['Reports']['Caption'] = array (_('Select A Work Order'), +$MenuItems['manuf']['Reports']['Caption'] = array( _('Select A Work Order'), _('Costed Bill Of Material Inquiry'), _('Where Used Inquiry'), _('Bill Of Material Listing'), @@ -293,7 +293,7 @@ _('MRP Suggested Work Orders'), _('MRP Reschedules Required')); -$MenuItems['manuf']['Reports']['URL'] = array ('/SelectWorkOrder.php', +$MenuItems['manuf']['Reports']['URL'] = array( '/SelectWorkOrder.php', '/BOMInquiry.php', '/WhereUsedInquiry.php', '/BOMListing.php', @@ -307,35 +307,35 @@ '/MRPPlannedWorkOrders.php', '/MRPReschedules.php'); -$MenuItems['manuf']['Maintenance']['Caption'] = array (_('Work Centre'), - _('Bills Of Material'), - _('Copy a Bill Of Materials Between Items'), - _('Master Schedule'), - _('Auto Create Master Schedule'), - _('MRP Calculation')); +$MenuItems['manuf']['Maintenance']['Caption'] = array( _('Work Centre'), + _('Bills Of Material'), + _('Copy a Bill Of Materials Between Items'), + _('Master Schedule'), + _('Auto Create Master Schedule'), + _('MRP Calculation')); -$MenuItems['manuf']['Maintenance']['URL'] = array ('/WorkCentres.php', - '/BOMs.php', - '/CopyBOM.php', - '/MRPDemands.php', - '/MRPCreateDemands.php', - '/MRP.php'); +$MenuItems['manuf']['Maintenance']['URL'] = array( '/WorkCentres.php', + '/BOMs.php', + '/CopyBOM.php', + '/MRPDemands.php', + '/MRPCreateDemands.php', + '/MRP.php'); -$MenuItems['GL']['Transactions']['Caption'] = array (_('Bank Account Payments Entry'), +$MenuItems['GL']['Transactions']['Caption'] = array( _('Bank Account Payments Entry'), _('Bank Account Receipts Entry'), _('Import Bank Transactions'), _('Journal Entry'), _('Bank Account Payments Matching'), _('Bank Account Receipts Matching')); -$MenuItems['GL']['Transactions']['URL'] = array ('/Payments.php?NewPayment=Yes', +$MenuItems['GL']['Transactions']['URL'] = array('/Payments.php?NewPayment=Yes', '/CustomerReceipt.php?NewReceipt=Yes&Type=GL', '/ImportBankTrans.php', '/GLJournal.php?NewJournal=Yes', '/BankMatching.php?Type=Payments', '/BankMatching.php?Type=Receipts'); -$MenuItems['GL']['Reports']['Caption'] = array (_('Trial Balance'), +$MenuItems['GL']['Reports']['Caption'] = array( _('Trial Balance'), _('Account Inquiry'), _('Account Listing'), _('Account Listing to CSV File'), @@ -348,7 +348,7 @@ _('Tag Reports'), _('Tax Reports')); -$MenuItems['GL']['Reports']['URL'] = array ('/GLTrialBalance.php', +$MenuItems['GL']['Reports']['URL'] = array( '/GLTrialBalance.php', '/SelectGLAccount.php', '/GLAccountReport.php', '/GLAccountCSV.php', @@ -361,67 +361,67 @@ '/GLTagProfit_Loss.php', '/Tax.php'); -$MenuItems['GL']['Maintenance']['Caption'] = array ( _('Account Sections'), - _('Account Groups'), - _('GL Accounts'), - _('GL Budgets'), - _('GL Tags')); +$MenuItems['GL']['Maintenance']['Caption'] = array( _('Account Sections'), + _('Account Groups'), + _('GL Accounts'), + _('GL Budgets'), + _('GL Tags')); -$MenuItems['GL']['Maintenance']['URL'] = array ( '/AccountSections.php', +$MenuItems['GL']['Maintenance']['URL'] = array( '/AccountSections.php', '/AccountGroups.php', '/GLAccounts.php', '/GLBudgets.php', '/GLTags.php'); -$MenuItems['FA']['Transactions']['Caption'] = array (_('Add a new Asset'), +$MenuItems['FA']['Transactions']['Caption'] = array(_('Add a new Asset'), _('Select an Asset'), _('Change Asset Location'), _('Depreciation Journal')); -$MenuItems['FA']['Transactions']['URL'] = array ('/FixedAssetItems.php', +$MenuItems['FA']['Transactions']['URL'] = array('/FixedAssetItems.php', '/SelectAsset.php', '/FixedAssetTransfer.php', '/FixedAssetDepreciation.php'); -$MenuItems['FA']['Reports']['Caption'] = array (_('Asset Register'), +$MenuItems['FA']['Reports']['Caption'] = array( _('Asset Register'), _('My Maintenance Schedule'), _('Maintenance Reminder Emails')); -$MenuItems['FA']['Reports']['URL'] = array ('/FixedAssetRegister.php', +$MenuItems['FA']['Reports']['URL'] = array( '/FixedAssetRegister.php', '/MaintenanceUserSchedule.php', '/MaintenanceReminders.php'); -$MenuItems['FA']['Maintenance']['Caption'] = array (_('Asset Categories Maintenance'), +$MenuItems['FA']['Maintenance']['Caption'] = array( _('Asset Categories Maintenance'), _('Add or Maintain Asset Locations'), _('Maintenance Tasks')); -$MenuItems['FA']['Maintenance']['URL'] = array ('/FixedAssetCategories.php', +$MenuItems['FA']['Maintenance']['URL'] = array( '/FixedAssetCategories.php', '/FixedAssetLocations.php', '/MaintenanceTasks.php'); -$MenuItems['PC']['Transactions']['Caption'] = array (_('Assign Cash to PC Tab'), +$MenuItems['PC']['Transactions']['Caption'] = array(_('Assign Cash to PC Tab'), _('Claim Expenses From PC Tab'), _('Expenses Authorisation')); -$MenuItems['PC']['Transactions']['URL'] = array ('/PcAssignCashToTab.php', +$MenuItems['PC']['Transactions']['URL'] = array('/PcAssignCashToTab.php', '/PcClaimExpensesFromTab.php', '/PcAuthorizeExpenses.php'); -$MenuItems['PC']['Reports']['Caption'] = array (_('PC Tab General Report'), ); +$MenuItems['PC']['Reports']['Caption'] = array(_('PC Tab General Report'), ); -$MenuItems['PC']['Reports']['URL'] = array ('/PcReportTab.php', ); +$MenuItems['PC']['Reports']['URL'] = array('/PcReportTab.php', ); -$MenuItems['PC']['Maintenance']['Caption'] = array (_('Types of PC Tabs'), +$MenuItems['PC']['Maintenance']['Caption'] = array( _('Types of PC Tabs'), _('PC Tabs'), _('PC Expenses'), _('Expenses for Type of PC Tab')); -$MenuItems['PC']['Maintenance']['URL'] = array ('/PcTypeTabs.php', +$MenuItems['PC']['Maintenance']['URL'] = array( '/PcTypeTabs.php', '/PcTabs.php', '/PcExpenses.php', '/PcExpensesTypeTab.php'); -$MenuItems['system']['Transactions']['Caption'] = array (_('Company Preferences'), +$MenuItems['system']['Transactions']['Caption'] = array(_('Company Preferences'), _('Configuration Settings'), _('User Maintenance'), _('Maintain Security Tokens'), @@ -442,7 +442,7 @@ _('SMTP Server Details'), _('Mailing Group Maintenance') ); -$MenuItems['system']['Transactions']['URL'] = array ('/CompanyPreferences.php', +$MenuItems['system']['Transactions']['URL'] = array('/CompanyPreferences.php', '/SystemParameters.php', '/WWW_Users.php', '/SecurityTokens.php', @@ -463,7 +463,7 @@ '/SMTPServer.php', '/MailingGroupMaintenance.php' ); -$MenuItems['system']['Reports']['Caption'] = array (_('Sales Types'), +$MenuItems['system']['Reports']['Caption'] = array( _('Sales Types'), _('Customer Types'), _('Supplier Types'), _('Credit Status'), @@ -478,7 +478,7 @@ _('Freight Costs Maintenance'), _('Discount Matrix')); -$MenuItems['system']['Reports']['URL'] = array ('/SalesTypes.php', +$MenuItems['system']['Reports']['URL'] = array( '/SalesTypes.php', '/CustomerTypes.php', '/SupplierTypes.php', '/CreditStatus.php', @@ -493,7 +493,7 @@ '/FreightCosts.php', '/DiscountMatrix.php'); -$MenuItems['system']['Maintenance']['Caption'] = array (_('Inventory Categories Maintenance'), +$MenuItems['system']['Maintenance']['Caption'] = array( _('Inventory Categories Maintenance'), _('Inventory Locations Maintenance'), _('Discount Category Maintenance'), _('Units of Measure'), @@ -503,7 +503,7 @@ _('Maintain Internal Stock Categories to User Roles'), _('Label Templates Maintenance')); -$MenuItems['system']['Maintenance']['URL'] = array ('/StockCategories.php', +$MenuItems['system']['Maintenance']['URL'] = array( '/StockCategories.php', '/Locations.php', '/DiscountCategories.php', '/UnitsOfMeasure.php', @@ -513,7 +513,7 @@ '/InternalStockCategoriesByRole.php', '/Labels.php'); -$MenuItems['Utilities']['Transactions']['Caption'] = array (_('Import GL Payments Receipts Or Journals From CSV'), +$MenuItems['Utilities']['Transactions']['Caption'] = array( _('Import GL Payments Receipts Or Journals From CSV'), _('Change A Customer Code'), _('Change A Customer Branch Code'), _('Change A Supplier Code'), @@ -525,7 +525,7 @@ _('Delete sales transactions'), _('Reverse all supplier payments on a specified date')); -$MenuItems['Utilities']['Transactions']['URL'] = array ('/Z_ImportGLTransactions.php', +$MenuItems['Utilities']['Transactions']['URL'] = array( '/Z_ImportGLTransactions.php', '/Z_ChangeCustomerCode.php', '/Z_ChangeBranchCode.php', '/Z_ChangeSupplierCode.php', @@ -537,17 +537,17 @@ '/Z_DeleteSalesTransActions.php', '/Z_ReverseSuppPaymentRun.php'); -$MenuItems['Utilities']['Reports']['Caption'] = array (_('Show Local Currency Total Debtor Balances'), - _('Show Local Currency Total Suppliers Balances'), - _('Show General Transactions That Do Not Balance'), - _('List of items without picture')); +$MenuItems['Utilities']['Reports']['Caption'] = array( _('Show Local Currency Total Debtor Balances'), + _('Show Local Currency Total Suppliers Balances'), + _('Show General Transactions That Do Not Balance'), + _('List of items without picture')); -$MenuItems['Utilities']['Reports']['URL'] = array ('/Z_CurrencyDebtorsBalances.php', - '/Z_CurrencySuppliersBalances.php', - '/Z_CheckGLTransBalance.php', - '/Z_ItemsWithoutPicture.php'); +$MenuItems['Utilities']['Reports']['URL'] = array( '/Z_CurrencyDebtorsBalances.php', + '/Z_CurrencySuppliersBalances.php', + '/Z_CheckGLTransBalance.php', + '/Z_ItemsWithoutPicture.php'); -$MenuItems['Utilities']['Maintenance']['Caption'] = array (_('Maintain Language Files'), +$MenuItems['Utilities']['Maintenance']['Caption'] = array( _('Maintain Language Files'), _('Make New Company'), _('Data Export Options'), _('Import Stock Items from .csv'), @@ -558,7 +558,7 @@ _('Purge all old prices'), _('Import Price List from CSV file')); -$MenuItems['Utilities']['Maintenance']['URL'] = array ('/Z_poAdmin.php', +$MenuItems['Utilities']['Maintenance']['URL'] = array( '/Z_poAdmin.php', '/Z_MakeNewCompany.php', '/Z_DataExport.php', '/Z_ImportStocks.php', Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2013-08-11 23:45:59 UTC (rev 6189) +++ trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2013-08-12 01:29:43 UTC (rev 6190) @@ -9,7 +9,7 @@ "Project-Id-Version: WebERP 4.09.1/trunk\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-08-10 10:47-0600\n" +"PO-Revision-Date: 2013-08-11 18:37-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: Deutsch <web...@li...>\n" "MIME-Version: 1.0\n" @@ -19999,7 +19999,8 @@ msgid "Receive this order" msgstr "Wareneingang zu dieser Bestellung erfassen" -#: PO_Header.php:801 +#: PO_Header.php:801 PO_SelectOSPurchOrder.php:138 +#: PO_SelectOSPurchOrder.php:140 includes/MainMenuLinksArray.php:160 msgid "New Purchase Order" msgstr "Neue Bestellung" @@ -20928,12 +20929,6 @@ msgid "The SQL used to retrieve the searched parts was" msgstr "Die fehlerhafte Abfrage war" -#: PO_SelectOSPurchOrder.php:138 PO_SelectOSPurchOrder.php:140 -#: includes/MainMenuLinksArray.php:160 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:160 -msgid "Add Purchase Order" -msgstr "Bestellung hinzufügen" - #: PO_SelectOSPurchOrder.php:145 PO_SelectPurchOrder.php:118 #: Shipt_Select.php:109 msgid "Into Stock Location" @@ -41166,9 +41161,8 @@ msgid "Purchases" msgstr "Einkauf" -#: includes/MainMenuLinksArray.php:29 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:29 -msgid "Enter An Order or Quotation" +#: includes/MainMenuLinksArray.php:29 +msgid "New Sales Order or Quotation" msgstr "Einen Kundenauftrag/ein Angebot erfassen" #: includes/MainMenuLinksArray.php:30 includes/MainMenuLinksArray Modified: trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot =================================================================== --- trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot 2013-08-11 23:45:59 UTC (rev 6189) +++ trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot 2013-08-12 01:29:43 UTC (rev 6190) @@ -18048,7 +18048,9 @@ msgid "Receive this order" msgstr "" -#: PO_Header.php:801 +#: PO_Header.php:801 PO_SelectOSPurchOrder.php:138 +#: PO_SelectOSPurchOrder.php:140 +#: includes/MainMenuLinksArray.php:160 msgid "New Purchase Order" msgstr "" @@ -18881,12 +18883,6 @@ msgid "The SQL used to retrieve the searched parts was" msgstr "" -#: PO_SelectOSPurchOrder.php:138 PO_SelectOSPurchOrder.php:140 -#: includes/MainMenuLinksArray.php:160 -#: includes/MainMenuLinksArray (puppypc32158's conflicted copy 2013-06-24).php:160 -msgid "Add Purchase Order" -msgstr "" - #: PO_SelectOSPurchOrder.php:145 PO_SelectPurchOrder.php:118 #: Shipt_Select.php:109 msgid "Into Stock Location" @@ -36167,8 +36163,7 @@ msgstr "" #: includes/MainMenuLinksArray.php:29 -#: includes/MainMenuLinksArray (puppypc32158's conflicted copy 2013-06-24).php:29 -msgid "Enter An Order or Quotation" +msgid "New Sales Order or Quotation" msgstr "" #: includes/MainMenuLinksArray.php:30 Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2013-08-11 23:45:59 UTC (rev 6189) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2013-08-12 01:29:43 UTC (rev 6190) @@ -8,7 +8,7 @@ "Project-Id-Version: WebERP 4.081\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-08-10 12:17-0600\n" +"PO-Revision-Date: 2013-08-11 19:19-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "MIME-Version: 1.0\n" @@ -20212,7 +20212,8 @@ msgid "Receive this order" msgstr "Aceptar este pedido" -#: PO_Header.php:801 +#: PO_Header.php:801 PO_SelectOSPurchOrder.php:138 +#: PO_SelectOSPurchOrder.php:140 includes/MainMenuLinksArray.php:160 msgid "New Purchase Order" msgstr "Nueva orden de compra" @@ -21149,12 +21150,6 @@ msgid "The SQL used to retrieve the searched parts was" msgstr "El SQL usado para obtener los códigos buscados fue" -#: PO_SelectOSPurchOrder.php:138 PO_SelectOSPurchOrder.php:140 -#: includes/MainMenuLinksArray.php:160 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:160 -msgid "Add Purchase Order" -msgstr "Crear Orden de Compra" - #: PO_SelectOSPurchOrder.php:145 PO_SelectPurchOrder.php:118 #: Shipt_Select.php:109 msgid "Into Stock Location" @@ -41560,10 +41555,9 @@ msgid "Purchases" msgstr "Compras" -#: includes/MainMenuLinksArray.php:29 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:29 -msgid "Enter An Order or Quotation" -msgstr "Introducir un pedido o cotización" +#: includes/MainMenuLinksArray.php:29 +msgid "New Sales Order or Quotation" +msgstr "Nueva orden de venta o cotización" #: includes/MainMenuLinksArray.php:30 includes/MainMenuLinksArray #: (puppypc32158's conflicted copy 2013-06-24).php:30 Modified: trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po 2013-08-11 23:45:59 UTC (rev 6189) +++ trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po 2013-08-12 01:29:43 UTC (rev 6190) @@ -10,7 +10,7 @@ "Project-Id-Version: WebERP 4.10.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-08-10 10:50-0600\n" +"PO-Revision-Date: 2013-08-11 18:55-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: french <none>\n" "MIME-Version: 1.0\n" @@ -20335,7 +20335,8 @@ msgid "Receive this order" msgstr "Recevoir cet ordre" -#: PO_Header.php:801 +#: PO_Header.php:801 PO_SelectOSPurchOrder.php:138 +#: PO_SelectOSPurchOrder.php:140 includes/MainMenuLinksArray.php:160 msgid "New Purchase Order" msgstr "Nouveau bon de commande" @@ -21278,12 +21279,6 @@ msgid "The SQL used to retrieve the searched parts was" msgstr "La requête SQL utilisé pour récupérer les articles recherché était" -#: PO_SelectOSPurchOrder.php:138 PO_SelectOSPurchOrder.php:140 -#: includes/MainMenuLinksArray.php:160 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:160 -msgid "Add Purchase Order" -msgstr "Ajouter bon de commande" - #: PO_SelectOSPurchOrder.php:145 PO_SelectPurchOrder.php:118 #: Shipt_Select.php:109 msgid "Into Stock Location" @@ -41839,9 +41834,8 @@ msgid "Purchases" msgstr "Achats" -#: includes/MainMenuLinksArray.php:29 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:29 -msgid "Enter An Order or Quotation" +#: includes/MainMenuLinksArray.php:29 +msgid "New Sales Order or Quotation" msgstr "Saisir une commande ou une cotation" #: includes/MainMenuLinksArray.php:30 includes/MainMenuLinksArray Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2013-08-11 23:45:59 UTC (rev 6189) +++ trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2013-08-12 01:29:43 UTC (rev 6190) @@ -9,7 +9,7 @@ "Project-Id-Version: weberp 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-08-10 10:51-0600\n" +"PO-Revision-Date: 2013-08-11 18:54-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: French <none>\n" "MIME-Version: 1.0\n" @@ -20623,7 +20623,8 @@ msgid "Receive this order" msgstr "Recevoir cet ordre" -#: PO_Header.php:801 +#: PO_Header.php:801 PO_SelectOSPurchOrder.php:138 +#: PO_SelectOSPurchOrder.php:140 includes/MainMenuLinksArray.php:160 msgid "New Purchase Order" msgstr "Nouveau bon de commande" @@ -21565,12 +21566,6 @@ msgid "The SQL used to retrieve the searched parts was" msgstr "Commande SQL d'affichage des éléments recherchés:" -#: PO_SelectOSPurchOrder.php:138 PO_SelectOSPurchOrder.php:140 -#: includes/MainMenuLinksArray.php:160 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:160 -msgid "Add Purchase Order" -msgstr "Passer une commande fournisseur" - #: PO_SelectOSPurchOrder.php:145 PO_SelectPurchOrder.php:118 #: Shipt_Select.php:109 msgid "Into Stock Location" @@ -42333,9 +42328,8 @@ msgstr "Achats" # JDN -#: includes/MainMenuLinksArray.php:29 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:29 -msgid "Enter An Order or Quotation" +#: includes/MainMenuLinksArray.php:29 +msgid "New Sales Order or Quotation" msgstr "Saisir une commande / devis" # JDN Modified: trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po 2013-08-11 23:45:59 UTC (rev 6189) +++ trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po 2013-08-12 01:29:43 UTC (rev 6190) @@ -8,7 +8,7 @@ "Project-Id-Version: WebERP 4.081\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-08-10 12:44-0600\n" +"PO-Revision-Date: 2013-08-11 18:58-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: pt-br <gs...@gm...>\n" "MIME-Version: 1.0\n" @@ -19580,7 +19580,8 @@ msgid "Receive this order" msgstr "Receber esta Ordem de Compra" -#: PO_Header.php:801 +#: PO_Header.php:801 PO_SelectOSPurchOrder.php:138 +#: PO_SelectOSPurchOrder.php:140 includes/MainMenuLinksArray.php:160 msgid "New Purchase Order" msgstr "Nova Ordem Compra" @@ -20491,12 +20492,6 @@ msgid "The SQL used to retrieve the searched parts was" msgstr "" -#: PO_SelectOSPurchOrder.php:138 PO_SelectOSPurchOrder.php:140 -#: includes/MainMenuLinksArray.php:160 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:160 -msgid "Add Purchase Order" -msgstr "Adicionar Ordem de Compra" - #: PO_SelectOSPurchOrder.php:145 PO_SelectPurchOrder.php:118 #: Shipt_Select.php:109 msgid "Into Stock Location" @@ -39792,9 +39787,8 @@ msgid "Purchases" msgstr "Compras" -#: includes/MainMenuLinksArray.php:29 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:29 -msgid "Enter An Order or Quotation" +#: includes/MainMenuLinksArray.php:29 +msgid "New Sales Order or Quotation" msgstr "Adicionar um Pedido ou Cotação" #: includes/MainMenuLinksArray.php:30 includes/MainMenuLinksArray Modified: trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po 2013-08-11 23:45:59 UTC (rev 6189) +++ trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po 2013-08-12 01:29:43 UTC (rev 6190) @@ -8,7 +8,7 @@ "Project-Id-Version: 3.13rc0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-07-06 15:49+1200\n" -"PO-Revision-Date: 2013-08-10 12:41-0600\n" +"PO-Revision-Date: 2013-08-11 19:08-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: Swedish <LL...@li...>\n" "MIME-Version: 1.0\n" @@ -19875,9 +19875,10 @@ msgid "Receive this order" msgstr "Taemot beställningen" -#: PO_Header.php:801 +#: PO_Header.php:801 PO_SelectOSPurchOrder.php:138 +#: PO_SelectOSPurchOrder.php:140 includes/MainMenuLinksArray.php:160 msgid "New Purchase Order" -msgstr "" +msgstr "Ny inköpsorder" #: PO_Header.php:841 msgid "Status Comment" @@ -20806,12 +20807,6 @@ msgid "The SQL used to retrieve the searched parts was" msgstr "Den SQL som användes var" -#: PO_SelectOSPurchOrder.php:138 PO_SelectOSPurchOrder.php:140 -#: includes/MainMenuLinksArray.php:160 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:160 -msgid "Add Purchase Order" -msgstr "Lägg till inköpsorder" - #: PO_SelectOSPurchOrder.php:145 PO_SelectPurchOrder.php:118 #: Shipt_Select.php:109 msgid "Into Stock Location" @@ -40932,9 +40927,8 @@ msgid "Purchases" msgstr "Inköp" -#: includes/MainMenuLinksArray.php:29 includes/MainMenuLinksArray -#: (puppypc32158's conflicted copy 2013-06-24).php:29 -msgid "Enter An Order or Quotation" +#: includes/MainMenuLinksArray.php:29 +msgid "New Sales Order or Quotation" msgstr "Registrera en order eller offert" #: includes/MainMenuLinksArray.php:30 includes/MainMenuLinksArray |
From: <te...@us...> - 2013-08-12 05:39:10
|
Revision: 6192 http://sourceforge.net/p/web-erp/reponame/6192 Author: tehonu Date: 2013-08-12 05:39:07 +0000 (Mon, 12 Aug 2013) Log Message: ----------- Added Tracking Number field as described in http://www.weberp.org/forum/showthread.php?tid=99 Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-08-12 02:18:38 UTC (rev 6191) +++ trunk/ConfirmDispatch_Invoice.php 2013-08-12 05:39:07 UTC (rev 6192) @@ -786,6 +786,7 @@ invtext, shipvia, consignment, + trackingnumber, packages, salesperson ) VALUES ( @@ -806,6 +807,7 @@ '" . $_POST['InvoiceText'] . "', '" . $_SESSION['Items'.$identifier]->ShipVia . "', '" . $_POST['Consignment'] . "', + '" . $_POST['ShipmentTrackingNumber'] . "', '" . $_POST['Packages'] . "', '" . $_SESSION['Items'.$identifier]->SalesPerson . "' )"; @@ -1646,6 +1648,9 @@ if (!isset($_POST['Consignment'])) { $_POST['Consignment']=''; } + if (!isset($_POST['ShipmentTrackingNumber'])) { + $_POST['ShipmentTrackingNumber']=''; + } if (!isset($_POST['Packages'])) { $_POST['Packages']='1'; } @@ -1665,6 +1670,11 @@ </tr>'; $j++; echo '<tr> + <td>' . _('Shipment Tracking Number'). ':</td> + <td><input tabindex="'.$j.'" type="text" pattern="[a-zA-Z0-9_\-\ ]*" title="' . _('Enter the tracking number issued by the freight company to track the shipment to the customer') . '" maxlength="40" size="40" name="ShipmentTrackingNumber" value="' . $_POST['ShipmentTrackingNumber'] . '" /></td> + </tr>'; + $j++; + echo '<tr> <td>' . _('No Of Packages in Delivery'). ':</td> <td><input tabindex="'.$j.'" type="number" maxlength="6" size="6" class="integer" name="Packages" value="' . $_POST['Packages'] . '" /></td> </tr>'; Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-08-12 02:18:38 UTC (rev 6191) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-08-12 05:39:07 UTC (rev 6192) @@ -185,5 +185,7 @@ INSERT INTO config VALUES ('ShopManagerEmail',''); +ALTER TABLE `debtortrans` ADD `trackingnumber` VARCHAR( 40 ) NOT NULL AFTER `consignment`; + UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <te...@us...> - 2013-08-12 06:08:54
|
Revision: 6193 http://sourceforge.net/p/web-erp/reponame/6193 Author: tehonu Date: 2013-08-12 06:08:49 +0000 (Mon, 12 Aug 2013) Log Message: ----------- Rollback revision 6192 Revision Links: -------------- http://sourceforge.net/p/web-erp/reponame/6192 Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/sql/mysql/upgrade4.10-4.11.sql Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2013-08-12 05:39:07 UTC (rev 6192) +++ trunk/ConfirmDispatch_Invoice.php 2013-08-12 06:08:49 UTC (rev 6193) @@ -786,7 +786,6 @@ invtext, shipvia, consignment, - trackingnumber, packages, salesperson ) VALUES ( @@ -807,7 +806,6 @@ '" . $_POST['InvoiceText'] . "', '" . $_SESSION['Items'.$identifier]->ShipVia . "', '" . $_POST['Consignment'] . "', - '" . $_POST['ShipmentTrackingNumber'] . "', '" . $_POST['Packages'] . "', '" . $_SESSION['Items'.$identifier]->SalesPerson . "' )"; @@ -1648,9 +1646,6 @@ if (!isset($_POST['Consignment'])) { $_POST['Consignment']=''; } - if (!isset($_POST['ShipmentTrackingNumber'])) { - $_POST['ShipmentTrackingNumber']=''; - } if (!isset($_POST['Packages'])) { $_POST['Packages']='1'; } @@ -1670,11 +1665,6 @@ </tr>'; $j++; echo '<tr> - <td>' . _('Shipment Tracking Number'). ':</td> - <td><input tabindex="'.$j.'" type="text" pattern="[a-zA-Z0-9_\-\ ]*" title="' . _('Enter the tracking number issued by the freight company to track the shipment to the customer') . '" maxlength="40" size="40" name="ShipmentTrackingNumber" value="' . $_POST['ShipmentTrackingNumber'] . '" /></td> - </tr>'; - $j++; - echo '<tr> <td>' . _('No Of Packages in Delivery'). ':</td> <td><input tabindex="'.$j.'" type="number" maxlength="6" size="6" class="integer" name="Packages" value="' . $_POST['Packages'] . '" /></td> </tr>'; Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-08-12 05:39:07 UTC (rev 6192) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-08-12 06:08:49 UTC (rev 6193) @@ -185,7 +185,5 @@ INSERT INTO config VALUES ('ShopManagerEmail',''); -ALTER TABLE `debtortrans` ADD `trackingnumber` VARCHAR( 40 ) NOT NULL AFTER `consignment`; - UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2013-08-13 19:44:07
|
Revision: 6197 http://sourceforge.net/p/web-erp/reponame/6197 Author: daintree Date: 2013-08-13 19:44:04 +0000 (Tue, 13 Aug 2013) Log Message: ----------- html5 and sorting tables Modified Paths: -------------- trunk/PO_AuthorisationLevels.php trunk/PO_Header.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/ShopParameters.php trunk/css/aguapop/default.css trunk/css/default/default.css trunk/css/fluid/default.css trunk/css/fresh/default.css trunk/css/gel/default.css trunk/css/professional/default.css trunk/css/professional-rtl/default.css trunk/css/silverwolf/default.css trunk/css/wood/default.css trunk/includes/CountriesArray.php trunk/javascripts/MiscFunctions.js trunk/sql/mysql/upgrade4.10-4.11.sql Removed Paths: ------------- trunk/css/aguapop/images/ascending.png trunk/css/aguapop/images/descending.png trunk/css/default/images/ascending.png trunk/css/default/images/descending.png trunk/css/fluid/images/ascending.png trunk/css/fluid/images/descending.png trunk/css/fresh/images/ascending.png trunk/css/fresh/images/descending.png trunk/css/gel/images/ascending.png trunk/css/gel/images/descending.png trunk/css/professional/images/ascending.png trunk/css/professional/images/descending.png trunk/css/professional-rtl/images/ascending.png trunk/css/professional-rtl/images/descending.png trunk/css/silverwolf/images/ascending.png trunk/css/silverwolf/images/descending.png trunk/css/wood/images/ascending.png trunk/css/wood/images/descending.png Modified: trunk/PO_AuthorisationLevels.php =================================================================== --- trunk/PO_AuthorisationLevels.php 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/PO_AuthorisationLevels.php 2013-08-13 19:44:04 UTC (rev 6197) @@ -212,7 +212,9 @@ </tr>'; echo '<input type="hidden" name="CurrCode" value="'.$Currency.'" />'; } else { - echo '<tr><td>'._('Currency').'</td><td><select name="CurrCode">'; + echo '<tr> + <td>'._('Currency').'</td> + <td><select name="CurrCode">'; $currencysql="SELECT currabrev,currency FROM currencies"; $currencyresult=DB_query($currencysql,$db); while ($myrow=DB_fetch_array($currencyresult)) { @@ -247,7 +249,7 @@ echo '<tr> <td>'._('User can authorise orders up to :').'</td>'; -echo '<td><input type="text" name="AuthLevel" size="11" class="number" value="' . locale_number_format($AuthLevel,$CurrDecimalPlaces) . '" /></td> +echo '<td><input type="text" name="AuthLevel" size="11" class="integer" title="' . _('Enter the amount that this user is premitted to authorise purchase orders up to') . '" value="' . locale_number_format($AuthLevel,$CurrDecimalPlaces) . '" /></td> </tr> </table>'; @@ -265,4 +267,4 @@ echo '</div> </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/PO_Header.php 2013-08-13 19:44:04 UTC (rev 6197) @@ -538,7 +538,7 @@ echo '<table cellpadding="3" class="selection"> <tr> <td>' . _('Enter text in the supplier name') . ':</td> - <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> + <td><input type="text" name="Keywords" autofocus="autofocus" size="20" maxlength="25" /></td> <td><h3><b>' . _('OR') . '</b></h3></td> <td>' . _('Enter text extract in the supplier code') . ':</td> <td><input type="text" name="SuppCode" size="15" maxlength="18" /></td> @@ -549,8 +549,6 @@ <input type="submit" name="SearchSuppliers" value="' . _('Search Now') . '" /> <input type="submit" value="' . _('Reset') . '" /></div>'; - echo '<script type="text/javascript">defaultControl(document.forms[0].Keywords);</script>'; - if (isset($result_SuppSelect)) { echo '<br /><table cellpadding="3" class="selection">'; @@ -742,7 +740,7 @@ </tr> <tr> <td>' . _('Delivery Date') . ':</td> - <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="DeliveryDate" size="11" value="' . $_POST['DeliveryDate'] . '" /></td> + <td><input type="text" required="required" autofocus="autofocus" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="DeliveryDate" size="11" value="' . $_POST['DeliveryDate'] . '" /></td> </tr>'; if (!isset($_POST['Initiator'])) { @@ -757,9 +755,11 @@ </tr> <tr> <td>' . _('Requisition Ref') . ':</td> - <td><input type="text" name="Requisition" size="16" maxlength="15" value="' . $_POST['Requisition'] . '" /></td> + <td><input type="text" name="Requisition" size="16" maxlength="15" title="' . _('Enter our purchase requisition reference if needed') . '" value="' . $_POST['Requisition'] . '" /></td> </tr> - <tr><td>' . _('Date Printed') . ':</td><td>'; + <tr> + <td>' . _('Date Printed') . ':</td> + <td>'; if (isset($_SESSION['PO' . $identifier]->DatePurchaseOrderPrinted) AND mb_strlen($_SESSION['PO' . $identifier]->DatePurchaseOrderPrinted) > 6) { echo ConvertSQLDate($_SESSION['PO' . $identifier]->DatePurchaseOrderPrinted); @@ -793,7 +793,9 @@ <table class="selection" width="100%">'; if ($_SESSION['ExistingOrder'] != 0 AND $_SESSION['PO' . $identifier]->Status == 'Printed') { - echo '<tr><td><a href="' . $RootPath . '/GoodsReceived.php?PONumber=' . $_SESSION['PO' . $identifier]->OrderNo . '&identifier=' . $identifier . '">' . _('Receive this order') . '</a></td></tr>'; + echo '<tr> + <td><a href="' . $RootPath . '/GoodsReceived.php?PONumber=' . $_SESSION['PO' . $identifier]->OrderNo . '&identifier=' . $identifier . '">' . _('Receive this order') . '</a></td> + </tr>'; } if ($_SESSION['PO' . $identifier]->Status == '') { //then its a new order @@ -843,13 +845,15 @@ </tr> <tr> <td colspan="2">' . html_entity_decode($_SESSION['PO' . $identifier]->StatusComments, ENT_QUOTES, 'UTF-8') . '</td> + </tr> + <input type="hidden" name="StatusCommentsComplete" value="' . htmlspecialchars($_SESSION['PO' . $identifier]->StatusComments, ENT_QUOTES, 'UTF-8') . '" /> + <tr> + <td><input type="submit" name="UpdateStatus" value="' . _('Status Update') . '" /></td> </tr>'; - - echo '<input type="hidden" name="StatusCommentsComplete" value="' . htmlspecialchars($_SESSION['PO' . $identifier]->StatusComments, ENT_QUOTES, 'UTF-8') . '" />'; - echo '<tr><td><input type="submit" name="UpdateStatus" value="' . _('Status Update') . '" /></td></tr>'; } //end its not a new order - echo '</table></td></tr>'; + echo '</table></td> + </tr>'; echo '<tr> <th><h3>' . _('Warehouse Info') . '</h3></th> @@ -862,7 +866,7 @@ echo '<table class="selection" width="100%"> <tr> <td>' . _('Warehouse') . ':</td> - <td><select name="StkLocation" onchange="ReloadForm(form1.LookupDeliveryAddress)">'; + <td><select required="required" name="StkLocation" onchange="ReloadForm(form1.LookupDeliveryAddress)">'; $sql = "SELECT loccode, locationname @@ -967,7 +971,7 @@ echo '<tr> <td>' . _('Delivery Contact') . ':</td> - <td><input type="text" name="Contact" size="41" value="' . $_SESSION['PO' . $identifier]->Contact . '" /></td> + <td><input type="text" name="Contact" size="41" title="' . _('Enter the name of the contact at the delivery address - normally our warehouse person at that warehouse') . '" value="' . $_SESSION['PO' . $identifier]->Contact . '" /></td> </tr> <tr> <td>' . _('Address') . ' 1 :</td> @@ -995,10 +999,11 @@ </tr> <tr> <td>' . _('Phone') . ':</td> - <td><input type="text" name="Tel" size="31" maxlength="30" value="' . $_SESSION['PO' . $identifier]->Tel . '" /></td> + <td><input type="tel" name="Tel" pattern="[0-9+\-\s]*" size="31" maxlength="30" value="' . $_SESSION['PO' . $identifier]->Tel . '" /></td> </tr> <tr> - <td>' . _('Delivery By') . ':</td><td><select name="DeliveryBy">'; + <td>' . _('Delivery By') . ':</td> + <td><select name="DeliveryBy">'; $ShipperResult = DB_query("SELECT shipper_id, shippername FROM shippers", $db); @@ -1079,7 +1084,7 @@ </tr> <tr> <td>' . _('Phone') . ':</td> - <td><input type="text" name="SuppTel" size="31" maxlength="30" value="' . $_SESSION['PO' . $identifier]->SuppTel . '" /></td> + <td><input type="tel" name="SuppTel" pattern="[0-9+\-\s]*" size="31" maxlength="30" value="' . $_SESSION['PO' . $identifier]->SuppTel . '" /></td> </tr>'; $result = DB_query("SELECT terms, termsindicator FROM paymentterms", $db); @@ -1122,7 +1127,8 @@ /*end of sub table */ echo '</td></tr> - <tr><th colspan="4"><h3>' . _('Comments'); + <tr> + <th colspan="4"><h3>' . _('Comments'); $Default_Comments = ''; Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/SelectCustomer.php 2013-08-13 19:44:04 UTC (rev 6197) @@ -416,18 +416,16 @@ echo '<br /> <table cellpadding="2" class="selection">'; - $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Customer Name') . '</th> - <th>' . _('Branch') . '</th> - <th>' . _('Contact') . '</th> - <th>' . _('Type') . '</th> - <th>' . _('Phone') . '</th> - <th>' . _('Fax') . '</th> - <th>' . _('Email') . '</th> - </tr>'; - echo $TableHeader; - $j = 1; + echo '<tr> + <th class="ascending" onclick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Customer Name') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Branch') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Contact') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Type') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Phone') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Fax') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Email') . '</th> + </tr>'; $k = 0; //row counter to determine background colour $RowIndex = 0; } //end if NOT producing a CSV file @@ -464,11 +462,6 @@ <td>' . $myrow['email'] . '</td> </tr>'; $i++; - $j++; //row counter - if ($j == 11 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax'])) { - $j = 1; - echo $TableHeader; - } //$j == 11 AND ($RowIndex + 1 != $_SESSION['DisplayRecordsMax']) $RowIndex++; //end of page full new headings if } //end loop through customers @@ -613,10 +606,10 @@ echo '<br /><div class="centre"><img src="' . $RootPath . '/css/' . $Theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="" />' . ' ' . _('Customer Contacts') . '</div>'; echo '<br /><table width="45%">'; echo '<tr> - <th>' . _('Name') . '</th> - <th>' . _('Role') . '</th> - <th>' . _('Phone Number') . '</th> - <th>' . _('Email') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Name') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Role') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Phone Number') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Email') . '</th> <th>' . _('Notes') . '</th> <th>' . _('Edit') . '</th> <th>' . _('Delete') . '</th> @@ -663,10 +656,10 @@ 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%">'; echo '<tr> - <th>' . _('Date') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Date') . '</th> <th>' . _('Note') . '</th> <th>' . _('Hyperlink') . '</th> - <th>' . _('Priority') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Priority') . '</th> <th>' . _('Edit') . '</th> <th>' . _('Delete') . '</th> <th> <a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note') . '</a> </th> @@ -705,10 +698,10 @@ echo '<br /><div class="centre"><img src="' . $RootPath . '/css/' . $Theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="" />' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br />'; echo '<table width="45%">'; echo '<tr> - <th>' . _('Date') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Date') . '</th> <th>' . _('Note') . '</th> <th>' . _('File Link / Reference / URL') . '</th> - <th>' . _('Priority') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Priority') . '</th> <th>' . _('Edit') . '</th> <th>' . _('Delete') . '</th> <th><a href="AddCustomerTypeNotes.php?DebtorType=' . $CustomerType . '">' . _('Add New Group Note') . '</a></th> @@ -741,4 +734,4 @@ } //end if isset($_SESSION['CustomerID']) AND $_SESSION['CustomerID'] != '' echo '<script type="text/javascript">defaultControl(document.forms[0].CustCode);</script>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/SelectOrderItems.php 2013-08-13 19:44:04 UTC (rev 6197) @@ -639,14 +639,13 @@ <br /> <table class="selection">'; - $TableHeader = '<tr> - <th>' . _('Customer') . '</th> - <th>' . _('Branch') . '</th> - <th>' . _('Contact') . '</th> - <th>' . _('Phone') . '</th> - <th>' . _('Fax') . '</th> - </tr>'; - echo $TableHeader; + echo '<tr> + <th class="ascending" onclick="SortSelect(this)" >' . _('Customer') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Branch') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Contact') . '</th> + <th>' . _('Phone') . '</th> + <th>' . _('Fax') . '</th> + </tr>'; $j = 1; $k = 0; //row counter to determine background colour @@ -660,18 +659,15 @@ echo '<tr class="OddTableRows">'; $k=1; } - if ($LastCustomer != $myrow['name']) { - echo '<td>'.htmlspecialchars($myrow['name'], ENT_QUOTES, 'UTF-8', false).'</td>'; - } else { - echo '<td></td>'; - } - echo '<td><input tabindex="'.strval($j+5).'" type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlspecialchars($myrow['brname'], ENT_QUOTES, 'UTF-8', false). '" /> + + echo ' <td>' . htmlspecialchars($myrow['name'], ENT_QUOTES, 'UTF-8', false).'</td> + <td><input tabindex="'.strval($j+5).'" type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlspecialchars($myrow['brname'], ENT_QUOTES, 'UTF-8', false). '" /> <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'" /> <input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /></td> <td>' . $myrow['contactname'] . '</td> <td>' . $myrow['phoneno'] . '</td> <td>' . $myrow['faxno'] . '</td> - </tr>'; + </tr>'; $LastCustomer=$myrow['name']; $j++; //end of page full new headings if @@ -1373,8 +1369,8 @@ if($_SESSION['Items'.$identifier]->DefaultPOLine == 1){ echo '<th>' . _('PO Line') . '</th>'; } - echo '<th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> + echo '<th class="ascending" onclick="SortSelect(this)" >' . _('Item Code') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Item Description') . '</th> <th>' . _('Quantity') . '</th> <th>' . _('QOH') . '</th> <th>' . _('Unit') . '</th> @@ -1536,17 +1532,16 @@ <br /> <table class="table1">'; - $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Units') . '</th> - <th>' . _('On Hand') . '</th> - <th>' . _('On Demand') . '</th> - <th>' . _('On Order') . '</th> - <th>' . _('Available') . '</th> - <th>' . _('Quantity') . '</th> - </tr>'; - echo $TableHeader; + echo '<tr> + <th class="ascending" onclick="SortSelect(this)" >' . _('Code') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Description') . '</th> + <th>' . _('Units') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('On Hand') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('On Demand') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('On Order') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Available') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Quantity') . '</th> + </tr>'; $i=0; $j=1; $k=0; //row colour counter @@ -1737,17 +1732,16 @@ echo '<tr><td colspan="1"><input type="hidden" name="PreviousList" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+8).'" type="submit" name="Previous" value="'._('Previous').'" /></td>'; echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+9).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; echo '<td colspan="1"><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+10).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; - $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Units') . '</th> - <th>' . _('On Hand') . '</th> - <th>' . _('On Demand') . '</th> - <th>' . _('On Order') . '</th> - <th>' . _('Available') . '</th> - <th>' . _('Quantity') . '</th> - </tr>'; - echo $TableHeader; + echo '<tr> + <th class="ascending" onclick="SortSelect(this)" >' . _('Code') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Description') . '</th> + <th>' . _('Units') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('On Hand') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('On Demand') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('On Order') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Available') . '</th> + <th>' . _('Quantity') . '</th> + </tr>'; $ImageSource = _('No Image'); $i=0; $k=0; //row colour counter @@ -1860,11 +1854,13 @@ #end of page full new headings if } #end of while loop - echo '<tr><td><input type="hidden" name="PreviousList" value="'. strval($Offset-1).'" /><input tabindex="'. strval($j+7).'" type="submit" name="Previous" value="'._('Previous').'" /></td>'; - echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'. strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; - echo '<td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; - echo '</table> - </div>'; + echo '<tr> + <td><input type="hidden" name="PreviousList" value="'. strval($Offset-1).'" /><input tabindex="'. strval($j+7).'" type="submit" name="Previous" value="'._('Previous').'" /></td> + <td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'. strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td> + <td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td> + </tr> + </table> + </div>'; echo $jsCall; }#end if SearchResults to show @@ -1937,4 +1933,4 @@ }#end of else not selecting a customer include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/SelectSalesOrder.php 2013-08-13 19:44:04 UTC (rev 6197) @@ -606,15 +606,13 @@ 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>'; - echo $TableHeader; - - $j = 1; + echo '<tr> + <th class="ascending" onclick="SortSelect(this)" >' . _('Code') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Description') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('On Hand') . '</th> + <th>' . _('Units') . '</th> + </tr>'; + $k=0; //row colour counter while ($myrow=DB_fetch_array($StockItemsResult)) { @@ -636,12 +634,6 @@ $myrow['description'], locale_number_format($myrow['qoh'],$myrow['decimalplaces']), $myrow['units']); - - $j++; - if ($j == 12){ - $j=1; - echo $TableHeader; - } //end of page full new headings if } //end of while loop @@ -855,38 +847,38 @@ echo '<table cellpadding="2" width="95%" class="selection">'; if (isset($_POST['Quotations']) AND $_POST['Quotations']=='Orders_Only'){ - $tableheader = '<tr> + $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 class="ascending" onclick="SortSelect(this)" >' . _('Customer') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Branch') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Cust Order') . ' #</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Order Date') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Req Del Date') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Delivery To') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('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>'; + $TableHeader .= '<th>' . _('Place PO') . '</th></tr>'; } else { - $tableheader .= '</tr>'; + $TableHeader .= '</tr>'; } } else { /* displaying only quotations */ - $tableheader = '<tr> + $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> + <th class="ascending" onclick="SortSelect(this)" >' . _('Customer') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Branch') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Cust Ref') . ' #</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Quote Date') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Req Del Date') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Delivery To') . '</th> + <th class="ascending" onclick="SortSelect(this)" >' . _('Quote Total') . '<br />' . $_SESSION['CompanyRecord']['currencydefault'] . '</th> </tr>'; } - echo $tableheader; + echo $TableHeader; $i = 1; $j = 1; @@ -1003,12 +995,7 @@ $FormatedOrderValue); } $i++; - $j++; $OrdersTotal += $myrow['ordervalue']; - if ($j == 12){ - $j=1; - echo $tableheader; - } //end of page full new headings if }//end while loop through orders to display if ($_POST['Quotations']=='Orders_Only' Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/SelectSupplier.php 2013-08-13 19:44:04 UTC (rev 6197) @@ -273,19 +273,17 @@ <br /> <br /> <table cellpadding="2">'; - $tableheader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Supplier Name') . '</th> - <th>' . _('Currency') . '</th> - <th>' . _('Address 1') . '</th> - <th>' . _('Address 2') . '</th> - <th>' . _('Address 3') . '</th> - <th>' . _('Address 4') . '</th> - <th>' . _('Telephone') . '</th> - <th>' . _('Email') . '</th> - </tr>'; - echo $tableheader; - $j = 1; + echo '<tr> + <th class="ascending" onclick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Supplier Name') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Currency') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Address 1') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Address 2') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Address 3') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Address 4') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Telephone') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Email') . '</th> + </tr>'; $k = 0; //row counter to determine background colour $RowIndex = 0; if (DB_num_rows($result) <> 0) { @@ -402,4 +400,4 @@ } echo '<script type="text/javascript">defaultControl(document.forms[0].SupplierCode);</script>'; include ('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/ShopParameters.php 2013-08-13 19:44:04 UTC (rev 6197) @@ -73,24 +73,8 @@ if ($_SESSION['ShopStockLocations'] != $ShopStockLocations){ $SQL[] = "UPDATE config SET confvalue='" . $ShopStockLocations . "' WHERE confname='ShopStockLocations'"; } - } - - if ($_SESSION['ShopShowTopCategoryMenu'] != $_POST['X_ShopShowTopCategoryMenu'] ) { - $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowTopCategoryMenu']."' WHERE confname = 'ShopShowTopCategoryMenu'"; } - if ($_SESSION['ShopShowLeftCategoryMenu'] != $_POST['X_ShopShowLeftCategoryMenu'] ) { - $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowLeftCategoryMenu']."' WHERE confname = 'ShopShowLeftCategoryMenu'"; - } - - if ($_SESSION['ShopShowLogoAndShopName'] != $_POST['X_ShopShowLogoAndShopName'] ) { - $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowLogoAndShopName']."' WHERE confname = 'ShopShowLogoAndShopName'"; - } - - if ($_SESSION['ShopShowInfoLinks'] != $_POST['X_ShopShowInfoLinks'] ) { - $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopShowInfoLinks']."' WHERE confname = 'ShopShowInfoLinks'"; - } - if ($_SESSION['ShopAllowSurcharges'] != $_POST['X_ShopAllowSurcharges'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopAllowSurcharges']."' WHERE confname = 'ShopAllowSurcharges'"; } @@ -177,6 +161,9 @@ } $ErrMsg = _('The shop configuration could not be updated because'); $DbgMsg = _('The SQL that failed was:'); + + print_r($SQL); + if (sizeof($SQL) > 0 ) { $result = DB_Txn_Begin($db); foreach ($SQL as $SqlLine) { @@ -367,68 +354,8 @@ <td>' . _('Select the webERP service item to use for payment surcharges to be processed as') . '</td> </tr>'; -echo '<tr><th colspan="3">' . _('Web-Store CMS Integration Settings') . '</th></tr>'; -echo $TableHeader; - echo '<tr> - <td>' . _('Show/Hide Top Sales Categories Menu') . ':</td> - <td><select name="X_ShopShowTopCategoryMenu">'; -if ($_SESSION['ShopShowTopCategoryMenu'] == '1') { - echo '<option selected="selected" value="1">' . _('Show') . '</option>'; - echo '<option value="0">' . _('Hide') . '</option>'; -} else { - echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; - echo '<option value="1">' . _('Show') . '</option>'; -} - -echo '</select></td> - <td>' . _('Shows / Hides the horizontal sales categories menu below the webSHOP cart summary.') . '</td> - </tr>'; - -echo '<tr> - <td>' . _('Show/Hide Left Sales Categories Menu') . ':</td> - <td><select name="X_ShopShowLeftCategoryMenu">'; -if ($_SESSION['ShopShowLeftCategoryMenu'] == '1') { - echo '<option selected="selected" value="1">' . _('Show') . '</option>'; - echo '<option value="0">' . _('Hide') . '</option>'; -} else { - echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; - echo '<option value="1">' . _('Show') . '</option>'; -} - -echo '</select></td> - <td>' . _('Shows / Hides the vertical sales categories menu on the left column.') . '</td> - </tr>'; - -echo '<tr> - <td>' . _('Show/Hide Logo and Shop Name') . ':</td> - <td><select name="X_ShopShowLogoAndShopName">'; -if ($_SESSION['ShopShowLogoAndShopName'] == '1') { - echo '<option selected="selected" value="1">' . _('Show') . '</option>'; - echo '<option value="0">' . _('Hide') . '</option>'; -} else { - echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; - echo '<option value="1">' . _('Show') . '</option>'; -} -echo '</select></td> - <td>' . _('Shows / Hides the logo and webSHOP names. Useful to use Hide if webSHOP is used as an iFrame in a CMS system, if the information displayed is already in the CMS system.') . '</td> - </tr>'; - -echo '<tr> - <td>' . _('Show/Hide InfoLinks Menu') . ':</td> - <td><select name="X_ShopShowInfoLinks">'; -if ($_SESSION['ShopShowInfoLinks'] == '1') { - echo '<option selected="selected" value="1">' . _('Show') . '</option>'; - echo '<option value="0">' . _('Hide') . '</option>'; -} else { - echo '<option selected="selected" value="0">' . _('Hide') . '</option>'; - echo '<option value="1">' . _('Show') . '</option>'; -} -echo '</select></td> - <td>' . _('Shows / Hides the information links menu at the footer of all the shop webpages. Useful to use Hide if webSHOP is used as an iFrame in a CMS system, if the information displayed is already in the CMS system.') . '</td> - </tr>'; - -echo '<tr><th colspan="3">' . _('Bank Transfer Settings') . '</th></tr>'; + <th colspan="3">' . _('Bank Transfer Settings') . '</th></tr>'; echo $TableHeader; echo '<tr> @@ -638,4 +565,4 @@ </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/css/aguapop/default.css =================================================================== --- trunk/css/aguapop/default.css 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/css/aguapop/default.css 2013-08-13 19:44:04 UTC (rev 6197) @@ -70,18 +70,31 @@ font-weight:normal; padding:3px; } - th.ascending { cursor: s-resize; - color:green; - background: url(images/ascending.png) center right no-repeat; } - th.descending { cursor: n-resize; - color:blue; - background: url(images/descending.png) centre right no-repeat; } +th:after { + content: ""; + float: right; + margin-top: 7px; + visibility: hidden; +} +th.ascending:after { + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: visible; +} +th.descending:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; +} th.number { text-align: right; font-weight: normal; @@ -469,4 +482,4 @@ margin-top:15px; } -/**** END ***/ \ No newline at end of file +/**** END ***/ Deleted: trunk/css/aguapop/images/ascending.png =================================================================== (Binary files differ) Deleted: trunk/css/aguapop/images/descending.png =================================================================== (Binary files differ) Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/css/default/default.css 2013-08-13 19:44:04 UTC (rev 6197) @@ -54,19 +54,31 @@ background-color:#B06161; color:white; } - th.ascending { cursor: s-resize; - color:#B06161; - background: url(images/ascending.png) center right no-repeat; } - th.descending { cursor: n-resize; - color:#B06161; - background: url(images/descending.png) centre right no-repeat; } - +th:after { + content: ""; + float: right; + margin-top: 7px; + visibility: hidden; +} +th.ascending:after { + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: visible; +} +th.descending:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; +} th.number{ text-align:right; font-weight:normal; Deleted: trunk/css/default/images/ascending.png =================================================================== (Binary files differ) Deleted: trunk/css/default/images/descending.png =================================================================== (Binary files differ) Modified: trunk/css/fluid/default.css =================================================================== --- trunk/css/fluid/default.css 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/css/fluid/default.css 2013-08-13 19:44:04 UTC (rev 6197) @@ -56,16 +56,31 @@ color:#330000; text-align:right; } - th.ascending { cursor: s-resize; - background: url(images/ascending.png) center right no-repeat; } - th.descending { cursor: n-resize; - background: url(images/descending.png) centre right no-repeat; } +th:after { + content: ""; + float: right; + margin-top: 7px; + visibility: hidden; +} +th.ascending:after { + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: visible; +} +th.descending:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; +} td{ font-family:Arial, Verdana, Helvetica; text-align:left; Deleted: trunk/css/fluid/images/ascending.png =================================================================== (Binary files differ) Deleted: trunk/css/fluid/images/descending.png =================================================================== (Binary files differ) Modified: trunk/css/fresh/default.css =================================================================== --- trunk/css/fresh/default.css 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/css/fresh/default.css 2013-08-13 19:44:04 UTC (rev 6197) @@ -77,12 +77,29 @@ } th.ascending { cursor: s-resize; - background: url(images/ascending.png) center right no-repeat; } th.descending { cursor: n-resize; - background: url(images/descending.png) centre right no-repeat; } +th:after { + content: ""; + float: right; + margin-top: 7px; + visibility: hidden; +} +th.ascending:after { + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: visible; +} +th.descending:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; +} td { text-align: left; } @@ -486,4 +503,4 @@ clear:left; /* below */ } -/*** END ***/ \ No newline at end of file +/*** END ***/ Deleted: trunk/css/fresh/images/ascending.png =================================================================== (Binary files differ) Deleted: trunk/css/fresh/images/descending.png =================================================================== (Binary files differ) Modified: trunk/css/gel/default.css =================================================================== --- trunk/css/gel/default.css 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/css/gel/default.css 2013-08-13 19:44:04 UTC (rev 6197) @@ -76,15 +76,29 @@ } th.ascending { cursor: s-resize; - color:green; - background: url(images/ascending.png) center right no-repeat; } - th.descending { cursor: n-resize; - color:blue; - background: url(images/descending.png) centre right no-repeat; } +th:after { + content: ""; + float: right; + margin-top: 7px; + visibility: hidden; +} +th.ascending:after { + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: visible; +} +th.descending:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; +} td { font-family: Arial, Verdana, Helvetica, sans-serif; text-align: left; @@ -528,4 +542,4 @@ margin-top:-22px; /* go up to center */ } -/*** END ***/ \ No newline at end of file +/*** END ***/ Deleted: trunk/css/gel/images/ascending.png =================================================================== (Binary files differ) Deleted: trunk/css/gel/images/descending.png =================================================================== (Binary files differ) Modified: trunk/css/professional/default.css =================================================================== --- trunk/css/professional/default.css 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/css/professional/default.css 2013-08-13 19:44:04 UTC (rev 6197) @@ -96,12 +96,29 @@ } th.ascending { cursor: s-resize; - background: url(images/ascending.png) center right no-repeat; } th.descending { cursor: n-resize; - background: url(images/descending.png) centre right no-repeat; } +th:after { + content: ""; + float: right; + margin-top: 7px; + visibility: hidden; +} +th.ascending:after { + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: visible; +} +th.descending:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; +} th.number { font-weight: normal; background-color: #cccce5; @@ -511,4 +528,4 @@ clear:left; /* below */ } -/*** END ***/ \ No newline at end of file +/*** END ***/ Deleted: trunk/css/professional/images/ascending.png =================================================================== (Binary files differ) Deleted: trunk/css/professional/images/descending.png =================================================================== (Binary files differ) Modified: trunk/css/professional-rtl/default.css =================================================================== --- trunk/css/professional-rtl/default.css 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/css/professional-rtl/default.css 2013-08-13 19:44:04 UTC (rev 6197) @@ -107,12 +107,29 @@ } th.ascending { cursor: s-resize; - background: url(images/ascending.png) center right no-repeat; } th.descending { cursor: n-resize; - background: url(images/descending.png) centre right no-repeat; } +th:after { + content: ""; + float: right; + margin-top: 7px; + visibility: hidden; +} +th.ascending:after { + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: visible; +} +th.descending:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; +} div.error { background-color:#fddbdb; color: red; @@ -531,4 +548,4 @@ clear:right; /* below */ } -/*** END ***/ \ No newline at end of file +/*** END ***/ Deleted: trunk/css/professional-rtl/images/ascending.png =================================================================== (Binary files differ) Deleted: trunk/css/professional-rtl/images/descending.png =================================================================== (Binary files differ) Modified: trunk/css/silverwolf/default.css =================================================================== --- trunk/css/silverwolf/default.css 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/css/silverwolf/default.css 2013-08-13 19:44:04 UTC (rev 6197) @@ -78,13 +78,29 @@ } th.ascending { cursor: s-resize; - background: url(images/ascending.png) center right no-repeat; } - th.descending { cursor: n-resize; - background: url(images/descending.png) centre right no-repeat; } +th:after { + content: ""; + float: right; + margin-top: 7px; + visibility: hidden; +} +th.ascending:after { + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: visible; +} +th.descending:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; +} td{ font-family:Arial, Verdana, Helvetica, sans-serif; font-size:100%; @@ -487,4 +503,4 @@ margin-top:-22px; /* go up to center */ } -/*** END ***/ \ No newline at end of file +/*** END ***/ Deleted: trunk/css/silverwolf/images/ascending.png =================================================================== (Binary files differ) Deleted: trunk/css/silverwolf/images/descending.png =================================================================== (Binary files differ) Modified: trunk/css/wood/default.css =================================================================== --- trunk/css/wood/default.css 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/css/wood/default.css 2013-08-13 19:44:04 UTC (rev 6197) @@ -85,9 +85,31 @@ background-color: #800000; color: white; } -th.SortableColumn { - cursor: s-resize; +th.ascending { + cursor: s-resize; } +th.descending { + cursor: n-resize; +} +th:after { + content: ""; + float: right; + margin-top: 7px; + visibility: hidden; +} +th.ascending:after { + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: visible; +} +th.descending:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; +} td { text-align: left; } @@ -550,4 +572,4 @@ margin-top:17px; } -/* END */ \ No newline at end of file +/* END */ Deleted: trunk/css/wood/images/ascending.png =================================================================== (Binary files differ) Deleted: trunk/css/wood/images/descending.png =================================================================== (Binary files differ) Modified: trunk/includes/CountriesArray.php =================================================================== --- trunk/includes/CountriesArray.php 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/includes/CountriesArray.php 2013-08-13 19:44:04 UTC (rev 6197) @@ -209,7 +209,8 @@ $CountriesArray['WS'] = _('Samoa'); $CountriesArray['YE'] = _('Yemen'); $CountriesArray['ZM'] = _('Zambia'); +$CountriesArray['ZA'] = _('South Africa'); $CountriesArray['ZW'] = _('Zimbabwe'); asort($CountriesArray); -?> \ No newline at end of file +?> Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/javascripts/MiscFunctions.js 2013-08-13 19:44:04 UTC (rev 6197) @@ -252,7 +252,7 @@ direction="a"; } else { selElem.className='ascending'; - direction="a"; + direction="d"; } } } Modified: trunk/sql/mysql/upgrade4.10-4.11.sql =================================================================== --- trunk/sql/mysql/upgrade4.10-4.11.sql 2013-08-13 03:07:05 UTC (rev 6196) +++ trunk/sql/mysql/upgrade4.10-4.11.sql 2013-08-13 19:44:04 UTC (rev 6197) @@ -164,11 +164,10 @@ INSERT INTO config VALUES ('ShopShowOnlyAvailableItems','0'); INSERT INTO config VALUES ('ShopShowQOHColumn','1'); INSERT INTO config VALUES ('ShopStockLocations',''); -INSERT INTO config VALUES ('ShopShowLeftCategoryMenu','1'); + ALTER TABLE `freightcosts` ADD `destinationcountry` VARCHAR( 40 ) NOT NULL AFTER `locationfrom`; -INSERT INTO config VALUES ('ShopShowInfoLinks','1'); INSERT INTO config VALUES ('ShopTitle','Shop Home'); ALTER TABLE `stockmaster` CHANGE `kgs` `grossweight` DECIMAL( 20, 4 ) NOT NULL DEFAULT '0.0000'; @@ -177,9 +176,6 @@ CHANGE `brpostaddr4` `brpostaddr4` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '', CHANGE `brpostaddr6` `brpostaddr6` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''; -INSERT INTO config VALUES ('ShopShowTopCategoryMenu','1'); -INSERT INTO config VALUES ('ShopShowLogoAndShopName','1'); - ALTER TABLE `stockcategory` ADD `defaulttaxcatid` TINYINT NOT NULL DEFAULT '1'; ALTER TABLE `salescat` ADD `active` INT NOT NULL DEFAULT '1' COMMENT '1 if active 0 if inactive'; |
From: <dai...@us...> - 2013-08-14 10:52:02
|
Revision: 6210 http://sourceforge.net/p/web-erp/reponame/6210 Author: daintree Date: 2013-08-14 10:51:59 +0000 (Wed, 14 Aug 2013) Log Message: ----------- html5 and column sorting Modified Paths: -------------- trunk/ImportBankTransAnalysis.php trunk/PO_SelectOSPurchOrder.php trunk/PO_SelectPurchOrder.php trunk/Prices.php Modified: trunk/ImportBankTransAnalysis.php =================================================================== --- trunk/ImportBankTransAnalysis.php 2013-08-14 10:33:59 UTC (rev 6209) +++ trunk/ImportBankTransAnalysis.php 2013-08-14 10:51:59 UTC (rev 6210) @@ -203,11 +203,11 @@ <th colspan="5">' . _('General ledger Analysis') . '</th> </tr> <tr> - <th>' . _('Account') . '</th> - <th>' . _('Name') . '</th> - <th>' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['Statement']->CurrCode . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Account') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Name') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Amount') . '<br />' . _('in') . ' ' . $_SESSION['Statement']->CurrCode . '</th> <th>' . _('Narrative') . '</th> - <th>' . _('Tag') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Tag') . '</th> </tr>'; echo $TableHeader; $TotalGLValue=0; @@ -235,17 +235,17 @@ } echo '<tr> - <td colspan="2" class="number"><font size=4 color=blue>' . _('Total of GL Entries') . ':</font></td> - <td class="number"><font size=2 color=navy>' . locale_number_format($TotalGLValue,$_SESSION['Statement']->CurrDecimalPlaces) . '</font></td> + <td colspan="2" class="number">' . _('Total of GL Entries') . ':</td> + <td class="number">' . locale_number_format($TotalGLValue,$_SESSION['Statement']->CurrDecimalPlaces) . '</td> </tr> <tr> - <td colspan="2" class="number"><font size=4 color=blue>' . _('Total Bank Transaction') . ':</font></td> - <td class="number">' . locale_number_format($_SESSION['Trans'][$TransID]->Amount,$_SESSION['Statement']->CurrDecimalPlaces) . '</font></td> + <td colspan="2" class="number">' . _('Total Bank Transaction') . ':</td> + <td class="number">' . locale_number_format($_SESSION['Trans'][$TransID]->Amount,$_SESSION['Statement']->CurrDecimalPlaces) . '</td> </tr> <tr>'; if (($_SESSION['Trans'][$TransID]->Amount - $TotalGLValue)!=0) { - echo '<td colspan="2" class="number"><font size=4 color=blue>' . _('Yet To Enter') . ':</font></td> + echo '<td colspan="2" class="number">' . _('Yet To Enter') . ':</font></td> <td class="number"><font size="4" color="red">' . locale_number_format($_SESSION['Trans'][$TransID]->Amount-$TotalGLValue,$_SESSION['Statement']->CurrDecimalPlaces) . '</td>'; } else { echo '<th colspan="5"><font size="4" color="green">' . _('Reconciled') . '</th>'; @@ -323,4 +323,4 @@ } echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2013-08-14 10:33:59 UTC (rev 6209) +++ trunk/PO_SelectOSPurchOrder.php 2013-08-14 10:51:59 UTC (rev 6210) @@ -32,9 +32,9 @@ $SelectedSupplier = trim($_POST['SelectedSupplier']); } -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post">'; -echo '<div>'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($_POST['ResetPart'])) { @@ -142,7 +142,7 @@ echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p>'; echo '<table class="selection"> <tr> - <td>' . _('Order Number') . ': <input type="text" name="OrderNumber" maxlength="8" size="9" /> ' . _('Into Stock Location') . ': + <td>' . _('Order Number') . ': <input type="text" name="OrderNumber" autofocus="autofocus" maxlength="8" size="9" /> ' . _('Into Stock Location') . ': <select name="StockLocation">'; $sql = "SELECT loccode, locationname FROM locations"; @@ -232,11 +232,11 @@ if (isset($StockItemsResult)) { echo '<table cellpadding="2" class="selection">'; $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('On Hand') . '</th> - <th>' . _('Orders') . '<br />' . _('Outstanding') . '</th> - <th>' . _('Units') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('On Hand') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Orders') . '<br />' . _('Outstanding') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Units') . '</th> </tr>'; echo $TableHeader; $j = 1; @@ -470,17 +470,17 @@ echo '<tr> - <th>' . _('Order #') . '</th> - <th>' . _('Order Date') . '</th> - <th>' . _('Delivery Date') . '</th> - <th>' . _('Initiated by') . '</th> - <th>' . _('Supplier') . '</th> - <th>' . _('Currency') . '</th>'; + <th class="ascending" onclick="SortSelect(this)">' . _('Order #') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Order Date') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Delivery Date') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Initiated by') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Supplier') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Currency') . '</th>'; if (in_array($PricesSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PricesSecurity)) { - echo '<th>' . _('Order Total') . '</th>'; + echo '<th class="ascending" onclick="SortSelect(this)">' . _('Order Total') . '</th>'; } - echo '<th>' . _('Status') . '</th> + echo '<th class="ascending" onclick="SortSelect(this)">' . _('Status') . '</th> <th>' . _('Print') . '</th> <th>' . _('Receive') . '</th> </tr>'; @@ -533,16 +533,14 @@ echo '<td class="number">' . $FormatedOrderValue . '</td>'; } echo '<td>' . _($myrow['status']) . '</td> - <td>' . $PrintPurchOrder . '</td> - <td>' . $ReceiveOrder . '</td> - </tr>'; - //end of page full new headings if + <td>' . $PrintPurchOrder . '</td> + <td>' . $ReceiveOrder . '</td> + </tr>'; } //end of while loop around purchase orders retrieved echo '</table>'; } -echo '<script type="text/javascript">defaultControl(document.forms[0].StockCode);</script>'; echo '</div> </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2013-08-14 10:33:59 UTC (rev 6209) +++ trunk/PO_SelectPurchOrder.php 2013-08-14 10:51:59 UTC (rev 6210) @@ -115,7 +115,7 @@ if (isset($SelectedStockItem)) { echo _('For the part') . ':<b>' . $SelectedStockItem . '</b> ' . _('and') . ' <input type="hidden" name="SelectedStockItem" value="' . $SelectedStockItem . '" />'; } - echo _('Order Number') . ': <input type="text" name="OrderNumber" maxlength="8" size="9" /> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; + echo _('Order Number') . ': <input type="text" name="OrderNumber" autofocus="autofocus" maxlength="8" size="9" /> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql, $db); while ($myrow = DB_fetch_array($resultStkLocs)) { @@ -209,11 +209,12 @@ if (isset($StockItemsResult)) { echo '<table class="selection">'; - $TableHeader = '<tr><th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('On Hand') . '</th> - <th>' . _('Orders') . '<br />' . _('Outstanding') . '</th> - <th>' . _('Units') . '</th> + $TableHeader = '<tr> + <th class="ascending" onclick="SortSelect(this)">' . _('Code') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Description') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('On Hand') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Orders') . '<br />' . _('Outstanding') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Units') . '</th> </tr>'; echo $TableHeader; $j = 1; @@ -480,4 +481,4 @@ echo '</div> </form>'; include ('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2013-08-14 10:33:59 UTC (rev 6209) +++ trunk/Prices.php 2013-08-14 10:51:59 UTC (rev 6210) @@ -213,15 +213,15 @@ <th colspan="7"> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />' . _('Pricing for part') . ': - <input type="text" name="Item" size="22" value="' . $Item . '" maxlength="20" /> + <input type="text" required="required" autofocus="autofocus" name="Item" size="22" value="' . $Item . '" maxlength="20" /> <input type="submit" name="NewPart" value="' . _('Review Prices') . '" /></th> </tr>'; - echo '<tr><th>' . _('Currency') . '</th> - <th>' . _('Sales Type') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Start Date') . ' </th> - <th>' . _('End Date') . '</th> + echo '<tr><th class="ascending" onclick="SortSelect(this)">' . _('Currency') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Sales Type') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Price') . '</th> + <th class="ascending" onclick="SortSelect(this)">' . _('Start Date') . ' </th> + <th class="ascending" onclick="SortSelect(this)">' . _('End Date') . '</th> </tr>'; $k=0; //row colour counter @@ -306,7 +306,8 @@ DB_free_result($result); -echo '</select> </td></tr> +echo '</select> </td> + </tr> <tr> <td>' . _('Sales Type Price List') . ':</td> <td><select name="TypeAbbrev">'; @@ -334,13 +335,13 @@ $_POST['EndDate'] = ''; } echo '<tr><td>' . _('Price Effective From Date') . ':</td> - <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="StartDate" size="10" maxlength="10" value="' . $_POST['StartDate'] . '" /></td></tr>'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="StartDate" required="required" size="10" maxlength="10" title="' . _('Enter the date from which this price should take effect.') . '" value="' . $_POST['StartDate'] . '" /></td></tr>'; echo '<tr><td>' . _('Price Effective To Date') . ':</td> - <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EndDate" size="10" maxlength="10" value="' . $_POST['EndDate'] . '" />'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="EndDate" size="10" maxlength="10" title="' . _('Enter the date to which this price should be in effect to, or leave empty if the price should continue indefinitely') . '" value="' . $_POST['EndDate'] . '" />'; echo '<input type="hidden" name="Item" value="' . $Item.'" /></td></tr>'; echo '<tr><td>' . _('Price') . ':</td> <td> - <input type="text" class="number" name="Price" size="12" maxlength="11" value="'; + <input type="text" class="number" required="required" name="Price" size="12" maxlength="11" value="'; if (isset($_POST['Price'])) { echo $_POST['Price']; } @@ -434,4 +435,4 @@ } // end function ReSequenceEffectiveDates -?> \ No newline at end of file +?> |