Minor fixes

This commit is contained in:
David Bomba 2022-09-23 19:26:17 +10:00
parent 8048992871
commit 38923c8897
3 changed files with 3 additions and 3 deletions

View File

@ -298,7 +298,7 @@ class MatchBankTransactions implements ShouldQueue
if(array_key_exists('ninja_category_id', $this->input)){ if(array_key_exists('ninja_category_id', $this->input)){
$this->bt->ninja_category_id = $this->input['ninja_category_id']; $this->bt->ninja_category_id = $this->input['ninja_category_id'];
$this->bt->save(); $this->bt->save();
return $this->input['ninja_category_id']; return (int)$this->input['ninja_category_id'];
} }
$category = $this->categories->firstWhere('highLevelCategoryId', $this->bt->category_id); $category = $this->categories->firstWhere('highLevelCategoryId', $this->bt->category_id);

View File

@ -103,7 +103,7 @@ class ExpenseTransformer extends EntityTransformer
'private_notes' => (string) $expense->private_notes ?: '', 'private_notes' => (string) $expense->private_notes ?: '',
'public_notes' => (string) $expense->public_notes ?: '', 'public_notes' => (string) $expense->public_notes ?: '',
'transaction_reference' => (string) $expense->transaction_reference ?: '', 'transaction_reference' => (string) $expense->transaction_reference ?: '',
'transaction_id' => (string) $expense->transaction_id ?: '', 'transaction_id' => (string) $this->decodePrimaryKey($expense->transaction_id) ?: '',
'date' => $expense->date ?: '', 'date' => $expense->date ?: '',
'number' => (string)$expense->number ?: '', 'number' => (string)$expense->number ?: '',
'payment_date' => $expense->payment_date ?: '', 'payment_date' => $expense->payment_date ?: '',

View File

@ -79,7 +79,7 @@ class PaymentTransformer extends EntityTransformer
'refunded' => (float) $payment->refunded, 'refunded' => (float) $payment->refunded,
'applied' => (float) $payment->applied, 'applied' => (float) $payment->applied,
'transaction_reference' => $payment->transaction_reference ?: '', 'transaction_reference' => $payment->transaction_reference ?: '',
'transaction_id' => $payment->transaction_id ?: '', 'transaction_id' => $this->decodePrimaryKey($payment->transaction_id) ?: '',
'date' => $payment->date ?: '', 'date' => $payment->date ?: '',
'is_manual' => (bool) $payment->is_manual, 'is_manual' => (bool) $payment->is_manual,
'created_at' => (int) $payment->created_at, 'created_at' => (int) $payment->created_at,