|
From: <dai...@us...> - 2013-04-25 10:43:52
|
Revision: 5850
http://sourceforge.net/p/web-erp/reponame/5850
Author: daintree
Date: 2013-04-25 10:43:48 +0000 (Thu, 25 Apr 2013)
Log Message:
-----------
Bug fixes BOMs allowed serialised/controlled items to be serialised - now fixed. Contracts.php selection of customer fixed. WorkOrderIssue now only shows controlled items with a quantity in stock
Modified Paths:
--------------
trunk/BOMs.php
trunk/Contracts.php
trunk/WorkOrderIssue.php
trunk/doc/Change.log
Modified: trunk/BOMs.php
===================================================================
--- trunk/BOMs.php 2013-04-25 04:35:54 UTC (rev 5849)
+++ trunk/BOMs.php 2013-04-25 10:43:48 UTC (rev 5850)
@@ -307,7 +307,7 @@
} elseif ($InputError !=1 AND ! isset($SelectedComponent) AND isset($SelectedParent)) {
- /*Selected component is null cos no item selected on first time round so must be adding a record must be Submitting new entries in the new component form */
+ /*Selected component is null cos no item selected on first time round so must be adding a record must be Submitting new entries in the new component form */
//need to check not recursive BOM component of itself!
@@ -524,16 +524,17 @@
$DbgMsg = _('The SQL used to retrieve description of the parent part was');
$result=DB_query($sql,$db,$ErrMsg,$DbgMsg);
if( DB_num_rows($result) > 0 ) {
- echo '<table class="selection">';
- echo '<tr><td><div class="centre">'._('Phantom').' : ';
+ echo '<table class="selection">
+ <tr>
+ <td><div class="centre">'._('Phantom').' : ';
$ix = 0;
while ($myrow = DB_fetch_array($result)){
- echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'.
- $myrow['description'].' ('.$myrow['parent'].')</a>';
+ echo (($ix)?', ':'').'<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">'. $myrow['description'].' ('.$myrow['parent'].')</a>';
$ix++;
} //end while loop
- echo '</div></td></tr>';
- echo '</table>';
+ echo '</div></td>
+ </tr>
+ </table>';
}
echo '<br />
<table class="selection">';
@@ -592,7 +593,7 @@
echo '<div>';
echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
- if (isset($_GET['SelectedComponent']) and $InputError !=1) {
+ if (isset($_GET['SelectedComponent']) AND $InputError !=1) {
//editing a selected component from the link to the line item
$sql = "SELECT loccode,
@@ -626,6 +627,7 @@
echo '<tr>
<td>' . _('Component') . ':</td>
<td><b>' . $SelectedComponent . '</b></td>
+ <input type="hidden" name="Component" value="' . $SelectedComponent . '" />
</tr>';
} else { //end of if $SelectedComponent
@@ -690,7 +692,7 @@
$result = DB_query($sql,$db);
while ($myrow = DB_fetch_array($result)) {
- if (isset($_POST['LocCode']) and $myrow['loccode']==$_POST['LocCode']) {
+ if (isset($_POST['LocCode']) AND $myrow['loccode']==$_POST['LocCode']) {
echo '<option selected="selected" value="';
} else {
echo '<option value="';
@@ -719,7 +721,7 @@
echo '<select tabindex="3" name="WorkCentreAdded">';
while ($myrow = DB_fetch_array($result)) {
- if (isset($_POST['WorkCentreAdded']) and $myrow['code']==$_POST['WorkCentreAdded']) {
+ if (isset($_POST['WorkCentreAdded']) AND $myrow['code']==$_POST['WorkCentreAdded']) {
echo '<option selected="selected" value="';
} else {
echo '<option value="';
Modified: trunk/Contracts.php
===================================================================
--- trunk/Contracts.php 2013-04-25 04:35:54 UTC (rev 5849)
+++ trunk/Contracts.php 2013-04-25 10:43:48 UTC (rev 5850)
@@ -15,6 +15,13 @@
$_POST['SelectedCustomer']=$_GET['CustomerID'];
}
+foreach ($_POST as $FormVariableName=>$FormVariableValue) {
+ if (mb_substr($FormVariableName, 0, 6)=='Submit') {
+ $Index = mb_substr($FormVariableName, 6);
+ $_POST['SelectedCustomer']=$_POST['SelectedCustomer'.$Index];
+ $_POST['SelectedBranch']=$_POST['SelectedBranch'.$Index];
+ }
+}
$ViewTopic= 'Contracts';
$BookMark = 'CreateContract';
@@ -689,13 +696,6 @@
* or set because only one customer record returned from a search
* so parse the $Select string into debtorno and branch code */
- foreach ($_POST as $key => $value) {
- if (mb_substr($key, 0, 6)=='Submit') {
- $Index=mb_substr($key, 6, 1);
- $_POST['SelectedCustomer']=$_POST['SelectedCustomer'.$Index];
- $_POST['SelectedBranch']=$_POST['SelectedBranch'.$Index];
- }
- }
$_SESSION['Contract'.$identifier]->DebtorNo = $_POST['SelectedCustomer'];
$_SESSION['Contract'.$identifier]->BranchCode = $_POST['SelectedBranch'];
Modified: trunk/WorkOrderIssue.php
===================================================================
--- trunk/WorkOrderIssue.php 2013-04-25 04:35:54 UTC (rev 5849)
+++ trunk/WorkOrderIssue.php 2013-04-25 10:43:48 UTC (rev 5850)
@@ -792,7 +792,8 @@
$SerialNoResult = DB_query("SELECT serialno
FROM stockserialitems
WHERE stockid='" . $_POST['IssueItem'] . "'
- AND loccode='" . $_POST['FromLocation'] . "'",
+ AND loccode='" . $_POST['FromLocation'] . "'
+ AND quantity > 0",
$db,_('Could not retrieve the serial numbers available at the location specified because'));
if (DB_num_rows($SerialNoResult)==0){
echo '<tr>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2013-04-25 04:35:54 UTC (rev 5849)
+++ trunk/doc/Change.log 2013-04-25 10:43:48 UTC (rev 5850)
@@ -1,5 +1,8 @@
webERP Change Log
+25/4/13 Tim: Selecting customer in Contracts form was not working - fixed
+25/4/13 Bob Thomas: WorkOrderIssue.php was not showing the serialised items with a quantity that could be issued was showing them all in error
+25/4/13 Phil: BOMs.php fixed error that allowed auto issue to be flagged on serialised items
25/4/13 Phil: Rework includes/GLPostings.inc to avoid incorrect b/fwd balances on posting back to a period which did not previously exist.
19/4/13 Phil: Reported by Bob Thomas - BOMExtendedQty.php was missing purchase orders with status='Authorised' or Printed
18/4/13 Tim: Credit_Invoice.php missing $identifier in link causing details of credit note to be lost
|