From: <tim...@us...> - 2010-09-27 20:52:20
|
Revision: 3809 http://web-erp.svn.sourceforge.net/web-erp/?rev=3809&view=rev Author: tim_schofield Date: 2010-09-27 20:52:13 +0000 (Mon, 27 Sep 2010) Log Message: ----------- New script to show detail supplier transactions Modified Paths: -------------- trunk/SupplierTransInquiry.php trunk/doc/Change.log.html trunk/index.php Modified: trunk/SupplierTransInquiry.php =================================================================== --- trunk/SupplierTransInquiry.php 2010-09-27 20:24:44 UTC (rev 3808) +++ trunk/SupplierTransInquiry.php 2010-09-27 20:52:13 UTC (rev 3809) @@ -8,10 +8,12 @@ $title = _('Supplier Transactions Inquiry'); include('includes/header.inc'); +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Search') . + '" alt="">' . ' ' . $title . '</p>'; echo "<form action='" . $_SERVER['PHP_SELF'] . "' method=post>"; -echo '<table cellpadding=2><tr>'; +echo '<table cellpadding=2 class=selection><tr>'; echo '<td>' . _('Type') . ":</td><td><select name='TransType'> "; @@ -41,10 +43,9 @@ echo '<td>' . _('From') . ":</td><td><input type=TEXT class='date' alt='".$_SESSION['DefaultDateFormat']. "' name='FromDate' maxlength=10 size=11 VALUE=" . $_POST['FromDate'] . '></td>'; echo '<td>' . _('To') . ":</td><td><input type=TEXT class='date' alt='".$_SESSION['DefaultDateFormat']. "' name='ToDate' maxlength=10 size=11 VALUE=" . $_POST['ToDate'] . '></td>'; -echo "</tr></table><div class='centre'><input type=submit name='ShowResults' VALUE='" . _('Show Transactions') . "'>"; -echo '<hr>'; +echo "</tr></table><br /><div class='centre'><input type=submit name='ShowResults' VALUE='" . _('Show Transactions') . "'>"; -echo '</form></div>'; +echo '</form></div><br />'; if (isset($_POST['ShowResults']) && $_POST['TransType'] != ''){ $SQL_FromDate = FormatDateForSQL($_POST['FromDate']); @@ -78,7 +79,7 @@ $ErrMsg = _('The supplier transactions for the selected criteria could not be retrieved because') . ' - ' . DB_error_msg($db); $DbgMsg = _('The SQL that failed was'); - echo '<table cellpadding=2 BORDER=2>'; + echo '<table cellpadding=2 class=selection>'; $tableheader = "<tr> <th>" . _('Type') . "</th> @@ -102,7 +103,7 @@ echo '<tr class="EvenTableRows">'; $k=0; } else { - echo '<tr class="OddTableRows">';; + echo '<tr class="EvenTableRows">';; $k++; } @@ -121,27 +122,27 @@ $myrow['suppreference'], ConvertSQLDate($myrow['trandate']), $myrow['supplierno'] . ' - ' . $myrow['suppname'], - $myrow['trantext'], + $myrow['transtext'], ConvertSQLDate($myrow['duedate']), $myrow['rate'], number_format($myrow['totalamt'],2), $myrow['currcode'] ); - - $GLTransResult = DB_query('SELECT account, accountname, narrative, amount - FROM gltrans INNER JOIN chartmaster + + $GLTransResult = DB_query("SELECT account, accountname, narrative, amount + FROM gltrans INNER JOIN chartmaster ON gltrans.account=chartmaster.accountcode - WHERE type=' . $myrow['type'] . ' - AND typeno=' . $myrow['transno'], + WHERE type='" . $myrow['type'] . "' + AND typeno='" . $myrow['transno'] . "'", $db, _('Could not retrieve the GL transactions for this AP transaction')); - + if (DB_num_rows($GLTransResult)==0){ echo '<tr><td colspan=10>' . _('There are no GL transactions created for the above AP transaction') . '</td></tr>'; } else { - echo '<tr><td colspan=2></td><td colspan=8><table>'; - echo '<tr bgcolor=#FFFFFF><td colspan=2><b>' . _('GL Account') . '</b></td><td><b>' . _('Local Amount') . '</b></td><td><b>' . _('Narrative') . '</b></td></tr>'; + echo '<tr><td colspan=2></td><td colspan=8><table class=selection width=100%>'; + echo '<tr><th colspan=2><b>' . _('GL Account') . '</b></th><th><b>' . _('Local Amount') . '</b></th><th><b>' . _('Narrative') . '</b></th></tr>'; $CheckGLTransBalance =0; while ($GLTransRow = DB_fetch_array($GLTransResult)){ @@ -153,9 +154,9 @@ </tr>', $GLTransRow['account'], $GLTransRow['accountname'], - $GLTransRow['amount'], + number_format($GLTransRow['amount'],2), $GLTransRow['narrative']); - + $CheckGLTransBalance += $GLTransRow['amount']; } if (round($CheckGLTransBalance,5)!= 0){ Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-27 20:24:44 UTC (rev 3808) +++ trunk/doc/Change.log.html 2010-09-27 20:52:13 UTC (rev 3809) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>27/09/10 Tim: SupplierTransInquiry.php - New script to show detail supplier transactions</p> <p>27/09/10 Tim: SupplierTenders.php - SQL quoting corrections</p> <p>27/09/10 Tim: Suppliers.php - SQL quoting corrections</p> <p>27/09/10 Tim: SupplierInvoice.php - SQL quoting corrections and layout changes and improvements</p> Modified: trunk/index.php =================================================================== --- trunk/index.php 2010-09-27 20:24:44 UTC (rev 3808) +++ trunk/index.php 2010-09-27 20:52:13 UTC (rev 3809) @@ -447,6 +447,11 @@ </tr> <tr> <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/SupplierTransInquiry.php?' . SID . '">' . _('Supplier Transaction Inquiries') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> <?php echo GetRptLinks('ap'); ?> </td> </tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |