Add Recurring Transactions Support for Invoices and Expenses #385
+237
−191
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request was created by Sweep to resolve the following request by @curtisdelicata:
Continue chatting at https://sweep-chat-demo.vercel.app/c/654171fb-cc52-4241-b4d6-35c9a92e0c14.
Purpose
Implement a comprehensive recurring transactions feature for invoices and expenses, allowing automatic generation of recurring financial documents based on predefined schedules.
Description
This pull request introduces a robust recurring transactions system for both invoices and expenses in the Liberu Accounting application. The implementation includes:
Database Migration: Added new fields to
invoices
andexpenses
tables to support recurring transaction logic, including:is_recurring
boolean flagrecurrence_frequency
to define repeat intervalrecurrence_start
andrecurrence_end
dateslast_generated
to track the most recent transaction generationModel Enhancements:
generateRecurring()
method to bothInvoice
andExpense
modelsFilament Resource Updates:
Scheduled Task Integration:
ProcessRecurringTransactions
console commandKernel.php
to automatically process recurring transactionsSummary
Invoices
andExpenses
is_recurring
fieldsgenerateRecurring()
methods inInvoice
andExpense
modelsdaily
,weekly
,monthly
,yearly