Commit Graph

75 Commits

Author SHA1 Message Date
James Cole 80237d8bc3 Refactor methods that request the old currency preference. 2023-10-22 07:55:36 +02:00
James Cole 3dcb35710b chore: reformat code. 2023-06-21 12:34:58 +02:00
James Cole e6dc881f56 Clean up comments 2023-02-22 18:03:31 +01:00
James Cole c979cfcd89 Replace direct calls to Carbon class. 2023-02-11 07:36:45 +01:00
James Cole dbf3e76ecc Various PSR12 code cleanup 2022-12-29 19:41:57 +01:00
James Cole 2eebcb21f1 Use PSR-12 code style 2022-10-30 14:24:19 +01:00
James Cole 914dc8596b remove old inspections 2022-10-30 12:12:35 +01:00
James Cole 71d53fbda4 Revert "Replace various enums"
This reverts commit 089514908d.
2022-04-13 16:23:02 +02:00
James Cole 089514908d Replace various enums 2022-04-13 14:39:13 +02:00
James Cole 123693096c Reformat various code. 2022-03-29 15:10:05 +02:00
James Cole 29bed2547c Reformat various code. 2022-03-29 14:58:06 +02:00
James Cole db071b1014 Remove v1 references. 2022-01-29 14:28:16 +01:00
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 70da5917c9 Refactor findNull to find 2021-06-30 06:17:38 +02:00
James Cole f9220b8999 Make it easier to switch between v1/v2 layout. 2021-02-01 06:29:45 +01:00
James Cole 7530effcaa Fix PHP 8 related errors. 2020-12-22 17:16:55 +01:00
James Cole 1c07feb446 Add locale to variables. 2020-07-27 20:06:18 +02:00
James Cole 7017d33b87 Small code improv #3578 2020-07-27 07:08:29 +02:00
James Cole fade9ae6f9 Simpler get currency routine 2020-07-27 07:06:44 +02:00
James Cole c5489a7c55 Restore locale info from localeconv #3578 2020-07-27 07:05:41 +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 c8f1e4bbd7 Expand new layout code. 2020-06-17 07:06:45 +02:00
James Cole 6829003f5e Change to safer hash methods. 2020-04-11 06:42:21 +02:00
James Cole 2b6c3fd743 Code cleanup that (hopefully) matches style CI 2020-03-17 15:01:00 +01:00
James Cole 7cdfbc48a9 Fix #3070 2020-02-01 06:32:28 +01:00
James Cole 3771cc3b75 Update email address 2020-01-31 07:32:04 +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 fdf99400bc Some TODO's for the future. 2019-08-16 06:20:07 +02:00
James Cole 71fb9d8fa5 Code cleaning stuff. 2019-02-13 17:38:41 +01:00
James Cole 4152179f10 Fix #1830 2018-10-28 19:17:33 +01:00
James Cole 07cfba1b3a Add the ability to make transfers to and from liability accounts. 2018-08-25 21:33:22 +02:00
James Cole 2ed433c96d Refactor configuration methods into trait 2018-08-09 17:50:30 +02:00
James Cole 7943164375 Change scope of methods, add some notes. Prep for refactoring. 2018-08-09 16:07:33 +02:00
James Cole 5908c0ce8c Code cleanup and realign. 2018-08-06 19:14:30 +02:00
James Cole 0312ba8ad7 Various bugfixes and code clean up. 2018-07-27 04:46:21 +02:00
James Cole 4d5bdd25a8 Add phpdocs everywhere. 2018-07-22 08:10:16 +02:00
James Cole 44fb307da4 Code cleanup. 2018-07-20 14:34:56 +02:00
James Cole 89834baf01 Refactor references to static facades. Improve budget controller code. 2018-07-14 16:08:34 +02:00
James Cole 2b4088c5f7 Some code cleanup. 2018-07-13 15:50:42 +02:00
James Cole 5665f127aa Improve code quality. 2018-07-09 19:24:08 +02:00
James Cole d05a1e0260 Specify return types. 2018-07-08 12:28:42 +02:00
James Cole a7b8470d9e Expand test coverage. 2018-06-01 22:04:52 +02:00
James Cole a3c34e6b3c Code cleanup 2018-04-02 15:10:40 +02:00
James Cole 720dcb0fe5 Fix #1300 2018-03-27 19:29:58 +02:00
James Cole 6660306ac4 Various code cleanup. 2018-03-25 09:01:43 +02:00
James Cole 54ba18975a Use different method for finding objects. 2018-02-28 20:23:45 +01:00
James Cole 8bd76d1ff0 Various code cleanup. 2017-12-22 18:32:43 +01:00
James Cole ff9ad859b3 Update copyright [skip ci] 2017-12-17 14:41:58 +01:00
James Cole 78335e5814 Expand tests, do code cleanup. 2017-12-17 14:30:53 +01:00