1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Bank Transactions matching default category ID

This commit is contained in:
David Bomba 2022-10-24 15:38:47 +11:00
parent 18859b237c
commit 02080cc3b7
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class UpdateBankTransactionRequest extends Request
$rules = [
'date' => 'bail|required|date',
'description' => 'bail|sometimes|string',
'amount' => 'numeric|sometimes',
'amount' => 'numeric|required',
];
if (isset($this->currency_id))

View File

@ -295,7 +295,7 @@ class MatchBankTransactions implements ShouldQueue
private function resolveCategory() :?int
{
if(array_key_exists('ninja_category_id', $this->input)){
if(array_key_exists('ninja_category_id', $this->input) && strlen($this->input['ninja_category_id']) >=1){
$this->bt->ninja_category_id = $this->input['ninja_category_id'];
$this->bt->save();
return (int)$this->input['ninja_category_id'];