Commit Graph

143 Commits

Author SHA1 Message Date
James Cole 4003cea759 Code reordering and reformatting. I should really start employing style CI. 2021-09-18 10:26:12 +02:00
James Cole e829d79589 Various code cleanup. 2021-09-18 10:21:29 +02:00
James Cole 3f1bd6b3f1 Currency code expansion. 2021-05-13 05:52:06 +02:00
James Cole f12744ad8c Various code cleanup. 2021-04-07 07:28:43 +02:00
James Cole 38d0f0427f Various code cleanup. 2021-04-06 17:00:16 +02:00
James Cole 206845575c Code cleanup 2021-03-21 09:15:40 +01:00
James Cole 7118abe28d Fix some tests for account API 2021-03-13 12:01:01 +01:00
James Cole 013ebbf039 Initial effort to make code 8.0 compatible. 2020-12-17 06:31:23 +01:00
James Cole aa3e467a3e Add message so exception isn't empty. 2020-10-26 16:22:20 +01:00
James Cole 4e51f0abc4 Clean up some code. 2020-10-13 06:35:33 +02:00
James Cole 6671c6d45c Create some new test code. 2020-10-04 10:56:10 +02:00
James Cole d49743031f Add windows locale support #3519 2020-07-27 07:13:39 +02:00
James Cole 7017d33b87 Small code improv #3578 2020-07-27 07:08:29 +02:00
James Cole c5489a7c55 Restore locale info from localeconv #3578 2020-07-27 07:05:41 +02:00
James Cole fe66be673a Some extra code for #3578 2020-07-26 17:35:13 +02:00
James Cole 0bb59f5505 Yoda style and dump unused method. 2020-07-19 20:08:50 +02:00
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