mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Start testing new rule actions.
This commit is contained in:
@@ -49,6 +49,7 @@ class AddTag implements ActionInterface
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function act(TransactionJournal $journal): bool
|
||||
{
|
||||
@@ -57,6 +58,7 @@ class AddTag implements ActionInterface
|
||||
$factory = app(TagFactory::class);
|
||||
$factory->setUser($journal->user);
|
||||
$tag = $factory->findOrCreate($this->action->action_value);
|
||||
|
||||
if (null === $tag) {
|
||||
// could not find, could not create tag.
|
||||
Log::error(sprintf('RuleAction AddTag. Could not find or create tag "%s"', $this->action->action_value));
|
||||
@@ -86,12 +88,14 @@ class AddTag implements ActionInterface
|
||||
$factory = app(TagFactory::class);
|
||||
$factory->setUser(User::find($journal['user_id']));
|
||||
$tag = $factory->findOrCreate($this->action->action_value);
|
||||
// @codeCoverageIgnoreStart
|
||||
if (null === $tag) {
|
||||
// could not find, could not create tag.
|
||||
Log::error(sprintf('RuleAction AddTag. Could not find or create tag "%s"', $this->action->action_value));
|
||||
|
||||
return false;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
$count = DB::table('tag_transaction_journal')
|
||||
->where('tag_id', $tag->id)
|
||||
->where('transaction_journal_id', $journal['transaction_journal_id'])
|
||||
|
@@ -48,7 +48,8 @@ class AppendDescription implements ActionInterface
|
||||
* Append description with X
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @deprecated
|
||||
* @return bool
|
||||
*/
|
||||
public function act(TransactionJournal $journal): bool
|
||||
|
@@ -46,9 +46,9 @@ class AppendNotes implements ActionInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Append notes with X
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -84,8 +84,6 @@ class AppendNotes implements ActionInterface
|
||||
$dbNote->noteable_id = (int) $journal['transaction_journal_id'];
|
||||
$dbNote->noteable_type = TransactionJournal::class;
|
||||
$dbNote->text = '';
|
||||
|
||||
|
||||
}
|
||||
Log::debug(sprintf('RuleAction AppendNotes appended "%s" to "%s".', $this->action->action_value, $dbNote->text));
|
||||
$text = sprintf('%s%s', $dbNote->text, $this->action->action_value);
|
||||
|
@@ -26,7 +26,7 @@ use FireflyIII\Models\RuleAction;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Log;
|
||||
|
||||
use DB;
|
||||
/**
|
||||
* Class ClearBudget.
|
||||
*/
|
||||
@@ -45,8 +45,9 @@ class ClearBudget implements ActionInterface
|
||||
* Clear all budgets
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @return bool
|
||||
* @deprecated
|
||||
*/
|
||||
public function act(TransactionJournal $journal): bool
|
||||
{
|
||||
@@ -63,4 +64,16 @@ class ClearBudget implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
DB::table('budget_transaction_journal')->where('transaction_journal_id', '=', $journal['transaction_journal_id'])->delete();
|
||||
|
||||
Log::debug(sprintf('RuleAction ClearBudget removed all budgets from journal %d.', $journal['transaction_journal_id']));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\TransactionRules\Actions;
|
||||
|
||||
use DB;
|
||||
use FireflyIII\Models\RuleAction;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
@@ -45,6 +45,8 @@ class ClearCategory implements ActionInterface
|
||||
* Clear all categories
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
* @codeCoverageIgnore
|
||||
* @deprecated
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -63,4 +65,16 @@ class ClearCategory implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
DB::table('category_transaction_journal')->where('transaction_journal_id', '=', $journal['transaction_journal_id'])->delete();
|
||||
|
||||
Log::debug(sprintf('RuleAction ClearCategory removed all categories from journal %d.', $journal['transaction_journal_id']));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,7 @@ use FireflyIII\Models\Note;
|
||||
use FireflyIII\Models\RuleAction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Log;
|
||||
|
||||
use DB;
|
||||
/**
|
||||
* Class ClearNotes.
|
||||
*/
|
||||
@@ -46,7 +46,8 @@ class ClearNotes implements ActionInterface
|
||||
* Remove notes
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @deprecated
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
@@ -62,4 +63,17 @@ class ClearNotes implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
DB::table('notes')
|
||||
->where('noteable_id', $journal['transaction_journal_id'])
|
||||
->where('noteable_type', TransactionJournal::class)
|
||||
->delete();
|
||||
Log::debug(sprintf('RuleAction ClearNotes removed all notes.'));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\TransactionRules\Actions;
|
||||
|
||||
|
||||
use DB;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Factory\AccountFactory;
|
||||
use FireflyIII\Models\Account;
|
||||
@@ -31,6 +32,7 @@ use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\RuleAction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\User;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
@@ -39,8 +41,7 @@ use Log;
|
||||
*/
|
||||
class ConvertToDeposit implements ActionInterface
|
||||
{
|
||||
/** @var RuleAction The rule action */
|
||||
private $action;
|
||||
private RuleAction $action;
|
||||
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
@@ -56,7 +57,7 @@ class ConvertToDeposit implements ActionInterface
|
||||
* Execute the action.
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @deprecated
|
||||
* @return bool
|
||||
* @throws FireflyException
|
||||
*/
|
||||
@@ -120,9 +121,9 @@ class ConvertToDeposit implements ActionInterface
|
||||
* Output is a deposit from C to B.
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return bool
|
||||
* @throws FireflyException
|
||||
* @deprecated
|
||||
*/
|
||||
private function convertTransfer(TransactionJournal $journal): bool
|
||||
{
|
||||
@@ -157,12 +158,55 @@ class ConvertToDeposit implements ActionInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Input is a transfer from A to B.
|
||||
* Output is a deposit from C to B.
|
||||
*
|
||||
* @param array $journal
|
||||
*
|
||||
* @return bool
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function convertTransferArray(array $journal): bool
|
||||
{
|
||||
$user = User::find($journal['user_id']);
|
||||
// find or create revenue account.
|
||||
/** @var AccountFactory $factory */
|
||||
$factory = app(AccountFactory::class);
|
||||
$factory->setUser($user);
|
||||
|
||||
// get the action value, or use the original source name in case the action value is empty:
|
||||
// this becomes a new or existing revenue account.
|
||||
$revenueName = '' === $this->action->action_value ? $journal['source_account_name'] : $this->action->action_value;
|
||||
$revenue = $factory->findOrCreate($revenueName, AccountType::REVENUE);
|
||||
|
||||
Log::debug(sprintf('ConvertToDeposit. Action value is "%s", revenue name is "%s"', $this->action->action_value, $journal['source_account_name']));
|
||||
unset($source);
|
||||
|
||||
// update source transaction(s) to be revenue account
|
||||
DB::table('transactions')
|
||||
->where('transaction_journal_id', '=', $journal['transaction_journal_id'])
|
||||
->where('amount', '<', 0)
|
||||
->update(['account_id' => $revenue->id]);
|
||||
|
||||
// change transaction type of journal:
|
||||
$newType = TransactionType::whereType(TransactionType::DEPOSIT)->first();
|
||||
|
||||
DB::table('transaction_journals')
|
||||
->where('id', '=', $journal['transaction_journal_id'])
|
||||
->update(['transaction_type_id' => $newType->id]);
|
||||
|
||||
Log::debug('Converted transfer to deposit.');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Input is a withdrawal from A to B
|
||||
* Is converted to a deposit from C to A.
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @deprecated
|
||||
* @return bool
|
||||
* @throws FireflyException
|
||||
*/
|
||||
@@ -209,4 +253,79 @@ class ConvertToDeposit implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Input is a withdrawal from A to B
|
||||
* Is converted to a deposit from C to A.
|
||||
*
|
||||
* @param array $journal
|
||||
*
|
||||
* @return bool
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function convertWithdrawalArray(array $journal): bool
|
||||
{
|
||||
$user = User::find($journal['user_id']);
|
||||
// find or create revenue account.
|
||||
/** @var AccountFactory $factory */
|
||||
$factory = app(AccountFactory::class);
|
||||
$factory->setUser($user);
|
||||
|
||||
// get the action value, or use the original destination name in case the action value is empty:
|
||||
// this becomes a new or existing revenue account.
|
||||
$revenueName = '' === $this->action->action_value ? $journal['destination_account_name'] : $this->action->action_value;
|
||||
$revenue = $factory->findOrCreate($revenueName, AccountType::REVENUE);
|
||||
|
||||
Log::debug(sprintf('ConvertToDeposit. Action value is "%s", revenue name is "%s"', $this->action->action_value, $journal['destination_account_name']));
|
||||
|
||||
// update the source transaction and put in the new revenue ID.
|
||||
DB::table('transactions')
|
||||
->where('transaction_journal_id', '=', $journal['transaction_journal_id'])
|
||||
->where('amount', '<', 0)
|
||||
->update(['account_id' => $revenue->id]);
|
||||
|
||||
// update the destination transaction and put in the original source account ID.
|
||||
DB::table('transactions')
|
||||
->where('transaction_journal_id', '=', $journal['transaction_journal_id'])
|
||||
->where('amount', '>', 0)
|
||||
->update(['account_id' => $journal['source_account_id']]);
|
||||
|
||||
// change transaction type of journal:
|
||||
$newType = TransactionType::whereType(TransactionType::DEPOSIT)->first();
|
||||
|
||||
DB::table('transaction_journals')
|
||||
->where('id', '=', $journal['transaction_journal_id'])
|
||||
->update(['transaction_type_id' => $newType->id]);
|
||||
|
||||
Log::debug('Converted withdrawal to deposit.');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
Log::debug(sprintf('Convert journal #%d to deposit.', $journal['transaction_journal_id']));
|
||||
$type = $journal['transaction_type_type'];
|
||||
if (TransactionType::DEPOSIT === $type) {
|
||||
Log::error(sprintf('Journal #%d is already a deposit (rule #%d).', $journal['transaction_journal_id'], $this->action->rule_id));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TransactionType::WITHDRAWAL === $type) {
|
||||
Log::debug('Going to transform a withdrawal to a deposit.');
|
||||
|
||||
return $this->convertWithdrawalArray($journal);
|
||||
}
|
||||
if (TransactionType::TRANSFER === $type) {
|
||||
Log::debug('Going to transform a transfer to a deposit.');
|
||||
|
||||
return $this->convertTransferArray($journal);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -30,7 +30,9 @@ use FireflyIII\Models\RuleAction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Log;
|
||||
use DB;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -38,8 +40,7 @@ use Log;
|
||||
*/
|
||||
class ConvertToTransfer implements ActionInterface
|
||||
{
|
||||
/** @var RuleAction The rule action */
|
||||
private $action;
|
||||
private RuleAction $action;
|
||||
|
||||
/**
|
||||
* TriggerInterface constructor.
|
||||
@@ -53,7 +54,8 @@ class ConvertToTransfer implements ActionInterface
|
||||
|
||||
/**
|
||||
* Execute the action.
|
||||
*
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return bool
|
||||
@@ -135,7 +137,8 @@ class ConvertToTransfer implements ActionInterface
|
||||
/**
|
||||
* A deposit is from Revenue to Asset.
|
||||
* We replace the Revenue with another asset.
|
||||
*
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
* @param TransactionJournal $journal
|
||||
* @param Account $assetAccount
|
||||
*
|
||||
@@ -173,7 +176,8 @@ class ConvertToTransfer implements ActionInterface
|
||||
/**
|
||||
* A withdrawal is from Asset to Expense.
|
||||
* We replace the Expense with another asset.
|
||||
*
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
* @param TransactionJournal $journal
|
||||
* @param Account $assetAccount
|
||||
*
|
||||
@@ -207,4 +211,106 @@ class ConvertToTransfer implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
$type = $journal['transaction_type_type'];
|
||||
$user = User::find($journal['user_id']);
|
||||
if (TransactionType::TRANSFER === $type) {
|
||||
Log::error(sprintf('Journal #%d is already a transfer so cannot be converted (rule #%d).', $journal['transaction_journal_id'], $this->action->rule_id));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// find the asset account in the action value.
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$repository->setUser($user);
|
||||
$asset = $repository->findByName($this->action->action_value, [AccountType::ASSET, AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE]);
|
||||
if (null === $asset) {
|
||||
Log::error(sprintf('Journal #%d cannot be converted because no asset with name "%s" exists (rule #%d).', $journal['transaction_journal_id'], $this->action->action_value, $this->action->rule_id));
|
||||
|
||||
return false;
|
||||
}
|
||||
if (TransactionType::WITHDRAWAL === $type) {
|
||||
Log::debug('Going to transform a withdrawal to a transfer.');
|
||||
|
||||
return $this->convertWithdrawalArray($journal, $asset);
|
||||
}
|
||||
if (TransactionType::DEPOSIT === $type) {
|
||||
Log::debug('Going to transform a deposit to a transfer.');
|
||||
|
||||
return $this->convertDepositArray($journal, $asset);
|
||||
}
|
||||
|
||||
return false; // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
/**
|
||||
* A deposit is from Revenue to Asset.
|
||||
* We replace the Revenue with another asset.
|
||||
* @param array $journal
|
||||
* @param Account $asset
|
||||
* @return bool
|
||||
*/
|
||||
private function convertDepositArray(array $journal, Account $asset): bool
|
||||
{
|
||||
if ($journal['destination_account_id'] === $asset->id) {
|
||||
Log::error(vsprintf('Journal #%d has already has "%s" as a destination asset. ConvertToTransfer failed. (rule #%d).', [$journal['transaction_journal_id'], $asset->name, $this->action->rule_id]));
|
||||
return false;
|
||||
}
|
||||
|
||||
// update source transaction:
|
||||
DB::table('transactions')
|
||||
->where('transaction_journal_id', '=', $journal['transaction_journal_id'])
|
||||
->where('amount', '<', 0)
|
||||
->update(['account_id' => $asset->id]);
|
||||
|
||||
// change transaction type of journal:
|
||||
$newType = TransactionType::whereType(TransactionType::TRANSFER)->first();
|
||||
|
||||
DB::table('transaction_journals')
|
||||
->where('id', '=', $journal['transaction_journal_id'])
|
||||
->update(['transaction_type_id' => $newType->id]);
|
||||
|
||||
Log::debug('Converted deposit to transfer.');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* A withdrawal is from Asset to Expense.
|
||||
* We replace the Expense with another asset.
|
||||
* @param array $journal
|
||||
* @param Account $asset
|
||||
* @return bool
|
||||
*/
|
||||
private function convertWithdrawalArray(array $journal, Account $asset): bool
|
||||
{
|
||||
if ($journal['source_account_id'] === $asset->id) {
|
||||
Log::error(vsprintf('Journal #%d has already has "%s" as a source asset. ConvertToTransfer failed. (rule #%d).', [$journal['transaction_journal_id'], $asset->name, $this->action->rule_id]));
|
||||
return false;
|
||||
}
|
||||
|
||||
// update destination transaction:
|
||||
DB::table('transactions')
|
||||
->where('transaction_journal_id', '=', $journal['transaction_journal_id'])
|
||||
->where('amount', '>', 0)
|
||||
->update(['account_id' => $asset->id]);
|
||||
|
||||
// change transaction type of journal:
|
||||
$newType = TransactionType::whereType(TransactionType::TRANSFER)->first();
|
||||
|
||||
DB::table('transaction_journals')
|
||||
->where('id', '=', $journal['transaction_journal_id'])
|
||||
->update(['transaction_type_id' => $newType->id]);
|
||||
|
||||
Log::debug('Converted withdrawal to transfer.');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -210,4 +210,12 @@ class ConvertToWithdrawal implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -78,4 +78,12 @@ class DeleteTransaction implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -76,4 +76,12 @@ class LinkToBill implements ActionInterface
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -59,4 +59,12 @@ class PrependDescription implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -68,4 +68,12 @@ class PrependNotes implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -55,4 +55,12 @@ class RemoveAllTags implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -68,4 +68,12 @@ class RemoveTag implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -83,4 +83,12 @@ class SetBudget implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -72,4 +72,12 @@ class SetCategory implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -69,4 +69,12 @@ class SetDescription implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -168,4 +168,12 @@ class SetDestinationAccount implements ActionInterface
|
||||
Log::debug(sprintf('Found or created expense account #%d ("%s")', $account->id, $account->name));
|
||||
$this->newDestinationAccount = $account;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -68,4 +68,12 @@ class SetNotes implements ActionInterface
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -158,4 +158,12 @@ class SetSourceAccount implements ActionInterface
|
||||
Log::debug(sprintf('Found or created revenue account #%d ("%s")', $account->id, $account->name));
|
||||
$this->newSourceAccount = $account;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
@@ -184,4 +184,12 @@ class UpdatePiggybank implements ActionInterface
|
||||
$repository->removeAmount($piggyBank, $amount);
|
||||
$repository->createEventWithJournal($piggyBank, app('steam')->negative($amount), $journal);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function actOnArray(array $journal): bool
|
||||
{
|
||||
// TODO: Implement actOnArray() method.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user