diff --git a/app/Models/Company.php b/app/Models/Company.php index 44985046ca..cc3c69bc68 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -281,7 +281,7 @@ class Company extends BaseModel */ public function company_gateways() { - return $this->hasMany(CompanyGateway::class); + return $this->hasMany(CompanyGateway::class)->withTrashed(); } /** @@ -289,7 +289,7 @@ class Company extends BaseModel */ public function tax_rates() { - return $this->hasMany(TaxRate::class); + return $this->hasMany(TaxRate::class)->withTrashed(); } /** @@ -297,7 +297,7 @@ class Company extends BaseModel */ public function products() { - return $this->hasMany(Product::class); + return $this->hasMany(Product::class)->withTrashed(); } /** @@ -311,7 +311,7 @@ class Company extends BaseModel public function group_settings() { - return $this->hasMany(GroupSetting::class); + return $this->hasMany(GroupSetting::class)->withTrashed(); } public function timezone() diff --git a/app/Models/TaxRate.php b/app/Models/TaxRate.php index 0ecf6e854c..b2737c6b6c 100644 --- a/app/Models/TaxRate.php +++ b/app/Models/TaxRate.php @@ -24,7 +24,7 @@ class TaxRate extends BaseModel 'rate', ]; - protected $appends = ['tax_rate_id']; + // protected $appends = ['tax_rate_id']; public function getEntityType() { diff --git a/app/Transformers/CompanyTransformer.php b/app/Transformers/CompanyTransformer.php index 637f2d2ea0..d28c001595 100644 --- a/app/Transformers/CompanyTransformer.php +++ b/app/Transformers/CompanyTransformer.php @@ -53,7 +53,6 @@ class CompanyTransformer extends EntityTransformer */ protected $defaultIncludes = [ 'documents', - 'tax_rates', ]; /**