From: <rc...@us...> - 2014-08-15 00:34:26
|
Revision: 6820 http://sourceforge.net/p/web-erp/reponame/6820 Author: rchacon Date: 2014-08-15 00:34:13 +0000 (Fri, 15 Aug 2014) Log Message: ----------- In CustomerInquiry.php and SupplierInquiry.php makes translatable the systypes.typename. Modified Paths: -------------- trunk/CustomerAllocations.php trunk/SupplierAllocations.php trunk/doc/Change.log Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2014-08-14 22:27:32 UTC (rev 6819) +++ trunk/CustomerAllocations.php 2014-08-15 00:34:13 UTC (rev 6820) @@ -1,22 +1,19 @@ <?php +/* $Id$*/ -/* $Id$*/ - -/* -Call this page with: +/* Call this page with: 1. A TransID to show the make up and to modify existing allocations. 2. A DebtorNo to show all outstanding receipts or credits yet to be allocated. 3. No parameters to show all outstanding credits and receipts yet to be allocated. */ -include('includes/DefineCustAllocsClass.php'); include('includes/session.inc'); $Title = _('Customer Receipt') . '/' . _('Credit Note Allocations'); - $ViewTopic= 'ARTransactions'; $BookMark = 'CustomerAllocations'; +include('includes/header.inc'); -include('includes/header.inc'); +include('includes/DefineCustAllocsClass.php'); include('includes/SQL_CommonFunctions.inc'); if ( isset($_POST['Cancel']) ) { @@ -26,10 +23,12 @@ if (isset($_POST['UpdateDatabase']) OR isset($_POST['RefreshAllocTotal'])) { if (!isset($_SESSION['Alloc'])) { - prnMsg(_('Allocations can not be processed again') . '. ' . - _('If you hit refresh on this page after having just processed an allocation') . ', ' . - _('try to use the navigation links provided rather than the back button') . ', ' . - _('to avoid this message in future'),'info'); + prnMsg( + _('Allocations can not be processed again') . '. ' . + _('If you hit refresh on this page after having just processed an allocation') . ', ' . + _('try to use the navigation links provided rather than the back button') . ', ' . + _('to avoid this message in future'), + 'info'); include('includes/footer.inc'); exit; } @@ -38,7 +37,7 @@ $TotalAllocated = 0; $TotalDiffOnExch = 0; - for ($AllocCounter=0;$AllocCounter < $_POST['TotalNumberOfAllocs']; $AllocCounter++) { + for ($AllocCounter=0; $AllocCounter < $_POST['TotalNumberOfAllocs']; $AllocCounter++) { // loop through amounts allocated using AllocnItm->ID for each record if (isset($_POST['Amt' . $AllocCounter])) { @@ -247,7 +246,7 @@ $_SESSION['Alloc']->DebtorNo = $myrow['debtorno']; $_SESSION['Alloc']->CustomerName = $myrow['name']; $_SESSION['Alloc']->TransType = $myrow['type']; - $_SESSION['Alloc']->TransTypeName = $myrow['typename']; + $_SESSION['Alloc']->TransTypeName = _($myrow['typename']); $_SESSION['Alloc']->TransNo = $myrow['transno']; $_SESSION['Alloc']->TransExRate = $myrow['rate']; $_SESSION['Alloc']->TransAmt = $myrow['total']; @@ -279,7 +278,7 @@ while ($myrow=DB_fetch_array($Result)) { $_SESSION['Alloc']->add_to_AllocsAllocn ($myrow['id'], - $myrow['typename'], + _($myrow['typename']), $myrow['transno'], ConvertSQLDate($myrow['trandate']), 0, @@ -321,7 +320,7 @@ while ($myrow=DB_fetch_array($Result)) { $DiffOnExchThisOne = ($myrow['amt']/$myrow['rate']) - ($myrow['amt']/$_SESSION['Alloc']->TransExRate); $_SESSION['Alloc']->add_to_AllocsAllocn ($myrow['id'], - $myrow['typename'], + _($myrow['typename']), $myrow['transno'], ConvertSQLDate($myrow['trandate']), $myrow['amt'], @@ -400,8 +399,8 @@ } echo '<td>' . $AllocnItem->TransType . '</td> - <td>' . $AllocnItem->TypeNo . '</td> - <td class="number">' . $AllocnItem->TransDate . '</td> + <td class="number">' . $AllocnItem->TypeNo . '</td> + <td>' . $AllocnItem->TransDate . '</td> <td class="number">' . locale_number_format($AllocnItem->TransAmount,$_SESSION['Alloc']->CurrDecimalPlaces) . '</td> <td class="number">' . locale_number_format($YetToAlloc,$_SESSION['Alloc']->CurrDecimalPlaces) . '</td>'; $j++; @@ -504,7 +503,7 @@ echo '<tr class="OddTableRows">';; $k++; } - echo '<td>' . $myrow['typename'] . '</td> + echo '<td>' . _($myrow['typename']) . '</td> <td>' . $myrow['name'] . '</td> <td>' . $myrow['debtorno'] . '</td> <td>' . $myrow['transno'] . '</td> @@ -597,7 +596,7 @@ $k++; } - echo '<td>' . $myrow['typename'] . '</td> + echo '<td>' . _($myrow['typename']) . '</td> <td>' . $myrow['name'] . '</td> <td>' . $myrow['debtorno'] . '</td> <td>' . $myrow['transno'] . '</td> Modified: trunk/SupplierAllocations.php =================================================================== --- trunk/SupplierAllocations.php 2014-08-14 22:27:32 UTC (rev 6819) +++ trunk/SupplierAllocations.php 2014-08-15 00:34:13 UTC (rev 6820) @@ -1,10 +1,8 @@ <?php +/* $Id$*/ -/* $Id$*/ +/* This page can be called with... -/* - This page can be called with... - 1. A SuppTrans TransNo and Type The page will then show potential allocations for the transaction called with, this page can be called from the supplier enquiry to show the make up and to modify @@ -18,12 +16,13 @@ allocated */ -include('includes/DefineSuppAllocsClass.php'); include('includes/session.inc'); - $Title = _('Supplier Payment') . '/' . _('Credit Note Allocations'); +$ViewTopic = 'ARTransactions';// Filename in ManualContents.php's TOC./* RChacon: To do ManualAPInquiries.html from ManualARInquiries.html */ +$BookMark = 'SupplierAllocations';// Anchor's id in the manual's html document. +include('includes/header.inc'); -include('includes/header.inc'); +include('includes/DefineSuppAllocsClass.php'); include('includes/SQL_CommonFunctions.inc'); echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . @@ -31,12 +30,12 @@ if (isset($_POST['UpdateDatabase']) OR isset($_POST['RefreshAllocTotal'])) { - //initialise no input errors assumed initially before we test - - $InputError = 0; - if (!isset($_SESSION['Alloc'])){ - prnMsg( _('Allocations can not be processed again') . '. ' . _('If you hit refresh on this page after having just processed an allocation') . ', ' . _('try to use the navigation links provided rather than the back button, to avoid this message in future'),'warn'); + prnMsg( + _('Allocations can not be processed again') . '. ' . + _('If you hit refresh on this page after having just processed an allocation') . ', ' . + _('try to use the navigation links provided rather than the back button, to avoid this message in future'), + 'warn'); include('includes/footer.inc'); exit; } @@ -46,6 +45,7 @@ AllocnItm->ID for each record of the array - and PHP sets the value of the form variable on a post*/ + $InputError = 0; $TotalAllocated = 0; $TotalDiffOnExch = 0; @@ -330,7 +330,7 @@ $_SESSION['Alloc']->SupplierID = $myrow['supplierno']; $_SESSION['Alloc']->SuppName = $myrow['suppname'];; $_SESSION['Alloc']->TransType = $myrow['type']; - $_SESSION['Alloc']->TransTypeName = $myrow['typename']; + $_SESSION['Alloc']->TransTypeName = _($myrow['typename']); $_SESSION['Alloc']->TransNo = $myrow['transno']; $_SESSION['Alloc']->TransExRate = $myrow['rate']; $_SESSION['Alloc']->TransAmt = $myrow['total']; @@ -364,7 +364,7 @@ while ($myrow=DB_fetch_array($Result)){ $_SESSION['Alloc']->add_to_AllocsAllocn ($myrow['id'], - $myrow['typename'], + _($myrow['typename']), $myrow['transno'], ConvertSQLDate($myrow['trandate']), $myrow['suppreference'], @@ -410,7 +410,7 @@ $DiffOnExchThisOne = ($myrow['amt']/$myrow['rate']) - ($myrow['amt']/$_SESSION['Alloc']->TransExRate); $_SESSION['Alloc']->add_to_AllocsAllocn ($myrow['id'], - $myrow['typename'], + _($myrow['typename']), $myrow['transno'], ConvertSQLDate($myrow['trandate']), $myrow['suppreference'], $myrow['amt'], $myrow['total'], @@ -486,7 +486,7 @@ $YetToAlloc = ($AllocnItem->TransAmount - $AllocnItem->PrevAlloc); echo '<td>' . $AllocnItem->TransType . '</td> - <td>' . $AllocnItem->TypeNo . '</td> + <td class="number">' . $AllocnItem->TypeNo . '</td> <td>' . $AllocnItem->TransDate . '</td> <td>' . $AllocnItem->SuppRef . '</td> <td class="number">' . locale_number_format($AllocnItem->TransAmount,$_SESSION['Alloc']->CurrDecimalPlaces) . '</td> @@ -594,7 +594,7 @@ <td class="number">%s</td> <td><a href="%sAllocTrans=%s">' . _('Allocate') . '</a></td> </tr>', - $myrow['typename'], + _($myrow['typename']), $myrow['suppname'], $myrow['transno'], ConvertSQLDate($myrow['trandate']), @@ -670,7 +670,7 @@ <td class="number">%s</td> <td><a href="%sAllocTrans=%s">' . _('Allocate') . '</a></td> </tr>', - $myrow['typename'], + _($myrow['typename']), $myrow['suppname'], $myrow['transno'], ConvertSQLDate($myrow['trandate']), Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-08-14 22:27:32 UTC (rev 6819) +++ trunk/doc/Change.log 2014-08-15 00:34:13 UTC (rev 6820) @@ -1,5 +1,6 @@ webERP Change Log +14/08/14 RChacon: In CustomerInquiry.php and SupplierInquiry.php makes translatable the systypes.typename. 14/08/14 RChacon: In SupplierInquiry.php: Reorganizes columns Date, Type, Number, Reference and Comments, and regroups table-datacel format-strings as in CustomerInquiry.php code. 13/08/14 kelo: SupplierBalsAtPeriodEnd.php fix calculation to take into account fx differences on after date transactions 13/08/14 RChacon: includes/DatabaseTranslations.php used to store the fields of tables that are used from the database so that they can be translated in particular systypes for the types of transactions invoice credit note payment receipt etc. Can be extended for scripts and other tables where the data from the table is static and used to display |