diff --git a/app/Models/Payment.php b/app/Models/Payment.php index f292041d..8fc2786d 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -435,7 +435,7 @@ class Payment extends Model implements HasMedia '{PAYMENT_DATE}' => $this->formattedPaymentDate, '{PAYMENT_MODE}' => $this->paymentMethod ? $this->paymentMethod->name : null, '{PAYMENT_NUMBER}' => $this->payment_number, - '{PAYMENT_AMOUNT}' => $this->reference_number, + '{PAYMENT_AMOUNT}' => format_money_pdf($this->amount, $this->customer->currency), ]; } diff --git a/config/hashids.php b/config/hashids.php index e4fd27ce..4942314c 100644 --- a/config/hashids.php +++ b/config/hashids.php @@ -46,32 +46,32 @@ return [ Invoice::class => [ 'salt' => Invoice::class.config('app.key'), 'length' => 20, - 'alphabet' => 'XKyIAR7mgt8jD2vbqPrOSVenNGpiYLx4M61T', + 'alphabet' => 'XKAR7m8jD2bqP9OSVeNGiYL465T10zhfWuc3', ], Estimate::class => [ 'salt' => Estimate::class.config('app.key'), 'length' => 20, - 'alphabet' => 'yLJWP79M8rYVqbn1NXjulO6IUDdvekRQGo40', + 'alphabet' => 'yJW2P79M8rCHsVq5zbn1fXl6IUt3dAekGo40', ], Payment::class => [ 'salt' => Payment::class.config('app.key'), 'length' => 20, - 'alphabet' => 'asqtW3eDRIxB65GYl7UVLS1dybn9XrKTZ4zO', + 'alphabet' => 'aqW3eR2Icf0jp65Gl7UVS1dhyb8Mn9XKTZ4O', ], Company::class => [ 'salt' => Company::class.config('app.key'), 'length' => 20, - 'alphabet' => 's0DxOFtEYEnuKPmP08Ch6A1iHlLmBTBVWms5', + 'alphabet' => 's0D7xOFYEqn2uKJm3Pr9g8Cz46A1iHLBTVW5', ], EmailLog::class => [ 'salt' => EmailLog::class.config('app.key'), 'length' => 20, - 'alphabet' => 'BRAMEz5str5UVe9oCqzoYY2oKgUi8wQQSmrR', + 'alphabet' => 'BA5tJUVNPe93fCq6DHlY2x4ZO1Kg7i8wSm0R', ], Transaction::class => [ 'salt' => Transaction::class.config('app.key'), 'length' => 20, - 'alphabet' => 'ADyQWE8mgt7jF2vbnPrKLJenHVpiUIq4M12T', + 'alphabet' => 'ADyWE86Cg7jF23vS0bonXrZ5KLH9puIQ4M1T', ], ], ]; diff --git a/database/seeders/CurrenciesTableSeeder.php b/database/seeders/CurrenciesTableSeeder.php index a76a10fc..cb0121a0 100644 --- a/database/seeders/CurrenciesTableSeeder.php +++ b/database/seeders/CurrenciesTableSeeder.php @@ -40,6 +40,14 @@ class CurrenciesTableSeeder extends Seeder 'decimal_separator' => ',', 'swap_currency_symbol' => true, ], + [ + 'name' => 'Bosnia and Herzegovina Convertible Mark', + 'code' => 'BAM', + 'symbol' => 'KM', + 'precision' => '2', + 'thousand_separator' => ',', + 'decimal_separator' => '.', + ], [ 'name' => 'South African Rand', 'code' => 'ZAR', @@ -371,6 +379,14 @@ class CurrenciesTableSeeder extends Seeder 'thousand_separator' => '.', 'decimal_separator' => ',', ], + [ + 'name' => 'Turkmenistani manat', + 'code' => 'TMT', + 'symbol' => 'M ', + 'precision' => '2', + 'thousand_separator' => '.', + 'decimal_separator' => ',', + ], [ 'name' => 'Romanian New Leu', 'code' => 'RON', diff --git a/docker-compose/nginx/nginx.conf b/docker-compose/nginx/nginx.conf index ba2aa53b..d9b28d8a 100644 --- a/docker-compose/nginx/nginx.conf +++ b/docker-compose/nginx/nginx.conf @@ -16,7 +16,7 @@ server { fastcgi_read_timeout 300; } location / { - try_files $uri $uri/ /index.php?$query_string; + try_files $uri $uri/ /index.php$is_args$query_string; gzip_static on; } } diff --git a/resources/scripts/locales/fr.json b/resources/scripts/locales/fr.json index 8a6ba9cd..28410ad1 100644 --- a/resources/scripts/locales/fr.json +++ b/resources/scripts/locales/fr.json @@ -1516,7 +1516,7 @@ "pdf_total_sales_label": "TOTAL DES VENTES", "pdf_item_sales_label": "Rapport des ventes : par article", "pdf_tax_report_label": "TAXES", - "pdf_total_tax_label": "TOTAL", + "pdf_total_tax_label": "TOTAL TAXES", "pdf_tax_types_label": "Taxe", "pdf_expenses_label": "Dépenses", "pdf_bill_to": "Facturer à", diff --git a/tests/Feature/Admin/UserTest.php b/tests/Feature/Admin/UserTest.php index 9f0885f1..6a257022 100644 --- a/tests/Feature/Admin/UserTest.php +++ b/tests/Feature/Admin/UserTest.php @@ -4,7 +4,7 @@ use InvoiceShelf\Http\Controllers\V1\Admin\Users\UsersController; use InvoiceShelf\Http\Requests\UserRequest; use InvoiceShelf\Models\User; use Laravel\Sanctum\Sanctum; -use function Pest\Faker\faker; +use function Pest\Faker\fake; use function Pest\Laravel\getJson; use function Pest\Laravel\postJson; use function Pest\Laravel\putJson; @@ -37,10 +37,10 @@ test('store user using a form request', function () { // test('store user', function () { // $data = [ -// 'name' => faker()->name, -// 'email' => faker()->unique()->safeEmail, -// 'phone' => faker()->phoneNumber, -// 'password' => faker()->password +// 'name' => fake()->name, +// 'email' => fake()->unique()->safeEmail, +// 'phone' => fake()->phoneNumber, +// 'password' => fake()->password // ]; // postJson('/api/v1/users', $data)->assertOk(); @@ -70,10 +70,10 @@ test('update user using a form request', function () { // $user = User::factory()->create(); // $data = [ -// 'name' => faker()->name, -// 'email' => faker()->unique()->safeEmail, -// 'phone' => faker()->phoneNumber, -// 'password' => faker()->password +// 'name' => fake()->name, +// 'email' => fake()->unique()->safeEmail, +// 'phone' => fake()->phoneNumber, +// 'password' => fake()->password // ]; // putJson("/api/v1/users/{$user->id}", $data)->assertOk(); diff --git a/tests/Unit/CompanySettingTest.php b/tests/Unit/CompanySettingTest.php index 7cd8ae4d..99553fc4 100644 --- a/tests/Unit/CompanySettingTest.php +++ b/tests/Unit/CompanySettingTest.php @@ -3,7 +3,7 @@ use InvoiceShelf\Models\Company; use InvoiceShelf\Models\CompanySetting; use Illuminate\Support\Facades\Artisan; -use function Pest\Faker\faker; +use function Pest\Faker\fake; beforeEach(function () { Artisan::call('db:seed', ['--class' => 'DatabaseSeeder', '--force' => true]); @@ -17,9 +17,9 @@ test('company setting belongs to company', function () { }); test('set settings', function () { - $key = faker()->name; + $key = fake()->name; - $value = faker()->word; + $value = fake()->word; $company = Company::factory()->create(); @@ -31,9 +31,9 @@ test('set settings', function () { }); test('get settings', function () { - $key = faker()->name; + $key = fake()->name; - $value = faker()->word; + $value = fake()->word; $company = Company::factory()->create(); diff --git a/tests/Unit/SettingTest.php b/tests/Unit/SettingTest.php index 2b4c7a9d..1d001219 100644 --- a/tests/Unit/SettingTest.php +++ b/tests/Unit/SettingTest.php @@ -2,7 +2,7 @@ use InvoiceShelf\Models\Setting; use Illuminate\Support\Facades\Artisan; -use function Pest\Faker\faker; +use function Pest\Faker\fake; beforeEach(function () { Artisan::call('db:seed', ['--class' => 'DatabaseSeeder', '--force' => true]); @@ -10,9 +10,9 @@ beforeEach(function () { }); test('set setting', function () { - $key = faker()->name; + $key = fake()->name; - $value = faker()->word; + $value = fake()->word; Setting::setSetting($key, $value);