[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6651] rental: debugging for wrong format
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6651] rental: debugging for wrong format |
Date: |
Wed, 08 Dec 2010 08:56:57 +0000 |
Revision: 6651
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6651
Author: sigurdne
Date: 2010-12-08 08:56:57 +0000 (Wed, 08 Dec 2010)
Log Message:
-----------
rental: debugging for wrong format
Modified Paths:
--------------
trunk/rental/inc/model/class.agresso_gl07.inc.php
Modified: trunk/rental/inc/model/class.agresso_gl07.inc.php
===================================================================
--- trunk/rental/inc/model/class.agresso_gl07.inc.php 2010-12-08 08:20:26 UTC
(rev 6650)
+++ trunk/rental/inc/model/class.agresso_gl07.inc.php 2010-12-08 08:56:57 UTC
(rev 6651)
@@ -268,11 +268,19 @@
$amount = round($amount, 2) * 100;
if($amount < 0) // Negative number
{
- return '-' . sprintf("%019.19s", abs($amount)); // We
have to have the sign at the start of the string
+ $ret = '-' . sprintf("%019.19s", abs($amount)); // We
have to have the sign at the start of the string
}
- return sprintf("%020.20s", $amount);
+ else
+ {
+ $ret = sprintf("%020.20s", $amount);
+ }
+ if($ret == '000000000000000000-0')
+ {
+ throw new Exception("get_formatted_amount returned
'000000000000000000-0'");
+ }
+ return $ret;
}
}
-?>
\ No newline at end of file
+?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6651] rental: debugging for wrong format,
Sigurd Nes <=