mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fixes for expense id encoding in bank transactions
This commit is contained in:
parent
8a3514aa57
commit
d00cdd29f7
@ -59,7 +59,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|BankTransaction onlyTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|BankTransaction onlyTrashed()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BankTransaction query()
|
* @method static \Illuminate\Database\Eloquent\Builder|BankTransaction query()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel scope()
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel scope()
|
||||||
* @method static \Illuminate\Database\Eloquent\Account withTrashed()
|
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BankTransaction withoutTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|BankTransaction withoutTrashed()
|
||||||
* @property-read \App\Models\Payment|null $payment
|
* @property-read \App\Models\Payment|null $payment
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
@ -137,12 +136,12 @@ class BankTransaction extends BaseModel
|
|||||||
|
|
||||||
public function vendor(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
public function vendor(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Vendor::class);
|
return $this->belongsTo(Vendor::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function expense(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
public function expense(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Expense::class);
|
return $this->belongsTo(Expense::class)->withTrashed();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
|
@ -63,7 +63,7 @@ class BankTransactionTransformer extends EntityTransformer
|
|||||||
'description' => (string) $bank_transaction->description ?: '',
|
'description' => (string) $bank_transaction->description ?: '',
|
||||||
'base_type' => (string) $bank_transaction->base_type ?: '',
|
'base_type' => (string) $bank_transaction->base_type ?: '',
|
||||||
'invoice_ids' => (string) $bank_transaction->invoice_ids ?: '',
|
'invoice_ids' => (string) $bank_transaction->invoice_ids ?: '',
|
||||||
'expense_id'=> (string) $bank_transaction->expense_id ?: '',
|
'expense_id'=> (string) $this->encodePrimaryKey($bank_transaction->expense_id) ?: '',
|
||||||
'payment_id'=> (string) $this->encodePrimaryKey($bank_transaction->payment_id) ?: '',
|
'payment_id'=> (string) $this->encodePrimaryKey($bank_transaction->payment_id) ?: '',
|
||||||
'vendor_id'=> (string) $this->encodePrimaryKey($bank_transaction->vendor_id) ?: '',
|
'vendor_id'=> (string) $this->encodePrimaryKey($bank_transaction->vendor_id) ?: '',
|
||||||
'bank_transaction_rule_id' => (string) $this->encodePrimaryKey($bank_transaction->bank_transaction_rule_id) ?: '',
|
'bank_transaction_rule_id' => (string) $this->encodePrimaryKey($bank_transaction->bank_transaction_rule_id) ?: '',
|
||||||
|
Loading…
Reference in New Issue
Block a user