Merge pull request #4 from InvoiceShelf/updates-3

Review & Sync Crater PRs
This commit is contained in:
Darko Gjorgjijoski
2024-01-29 10:16:42 +01:00
committed by GitHub
8 changed files with 42 additions and 26 deletions

View File

@@ -435,7 +435,7 @@ class Payment extends Model implements HasMedia
'{PAYMENT_DATE}' => $this->formattedPaymentDate, '{PAYMENT_DATE}' => $this->formattedPaymentDate,
'{PAYMENT_MODE}' => $this->paymentMethod ? $this->paymentMethod->name : null, '{PAYMENT_MODE}' => $this->paymentMethod ? $this->paymentMethod->name : null,
'{PAYMENT_NUMBER}' => $this->payment_number, '{PAYMENT_NUMBER}' => $this->payment_number,
'{PAYMENT_AMOUNT}' => $this->reference_number, '{PAYMENT_AMOUNT}' => format_money_pdf($this->amount, $this->customer->currency),
]; ];
} }

View File

@@ -46,32 +46,32 @@ return [
Invoice::class => [ Invoice::class => [
'salt' => Invoice::class.config('app.key'), 'salt' => Invoice::class.config('app.key'),
'length' => 20, 'length' => 20,
'alphabet' => 'XKyIAR7mgt8jD2vbqPrOSVenNGpiYLx4M61T', 'alphabet' => 'XKAR7m8jD2bqP9OSVeNGiYL465T10zhfWuc3',
], ],
Estimate::class => [ Estimate::class => [
'salt' => Estimate::class.config('app.key'), 'salt' => Estimate::class.config('app.key'),
'length' => 20, 'length' => 20,
'alphabet' => 'yLJWP79M8rYVqbn1NXjulO6IUDdvekRQGo40', 'alphabet' => 'yJW2P79M8rCHsVq5zbn1fXl6IUt3dAekGo40',
], ],
Payment::class => [ Payment::class => [
'salt' => Payment::class.config('app.key'), 'salt' => Payment::class.config('app.key'),
'length' => 20, 'length' => 20,
'alphabet' => 'asqtW3eDRIxB65GYl7UVLS1dybn9XrKTZ4zO', 'alphabet' => 'aqW3eR2Icf0jp65Gl7UVS1dhyb8Mn9XKTZ4O',
], ],
Company::class => [ Company::class => [
'salt' => Company::class.config('app.key'), 'salt' => Company::class.config('app.key'),
'length' => 20, 'length' => 20,
'alphabet' => 's0DxOFtEYEnuKPmP08Ch6A1iHlLmBTBVWms5', 'alphabet' => 's0D7xOFYEqn2uKJm3Pr9g8Cz46A1iHLBTVW5',
], ],
EmailLog::class => [ EmailLog::class => [
'salt' => EmailLog::class.config('app.key'), 'salt' => EmailLog::class.config('app.key'),
'length' => 20, 'length' => 20,
'alphabet' => 'BRAMEz5str5UVe9oCqzoYY2oKgUi8wQQSmrR', 'alphabet' => 'BA5tJUVNPe93fCq6DHlY2x4ZO1Kg7i8wSm0R',
], ],
Transaction::class => [ Transaction::class => [
'salt' => Transaction::class.config('app.key'), 'salt' => Transaction::class.config('app.key'),
'length' => 20, 'length' => 20,
'alphabet' => 'ADyQWE8mgt7jF2vbnPrKLJenHVpiUIq4M12T', 'alphabet' => 'ADyWE86Cg7jF23vS0bonXrZ5KLH9puIQ4M1T',
], ],
], ],
]; ];

View File

@@ -40,6 +40,14 @@ class CurrenciesTableSeeder extends Seeder
'decimal_separator' => ',', 'decimal_separator' => ',',
'swap_currency_symbol' => true, 'swap_currency_symbol' => true,
], ],
[
'name' => 'Bosnia and Herzegovina Convertible Mark',
'code' => 'BAM',
'symbol' => 'KM',
'precision' => '2',
'thousand_separator' => ',',
'decimal_separator' => '.',
],
[ [
'name' => 'South African Rand', 'name' => 'South African Rand',
'code' => 'ZAR', 'code' => 'ZAR',
@@ -371,6 +379,14 @@ class CurrenciesTableSeeder extends Seeder
'thousand_separator' => '.', 'thousand_separator' => '.',
'decimal_separator' => ',', 'decimal_separator' => ',',
], ],
[
'name' => 'Turkmenistani manat',
'code' => 'TMT',
'symbol' => 'M ',
'precision' => '2',
'thousand_separator' => '.',
'decimal_separator' => ',',
],
[ [
'name' => 'Romanian New Leu', 'name' => 'Romanian New Leu',
'code' => 'RON', 'code' => 'RON',

View File

@@ -16,7 +16,7 @@ server {
fastcgi_read_timeout 300; fastcgi_read_timeout 300;
} }
location / { location / {
try_files $uri $uri/ /index.php?$query_string; try_files $uri $uri/ /index.php$is_args$query_string;
gzip_static on; gzip_static on;
} }
} }

View File

@@ -1516,7 +1516,7 @@
"pdf_total_sales_label": "TOTAL DES VENTES", "pdf_total_sales_label": "TOTAL DES VENTES",
"pdf_item_sales_label": "Rapport des ventes : par article", "pdf_item_sales_label": "Rapport des ventes : par article",
"pdf_tax_report_label": "TAXES", "pdf_tax_report_label": "TAXES",
"pdf_total_tax_label": "TOTAL", "pdf_total_tax_label": "TOTAL TAXES",
"pdf_tax_types_label": "Taxe", "pdf_tax_types_label": "Taxe",
"pdf_expenses_label": "Dépenses", "pdf_expenses_label": "Dépenses",
"pdf_bill_to": "Facturer à", "pdf_bill_to": "Facturer à",

View File

@@ -4,7 +4,7 @@ use InvoiceShelf\Http\Controllers\V1\Admin\Users\UsersController;
use InvoiceShelf\Http\Requests\UserRequest; use InvoiceShelf\Http\Requests\UserRequest;
use InvoiceShelf\Models\User; use InvoiceShelf\Models\User;
use Laravel\Sanctum\Sanctum; use Laravel\Sanctum\Sanctum;
use function Pest\Faker\faker; use function Pest\Faker\fake;
use function Pest\Laravel\getJson; use function Pest\Laravel\getJson;
use function Pest\Laravel\postJson; use function Pest\Laravel\postJson;
use function Pest\Laravel\putJson; use function Pest\Laravel\putJson;
@@ -37,10 +37,10 @@ test('store user using a form request', function () {
// test('store user', function () { // test('store user', function () {
// $data = [ // $data = [
// 'name' => faker()->name, // 'name' => fake()->name,
// 'email' => faker()->unique()->safeEmail, // 'email' => fake()->unique()->safeEmail,
// 'phone' => faker()->phoneNumber, // 'phone' => fake()->phoneNumber,
// 'password' => faker()->password // 'password' => fake()->password
// ]; // ];
// postJson('/api/v1/users', $data)->assertOk(); // postJson('/api/v1/users', $data)->assertOk();
@@ -70,10 +70,10 @@ test('update user using a form request', function () {
// $user = User::factory()->create(); // $user = User::factory()->create();
// $data = [ // $data = [
// 'name' => faker()->name, // 'name' => fake()->name,
// 'email' => faker()->unique()->safeEmail, // 'email' => fake()->unique()->safeEmail,
// 'phone' => faker()->phoneNumber, // 'phone' => fake()->phoneNumber,
// 'password' => faker()->password // 'password' => fake()->password
// ]; // ];
// putJson("/api/v1/users/{$user->id}", $data)->assertOk(); // putJson("/api/v1/users/{$user->id}", $data)->assertOk();

View File

@@ -3,7 +3,7 @@
use InvoiceShelf\Models\Company; use InvoiceShelf\Models\Company;
use InvoiceShelf\Models\CompanySetting; use InvoiceShelf\Models\CompanySetting;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use function Pest\Faker\faker; use function Pest\Faker\fake;
beforeEach(function () { beforeEach(function () {
Artisan::call('db:seed', ['--class' => 'DatabaseSeeder', '--force' => true]); Artisan::call('db:seed', ['--class' => 'DatabaseSeeder', '--force' => true]);
@@ -17,9 +17,9 @@ test('company setting belongs to company', function () {
}); });
test('set settings', function () { test('set settings', function () {
$key = faker()->name; $key = fake()->name;
$value = faker()->word; $value = fake()->word;
$company = Company::factory()->create(); $company = Company::factory()->create();
@@ -31,9 +31,9 @@ test('set settings', function () {
}); });
test('get settings', function () { test('get settings', function () {
$key = faker()->name; $key = fake()->name;
$value = faker()->word; $value = fake()->word;
$company = Company::factory()->create(); $company = Company::factory()->create();

View File

@@ -2,7 +2,7 @@
use InvoiceShelf\Models\Setting; use InvoiceShelf\Models\Setting;
use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Artisan;
use function Pest\Faker\faker; use function Pest\Faker\fake;
beforeEach(function () { beforeEach(function () {
Artisan::call('db:seed', ['--class' => 'DatabaseSeeder', '--force' => true]); Artisan::call('db:seed', ['--class' => 'DatabaseSeeder', '--force' => true]);
@@ -10,9 +10,9 @@ beforeEach(function () {
}); });
test('set setting', function () { test('set setting', function () {
$key = faker()->name; $key = fake()->name;
$value = faker()->word; $value = fake()->word;
Setting::setSetting($key, $value); Setting::setSetting($key, $value);