Open
Description
Some nice-to-haves, not all essential.
- Support PHP Money ^4.0
- Use PHP
enum
for ledger type. - Use string for
accounting_ledgers.type
. Database enums are great, but really hard to manage in Laravel. - Use anonymous function style migrations.
- Database migration should use the current date and time (but keep the migrations in the correct order).
- Add notes about using aliases for the morphed type models.
- Replace
dates
casting withcasts
in the models (dates
has been deprecated, and removed for Laravel 10). - Fix balance calculations so they cannot accidentally mix currencies.
- Support
Carbon\CarbonImmutable
for dates, as that is the new default for Laravel 9+. UseCarbon\CarbonInterface
as the common interface. -
initJournal
should take aMoney\Currency
object to be sure it is valid, and if not supplied, default to the config currency, not hard-codedUSD
. - Fix model needing to be re-fetched after its journal has been initialised before the journal can be seen.
- The transaction reference object should be a normal polynomial relationship.
- Unique index on journals to ensure a model does not have multiple journals.
- Move the migrations out of the autoload
src
directory. - Overhaul the whole readme.
Activity