|
From: <dai...@us...> - 2017-05-18 09:24:19
|
Revision: 7763
http://sourceforge.net/p/web-erp/reponame/7763
Author: daintree
Date: 2017-05-18 09:24:16 +0000 (Thu, 18 May 2017)
Log Message:
-----------
Ricards idea to show the suppliers currency decimal places plus 2 for the purchase price
Modified Paths:
--------------
trunk/PO_Items.php
trunk/doc/Change.log
Modified: trunk/PO_Items.php
===================================================================
--- trunk/PO_Items.php 2017-05-16 05:38:49 UTC (rev 7762)
+++ trunk/PO_Items.php 2017-05-18 09:24:16 UTC (rev 7763)
@@ -735,12 +735,12 @@
$DisplayLineTotal = locale_number_format($LineTotal,$_SESSION['PO'.$identifier]->CurrDecimalPlaces);
// Note if the price is greater than 1 use 2 decimal place, if the price is a fraction of 1, use 4 decimal places
// This should help display where item-price is a fraction
- if ($POLine->Price > 100000) {
+ if ($POLine->Price > 1) {
$DisplayPrice = locale_number_format($POLine->Price,$_SESSION['PO'.$identifier]->CurrDecimalPlaces);
$SuppPrice = locale_number_format(round(($POLine->Price *$POLine->ConversionFactor),$_SESSION['PO'.$identifier]->CurrDecimalPlaces),$_SESSION['PO'.$identifier]->CurrDecimalPlaces);
} else {
- $DisplayPrice = locale_number_format($POLine->Price,5);
- $SuppPrice = locale_number_format(round(($POLine->Price *$POLine->ConversionFactor),5),5);
+ $DisplayPrice = locale_number_format($POLine->Price,($_SESSION['PO'.$identifier]->CurrDecimalPlaces + 2));
+ $SuppPrice = locale_number_format(round(($POLine->Price *$POLine->ConversionFactor),($_SESSION['PO'.$identifier]->CurrDecimalPlaces+2)),($_SESSION['PO'.$identifier]->CurrDecimalPlaces+2));
}
if ($k==1){
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2017-05-16 05:38:49 UTC (rev 7762)
+++ trunk/doc/Change.log 2017-05-18 09:24:16 UTC (rev 7763)
@@ -1,5 +1,6 @@
webERP Change Log
+18/5/17 Phil: remove changes in Andrew's PO_Items.php script that increased dp for purchase price to 5 - for some low value currencies this would be inappropriate, better to use the currency decimal places + 2 as per Ricard's idea
16/5/17 Andrew Couling: SQL correction in PO_Items.php. Line 1094.
7/5/17 Andy Couling/Janb: Fixes to MRP scripts SQL to get table names per forum post http://www.weberp.org/forum/showthread.php?tid=2448
13/4/17 RChacon: Rename includes/footer.inc, includes/header.inc and includes/session.inc to includes/footer.php, includes/header.php and includes/session.php.
|