convert setting('default.currency') to default_currency() helper function..
This commit is contained in:
@ -70,7 +70,7 @@ class Account extends Factory
|
||||
public function default_currency()
|
||||
{
|
||||
return $this->state([
|
||||
'currency_code' => setting('default.currency'),
|
||||
'currency_code' => default_currency(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ class Contact extends Factory
|
||||
'address' => $this->faker->address,
|
||||
'country' => $this->faker->randomElement($countries),
|
||||
'website' => 'https://akaunting.com',
|
||||
'currency_code' => setting('default.currency'),
|
||||
'currency_code' => default_currency(),
|
||||
'reference' => $this->faker->text(5),
|
||||
'enabled' => $this->faker->boolean ? 1 : 0,
|
||||
'created_from' => 'core::factory',
|
||||
|
@ -44,7 +44,7 @@ class Document extends AbstractFactory
|
||||
'company_id' => $this->company->id,
|
||||
'issued_at' => $issued_at,
|
||||
'due_at' => $due_at,
|
||||
'currency_code' => setting('default.currency'),
|
||||
'currency_code' => default_currency(),
|
||||
'currency_rate' => '1',
|
||||
'notes' => $this->faker->text(5),
|
||||
'amount' => '0',
|
||||
@ -247,7 +247,7 @@ class Document extends AbstractFactory
|
||||
'tax_ids' => [$tax->id],
|
||||
'quantity' => '1',
|
||||
'price' => $amount,
|
||||
'currency' => setting('default.currency'),
|
||||
'currency' => default_currency(),
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -28,7 +28,7 @@ class Reconciliation extends Factory
|
||||
return [
|
||||
'company_id' => $this->company->id,
|
||||
'account_id' => '1',
|
||||
'currency_code' => setting('default.currency'),
|
||||
'currency_code' => default_currency(),
|
||||
'opening_balance' => '0',
|
||||
'closing_balance' => '10',
|
||||
'started_at' => $started_at,
|
||||
|
@ -44,7 +44,7 @@ class Transaction extends Factory
|
||||
'account_id' => setting('default.account'),
|
||||
'paid_at' => $this->faker->dateTimeBetween(now()->startOfYear(), now()->endOfYear())->format('Y-m-d H:i:s'),
|
||||
'amount' => $this->faker->randomFloat(2, 1, 1000),
|
||||
'currency_code' => setting('default.currency'),
|
||||
'currency_code' => default_currency(),
|
||||
'currency_rate' => '1.0',
|
||||
'description' => $this->faker->text(5),
|
||||
'category_id' => $this->company->categories()->$category_type()->get()->random(1)->pluck('id')->first(),
|
||||
|
@ -84,7 +84,7 @@ class TestCompany extends Seeder
|
||||
'type' => 'customer',
|
||||
'name' => 'Test Customer',
|
||||
'email' => 'customer@company.com',
|
||||
'currency_code' => setting('default.currency'),
|
||||
'currency_code' => default_currency(),
|
||||
'password' => '123456',
|
||||
'password_confirmation' => '123456',
|
||||
'company_id' => company_id(),
|
||||
|
Reference in New Issue
Block a user