|
From: <rc...@us...> - 2016-08-14 13:26:19
|
Revision: 7588
http://sourceforge.net/p/web-erp/reponame/7588
Author: rchacon
Date: 2016-08-14 13:26:17 +0000 (Sun, 14 Aug 2016)
Log Message:
-----------
Show transaction date in report. Improvements in HTML code and code documentation.
Modified Paths:
--------------
trunk/SuppWhereAlloc.php
trunk/doc/Change.log
Modified: trunk/SuppWhereAlloc.php
===================================================================
--- trunk/SuppWhereAlloc.php 2016-08-13 19:29:57 UTC (rev 7587)
+++ trunk/SuppWhereAlloc.php 2016-08-14 13:26:17 UTC (rev 7588)
@@ -1,12 +1,13 @@
-<?php
-
+<?php
+/* $Id: SuppWhereAlloc.php 7449 2016-01-14 10:08:51Z exsonqu $*/
+/* Suppliers Where allocated */
+
include('includes/session.inc');
$Title = _('Supplier How Paid Inquiry');
-
$ViewTopic = 'APInquiries';
-$BookMark = 'WhereAllocated';
+$BookMark = 'WhereAllocated';
+include('includes/header.inc');
-include('includes/header.inc');
if (isset($_GET['TransNo']) AND isset($_GET['TransType'])) {
$_POST['TransNo'] = (int)$_GET['TransNo'];
$_POST['TransType'] = (int)$_GET['TransType'];
@@ -15,11 +16,12 @@
echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">
<div>
- <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
- <p class="page_title_text noprint">
- <img src="'.$RootPath.'/css/'.$Theme.'/images/money_add.png" title="' . _('Supplier Where Allocated'). '" alt="" />' . $Title . '
- </p>
- <table class="selection noprint">
+ <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />
+ <p class="page_title_text noprint"><img alt="" src="'. $RootPath. '/css/'. $Theme.
+ '/images/money_add.png" title="',// Icon image.
+ _('Supplier Where Allocated'), '" /> ',// Icon title.
+ $Title. '</p>',// Page title.
+ '<table class="selection noprint">
<tr>
<td>' . _('Type') . ':</td>
<td><select tabindex="1" name="TransType"> ';
@@ -60,7 +62,6 @@
if (isset($_POST['ShowResults']) AND $_POST['TransNo']!=''){
-
/*First off get the DebtorTransID of the transaction (invoice normally) selected */
$sql = "SELECT supptrans.id,
ovamount+ovgst AS totamt,
@@ -116,35 +117,36 @@
prnMsg(_('There are no allocations made against this transaction'),'info');
}
} else {
- $Printer = true;
- echo '<br />
- <div id="Report">
- <table class="selection">';
-
- echo '<tr>
- <th colspan="6">
- <div class="centre">
+ $Printer = true;
+ echo '<br />
+ <div id="Report">
+ <table class="selection">
+ <thead>
+ <tr>
+ <th class="centre" colspan="7">
<b>' . _('Allocations made against') . ' ' . $TitleInfo . ' ' . _('number') . ' ' . $_POST['TransNo'] . '<br />' . _('Transaction Total').': '. locale_number_format($myrow['totamt'],$CurrDecimalPlaces) . ' ' . $CurrCode . '</b>
- </div>
</th>
- </tr>';
+ </tr>';
+
+ $TableHeader = '<tr>
+ <th class="centre">' . _('Date') . '</th>
+ <th class="text">' . _('Type') . '</th>
+ <th class="number">' . _('Number') . '</th>
+ <th class="text">' . _('Reference') . '</th>
+ <th class="number">' . _('Ex Rate') . '</th>
+ <th class="number">' . _('Amount') . '</th>
+ <th class="number">' . _('Alloc') . '</th>
+ </tr>';
+ echo $TableHeader,
+ '</thead>
+ <tbody>';
- $TableHeader = '<tr>
- <th>' . _('Type') . '</th>
- <th>' . _('Number') . '</th>
- <th>' . _('Reference') . '</th>
- <th>' . _('Ex Rate') . '</th>
- <th>' . _('Amount') . '</th>
- <th>' . _('Alloc') . '</th>
- </tr>';
- echo $TableHeader;
-
$RowCounter = 1;
$k = 0; //row colour counter
$AllocsTotal = 0;
- while ($myrow=DB_fetch_array($TransResult)) {
- if ($k==1){
+ while($myrow=DB_fetch_array($TransResult)) {
+ if($k==1) {
echo '<tr class="EvenTableRows">';
$k=0;
} else {
@@ -158,13 +160,14 @@
$TransType = _('Purchase Invoice');
} else {
$TransType = _('Payment');
- }
- echo '<td>' . $TransType . '</td>
- <td>' . $myrow['transno'] . '</td>
- <td>' . $myrow['suppreference'] . '</td>
- <td>' . $myrow['rate'] . '</td>
- <td class="number">' . locale_number_format($myrow['totalamt'],$CurrDecimalPlaces) . '</td>
- <td class="number">' . locale_number_format($myrow['amt'],$CurrDecimalPlaces) . '</td>
+ }
+ echo ' <td class="centre">' . $myrow['trandate'] . '</td>
+ <td class="text">' . $TransType . '</td>
+ <td class="number">' . $myrow['transno'] . '</td>
+ <td class="text">' . $myrow['suppreference'] . '</td>
+ <td class="number">' . $myrow['rate'] . '</td>
+ <td class="number">' . locale_number_format($myrow['totalamt'], $CurrDecimalPlaces) . '</td>
+ <td class="number">' . locale_number_format($myrow['amt'], $CurrDecimalPlaces) . '</td>
</tr>';
$RowCounter++;
@@ -173,15 +176,15 @@
echo $TableHeader;
}
//end of page full new headings if
- $AllocsTotal +=$myrow['amt'];
+ $AllocsTotal += $myrow['amt'];
}
//end of while loop
echo '<tr>
- <td colspan="5" class="number">' . _('Total allocated') . '</td>
- <td class="number">' . locale_number_format($AllocsTotal,$CurrDecimalPlaces) . '</td>
- </tr>
- </table>
- </div>';
+ <td class="number" colspan="6">' . _('Total allocated') . '</td>
+ <td class="number">' . locale_number_format($AllocsTotal, $CurrDecimalPlaces) . '</td>
+ </tr>
+ </tbody></table>
+ </div>';
} // end if there are allocations against the transaction
} //got the ID of the transaction to find allocations for
}
@@ -196,5 +199,4 @@
</div>';// "Print This" button.
}
include('includes/footer.inc');
-
?>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2016-08-13 19:29:57 UTC (rev 7587)
+++ trunk/doc/Change.log 2016-08-14 13:26:17 UTC (rev 7588)
@@ -1,5 +1,6 @@
webERP Change Log
+14/8/16 RChacon:In SuppWhereAlloc.php, show transaction date in report. Improvements in HTML code and code documentation.
13/8/16 RChacon:In CustWhereAlloc.php, show transaction date in report. Standardise trandate in debtortrans. Improvements in HTML code and code documentation.
11/8/16 Phil: committed falkoners fix for the upgrade script - was not adding the new field in customercontact required for the customer statements email address
11/8/16 Simon Kelly: Fix SQL for location users in SelectSalesOrder.php
|