This pull request introduces enhancements to the TransactionResource and Transaction model within the Filament admin panel, specifically aimed at implementing double-entry accounting validation. A new custom validation rule, DoubleEntryValidator, has been added to ensure that transactions adhere to double-entry accounting principles.
Summary
Added DoubleEntryValidator custom validation rule to enforce double-entry accounting on transactions.
Integrated DoubleEntryValidator into the amount field of TransactionResource to validate transactions upon creation or update.
Modified Transaction model to include a comment hinting at the addition of fields necessary for double-entry accounting.
Ensured that the TransactionResource imports the newly created DoubleEntryValidator rule for use in form validation.
Files Modified:
app/Filament/Admin/Resources/TransactionResource.php: Imported DoubleEntryValidator and added it to the amount field's validation rules.
app/Models/Transaction.php: Added a comment to suggest the inclusion of additional fields relevant to double-entry accounting.
app/Rules/DoubleEntryValidator.php: Introduced a new file defining the DoubleEntryValidator rule, which checks the balance between debit and credit accounts to adhere to double-entry accounting principles.
Fixes #48.
🎉 Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
PR Feedback (click)
Description
This pull request introduces enhancements to the
TransactionResource
andTransaction
model within the Filament admin panel, specifically aimed at implementing double-entry accounting validation. A new custom validation rule,DoubleEntryValidator
, has been added to ensure that transactions adhere to double-entry accounting principles.Summary
DoubleEntryValidator
custom validation rule to enforce double-entry accounting on transactions.DoubleEntryValidator
into theamount
field ofTransactionResource
to validate transactions upon creation or update.Transaction
model to include a comment hinting at the addition of fields necessary for double-entry accounting.TransactionResource
imports the newly createdDoubleEntryValidator
rule for use in form validation.Files Modified:
app/Filament/Admin/Resources/TransactionResource.php
: ImportedDoubleEntryValidator
and added it to theamount
field's validation rules.app/Models/Transaction.php
: Added a comment to suggest the inclusion of additional fields relevant to double-entry accounting.app/Rules/DoubleEntryValidator.php
: Introduced a new file defining theDoubleEntryValidator
rule, which checks the balance between debit and credit accounts to adhere to double-entry accounting principles.Fixes #48.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.