mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:54:30 -04:00
Fixes for bank transaction relations
This commit is contained in:
parent
77e2e90b20
commit
ee4be49fcf
@ -25,7 +25,7 @@ class DocumentExport extends BaseExport
|
||||
|
||||
private $entity_transformer;
|
||||
|
||||
public $date_key = 'created_at';
|
||||
public string $date_key = 'created_at';
|
||||
|
||||
public array $entity_keys = [
|
||||
'record_type' => 'record_type',
|
||||
|
@ -25,7 +25,7 @@ class ExpenseExport extends BaseExport
|
||||
|
||||
private $expense_transformer;
|
||||
|
||||
public $date_key = 'date';
|
||||
public string $date_key = 'date';
|
||||
|
||||
public array $entity_keys = [
|
||||
'amount' => 'amount',
|
||||
|
@ -26,7 +26,7 @@ class ProductExport extends BaseExport
|
||||
|
||||
private $entity_transformer;
|
||||
|
||||
public $date_key = 'created_at';
|
||||
public string $date_key = 'created_at';
|
||||
|
||||
public array $entity_keys = [
|
||||
'project' => 'project_id',
|
||||
|
@ -28,7 +28,7 @@ class TaskExport extends BaseExport
|
||||
|
||||
private $entity_transformer;
|
||||
|
||||
public $date_key = 'created_at';
|
||||
public string $date_key = 'created_at';
|
||||
|
||||
private string $date_format = 'YYYY-MM-DD';
|
||||
|
||||
|
@ -368,9 +368,6 @@ class Company extends BaseModel
|
||||
return $this->hasMany(Product::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function country()
|
||||
{
|
||||
$companies = Cache::get('countries');
|
||||
@ -429,9 +426,6 @@ class Company extends BaseModel
|
||||
return $this->hasMany(PaymentTerm::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo
|
||||
*/
|
||||
public function language()
|
||||
{
|
||||
$languages = Cache::get('languages');
|
||||
|
@ -35,7 +35,6 @@ class BankTransactionTransformer extends EntityTransformer
|
||||
*/
|
||||
protected $availableIncludes = [
|
||||
'company',
|
||||
'account',
|
||||
'expense',
|
||||
'payment',
|
||||
'vendor',
|
||||
@ -76,13 +75,6 @@ class BankTransactionTransformer extends EntityTransformer
|
||||
];
|
||||
}
|
||||
|
||||
public function includeAccount(BankTransaction $bank_transaction)
|
||||
{
|
||||
$transformer = new AccountTransformer($this->serializer);
|
||||
|
||||
return $this->includeItem($bank_transaction->account, $transformer, Account::class);
|
||||
}
|
||||
|
||||
public function includeCompany(BankTransaction $bank_transaction)
|
||||
{
|
||||
$transformer = new CompanyTransformer($this->serializer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user