Commit Graph

127 Commits

Author SHA1 Message Date
James Cole
6881d4479e Remove round(). 2020-07-19 20:07:58 +02:00
Hosh Sadiq
14dd185717 Use php-intl to format currencies
Currently the php function `number_format` is used to format currencies.
This is problematic as we have to figure out different things for
different currencies ourselves. These formats are determined based on
the libc's locale functions.

The issue arises where an OS doesn't have the proper locales installed,
or, in some cases, it's not supported (see below on multiple issues).

This addresses this issue by using the php-intl extensions to format the
numbers based on the locale. The extension is already a requirement in
`composer.json`. The solution does not rely on `LC_MONETARY` from the
underlying libc (which in Alpine Linux's case, which uses musl, is not
supported as of yet).

List of issues that are related and would potentially be fixed using
this PR:

- #2298
- #2946
- #3070
- #3306
- #3519
2020-07-19 18:34:39 +01:00
James Cole
cd65d4d4c5 Call correct timezone. 2020-07-17 18:51:35 +02:00
James Cole
c398aa2b69 Add support for British English and allow the user to set a locale. 2020-04-19 06:51:40 +02:00
James Cole
144bc29eb3 Fix issue with budgets. 2020-03-31 07:03:37 +02:00
James Cole
5445752588 Update some phpdocs, courtesy of Psalm. 2020-03-25 07:03:23 +01:00
James Cole
46382b0d21 Simplify method. 2020-03-16 19:45:23 +01:00
James Cole
4982f6f919 Cleanup method 2020-03-15 18:12:36 +01:00
James Cole
4958f6e4a6 Update email address. 2020-02-16 13:56:52 +01:00
James Cole
7cdfbc48a9 Fix #3070 2020-02-01 06:32:28 +01:00
James Cole
92158e52ef Update copyright of Firefly III to the GNU Affero General Public License as suggested by @nxxxse in #2607. This applies to all code in this commit from this moment onwards. 2019-10-02 06:37:26 +02:00
James Cole
f9f1fa0fcb Clean up API code and fix test code. 2019-09-04 17:39:39 +02:00
James Cole
af2f085aa7 Disable the encryption of uploads, in line with other efforts not to encrypt local data. 2019-08-25 07:25:01 +02:00
James Cole
c2296c3ad5 Code cleanup 2019-08-17 10:47:29 +02:00
James Cole
f09d0e87e4 Remove inspection, add TODO's, make code a bit simpler. 2019-08-16 21:38:35 +02:00
James Cole
c0033ae56b Code cleanup in AccountForm. 2019-08-10 17:11:57 +02:00
James Cole
9b574ce7ad Improve test coverage. 2019-07-31 16:53:09 +02:00
James Cole
2710a30a7c Warn about expensive code in test environment. 2019-06-22 10:25:57 +02:00
James Cole
fba3cb6d90 Remove unnecessary backslash 2019-06-07 17:58:11 +02:00
James Cole
d94b23b15d Build a new collector and first view online. 2019-03-24 09:23:36 +01:00
James Cole
e2ebd01719 Extra debug info for #2159 2019-03-16 20:07:26 +01:00
James Cole
143fe2a71f Fix #2125 2019-03-01 17:56:52 +01:00
James Cole
3379b723cf Last attempt I hope for #2125 2019-02-28 19:56:41 +01:00
James Cole
fe738fd321 Another fix for #2125 2019-02-27 18:55:56 +01:00
James Cole
e491dda229 Currencies can now be enabled and disabled. 2018-11-10 10:04:46 +01:00
James Cole
5908c0ce8c Code cleanup and realign. 2018-08-06 19:14:30 +02:00
James Cole
6d4956b574 Updated files for 4.7.5.2 2018-07-28 12:10:25 +02:00
James Cole
0c7b652a70 Last code optimization before release. 2018-07-28 10:45:16 +02:00
James Cole
e3e0e12fef Various code cleanup. 2018-07-27 05:03:37 +02:00
James Cole
2ad8e7f343 Fix some errors found in debug logs. 2018-07-27 03:09:35 +02:00
James Cole
89be30c4b9 Catch various errors. 2018-07-26 06:27:52 +02:00
James Cole
7b41c5b301 Cast all translations to strings. 2018-07-15 09:38:49 +02:00
James Cole
fa7ab45a40 Code cleanup 2018-04-02 14:50:17 +02:00
James Cole
170d23d768 Code cleanup before release. 2018-03-29 19:01:47 +02:00
James Cole
3815f9836f Various code cleanup. 2017-12-29 09:05:35 +01:00
James Cole
1f6e42afd9 Update copyright [skip ci] 2017-12-17 14:44:05 +01:00
James Cole
ffca858b8d Code clean up. 2017-11-15 12:25:49 +01:00
James Cole
649dca77f5 Code clean up. 2017-11-15 10:52:29 +01:00
James Cole
d2ab03061f Various code cleanup. 2017-11-05 19:49:20 +01:00
James Cole
bb46d034cd Various cleanup in transaction and journal display code. 2017-11-04 07:10:21 +01:00
James Cole
0bb46dd184 Fix return type 2017-10-30 16:25:46 +01:00
James Cole
ac461d64a8 New copyright notice. 2017-10-21 08:40:00 +02:00
James Cole
6f55049fb6 Complex but workable code for #865 2017-09-26 10:59:17 +02:00
James Cole
37250cbde3 Various code cleanup. 2017-09-16 09:24:48 +02:00
James Cole
66c13f35e7 Various code cleanup. 2017-09-09 07:03:43 +02:00
koziolek
f93d11643f Fix formatting when currency symbol is separated and follows amount 2017-09-02 20:11:37 +02:00
James Cole
394e92d538 Improvements for #616 and others. 2017-08-23 21:21:42 +02:00
James Cole
f85ab74e2b Code cleanup and tests. 2017-07-23 08:32:51 +02:00
James Cole
8a38ce1964 Remove references to old tour but include code for new tour. 2017-07-15 21:40:42 +02:00
James Cole
a905cce2c9 Expand import routine. 2017-06-20 21:04:25 +02:00