|
From: <dai...@us...> - 2014-10-03 21:29:04
|
Revision: 6905
http://sourceforge.net/p/web-erp/reponame/6905
Author: daintree
Date: 2014-10-03 21:28:56 +0000 (Fri, 03 Oct 2014)
Log Message:
-----------
defaulted factory location from WOIssues WO record
Modified Paths:
--------------
trunk/WorkOrderIssue.php
trunk/doc/Change.log
trunk/includes/ImportBankTrans_MT940_SCB.php
Modified: trunk/WorkOrderIssue.php
===================================================================
--- trunk/WorkOrderIssue.php 2014-09-30 08:55:26 UTC (rev 6904)
+++ trunk/WorkOrderIssue.php 2014-10-03 21:28:56 UTC (rev 6905)
@@ -564,6 +564,10 @@
}
DB_data_seek($WOResult,0);
+if (!isset($_POST['FromLocation'])){
+ $_POST['FromLocation']=$WORow['loccode'];
+}
+
while($WORow = DB_fetch_array($WOResult)){
echo '<tr>
@@ -581,19 +585,17 @@
<td>';
if (!isset($_POST['IssueItem'])){
- $LocResult = DB_query("SELECT locations.loccode,locationname
+ $LocResult = DB_query("SELECT locations.loccode,locationname
FROM locations
- INNER JOIN locationusers
- ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "'
+ INNER JOIN locationusers
+ ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "'
AND locationusers.canupd=1
WHERE locations.usedforwo = 1",$db);
echo '<select name="FromLocation">';
- if (!isset($_POST['FromLocation'])){
- $_POST['FromLocation']=$WORow['loccode'];
- }
+
while ($LocRow = DB_fetch_array($LocResult)){
if ($_POST['FromLocation'] ==$LocRow['loccode']){
echo '<option selected="selected" value="' . $LocRow['loccode'] .'">' . $LocRow['locationname'] . '</option>';
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2014-09-30 08:55:26 UTC (rev 6904)
+++ trunk/doc/Change.log 2014-10-03 21:28:56 UTC (rev 6905)
@@ -1,5 +1,7 @@
webERP Change Log
-30/09/14 Exson: Fixed the purchase order details status to be right when the PO is recovered from Cancelled status.
+
+4/10/14 Andrew Galuski: defaulted factory location from WO record
+30/09/14 Exson: Fixed the purchase order details status to be right when the PO is recovered from Cancelled status.
29/09/14 Exson: Change charset from latin1 to utf8 for supplierdiscounts.
27/09/14 RChacon: Add ascending class to have sortable columns, complete table-heads and add documentation.
21/9/14 Phil: Tidy up Dashboard to remove redundant code etc
Modified: trunk/includes/ImportBankTrans_MT940_SCB.php
===================================================================
--- trunk/includes/ImportBankTrans_MT940_SCB.php 2014-09-30 08:55:26 UTC (rev 6904)
+++ trunk/includes/ImportBankTrans_MT940_SCB.php 2014-10-03 21:28:56 UTC (rev 6905)
@@ -33,9 +33,9 @@
$ReadTheFile ='No';
}
if ($DebitOrCredit =='D'){
+ $_SESSION['Statement']->OpeningBalance = doubleval('-' . str_replace(',','.',substr($LineText,15)));
+ } else {
$_SESSION['Statement']->OpeningBalance = doubleval(str_replace(',','.',substr($LineText,15)));
- } else {
- $_SESSION['Statement']->OpeningBalance = doubleval('-' . str_replace(',','.',substr($LineText,15)));
}
$TransactionLine = false;
}
@@ -53,9 +53,9 @@
//Need to find end of value amount - find the , decimal point + 2 characters
$ValueEnd = strpos($LineText, ',', 12)+2;
if ($DebitOrCredit =='D'){
+ $TransAmount = doubleval('-' . str_replace(',','.',substr($LineText,12,$ValueEnd)));
+ } else {
$TransAmount = doubleval(str_replace(',','.',substr($LineText,12,$ValueEnd)));
- } else {
- $TransAmount = doubleval('-' . str_replace(',','.',substr($LineText,12,$ValueEnd)));
}
} else { // it will be either D or C
if (!is_numeric(substr($LineText,15,1)) ){
@@ -67,9 +67,9 @@
//Need to find end of value amount - find the , decimal point + 2 characters
$ValueEnd = strpos($LineText, ',', $ValueStart)+2;
if ($DebitOrCredit =='D'){
+ $TransAmount = doubleval('-' . str_replace(',','.',substr($LineText,$ValueStart,$ValueEnd)));
+ } else {
$TransAmount = doubleval(str_replace(',','.',substr($LineText,$ValueStart,$ValueEnd)));
- } else {
- $TransAmount = doubleval('-' . str_replace(',','.',substr($LineText,$ValueStart,$ValueEnd)));
}
}
@@ -83,19 +83,19 @@
}
}
- if (substr($LineText,0,1)!=':' AND $TransactionLine){
+ /* if (substr($LineText,0,1)!=':' AND $TransactionLine){
//then it is the continuation of an :86: line
- $_SESSION['Trans'][$i]->Description .= $LineText;
- }
+ $_SESSION['Trans'][$i]->Description .= $LineText;
+ }*/
if (substr($LineText,0,5)==':62F:'){
$DebitOrCredit = substr($LineText,5,1); //D or C
$_SESSION['Statement']->ClosingDate = ConvertSQLDate('20' . substr($LineText,6,2) . '-' . substr($LineText,8,2) . '-' . substr($LineText,10,2));
$CurrCode = substr($LineText,12,3);
if ($DebitOrCredit =='D'){
+ $_SESSION['Statement']->ClosingBalance = doubleval('-' . str_replace(',','.',substr($LineText,15)));
+ } else {
$_SESSION['Statement']->ClosingBalance = doubleval(str_replace(',','.',substr($LineText,15)));
- } else {
- $_SESSION['Statement']->ClosingBalance = doubleval('-' . str_replace(',','.',substr($LineText,15)));
}
$TransactionLine = false;
}
|