Skip to content

Commit

Permalink
#24 - Add option to disable tags
Browse files Browse the repository at this point in the history
  • Loading branch information
robvankeilegom committed Jul 3, 2024
1 parent fbaca6e commit fe4e0bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Firefly.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,14 @@ public function push(Transaction $transaction): bool
// 'destination_name' =>,
'notes' => $transaction->description,
'external_id' => $transaction->pp_id,
'tags' => [$this->tag],
],
],
];

if (config('app.enable_tags')) {
$data['transactions'][0]['tags'] = [$this->tag];
}

if (! is_null($conversion)) {
$data['transactions'][0]['foreign_amount'] = abs($conversion->value);
$data['transactions'][0]['foreign_currency_code'] = $conversion->currency;
Expand Down
2 changes: 2 additions & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
'version' => '0.3.4',

'currency' => env('CURRENCY', 'EUR'),

'enable_tags' => env('ENABLE_TAGS', true),
];

0 comments on commit fe4e0bd

Please sign in to comment.