From: <dai...@us...> - 2013-10-11 23:23:12
|
Revision: 6350 http://sourceforge.net/p/web-erp/reponame/6350 Author: daintree Date: 2013-10-11 23:23:08 +0000 (Fri, 11 Oct 2013) Log Message: ----------- Tim: link to allocations and manual links Modified Paths: -------------- trunk/InternalStockRequest.php trunk/InternalStockRequestAuthorisation.php trunk/InternalStockRequestFulfill.php trunk/PO_Header.php trunk/Payments.php trunk/ShopParameters.php trunk/doc/Change.log trunk/doc/Manual/ManualInventory.html trunk/includes/FreightCalculation.inc trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/InternalStockRequest.php =================================================================== --- trunk/InternalStockRequest.php 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/InternalStockRequest.php 2013-10-11 23:23:08 UTC (rev 6350) @@ -6,6 +6,8 @@ include('includes/session.inc'); $Title = _('Create an Internal Materials Request'); +$ViewTopic = 'Inventory'; +$BookMark = 'CreateRequest'; include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); Modified: trunk/InternalStockRequestAuthorisation.php =================================================================== --- trunk/InternalStockRequestAuthorisation.php 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/InternalStockRequestAuthorisation.php 2013-10-11 23:23:08 UTC (rev 6350) @@ -5,6 +5,8 @@ include('includes/session.inc'); $Title = _('Authorise Internal Stock Requests'); +$ViewTopic = 'Inventory'; +$BookMark = 'AuthoriseRequest'; include('includes/header.inc'); Modified: trunk/InternalStockRequestFulfill.php =================================================================== --- trunk/InternalStockRequestFulfill.php 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/InternalStockRequestFulfill.php 2013-10-11 23:23:08 UTC (rev 6350) @@ -5,6 +5,8 @@ include('includes/session.inc'); $Title = _('Fulfill Stock Requests'); +$ViewTopic = 'Inventory'; +$BookMark = 'FulfilRequest'; include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/PO_Header.php 2013-10-11 23:23:08 UTC (rev 6350) @@ -1015,7 +1015,7 @@ </tr> <tr> <td>' . _('Phone') . ':</td> - <td><input type="tel" name="Tel" pattern="[0-9+\-\s]*" 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> Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/Payments.php 2013-10-11 23:23:08 UTC (rev 6350) @@ -602,7 +602,7 @@ '" . $_SESSION['PaymentDetail' . $identifier]->FunctionalExRate . "', '" . FormatDateForSQL($_SESSION['PaymentDetail' . $identifier]->DatePaid) . "', '" . $_SESSION['PaymentDetail' . $identifier]->Paymenttype . "', - '" . -$PaymentItem->Amount . "', + '" . -$_SESSION['PaymentDetail' . $identifier]->Amount . "', '" . $_SESSION['PaymentDetail' . $identifier]->Currency . "' )"; $ErrMsg = _('Cannot insert a bank transaction because'); @@ -629,12 +629,15 @@ /*Set up a newy in case user wishes to enter another */ if (isset($LastSupplier) and $LastSupplier!='') { - $sql="SELECT suppname FROM suppliers + $SupplierSQL="SELECT suppname FROM suppliers WHERE supplierid='".$LastSupplier."'"; - $result=DB_query($sql, $db); - $myrow=DB_fetch_array($result); - echo '<br /><a href="' . $RootPath . '/Payments.php?SupplierID=' . $LastSupplier . '">' . - _('Enter another Payment for') . ' ' . $myrow['suppname'] . '</a>'; + $SupplierResult = DB_query($SupplierSQL, $db); + $SupplierRow = DB_fetch_array($SupplierResult); + $TransSQL = "SELECT id FROM supptrans WHERE type=22 AND transno='" . $TransNo . "'"; + $TransResult = DB_query($IdSQL, $db); + $TransRow = DB_fetch_array($IdResult); + echo '<br /><a href="' . $RootPath . '/SupplierAllocations.php?AllocTrans=' . $TransRow['id'] . '">' . _('Allocate this payment') . '</a>'; + echo '<br /><a href="' . $RootPath . '/Payments.php?SupplierID=' . $LastSupplier . '">' . _('Enter another Payment for') . ' ' . $SupplierRow['suppname'] . '</a>'; } else { echo '<br /><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Enter another General Ledger Payment') . '</a><br />'; } Modified: trunk/ShopParameters.php =================================================================== --- trunk/ShopParameters.php 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/ShopParameters.php 2013-10-11 23:23:08 UTC (rev 6350) @@ -107,8 +107,8 @@ if ($_SESSION['ShopPayPalBankAccount'] != $_POST['X_ShopPayPalBankAccount'] ) { $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopPayPalBankAccount']."' WHERE confname = 'ShopPayPalBankAccount'"; } - if ($_SESSION['ShopFreightModule'] != $_POST['X_ShopFreightModule'] ) { - $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopFreightModule']."' WHERE confname = 'ShopFreightModule'"; + if ($_SESSION['ShopFreightMethod'] != $_POST['X_ShopFreightMethod'] ) { + $SQL[] = "UPDATE config SET confvalue = '".$_POST['X_ShopFreightMethod']."' WHERE confname = 'ShopFreightMethod'"; } if (!$AllowDemoMode) { @@ -165,9 +165,8 @@ $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) { $result = DB_query($SqlLine,$db,$ErrMsg,$DbgMsg,true); @@ -359,17 +358,17 @@ echo '<tr> <td>' . _('Freight Calculations') . ':</td> - <td><select name="X_ShopFreightModule">'; + <td><select name="X_ShopFreightMethod">'; -$FreightModules = array(array('MethodName'=>'No Freight','MethodCode'=>'NoFreight'), - array('MethodName'=>'webERP calculation','MethodCode'=>'webERPDefault'), +$FreightMethods = array(array('MethodName'=>'No Freight','MethodCode'=>'NoFreight'), + array('MethodName'=>'webERP calculation','MethodCode'=>'webERPCalculation'), array('MethodName'=>'Australia Post API','MethodCode'=>'AusPost')); -foreach($FreightModules as $FreightCalc){ - if ($_SESSION['ShopFreightModule'] ==$FreightCalc['MethodCode']) { - echo '<option selected="selected" value="' . $FreightCalc['MethodCode'] . '">' . $FreightCalc['MethodName'] . '</option>'; +foreach($FreightMethods as $FreightMethod){ + if ($_SESSION['ShopFreightMethod'] == $FreightMethod['MethodCode']) { + echo '<option selected="selected" value="' . $FreightMethod['MethodCode'] . '">' . $FreightMethod['MethodName'] . '</option>'; } else { - echo '<option value="' . $FreightCalc['MethodCode'] . '">' . $FreightCalc['MethodName'] . '</option>'; + echo '<option value="' . $FreightMethod['MethodCode'] . '">' . $FreightMethod['MethodName'] . '</option>'; } } echo '</select></td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/doc/Change.log 2013-10-11 23:23:08 UTC (rev 6350) @@ -1,5 +1,8 @@ webERP Change Log -2013/10/09 Exson: commit the fixed "Unable to Locate Purchase Order Number" error when the PO is created by SO interface. Fixed provided by Tim and reported by Merci from webERP forum. + +11/10/13 Tim: Links for manual internal transfers and supplier payment link to allocations +9/10/13 Exson: commit the fixed "Unable to Locate Purchase Order Number" error when the PO is created by SO interface. Fixed provided by Tim and reported by Merci from webERP forum. +6/10/13 Phil: New script to show a grid of items by preferred supplier for placing purchase orders to the users's default inventory location - orders will be authorised if the user has authority and the auto-authorise config option is enabled. 3/10/13 icedlava: PO_Items.php with non-stock items still require GL Code in case of modified order at invoice time else SQL error is generated due to invalid GL Code. 2/10/13 David Lynn: Added new field url to suppliers modified SelectSupplier.php and Suppliers.php 28/9/13 wh_hsn: help with regular expression to trap quotes and backslashes for data-type="no-illegal-chars" Modified: trunk/doc/Manual/ManualInventory.html =================================================================== --- trunk/doc/Manual/ManualInventory.html 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/doc/Manual/ManualInventory.html 2013-10-11 23:23:08 UTC (rev 6350) @@ -481,18 +481,18 @@ <ul> <li> - <h3>Create a New Internal Stock Request</h3> + <h3><a id="CreateRequest">Create a New Internal Stock Request</a></h3 <p>An internal stock request is created in two parts. Firstly the header, which contains the Department that requires the items, the location that you wish the request to be fulfilled from, the date by which you require the items, and any narrative you wish to add to the request.</p> <p>Secondly the items required are selected and the quantities required are entered.</p> <p>Once you are happy that you have all the items and quantities enetered, submit the request for authorisation.</p> </li> <li> - <h3>Authorise Internal Stock Requests</h3> + <h3><a id="AuthoriseRequest">Authorise Internal Stock Requests</a></h3> <p>When a user chooses this option they will see all unauthorised stock requests that they are allowed to authorise. No other requests will appear. By ticking the authorise checkbox, and clicking on the update button they will authorise this request to be fulfilled.</p> </li> <li> - <h3>Fulfil Internal Stock Requests</h3> + <h3><a id="FulfilRequest">Fulfil Internal Stock Requests</a></h3> <p>When the warehouse open this option for their own warehouse, they will see any internal stock requests that are awaiting fulfillment. They can either fulfil all or part of a request. If not all of the request is fulfilled, but the rest will not be, the request can be marked as completed. Also a GL tag can be chosen to tag that entry against.</p> </li> </ul> Modified: trunk/includes/FreightCalculation.inc =================================================================== --- trunk/includes/FreightCalculation.inc 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/includes/FreightCalculation.inc 2013-10-11 23:23:08 UTC (rev 6350) @@ -51,7 +51,7 @@ AND destinationcountry = '" . $BrAddCountry . "' AND maxkgs > " . $TotalWeight . " AND maxcub >" . $TotalVolume . " "; - if (($BrAdd2 != "") OR ($BrAdd3 != "") OR ($BrAdd4 != "") OR ($BrAdd5 != "")){ + if (($BrAdd2 != '') OR ($BrAdd3 != '') OR ($BrAdd4 != '') OR ($BrAdd5 != '')){ // if there is some details of the address besides the country $sql .= " AND ("; foreach ($FindCity as $City) { @@ -61,7 +61,7 @@ /* For international shipments empty destination (ANY) is allowed */ $sql = $sql . " destination = '' OR"; } - $sql = mb_substr($sql, 0, strrpos($sql,' OR')) . ')'; + $sql = mb_substr($sql, 0, mb_strrpos($sql,' OR')) . ')'; } $CalcFreightCostResult = DB_query($sql,$db); Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2013-10-09 17:37:21 UTC (rev 6349) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2013-10-11 23:23:08 UTC (rev 6350) @@ -1,6 +1,6 @@ INSERT INTO scripts VALUES ('Z_UpdateSalesAnalysisWithLatestCustomerData.php','15','Update sales analysis with latest customer and branch salesperson sales area and salestype irrespective of what these settings were when the sale was made'); INSERT INTO scripts VALUES ('PurchaseByPrefSupplier.php','2','Purchase ordering by preferred supplier'); ALTER TABLE `suppliers` ADD COLUMN `url` varchar(50) NOT NULL DEFAULT ''; -INSERT INTO config ('ShopFreightModule','webERPDefault'); +INSERT INTO config VALUES ('ShopFreightMethod','webERPDefault'); #--UPDATE config SET confvalue='4.11.0' WHERE confname='VersionNumber'; |