From db11b0cf835a5ba0896418305c8edba8bd838181 Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Fri, 5 Feb 2021 20:34:35 +0300 Subject: [PATCH 01/60] quarterly based reports should consider financial year start --- app/Abstracts/Report.php | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index 7a060173d..e2fedbbae 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -16,6 +16,7 @@ use App\Traits\Charts; use App\Traits\DateTime; use App\Traits\SearchString; use App\Utilities\Chartjs; +use Carbon\CarbonPeriod; use Date; use Illuminate\Support\Str; @@ -388,15 +389,26 @@ abstract class Report switch ($this->getSetting('period')) { case 'yearly': $i = $date->copy()->format($this->getYearlyDateFormat()); + break; case 'quarterly': - $start = $date->copy()->startOfQuarter()->format($this->getQuarterlyDateFormat($this->year)); - $end = $date->copy()->endOfQuarter()->format($this->getQuarterlyDateFormat($this->year)); + $quarters = $this->getFiscalBaseQuarters($this->year); + + foreach ($quarters as $quarter) { + if ($date->lessThan($quarter->getStartDate()) || $date->greaterThan($quarter->getEndDate())) { + continue; + } + + $start = $quarter->getStartDate()->format($this->getQuarterlyDateFormat($this->year)); + $end = $quarter->getEndDate()->format($this->getQuarterlyDateFormat($this->year)); + } $i = $start . '-' . $end; + break; default: $i = $date->copy()->format($this->getMonthlyDateFormat($this->year)); + break; } @@ -502,4 +514,16 @@ abstract class Report ], ]; } + + private function getFiscalBaseQuarters($year) + { + $periods = []; + $fiscal_start = $this->getFinancialStart($year); + + for ($i = 0; $i < 4; $i++) { + $periods[] = CarbonPeriod::create($fiscal_start->copy()->addQuarters($i), $fiscal_start->copy()->addQuarters($i + 1)->subDay()); + } + + return $periods; + } } From c445d73765652b0fa122b0985d604b80a83dff85 Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Fri, 5 Feb 2021 21:00:15 +0300 Subject: [PATCH 02/60] code refactoring --- app/Abstracts/Report.php | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index e2fedbbae..57f4758de 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -278,44 +278,28 @@ abstract class Report case 'yearly': $start->addYear(); - $date = $this->getFormattedDate($start); - - $this->dates[$j] = $date; - - foreach ($this->tables as $table) { - $this->footer_totals[$table][$date] = 0; - } - $j += 11; break; case 'quarterly': $start->addQuarter(); - $date = $this->getFormattedDate($start); - - $this->dates[$j] = $date; - - foreach ($this->tables as $table) { - $this->footer_totals[$table][$date] = 0; - } - $j += 2; break; default: $start->addMonth(); - $date = $this->getFormattedDate($start); - - $this->dates[$j] = $date; - - foreach ($this->tables as $table) { - $this->footer_totals[$table][$date] = 0; - } - break; } + + $date = $this->getFormattedDate($start); + + $this->dates[] = $date; + + foreach ($this->tables as $table) { + $this->footer_totals[$table][$date] = 0; + } } } From 53e12abe386b678e0fdb069c89b546aab85e9c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sun, 7 Feb 2021 01:09:31 +0300 Subject: [PATCH 03/60] fixed #1835 --- database/factories/Transaction.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/database/factories/Transaction.php b/database/factories/Transaction.php index 91335775e..f5463f19f 100644 --- a/database/factories/Transaction.php +++ b/database/factories/Transaction.php @@ -27,6 +27,8 @@ class Transaction extends Factory $types = array_merge($this->getIncomeTypes(), $this->getExpenseTypes()); $type = $this->faker->randomElement($types); + $category_type = in_array($type, $this->getIncomeTypes()) ? 'income' : 'expense'; + return [ 'company_id' => $this->company->id, 'type' => $type, @@ -36,7 +38,7 @@ class Transaction extends Factory 'currency_code' => setting('default.currency'), 'currency_rate' => '1.0', 'description' => $this->faker->text(5), - 'category_id' => $this->company->categories()->type($type)->get()->random(1)->pluck('id')->first(), + 'category_id' => $this->company->categories()->$category_type()->get()->random(1)->pluck('id')->first(), 'reference' => $this->faker->text(5), 'payment_method' => setting('default.payment_method'), ]; From 94d3b5c020279483d3f674ceb4565feeea87630f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sun, 7 Feb 2021 01:10:22 +0300 Subject: [PATCH 04/60] styling --- database/factories/Transaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/factories/Transaction.php b/database/factories/Transaction.php index f5463f19f..aab752572 100644 --- a/database/factories/Transaction.php +++ b/database/factories/Transaction.php @@ -25,7 +25,7 @@ class Transaction extends Factory public function definition() { $types = array_merge($this->getIncomeTypes(), $this->getExpenseTypes()); - $type = $this->faker->randomElement($types); + $type = $this->faker->randomElement($types); $category_type = in_array($type, $this->getIncomeTypes()) ? 'income' : 'expense'; From f399b8a4134e746da51e1cb0b021c2275d0f0ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sun, 7 Feb 2021 01:12:57 +0300 Subject: [PATCH 05/60] more styling --- database/factories/Transaction.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/database/factories/Transaction.php b/database/factories/Transaction.php index aab752572..d5e9b3933 100644 --- a/database/factories/Transaction.php +++ b/database/factories/Transaction.php @@ -8,7 +8,7 @@ use App\Traits\Transactions; class Transaction extends Factory { - use Transactions; + use Transactions; /** * The name of the factory's corresponding model. @@ -29,19 +29,19 @@ class Transaction extends Factory $category_type = in_array($type, $this->getIncomeTypes()) ? 'income' : 'expense'; - return [ - 'company_id' => $this->company->id, - 'type' => $type, - '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_rate' => '1.0', - 'description' => $this->faker->text(5), - 'category_id' => $this->company->categories()->$category_type()->get()->random(1)->pluck('id')->first(), - 'reference' => $this->faker->text(5), - 'payment_method' => setting('default.payment_method'), - ]; + return [ + 'company_id' => $this->company->id, + 'type' => $type, + '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_rate' => '1.0', + 'description' => $this->faker->text(5), + 'category_id' => $this->company->categories()->$category_type()->get()->random(1)->pluck('id')->first(), + 'reference' => $this->faker->text(5), + 'payment_method' => setting('default.payment_method'), + ]; } /** From a770e678f93b821dc184c74d2072eaef8d46a3fa Mon Sep 17 00:00:00 2001 From: Crowdin Bot Date: Sun, 7 Feb 2021 16:50:23 +0000 Subject: [PATCH 06/60] new crowdin translations --- resources/lang/az-AZ/accounts.php | 14 ++ resources/lang/az-AZ/auth.php | 41 ++++ resources/lang/az-AZ/bills.php | 56 ++++++ resources/lang/az-AZ/bulk_actions.php | 23 +++ resources/lang/az-AZ/companies.php | 14 ++ resources/lang/az-AZ/currencies.php | 19 ++ resources/lang/az-AZ/customers.php | 12 ++ resources/lang/az-AZ/dashboards.php | 11 ++ resources/lang/az-AZ/demo.php | 34 ++++ resources/lang/az-AZ/documents.php | 54 ++++++ resources/lang/az-AZ/email_templates.php | 50 +++++ resources/lang/az-AZ/errors.php | 23 +++ resources/lang/az-AZ/footer.php | 10 + resources/lang/az-AZ/general.php | 231 +++++++++++++++++++++++ resources/lang/az-AZ/header.php | 16 ++ resources/lang/az-AZ/import.php | 9 + resources/lang/az-AZ/install.php | 46 +++++ resources/lang/az-AZ/invoices.php | 60 ++++++ resources/lang/az-AZ/items.php | 8 + resources/lang/az-AZ/maintenance.php | 9 + resources/lang/az-AZ/messages.php | 37 ++++ resources/lang/az-AZ/modules.php | 83 ++++++++ resources/lang/az-AZ/notifications.php | 10 + resources/lang/az-AZ/pagination.php | 10 + resources/lang/az-AZ/passwords.php | 23 +++ resources/lang/az-AZ/reconciliations.php | 18 ++ resources/lang/az-AZ/recurring.php | 20 ++ resources/lang/az-AZ/reports.php | 31 +++ resources/lang/az-AZ/search_string.php | 18 ++ resources/lang/az-AZ/settings.php | 138 ++++++++++++++ resources/lang/az-AZ/taxes.php | 12 ++ resources/lang/az-AZ/transfers.php | 12 ++ resources/lang/az-AZ/updates.php | 15 ++ resources/lang/az-AZ/validation.php | 123 ++++++++++++ resources/lang/az-AZ/widgets.php | 23 +++ resources/lang/el-GR/settings.php | 11 +- resources/lang/th-TH/auth.php | 2 +- resources/lang/th-TH/currencies.php | 1 + resources/lang/th-TH/customers.php | 8 +- resources/lang/th-TH/demo.php | 38 +++- resources/lang/th-TH/errors.php | 23 +++ resources/lang/th-TH/import.php | 2 +- resources/lang/th-TH/maintenance.php | 9 + resources/lang/th-TH/passwords.php | 1 + resources/lang/th-TH/taxes.php | 5 +- resources/lang/th-TH/validation.php | 36 ++-- 46 files changed, 1411 insertions(+), 38 deletions(-) create mode 100644 resources/lang/az-AZ/accounts.php create mode 100644 resources/lang/az-AZ/auth.php create mode 100644 resources/lang/az-AZ/bills.php create mode 100644 resources/lang/az-AZ/bulk_actions.php create mode 100644 resources/lang/az-AZ/companies.php create mode 100644 resources/lang/az-AZ/currencies.php create mode 100644 resources/lang/az-AZ/customers.php create mode 100644 resources/lang/az-AZ/dashboards.php create mode 100644 resources/lang/az-AZ/demo.php create mode 100644 resources/lang/az-AZ/documents.php create mode 100644 resources/lang/az-AZ/email_templates.php create mode 100644 resources/lang/az-AZ/errors.php create mode 100644 resources/lang/az-AZ/footer.php create mode 100644 resources/lang/az-AZ/general.php create mode 100644 resources/lang/az-AZ/header.php create mode 100644 resources/lang/az-AZ/import.php create mode 100644 resources/lang/az-AZ/install.php create mode 100644 resources/lang/az-AZ/invoices.php create mode 100644 resources/lang/az-AZ/items.php create mode 100644 resources/lang/az-AZ/maintenance.php create mode 100644 resources/lang/az-AZ/messages.php create mode 100644 resources/lang/az-AZ/modules.php create mode 100644 resources/lang/az-AZ/notifications.php create mode 100644 resources/lang/az-AZ/pagination.php create mode 100644 resources/lang/az-AZ/passwords.php create mode 100644 resources/lang/az-AZ/reconciliations.php create mode 100644 resources/lang/az-AZ/recurring.php create mode 100644 resources/lang/az-AZ/reports.php create mode 100644 resources/lang/az-AZ/search_string.php create mode 100644 resources/lang/az-AZ/settings.php create mode 100644 resources/lang/az-AZ/taxes.php create mode 100644 resources/lang/az-AZ/transfers.php create mode 100644 resources/lang/az-AZ/updates.php create mode 100644 resources/lang/az-AZ/validation.php create mode 100644 resources/lang/az-AZ/widgets.php create mode 100644 resources/lang/th-TH/errors.php create mode 100644 resources/lang/th-TH/maintenance.php diff --git a/resources/lang/az-AZ/accounts.php b/resources/lang/az-AZ/accounts.php new file mode 100644 index 000000000..37b4b0103 --- /dev/null +++ b/resources/lang/az-AZ/accounts.php @@ -0,0 +1,14 @@ + 'Hesab Adı', + 'number' => 'Nömrə', + 'opening_balance' => 'Açılış Balansı', + 'current_balance' => 'Mövcud Balans', + 'bank_name' => 'Bank Adı', + 'bank_phone' => 'Bank Telefonu', + 'bank_address' => 'Bank Ünvanı', + 'default_account' => 'Varsayılan Hesab', + +]; diff --git a/resources/lang/az-AZ/auth.php b/resources/lang/az-AZ/auth.php new file mode 100644 index 000000000..92e6880a9 --- /dev/null +++ b/resources/lang/az-AZ/auth.php @@ -0,0 +1,41 @@ + 'Profil', + 'logout' => 'Çıxış', + 'login' => 'Giriş', + 'login_to' => 'Giriş üçün daxil olun', + 'remember_me' => 'Məni Xatırla', + 'forgot_password' => 'Şifrəmi unutdum', + 'reset_password' => 'Şifrəmi Yenilə', + 'enter_email' => 'E-poçt Ünvanınızı Daxil edin', + 'current_email' => 'Cari E-poçt', + 'reset' => 'Yenilə', + 'never' => 'heçbir zaman', + 'landing_page' => 'Açılış Səhifəsi', + + 'password' => [ + 'current' => 'Şifrə', + 'current_confirm' => 'Şifrə Təsdiqi', + 'new' => 'Yeni Şifrə', + 'new_confirm' => 'Yeni Şifrə Təsdiqi', + ], + + 'error' => [ + 'self_delete' => 'Xəta: Özünüzü silə bilməzsiniz!', + 'self_disable' => 'Xəta: Özünüzü deaktiv edə bilməzsiniz!', + 'no_company' => 'Xəta: Hesabınıza təyin edilmiş bir şirkət yoxdur. Zəhmət olmasa sistem inzibatçısı ilə əlaqə saxlayın.', + ], + + 'failed' => 'Bu istifadəçi bilgiləri bizim məlumatlarla uyğun gəlmir.', + 'disabled' => 'Bu hesab deaktiv edilib. Zəhmət olmasa sistem administratoru ilə əlaqə saxlayın.', + 'throttle' => 'Çox sayda giriş cəhdi. Zəhmət olmazsa: saniyələr içində yenidən cəhd edin.', + + 'notification' => [ + 'message_1' => 'Bu e-poçtu şifrə Yeniləma tələbinizə uyğun olaraq alırsınız.', + 'message_2' => 'Bir şifrə Yeniləma tələb etmədiyiniz təqdirdə heç bir şey etməyin.', + 'button' => 'Şifrə Yeniləma', + ], + +]; diff --git a/resources/lang/az-AZ/bills.php b/resources/lang/az-AZ/bills.php new file mode 100644 index 000000000..346ff07b9 --- /dev/null +++ b/resources/lang/az-AZ/bills.php @@ -0,0 +1,56 @@ + 'Faktura Nömrəsi', + 'bill_date' => 'Faktura Tarixi', + 'total_price' => 'Cəmi Məbləğ', + 'due_date' => 'Son Ödəniş Tarixi', + 'order_number' => 'Sifariş Nömrəsi', + 'bill_from' => 'Fakturanı Göndərən', + + 'quantity' => 'Ədəd', + 'price' => 'Qiymət', + 'sub_total' => 'Ara Cəmi', + 'discount' => 'Endirim', + 'item_discount' => 'Məhsul Endirimi', + 'tax_total' => 'Vergi Cəmi', + 'total' => 'Cəmi', + + 'item_name' => 'Məhsul Adı | Məhsul Adları', + + 'show_discount' => '%:discount Endirim', + 'add_discount' => 'Endirim Əlavə et', + 'discount_desc' => 'ara cəm üzərinə', + + 'payment_due' => 'Son Ödəmə Tarixi', + 'amount_due' => 'Ödənəcək Məbləğ', + 'paid' => 'Ödənmiş', + 'histories' => 'Keşmiş', + 'payments' => 'Ödənişlər', + 'add_payment' => 'Ödəniş Əlavə Et', + 'mark_paid' => 'Ödənildi İşarələ', + 'mark_received' => 'Qəbul edildi İşarələ', + 'mark_cancelled' => 'Ləğv Edildi İşarələ', + 'download_pdf' => 'PDF Yükə', + 'send_mail' => 'E-poçt Göndər', + 'create_bill' => 'Faktura Yarat', + 'receive_bill' => 'Fakturanı Qəbul et', + 'make_payment' => 'Ödəniş et', + + 'messages' => [ + 'draft' => 'Bu bir QARALAMA Fakturadır və qəbul edildikdən sonra qrafiklərdə əks olunacaq.', + + 'status' => [ + 'created' => ':date Tarixində Yaradıldı', + 'receive' => [ + 'draft' => 'Göndərilmədi', + 'received' => ':date Tarixində Qəbul edildi', + ], + 'paid' => [ + 'await' => 'Gözləyən Ödəniş', + ], + ], + ], + +]; diff --git a/resources/lang/az-AZ/bulk_actions.php b/resources/lang/az-AZ/bulk_actions.php new file mode 100644 index 000000000..628d4aa4d --- /dev/null +++ b/resources/lang/az-AZ/bulk_actions.php @@ -0,0 +1,23 @@ + 'Toplu Hərəkət|Toplu Hərəkətlər', + 'selected' => 'seçili', + 'no_action' => 'Heç bir əməliyyat yoxdur', + + 'message' => [ + 'duplicate' => 'Seşilmiş qeydi dublikat etməl istədiyinizdən əminsiniz?', + 'delete' => 'Seşilmiş qeydi silmək istədiyinizdən əminsiniz?|Seşilmiş qeydiləri silmək istədiyinizdən əminsiniz?', + 'export' => 'Seçilmiş qeydi ixrac etmək istədiyinizdən əminsiniz?|Seçilmiş qeydləri ixrac etmək istədiyinizdən əminsiniz?', + 'enable' => 'Seçilmiş qeydi aktiv etmək istədiyinizdən əminsiniz?|Seçilmiş qeydləri aktiv etmək istədiyinizdən əminsiniz?', + 'disable' => 'Seçilmiş qeydi deaktiv etmək istədiyinizdən əminsiniz?|Seçilmiş qeydləri deaktiv etmək istədiyinizdən əminsiniz?', + 'paid' => 'Seçilmiş fakturanı ödənildi olaraq işarələmək istədiyinizdən əminsiniz?|Seçilmiş fakturaları ödənildi olaraq işarələmək istədiyinizdən əminsiniz?', + 'sent' => 'Seçilmiş fakturanı göndərildi olaraq işarələmək istədiyinizdən əminsiniz?|Seçilmiş fakturaları göndərildi olaraq işarələmək istədiyinizdən əminsiniz?', + 'received' => 'Seçilmiş fakturanı qəbul edildi olaraq işarələmək istədiyinizdən əminsiniz?|Seçilmiş fakturaları qəbul edildi olaraq işarələmək istədiyinizdən əminsiniz?', + 'cancelled' => 'Seçilmiş fakturanı ləğv etmək istədiyinizdən əminsiniz?|Seçilmiş fakturaları ləğv etmək istədiyinizdən əminsiniz?', + 'reconcile' => 'Seçilmiş qeyd üçün razılaşmaq istədiyinizdən əminsiniz?|Seçilmiş qeydlər üçün razılaşmaq istədiyinizdən əminsiniz?', + 'unreconcile' => 'Seçilmiş qeyd üçün razılaşmaq istəmədiyinizdən əminsiniz?|Seçilmiş qeydlər üçün razılaşmaq istəmədiyinizdən əminsiniz?', + ], + +]; diff --git a/resources/lang/az-AZ/companies.php b/resources/lang/az-AZ/companies.php new file mode 100644 index 000000000..87fc5cfd2 --- /dev/null +++ b/resources/lang/az-AZ/companies.php @@ -0,0 +1,14 @@ + 'Domain Adı', + 'logo' => 'Logo', + + 'error' => [ + 'not_user_company' => 'Xəta: Bu şirkəti dəyişdirmə icazəniz yoxdur!', + 'delete_active' => 'Xəta: Mövcud şirkəti silə bilməzsiniz. Zəhmət olmazsa, əvvəlcə başqa bir şirkətə keçin!', + 'disable_active' => 'Xəta: Mövcud şirkəti deaktiv edə bilməzsiniz. Zəhmət olmazsa, əvvəlcə başqa bir şirkətə keçin!', + ], + +]; diff --git a/resources/lang/az-AZ/currencies.php b/resources/lang/az-AZ/currencies.php new file mode 100644 index 000000000..f8f887e4d --- /dev/null +++ b/resources/lang/az-AZ/currencies.php @@ -0,0 +1,19 @@ + 'Kod', + 'rate' => 'Məzənnə', + 'default' => 'Varsayılan Valyuta', + 'decimal_mark' => 'Onluq Ayırıcı', + 'thousands_separator' => 'Minlik Aıyrıcı', + 'precision' => 'Dəqiqlik', + 'conversion' => 'Valyuta konversiyası', + 'symbol' => [ + 'symbol' => 'İşarə', + 'position' => 'İşarənin Yeri', + 'before' => 'Məbləğdən Əvvəl', + 'after' => 'Məbləğdən Sonra', + ] + +]; diff --git a/resources/lang/az-AZ/customers.php b/resources/lang/az-AZ/customers.php new file mode 100644 index 000000000..8072f88a2 --- /dev/null +++ b/resources/lang/az-AZ/customers.php @@ -0,0 +1,12 @@ + 'Giriş Edə Bilər', + 'user_created' => 'İstifadəçi yarat', + + 'error' => [ + 'email' => 'E-poçt ünvanı istifadə edilir.', + ], + +]; diff --git a/resources/lang/az-AZ/dashboards.php b/resources/lang/az-AZ/dashboards.php new file mode 100644 index 000000000..57a4b66d7 --- /dev/null +++ b/resources/lang/az-AZ/dashboards.php @@ -0,0 +1,11 @@ + [ + 'not_user_dashboard' => 'Xəta: Bu idarəetmə panelini dəyişdirmə icazəniz yoxdur!', + 'delete_last' => 'Xəta: Son idarəetmə panelini silə bilməzsiniz. Əvvəlcə yeni bir panel yaradın!', + 'disable_last' => 'Xəta: Son idarəetmə panelini deaktiv edə bilməzsiniz. Əvvəlcə yeni bir panel yaradın!', + ], + +]; diff --git a/resources/lang/az-AZ/demo.php b/resources/lang/az-AZ/demo.php new file mode 100644 index 000000000..d36324f7d --- /dev/null +++ b/resources/lang/az-AZ/demo.php @@ -0,0 +1,34 @@ + [ + 'cash' => 'Nəğd', + ], + + 'categories' => [ + 'deposit' => 'Depozit', + 'sales' => 'Satış', + ], + + 'currencies' => [ + 'usd' => 'Amerika Dolları', + 'eur' => 'Avro', + 'gbp' => 'İngilis Sterlinqi', + 'try' => 'Türk Lirəsı', + ], + + 'offline_payments' => [ + 'cash' => 'Nəğd', + 'bank' => 'Bank Köçürməsi', + ], + + 'reports' => [ + 'income' => 'Kateqoriya əsaslı aylıq gəlir xülasəsi.', + 'expense' => 'Kateqoriya əsaslı aylıq xərc xülasəsi.', + 'income_expense' => 'Kateqoriya əsaslı aylıq gəlir-xərc balansı.', + 'tax' => 'Rüblük vergi xülasəsi.', + 'profit_loss' => 'Rüblük mənfəət və zərər hesabatı.', + ], + +]; diff --git a/resources/lang/az-AZ/documents.php b/resources/lang/az-AZ/documents.php new file mode 100644 index 000000000..f7fb358de --- /dev/null +++ b/resources/lang/az-AZ/documents.php @@ -0,0 +1,54 @@ + 'Sütünları Düzəlt', + 'empty_items' =>'Hər hansı bir məhsul/xidmət əlavə etmədiniz.', + + 'statuses' => [ + 'draft' => 'Qaralama', + 'sent' => 'Göndərildi', + 'expired' => 'Vaxtı Bitdi', + 'viewed' => 'Baxıldı', + 'approved' => 'Təsdiqləndi', + 'received' => 'Qəbul Edildi', + 'refused' => 'Rədd Edildi', + 'restored' => 'Bərpa edildi', + 'reversed' => 'Geri Qaytarıldı', + 'partial' => 'Qismən Ödəmə', + 'paid' => 'Ödənildi', + 'pending' => 'Gözləyən', + 'invoiced' => 'Faturalandırıldı', + 'overdue' => 'Gecikmiş', + 'unpaid' => 'Ödənilməmiş', + 'cancelled' => 'Ləğv Edildi', + 'voided' => 'Ləğv Edildi', + 'completed' => 'Tamamlandı', + 'shipped' => 'Göndərildi', + 'refunded' => 'Geri Qaytarıldı', + 'failed' => 'Uğursuz Oldu', + 'denied' => 'Rəddedildi', + 'processed' => 'İşləndi', + 'open' => 'Açıq', + 'closed' => 'Bağlı', + 'billed' => 'Fakturalandı', + 'delivered' => 'Çatdırıldı', + 'returned' => 'Qaytarıldı', + 'drawn' => 'Geri Çəkildi', + 'not_billed' => 'Fakturalanmadı', + 'issued' => 'Yaradıldı', + 'not_invoiced' => 'Fakturalanmadı', + 'confirmed' => 'Təsdiqləndi', + 'not_confirmed' => 'Təsdiqlənmədi', + ], + + 'messages' => [ + 'email_sent' => ':type e-poçtu göndərildi!', + 'marked_as' => ':type :status olaraq işarələndi!', + 'marked_sent' => ':type göndərildi olaraq işarələndi!', + 'marked_paid' => ':type ödənildi olaraq işarələndi!', + 'marked_viewed' => ':type baxıldı olaraq işarələndi!', + 'marked_cancelled' => ':type ləğv edildi olaraq işarələndi!', + 'marked_received' => ':type qəbul edildi olaraq işarələndi!', + ], +]; diff --git a/resources/lang/az-AZ/email_templates.php b/resources/lang/az-AZ/email_templates.php new file mode 100644 index 000000000..c0a189a33 --- /dev/null +++ b/resources/lang/az-AZ/email_templates.php @@ -0,0 +1,50 @@ + [ + 'subject' => '{invoice_number} faktura yaradıldı', + 'body' => 'Hörmətli {customer_name},

{invoice_number} nömrəli fakturanız hazırlandı.

Aşağıdakı linkə daxil olaraq faktura haqqında ətraflı məlumat əldə edə və online ödəniş edə bilərsiniz: {invoice_number}.

Hər hansı bir problemlə üzləşdikdə zəhmət olmazsa bizə yazın.

İşlərinizdə uğurlar,
{company_name}', + ], + + 'invoice_remind_customer' => [ + 'subject' => '{invoice_number} fakturası üçün gecikən ödəmə xatırlatması', + 'body' => 'Hörmətli {customer_name},

{invoice_number} nömrəli fkatura üçün ödənişiniz gecikdi.

Qeyd edilən faktura üçün {invoice_total} məbləğində vəsait ən son {invoice_due_date} tarixində ödənilməlidir.

Aşağıdakı linkə daxil olaraq faktura haqqında ətraflı məlumat əldə edə və online ödəniş edə bilərsiniz: {invoice_number}.

İşlərinizdə uğurlar,
{company_name}', + ], + + 'invoice_remind_admin' => [ + 'subject' => '{invoice_number} fakturanın ödənişi gecikib', + 'body' => 'Salam,

{customer_name} müştərinizə {invoice_number} fakturası üçün gecikmiş ödəniş xəbərdarlığı göndərildi.

Faktura məbləği {invoice_total} və son ödənişi {invoice_due_date} tarixində həyata keçirməli idi.

Aşağıdakı linkdən faktura haqqında ətraflı məlumat əldə edə bilərsiniz: {invoice_number}.

İşlərinizdə uğurlar,
{company_name}', + ], + + 'invoice_recur_customer' => [ + 'subject' => '{invoice_number} təkrarlanan faktura yaradıldı', + 'body' => 'Hörmətli {customer_name},

Ödəniş dövrünə uyğun olaraq {invoice_number} nömrəli fakturanız hazırlandı.

Aşağıdakı linkə daxil olaraq faktura haqqında ətraflı məlumat əldə edə və online ödəniş edə bilərsiniz: {invoice_number}.

Hər hansı bir problemlə üzləşdikdə zəhmət olmazsa bizə yazın.

İşlərinizdə uğurlar,
{company_name}', + ], + + 'invoice_recur_admin' => [ + 'subject' => '{invoice_number} təkrarlanan faktura yaradıldı', + 'body' => 'Salam,

{customer_name} müştərinizə ödəmə dövrünə uyğun olaraq {invoice_number} nömrəli faktura avtomatik olaraq yaradıldı.

Aşağıdakı linkdən faktura haqqında ətraflı məlumat əldə edə bilərsiniz: {invoice_number}.

İşlərinizdə uğurlar,
{company_name}', + ], + + 'invoice_payment_customer' => [ + 'subject' => '{invoice_number} faturasının ödemesi alındı', + 'body' => 'Hörmətli {customer_name},

Ödənişiniz üçün təşəkkür edirik. Ödənişiniz haqqında ətraflı məlumat:

-------------------------------------------------

Məbləğ: {transaction_total}
Tarix: {transaction_paid_date}
Faktura nömrəsi: {invoice_number}

-------------------------------------------------

Aşağıdakı linkdən faktura haqqında ətraflı məlumat əldə edə bilərsiniz: {invoice_number}.

Hər hansı bir problemlə üzləşdikdə zəhmət olmazsa bizə yazın.

İşlərinizdə uğurlar,
{company_name}', + ], + + 'invoice_payment_admin' => [ + 'subject' => '{invoice_number} faktura üçün ödəniş edildi', + 'body' => 'Salam,

{customer_name} mütəriniz {invoice_number} nömrəli faktura üçün ödəniş etdi.

Aşağıdakı linkdən faktura haqqında ətraflı məlumat əldə edə bilərsiniz: {invoice_number}.

İşlərinizdə uğurlar,
{company_name}', + ], + + 'bill_remind_admin' => [ + 'subject' => '{bill_number} xərc fakturası üçün ödəniş satırlatması', + 'body' => 'Salam,

{vendor_name} tədarükçünüzdən {bill_number} nömrəli xərc fakturası üçün ödəniş xatırlatmasıdır.

Fakturanın məbləği {bill_total} və son ödəniş {bill_due_date} tarixində edilməlidir.

Aşağıdakı linkdən faktura haqqında ətraflı məlumat əldə edə bilərsiniz: {bill_number}.

İşlərinizdə uğurlar,
{company_name}', + ], + + 'bill_recur_admin' => [ + 'subject' => '{bill_number} təkrarlanan xərc fakturası yaradıldı', + 'body' => 'Salam,

{vendor_name} tədarükçünüzün ödəniş dövrünə uyğun olaraq {bill_number} nömrəli xərc fakturası avtomatik olaraq yaradıldı.

Aşağıdakı linkdən faktura haqqında ətraflı məlumat əldə edə bilərsiniz: {bill_number}.

İşlərinizdə uğurlar,
{company_name}', + ], + +]; diff --git a/resources/lang/az-AZ/errors.php b/resources/lang/az-AZ/errors.php new file mode 100644 index 000000000..052d877bf --- /dev/null +++ b/resources/lang/az-AZ/errors.php @@ -0,0 +1,23 @@ + [ + '403' => 'Təəsüf ki, giriş qadağandır', + '404' => 'Təəsüf ki, səhifə tapılmadı', + '500' => 'Təəsüf ki, bir xəta baş verdi', + ], + + 'header' => [ + '403' => '403 Qadağandır', + '404' => '404 Tapılmadı', + '500' => '500 Server xətası', + ], + + 'message' => [ + '403' => 'Bu səhifəyə giriş qadağandır.', + '404' => 'Girməyə çalışdığınız səhifəni tapa bilmədik.', + '500' => 'Bu nasazlığı aradan qaldırmaq üçün dərhal işə başlayırıq.', + ], + +]; diff --git a/resources/lang/az-AZ/footer.php b/resources/lang/az-AZ/footer.php new file mode 100644 index 000000000..f7624f905 --- /dev/null +++ b/resources/lang/az-AZ/footer.php @@ -0,0 +1,10 @@ + 'Versiya', + 'powered' => 'Akaunting tərəfindən', + 'link' => 'https://akaunting.com/tr', + 'software' => 'Pulsuz Ön Muhasibat Proqramı', + +]; diff --git a/resources/lang/az-AZ/general.php b/resources/lang/az-AZ/general.php new file mode 100644 index 000000000..41e08380a --- /dev/null +++ b/resources/lang/az-AZ/general.php @@ -0,0 +1,231 @@ + 'İdarəetmə Paneli|İdarəetmə Panelləri', + 'items' => 'Məhsul / Xidmət|Məhsullar / Xidmətlər', + 'incomes' => 'Gəlir|Gəlirlər', + 'invoices' => 'Faktura|Fakturalar', + 'revenues' => 'Gəlir|Gəlirlər', + 'customers' => 'Müştəri|Müştərilər', + 'expenses' => 'Xərc|Xərclər', + 'bills' => 'Faktura|Fakturalar', + 'payments' => 'Ödəniş|Ödənişlər', + 'vendors' => 'Tədarükçü|Tədarükçülər', + 'accounts' => 'Hesab|Hesablar', + 'transfers' => 'Köçürmə|Köçürmələr', + 'transactions' => 'Əməliyyat|Əməliyyatlar', + 'reports' => 'Hesabat|Hesabatlar', + 'settings' => 'Tənzimləmə|Tənzimləmələr', + 'categories' => 'Kateqoriya|Kateqoriyalar', + 'currencies' => 'Valyuta|Valyutalar', + 'tax_rates' => 'Vergi Dərəcəsi|Vergi Dərəcələri', + 'users' => 'İstifadəçi|İstifadəçilər', + 'roles' => 'Tapşırıq|Tapşırıqlar', + 'permissions' => 'İcazə|İcazələr', + 'modules' => 'Tətbiq|Tətbiqlər', + 'companies' => 'Şirkət|Şirkətlər', + 'profits' => 'Qazanc|Qazanc', + 'taxes' => 'Vergi Dərəcəsi|Vergi Dərəcələri', + 'logos' => 'Logo|Logolar', + 'pictures' => 'Şəkil|Şəkillər', + 'types' => 'Növ|Növlər', + 'payment_methods' => 'Ödəniş Metodu|Ödəniş Metodları', + 'compares' => 'Gəlir və Xərc | Gəlirlər və Xərclər', + 'notes' => 'Açıqlama|Açıqlamalar', + 'totals' => 'Ümumi|Ümumilər', + 'languages' => 'Dil|Dillər', + 'updates' => 'Yeniləmə|Yeniləmələr', + 'numbers' => 'Nömrə|Nömrələr', + 'statuses' => 'Status|Status', + 'others' => 'Digər|Digərləri', + 'contacts' => 'Şəxs|Şəxslər', + 'reconciliations' => 'Razılaşma|Razılaşmalar', + 'developers' => 'Geliştirici|Geliştiriciler', + 'schedules' => 'Planlama|Planlamalar', + 'groups' => 'Grup|Gruplar', + 'charts' => 'Grafik|Grafikler', + 'localisations' => 'Lokallaşdırma|Lokallaşdırmalar', + 'defaults' => 'Varsayılan|Varsayılanlar', + 'widgets' => 'Komponent|Komponentlər', + 'templates' => 'Şablon|Şablonlar', + 'sales' => 'Satış|Satışlar', + 'purchases' => 'Alış|Alışlar', + + 'welcome' => 'Xoş Gəldiniz', + 'banking' => 'Bank', + 'general' => 'Ümumi', + 'no_records' => 'Qeyd yoxdur.', + 'date' => 'Tarix', + 'amount' => 'Məbləğ', + 'enabled' => 'Aktiv', + 'disabled' => 'Deaktiv', + 'yes' => 'Bəli', + 'no' => 'Xeyir', + 'na' => '- Yox -', + 'daily' => 'Gündəlik', + 'weekly' => 'Həftəlik', + 'monthly' => 'Aylıq', + 'quarterly' => 'Rüblük', + 'yearly' => 'İllik', + 'add' => 'Əlavə et', + 'add_new' => 'Yeni Əlavə et', + 'add_income' => 'Gəlir Əlavə et', + 'add_expense' => 'Xərc Əlavə et', + 'show' => 'Göstər', + 'edit' => 'Düəliş et', + 'delete' => 'Sil', + 'send' => 'Göndər', + 'share' => 'Paylaş', + 'download' => 'Yüklə', + 'delete_confirm' => ':name :type silmək istədiyinizdən əminsiniz?', + 'name' => 'Ad', + 'email' => 'E-poçt', + 'tax_number' => 'Vergi Nömrəsi', + 'phone' => 'Telefon', + 'address' => 'Ünvan', + 'website' => 'Veb Səhifə', + 'actions' => 'Əməliyyat', + 'description' => 'Açıqlama', + 'manage' => 'İdarəEt', + 'code' => 'Kod', + 'alias' => 'Ləqəb', + 'balance' => 'Balans', + 'reference' => 'İstinad', + 'attachment' => 'Fayl', + 'change' => 'Dəyişdir', + 'change_type' => ':type Dəyişdir', + 'switch' => 'Dəyişdir', + 'color' => 'Rəng', + 'save' => 'Yadda Saxla', + 'confirm' => 'Təsdiq', + 'cancel' => 'Ləğv', + 'loading' => 'Yüklənir...', + 'from' => 'Tərəfindən', + 'to' => 'Tərəfinə', + 'print' => 'Çap et', + 'download_pdf' => 'PDF Yükə', + 'customize' => 'Özəlləşdir', + 'search' => 'Axtar', + 'search_text' => 'Bu mətni axtar', + 'search_placeholder' => 'Axtarılacaq söz..', + 'filter' => 'Filtrlə', + 'help' => 'Kömək', + 'all' => 'Hamısı', + 'all_type' => 'Bütün :type', + 'upcoming' => 'Gələcək', + 'created' => 'Yaradıldı', + 'id' => 'ID', + 'more_actions' => 'Başqa Əməliyyat', + 'duplicate' => 'Dublikat', + 'unpaid' => 'Ödənməmiş', + 'paid' => 'Ödənmiş', + 'overdue' => 'Gecikmiş', + 'partially' => 'Qismən', + 'partially_paid' => 'Qismən Ödenmiş', + 'export' => 'İxrac et', + 'finish' => 'Bitdi', + 'wizard' => 'Sehirbaz', + 'skip' => 'Keç', + 'enable' => 'Aktiv et', + 'disable' => 'Deaktiv et', + 'select_all' => 'Hamısını seç', + 'unselect_all' => 'Seçilmişləri təmizlə', + 'created_date' => 'Yaranma Tarixi', + 'period' => 'Dövr', + 'frequency' => 'Tezlik', + 'start' => 'Başlat', + 'end' => 'Bitir', + 'clear' => 'Təmizlə', + 'difference' => 'Fərq', + 'footer' => 'Alt məlumat', + 'start_date' => 'Başlanğıc Tarixi', + 'end_date' => 'Bitiş Tarixi', + 'basis' => 'Əsas', + 'accrual' => 'Hesablama', + 'cash' => 'Nəğd', + 'group_by' => 'Qruplandır', + 'accounting' => 'Mühasibat', + 'sort' => 'Sıralama', + 'width' => 'Eni', + 'month' => 'Ay', + 'year' => 'İl', + 'type_item_name' => 'Məhsul/Xidmət adını yazın', + 'no_data' => 'Məlumat yoxdur', + 'no_matching_data' => 'Uyğun gələn məlumat yoxdur', + 'clear_cache' => 'Keşi təmizləmək', + 'go_to_dashboard' => 'İdarəetmə Panelinə Get', + 'is' => 'bərabər', + 'isnot' => 'deyil', + 'recurring_and_more' => 'Təkrarlanan və daha çox...', + 'due_on' => 'Son Tarix', + 'amount_due' => 'Qalıq Məbləğ', + + 'card' => [ + 'cards' => 'Kart|Kartlar', + 'name' => 'Kart Sahibi', + 'number' => 'Kart Nömrəsi', + 'expiration_date' => 'Qüvvədə olma tarixi', + 'cvv' => 'CVV Nömrəsi', + 'save' => 'Kartı Yadda Saxla', + ], + + 'title' => [ + 'new' => 'Yeni :type', + 'edit' => ':type Düzəliş et', + 'delete' => ':type Sil', + 'create' => ':type Yarat', + 'send' => ':type Göndər', + 'get' => ':type Gətir', + 'add' => ':type Əlavə et', + 'manage' => ':type İdarə et', + ], + + 'form' => [ + 'enter' => ':field Daxil edin', + 'select' => [ + 'field' => '- :field Seçin -', + 'file' => 'Fayl Seçin', + ], + 'add' => ':field Əlavə et', + 'add_an' => ':field Əlavə et', + 'add_new' => ':field Yenisini əlavə et', + 'edit' => ':field Düzəliş et', + 'contact_edit' => ':contact_name :field əlavə et', + 'drop_file' => 'Yükləmək üçün faylları buraya sürükləyin', + 'choose' => ':field Seç', + 'choose_different' => 'Başqa bir :field seç', + 'choose_file' => 'Fayl Seçin', + 'no_file_selected' => 'Fayl seçilməyib...', + ], + + 'placeholder' => [ + 'search' => 'Axtarılacaq söz...', + 'search_and_filter' => 'Qeydləri axtar və ya filtrlə', + 'contact_search' => ':type adı yazın', + 'item_search' => 'Məhsul/Xidmət adı yazın', + ], + + 'date_range' => [ + 'today' => 'Bugün', + 'yesterday' => 'Dünən', + 'last_days' => 'Son :day Gün', + 'this_month' => 'Bu Ay', + 'last_month' => 'Son Ay', + ], + + 'empty' => [ + 'documentation' => 'Daha çox məlumat üçün səndləşmə səhifəsini yoxlaya bilərsiniz.', + 'items' => 'Maddələr məhsullar və ya xidmətlər ola bilər. Gəlir/xərc fakturası yaradarkən qiymət, vergi kimi sahələri avtomatik doldurmaq üçün maddələrdən istifadə edə bilərsiniz..', + 'invoices' => 'Faturalar birdəfəlik və ya təkrar ola bilər. Müştərilərinizə faktura göndərərək, onlayn ödəniş etmələrini təmin edə bilərsiniz.', + 'revenues' => 'Gəlir reallaşdırılan qazanc əməliyyatıdır. Tamamilə müstəqil (depozit kimi) ola bilər və ya gəlir fakturasına bağlana bilər.', + 'customers' => 'Gəlir fakturası yaratmaq üşün müştəri olması məcburidir. Giriş icazəsi verdiyiniz müştərilər panelə girib balanslarına baxa bilərlər.', + 'bills' => 'Faturalar birdəfəlik və ya təkrar ola bilər. Tədarükçülərdən aldığınız məhsul və xidmətləri asanlıqla izləyə bilərsiniz.', + 'payments' => 'Ödəniş, həyata keçirilmiş bir xərc əməliyyatıdır. Tamamilə müstəqil (yemək bileti) ola bilər və ya xərc fakturasına bağlana bilər.', + 'vendors' => 'Xərc fakturası yaratmaq üşün tədarükçü olması məcburidir. Onalra olan borc balansınıza baxa vəya filtirləyə bilərsiniz.', + 'transfers' => 'Köçürmələr, hesablar arası pul köçürməsi üçün istifadə olunur. Hesabların valyutaları eyni vəya fərqli ola bilər.', + 'taxes' => 'Vergilər, gəlir və ya xərc fakturalarına əlavə xərclər əlavə etmək üçün istifadə olunur. Maliyyə hesabatlarınız da müvafiq olaraq təsir göstərir.', + 'reconciliations' => 'Bank hesabları və mühasibat qeydlərinin düzgün olub olmadığını yoxlamaq üçün bank uzlaşması aparılır.', + ], + +]; diff --git a/resources/lang/az-AZ/header.php b/resources/lang/az-AZ/header.php new file mode 100644 index 000000000..c48791092 --- /dev/null +++ b/resources/lang/az-AZ/header.php @@ -0,0 +1,16 @@ + 'Dil Dəyişdir', + 'last_login' => 'Son giriş :time', + 'notifications' => [ + 'counter' => '{0} Bildiriş yox|{1} :count bildirişiniz var|[2,*] :count bildirişiniz var', + 'overdue_invoices' => '{1} :count Gecikmiş Faktura Mövcuddur |[2,*] :count Gecikmiş Faktura Mövcuddur', + 'upcoming_bills' => '{1} :count Yaxınlaşan Faktura Mövcuddur|[2,*] :count Yaxınlaşan Faktura Mövcuddur', + 'view_all' => 'Hamısını göstər' + ], + 'docs_link' => 'https://akaunting.com/docs', + 'support_link' => 'https://akaunting.com/support', + +]; diff --git a/resources/lang/az-AZ/import.php b/resources/lang/az-AZ/import.php new file mode 100644 index 000000000..4455e4fb1 --- /dev/null +++ b/resources/lang/az-AZ/import.php @@ -0,0 +1,9 @@ + 'İdxal et', + 'title' => ':type İdxal et', + 'message' => 'İcazə veriəln fayl tipləri: XLS, XLSX. Lütfen, örnek dosyayı indirin.', + +]; diff --git a/resources/lang/az-AZ/install.php b/resources/lang/az-AZ/install.php new file mode 100644 index 000000000..4e8819c52 --- /dev/null +++ b/resources/lang/az-AZ/install.php @@ -0,0 +1,46 @@ + 'İləri', + 'refresh' => 'Yenilə', + + 'steps' => [ + 'requirements' => 'Problemləri aradan qaldırmaq üçün hosting firması ilə əlaqə saxlayın!', + 'language' => 'Adım 1/3 : Dil Seçimi', + 'database' => 'Adım 2/3 : Verilənlər bazası parametrləri', + 'settings' => 'Adım 3/3 : Şirkət və Menecer məlumatları', + ], + + 'language' => [ + 'select' => 'Dil Seçin', + ], + + 'requirements' => [ + 'enabled' => ':feature aktiv olmalıdır!', + 'disabled' => ':feature deaktiv edilməlidir!', + 'extension' => ':extension əlavəsi quraşdırılmaslıdır!', + 'directory' => ':directory qovluq yazılabilir olmalıdır!', + 'executable' => 'PHP CLI çalıştırıcısı tapılması vəya işlək deyil vəya versiyası :php_version və üstü deyil. Zəhmət olmazsa, hosting firmanızdan PHP_BINARY vəya PHP_PATH mühit dəyərlərinin düzgün tənzimləməsini istəyin.', + ], + + 'database' => [ + 'hostname' => 'Server', + 'username' => 'İstifadçi adı', + 'password' => 'Şifrə', + 'name' => 'Verilənlər bazası', + ], + + 'settings' => [ + 'company_name' => 'Şirkət Adı', + 'company_email' => 'Şirkət e-Poçtu', + 'admin_email' => 'İnzibatçı e-Poçtu', + 'admin_password' => 'İnzibatçı Şifresi', + ], + + 'error' => [ + 'php_version' => 'Xəta: HTTP ve CLI üçün PHP versiyası :php_version və üstü olmalı olduğunu hosting firmanıza bildirin.', + 'connection' => 'Xəta: Verilənlər bazasına bağlana bilmədik! Zəhmət olmazsa verilənlər bazası məlumatlarını yoxlayın.', + ], + +]; diff --git a/resources/lang/az-AZ/invoices.php b/resources/lang/az-AZ/invoices.php new file mode 100644 index 000000000..19302b002 --- /dev/null +++ b/resources/lang/az-AZ/invoices.php @@ -0,0 +1,60 @@ + 'Faktura Nömrəsi', + 'invoice_date' => 'Faktura Tarixi', + 'total_price' => 'Cəmi Məbləğ', + 'due_date' => 'Son Tarixi', + 'order_number' => 'Sifariş Nömrəsi', + 'bill_to' => 'Fakturalanacak Şəxs/Qurum', + + 'quantity' => 'Ədəd', + 'price' => 'Qiymət', + 'sub_total' => 'Ara Cəmi', + 'discount' => 'Endirim', + 'item_discount' => 'Məhsul Endirimi', + 'tax_total' => 'Vergi Cəmi', + 'total' => 'Cəmi', + + 'item_name' => 'Məhsul Adı | Məhsul Adları', + + 'show_discount' => '%:discount Endirim', + 'add_discount' => 'Endirim əlavə et', + 'discount_desc' => 'ara cəm üzərindən', + + 'payment_due' => 'Son Ödəniş Tarixi', + 'paid' => 'Ödənmiş', + 'histories' => 'Keçmiş', + 'payments' => 'Ödənişlər', + 'add_payment' => 'Ödəniş Əlavə et', + 'mark_paid' => 'Ödəndi İşarələ', + 'mark_sent' => 'Göndərildi İşarələ', + 'mark_viewed' => 'Baxıldı İşarələ', + 'mark_cancelled' => 'Ləğv edildi işarələ', + 'download_pdf' => 'PDF Yüklə', + 'send_mail' => 'Email Göndər', + 'all_invoices' => ' Bütün Fakturalara baxmaq üçün giriş edin', + 'create_invoice' => 'Faktura Yarat', + 'send_invoice' => 'Fakturanı Göndər', + 'get_paid' => 'Ödəniş qəbul et', + 'accept_payments' => 'Online Ödəniş qəbul et', + + 'messages' => [ + 'email_required' => 'Bu müştəri üçün e-poçt ünvanı yoxdur!', + 'draft' => 'Bu bir QARALAMA Fakturadır və göndərildikdən sonra grafiklərdə əks olunacaq.', + + 'status' => [ + 'created' => ':date tarixində yaradıldı', + 'viewed' => 'Baxıldı', + 'send' => [ + 'draft' => 'Göndərilmədi', + 'sent' => ':date Tarixində Göndərildi', + ], + 'paid' => [ + 'await' => 'Ödəniş Gözlənilir', + ], + ], + ], + +]; diff --git a/resources/lang/az-AZ/items.php b/resources/lang/az-AZ/items.php new file mode 100644 index 000000000..6aeee561b --- /dev/null +++ b/resources/lang/az-AZ/items.php @@ -0,0 +1,8 @@ + 'Satış Qiyməti', + 'purchase_price' => 'Alış Qiyməti', + +]; diff --git a/resources/lang/az-AZ/maintenance.php b/resources/lang/az-AZ/maintenance.php new file mode 100644 index 000000000..05123e714 --- /dev/null +++ b/resources/lang/az-AZ/maintenance.php @@ -0,0 +1,9 @@ + 'Texniki işlər gedir', + + 'message' => 'Üzr istəyirik, texniki işlərlə əlaqədar bağlanmışıq. Zəhmət olmasa daha sonra yenə cəhd edin!', + +]; diff --git a/resources/lang/az-AZ/messages.php b/resources/lang/az-AZ/messages.php new file mode 100644 index 000000000..1dcca8cd6 --- /dev/null +++ b/resources/lang/az-AZ/messages.php @@ -0,0 +1,37 @@ + [ + 'added' => ':type əlavə edildi!', + 'updated' => ':type yeniləndi!', + 'deleted' => ':type silindi!', + 'duplicated' => ':type dublikat edildi!', + 'imported' => ':type idxal edildi!', + 'exported' => ':type ixrac edildi!', + 'enabled' => ':type aktiv edildi!', + 'disabled' => ':type deaktiv edildi!', + ], + + 'error' => [ + 'over_payment' => 'Xəta: Ödəniş əlavə edilmədi! Daxil etdiyiniz :amount cəmi keçir.', + 'not_user_company' => 'Xəta: Bu şirkəti idarə etmə icazəniz yoxdur!', + 'customer' => 'Xəta: İstifadəçi yaradılmadı. :name bu e-poçt ünvanı istifadə edilir.', + 'no_file' => 'Xəta: Fayl seçilmədi!', + 'last_category' => 'Xəta: Son :type kateqoriyasını silə bilməzsiniz!', + 'change_type' => 'Xəta: Növ dəyişdirilə bilməz çünki :text əlaqə mövcuddur!', + 'invalid_apikey' => 'Xəta: Daxil etdiyiniz API açar qüvvədə deyil!', + 'import_column' => 'Xəta: :message Səhifə adı: :sheet. Sətir nömrəsi: :line.', + 'import_sheet' => 'Xəta: Səyfə adı qüvvədə deyil. Zəhmət olmazsa, nümunə sənədinə baxın.', + ], + + 'warning' => [ + 'deleted' => 'Xəbərdarlıq: :name silinə bilməz çünki :text ile əlaqəlidir.', + 'disabled' => 'Xəbərdarlıq: :name deaktiv edilə bilməz çünki :text ilə əlaqəlidir.', + 'reconciled_tran' => 'Xəbərdarlıq: Əməliyyat razılaşdırılmış olunduğu üçün dəyişdirilə / silinə bilməz.', + 'reconciled_doc' => 'Xəbərdarlıq: :type razılaşdırılmış əməliyyatlar apardığı üçün dəyişdirilə / silinə bilməz.', + 'disable_code' => 'Xəbərdarlıq: :name deaktiv edilə vəya valyuta dəyişdirilə bilməz çünki :text ilə əlaqəlidir.', + 'payment_cancel' => 'Xəbərdarlıq: :method ödənişini ləğv etdiniz!', + ], + +]; diff --git a/resources/lang/az-AZ/modules.php b/resources/lang/az-AZ/modules.php new file mode 100644 index 000000000..0a440a9fe --- /dev/null +++ b/resources/lang/az-AZ/modules.php @@ -0,0 +1,83 @@ + 'API Açarı', + 'my_apps' => 'Tətbiqlərim', + 'pre_sale' => 'Ön-Satış', + 'top_paid' => 'Populyar pullu', + 'new' => 'Yeni', + 'top_free' => 'Populyar Pulsuz', + 'free' => 'Pulsuz', + 'install' => 'Yüklə', + 'buy_now' => 'İndi satın al', + 'get_api_key' => 'API Açar almaq üçün buraya vurun.', + 'no_apps' => 'Bu kateqoriyada hələ heç bir tətbiq yoxdur.', + 'become_developer' => 'Bir geliştiricisiniz? Buraya Akaunting üçün tətbiqetmələr inkişaf etdirməyi öyrənib və dərhal pul qazanmağa başlayacağınızı bilərsiniz!', + 'recommended_apps' => 'Məsləhət Görülən tətbiqlər', + + 'about' => 'Haqqında', + + 'added' => 'Əlavə Etmə Tarixi', + 'updated' => 'Yeniləmə Tarixi', + 'compatibility' => 'Uyğunluq', + 'documentation' => 'Sənədlər', + 'view' => 'Bax', + 'back' => 'Geri', + + 'installed' => ':module yükləndi', + 'uninstalled' => ':module silindi', + //'updated' => ':module updated', + 'enabled' => ':module aktiv et', + 'disabled' => ':module deaktiv edildi', + + 'tab' => [ + 'installation' => 'Yükləmə', + 'faq' => 'SSS', + 'changelog' => 'Dəyişikliklər', + 'reviews' => 'Rəylər', + ], + + 'installation' => [ + 'header' => 'Tətbiq Yükəmə', + 'download' => ':module yüklənir', + 'unzip' => ':module zipdən çıxardılır', + 'file_copy' => ':module fayllar kopyalanır', + 'finish' => ':module qurulma tamamlanır', + 'redirect' => ':module quruldu, yeniləmə səhifəsinə yönləndirilirsiniz', + 'install' => ':module qurulur', + ], + + 'errors' => [ + 'download' => ':module yüklənə bilmədi', + 'zip' => ':module üçün zip faylı yaradıldı', + 'unzip' => ':module zipdən çıxarılması', + 'file_copy' => ':module faylları kopyalana bilmədi', + 'finish' => ':module qurulum tamamlana bilmədi', + ], + + 'badge' => [ + 'installed' => 'Qurulmuş', + 'pre_sale' => 'Ön-Satış', + ], + + 'button' => [ + 'uninstall' => 'Sil', + 'disable' => 'Deaktiv et', + 'enable' => 'Aktiv', + ], + + 'my' => [ + 'purchased' => 'Satın Alınmış', + 'installed' => 'Qurulu', + ], + + 'reviews' => [ + 'button' => [ + 'add' => 'Rəy əlavə et' + ], + + 'na' => 'Hər hansı bir rəy yoxdur.' + ], + +]; diff --git a/resources/lang/az-AZ/notifications.php b/resources/lang/az-AZ/notifications.php new file mode 100644 index 000000000..0562cc3bc --- /dev/null +++ b/resources/lang/az-AZ/notifications.php @@ -0,0 +1,10 @@ + 'Ayyy səni!', + 'hello' => 'Salam!', + 'salutation' => 'Hörmətlə,
:company_name', + 'subcopy' => '":text" düyməyə vura bilmirsinizsə, aşaöıdakı linki kopyalayib browserə köçürün: [:url](:url)', + +]; diff --git a/resources/lang/az-AZ/pagination.php b/resources/lang/az-AZ/pagination.php new file mode 100644 index 000000000..321c86f37 --- /dev/null +++ b/resources/lang/az-AZ/pagination.php @@ -0,0 +1,10 @@ + 'Geri', + 'next' => 'İləri', + 'showing' => ':total qeyddən :first-:last arası.', + 'page' => 'səhifə başına.', + +]; diff --git a/resources/lang/az-AZ/passwords.php b/resources/lang/az-AZ/passwords.php new file mode 100644 index 000000000..884a9ebf6 --- /dev/null +++ b/resources/lang/az-AZ/passwords.php @@ -0,0 +1,23 @@ + 'Parollar ən azı altı simvoldan ibarət olmalı və təsdiqlə uyğun olmalıdır.', + 'reset' => 'Şifrəniz sıfırlandı!', + 'sent' => 'Şifrə sıfırlama linkinizi elektron poçtla göndərdik!', + 'token' => 'Şifrə sıfırlama ünvanı/kodu etibarsızdır.', + 'user' => "Bu e-poçt ünvanı ilə qeydiyyatdan keçmiş bir üzv yoxdur.", + 'throttle' => 'Zəhmət olmazsa, yenidən cəhd etmədən əvvəl gözləyin.', + +]; diff --git a/resources/lang/az-AZ/reconciliations.php b/resources/lang/az-AZ/reconciliations.php new file mode 100644 index 000000000..ef4fa97c5 --- /dev/null +++ b/resources/lang/az-AZ/reconciliations.php @@ -0,0 +1,18 @@ + 'Razılaşma', + 'unreconcile' => 'Razılaşmanı ləğv et', + 'reconciled' => 'Razılaşdırıldı', + 'opening_balance' => 'Açılış Balansı', + 'closing_balance' => 'Bağlanma Balansı', + 'unreconciled' => 'Razılaşma baş tutmadı', + 'transactions' => 'Əməliyyatlar', + 'start_date' => 'Başlanğıc Tarixi', + 'end_date' => 'Bitiş Tarixi', + 'cleared_amount' => 'Təmizlənmiş Məbləğ', + 'deposit' => 'Əmanət edildi', + 'withdrawal' => 'Çıxarılan', + +]; diff --git a/resources/lang/az-AZ/recurring.php b/resources/lang/az-AZ/recurring.php new file mode 100644 index 000000000..549ebae38 --- /dev/null +++ b/resources/lang/az-AZ/recurring.php @@ -0,0 +1,20 @@ + 'Təkrarlanan', + 'every' => 'Hər', + 'period' => 'Aralıq', + 'times' => 'Dəfə', + 'daily' => 'Günlük', + 'weekly' => 'Həftəlik', + 'monthly' => 'Aylı1', + 'yearly' => 'İllik', + 'custom' => 'Xüsusi', + 'days' => 'Gün', + 'weeks' => 'Həftə', + 'months' => 'Ay', + 'years' => 'İl', + 'message' => 'Bu təkrarlayan bir :type və bir sonrakı :type avtomatik olaraq :date tarixdə yaradılacaq.', + +]; diff --git a/resources/lang/az-AZ/reports.php b/resources/lang/az-AZ/reports.php new file mode 100644 index 000000000..463a992c7 --- /dev/null +++ b/resources/lang/az-AZ/reports.php @@ -0,0 +1,31 @@ + 'İl|İllər', + 'this_year' => 'Bu İl', + 'previous_year' => 'Öncəki İl', + 'this_quarter' => 'Bu Rüb', + 'previous_quarter' => 'Öncəki Rüb', + 'last_12_months' => 'Son 12 Ay', + 'profit_loss' => 'Gəlir və Zərər', + 'gross_profit' => 'Brüt Gəlir', + 'net_profit' => 'Net Gəlir', + 'total_expenses' => 'Cəmi Xərc', + 'net' => 'NET', + 'income_expense' => 'Gəlir - Xərc', + + 'summary' => [ + 'income' => 'Gəlir Xülasəsi', + 'expense' => 'Xərc Xülasəsi', + 'income_expense' => 'Gəlir və Xərc Balansı', + 'tax' => 'Vergi Xülasəsi', + ], + + 'charts' => [ + 'line' => 'Xətt', + 'bar' => 'Çubuq', + 'pie' => 'Tort', + ], + +]; diff --git a/resources/lang/az-AZ/search_string.php b/resources/lang/az-AZ/search_string.php new file mode 100644 index 000000000..4fd3834b1 --- /dev/null +++ b/resources/lang/az-AZ/search_string.php @@ -0,0 +1,18 @@ + [ + 'last_logged_in_at' => 'Son Giriş', + 'paid_at' => 'Ödəniş Tarixi', + 'started_at' => 'Başlanğıc Tarixi', + 'ended_at' => 'Bitiş Tarixi', + 'billed_at' => 'Faktura Tarixi', + 'due_at' => 'Son Tarix', + 'invoiced_at' => 'Faktura Tarixi', + 'issued_at' => 'Əməliyyat Tarixi', + 'symbol_first' => 'İşarə Yeri', + 'reconciled' => 'Razılaşdırıldı', + ], + +]; diff --git a/resources/lang/az-AZ/settings.php b/resources/lang/az-AZ/settings.php new file mode 100644 index 000000000..c52edaec2 --- /dev/null +++ b/resources/lang/az-AZ/settings.php @@ -0,0 +1,138 @@ + [ + 'description' => 'Şirkətin adını, adresini, vergi nömrəsini vs. dəyişdirin', + 'name' => 'Şirkət Adı', + 'email' => 'Şirkət E-poçtu', + 'phone' => 'Telefon', + 'address' => 'Şirkət Ünvanı', + 'logo' => 'Şirkət Logosu', + ], + + 'localisation' => [ + 'description' => 'Maliyyə ilinin başlanğıcını, saat qurşağını, tarix formatını və s. dəyişdirin.', + 'financial_start' => 'Maliyyə ilinin başlanğıcı', + 'timezone' => 'Saat Qurşağı', + 'date' => [ + 'format' => 'Tarix Formatı', + 'separator' => 'Tarix Ayracı', + 'dash' => 'Tire (-)', + 'dot' => 'Nöqtə (.)', + 'comma' => 'Vergül (,)', + 'slash' => 'Bölmə (/)', + 'space' => 'Boşluq ( )', + ], + 'percent' => [ + 'title' => 'Faiz (%) Yeri', + 'before' => 'Nömrədən əvvəl', + 'after' => 'Nömrədən Sonra', + ], + 'discount_location' => [ + 'name' => 'Endirim Yeri', + 'item' => 'Sətirdə', + 'total' => 'Cəmdə', + 'both' => 'Sətir və Cəmdə', + ], + ], + + 'invoice' => [ + 'description' => 'Faktura nömrəsi, prefiks, müddət və s. özəlləşdirmək', + 'prefix' => 'Nömrə prefiksi', + 'digit' => 'Nömrə Rəqəm Sayı', + 'next' => 'Sonraki Nömrə', + 'logo' => 'Logo', + 'custom' => 'Xüsusi', + 'item_name' => 'Məhsul/Xidmət adı', + 'item' => 'Məhsullar/Xidmətlər', + 'product' => 'Məhsullar', + 'service' => 'Xidmətlər', + 'price_name' => 'Qiymət Adı', + 'price' => 'Qiymət', + 'rate' => 'Dərəcə', + 'quantity_name' => 'Miqdar Adı', + 'quantity' => 'Miqdar', + 'payment_terms' => 'Ödəmə şərtləri', + 'title' => 'Başlıq', + 'subheading' => 'Altbaşlıq', + 'due_receipt' => 'Qəbul edildikdən sonra', + 'due_days' => ':days müddət', + 'choose_template' => 'Faktura Şablonu seçin', + 'default' => 'Varsayılan', + 'classic' => 'Klasik', + 'modern' => 'Modern', + 'hide' => [ + 'item_name' => 'Məhsul/Xidmət Adını Gizlə', + 'item_description' => 'Məhsul/Xidmət Açıqlamasını gizlə', + 'quantity' => 'Miqdarı Gizlə', + 'price' => 'Qiyməti Gizlə', + 'amount' => 'Məbləği Gizlə', + ], + ], + + 'default' => [ + 'description' => 'Şirkətinizin varsayılan hesabı, valyutası, dili və s.', + 'list_limit' => 'Səhifə başına qeydlərin sayı', + 'use_gravatar' => 'Gravatar istifadə edin', + 'income_category' => 'Gəlir Kateqoriyası', + 'expense_category' => 'Xərc Kateqoriyası', + ], + + 'email' => [ + 'description' => 'E-poçt şablonlarını və göndərmə protokolunu dəyişdirin', + 'protocol' => 'Protokol', + 'php' => 'PHP Mail', + 'smtp' => [ + 'name' => 'SMTP', + 'host' => 'SMTP Host', + 'port' => 'SMTP Port', + 'username' => 'SMTP İstifadəçi adı', + 'password' => 'SMTP Şifrəsi', + 'encryption' => 'SMTP Təhlükəsizlik', + 'none' => 'Heçbiri', + ], + 'sendmail' => 'Sendmail', + 'sendmail_path' => 'Sendmail Yolu', + 'log' => 'E-mailleri logla', + + 'templates' => [ + 'subject' => 'Başlıq', + 'body' => 'Mətn', + 'tags' => 'Mövcud Teqlər: :tag_list', + 'invoice_new_customer' => 'Yeni Faktura Şablonu (müştəriyə göndərilir)', + 'invoice_remind_customer' => 'Faktura Xatırlatma Şablonu (müştəriyə göndərilir)', + 'invoice_remind_admin' => 'Faktura Xatırlatma Şablonu (inzibatçıya göndərilir)', + 'invoice_recur_customer' => 'Təkrarlanan Faktura Şablonu (müştəriyə göndərilir)', + 'invoice_recur_admin' => 'Təkrarlanan Faktura Şablonu (inzibatçıya göndərilir)', + 'invoice_payment_customer' => 'Ödəniş qəbzi şablonu (müştəriyə göndərilir)', + 'invoice_payment_admin' => 'Ödəniş qəbzi şablonu (inzibatçıya göndərilir)', + 'bill_remind_admin' => 'Xərclər Xatırlatma Şablonu (inzibatçıya göndərilir)', + 'bill_recur_admin' => 'Təkrarlanan Xərc Fakturası Şablonu (inzibatçıya göndərilir)', + ], + ], + + 'scheduling' => [ + 'name' => 'Vaxt', + 'description' => 'Avtomatik xatırlatmalar və təkrarlanan hərəkətlər üçün komanda xətti', + 'send_invoice' => 'Gəlir Fakturası Xatırlat', + 'invoice_days' => 'Ödəniş gündən sonra göndər', + 'send_bill' => 'Xərc Fakturası Xatırlat', + 'bill_days' => 'Ödniş Günündən əvvəl göndər', + 'cron_command' => 'Cron komandası', + 'schedule_time' => 'Çalışma Saatı', + ], + + 'categories' => [ + 'description' => 'Limitsiz gəlir, xərc və Məhsul kateqoriyalarını yaradın', + ], + + 'currencies' => [ + 'description' => 'Valyuta yaradın və onların məzənnələrini tənzimləyin', + ], + + 'taxes' => [ + 'description' => 'Sabit, müntəzəm, əhatəli və qarışıq vergi sinifləri yaradın', + ], + +]; diff --git a/resources/lang/az-AZ/taxes.php b/resources/lang/az-AZ/taxes.php new file mode 100644 index 000000000..9f46b045b --- /dev/null +++ b/resources/lang/az-AZ/taxes.php @@ -0,0 +1,12 @@ + 'Dərəcə', + 'rate_percent' => 'Dərəcə (%)', + 'normal' => 'Normal', + 'inclusive' => 'Daxil', + 'compound' => 'Qarışıq', + 'fixed' => 'Sabit', + 'withholding' => 'Tutulma', +]; diff --git a/resources/lang/az-AZ/transfers.php b/resources/lang/az-AZ/transfers.php new file mode 100644 index 000000000..016f635b5 --- /dev/null +++ b/resources/lang/az-AZ/transfers.php @@ -0,0 +1,12 @@ + 'Göndərən Hesab', + 'to_account' => 'Alan Hesab', + + 'messages' => [ + 'delete' => ':from hesabından :to hesabına (:amount)', + ], + +]; diff --git a/resources/lang/az-AZ/updates.php b/resources/lang/az-AZ/updates.php new file mode 100644 index 000000000..ab211e006 --- /dev/null +++ b/resources/lang/az-AZ/updates.php @@ -0,0 +1,15 @@ + 'Yüklü Versiya', + 'latest_version' => 'Ən Son Versiya', + 'update' => ':version versiyasına yenilə', + 'changelog' => 'Dəyişiklik Qeydi', + 'check' => 'Yenilə', + 'new_core' => 'Akaunting\'in yeni bir versiyası mövcuddur.', + 'latest_core' => 'Təbriklər! Akaunting\'in ən son versiyasına sahib oldunuz. Təhlükəsizlik yeniləmələri avtomatik olaraq yenilənəcəkdir.', + 'success' => 'Yeniləmə əməliyyatı müvəffəqiyyətlə tamamlandı.', + 'error' => 'Yeniləmə əməliyyatı uğursuz oldu, zəhmət olmazsa yenidən cəhd edin.', + +]; diff --git a/resources/lang/az-AZ/validation.php b/resources/lang/az-AZ/validation.php new file mode 100644 index 000000000..02bb069ae --- /dev/null +++ b/resources/lang/az-AZ/validation.php @@ -0,0 +1,123 @@ + ':attribute qəbul edilməlidir', + 'active_url' => ':attribute etibarlı bir URL olmalıdır.', + 'after' => ':attribute :date tarixindən sonra olmalıdır', + 'after_or_equal' => ':attribute :date tarixi ilə eyni və ya sonra olmalıdır', + 'alpha' => ':attribute yalnız hərflərdən ibarət ola bilər', + 'alpha_dash' => ':attribute yalnız hərf, rəqəm və tire simvolundan ibarət ola bilər', + 'alpha_num' => ':attribute yalnız hərf və rəqəmlərdən ibarət ola bilər', + 'array' => ':attribute massiv formatında olmalıdır', + 'before' => ':attribute tarixindən əvvəl bir tarix olmalıdır :date.', + 'before_or_equal' => ':attribute tarixə bərabər vəya daha əvvəl olmalıdır', + 'between' => [ + 'numeric' => ':attribute :min ilə :max arasında olmalıdır', + 'file' => ':attribute :min ilə :max KB ölçüsü intervalında olmalıdır', + 'string' => ':attribute :min - :max arasında simvollardan ibarət olmalıdır.', + 'array' => ':attribute :min - :max arasında obyekt olmalıdır.', + ], + 'boolean' => ':attribute sadəcə doğru vəya səhv olmalıdır.', + 'confirmed' => ':attribute təkrarlama uyğun gəlmir.', + 'date' => ':attribute etibarlı bir tarix olmalıdır.', + 'date_format' => ':attribute :format formatına uyğun gəlmir.', + 'different' => ':attribute ilə :other birbirindən fərqli olmalıdır.', + 'digits' => ':attribute :digits rəqəm olmalıdır.', + 'digits_between' => ':attribute :min ilə :max arasında rəqəm olmalıdır.', + 'dimensions' => ':attribute vizual ölçüləri etibarsızdır.', + 'distinct' => ':attribute sahənin təkrarlanan dəyəri var.', + 'email' => ':attribute formatı etibarsızdır.', + 'ends_with' => ':attribute bunlardan biri ilə bitməlidir: :values', + 'exists' => 'Seçili :attribute etibarsızdır.', + 'file' => ':attribute fayl olmalıdır.', + 'filled' => ':attribute sahənin doldurulması məcburidir.', + 'image' => ':attribute sahə rəsm faylı olmalıdır.', + 'in' => ':attribute dəyəri etibarsızdır.', + 'in_array' => ':attribute sahəni :other içində mövcud deyil.', + 'integer' => ':attribute tam ədəd olmalıdır.', + 'ip' => ':attribute etibarlı bir IP ünvanl olmalıdır.', + 'json' => ':attribute etibarlı bir JSON dəyişən olmalıdır.', + 'max' => [ + 'numeric' => ':attribute dəyəri :max dəyərindən kiçik olmalıdır.', + 'file' => ':attribute dəyəri :max kilobayt dəyərindən kiçik olmalıdır.', + 'string' => ':attribute dəyəri :max simvol dəyərindən kiçik olmalıdır.', + 'array' => ':attribute dəyəri :max ədədindən daha az obyekt olmalıdır.', + ], + 'mimes' => ':attribute fayl formatı :values olmalıdır.', + 'mimetypes' => ':attribute fayl formatı :values olmalıdır.', + 'min' => [ + 'numeric' => ':attribute dəyəri :min dəyərindən büyük olmalıdır.', + 'file' => ':attribute dəyəri :min kilobayt dəyərindən büyük olmalıdır.', + 'string' => ':attribute dəyəri :min simvol dəyərindən büyük olmalıdır.', + 'array' => ':attribute en az :min obyektə sahip olmalıdır.', + ], + 'not_in' => 'Seçili :attribute etibarsız.', + 'numeric' => ' :attribute rəqəmlərdən ibarət olmalıdır', + 'present' => ':attribute sahəsi mövcud olmalıdır.', + 'regex' => ' :attribute formatı yanlışdır', + 'required' => ' :attribute mütləqdir', + 'required_if' => ' :attribute (:other :value ikən) mütləqdir', + 'required_unless' => ':attribute sahəsi, :other :values dəyərinə sahip olmadığı təqdirdə məcburidir.', + 'required_with' => ':attribute sahəsi :values varkən məcburidir.', + 'required_with_all' => ':attribute sahəsi hərhansı bir :values dəyəri varkən məcburidir.', + 'required_without' => ':attribute sahəsi :values olmadıqda məcburidir.', + 'required_without_all' => ':attribute sahəsi :values dəyərlərindən hərhansı biri olmadıqda məcburidir.', + 'same' => ':attribute ile :other uyğun olmalıdır.', + 'size' => [ + 'numeric' => ':attribute :size olmalıdır.', + 'file' => ':attribute :size kilobyte olmalıdır.', + 'string' => ':attribute :size simvol olmalıdır.', + 'array' => ':attribute :size obyektə sahip olmalıdır.', + ], + 'string' => ':attribute dizge olmalıdır.', + 'timezone' => ':attribute etibarlı bir saat qurşağı olmalıdır.', + 'unique' => ':attribute daha öncədən qeyd edilmiş.', + 'uploaded' => ':attribute yükləməsi uğursuz.', + 'url' => ':attribute formatı etibarsız.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'Şəxsi Mesaj', + ], + 'invalid_currency' => ':attribute etibarsız bir valyuta məzənnəsi kodu.', + 'invalid_amount' => 'Məbləğ :attribute etibarsız.', + 'invalid_extension' => 'faylnın uzantısı etibarsız.', + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/lang/az-AZ/widgets.php b/resources/lang/az-AZ/widgets.php new file mode 100644 index 000000000..19454b0d0 --- /dev/null +++ b/resources/lang/az-AZ/widgets.php @@ -0,0 +1,23 @@ + 'Cəmi Gəlir', + 'receivables' => 'Alacaq', + 'open_invoices' => 'Açıq Fakturalar', + 'overdue_invoices' => 'Gecikmiş Fakturalar', + 'total_expenses' => 'Cəmi Xərc', + 'payables' => 'Verəcək', + 'open_bills' => 'Açıq Fakturalar', + 'overdue_bills' => 'Gecikmiş Fakturalar', + 'total_profit' => 'Cəmi Gəlir', + 'open_profit' => 'Açıq Gəlir', + 'overdue_profit' => 'Gecikmiş Gəlir', + 'cash_flow' => 'Maliyyə axını', + 'no_profit_loss' => 'Gəlir-Zərər Yox', + 'income_by_category' => 'Gəlir Kateqoriyaları', + 'expenses_by_category' => 'Xərc Kateqoriyaları', + 'account_balance' => 'Hesap Balansı', + 'latest_income' => 'Son Gəlirlər', + 'latest_expenses' => 'Son Xərclər', +]; diff --git a/resources/lang/el-GR/settings.php b/resources/lang/el-GR/settings.php index 3d05870ad..157b89f0c 100644 --- a/resources/lang/el-GR/settings.php +++ b/resources/lang/el-GR/settings.php @@ -3,7 +3,7 @@ return [ 'company' => [ - 'description' => 'Αλλαγή ονόματος εταιρείας, email, διεύθυνση, Αφμ, κλπ', + 'description' => 'Αλλαγή ονόματος εταιρείας, email, διεύθυνση, ΑΦΜ, κλπ', 'name' => 'Όνομα', 'email' => 'Διεύθυνση ηλ. ταχυδρομείου', 'phone' => 'Τηλέφωνο', @@ -62,12 +62,21 @@ return [ 'default' => 'Προεπιλεγμένο', 'classic' => 'Κλασικό', 'modern' => 'Μοντέρνο', + 'hide' => [ + 'item_name' => 'Απόκρυψη Ονόματος Αντικειμένων', + 'item_description' => 'Απόκρυψη Περιγραφής Αντικειμένων', + 'quantity' => 'Απόκρυψη Ποσότητας', + 'price' => 'Απόκρυψη Τιμής', + 'amount' => 'Απόκρυψη Ποσού', + ], ], 'default' => [ 'description' => 'Προεπιλεγμένος λογαριασμός, νόμισμα, γλώσσα της εταιρείας', 'list_limit' => 'Εγγραφές ανά σελίδα', 'use_gravatar' => 'Χρήση Gravatar', + 'income_category' => 'Κατηγορία Εσόδων', + 'expense_category' => 'Κατηγορία Εξόδων', ], 'email' => [ diff --git a/resources/lang/th-TH/auth.php b/resources/lang/th-TH/auth.php index d152a4a84..74ba3bd56 100644 --- a/resources/lang/th-TH/auth.php +++ b/resources/lang/th-TH/auth.php @@ -17,7 +17,7 @@ return [ 'password' => [ 'current' => 'รหัสผ่าน', - 'current_confirm' => 'การยืนยันรหัสผ่าน', + 'current_confirm' => 'ยืนยันรหัสผ่าน', 'new' => 'รหัสผ่านใหม่', 'new_confirm' => 'ยืนยันรหัสผ่านใหม่', ], diff --git a/resources/lang/th-TH/currencies.php b/resources/lang/th-TH/currencies.php index f989c4146..fa88ee971 100644 --- a/resources/lang/th-TH/currencies.php +++ b/resources/lang/th-TH/currencies.php @@ -8,6 +8,7 @@ return [ 'decimal_mark' => 'เครื่องหมายทศนิยม', 'thousands_separator' => 'ตัวคั่นรายการหลักพัน', 'precision' => 'ความแม่นยำ', + 'conversion' => 'อัตราแลกเปลี่ยนสกุลเงิน: :price (:currency_code) ที่ :currency_rate', 'symbol' => [ 'symbol' => 'สัญลักษณ์', 'position' => 'ตำแหน่งของสัญลักษณ์', diff --git a/resources/lang/th-TH/customers.php b/resources/lang/th-TH/customers.php index b1c1c691f..cde3f4ecc 100644 --- a/resources/lang/th-TH/customers.php +++ b/resources/lang/th-TH/customers.php @@ -2,15 +2,11 @@ return [ - 'allow_login' => 'อนุญาตให้เข้าสู่ระบบหรือไม่', + 'can_login' => 'ล็อคอินได้รึเปล่า?', 'user_created' => 'สร้างผู้ใช้งานระบบแล้ว', 'error' => [ - 'email' => 'อีเมลนี้ได้ลงทะเบียนอยู่แล้ว' + 'email' => 'อีเมลนี้ได้ลงทะเบียนอยู่แล้ว', ], - 'notification' => [ - 'message' => ': ดำเนินโดยลูกค้า: ยอดเงินการชำระเงินใบแจ้งหนี้หมายเลข: invoice_number', - 'button' => 'แสดง', - ], ]; diff --git a/resources/lang/th-TH/demo.php b/resources/lang/th-TH/demo.php index 62bfba5c1..d47c8f93b 100644 --- a/resources/lang/th-TH/demo.php +++ b/resources/lang/th-TH/demo.php @@ -2,15 +2,33 @@ return [ - 'accounts_cash' => 'เงินสด', - 'categories_deposit' => 'เงินฝาก', - 'categories_sales' => 'ขาย', - 'currencies_usd' => 'ดอลลาร์สหรัฐฯ', - 'currencies_eur' => 'ยูโร', - 'currencies_gbp' => 'ปอนด์ อังกฤษ', - 'currencies_try' => 'ลีรา ตุรกี', - 'taxes_exempt' => 'ยกเว้นภาษี', - 'taxes_normal' => 'ภาษีปกติ', - 'taxes_sales' => 'ภาษีการขาย', + 'accounts' => [ + 'cash' => 'เงินสด', + ], + + 'categories' => [ + 'deposit' => 'เงินฝาก', + 'sales' => 'การขาย', + ], + + 'currencies' => [ + 'usd' => 'ดอลลาร์สหรัฐฯ', + 'eur' => 'ยูโร', + 'gbp' => 'ปอนด์ อังกฤษ', + 'try' => 'ลีรา ตุรกี', + ], + + 'offline_payments' => [ + 'cash' => 'เงินสด', + 'bank' => 'โอนเงินผ่านธนาคาร', + ], + + 'reports' => [ + 'income' => 'สรุปรายได้ต่อเดือนตามหมวดหมู่', + 'expense' => 'สรุปรายจ่ายต่อเดือนตามหมวดหมู่', + 'income_expense' => 'สรุปรายได้กับรายจ่ายต่อเดือนตามหมวดหมู่', + 'tax' => 'สรุปยอดภาษีต่อไตรมาส', + 'profit_loss' => 'สรุปยอดกำไรขาดทุนต่อไตรมาสตามหมวดหมู่', + ], ]; diff --git a/resources/lang/th-TH/errors.php b/resources/lang/th-TH/errors.php new file mode 100644 index 000000000..8e68e611d --- /dev/null +++ b/resources/lang/th-TH/errors.php @@ -0,0 +1,23 @@ + [ + '403' => 'ขออภัย ระบบไม่อนุญาตให้เข้าได้', + '404' => 'ขออภัย ระบบไม่พบหน้านี้', + '500' => 'ขออภัย มีบางอย่างผิดพลาด', + ], + + 'header' => [ + '403' => '403 ไม่อนุญาต', + '404' => '404 ไม่พบ', + '500' => '500 ข้อผิดพลาดภายในเซิร์ฟเวอร์', + ], + + 'message' => [ + '403' => 'คุณไม่มีสิทธิเข้าถึงหน้านี้', + '404' => 'เราไม่พบหน้าที่คุณกำลังหาอยู่', + '500' => 'เราจะดำเนินการแก้ไขภายในเร็วๆนี้', + ], + +]; diff --git a/resources/lang/th-TH/import.php b/resources/lang/th-TH/import.php index bdddaf3e3..e75512876 100644 --- a/resources/lang/th-TH/import.php +++ b/resources/lang/th-TH/import.php @@ -4,6 +4,6 @@ return [ 'import' => 'นำเข้า', 'title' => 'นำเข้า :type', - 'message' => 'Allowed file types: XLS, XLSX. Please, download the sample file.', + 'message' => 'ประเภทไฟล์ที่อนุญาต: XLS, XLSX. กรุณา, ดาวน์โหลด ไฟล์ตัวอย่าง.', ]; diff --git a/resources/lang/th-TH/maintenance.php b/resources/lang/th-TH/maintenance.php new file mode 100644 index 000000000..7ea57e62d --- /dev/null +++ b/resources/lang/th-TH/maintenance.php @@ -0,0 +1,9 @@ + 'ระบบอยู่ระหว่างการปรับปรุง', + + 'message' => 'ขออภัย ระบบอยู่ระหว่างการปรับปรุง โปรดรออีกครั้งในภายหลัง', + +]; diff --git a/resources/lang/th-TH/passwords.php b/resources/lang/th-TH/passwords.php index e5d437000..09848e7df 100644 --- a/resources/lang/th-TH/passwords.php +++ b/resources/lang/th-TH/passwords.php @@ -18,5 +18,6 @@ return [ 'sent' => 'เราได้ส่งลิงก์การรีเซ็ตรหัสผ่านทางอีเมลของคุณแล้ว!', 'token' => 'ชุดรหัสสำหรับการเปลี่ยนรหัสผ่านไม่ถูกต้อง', 'user' => "ไม่พบผู้ใช้งานที่ตรงกับอีเมลนี้", + 'throttle' => 'โปรดรอสักครู่ก่อนลองอีกครั้ง', ]; diff --git a/resources/lang/th-TH/taxes.php b/resources/lang/th-TH/taxes.php index df3a8131c..a82147a50 100644 --- a/resources/lang/th-TH/taxes.php +++ b/resources/lang/th-TH/taxes.php @@ -6,6 +6,7 @@ return [ 'rate_percent' => 'อัตรา (%)', 'normal' => 'ปกติ', 'inclusive' => 'รวมภาษีแล้ว', - 'compound' => 'ภาษีแบบผสม', - + 'compound' => 'ภาษีอัตราผสม', + 'fixed' => 'ภาษีแบบคงที่', + 'withholding' => 'ภาษีหัก ณ ที่จ่าย', ]; diff --git a/resources/lang/th-TH/validation.php b/resources/lang/th-TH/validation.php index 23a27816d..a2835fc91 100644 --- a/resources/lang/th-TH/validation.php +++ b/resources/lang/th-TH/validation.php @@ -16,18 +16,18 @@ return [ 'accepted' => 'ข้อมูล :attribute ต้องผ่านการยอมรับก่อน', 'active_url' => 'ข้อมูล :attribute ต้องเป็น URL เท่านั้น', 'after' => 'ข้อมูล :attribute ต้องเป็นวันที่หลังจาก :date.', - 'after_or_equal' => ':attribute ต้องเป็นวันที่หลังจากหรือเท่ากับ :date', + 'after_or_equal' => 'ข้อมูล :attribute ต้องเป็นวันที่ตั้งแต่วันที่ :date หรือหลังจากนั้น.', 'alpha' => 'ข้อมูล :attribute ต้องเป็นตัวอักษรภาษาอังกฤษเท่านั้น', 'alpha_dash' => 'ข้อมูล :attribute ต้องเป็นตัวอักษรภาษาอังกฤษ ตัวเลข และ _ เท่านั้น', 'alpha_num' => 'ข้อมูล :attribute ต้องเป็นตัวอักษรภาษาอังกฤษ ตัวเลข เท่านั้น', 'array' => 'ข้อมูล :attribute ต้องเป็น array เท่านั้น', 'before' => 'ข้อมูล :attribute ต้องเป็นวันที่ก่อน :date.', - 'before_or_equal' => ':attribute ต้องเป็นวันที่ก่อนหรือเท่ากับ :date', + 'before_or_equal' => 'ข้อมูล :attribute ต้องเป็นวันที่ก่อนหรือเท่ากับวันที่ :date.', 'between' => [ 'numeric' => 'ข้อมูล :attribute ต้องอยู่ในช่วงระหว่าง :min - :max.', - 'file' => 'ข้อมูล :attribute ต้องอยู่ในช่วงระหว่าง :min - :max กิโลไบต์', - 'string' => 'ข้อมูล :attribute ต้องอยู่ในช่วงระหว่าง :min - :max ตัวอักษร', - 'array' => 'ข้อมูล :attribute ต้องอยู่ในช่วงระหว่าง :min - :max ค่า', + 'file' => 'ข้อมูล :attribute ต้องมีขนาดระหว่าง :min - :max กิโลไบต์', + 'string' => 'ข้อมูล :attribute ต้องมีความยาวตัวอักษรระหว่าง :min - :max ตัวอักษร', + 'array' => 'ข้อมูล :attribute ต้องมีค่าระหว่าง :min - :max ค่า', ], 'boolean' => 'ข้อมูล :attribute ต้องเป็นจริง หรือเท็จ เท่านั้น', 'confirmed' => 'ข้อมูล :attribute ไม่ตรงกัน', @@ -36,9 +36,10 @@ return [ 'different' => 'ข้อมูล :attribute และ :other ต้องไม่เท่ากัน', 'digits' => 'ข้อมูล :attribute ต้องเป็น :digits', 'digits_between' => 'ข้อมูล :attribute ต้องอยู่ในช่วงระหว่าง :min ถึง :max', - 'dimensions' => ':attribute มีขนาดภาพที่ไม่ถูกต้อง', + 'dimensions' => 'ข้อมูล :attribute มีขนาดไม่ถูกต้อง.', 'distinct' => 'ข้อมูล :attribute มีค่าที่ซ้ำกัน', 'email' => 'ข้อมูล :attribute ต้องเป็นอีเมล์', + 'ends_with' => 'ค่า :attribute ต้องลงท้ายด้วย: :values', 'exists' => 'ข้อมูล ที่ถูกเลือกจาก :attribute ไม่ถูกต้อง', 'file' => ':attribute ต้องเป็นไฟล์', 'filled' => 'ข้อมูล :attribute จำเป็นต้องกรอก', @@ -49,18 +50,18 @@ return [ 'ip' => 'ข้อมูล :attribute ต้องเป็น IP', 'json' => 'ข้อมูล :attribute ต้องเป็นอักขระ JSON ที่สมบูรณ์', 'max' => [ - 'numeric' => 'ข้อมูล :attribute ต้องมีจำนวนไม่เกิน :max.', - 'file' => 'ข้อมูล :attribute ต้องมีจำนวนไม่เกิน :max กิโลไบต์', - 'string' => 'ข้อมูล :attribute ต้องมีจำนวนไม่เกิน :max ตัวอักษร', - 'array' => 'ข้อมูล :attribute ต้องมีจำนวนไม่เกิน :max ค่า', + 'numeric' => 'ข้อมูล :attribute ต้องมีค่าไม่เกิน :max.', + 'file' => 'ข้อมูล :attribute ต้องมีขนาดไม่เกิน :max กิโลไบต์', + 'string' => 'ข้อมูล :attribute ต้องมีความยาวตัวอักษรไม่เกิน :max ตัวอักษร', + 'array' => 'ข้อมูล :attribute ต้องมีไม่เกิน :max ค่า', ], 'mimes' => 'ข้อมูล :attribute ต้องเป็นชนิดไฟล์: :values.', 'mimetypes' => 'ข้อมูล :attribute ต้องเป็นชนิดไฟล์: :values.', 'min' => [ - 'numeric' => 'ข้อมูล :attribute ต้องมีจำนวนอย่างน้อย :min.', - 'file' => 'ข้อมูล :attribute ต้องมีจำนวนอย่างน้อย :min กิโลไบต์', - 'string' => 'ข้อมูล :attribute ต้องมีจำนวนอย่างน้อย :min ตัวอักษร', - 'array' => 'ข้อมูล :attribute ต้องมีจำนวนอย่างน้อย :min ค่า', + 'numeric' => 'ข้อมูล :attribute ต้องมีค่าอย่างน้อย :min.', + 'file' => 'ข้อมูล :attribute ต้องมีขนาดอย่างน้อย :min กิโลไบต์', + 'string' => 'ข้อมูล :attribute ต้องมีความยาวตัวอักษรอย่างน้อย :min ตัวอักษร', + 'array' => 'ข้อมูล :attribute ต้องมีอย่างน้อย :min ค่า', ], 'not_in' => 'ข้อมูล ที่เลือกจาก :attribute ไม่ถูกต้อง', 'numeric' => 'ข้อมูล :attribute ต้องเป็นตัวเลข', @@ -99,10 +100,11 @@ return [ 'custom' => [ 'attribute-name' => [ - 'rule-name' => 'ข้อความแบบกำหนดเอง', + 'rule-name' => 'ข้อความแบบกำหนดเอง', ], - 'invalid_currency' => 'รูปแบบของ :attribute ไม่ถูกต้อง', - 'invalid_amount' => 'ปริมาณ:attribute ไม่ถูกต้อง', + 'invalid_currency' => 'รูปแบบของ :attribute ไม่ถูกต้อง', + 'invalid_amount' => 'ปริมาณ:attribute ไม่ถูกต้อง', + 'invalid_extension' => 'สกุลไฟล์ไม่รองรับ', ], /* From df0d0dbd8271d070756698f03117891df3fecf47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sun, 7 Feb 2021 21:19:12 +0300 Subject: [PATCH 07/60] added azerbaijani language --- config/language.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/language.php b/config/language.php index 5e4d0d411..58de67519 100644 --- a/config/language.php +++ b/config/language.php @@ -122,7 +122,7 @@ return [ | This options indicates the allowed languages. | */ - 'allowed' => ['ar-SA', 'bg-BG', 'bn-BD', 'bs-BA', 'ca-ES', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-US', 'es-AR', 'es-ES', 'es-MX', 'fa-IR', 'fr-FR', 'he-IL', 'hi-IN', 'hr-HR', 'hu-HU', 'id-ID', 'is-IS', 'it-IT', 'ja-JP', 'ka-GE', 'ko-KR', 'lt-LT', 'lv-LV', 'mk-MK', 'ms-MY', 'nb-NO', 'ne-NP', 'nl-NL', 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sk-SK', 'sr-RS', 'sq-AL', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'ur-PK', 'uz-UZ', 'vi-VN', 'zh-CN', 'zh-TW'], + 'allowed' => ['ar-SA', 'az-AZ', 'bg-BG', 'bn-BD', 'bs-BA', 'ca-ES', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-US', 'es-AR', 'es-ES', 'es-MX', 'fa-IR', 'fr-FR', 'he-IL', 'hi-IN', 'hr-HR', 'hu-HU', 'id-ID', 'is-IS', 'it-IT', 'ja-JP', 'ka-GE', 'ko-KR', 'lt-LT', 'lv-LV', 'mk-MK', 'ms-MY', 'nb-NO', 'ne-NP', 'nl-NL', 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sk-SK', 'sr-RS', 'sq-AL', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'ur-PK', 'uz-UZ', 'vi-VN', 'zh-CN', 'zh-TW'], /* |-------------------------------------------------------------------------- @@ -134,6 +134,7 @@ return [ */ 'all' => [ ['short' => 'ar', 'long' => 'ar-SA', 'english' => 'Arabic', 'native' => 'العربية'], + ['short' => 'az', 'long' => 'az-AZ', 'english' => 'Azerbaijani', 'native' => 'Azərbaycan'], ['short' => 'bg', 'long' => 'bg-BG', 'english' => 'Bulgarian', 'native' => 'български'], ['short' => 'bn', 'long' => 'bn-BD', 'english' => 'Bengali', 'native' => 'বাংলা'], ['short' => 'bs', 'long' => 'bs-BA', 'english' => 'Bosnian', 'native' => 'Bosanski'], From ef2684222fd6191e435f607c55b05acf8cf0e87e Mon Sep 17 00:00:00 2001 From: Pavel Mironchik Date: Mon, 8 Feb 2021 14:12:12 +0600 Subject: [PATCH 08/60] Allow modules to provide a translation for a search filter. --- app/View/Components/SearchString.php | 38 ++++++++++++++++++---------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/app/View/Components/SearchString.php b/app/View/Components/SearchString.php index 090f965c5..d3dfb87a9 100644 --- a/app/View/Components/SearchString.php +++ b/app/View/Components/SearchString.php @@ -33,26 +33,26 @@ class SearchString extends Component { if (empty($this->filters)) { $search_string = config('search-string'); - + $this->filters = []; - + if (!empty($search_string[$this->model])) { $columns = $search_string[$this->model]['columns']; - + foreach ($columns as $column => $options) { // This column skip for filter if (!empty($options['searchable'])) { continue; } - + if (!is_array($options)) { $column = $options; } - + if (!$this->isFilter($column, $options)) { continue; } - + $this->filters[] = [ 'key' => $this->getFilterKey($column, $options), 'value' => $this->getFilterName($column, $options), @@ -101,19 +101,29 @@ class SearchString extends Component $plural = Str::plural($column, 2); - if (trans_choice('general.' . $plural, 1) !== 'general.' . $plural) { - return trans_choice('general.' . $plural, 1); - } elseif (trans_choice('search_string.columns.' . $plural, 1) !== 'search_string.columns.' . $plural) { - return trans_choice('search_string.columns.' . $plural, 1); + if (strpos($this->model, 'Modules') !== false) { + $module_class = explode('\\', $this->model); + + $prefix = Str::slug($module_class[1], '-') . '::'; + + $translation_keys[] = $prefix . 'general.'; + $translation_keys[] = $prefix . 'search_string.columns.'; } - $name = trans('general.' . $column); + $translation_keys[] = 'general.'; + $translation_keys[] = 'search_string.columns.'; - if ($name == 'general.' . $column) { - $name = trans('search_string.columns.' . $column); + foreach ($translation_keys as $translation_key) { + if (trans_choice($translation_key . $plural, 1) !== $translation_key . $plural) { + return trans_choice($translation_key . $plural, 1); + } + + if (trans($translation_key . $column) !== $translation_key . $column) { + return trans($translation_key . $column); + } } - return $name; + return $column; } protected function getFilterType($options) From 8cfbf82e0aa14f2f293510b2686e7a637137ee01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Mon, 8 Feb 2021 12:07:22 +0300 Subject: [PATCH 09/60] moved financial quarters to trait --- app/Abstracts/Report.php | 15 +-------------- app/Traits/DateTime.php | 13 +++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index 57f4758de..6a121f0a8 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -16,7 +16,6 @@ use App\Traits\Charts; use App\Traits\DateTime; use App\Traits\SearchString; use App\Utilities\Chartjs; -use Carbon\CarbonPeriod; use Date; use Illuminate\Support\Str; @@ -376,7 +375,7 @@ abstract class Report break; case 'quarterly': - $quarters = $this->getFiscalBaseQuarters($this->year); + $quarters = $this->getFinancialQuarters($this->year); foreach ($quarters as $quarter) { if ($date->lessThan($quarter->getStartDate()) || $date->greaterThan($quarter->getEndDate())) { @@ -498,16 +497,4 @@ abstract class Report ], ]; } - - private function getFiscalBaseQuarters($year) - { - $periods = []; - $fiscal_start = $this->getFinancialStart($year); - - for ($i = 0; $i < 4; $i++) { - $periods[] = CarbonPeriod::create($fiscal_start->copy()->addQuarters($i), $fiscal_start->copy()->addQuarters($i + 1)->subDay()); - } - - return $periods; - } } diff --git a/app/Traits/DateTime.php b/app/Traits/DateTime.php index 8a34f319b..350d7c163 100644 --- a/app/Traits/DateTime.php +++ b/app/Traits/DateTime.php @@ -3,6 +3,7 @@ namespace App\Traits; use App\Traits\SearchString; +use Carbon\CarbonPeriod; use Date; trait DateTime @@ -117,6 +118,18 @@ trait DateTime return $financial_start; } + public function getFinancialQuarters($year) + { + $quarters = []; + $start = $this->getFinancialStart($year); + + for ($i = 0; $i < 4; $i++) { + $quarters[] = CarbonPeriod::create($start->copy()->addQuarters($i), $start->copy()->addQuarters($i + 1)->subDay()); + } + + return $quarters; + } + public function getMonthlyDateFormat($year = null) { $format = 'M'; From 394698ee26e7c6af5f18f6cb213a2d983ab2c295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Mon, 8 Feb 2021 12:08:24 +0300 Subject: [PATCH 10/60] allow year to be null --- app/Traits/DateTime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Traits/DateTime.php b/app/Traits/DateTime.php index 350d7c163..0f3fbe5ea 100644 --- a/app/Traits/DateTime.php +++ b/app/Traits/DateTime.php @@ -118,7 +118,7 @@ trait DateTime return $financial_start; } - public function getFinancialQuarters($year) + public function getFinancialQuarters($year = null) { $quarters = []; $start = $this->getFinancialStart($year); From 4f6d2a043505bb809b4ff6acdd6f22cbbfccf493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Mon, 8 Feb 2021 16:06:31 +0300 Subject: [PATCH 11/60] Document issue and due at enhancement --- .../View/Components/DocumentForm.php | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/app/Abstracts/View/Components/DocumentForm.php b/app/Abstracts/View/Components/DocumentForm.php index cb189baaf..cedaf14a3 100644 --- a/app/Abstracts/View/Components/DocumentForm.php +++ b/app/Abstracts/View/Components/DocumentForm.php @@ -537,7 +537,7 @@ abstract class DocumentForm extends Base if (request()->has($issued_at)) { $issuedAt = request()->get($issued_at); } else { - $issuedAt = request()->get('invoiced_at', Date::now()->toDateString()); + $issuedAt = request()->get('invoice_at', Date::now()->toDateString()); } return $issuedAt; @@ -572,20 +572,19 @@ abstract class DocumentForm extends Base return $document->due_at; } - $addDays = (setting($type . '.payment_terms', 0)) ? setting($type . '.payment_terms', 0) : setting('invoice.payment_terms', 0); + $issued_at = $type . '_at'; - switch ($type) { - case 'bill': - case 'expense': - case 'purchase': - $due_at = request()->get('billed_at', Date::now()->toDateString()); - break; - default: - $due_at = Date::parse(request()->get('invoiced_at', Date::now()->toDateString()))->addDays($addDays)->toDateString(); - break; + if (request()->has($issued_at)) { + $issuedAt = request()->get($issued_at); + } else { + $issuedAt = Date::now()->toDateString(); } - return $due_at; + $addDays = (setting($type . '.payment_terms', 0)) ? setting($type . '.payment_terms', 0) : 0; + + $dueAt = Date::parse($issuedAt)->addDays($addDays)->toDateString(); + + return $dueAt; } protected function getOrderNumber($type, $document, $orderNumber) From 6852d83cb98b37b71a9f89215a3e1788d76c127d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Mon, 8 Feb 2021 18:26:30 +0300 Subject: [PATCH 12/60] dropzone fixed href issue.. --- .../AkauntingDropzoneFileUpload.vue | 110 +++++++++--------- 1 file changed, 58 insertions(+), 52 deletions(-) diff --git a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue index 0fff9b98b..8007f2663 100644 --- a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue +++ b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue @@ -107,83 +107,89 @@ export default { let preview = this.preview == 'single' ? this.$refs.previewSingle : this.$refs.previewMultiple; if (this.configurations.maxFiles === undefined && this.multiple == false) { - this.configurations.maxFiles = 1 + this.configurations.maxFiles = 1; } if (this.configurations.acceptedFiles === undefined) { - this.configurations.acceptedFiles = 'image/*' + this.configurations.acceptedFiles = 'image/*'; } let finalOptions = { - ...self.configurations, - url: this.url, - previewsContainer: preview, - previewTemplate: preview.innerHTML, - dictDefaultMessage: this.textDropFile, - autoProcessQueue: false, + ...self.configurations, + url: this.url, + previewsContainer: preview, + previewTemplate: preview.innerHTML, + dictDefaultMessage: this.textDropFile, + autoProcessQueue: false, - init: function () { - let dropzone = this + init: function () { + let dropzone = this; - dropzone.on('addedfile', function (file) { - self.files.push(file); + dropzone.on('addedfile', function (file) { + self.files.push(file); - if (self.configurations.maxFiles == 1) { - self.$emit('change', file); - } else { - self.$emit('change', self.files); - } - }), + if (self.configurations.maxFiles == 1) { + self.$emit('change', file); + } else { + self.$emit('change', self.files); + } + }), - dropzone.on('removedfile', function (file) { - let index = self.files.findIndex(f => f.name === file.name) + dropzone.on('removedfile', function (file) { + let index = self.files.findIndex(f => f.name === file.name) - if (index !== -1) { - self.files.splice(index, 1); - } + if (index !== -1) { + self.files.splice(index, 1); + } - self.$emit('change', self.files); + self.$emit('change', self.files); - if (self.multiple) { - this.enable(); - } - }), + if (self.multiple) { + this.enable(); + } + }), - dropzone.on('maxfilesexceeded', function(file) { - this.removeAllFiles('notCancel'); - this.addFile(file); - }), + dropzone.on('maxfilesexceeded', function(file) { + this.removeAllFiles('notCancel'); + this.addFile(file); + }), - dropzone.on('maxfilesreached', function(file) { - if (self.multiple) { - this.disable(); - } - }) - - setTimeout(() => { - self.attachments.forEach(async (attachment) => { - let blob = await self.getAttachmentContent(attachment.path) - let file = new File([blob], attachment.name, { type: blob.type }) - - dropzone.displayExistingFile(file, attachment.path, () => { - file.previewElement.querySelector("[data-dz-download]").href = attachment.downloadPath - file.previewElement.querySelector("[data-dz-download]").classList.remove("d-none") - }) + dropzone.on('maxfilesreached', function(file) { + if (self.multiple) { + this.disable(); + } }) - if (self.preview == 'single' && self.attachments.length == 1) - document.querySelector("#dropzone").classList.add("dz-max-files-reached"); - }, 750) - } + if (self.attachments.length) { + setTimeout(() => { + self.attachments.forEach(async (attachment) => { + let blob = await self.getAttachmentContent(attachment.path); + let file = new File([blob], attachment.name, { type: blob.type }); + + dropzone.displayExistingFile(file, attachment.path, () => { + if (attachment.downloadPath) { + file.previewElement.querySelector("[data-dz-download]").href = attachment.downloadPath; + file.previewElement.querySelector("[data-dz-download]").classList.remove("d-none"); + } + }); + }); + + if (self.preview == 'single' && self.attachments.length == 1) { + document.querySelector("#dropzone").classList.add("dz-max-files-reached"); + } + }, 100); + } + } }; this.dropzone = new Dropzone(this.$el, finalOptions); preview.innerHTML = ''; }, + async getAttachmentContent(imageUrl) { return await axios.get(imageUrl, { responseType: 'blob' }).then(function (response) { - return response.data + return response.data; }); } }, From cf2726441c9b8d90ce5d1e5d2148c38d85e796a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 9 Feb 2021 11:47:30 +0300 Subject: [PATCH 13/60] File group component and view changes.. --- .../AkauntingDropzoneFileUpload.vue | 59 ++++++++++++++----- .../views/partials/form/file_group.blade.php | 21 +++++-- 2 files changed, 61 insertions(+), 19 deletions(-) diff --git a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue index 8007f2663..a756602f1 100644 --- a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue +++ b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue @@ -11,6 +11,10 @@
+ + + +
@@ -20,6 +24,10 @@
+ + + +
@@ -133,6 +141,24 @@ export default { } else { self.$emit('change', self.files); } + + if (file.type.indexOf("image") == -1) { + var ext = file.name.split('.').pop(); + + if (ext == "pdf") { + file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none"); + file.previewElement.querySelector("[data-dz-thumbnail-pdf]").classList.remove("d-none"); + } else if ((ext.indexOf("doc") != -1) || (ext.indexOf("docx") != -1)) { + file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none"); + file.previewElement.querySelector("[data-dz-thumbnail-word]").classList.remove("d-none"); + } else if ((ext.indexOf("xls") != -1) || (ext.indexOf("xlsx") != -1)) { + file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none"); + file.previewElement.querySelector("[data-dz-thumbnail-excel]").classList.remove("d-none"); + } else { + file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none"); + file.previewElement.querySelector("[data-dz-thumbnail-image]").classList.remove("d-none"); + } + } }), dropzone.on('removedfile', function (file) { @@ -163,15 +189,26 @@ export default { if (self.attachments.length) { setTimeout(() => { self.attachments.forEach(async (attachment) => { - let blob = await self.getAttachmentContent(attachment.path); - let file = new File([blob], attachment.name, { type: blob.type }); + var mockFile = { + id: attachment.id, + name: attachment.name, + size: attachment.size, + type: attachment.type, + download: attachment.downloadPath, + }; - dropzone.displayExistingFile(file, attachment.path, () => { - if (attachment.downloadPath) { - file.previewElement.querySelector("[data-dz-download]").href = attachment.downloadPath; - file.previewElement.querySelector("[data-dz-download]").classList.remove("d-none"); - } - }); + dropzone.emit("addedfile", mockFile); + dropzone.options.thumbnail.call(dropzone, mockFile, attachment.path); + + // Make sure that there is no progress bar, etc... + dropzone.emit("complete", mockFile); + }); + + self.files.forEach(async (attachment) => { + if (attachment.download) { + attachment.previewElement.querySelector("[data-dz-download]").href = attachment.download; + attachment.previewElement.querySelector("[data-dz-download]").classList.remove("d-none"); + } }); if (self.preview == 'single' && self.attachments.length == 1) { @@ -186,12 +223,6 @@ export default { preview.innerHTML = ''; }, - - async getAttachmentContent(imageUrl) { - return await axios.get(imageUrl, { responseType: 'blob' }).then(function (response) { - return response.data; - }); - } }, async mounted() { diff --git a/resources/views/partials/form/file_group.blade.php b/resources/views/partials/form/file_group.blade.php index 7591b9a36..bea74d73f 100644 --- a/resources/views/partials/form/file_group.blade.php +++ b/resources/views/partials/form/file_group.blade.php @@ -45,17 +45,24 @@ @foreach($value as $attachment) @php $attachments[] = [ + 'id' => $attachment->id, 'name' => $attachment->filename . '.' . $attachment->extension, - 'path' => route('uploads.get', $attachment->id), - 'downloadPath' => route('uploads.download', $attachment->id) + 'path' => route('uploads.get', $attachment->id), + 'type' => $attachment->mime_type, + 'size' => $attachment->size, + 'downloadPath' => route('uploads.download', $attachment->id), ]; @endphp @endforeach @elseif ($value instanceof \Plank\Mediable\Media) @php $attachments[] = [ + 'id' => $attachment->id, 'name' => $value->filename . '.' . $value->extension, - 'path' => route('uploads.get', $value->id) + 'path' => route('uploads.get', $value->id), + 'type' => $attachment->mime_type, + 'size' => $attachment->size, + 'downloadPath' => false, ]; @endphp @else @@ -63,12 +70,16 @@ $attachment = \Plank\Mediable\Media::find($value); $attachments[] = [ + 'id' => $attachment->id, 'name' => $attachment->filename . '.' . $attachment->extension, - 'path' => route('uploads.get', $attachment->id) + 'path' => route('uploads.get', $attachment->id), + 'type' => $attachment->mime_type, + 'size' => $attachment->size, + 'downloadPath' => false, ]; @endphp @endif - + :attachments="{{ json_encode($attachments) }}" @endif From fcc8b6358e4cc876c43e03e4a824ac825634fa08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 9 Feb 2021 11:48:58 +0300 Subject: [PATCH 14/60] Revenues attachment add multiple --- app/Http/Controllers/Sales/Revenues.php | 24 +++++++++++++++++-- .../views/sales/revenues/create.blade.php | 4 ++-- resources/views/sales/revenues/edit.blade.php | 11 ++------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/app/Http/Controllers/Sales/Revenues.php b/app/Http/Controllers/Sales/Revenues.php index 15aead9bf..6e761745e 100644 --- a/app/Http/Controllers/Sales/Revenues.php +++ b/app/Http/Controllers/Sales/Revenues.php @@ -66,7 +66,17 @@ class Revenues extends Controller $payment_methods = Modules::getPaymentMethods(); - return view('sales.revenues.create', compact('accounts', 'currencies', 'account_currency_code', 'currency', 'customers', 'categories', 'payment_methods')); + $file_type_mimes = explode(',', config('filesystems.mimes')); + + $file_types = []; + + foreach ($file_type_mimes as $mime) { + $file_types[] = '.' . $mime; + } + + $file_types = implode(',', $file_types); + + return view('sales.revenues.create', compact('accounts', 'currencies', 'account_currency_code', 'currency', 'customers', 'categories', 'payment_methods', 'file_types')); } /** @@ -166,7 +176,17 @@ class Revenues extends Controller $date_format = $this->getCompanyDateFormat(); - return view('sales.revenues.edit', compact('revenue', 'accounts', 'currencies', 'currency', 'customers', 'categories', 'payment_methods', 'date_format')); + $file_type_mimes = explode(',', config('filesystems.mimes')); + + $file_types = []; + + foreach ($file_type_mimes as $mime) { + $file_types[] = '.' . $mime; + } + + $file_types = implode(',', $file_types); + + return view('sales.revenues.edit', compact('revenue', 'accounts', 'currencies', 'currency', 'customers', 'categories', 'payment_methods', 'date_format', 'file_types')); } /** diff --git a/resources/views/sales/revenues/create.blade.php b/resources/views/sales/revenues/create.blade.php index 59c839319..d3bd3a409 100644 --- a/resources/views/sales/revenues/create.blade.php +++ b/resources/views/sales/revenues/create.blade.php @@ -38,9 +38,9 @@ {{ Form::textGroup('reference', trans('general.reference'), 'file', []) }} - {{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'form-file']) }} - {{ Form::selectGroup('document_id', trans_choice('general.invoices', 1), 'file-invoice', [], null, ['disabled' => 'true']) }} + + {{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], null, 'col-md-12') }} diff --git a/resources/views/sales/revenues/edit.blade.php b/resources/views/sales/revenues/edit.blade.php index 02f5c2ec9..8932d5570 100644 --- a/resources/views/sales/revenues/edit.blade.php +++ b/resources/views/sales/revenues/edit.blade.php @@ -57,19 +57,12 @@ {{ Form::textGroup('reference', trans('general.reference'), 'file',[]) }} - @if ($revenue->attachment) -
- @php $file = $revenue->attachment; @endphp - @include('partials.media.file') -
- @else - {{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'form-file']) }} - @endif - @if ($revenue->invoice) {{ Form::textGroup('document', trans_choice('general.invoices', 1), 'file-invoice', ['disabled' => 'true'], $revenue->invoice->document_number) }} {{ Form::hidden('document_id', $revenue->invoice->id) }} @endif + + {{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], $revenue->attachment, 'col-md-12') }} From 4ef70899be2ee3ed1663cb5969dbca9df9b1858c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 9 Feb 2021 11:52:01 +0300 Subject: [PATCH 15/60] Payment attachment add multiple --- app/Http/Controllers/Purchases/Payments.php | 24 +++++++++++++++++-- .../views/purchases/payments/create.blade.php | 4 ++-- .../views/purchases/payments/edit.blade.php | 11 ++------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/app/Http/Controllers/Purchases/Payments.php b/app/Http/Controllers/Purchases/Payments.php index f3980f8cd..bf5b3225e 100644 --- a/app/Http/Controllers/Purchases/Payments.php +++ b/app/Http/Controllers/Purchases/Payments.php @@ -66,7 +66,17 @@ class Payments extends Controller $payment_methods = Modules::getPaymentMethods(); - return view('purchases.payments.create', compact('accounts', 'currencies', 'account_currency_code', 'currency', 'vendors', 'categories', 'payment_methods')); + $file_type_mimes = explode(',', config('filesystems.mimes')); + + $file_types = []; + + foreach ($file_type_mimes as $mime) { + $file_types[] = '.' . $mime; + } + + $file_types = implode(',', $file_types); + + return view('purchases.payments.create', compact('accounts', 'currencies', 'account_currency_code', 'currency', 'vendors', 'categories', 'payment_methods', 'file_types')); } /** @@ -166,7 +176,17 @@ class Payments extends Controller $date_format = $this->getCompanyDateFormat(); - return view('purchases.payments.edit', compact('payment', 'accounts', 'currencies', 'currency', 'vendors', 'categories', 'payment_methods', 'date_format')); + $file_type_mimes = explode(',', config('filesystems.mimes')); + + $file_types = []; + + foreach ($file_type_mimes as $mime) { + $file_types[] = '.' . $mime; + } + + $file_types = implode(',', $file_types); + + return view('purchases.payments.edit', compact('payment', 'accounts', 'currencies', 'currency', 'vendors', 'categories', 'payment_methods', 'date_format', 'file_types')); } /** diff --git a/resources/views/purchases/payments/create.blade.php b/resources/views/purchases/payments/create.blade.php index 7744147f4..b9cc329c4 100644 --- a/resources/views/purchases/payments/create.blade.php +++ b/resources/views/purchases/payments/create.blade.php @@ -38,9 +38,9 @@ {{ Form::textGroup('reference', trans('general.reference'), 'file', []) }} - {{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'form-file']) }} - {{ Form::selectGroup('document_id', trans_choice('general.bills', 1), 'file-invoice', [], null, ['disabled' => 'true']) }} + + {{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], null, 'col-md-12') }} diff --git a/resources/views/purchases/payments/edit.blade.php b/resources/views/purchases/payments/edit.blade.php index b4b3fca8e..933992f2b 100644 --- a/resources/views/purchases/payments/edit.blade.php +++ b/resources/views/purchases/payments/edit.blade.php @@ -57,19 +57,12 @@ {{ Form::textGroup('reference', trans('general.reference'), 'file',[]) }} - @if ($payment->attachment) -
- @php $file = $payment->attachment; @endphp - @include('partials.media.file') -
- @else - {{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'form-file']) }} - @endif - @if ($payment->bill) {{ Form::textGroup('document', trans_choice('general.bills', 1), 'file-invoice', ['disabled' => 'true'], $payment->bill->document_number) }} {{ Form::hidden('document_id', $payment->bill->id) }} @endif + + {{ Form::fileGroup('attachment', trans('general.attachment'), '', ['dropzone-class' => 'w-100', 'multiple' => 'multiple', 'options' => ['acceptedFiles' => $file_types]], $payment->attachment, 'col-md-12') }} From 305ff07ee01f7952768a8d05a2104491e3333e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 9 Feb 2021 11:54:53 +0300 Subject: [PATCH 16/60] Transaction model and jobs added multiple attachment --- app/Jobs/Banking/CreateTransaction.php | 6 ++++-- app/Jobs/Banking/UpdateTransaction.php | 10 ++++++++-- app/Models/Banking/Transaction.php | 12 +++++++++++- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/app/Jobs/Banking/CreateTransaction.php b/app/Jobs/Banking/CreateTransaction.php index 40e2a485d..001f4bddc 100644 --- a/app/Jobs/Banking/CreateTransaction.php +++ b/app/Jobs/Banking/CreateTransaction.php @@ -37,9 +37,11 @@ class CreateTransaction extends Job // Upload attachment if ($this->request->file('attachment')) { - $media = $this->getMedia($this->request->file('attachment'), 'transactions'); + foreach ($this->request->file('attachment') as $attachment) { + $media = $this->getMedia($attachment, 'transactions'); - $this->transaction->attachMedia($media, 'attachment'); + $this->transaction->attachMedia($media, 'attachment'); + } } // Recurring diff --git a/app/Jobs/Banking/UpdateTransaction.php b/app/Jobs/Banking/UpdateTransaction.php index b444e57fd..0d95bf6b1 100644 --- a/app/Jobs/Banking/UpdateTransaction.php +++ b/app/Jobs/Banking/UpdateTransaction.php @@ -37,9 +37,15 @@ class UpdateTransaction extends Job // Upload attachment if ($this->request->file('attachment')) { - $media = $this->getMedia($this->request->file('attachment'), 'transactions'); + $this->transaction->delete_attachment(); - $this->transaction->attachMedia($media, 'attachment'); + foreach ($this->request->file('attachment') as $attachment) { + $media = $this->getMedia($attachment, 'transactions'); + + $this->transaction->attachMedia($media, 'attachment'); + } + } elseif (!$this->request->file('attachment') && $this->transaction->attachment) { + $this->transaction->delete_attachment(); } // Recurring diff --git a/app/Models/Banking/Transaction.php b/app/Models/Banking/Transaction.php index d57ec6575..188a45366 100644 --- a/app/Models/Banking/Transaction.php +++ b/app/Models/Banking/Transaction.php @@ -3,6 +3,7 @@ namespace App\Models\Banking; use App\Abstracts\Model; +use App\Models\Common\Media as MediaModel; use App\Models\Setting\Category; use App\Scopes\Transaction as Scope; use App\Traits\Currencies; @@ -320,7 +321,16 @@ class Transaction extends Model return false; } - return $this->getMedia('attachment')->last(); + return $this->getMedia('attachment')->all(); + } + + public function delete_attachment() + { + if ($attachments = $this->attachment) { + foreach ($attachments as $file) { + MediaModel::where('id', $file->id)->delete(); + } + } } /** From 60d1286458a2d1d5674aff811ac84bbfa1c53b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 9 Feb 2021 12:00:30 +0300 Subject: [PATCH 17/60] Update document job attachment --- app/Jobs/Document/UpdateDocument.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Jobs/Document/UpdateDocument.php b/app/Jobs/Document/UpdateDocument.php index 680b4ab25..2d91a48d6 100644 --- a/app/Jobs/Document/UpdateDocument.php +++ b/app/Jobs/Document/UpdateDocument.php @@ -53,6 +53,8 @@ class UpdateDocument extends Job $this->document->attachMedia($media, 'attachment'); } + } elseif (!$this->request->file('attachment') && $this->document->attachment) { + $this->document->delete_attachment(); } $this->deleteRelationships($this->document, ['items', 'item_taxes', 'totals']); From 8df09b5c25152ebb04a7cd0029a31b1fbd1438d0 Mon Sep 17 00:00:00 2001 From: dev-zm-sl <78361157+dev-zm-sl@users.noreply.github.com> Date: Tue, 9 Feb 2021 15:44:47 +0500 Subject: [PATCH 18/60] Update create.blade.php Error styling Issue #1839 --- resources/views/sales/customers/create.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/sales/customers/create.blade.php b/resources/views/sales/customers/create.blade.php index 80a18a2d4..99da96eaa 100644 --- a/resources/views/sales/customers/create.blade.php +++ b/resources/views/sales/customers/create.blade.php @@ -76,7 +76,7 @@ @push('scripts_start') From e251a14106fc2fcaf7a34f6d759d41c99e174b1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Tue, 9 Feb 2021 14:56:56 +0300 Subject: [PATCH 19/60] Money middleware re-factoring.. --- app/Http/Middleware/Money.php | 118 +++++++++++++--------------------- 1 file changed, 44 insertions(+), 74 deletions(-) diff --git a/app/Http/Middleware/Money.php b/app/Http/Middleware/Money.php index 8c206ab6d..1a51550d4 100644 --- a/app/Http/Middleware/Money.php +++ b/app/Http/Middleware/Money.php @@ -19,95 +19,65 @@ class Money */ public function handle($request, Closure $next) { - if ($request->method() == 'POST' || $request->method() == 'PATCH') { - $amount = $request->get('amount'); - $document_number = $request->get('document_number'); - $sale_price = $request->get('sale_price'); - $purchase_price = $request->get('purchase_price'); - $opening_balance = $request->get('opening_balance'); - $items = $request->get('items'); + if (($request->method() != 'POST') && ($request->method() != 'PATCH')) { + return $next($request); + } - if (!empty($amount)) { - try { - $amount = money($amount)->getAmount(); - } catch (InvalidArgumentException | OutOfBoundsException | UnexpectedValueException $e) { - logger($e->getMessage()); + $parameters = [ + 'amount', + 'sale_price', + 'purchase_price', + 'opening_balance', + ]; - $amount = 0; - } - - $request->request->set('amount', $amount); + foreach ($parameters as $parameter) { + if (!$request->has($parameter)) { + continue; } - if (isset($document_number) || !empty($items)) { - if (!empty($items)) { - foreach ($items as $key => $item) { - if (!isset($item['price'])) { - continue; - } + $money_format = $request->get($parameter); - try { - $amount = money($item['price'])->getAmount(); - } catch (InvalidArgumentException | OutOfBoundsException | UnexpectedValueException $e) { - logger($e->getMessage()); + if ($parameter == 'sale_price' || $parameter == 'purchase_price') { + $money_format = Str::replaceFirst(',', '.', $money_format); + } - $amount = 0; - } + $amount = $this->getAmount($money_format); - $items[$key]['price'] = $amount; + $request->request->set($parameter, $amount); + } + + $document_number = $request->get('document_number'); + $items = $request->get('items'); + + if (isset($document_number) || !empty($items)) { + if (!empty($items)) { + foreach ($items as $key => $item) { + if (!isset($item['price'])) { + continue; } - $request->request->set('items', $items); - } - } + $amount = $this->getAmount($item['price']); - if (isset($opening_balance)) { - try { - $amount = money($opening_balance)->getAmount(); - } catch (InvalidArgumentException | OutOfBoundsException | UnexpectedValueException $e) { - logger($e->getMessage()); - - $amount = 0; + $items[$key]['price'] = $amount; } - $opening_balance = $amount; - - $request->request->set('opening_balance', $opening_balance); - } - - if (isset($sale_price)) { - $sale_price = Str::replaceFirst(',', '.', $sale_price); - - try { - $amount = money($sale_price)->getAmount(); - } catch (InvalidArgumentException | OutOfBoundsException | UnexpectedValueException $e) { - logger($e->getMessage()); - - $amount = 0; - } - - $sale_price = $amount; - - $request->request->set('sale_price', $sale_price); - } - - if (isset($purchase_price)) { - $purchase_price = Str::replaceFirst(',', '.', $purchase_price); - - try { - $amount = money($purchase_price)->getAmount(); - } catch (InvalidArgumentException | OutOfBoundsException | UnexpectedValueException $e) { - logger($e->getMessage()); - - $amount = 0; - } - - $purchase_price = $amount; - - $request->request->set('purchase_price', $purchase_price); + $request->request->set('items', $items); } } return $next($request); } + + protected function getAmount($money_format) + { + try { + $amount = money($money_format)->getAmount(); + } catch (InvalidArgumentException | OutOfBoundsException | UnexpectedValueException $e) { + logger($e->getMessage()); + + $amount = 0; + } + + return $amount; + } } From f8ffda26c73e71851f7158fbd68facbc1c8d1950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Wed, 10 Feb 2021 00:40:59 +0300 Subject: [PATCH 20/60] prevent direct access to json files --- .htaccess | 2 +- nginx.example.com.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.htaccess b/.htaccess index d6cc946a1..da9dd1792 100644 --- a/.htaccess +++ b/.htaccess @@ -28,7 +28,7 @@ RewriteRule ^(app|bootstrap|config|database|overrides|resources|routes|storage|tests)/(.*) / [L,R=301] # Prevent Direct Access To modules/vendor Folders Except Assets - RewriteRule ^(modules|vendor)/(.*)\.((?!ico|gif|jpg|jpeg|png|js|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ / [L,R=301] + RewriteRule ^(modules|vendor)/(.*)\.((?!ico|gif|jpg|jpeg|png|js\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ / [L,R=301] # Redirect Trailing Slashes If Not A Folder... RewriteCond %{REQUEST_FILENAME} !-d diff --git a/nginx.example.com.conf b/nginx.example.com.conf index e4270878d..96852d10d 100644 --- a/nginx.example.com.conf +++ b/nginx.example.com.conf @@ -32,7 +32,7 @@ server { } # Prevent Direct Access To modules/vendor Folders Except Assets - location ~ ^/(modules|vendor)\/(.*)\.((?!ico|gif|jpg|jpeg|png|js|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ { + location ~ ^/(modules|vendor)\/(.*)\.((?!ico|gif|jpg|jpeg|png|js\b|css|less|sass|font|woff|woff2|eot|ttf|svg).)*$ { deny all; } From 4631253bd9f9aa6111f6780ad8509bcce6a39120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 10 Feb 2021 12:06:41 +0300 Subject: [PATCH 21/60] add dropzone middleware --- app/Http/Kernel.php | 1 + app/Http/Middleware/Dropzone.php | 65 ++++++++++++++++++++++++++++++++ routes/admin.php | 22 +++++------ routes/portal.php | 2 +- 4 files changed, 78 insertions(+), 12 deletions(-) create mode 100644 app/Http/Middleware/Dropzone.php diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 04ef72e94..cba2297bc 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -148,6 +148,7 @@ class Kernel extends HttpKernel 'company.currencies' => \App\Http\Middleware\LoadCurrencies::class, 'company.settings' => \App\Http\Middleware\LoadSettings::class, 'company.signed' => \App\Http\Middleware\SignedCompany::class, + 'dropzone' => \App\Http\Middleware\Dropzone::class, 'header.x' => \App\Http\Middleware\AddXHeader::class, 'menu.admin' => \App\Http\Middleware\AdminMenu::class, 'menu.portal' => \App\Http\Middleware\PortalMenu::class, diff --git a/app/Http/Middleware/Dropzone.php b/app/Http/Middleware/Dropzone.php new file mode 100644 index 000000000..8b0bba235 --- /dev/null +++ b/app/Http/Middleware/Dropzone.php @@ -0,0 +1,65 @@ +method() != 'POST') && ($request->method() != 'PATCH')) { + return $next($request); + } + + $multiple = false; + + foreach ($request->all() as $key => $value) { + if (!is_array($value)) { + continue; + } + + $files = []; + $uploaded = []; + + foreach ($value as $index => $parameter) { + // single file uploaded.. + if (!is_array($parameter) && !$multiple) { + if (!Arr::has($value, 'dropzone')) { + continue; + } + + $request->request->set('uploaded_' . $key, $value); + + unset($request[$key]); + break; + } + + // multiple file uploaded.. + if (!Arr::has($parameter, 'dropzone')) { + $files[] = $parameter; + + continue; + } + + $multiple = true; + $uploaded[] = $parameter; + } + + if ($multiple && $uploaded) { + $request->request->set('uploaded_' . $key, $uploaded); + $request->request->set($key, $files); + } + } + + return $next($request); + } +} diff --git a/routes/admin.php b/routes/admin.php index 7dbcffa4f..bbaf2b85f 100644 --- a/routes/admin.php +++ b/routes/admin.php @@ -18,7 +18,7 @@ Route::group(['prefix' => 'common'], function () { Route::get('companies/{company}/switch', 'Common\Companies@switch')->name('companies.switch'); Route::get('companies/{company}/enable', 'Common\Companies@enable')->name('companies.enable'); Route::get('companies/{company}/disable', 'Common\Companies@disable')->name('companies.disable'); - Route::resource('companies', 'Common\Companies'); + Route::resource('companies', 'Common\Companies', ['middleware' => ['dropzone']]); Route::get('dashboards/{dashboard}/switch', 'Common\Dashboards@switch')->name('dashboards.switch'); Route::get('dashboards/{dashboard}/enable', 'Common\Dashboards@enable')->name('dashboards.enable'); @@ -37,7 +37,7 @@ Route::group(['prefix' => 'common'], function () { Route::get('items/export', 'Common\Items@export')->name('items.export'); Route::get('items/{item}/enable', 'Common\Items@enable')->name('items.enable'); Route::get('items/{item}/disable', 'Common\Items@disable')->name('items.disable'); - Route::resource('items', 'Common\Items', ['middleware' => ['money']]); + Route::resource('items', 'Common\Items', ['middleware' => ['money', 'dropzone']]); Route::resource('search', 'Common\Search'); @@ -61,7 +61,7 @@ Route::group(['prefix' => 'auth'], function () { Route::get('users/{user}/read-invoices', 'Auth\Users@readOverdueInvoices')->name('users.read.invoices'); Route::get('users/{user}/enable', 'Auth\Users@enable')->name('users.enable'); Route::get('users/{user}/disable', 'Auth\Users@disable')->name('users.disable'); - Route::resource('users', 'Auth\Users'); + Route::resource('users', 'Auth\Users', ['middleware' => ['dropzone']]); Route::resource('roles', 'Auth\Roles'); @@ -79,12 +79,12 @@ Route::group(['prefix' => 'sales'], function () { Route::get('invoices/addItem', 'Sales\Invoices@addItem')->middleware(['money'])->name('invoice.add.item'); Route::post('invoices/import', 'Sales\Invoices@import')->name('invoices.import'); Route::get('invoices/export', 'Sales\Invoices@export')->name('invoices.export'); - Route::resource('invoices', 'Sales\Invoices', ['middleware' => ['date.format', 'money']]); + Route::resource('invoices', 'Sales\Invoices', ['middleware' => ['date.format', 'money', 'dropzone']]); Route::get('revenues/{revenue}/duplicate', 'Sales\Revenues@duplicate')->name('revenues.duplicate'); Route::post('revenues/import', 'Sales\Revenues@import')->name('revenues.import'); Route::get('revenues/export', 'Sales\Revenues@export')->name('revenues.export'); - Route::resource('revenues', 'Sales\Revenues', ['middleware' => ['date.format', 'money']]); + Route::resource('revenues', 'Sales\Revenues', ['middleware' => ['date.format', 'money', 'dropzone']]); Route::get('customers/currency', 'Sales\Customers@currency'); Route::get('customers/{customer}/duplicate', 'Sales\Customers@duplicate')->name('customers.duplicate'); @@ -107,12 +107,12 @@ Route::group(['prefix' => 'purchases'], function () { Route::get('bills/addItem', 'Purchases\Bills@addItem')->middleware(['money'])->name('bill.add.item'); Route::post('bills/import', 'Purchases\Bills@import')->name('bills.import'); Route::get('bills/export', 'Purchases\Bills@export')->name('bills.export'); - Route::resource('bills', 'Purchases\Bills', ['middleware' => ['date.format', 'money']]); + Route::resource('bills', 'Purchases\Bills', ['middleware' => ['date.format', 'money', 'dropzone']]); Route::get('payments/{payment}/duplicate', 'Purchases\Payments@duplicate')->name('payments.duplicate'); Route::post('payments/import', 'Purchases\Payments@import')->name('payments.import'); Route::get('payments/export', 'Purchases\Payments@export')->name('payments.export'); - Route::resource('payments', 'Purchases\Payments', ['middleware' => ['date.format', 'money']]); + Route::resource('payments', 'Purchases\Payments', ['middleware' => ['date.format', 'money', 'dropzone']]); Route::get('vendors/currency', 'Purchases\Vendors@currency'); Route::get('vendors/{vendor}/duplicate', 'Purchases\Vendors@duplicate')->name('vendors.duplicate'); @@ -121,7 +121,7 @@ Route::group(['prefix' => 'purchases'], function () { Route::get('vendors/{vendor}/enable', 'Purchases\Vendors@enable')->name('vendors.enable'); Route::get('vendors/{vendor}/currency', 'Purchases\Vendors@currency')->name('vendors.currency'); Route::get('vendors/{vendor}/disable', 'Purchases\Vendors@disable')->name('vendors.disable'); - Route::resource('vendors', 'Purchases\Vendors'); + Route::resource('vendors', 'Purchases\Vendors', ['middleware' => ['dropzone']]); }); Route::group(['prefix' => 'banking'], function () { @@ -162,7 +162,7 @@ Route::group(['prefix' => 'settings'], function () { Route::group(['as' => 'settings.'], function () { Route::get('settings', 'Settings\Settings@index')->name('index'); Route::patch('settings', 'Settings\Settings@update')->name('update'); - Route::get('company', 'Settings\Company@edit')->name('company.edit'); + Route::get('company', 'Settings\Company@edit')->middleware('dropzone')->name('company.edit'); Route::get('localisation', 'Settings\Localisation@edit')->name('localisation.edit'); Route::get('invoice', 'Settings\Invoice@edit')->name('invoice.edit'); Route::get('default', 'Settings\Defaults@edit')->name('default.edit'); @@ -174,7 +174,7 @@ Route::group(['prefix' => 'settings'], function () { Route::group(['as' => 'settings.'], function () { Route::get('{alias}/settings', 'Settings\Modules@edit')->name('module.edit'); - Route::patch('{alias}/settings', 'Settings\Modules@update')->name('module.update'); + Route::patch('{alias}/settings', 'Settings\Modules@update')->middleware('dropzone')->name('module.update'); }); Route::group(['as' => 'apps.', 'prefix' => 'apps'], function () { @@ -232,6 +232,6 @@ Route::group(['as' => 'modals.', 'prefix' => 'modals'], function () { Route::patch('invoice-templates', 'Modals\InvoiceTemplates@update')->name('invoice-templates.update'); Route::get('documents/item-columns/edit', 'Modals\DocumentItemColumns@edit')->name('documents.item-columns.edit'); Route::patch('documents/item-columns', 'Modals\DocumentItemColumns@update')->name('documents.item-columns.update'); - Route::resource('documents/{document}/transactions', 'Modals\DocumentTransactions', ['names' => 'documents.document.transactions', 'middleware' => ['date.format', 'money']]); + Route::resource('documents/{document}/transactions', 'Modals\DocumentTransactions', ['names' => 'documents.document.transactions', 'middleware' => ['date.format', 'money', 'dropzone']]); Route::resource('taxes', 'Modals\Taxes'); }); diff --git a/routes/portal.php b/routes/portal.php index 968f71144..856ee4ff3 100644 --- a/routes/portal.php +++ b/routes/portal.php @@ -20,7 +20,7 @@ Route::group(['as' => 'portal.'], function () { Route::resource('payments', 'Portal\Payments'); Route::get('profile/read-invoices', 'Portal\Profile@readOverdueInvoices')->name('invoices.read'); - Route::resource('profile', 'Portal\Profile'); + Route::resource('profile', 'Portal\Profile', ['middleware' => ['dropzone']]); Route::get('logout', 'Auth\Login@destroy')->name('logout'); }); From 55ef9559eb581be68cc9097ce8d1f6142825740b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 10 Feb 2021 12:07:33 +0300 Subject: [PATCH 22/60] File group changes.. --- .../assets/js/components/AkauntingDropzoneFileUpload.vue | 1 + resources/assets/js/plugins/form.js | 6 +++++- resources/views/partials/form/file_group.blade.php | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue index a756602f1..dff2f1677 100644 --- a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue +++ b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue @@ -195,6 +195,7 @@ export default { size: attachment.size, type: attachment.type, download: attachment.downloadPath, + dropzone: 'edit', }; dropzone.emit("addedfile", mockFile); diff --git a/resources/assets/js/plugins/form.js b/resources/assets/js/plugins/form.js index aac79e8a6..fe839c8a9 100644 --- a/resources/assets/js/plugins/form.js +++ b/resources/assets/js/plugins/form.js @@ -347,7 +347,11 @@ export default class Form { submit() { FormData.prototype.appendRecursive = function(data, wrapper = null) { - for(var name in data) { + for (var name in data) { + if (name == "previewElement" || name == "previewTemplate") { + continue; + } + if (wrapper) { if ((typeof data[name] == 'object' || Array.isArray(data[name])) && ((data[name] instanceof File != true ) && (data[name] instanceof Blob != true))) { this.appendRecursive(data[name], wrapper + '[' + name + ']'); diff --git a/resources/views/partials/form/file_group.blade.php b/resources/views/partials/form/file_group.blade.php index bea74d73f..1b7158f4d 100644 --- a/resources/views/partials/form/file_group.blade.php +++ b/resources/views/partials/form/file_group.blade.php @@ -57,11 +57,11 @@ @elseif ($value instanceof \Plank\Mediable\Media) @php $attachments[] = [ - 'id' => $attachment->id, + 'id' => $value->id, 'name' => $value->filename . '.' . $value->extension, 'path' => route('uploads.get', $value->id), - 'type' => $attachment->mime_type, - 'size' => $attachment->size, + 'type' => $value->mime_type, + 'size' => $value->size, 'downloadPath' => false, ]; @endphp From eaab52328b380c0adfba157f784bafaf9df9646c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 10 Feb 2021 12:08:16 +0300 Subject: [PATCH 23/60] fixed transaction request.. --- app/Http/Requests/Banking/Transaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Requests/Banking/Transaction.php b/app/Http/Requests/Banking/Transaction.php index dfa4f2f4d..e3b347c8e 100644 --- a/app/Http/Requests/Banking/Transaction.php +++ b/app/Http/Requests/Banking/Transaction.php @@ -41,7 +41,7 @@ class Transaction extends FormRequest 'contact_id' => 'nullable|integer', 'category_id' => 'required|integer', 'payment_method' => 'required|string', - 'attachment' => $attachment, + 'attachment.*' => $attachment, ]; } From d82c25108504f02b058dcb25d8dbc435f2adda46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 10 Feb 2021 12:08:39 +0300 Subject: [PATCH 24/60] change media delete format.. --- app/Jobs/Banking/UpdateTransaction.php | 4 ++-- app/Jobs/Document/UpdateDocument.php | 4 ++-- app/Traits/Uploads.php | 33 +++++++++++++++++++++++++- 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/app/Jobs/Banking/UpdateTransaction.php b/app/Jobs/Banking/UpdateTransaction.php index 0d95bf6b1..ea5733ce1 100644 --- a/app/Jobs/Banking/UpdateTransaction.php +++ b/app/Jobs/Banking/UpdateTransaction.php @@ -37,7 +37,7 @@ class UpdateTransaction extends Job // Upload attachment if ($this->request->file('attachment')) { - $this->transaction->delete_attachment(); + $this->deleteMediaModel($this->transaction, 'attachment', $this->request); foreach ($this->request->file('attachment') as $attachment) { $media = $this->getMedia($attachment, 'transactions'); @@ -45,7 +45,7 @@ class UpdateTransaction extends Job $this->transaction->attachMedia($media, 'attachment'); } } elseif (!$this->request->file('attachment') && $this->transaction->attachment) { - $this->transaction->delete_attachment(); + $this->deleteMediaModel($this->transaction, 'attachment', $this->request); } // Recurring diff --git a/app/Jobs/Document/UpdateDocument.php b/app/Jobs/Document/UpdateDocument.php index 2d91a48d6..7edff00f9 100644 --- a/app/Jobs/Document/UpdateDocument.php +++ b/app/Jobs/Document/UpdateDocument.php @@ -46,7 +46,7 @@ class UpdateDocument extends Job \DB::transaction(function () { // Upload attachment if ($this->request->file('attachment')) { - $this->document->delete_attachment(); + $this->deleteMediaModel($this->document, 'attachment', $this->request); foreach ($this->request->file('attachment') as $attachment) { $media = $this->getMedia($attachment, Str::plural($this->document->type)); @@ -54,7 +54,7 @@ class UpdateDocument extends Job $this->document->attachMedia($media, 'attachment'); } } elseif (!$this->request->file('attachment') && $this->document->attachment) { - $this->document->delete_attachment(); + $this->deleteMediaModel($this->document, 'attachment', $this->request); } $this->deleteRelationships($this->document, ['items', 'item_taxes', 'totals']); diff --git a/app/Traits/Uploads.php b/app/Traits/Uploads.php index 18f219e0d..1576ab5d1 100644 --- a/app/Traits/Uploads.php +++ b/app/Traits/Uploads.php @@ -3,10 +3,10 @@ namespace App\Traits; use MediaUploader; +use App\Models\Common\Media as MediaModel; trait Uploads { - public function getUploadedFilePath($file, $folder = 'settings', $company_id = null) { $path = ''; @@ -63,4 +63,35 @@ trait Uploads return MediaUploader::importPath($disk, $path); } + + public function deleteMediaModel($model, $parameter, $request = null) + { + $medias = $model->$parameter; + + if (!$medias) { + return; + } + + $already_uploaded = []; + + if ($request && isset($request['uploaded_' . $parameter])) { + $uploaded = $request['uploaded_' . $parameter]; + + if (count($medias) == count($uploaded)) { + return; + } + + foreach ($uploaded as $old_media) { + $already_uploaded[] = $old_media['id']; + } + } + + foreach ((array)$medias as $media) { + if (in_array($media->id, $already_uploaded)) { + continue; + } + + MediaModel::where('id', $media->id)->delete(); + } + } } From 5adc60b68858626400443ede0107e4336256c192 Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Wed, 10 Feb 2021 16:29:33 +0300 Subject: [PATCH 25/60] code refactoring for recent works related to dropzone --- app/Http/Middleware/Dropzone.php | 2 +- .../assets/js/components/AkauntingDropzoneFileUpload.vue | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/Http/Middleware/Dropzone.php b/app/Http/Middleware/Dropzone.php index 8b0bba235..eeee69e28 100644 --- a/app/Http/Middleware/Dropzone.php +++ b/app/Http/Middleware/Dropzone.php @@ -16,7 +16,7 @@ class Dropzone */ public function handle($request, Closure $next) { - if (($request->method() != 'POST') && ($request->method() != 'PATCH')) { + if (!in_array($request->method(), ['POST', 'PATCH'])) { return $next($request); } diff --git a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue index dff2f1677..5fdba7a46 100644 --- a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue +++ b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue @@ -144,18 +144,16 @@ export default { if (file.type.indexOf("image") == -1) { var ext = file.name.split('.').pop(); - + + file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none"); + if (ext == "pdf") { - file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none"); file.previewElement.querySelector("[data-dz-thumbnail-pdf]").classList.remove("d-none"); } else if ((ext.indexOf("doc") != -1) || (ext.indexOf("docx") != -1)) { - file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none"); file.previewElement.querySelector("[data-dz-thumbnail-word]").classList.remove("d-none"); } else if ((ext.indexOf("xls") != -1) || (ext.indexOf("xlsx") != -1)) { - file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none"); file.previewElement.querySelector("[data-dz-thumbnail-excel]").classList.remove("d-none"); } else { - file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none"); file.previewElement.querySelector("[data-dz-thumbnail-image]").classList.remove("d-none"); } } From 9efca137a0e7c142edec35cbed09aaf0df1323cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 10 Feb 2021 17:06:35 +0300 Subject: [PATCH 26/60] close #1831 Fixed: Unable to select company on New User Step --- config/search-string.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/search-string.php b/config/search-string.php index b0bb646f6..64d4b5819 100644 --- a/config/search-string.php +++ b/config/search-string.php @@ -114,6 +114,7 @@ return [ App\Models\Common\Company::class => [ 'columns' => [ 'domain' => ['searchable' => true], + 'settings.value' => ['searchable' => true], 'enabled' => ['boolean' => true], ], ], From 8cc2aeb9b9449585274032400d9c9fe1176c2a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Wed, 10 Feb 2021 17:38:58 +0300 Subject: [PATCH 27/60] close #1845 Fixed: Wrong price when creating bills --- app/View/Components/SelectItemButton.php | 6 +++--- resources/views/components/documents/form/content.blade.php | 2 ++ resources/views/components/documents/form/main.blade.php | 2 ++ resources/views/purchases/bills/create.blade.php | 2 +- resources/views/purchases/bills/edit.blade.php | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/View/Components/SelectItemButton.php b/app/View/Components/SelectItemButton.php index 9fa8b4e12..ae1008d96 100644 --- a/app/View/Components/SelectItemButton.php +++ b/app/View/Components/SelectItemButton.php @@ -36,7 +36,7 @@ class SelectItemButton extends Component public function render() { $items = Item::enabled()->orderBy('name')->take(setting('default.select_limit'))->get(); - $price_type= $this->getPriceType($this->type, $this->isSale, $this->isPurchase); + $price_type = $this->getPriceType($this->type, $this->isSale, $this->isPurchase); foreach ($items as $item) { $price = $item->{$price_type . '_price'}; @@ -44,7 +44,7 @@ class SelectItemButton extends Component $item->price = $price; } - $price = ($this->isPurchase) ? 'purchase_price' : 'sale_price'; + $price = $price_type . '_price'; return view('components.select-item-button', compact('items', 'price')); } @@ -55,7 +55,7 @@ class SelectItemButton extends Component return 'sale'; } - if (!empty($is_sale)) { + if (!empty($is_purchase)) { return 'purchase'; } diff --git a/resources/views/components/documents/form/content.blade.php b/resources/views/components/documents/form/content.blade.php index cd7d00c79..c58ddcc1b 100644 --- a/resources/views/components/documents/form/content.blade.php +++ b/resources/views/components/documents/form/content.blade.php @@ -65,6 +65,8 @@ hide-discount="{{ $hideDiscount }}" hide-amount="{{ $hideAmount }}" text-amount="{{ $textAmount }}" + is-sale-price="{{ $isSalePrice }}" + is-purchase-price="{{ $isPurchasePrice }}" /> @if (!$hideFooter) diff --git a/resources/views/components/documents/form/main.blade.php b/resources/views/components/documents/form/main.blade.php index 7f84b7371..6c16f296e 100644 --- a/resources/views/components/documents/form/main.blade.php +++ b/resources/views/components/documents/form/main.blade.php @@ -42,6 +42,8 @@ hide-discount="{{ $hideDiscount }}" hide-amount="{{ $hideAmount }}" text-amount="{{ $textAmount }}" + is-sale-price="{{ $isSalePrice }}" + is-purchase-price="{{ $isPurchasePrice }}" /> setting('bill.title', trans_choice('general.bills', 1))])) @section('content') - + @endsection @push('scripts_start') diff --git a/resources/views/purchases/bills/edit.blade.php b/resources/views/purchases/bills/edit.blade.php index d18dff854..75d66f511 100644 --- a/resources/views/purchases/bills/edit.blade.php +++ b/resources/views/purchases/bills/edit.blade.php @@ -3,7 +3,7 @@ @section('title', trans('general.title.edit', ['type' => trans_choice('general.bills', 1)])) @section('content') - + @endsection @push('scripts_start') From 6d47a8c32a9bdc51734800599ecd43b0403e2e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Thu, 11 Feb 2021 01:57:17 +0300 Subject: [PATCH 28/60] fixed #1830 --- app/Http/Controllers/Banking/Transfers.php | 57 +------------------ app/Models/Banking/Transfer.php | 19 ++++++- config/search-string.php | 13 +++++ resources/lang/en-GB/search_string.php | 2 + .../views/banking/transfers/index.blade.php | 17 ++++-- 5 files changed, 45 insertions(+), 63 deletions(-) diff --git a/app/Http/Controllers/Banking/Transfers.php b/app/Http/Controllers/Banking/Transfers.php index 70c6fc812..4f37c97f8 100644 --- a/app/Http/Controllers/Banking/Transfers.php +++ b/app/Http/Controllers/Banking/Transfers.php @@ -25,64 +25,11 @@ class Transfers extends Controller */ public function index() { - $data = []; - - $items = Transfer::with( + $transfers = Transfer::with( 'expense_transaction', 'expense_transaction.account', 'income_transaction', 'income_transaction.account' )->collect(['expense_transaction.paid_at' => 'desc']); - foreach ($items as $item) { - $income_transaction = $item->income_transaction; - $expense_transaction = $item->expense_transaction; - - $name = trans('transfers.messages.delete', [ - 'from' => $expense_transaction->account->name, - 'to' => $income_transaction->account->name, - 'amount' => money($expense_transaction->amount, $expense_transaction->currency_code, true) - ]); - - $data[] = (object) [ - 'id' => $item->id, - 'name' => $name, - 'from_account' => $expense_transaction->account->name, - 'to_account' => $income_transaction->account->name, - 'amount' => $expense_transaction->amount, - 'currency_code' => $expense_transaction->currency_code, - 'paid_at' => $expense_transaction->paid_at, - ]; - } - - $special_key = [ - 'expense_transaction.name' => 'from_account', - 'income_transaction.name' => 'to_account', - ]; - - $request = request(); - - if (isset($request['sort']) && array_key_exists($request['sort'], $special_key)) { - $sort_order = []; - - foreach ($data as $key => $value) { - $sort = $request['sort']; - - if (array_key_exists($request['sort'], $special_key)) { - $sort = $special_key[$request['sort']]; - } - - $sort_order[$key] = $value->{$sort}; - } - - $sort_type = (isset($request['order']) && $request['order'] == 'asc') ? SORT_ASC : SORT_DESC; - - array_multisort($sort_order, $sort_type, $data); - } - - $transfers = $request->expectsJson() ? $data : $this->paginate($data); - - $accounts = collect(Account::enabled()->orderBy('name')->pluck('name', 'id')) - ->prepend(trans('general.all_type', ['type' => trans_choice('general.accounts', 2)]), ''); - - return $this->response('banking.transfers.index', compact('transfers', 'accounts')); + return $this->response('banking.transfers.index', compact('transfers')); } /** diff --git a/app/Models/Banking/Transfer.php b/app/Models/Banking/Transfer.php index 08bdf65a7..0799abc1c 100644 --- a/app/Models/Banking/Transfer.php +++ b/app/Models/Banking/Transfer.php @@ -5,10 +5,11 @@ namespace App\Models\Banking; use App\Abstracts\Model; use App\Traits\Currencies; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Znck\Eloquent\Traits\BelongsToThrough; class Transfer extends Model { - use HasFactory, Currencies; + use BelongsToThrough, Currencies, HasFactory; protected $table = 'transfers'; @@ -33,7 +34,13 @@ class Transfer extends Model public function expense_account() { - return $this->belongsTo('App\Models\Banking\Account', 'expense_transaction.account_id', 'id')->withDefault(['name' => trans('general.na')]); + return $this->belongsToThrough( + 'App\Models\Banking\Account', + 'App\Models\Banking\Transaction', + null, + '', + ['App\Models\Banking\Transaction' => 'expense_transaction_id'] + )->withDefault(['name' => trans('general.na')]); } public function income_transaction() @@ -43,7 +50,13 @@ class Transfer extends Model public function income_account() { - return $this->belongsTo('App\Models\Banking\Account', 'income_transaction.account_id', 'id')->withDefault(['name' => trans('general.na')]); + return $this->belongsToThrough( + 'App\Models\Banking\Account', + 'App\Models\Banking\Transaction', + null, + '', + ['App\Models\Banking\Transaction' => 'income_transaction_id'] + )->withDefault(['name' => trans('general.na')]); } /** diff --git a/config/search-string.php b/config/search-string.php index 64d4b5819..00ff96ba3 100644 --- a/config/search-string.php +++ b/config/search-string.php @@ -111,6 +111,19 @@ return [ ], ], + App\Models\Banking\Transfer::class => [ + 'columns' => [ + 'expense_account' => [ + 'relationship' => true, + 'route' => 'accounts.index', + ], + 'income_account' => [ + 'relationship' => true, + 'route' => 'accounts.index', + ], + ], + ], + App\Models\Common\Company::class => [ 'columns' => [ 'domain' => ['searchable' => true], diff --git a/resources/lang/en-GB/search_string.php b/resources/lang/en-GB/search_string.php index 7346ca3ca..05e9aef86 100644 --- a/resources/lang/en-GB/search_string.php +++ b/resources/lang/en-GB/search_string.php @@ -13,6 +13,8 @@ return [ 'issued_at' => 'Issue Date', 'symbol_first' => 'Symbol Position', 'reconciled' => 'Reconciled', + 'expense_account' => 'From Account', + 'income_account' => 'To Account', ], ]; diff --git a/resources/views/banking/transfers/index.blade.php b/resources/views/banking/transfers/index.blade.php index 6c4a63031..794e085c3 100644 --- a/resources/views/banking/transfers/index.blade.php +++ b/resources/views/banking/transfers/index.blade.php @@ -43,12 +43,19 @@ @foreach($transfers as $item) + @php + $item->name = trans('transfers.messages.delete', [ + 'from' => $item->expense_transaction->account->name, + 'to' => $item->income_transaction->account->name, + 'amount' => money($item->expense_transaction->amount, $item->expense_transaction->currency_code, true) + ]); + @endphp - {{ Form::bulkActionGroup($item->id, $item->from_account) }} - @date($item->paid_at) - {{ $item->from_account }} - {{ $item->to_account }} - @money($item->amount, $item->currency_code, true) + {{ Form::bulkActionGroup($item->id, $item->expense_transaction->account->name) }} + @date($item->expense_transaction->paid_at) + {{ $item->expense_transaction->account->name }} + {{ $item->income_transaction->account->name }} + @money($item->expense_transaction->amount, $item->expense_transaction->currency_code, true) {!! Form::close() !!} @endsection + +@push('scripts_start') + +@endpush diff --git a/webpack.mix.js b/webpack.mix.js index 4d1cf291e..f1081e3cd 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -38,10 +38,11 @@ mix .js('resources/assets/js/views/banking/reconciliations.js', 'public/js/banking') // Common - .js('resources/assets/js/views/common/items.js', 'public/js/common') .js('resources/assets/js/views/common/companies.js', 'public/js/common') .js('resources/assets/js/views/common/dashboards.js', 'public/js/common') .js('resources/assets/js/views/common/documents.js', 'public/js/common') + .js('resources/assets/js/views/common/imports.js', 'public/js/common') + .js('resources/assets/js/views/common/items.js', 'public/js/common') .js('resources/assets/js/views/common/reports.js', 'public/js/common') .js('resources/assets/js/views/common/search.js', 'public/js/common') From e0878c045905040b4ab731784853a2fcb4827ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 11:20:10 +0300 Subject: [PATCH 37/60] fixed TransfersTest import step.. --- tests/Feature/Banking/TransfersTest.php | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/Feature/Banking/TransfersTest.php b/tests/Feature/Banking/TransfersTest.php index 4cf86a02e..27afbc121 100644 --- a/tests/Feature/Banking/TransfersTest.php +++ b/tests/Feature/Banking/TransfersTest.php @@ -81,8 +81,8 @@ class TransfersTest extends FeatureTestCase \Excel::fake(); $this->loginAs() - ->get(route('transfers.export')) - ->assertStatus(200); + ->get(route('transfers.export')) + ->assertStatus(200); \Excel::assertDownloaded( \Str::filename(trans_choice('general.transfers', 2)) . '.xlsx', @@ -101,10 +101,10 @@ class TransfersTest extends FeatureTestCase \Excel::fake(); $this->loginAs() - ->post( - route('bulk-actions.action', ['group' => 'banking', 'type' => 'transfers']), - ['handle' => 'export', 'selected' => [$transfers->random()->id]] - ) + ->post( + route('bulk-actions.action', ['group' => 'banking', 'type' => 'transfers']), + ['handle' => 'export', 'selected' => [$transfers->random()->id]] + ) ->assertStatus(200); \Excel::assertDownloaded( @@ -120,16 +120,16 @@ class TransfersTest extends FeatureTestCase \Excel::fake(); $this->loginAs() - ->post( - route('transfers.import'), - [ - 'import' => UploadedFile::fake()->createWithContent( - 'transfers.xlsx', - File::get(public_path('files/import/transfers.xlsx')) - ), - ] - ) - ->assertStatus(302); + ->post( + route('transfers.import'), + [ + 'import' => UploadedFile::fake()->createWithContent( + 'transfers.xlsx', + File::get(public_path('files/import/transfers.xlsx')) + ), + ] + ) + ->assertStatus(200); \Excel::assertImported('transfers.xlsx'); From 5d41645bbb07a75481bf39f5577e3ac45d2e1c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 11:54:34 +0300 Subject: [PATCH 38/60] added export/ bulk action export and import feature test for items.. --- tests/Feature/Common/ItemsTest.php | 66 ++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/tests/Feature/Common/ItemsTest.php b/tests/Feature/Common/ItemsTest.php index 0f6559199..eb696e0ca 100644 --- a/tests/Feature/Common/ItemsTest.php +++ b/tests/Feature/Common/ItemsTest.php @@ -2,8 +2,11 @@ namespace Tests\Feature\Common; +use App\Exports\Common\Items as Export; use App\Jobs\Common\CreateItem; use App\Models\Common\Item; +use Illuminate\Http\UploadedFile; +use Illuminate\Support\Facades\File; use Tests\Feature\FeatureTestCase; class ItemsTest extends FeatureTestCase @@ -82,6 +85,69 @@ class ItemsTest extends FeatureTestCase $this->assertSoftDeleted('items', $request); } + public function testItShouldExportItems() + { + $count = 5; + Item::factory()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->get(route('items.export')) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.items', 2)) . '.xlsx', + function (Export $export) use ($count) { + // Assert that the correct export is downloaded. + return $export->sheets()['items']->collection()->count() === $count; + } + ); + } + + public function testItShouldExportSelectedItems() + { + $count = 5; + $items = Item::factory()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->post( + route('bulk-actions.action', ['group' => 'common', 'type' => 'items']), + ['handle' => 'export', 'selected' => [$items->random()->id]] + ) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.items', 2)) . '.xlsx', + function (Export $export) { + return $export->sheets()['items']->collection()->count() === 1; + } + ); + } + + public function testItShouldImportItems() + { + \Excel::fake(); + + $this->loginAs() + ->post( + route('items.import'), + [ + 'import' => UploadedFile::fake()->createWithContent( + 'items.xlsx', + File::get(public_path('files/import/items.xlsx')) + ), + ] + ) + ->assertStatus(200); + + \Excel::assertImported('items.xlsx'); + + $this->assertFlashLevel('success'); + } + public function getRequest() { return Item::factory()->enabled()->raw(); From fff6029af3c290936795870116058d07504335a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 12:16:57 +0300 Subject: [PATCH 39/60] added export/ bulk action export and import feature test for bills.. --- tests/Feature/Purchases/BillsTest.php | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/tests/Feature/Purchases/BillsTest.php b/tests/Feature/Purchases/BillsTest.php index b7e3a5e93..10a7866bc 100644 --- a/tests/Feature/Purchases/BillsTest.php +++ b/tests/Feature/Purchases/BillsTest.php @@ -2,8 +2,11 @@ namespace Tests\Feature\Purchases; +use App\Exports\Purchases\Bills as Export; use App\Jobs\Document\CreateDocument; use App\Models\Document\Document; +use Illuminate\Http\UploadedFile; +use Illuminate\Support\Facades\File; use Tests\Feature\FeatureTestCase; class BillsTest extends FeatureTestCase @@ -104,6 +107,69 @@ class BillsTest extends FeatureTestCase ]); } + public function testItShouldExportBills() + { + $count = 5; + Document::factory()->bill()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->get(route('bills.export')) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.bills', 2)) . '.xlsx', + function (Export $export) use ($count) { + // Assert that the correct export is downloaded. + return $export->sheets()['bills']->collection()->count() === $count; + } + ); + } + + public function testItShouldExportSelectedBills() + { + $count = 5; + $bills = Document::factory()->bill()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->post( + route('bulk-actions.action', ['group' => 'purchases', 'type' => 'bills']), + ['handle' => 'export', 'selected' => [$bills->random()->id]] + ) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.bills', 2)) . '.xlsx', + function (Export $export) { + return $export->sheets()['bills']->collection()->count() === 1; + } + ); + } + + public function testItShouldImportBills() + { + \Excel::fake(); + + $this->loginAs() + ->post( + route('bills.import'), + [ + 'import' => UploadedFile::fake()->createWithContent( + 'bills.xlsx', + File::get(public_path('files/import/bills.xlsx')) + ), + ] + ) + ->assertStatus(200); + + \Excel::assertImported('bills.xlsx'); + + $this->assertFlashLevel('success'); + } + public function getRequest($recurring = false) { $factory = Document::factory(); From d7bd69eb5f2c2606add962eec97c74357b6f122d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 12:25:03 +0300 Subject: [PATCH 40/60] added export/ bulk action export and import feature test for payments.. --- tests/Feature/Purchases/PaymentsTest.php | 66 ++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/tests/Feature/Purchases/PaymentsTest.php b/tests/Feature/Purchases/PaymentsTest.php index 8cc680296..11a6ea6ab 100644 --- a/tests/Feature/Purchases/PaymentsTest.php +++ b/tests/Feature/Purchases/PaymentsTest.php @@ -2,8 +2,11 @@ namespace Tests\Feature\Purchases; +use App\Exports\Purchases\Payments as Export; use App\Jobs\Banking\CreateTransaction; use App\Models\Banking\Transaction; +use Illuminate\Http\UploadedFile; +use Illuminate\Support\Facades\File; use Tests\Feature\FeatureTestCase; class PaymentsTest extends FeatureTestCase @@ -82,6 +85,69 @@ class PaymentsTest extends FeatureTestCase $this->assertSoftDeleted('transactions', $request); } + public function testItShouldExportPayments() + { + $count = 5; + Transaction::factory()->expense()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->get(route('payments.export')) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.payments', 2)) . '.xlsx', + function (Export $export) use ($count) { + // Assert that the correct export is downloaded. + return $export->collection()->count() === $count; + } + ); + } + + public function testItShouldExportSelectedPayments() + { + $count = 5; + $payments = Transaction::factory()->expense()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->post( + route('bulk-actions.action', ['group' => 'purchases', 'type' => 'payments']), + ['handle' => 'export', 'selected' => [$payments->random()->id]] + ) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.payments', 2)) . '.xlsx', + function (Export $export) { + return $export->collection()->count() === 1; + } + ); + } + + public function testItShouldImportPayments() + { + \Excel::fake(); + + $this->loginAs() + ->post( + route('payments.import'), + [ + 'import' => UploadedFile::fake()->createWithContent( + 'payments.xlsx', + File::get(public_path('files/import/payments.xlsx')) + ), + ] + ) + ->assertStatus(200); + + \Excel::assertImported('payments.xlsx'); + + $this->assertFlashLevel('success'); + } + public function getRequest() { return Transaction::factory()->expense()->raw(); From f804e19524f0b92a0a238af840fa598c05b1f4bc Mon Sep 17 00:00:00 2001 From: Crowdin Bot Date: Fri, 12 Feb 2021 09:25:12 +0000 Subject: [PATCH 41/60] new crowdin translations --- resources/lang/az-AZ/search_string.php | 2 ++ resources/lang/bs-BA/items.php | 5 +++-- resources/lang/bs-BA/search_string.php | 2 ++ resources/lang/bs-BA/settings.php | 13 +++++++------ resources/lang/ca-ES/search_string.php | 2 ++ resources/lang/da-DK/items.php | 5 +++-- resources/lang/da-DK/reconciliations.php | 2 +- resources/lang/da-DK/search_string.php | 2 ++ resources/lang/da-DK/settings.php | 13 +++++++------ resources/lang/de-DE/items.php | 5 +++-- resources/lang/de-DE/search_string.php | 2 ++ resources/lang/de-DE/settings.php | 13 +++++++------ resources/lang/en-AU/items.php | 5 +++-- resources/lang/en-AU/search_string.php | 2 ++ resources/lang/en-AU/settings.php | 13 +++++++------ resources/lang/it-IT/general.php | 3 +++ resources/lang/it-IT/items.php | 5 +++-- resources/lang/it-IT/search_string.php | 5 +++++ resources/lang/it-IT/settings.php | 13 +++++++------ resources/lang/ne-NP/items.php | 5 +++-- resources/lang/ne-NP/settings.php | 13 +++++++------ resources/lang/sk-SK/auth.php | 6 ++++-- resources/lang/sk-SK/search_string.php | 20 ++++++++++++++++++++ resources/lang/sq-AL/search_string.php | 2 ++ resources/lang/tr-TR/search_string.php | 2 ++ resources/lang/zh-CN/bills.php | 19 +++---------------- 26 files changed, 112 insertions(+), 67 deletions(-) create mode 100644 resources/lang/sk-SK/search_string.php diff --git a/resources/lang/az-AZ/search_string.php b/resources/lang/az-AZ/search_string.php index 4fd3834b1..bdf382b82 100644 --- a/resources/lang/az-AZ/search_string.php +++ b/resources/lang/az-AZ/search_string.php @@ -13,6 +13,8 @@ return [ 'issued_at' => 'Əməliyyat Tarixi', 'symbol_first' => 'İşarə Yeri', 'reconciled' => 'Razılaşdırıldı', + 'expense_account' => 'Göndərən Hesab', + 'income_account' => 'Qəbul Edən Hesab', ], ]; diff --git a/resources/lang/bs-BA/items.php b/resources/lang/bs-BA/items.php index 122db90d3..d114daef7 100644 --- a/resources/lang/bs-BA/items.php +++ b/resources/lang/bs-BA/items.php @@ -2,7 +2,8 @@ return [ - 'sales_price' => 'Prodajna cijena', - 'purchase_price' => 'Kupovna cijena', + 'sales_price' => 'Prodajna cijena', + 'purchase_price' => 'Kupovna cijena', + 'enter_item_description' => 'Unesite opis stavke', ]; diff --git a/resources/lang/bs-BA/search_string.php b/resources/lang/bs-BA/search_string.php index 7b27e8220..69c61aa49 100644 --- a/resources/lang/bs-BA/search_string.php +++ b/resources/lang/bs-BA/search_string.php @@ -13,6 +13,8 @@ return [ 'issued_at' => 'Datum dospjeća', 'symbol_first' => 'Položaj simbola', 'reconciled' => 'Usaglašeno', + 'expense_account' => 'Sa računa', + 'income_account' => 'Na račun', ], ]; diff --git a/resources/lang/bs-BA/settings.php b/resources/lang/bs-BA/settings.php index 3d05cd9f5..11e3989ed 100644 --- a/resources/lang/bs-BA/settings.php +++ b/resources/lang/bs-BA/settings.php @@ -3,12 +3,13 @@ return [ 'company' => [ - 'description' => 'Promijenite naziv firme, e-mail, adresu, porezni broj itd', - 'name' => 'Naziv firme', - 'email' => 'E-mail', - 'phone' => 'Telefon', - 'address' => 'Adresa', - 'logo' => 'Logo', + 'description' => 'Promijenite naziv firme, e-mail, adresu, porezni broj itd', + 'name' => 'Naziv firme', + 'email' => 'E-mail', + 'phone' => 'Telefon', + 'address' => 'Adresa', + 'edit_your_business_address' => 'Izmjenite vašu boznis adresu', + 'logo' => 'Logo', ], 'localisation' => [ diff --git a/resources/lang/ca-ES/search_string.php b/resources/lang/ca-ES/search_string.php index b44c3c263..0355e570b 100644 --- a/resources/lang/ca-ES/search_string.php +++ b/resources/lang/ca-ES/search_string.php @@ -13,6 +13,8 @@ return [ 'issued_at' => 'Data de venciment', 'symbol_first' => 'Posició del caràcter', 'reconciled' => 'Concilia', + 'expense_account' => 'Compte origen', + 'income_account' => 'Compte destí', ], ]; diff --git a/resources/lang/da-DK/items.php b/resources/lang/da-DK/items.php index 9f36fb513..7348958b8 100644 --- a/resources/lang/da-DK/items.php +++ b/resources/lang/da-DK/items.php @@ -2,7 +2,8 @@ return [ - 'sales_price' => 'Salgspris', - 'purchase_price' => 'Købspris', + 'sales_price' => 'Salgspris', + 'purchase_price' => 'Købspris', + 'enter_item_description' => 'Indtast varebeskrivelsen', ]; diff --git a/resources/lang/da-DK/reconciliations.php b/resources/lang/da-DK/reconciliations.php index 0ca61e53c..22c3de810 100644 --- a/resources/lang/da-DK/reconciliations.php +++ b/resources/lang/da-DK/reconciliations.php @@ -2,7 +2,7 @@ return [ - 'reconcile' => 'Afstemme', + 'reconcile' => 'Afstem', 'unreconcile' => 'Uafsem', 'reconciled' => 'Afstemt', 'opening_balance' => 'Åbningsbalance', diff --git a/resources/lang/da-DK/search_string.php b/resources/lang/da-DK/search_string.php index 14c471419..2498bf324 100644 --- a/resources/lang/da-DK/search_string.php +++ b/resources/lang/da-DK/search_string.php @@ -13,6 +13,8 @@ return [ 'issued_at' => 'Udstedelsesdato', 'symbol_first' => 'Symbolplacering', 'reconciled' => 'Afstemt', + 'expense_account' => 'Fra konto', + 'income_account' => 'Til konto', ], ]; diff --git a/resources/lang/da-DK/settings.php b/resources/lang/da-DK/settings.php index 57641a0c0..b8e50fa64 100644 --- a/resources/lang/da-DK/settings.php +++ b/resources/lang/da-DK/settings.php @@ -3,12 +3,13 @@ return [ 'company' => [ - 'description' => 'Ændre navn, email, adresse, CVR-nummer mv.', - 'name' => 'Navn', - 'email' => 'E-mail', - 'phone' => 'Telefon', - 'address' => 'Adresse', - 'logo' => 'Logo', + 'description' => 'Ændre navn, email, adresse, CVR-nummer mv.', + 'name' => 'Navn', + 'email' => 'E-mail', + 'phone' => 'Telefon', + 'address' => 'Adresse', + 'edit_your_business_address' => 'Rediger din adresse', + 'logo' => 'Logo', ], 'localisation' => [ diff --git a/resources/lang/de-DE/items.php b/resources/lang/de-DE/items.php index d16b6745d..9fd47b957 100644 --- a/resources/lang/de-DE/items.php +++ b/resources/lang/de-DE/items.php @@ -2,7 +2,8 @@ return [ - 'sales_price' => 'Verkaufspreis', - 'purchase_price' => 'Einkaufspreis', + 'sales_price' => 'Verkaufspreis', + 'purchase_price' => 'Einkaufspreis', + 'enter_item_description' => 'Artikelbeschreibung eingeben', ]; diff --git a/resources/lang/de-DE/search_string.php b/resources/lang/de-DE/search_string.php index 64ee3ca10..147503e52 100644 --- a/resources/lang/de-DE/search_string.php +++ b/resources/lang/de-DE/search_string.php @@ -13,6 +13,8 @@ return [ 'issued_at' => 'Ausstellungsdatum', 'symbol_first' => 'Symbolposition', 'reconciled' => 'Abgeglichen', + 'expense_account' => 'Von Konto', + 'income_account' => 'Auf Konto', ], ]; diff --git a/resources/lang/de-DE/settings.php b/resources/lang/de-DE/settings.php index 6087beaa7..7a32052a3 100644 --- a/resources/lang/de-DE/settings.php +++ b/resources/lang/de-DE/settings.php @@ -3,12 +3,13 @@ return [ 'company' => [ - 'description' => 'Firmenname, E-Mail, Adresse, Steuernummer usw. ändern', - 'name' => 'Name', - 'email' => 'E-Mail', - 'phone' => 'Telefon', - 'address' => 'Adresse', - 'logo' => 'Logo', + 'description' => 'Firmenname, E-Mail, Adresse, Steuernummer usw. ändern', + 'name' => 'Name', + 'email' => 'E-Mail', + 'phone' => 'Telefon', + 'address' => 'Adresse', + 'edit_your_business_address' => 'Geschäftsadresse bearbeiten', + 'logo' => 'Logo', ], 'localisation' => [ diff --git a/resources/lang/en-AU/items.php b/resources/lang/en-AU/items.php index 1ffc7f336..a00c2d803 100644 --- a/resources/lang/en-AU/items.php +++ b/resources/lang/en-AU/items.php @@ -2,7 +2,8 @@ return [ - 'sales_price' => 'Sale Price', - 'purchase_price' => 'Purchase Price', + 'sales_price' => 'Sale Price', + 'purchase_price' => 'Purchase Price', + 'enter_item_description' => 'Enter item description', ]; diff --git a/resources/lang/en-AU/search_string.php b/resources/lang/en-AU/search_string.php index 7346ca3ca..05e9aef86 100644 --- a/resources/lang/en-AU/search_string.php +++ b/resources/lang/en-AU/search_string.php @@ -13,6 +13,8 @@ return [ 'issued_at' => 'Issue Date', 'symbol_first' => 'Symbol Position', 'reconciled' => 'Reconciled', + 'expense_account' => 'From Account', + 'income_account' => 'To Account', ], ]; diff --git a/resources/lang/en-AU/settings.php b/resources/lang/en-AU/settings.php index 820d8e51d..36a5920ed 100644 --- a/resources/lang/en-AU/settings.php +++ b/resources/lang/en-AU/settings.php @@ -3,12 +3,13 @@ return [ 'company' => [ - 'description' => 'Change company name, email, address, tax number etc', - 'name' => 'Name', - 'email' => 'Email', - 'phone' => 'Phone', - 'address' => 'Address', - 'logo' => 'Logo', + 'description' => 'Change company name, email, address, tax number etc', + 'name' => 'Name', + 'email' => 'Email', + 'phone' => 'Phone', + 'address' => 'Address', + 'edit_your_business_address' => 'Edit your business address', + 'logo' => 'Logo', ], 'localisation' => [ diff --git a/resources/lang/it-IT/general.php b/resources/lang/it-IT/general.php index 9a28b557e..34804505f 100644 --- a/resources/lang/it-IT/general.php +++ b/resources/lang/it-IT/general.php @@ -162,6 +162,7 @@ return [ 'amount_due' => 'Importo dovuto', 'card' => [ + 'cards' => 'Carta|Carte', 'name' => 'Nome sulla carta', 'number' => 'Numero della carta', 'expiration_date' => 'Data di scadenza', @@ -191,8 +192,10 @@ return [ 'add_new' => 'Aggiungi nuovo :field', 'edit' => 'Modifica :field', 'contact_edit' => 'Modifica :contact_name :field', + 'drop_file' => 'Trascina i file qui per caricare', 'choose' => 'Scegli :field', 'choose_different' => 'Scegli un campo diverso :field', + 'choose_file' => 'Scegli file', 'no_file_selected' => 'Nessun file selezionato...', ], diff --git a/resources/lang/it-IT/items.php b/resources/lang/it-IT/items.php index ca111f06a..0839ee003 100644 --- a/resources/lang/it-IT/items.php +++ b/resources/lang/it-IT/items.php @@ -2,7 +2,8 @@ return [ - 'sales_price' => 'Prezzo di vendita', - 'purchase_price' => 'Prezzo d\'acquisto', + 'sales_price' => 'Prezzo di vendita', + 'purchase_price' => 'Prezzo d\'acquisto', + 'enter_item_description' => 'Inserisci descrizione articolo', ]; diff --git a/resources/lang/it-IT/search_string.php b/resources/lang/it-IT/search_string.php index a44b560f9..5d90ea28d 100644 --- a/resources/lang/it-IT/search_string.php +++ b/resources/lang/it-IT/search_string.php @@ -10,6 +10,11 @@ return [ 'billed_at' => 'Data fattura di acquisto', 'due_at' => 'Data scadenza', 'invoiced_at' => 'Data fattura', + 'issued_at' => 'Data Emissione', + 'symbol_first' => 'Posizione simbolo', + 'reconciled' => 'Riconciliato', + 'expense_account' => 'Dal conto', + 'income_account' => 'Al Conto', ], ]; diff --git a/resources/lang/it-IT/settings.php b/resources/lang/it-IT/settings.php index 1f1fba95a..831c729ea 100644 --- a/resources/lang/it-IT/settings.php +++ b/resources/lang/it-IT/settings.php @@ -3,12 +3,13 @@ return [ 'company' => [ - 'description' => 'Cambia il nome dell\'azienda, l\'e-mail, il numero di tasse ecc', - 'name' => 'Nome', - 'email' => 'Email', - 'phone' => 'Telefono', - 'address' => 'Indirizzo', - 'logo' => 'Logo', + 'description' => 'Cambia il nome dell\'azienda, l\'e-mail, il numero di tasse ecc', + 'name' => 'Nome', + 'email' => 'Email', + 'phone' => 'Telefono', + 'address' => 'Indirizzo', + 'edit_your_business_address' => 'Modifica il tuo indirizzo business', + 'logo' => 'Logo', ], 'localisation' => [ diff --git a/resources/lang/ne-NP/items.php b/resources/lang/ne-NP/items.php index c1bd2ee64..20674c402 100644 --- a/resources/lang/ne-NP/items.php +++ b/resources/lang/ne-NP/items.php @@ -2,7 +2,8 @@ return [ - 'sales_price' => 'विक्री मुल्य', - 'purchase_price' => 'क्रय मुल्य', + 'sales_price' => 'विक्री मुल्य', + 'purchase_price' => 'क्रय मुल्य', + 'enter_item_description' => 'वस्तु वर्णन प्रविष्ट गर्नुहोस्', ]; diff --git a/resources/lang/ne-NP/settings.php b/resources/lang/ne-NP/settings.php index afceb643c..31839b8c5 100644 --- a/resources/lang/ne-NP/settings.php +++ b/resources/lang/ne-NP/settings.php @@ -3,12 +3,13 @@ return [ 'company' => [ - 'description' => 'कम्पनीको नाम, इमेल, ठेगाना, कर सङ्ख्या आदि परिवर्तन गर्नुहोस्', - 'name' => 'नाम', - 'email' => 'ईमेल', - 'phone' => 'फोन', - 'address' => 'ठेगाना', - 'logo' => 'लोगो', + 'description' => 'कम्पनीको नाम, इमेल, ठेगाना, कर सङ्ख्या आदि परिवर्तन गर्नुहोस्', + 'name' => 'नाम', + 'email' => 'ईमेल', + 'phone' => 'फोन', + 'address' => 'ठेगाना', + 'edit_your_business_address' => 'तपाईंको व्यवसाय ठेगाना सम्पादन गर्नुहोस्', + 'logo' => 'लोगो', ], 'localisation' => [ diff --git a/resources/lang/sk-SK/auth.php b/resources/lang/sk-SK/auth.php index 8690bbc72..f64fb92b7 100644 --- a/resources/lang/sk-SK/auth.php +++ b/resources/lang/sk-SK/auth.php @@ -13,16 +13,18 @@ return [ 'current_email' => 'Aktuálny E-mail', 'reset' => 'Reset', 'never' => 'nikdy', - + 'landing_page' => 'Úvodná stránka', + 'password' => [ 'current' => 'Heslo', 'current_confirm' => 'Potvrdenie hesla', 'new' => 'Nové heslo', 'new_confirm' => 'Potvrdenie hesla', ], - + 'error' => [ 'self_delete' => 'Chyba: Nemožete zmazať tento účet pokiaľ ste prihlásený!', + 'self_disable' => 'Chyba: Nemôžete zakázať samého seba!', 'no_company' => 'Chyba: Žiadna spoločnosť priradené k vášmu kontu. Prosím, kontaktujte správcu systému.', ], diff --git a/resources/lang/sk-SK/search_string.php b/resources/lang/sk-SK/search_string.php new file mode 100644 index 000000000..27d8457ba --- /dev/null +++ b/resources/lang/sk-SK/search_string.php @@ -0,0 +1,20 @@ + [ + 'last_logged_in_at' => 'Posledné prihlásenie', + 'paid_at' => 'Dátum platby', + 'started_at' => 'Dátum začiatku', + 'ended_at' => 'Dátum ukončenia', + 'billed_at' => 'Dátum vystavenia', + 'due_at' => 'Dátum splatnosti', + 'invoiced_at' => 'Dátum fakturácie', + 'issued_at' => 'Dátum vydania', + 'symbol_first' => 'Pozícia symbolu', + 'reconciled' => 'Vyrovanané', + 'expense_account' => 'Z účtu', + 'income_account' => 'Na účet', + ], + +]; diff --git a/resources/lang/sq-AL/search_string.php b/resources/lang/sq-AL/search_string.php index fb9e12b01..b4eb4879a 100644 --- a/resources/lang/sq-AL/search_string.php +++ b/resources/lang/sq-AL/search_string.php @@ -13,6 +13,8 @@ return [ 'issued_at' => 'Data e Lëshimit', 'symbol_first' => 'Pozicioni i Simbolit', 'reconciled' => 'I Pajtuar', + 'expense_account' => 'Nga Llogaria', + 'income_account' => 'Në Llogarinë', ], ]; diff --git a/resources/lang/tr-TR/search_string.php b/resources/lang/tr-TR/search_string.php index 481415f15..354eae39b 100644 --- a/resources/lang/tr-TR/search_string.php +++ b/resources/lang/tr-TR/search_string.php @@ -13,6 +13,8 @@ return [ 'issued_at' => 'İşlem Tarihi', 'symbol_first' => 'Simge Konumu', 'reconciled' => 'Mutabakat Yapıldı', + 'expense_account' => 'Gönderen Hesap', + 'income_account' => 'Alan Hesap', ], ]; diff --git a/resources/lang/zh-CN/bills.php b/resources/lang/zh-CN/bills.php index b8889aef5..611b32dfc 100644 --- a/resources/lang/zh-CN/bills.php +++ b/resources/lang/zh-CN/bills.php @@ -13,7 +13,7 @@ return [ 'price' => '价格', 'sub_total' => '小计', 'discount' => '折扣', - 'item_discount' => 'Line Discount', + 'item_discount' => '行折扣', 'tax_total' => '税率', 'total' => '总计', @@ -29,29 +29,16 @@ return [ 'histories' => '历史记录', 'payments' => '付款方式', 'add_payment' => '新增付款方式', - 'mark_paid' => 'Mark Paid', + 'mark_paid' => '标记为已付款', 'mark_received' => '标记已收到', - 'mark_cancelled' => 'Mark Cancelled', + 'mark_cancelled' => '标记为已取消', 'download_pdf' => '下载 PDF格式', 'send_mail' => '发送邮件', 'create_bill' => '创建帐单', 'receive_bill' => '接收账单', 'make_payment' => '支付', - 'statuses' => [ - 'draft' => '草稿', - 'received' => '已收到', - 'partial' => '部分', - 'paid' => '已付款', - 'overdue' => '已逾期', - 'unpaid' => '未付款', - 'cancelled' => 'Cancelled', - ], - 'messages' => [ - 'marked_received' => 'Bill marked as received!', - 'marked_paid' => 'Bill marked as paid!', - 'marked_cancelled' => 'Bill marked as cancelled!', 'draft' => '这是 草稿 账单, 在收到后将反映在图表上。', 'status' => [ From a94c9dc9c5881520801a20f9422050cf744057b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 12:31:00 +0300 Subject: [PATCH 42/60] added export/ bulk action export and import feature test for vendors.. --- tests/Feature/Purchases/VendorsTest.php | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/tests/Feature/Purchases/VendorsTest.php b/tests/Feature/Purchases/VendorsTest.php index ccb2cdda0..8de9be0ce 100644 --- a/tests/Feature/Purchases/VendorsTest.php +++ b/tests/Feature/Purchases/VendorsTest.php @@ -2,8 +2,11 @@ namespace Tests\Feature\Purchases; +use App\Exports\Common\Contacts as Export; use App\Jobs\Common\CreateContact; use App\Models\Common\Contact; +use Illuminate\Http\UploadedFile; +use Illuminate\Support\Facades\File; use Tests\Feature\FeatureTestCase; class VendorsTest extends FeatureTestCase @@ -96,6 +99,70 @@ class VendorsTest extends FeatureTestCase $this->assertSoftDeleted('contacts', $request); } + public function testItShouldExportVendors() + { + $count = 5; + Contact::factory()->vendor()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->get(route('vendors.export')) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.vendors', 2)) . '.xlsx', + function (Export $export) use ($count) { + // Assert that the correct export is downloaded. + return $export->collection()->count() === $count; + } + ); + } + + public function testItShouldExportSelectedVendors() + { + $count = 5; + $vendors = Contact::factory()->vendor()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->post( + route('bulk-actions.action', ['group' => 'purchases', 'type' => 'vendors']), + ['handle' => 'export', 'selected' => [$vendors->random()->id]] + ) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.vendors', 2)) . '.xlsx', + function (Export $export) { + return $export->collection()->count() === 1; + } + ); + } + + public function testItShouldImportVendors() + { + \Excel::fake(); + + $this->loginAs() + ->post( + route('vendors.import'), + [ + 'import' => UploadedFile::fake()->createWithContent( + 'vendors.xlsx', + File::get(public_path('files/import/vendors.xlsx')) + ), + ] + ) + ->assertStatus(200); + + \Excel::assertImported('vendors.xlsx'); + + $this->assertFlashLevel('success'); + } + + public function getRequest() { return Contact::factory()->vendor()->enabled()->raw(); From eab1ccc60fb065f5ffe0392e3af2075e1bb55e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 13:07:05 +0300 Subject: [PATCH 43/60] fixed vendor test --- tests/Feature/Purchases/VendorsTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Feature/Purchases/VendorsTest.php b/tests/Feature/Purchases/VendorsTest.php index 8de9be0ce..9d1ed8001 100644 --- a/tests/Feature/Purchases/VendorsTest.php +++ b/tests/Feature/Purchases/VendorsTest.php @@ -2,7 +2,7 @@ namespace Tests\Feature\Purchases; -use App\Exports\Common\Contacts as Export; +use App\Exports\Purchases\Vendors as Export; use App\Jobs\Common\CreateContact; use App\Models\Common\Contact; use Illuminate\Http\UploadedFile; From 053fb1a7bae83a956bc0611e7e1267afe2b3b627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 13:09:56 +0300 Subject: [PATCH 44/60] added export/ bulk action export and import feature test for customers.. --- tests/Feature/Sales/CustomersTest.php | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/tests/Feature/Sales/CustomersTest.php b/tests/Feature/Sales/CustomersTest.php index 9e04fcdf2..0c6a908fc 100644 --- a/tests/Feature/Sales/CustomersTest.php +++ b/tests/Feature/Sales/CustomersTest.php @@ -2,9 +2,12 @@ namespace Tests\Feature\Sales; +use App\Exports\Sales\Customers as Export; use App\Jobs\Common\CreateContact; use App\Models\Auth\User; use App\Models\Common\Contact; +use Illuminate\Http\UploadedFile; +use Illuminate\Support\Facades\File; use Tests\Feature\FeatureTestCase; class CustomersTest extends FeatureTestCase @@ -123,6 +126,69 @@ class CustomersTest extends FeatureTestCase return Contact::factory()->customer()->enabled()->raw(); } + public function testItShouldExportCustomers() + { + $count = 5; + Contact::factory()->customer()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->get(route('customers.export')) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.customers', 2)) . '.xlsx', + function (Export $export) use ($count) { + // Assert that the correct export is downloaded. + return $export->collection()->count() === $count; + } + ); + } + + public function testItShouldExportSelectedCustomers() + { + $count = 5; + $customers = Contact::factory()->customer()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->post( + route('bulk-actions.action', ['group' => 'purchases', 'type' => 'customers']), + ['handle' => 'export', 'selected' => [$customers->random()->id]] + ) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.customers', 2)) . '.xlsx', + function (Export $export) { + return $export->collection()->count() === 1; + } + ); + } + + public function testItShouldImportCustomers() + { + \Excel::fake(); + + $this->loginAs() + ->post( + route('customers.import'), + [ + 'import' => UploadedFile::fake()->createWithContent( + 'customers.xlsx', + File::get(public_path('files/import/customers.xlsx')) + ), + ] + ) + ->assertStatus(200); + + \Excel::assertImported('customers.xlsx'); + + $this->assertFlashLevel('success'); + } + public function getRequestWithUser() { $password = $this->faker->password; From 1d5ce19c039e6649af70f2b12857a52c36a2d10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 13:12:32 +0300 Subject: [PATCH 45/60] styling.. --- tests/Feature/Purchases/VendorsTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Feature/Purchases/VendorsTest.php b/tests/Feature/Purchases/VendorsTest.php index 9d1ed8001..f96c57145 100644 --- a/tests/Feature/Purchases/VendorsTest.php +++ b/tests/Feature/Purchases/VendorsTest.php @@ -162,7 +162,6 @@ class VendorsTest extends FeatureTestCase $this->assertFlashLevel('success'); } - public function getRequest() { return Contact::factory()->vendor()->enabled()->raw(); From b626c763601e91cbc630be16762aeef1fa2df59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 13:13:02 +0300 Subject: [PATCH 46/60] added export/ bulk action export and import feature test for invoices.. --- tests/Feature/Sales/CustomersTest.php | 2 +- tests/Feature/Sales/InvoicesTest.php | 66 +++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/tests/Feature/Sales/CustomersTest.php b/tests/Feature/Sales/CustomersTest.php index 0c6a908fc..abb932adf 100644 --- a/tests/Feature/Sales/CustomersTest.php +++ b/tests/Feature/Sales/CustomersTest.php @@ -155,7 +155,7 @@ class CustomersTest extends FeatureTestCase $this->loginAs() ->post( - route('bulk-actions.action', ['group' => 'purchases', 'type' => 'customers']), + route('bulk-actions.action', ['group' => 'sales', 'type' => 'customers']), ['handle' => 'export', 'selected' => [$customers->random()->id]] ) ->assertStatus(200); diff --git a/tests/Feature/Sales/InvoicesTest.php b/tests/Feature/Sales/InvoicesTest.php index e58dd0052..5ead4eaa9 100644 --- a/tests/Feature/Sales/InvoicesTest.php +++ b/tests/Feature/Sales/InvoicesTest.php @@ -2,8 +2,11 @@ namespace Tests\Feature\Sales; +use App\Exports\Sales\Invoices as Export; use App\Jobs\Document\CreateDocument; use App\Models\Document\Document; +use Illuminate\Http\UploadedFile; +use Illuminate\Support\Facades\File; use Tests\Feature\FeatureTestCase; class InvoicesTest extends FeatureTestCase @@ -115,6 +118,69 @@ class InvoicesTest extends FeatureTestCase ]); } + public function testItShouldExportInvoices() + { + $count = 5; + Document::factory()->invoice()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->get(route('invoices.export')) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.invoices', 2)) . '.xlsx', + function (Export $export) use ($count) { + // Assert that the correct export is downloaded. + return $export->sheets()['invoices']->collection()->count() === $count; + } + ); + } + + public function testItShouldExportSelectedInvoices() + { + $count = 5; + $invoices = Document::factory()->invoice()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->post( + route('bulk-actions.action', ['group' => 'sales', 'type' => 'invoices']), + ['handle' => 'export', 'selected' => [$invoices->random()->id]] + ) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.invoices', 2)) . '.xlsx', + function (Export $export) { + return $export->sheets()['invoices']->collection()->count() === 1; + } + ); + } + + public function testItShouldImportInvoices() + { + \Excel::fake(); + + $this->loginAs() + ->post( + route('invoices.import'), + [ + 'import' => UploadedFile::fake()->createWithContent( + 'invoices.xlsx', + File::get(public_path('files/import/invoices.xlsx')) + ), + ] + ) + ->assertStatus(200); + + \Excel::assertImported('invoices.xlsx'); + + $this->assertFlashLevel('success'); + } + public function getRequest($recurring = false) { $factory = Document::factory(); From 95e88e04f8319826f4518c2aab5b63668aaf2ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 13:15:05 +0300 Subject: [PATCH 47/60] added export/ bulk action export and import feature test for revenues.. --- tests/Feature/Sales/RevenuesTest.php | 66 ++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/tests/Feature/Sales/RevenuesTest.php b/tests/Feature/Sales/RevenuesTest.php index 9b5b4a45f..38ebf6766 100644 --- a/tests/Feature/Sales/RevenuesTest.php +++ b/tests/Feature/Sales/RevenuesTest.php @@ -2,8 +2,11 @@ namespace Tests\Feature\Sales; +use App\Exports\Sales\Revenues as Export; use App\Jobs\Banking\CreateTransaction; use App\Models\Banking\Transaction; +use Illuminate\Http\UploadedFile; +use Illuminate\Support\Facades\File; use Tests\Feature\FeatureTestCase; class RevenuesTest extends FeatureTestCase @@ -82,6 +85,69 @@ class RevenuesTest extends FeatureTestCase $this->assertSoftDeleted('transactions', $request); } + public function testItShouldExportRevenues() + { + $count = 5; + Transaction::factory()->income()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->get(route('revenues.export')) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.revenues', 2)) . '.xlsx', + function (Export $export) use ($count) { + // Assert that the correct export is downloaded. + return $export->collection()->count() === $count; + } + ); + } + + public function testItShouldExportSelectedRevenues() + { + $count = 5; + $revenues = Transaction::factory()->income()->count($count)->create(); + + \Excel::fake(); + + $this->loginAs() + ->post( + route('bulk-actions.action', ['group' => 'sales', 'type' => 'revenues']), + ['handle' => 'export', 'selected' => [$revenues->random()->id]] + ) + ->assertStatus(200); + + \Excel::assertDownloaded( + \Str::filename(trans_choice('general.revenues', 2)) . '.xlsx', + function (Export $export) { + return $export->collection()->count() === 1; + } + ); + } + + public function testItShouldImportRevenues() + { + \Excel::fake(); + + $this->loginAs() + ->post( + route('revenues.import'), + [ + 'import' => UploadedFile::fake()->createWithContent( + 'revenues.xlsx', + File::get(public_path('files/import/revenues.xlsx')) + ), + ] + ) + ->assertStatus(200); + + \Excel::assertImported('revenues.xlsx'); + + $this->assertFlashLevel('success'); + } + public function getRequest() { return Transaction::factory()->income()->raw(); From 2c7f25f41fdcc5fd6d9272c186d4f7b1098aa1d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 13:26:10 +0300 Subject: [PATCH 48/60] Document empty page create button added permission control --- .../components/documents/index/content.blade.php | 2 ++ .../components/documents/index/empty-page.blade.php | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/resources/views/components/documents/index/content.blade.php b/resources/views/components/documents/index/content.blade.php index ed3b60e9f..03fe0a42a 100644 --- a/resources/views/components/documents/index/content.blade.php +++ b/resources/views/components/documents/index/content.blade.php @@ -65,5 +65,7 @@ text-empty-page="{{ $textEmptyPage }}" url-docs-path="{{ $urlDocsPath }}" create-route="{{ $createRoute }}" + check-permission-create="{{ $checkPermissionCreate }}" + permission-create="{{ $permissionCreate }}" /> @endif diff --git a/resources/views/components/documents/index/empty-page.blade.php b/resources/views/components/documents/index/empty-page.blade.php index 07da65419..81961f829 100644 --- a/resources/views/components/documents/index/empty-page.blade.php +++ b/resources/views/components/documents/index/empty-page.blade.php @@ -10,9 +10,15 @@ {!! trans($textEmptyPage) !!} {!! trans('general.empty.documentation', ['url' => $urlDocsPath]) !!}

- - {{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }} - + @if ($checkPermissionCreate) + @can($permissionCreate) + @endif + + {{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }} + + @if ($checkPermissionCreate) + @endcan + @endif From 6a216d3f9eda2af106d070cd83799411b5f27326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Fri, 12 Feb 2021 13:28:03 +0300 Subject: [PATCH 49/60] fixed report permissions --- app/Http/Controllers/Common/Reports.php | 11 +++++++++++ resources/views/common/reports/index.blade.php | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Common/Reports.php b/app/Http/Controllers/Common/Reports.php index d846e96a8..b1f711a75 100644 --- a/app/Http/Controllers/Common/Reports.php +++ b/app/Http/Controllers/Common/Reports.php @@ -13,6 +13,17 @@ use Illuminate\Support\Facades\Cache; class Reports extends Controller { + /** + * Instantiate a new controller instance. + */ + public function __construct() + { + // Add CRUD permission check + $this->middleware('permission:create-common-reports')->only('create', 'store', 'duplicate', 'import'); + $this->middleware('permission:read-common-reports')->only('index', 'show', 'export'); + $this->middleware('permission:update-common-reports')->only('edit', 'update', 'enable', 'disable'); + $this->middleware('permission:delete-common-reports')->only('destroy'); + } /** * Display a listing of the resource. * diff --git a/resources/views/common/reports/index.blade.php b/resources/views/common/reports/index.blade.php index 07d96c218..12f46c3a2 100644 --- a/resources/views/common/reports/index.blade.php +++ b/resources/views/common/reports/index.blade.php @@ -19,13 +19,16 @@ @foreach($reports as $report)
+ @canany(['create-common-reports', 'update-common-reports', 'delete-common-reports']) + @endcanany
From 46fdbc5d8a1d7afff843eaad9fa9fe09cc94033b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 13:38:33 +0300 Subject: [PATCH 50/60] fixed styling.. --- tests/Feature/Sales/CustomersTest.php | 172 +++++++++++++------------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/tests/Feature/Sales/CustomersTest.php b/tests/Feature/Sales/CustomersTest.php index abb932adf..56acf0901 100644 --- a/tests/Feature/Sales/CustomersTest.php +++ b/tests/Feature/Sales/CustomersTest.php @@ -12,118 +12,113 @@ use Tests\Feature\FeatureTestCase; class CustomersTest extends FeatureTestCase { - public function testItShouldSeeCustomerListPage() - { - $this->loginAs() - ->get(route('customers.index')) - ->assertStatus(200) - ->assertSeeText(trans_choice('general.customers', 2)); - } + public function testItShouldSeeCustomerListPage() + { + $this->loginAs() + ->get(route('customers.index')) + ->assertStatus(200) + ->assertSeeText(trans_choice('general.customers', 2)); + } - public function testItShouldSeeCustomerCreatePage() - { - $this->loginAs() - ->get(route('customers.create')) - ->assertStatus(200) - ->assertSeeText(trans('general.title.new', ['type' => trans_choice('general.customers', 1)])); - } + public function testItShouldSeeCustomerCreatePage() + { + $this->loginAs() + ->get(route('customers.create')) + ->assertStatus(200) + ->assertSeeText(trans('general.title.new', ['type' => trans_choice('general.customers', 1)])); + } - public function testItShouldCreateCustomer() - { - $request = $this->getRequest(); + public function testItShouldCreateCustomer() + { + $request = $this->getRequest(); - $this->loginAs() - ->post(route('customers.store'), $request) - ->assertStatus(200); + $this->loginAs() + ->post(route('customers.store'), $request) + ->assertStatus(200); - $this->assertFlashLevel('success'); + $this->assertFlashLevel('success'); $this->assertDatabaseHas('contacts', $request); - } + } - public function testItShouldCreateCustomerWithUser() - { + public function testItShouldCreateCustomerWithUser() + { $request = $this->getRequestWithUser(); - $this->loginAs() - ->post(route('customers.store'), $request) - ->assertStatus(200); + $this->loginAs() + ->post(route('customers.store'), $request) + ->assertStatus(200); - $this->assertFlashLevel('success'); + $this->assertFlashLevel('success'); - $user = User::where('email', $request['email'])->first(); + $user = User::where('email', $request['email'])->first(); - $this->assertNotNull($user); - $this->assertEquals($request['email'], $user->email); - } + $this->assertNotNull($user); + $this->assertEquals($request['email'], $user->email); + } - public function testItShouldSeeCustomerDetailPage() - { - $request = $this->getRequest(); + public function testItShouldSeeCustomerDetailPage() + { + $request = $this->getRequest(); - $customer = $this->dispatch(new CreateContact($request)); + $customer = $this->dispatch(new CreateContact($request)); - $this->loginAs() - ->get(route('customers.show', $customer->id)) - ->assertStatus(200) - ->assertSee($customer->email); - } + $this->loginAs() + ->get(route('customers.show', $customer->id)) + ->assertStatus(200) + ->assertSee($customer->email); + } - public function testItShouldSeeCustomerUpdatePage() - { - $request = $this->getRequest(); + public function testItShouldSeeCustomerUpdatePage() + { + $request = $this->getRequest(); - $customer = $this->dispatch(new CreateContact($request)); + $customer = $this->dispatch(new CreateContact($request)); - $this->loginAs() - ->get(route('customers.edit', $customer->id)) - ->assertStatus(200) - ->assertSee($customer->email); - } + $this->loginAs() + ->get(route('customers.edit', $customer->id)) + ->assertStatus(200) + ->assertSee($customer->email); + } - public function testItShouldUpdateCustomer() - { - $request = $this->getRequest(); + public function testItShouldUpdateCustomer() + { + $request = $this->getRequest(); - $customer = $this->dispatch(new CreateContact($request)); + $customer = $this->dispatch(new CreateContact($request)); $request['email'] = $this->faker->safeEmail; - $this->loginAs() - ->patch(route('customers.update', $customer->id), $request) - ->assertStatus(200) - ->assertSee($request['email']); + $this->loginAs() + ->patch(route('customers.update', $customer->id), $request) + ->assertStatus(200) + ->assertSee($request['email']); - $this->assertFlashLevel('success'); + $this->assertFlashLevel('success'); $this->assertDatabaseHas('contacts', $request); - } + } - public function testItShouldDeleteCustomer() - { + public function testItShouldDeleteCustomer() + { $request = $this->getRequest(); - $customer = $this->dispatch(new CreateContact($request)); + $customer = $this->dispatch(new CreateContact($request)); - $this->loginAs() - ->delete(route('customers.destroy', $customer->id)) - ->assertStatus(200); + $this->loginAs() + ->delete(route('customers.destroy', $customer->id)) + ->assertStatus(200); - $this->assertFlashLevel('success'); + $this->assertFlashLevel('success'); $this->assertSoftDeleted('contacts', $request); - } + } - public function testItShouldNotDeleteCustomerIfHasRelations() - { - $this->assertTrue(true); - //TODO : This will write after done invoice and revenues tests. - } - - public function getRequest() + public function testItShouldNotDeleteCustomerIfHasRelations() { - return Contact::factory()->customer()->enabled()->raw(); + $this->assertTrue(true); + //TODO : This will write after done invoice and revenues tests. } public function testItShouldExportCustomers() @@ -189,15 +184,20 @@ class CustomersTest extends FeatureTestCase $this->assertFlashLevel('success'); } - public function getRequestWithUser() - { - $password = $this->faker->password; + public function getRequest() + { + return Contact::factory()->customer()->enabled()->raw(); + } - return $this->getRequest() + [ - 'create_user' => 'true', - 'locale' => 'en-GB', - 'password' => $password, - 'password_confirmation' => $password, - ]; - } + public function getRequestWithUser() + { + $password = $this->faker->password; + + return $this->getRequest() + [ + 'create_user' => 'true', + 'locale' => 'en-GB', + 'password' => $password, + 'password_confirmation' => $password, + ]; + } } From 14aa49dfdbc153e5895e1cb0f95d1890311bfe9f Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Fri, 12 Feb 2021 13:53:27 +0300 Subject: [PATCH 51/60] key variable must be considered if it is defined in search string --- app/View/Components/SearchString.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/View/Components/SearchString.php b/app/View/Components/SearchString.php index d3dfb87a9..a863aa109 100644 --- a/app/View/Components/SearchString.php +++ b/app/View/Components/SearchString.php @@ -80,6 +80,10 @@ class SearchString extends Component protected function getFilterKey($column, $options) { + if (isset($options['key'])) { + $column = $options['key']; + } + if (isset($options['relationship'])) { $column .= '.id'; } From 01742cd054b08a899e05f51bf9b5e51b11a95015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 14:52:18 +0300 Subject: [PATCH 52/60] Add Empty page component.. --- app/View/Components/EmptyPage.php | 125 ++++++++++++++++++ .../views/components/empty-page.blade.php | 24 ++++ 2 files changed, 149 insertions(+) create mode 100644 app/View/Components/EmptyPage.php create mode 100644 resources/views/components/empty-page.blade.php diff --git a/app/View/Components/EmptyPage.php b/app/View/Components/EmptyPage.php new file mode 100644 index 000000000..863f8c3d5 --- /dev/null +++ b/app/View/Components/EmptyPage.php @@ -0,0 +1,125 @@ +page = $page; + $this->imageEmptyPage = $this->getImageEmptyPage($page, $imageEmptyPage); + $this->textEmptyPage = $this->getTextEmptyPage($page, $textEmptyPage); + $this->textPage = $this->getTextPage($page, $textPage); + $this->urlDocsPath = $this->getUrlDocsPath($page, $urlDocsPath); + $this->checkPermissionCreate = $checkPermissionCreate; + $this->permissionCreate = $this->getPermissionCreate($page, $permissionCreate); + $this->routeCreate = $this->getRouteCreate($page, $routeCreate); + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\Contracts\View\View|string + */ + public function render() + { + return view('components.empty-page'); + } + + protected function getImageEmptyPage($page, $imageEmptyPage) + { + if ($imageEmptyPage) { + return $imageEmptyPage; + } + + return 'public/img/empty_pages/' . $page . '.png'; + } + + protected function getTextEmptyPage($page, $textEmptyPage) + { + if ($textEmptyPage) { + return $textEmptyPage; + } + + return 'general.empty.' . $page; + } + + protected function getTextPage($page, $textPage) + { + if ($textPage) { + return $textPage; + } + + return 'general.' . $page; + } + + protected function getUrlDocsPath($page, $urlDocsPath) + { + if ($urlDocsPath) { + return $urlDocsPath; + } + + return 'https://akaunting.com/docs/user-manual/' . $page; + } + + protected function getPermissionCreate($page, $permissionCreate) + { + if ($permissionCreate) { + return $permissionCreate; + } + + $pages = [ + 'items' => 'create-commen-items', + ]; + + if (array_key_exists($page, $pages)) { + $permissionCreate = $pages[$page]; + } + + return $permissionCreate; + } + + protected function getRouteCreate($page, $routeCreate) + { + if ($routeCreate) { + return $routeCreate; + } + + return $page . '.create'; + } +} diff --git a/resources/views/components/empty-page.blade.php b/resources/views/components/empty-page.blade.php new file mode 100644 index 000000000..d02fd9d15 --- /dev/null +++ b/resources/views/components/empty-page.blade.php @@ -0,0 +1,24 @@ + +
+
+
+ @yield('title') +
+ +
+

+ {!! trans($textEmptyPage) !!} {!! trans('general.empty.documentation', ['url' => $urlDocsPath]) !!} +

+ + @if ($checkPermissionCreate) + @can($permissionCreate) + @endif + + {{ trans('general.title.create', ['type' => trans_choice($textPage, 1)]) }} + + @if ($checkPermissionCreate) + @endcan + @endif +
+
+
From baed35a4fddb1b9cb1df4f3e39cfd59b47ca8368 Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Fri, 12 Feb 2021 16:10:03 +0300 Subject: [PATCH 53/60] prefix definition is fixed by converting the use of slug to kebab --- app/View/Components/SearchString.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/View/Components/SearchString.php b/app/View/Components/SearchString.php index a863aa109..86315ee12 100644 --- a/app/View/Components/SearchString.php +++ b/app/View/Components/SearchString.php @@ -108,7 +108,7 @@ class SearchString extends Component if (strpos($this->model, 'Modules') !== false) { $module_class = explode('\\', $this->model); - $prefix = Str::slug($module_class[1], '-') . '::'; + $prefix = Str::kebab($module_class[1]) . '::'; $translation_keys[] = $prefix . 'general.'; $translation_keys[] = $prefix . 'search_string.columns.'; From c17a596c3342ba9f1151635d4e0c3e58b5bfb68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 17:51:46 +0300 Subject: [PATCH 54/60] Empty page change method.. --- app/View/Components/EmptyPage.php | 33 +++++++++++++++---- .../banking/reconciliations/index.blade.php | 2 +- .../views/banking/transfers/index.blade.php | 2 +- resources/views/common/items/index.blade.php | 2 +- .../views/purchases/payments/index.blade.php | 2 +- .../views/purchases/vendors/index.blade.php | 2 +- .../views/sales/customers/index.blade.php | 2 +- .../views/sales/revenues/index.blade.php | 2 +- .../views/settings/taxes/index.blade.php | 2 +- 9 files changed, 35 insertions(+), 14 deletions(-) diff --git a/app/View/Components/EmptyPage.php b/app/View/Components/EmptyPage.php index 863f8c3d5..afd846c04 100644 --- a/app/View/Components/EmptyPage.php +++ b/app/View/Components/EmptyPage.php @@ -11,6 +11,9 @@ class EmptyPage extends Component /** @var string */ public $page; + /** @var string */ + public $group; + /** @var string */ public $imageEmptyPage; @@ -38,16 +41,17 @@ class EmptyPage extends Component * @return void */ public function __construct( - string $page, string $imageEmptyPage = '', string $textEmptyPage = '', string $textPage = '', + string $page, string $group = '', string $imageEmptyPage = '', string $textEmptyPage = '', string $textPage = '', string $urlDocsPath = '', bool $checkPermissionCreate = true, string $permissionCreate = '', string $routeCreate = '' ) { $this->page = $page; + $this->group = $group; $this->imageEmptyPage = $this->getImageEmptyPage($page, $imageEmptyPage); $this->textEmptyPage = $this->getTextEmptyPage($page, $textEmptyPage); $this->textPage = $this->getTextPage($page, $textPage); - $this->urlDocsPath = $this->getUrlDocsPath($page, $urlDocsPath); + $this->urlDocsPath = $this->getUrlDocsPath($page, $group, $urlDocsPath); $this->checkPermissionCreate = $checkPermissionCreate; - $this->permissionCreate = $this->getPermissionCreate($page, $permissionCreate); + $this->permissionCreate = $this->getPermissionCreate($page, $group, $permissionCreate); $this->routeCreate = $this->getRouteCreate($page, $routeCreate); } @@ -88,29 +92,46 @@ class EmptyPage extends Component return 'general.' . $page; } - protected function getUrlDocsPath($page, $urlDocsPath) + protected function getUrlDocsPath($page, $group, $urlDocsPath) { if ($urlDocsPath) { return $urlDocsPath; } + $docs_path = $page; + + if (!empty($group)) { + $docs_path = $group . '/' . $page; + } + return 'https://akaunting.com/docs/user-manual/' . $page; } - protected function getPermissionCreate($page, $permissionCreate) + protected function getPermissionCreate($page, $group, $permissionCreate) { if ($permissionCreate) { return $permissionCreate; } $pages = [ - 'items' => 'create-commen-items', + 'reconciliations' => 'create-banking-reconciliations', + 'transfers' => 'create-banking-transfers', + 'payments' => 'create-purchases-payments', + 'vendors' => 'create-purchases-vendors', + 'customers' => 'create-sales-customers', + 'revenues' => 'create-sales-revenues', + 'taxes' => 'create-settings-taxes', + 'items' => 'create-common-items', ]; if (array_key_exists($page, $pages)) { $permissionCreate = $pages[$page]; } + if (empty($permissionCreate) && !empty($group)) { + $permissionCreate = 'create-' . $group . '-' . $page; + } + return $permissionCreate; } diff --git a/resources/views/banking/reconciliations/index.blade.php b/resources/views/banking/reconciliations/index.blade.php index 237fbaf17..e9e3e494f 100644 --- a/resources/views/banking/reconciliations/index.blade.php +++ b/resources/views/banking/reconciliations/index.blade.php @@ -82,7 +82,7 @@
@else - @include('partials.admin.empty_page', ['page' => 'reconciliations', 'docs_path' => 'banking/reconciliations']) + @endif @endsection diff --git a/resources/views/banking/transfers/index.blade.php b/resources/views/banking/transfers/index.blade.php index 794e085c3..de69651de 100644 --- a/resources/views/banking/transfers/index.blade.php +++ b/resources/views/banking/transfers/index.blade.php @@ -83,7 +83,7 @@
@else - @include('partials.admin.empty_page', ['page' => 'transfers', 'docs_path' => 'banking/transfers']) + @endif @endsection diff --git a/resources/views/common/items/index.blade.php b/resources/views/common/items/index.blade.php index edd35a1ff..52bbe5b4f 100644 --- a/resources/views/common/items/index.blade.php +++ b/resources/views/common/items/index.blade.php @@ -103,7 +103,7 @@ @else - @include('partials.admin.empty_page', ['page' => 'items', 'docs_path' => 'items']) + @endif @endsection diff --git a/resources/views/purchases/payments/index.blade.php b/resources/views/purchases/payments/index.blade.php index f70f89c6b..7d0b2556d 100644 --- a/resources/views/purchases/payments/index.blade.php +++ b/resources/views/purchases/payments/index.blade.php @@ -116,7 +116,7 @@ @else - @include('partials.admin.empty_page', ['page' => 'payments', 'docs_path' => 'purchases/payments']) + @endif @endsection diff --git a/resources/views/purchases/vendors/index.blade.php b/resources/views/purchases/vendors/index.blade.php index c1c57206c..8eb8cdb15 100644 --- a/resources/views/purchases/vendors/index.blade.php +++ b/resources/views/purchases/vendors/index.blade.php @@ -103,7 +103,7 @@ @else - @include('partials.admin.empty_page', ['page' => 'vendors', 'docs_path' => 'purchases/vendors']) + @endif @endsection diff --git a/resources/views/sales/customers/index.blade.php b/resources/views/sales/customers/index.blade.php index ccf02c789..097ef6b45 100644 --- a/resources/views/sales/customers/index.blade.php +++ b/resources/views/sales/customers/index.blade.php @@ -105,7 +105,7 @@ @else - @include('partials.admin.empty_page', ['page' => 'customers', 'docs_path' => 'sales/customers']) + @endif @endsection diff --git a/resources/views/sales/revenues/index.blade.php b/resources/views/sales/revenues/index.blade.php index 264b2af3e..428b99b60 100644 --- a/resources/views/sales/revenues/index.blade.php +++ b/resources/views/sales/revenues/index.blade.php @@ -116,7 +116,7 @@ @else - @include('partials.admin.empty_page', ['page' => 'revenues', 'docs_path' => 'sales/revenues']) + @endif @endsection diff --git a/resources/views/settings/taxes/index.blade.php b/resources/views/settings/taxes/index.blade.php index 13739ec12..bf46b3054 100644 --- a/resources/views/settings/taxes/index.blade.php +++ b/resources/views/settings/taxes/index.blade.php @@ -86,7 +86,7 @@ @else - @include('partials.admin.empty_page', ['page' => 'taxes', 'docs_path' => 'settings/taxes']) + @endif @endsection From 463d89a4e2c024b3d893a02c3c28869f41d3eaa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 18:10:20 +0300 Subject: [PATCH 55/60] customer test fixed export issue.. this issue reason https://github.com/akaunting/akaunting/blob/b5300e416c1e330e4dfa9fa60ff22abc5682c920/database/seeds/TestCompany.php#L76 --- tests/Feature/Sales/CustomersTest.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Feature/Sales/CustomersTest.php b/tests/Feature/Sales/CustomersTest.php index 56acf0901..ddc78c1e6 100644 --- a/tests/Feature/Sales/CustomersTest.php +++ b/tests/Feature/Sales/CustomersTest.php @@ -112,7 +112,6 @@ class CustomersTest extends FeatureTestCase $this->assertFlashLevel('success'); $this->assertSoftDeleted('contacts', $request); - } public function testItShouldNotDeleteCustomerIfHasRelations() @@ -136,7 +135,7 @@ class CustomersTest extends FeatureTestCase \Str::filename(trans_choice('general.customers', 2)) . '.xlsx', function (Export $export) use ($count) { // Assert that the correct export is downloaded. - return $export->collection()->count() === $count; + return $export->collection()->count() === $count + 1; } ); } From 9665d8d695e4e2303d27e9318d048cb5a7310ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 12 Feb 2021 19:26:38 +0300 Subject: [PATCH 56/60] add error notification important feature --- app/Abstracts/BulkAction.php | 6 +++--- app/Abstracts/Http/PaymentController.php | 2 +- app/BulkActions/Auth/Users.php | 4 ++-- app/BulkActions/Banking/Accounts.php | 4 ++-- app/BulkActions/Banking/Transfers.php | 2 +- app/BulkActions/Common/Companies.php | 6 +++--- app/BulkActions/Common/Dashboards.php | 6 +++--- app/BulkActions/Common/Items.php | 2 +- app/BulkActions/Purchases/Bills.php | 2 +- app/BulkActions/Sales/Invoices.php | 2 +- app/BulkActions/Settings/Categories.php | 4 ++-- app/BulkActions/Settings/Currencies.php | 4 ++-- app/BulkActions/Settings/Taxes.php | 4 ++-- app/Exceptions/Handler.php | 2 +- app/Http/Controllers/Auth/Permissions.php | 6 +++--- app/Http/Controllers/Auth/Roles.php | 6 +++--- app/Http/Controllers/Auth/Users.php | 6 +++--- app/Http/Controllers/Banking/Accounts.php | 6 +++--- app/Http/Controllers/Banking/Reconciliations.php | 6 +++--- app/Http/Controllers/Banking/Transactions.php | 2 +- app/Http/Controllers/Banking/Transfers.php | 6 +++--- app/Http/Controllers/Common/BulkActions.php | 2 +- app/Http/Controllers/Common/Companies.php | 6 +++--- app/Http/Controllers/Common/Dashboards.php | 6 +++--- app/Http/Controllers/Common/Items.php | 6 +++--- app/Http/Controllers/Common/Reports.php | 6 +++--- app/Http/Controllers/Common/Uploads.php | 2 +- app/Http/Controllers/Modules/Item.php | 8 ++++---- app/Http/Controllers/Purchases/Bills.php | 8 ++++---- app/Http/Controllers/Purchases/Payments.php | 6 +++--- app/Http/Controllers/Purchases/Vendors.php | 6 +++--- app/Http/Controllers/Sales/Customers.php | 6 +++--- app/Http/Controllers/Sales/Invoices.php | 8 ++++---- app/Http/Controllers/Sales/Revenues.php | 6 +++--- app/Http/Controllers/Settings/Categories.php | 6 +++--- app/Http/Controllers/Settings/Currencies.php | 6 +++--- app/Http/Controllers/Settings/Taxes.php | 6 +++--- app/Http/Controllers/Wizard/Currencies.php | 6 +++--- app/Http/Controllers/Wizard/Taxes.php | 6 +++--- app/Listeners/Auth/Login.php | 2 +- app/Listeners/Document/CreateDocumentTransaction.php | 4 ++-- app/Traits/Omnipay.php | 2 +- modules/OfflinePayments/Http/Controllers/Settings.php | 2 +- 43 files changed, 102 insertions(+), 102 deletions(-) diff --git a/app/Abstracts/BulkAction.php b/app/Abstracts/BulkAction.php index a629d0a35..41c2c1cf2 100644 --- a/app/Abstracts/BulkAction.php +++ b/app/Abstracts/BulkAction.php @@ -134,7 +134,7 @@ abstract class BulkAction try { $this->dispatch(new UpdateContact($contact, request()->merge(['enabled' => 0]))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -147,7 +147,7 @@ abstract class BulkAction try { $this->dispatch(new DeleteContact($contact)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -160,7 +160,7 @@ abstract class BulkAction try { $this->dispatch(new DeleteTransaction($transaction)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/Abstracts/Http/PaymentController.php b/app/Abstracts/Http/PaymentController.php index 7f26bf472..5d4ce543b 100644 --- a/app/Abstracts/Http/PaymentController.php +++ b/app/Abstracts/Http/PaymentController.php @@ -73,7 +73,7 @@ abstract class PaymentController extends BaseController $this->logger->info($this->module->getName() . ':: Invoice: ' . $invoice->id . ' - Cancel Message: ' . $message); - flash($message)->warning(); + flash($message)->warning()->important(); $invoice_url = $this->getInvoiceUrl($invoice); diff --git a/app/BulkActions/Auth/Users.php b/app/BulkActions/Auth/Users.php index 9476e2c98..8f395a06e 100644 --- a/app/BulkActions/Auth/Users.php +++ b/app/BulkActions/Auth/Users.php @@ -37,7 +37,7 @@ class Users extends BulkAction try { $this->dispatch(new UpdateUser($user, $request->merge(['enabled' => 0]))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -50,7 +50,7 @@ class Users extends BulkAction try { $this->dispatch(new DeleteUser($user)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Banking/Accounts.php b/app/BulkActions/Banking/Accounts.php index 96bc53dbf..da36ea671 100644 --- a/app/BulkActions/Banking/Accounts.php +++ b/app/BulkActions/Banking/Accounts.php @@ -37,7 +37,7 @@ class Accounts extends BulkAction try { $this->dispatch(new UpdateAccount($account, $request->merge(['enabled' => 0]))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -50,7 +50,7 @@ class Accounts extends BulkAction try { $this->dispatch(new DeleteAccount($account)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Banking/Transfers.php b/app/BulkActions/Banking/Transfers.php index 23ad1f2a1..2f2f99410 100644 --- a/app/BulkActions/Banking/Transfers.php +++ b/app/BulkActions/Banking/Transfers.php @@ -32,7 +32,7 @@ class Transfers extends BulkAction try { $this->dispatch(new DeleteTransfer($transfer)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Common/Companies.php b/app/BulkActions/Common/Companies.php index d8a848075..f4c120a10 100644 --- a/app/BulkActions/Common/Companies.php +++ b/app/BulkActions/Common/Companies.php @@ -37,7 +37,7 @@ class Companies extends BulkAction try { $this->dispatch(new UpdateCompany($company, $request->merge(['enabled' => 1]), session('company_id'))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -50,7 +50,7 @@ class Companies extends BulkAction try { $this->dispatch(new UpdateCompany($company, $request->merge(['enabled' => 0]), session('company_id'))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -63,7 +63,7 @@ class Companies extends BulkAction try { $this->dispatch(new DeleteCompany($company, session('company_id'))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Common/Dashboards.php b/app/BulkActions/Common/Dashboards.php index 472ba7f79..3967c121b 100644 --- a/app/BulkActions/Common/Dashboards.php +++ b/app/BulkActions/Common/Dashboards.php @@ -37,7 +37,7 @@ class Dashboards extends BulkAction try { $this->dispatch(new UpdateDashboard($dashboard, $request->merge(['enabled' => 1]))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -50,7 +50,7 @@ class Dashboards extends BulkAction try { $this->dispatch(new UpdateDashboard($dashboard, $request->merge(['enabled' => 0]))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -63,7 +63,7 @@ class Dashboards extends BulkAction try { $this->dispatch(new DeleteDashboard($dashboard)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Common/Items.php b/app/BulkActions/Common/Items.php index 815256a5f..2a62296f7 100644 --- a/app/BulkActions/Common/Items.php +++ b/app/BulkActions/Common/Items.php @@ -46,7 +46,7 @@ class Items extends BulkAction try { $this->dispatch(new DeleteItem($item)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Purchases/Bills.php b/app/BulkActions/Purchases/Bills.php index a3fcb206f..b8d3aca1c 100644 --- a/app/BulkActions/Purchases/Bills.php +++ b/app/BulkActions/Purchases/Bills.php @@ -95,7 +95,7 @@ class Bills extends BulkAction try { $this->dispatch(new DeleteDocument($bill)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Sales/Invoices.php b/app/BulkActions/Sales/Invoices.php index 002f69499..9ad8298e6 100644 --- a/app/BulkActions/Sales/Invoices.php +++ b/app/BulkActions/Sales/Invoices.php @@ -99,7 +99,7 @@ class Invoices extends BulkAction try { $this->dispatch(new DeleteDocument($invoice)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Settings/Categories.php b/app/BulkActions/Settings/Categories.php index d9b665f98..3e82cbdf2 100644 --- a/app/BulkActions/Settings/Categories.php +++ b/app/BulkActions/Settings/Categories.php @@ -37,7 +37,7 @@ class Categories extends BulkAction try { $this->dispatch(new UpdateCategory($category, $request->merge(['enabled' => 0]))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -50,7 +50,7 @@ class Categories extends BulkAction try { $this->dispatch(new DeleteCategory($category)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Settings/Currencies.php b/app/BulkActions/Settings/Currencies.php index 581878290..8f0f11913 100644 --- a/app/BulkActions/Settings/Currencies.php +++ b/app/BulkActions/Settings/Currencies.php @@ -37,7 +37,7 @@ class Currencies extends BulkAction try { $this->dispatch(new UpdateCurrency($currency, $request->merge(['enabled' => 0]))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -50,7 +50,7 @@ class Currencies extends BulkAction try { $this->dispatch(new DeleteCurrency($currency)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/BulkActions/Settings/Taxes.php b/app/BulkActions/Settings/Taxes.php index 3d1d7182e..a3f21bf85 100644 --- a/app/BulkActions/Settings/Taxes.php +++ b/app/BulkActions/Settings/Taxes.php @@ -37,7 +37,7 @@ class Taxes extends BulkAction try { $this->dispatch(new UpdateTax($tax, $request->merge(['enabled' => 0]))); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } @@ -50,7 +50,7 @@ class Taxes extends BulkAction try { $this->dispatch(new DeleteTax($tax)); } catch (\Exception $e) { - flash($e->getMessage())->error(); + flash($e->getMessage())->error()->important(); } } } diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 996093a9d..ccabc4437 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -86,7 +86,7 @@ class Handler extends ExceptionHandler return response()->json(['error' => 'Not Found'], 404); } - flash(trans('errors.body.page_not_found'))->error(); + flash(trans('errors.body.page_not_found'))->error()->important(); // normal 404 view page feedback return redirect() diff --git a/app/Http/Controllers/Auth/Permissions.php b/app/Http/Controllers/Auth/Permissions.php index 555435dbb..e5f69f113 100644 --- a/app/Http/Controllers/Auth/Permissions.php +++ b/app/Http/Controllers/Auth/Permissions.php @@ -55,7 +55,7 @@ class Permissions extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -96,7 +96,7 @@ class Permissions extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -122,7 +122,7 @@ class Permissions extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Auth/Roles.php b/app/Http/Controllers/Auth/Roles.php index ab4e042f5..d185caae2 100644 --- a/app/Http/Controllers/Auth/Roles.php +++ b/app/Http/Controllers/Auth/Roles.php @@ -63,7 +63,7 @@ class Roles extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -111,7 +111,7 @@ class Roles extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -137,7 +137,7 @@ class Roles extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Auth/Users.php b/app/Http/Controllers/Auth/Users.php index 770ebc93f..17cdb7ae1 100644 --- a/app/Http/Controllers/Auth/Users.php +++ b/app/Http/Controllers/Auth/Users.php @@ -85,7 +85,7 @@ class Users extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -167,7 +167,7 @@ class Users extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -229,7 +229,7 @@ class Users extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Banking/Accounts.php b/app/Http/Controllers/Banking/Accounts.php index 0683c4e59..bf9eda309 100644 --- a/app/Http/Controllers/Banking/Accounts.php +++ b/app/Http/Controllers/Banking/Accounts.php @@ -70,7 +70,7 @@ class Accounts extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -117,7 +117,7 @@ class Accounts extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -179,7 +179,7 @@ class Accounts extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Banking/Reconciliations.php b/app/Http/Controllers/Banking/Reconciliations.php index ab9ec5f38..f5782e783 100644 --- a/app/Http/Controllers/Banking/Reconciliations.php +++ b/app/Http/Controllers/Banking/Reconciliations.php @@ -85,7 +85,7 @@ class Reconciliations extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -134,7 +134,7 @@ class Reconciliations extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -160,7 +160,7 @@ class Reconciliations extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Banking/Transactions.php b/app/Http/Controllers/Banking/Transactions.php index 3f19b0e12..61a92d008 100644 --- a/app/Http/Controllers/Banking/Transactions.php +++ b/app/Http/Controllers/Banking/Transactions.php @@ -81,7 +81,7 @@ class Transactions extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Banking/Transfers.php b/app/Http/Controllers/Banking/Transfers.php index 32d3f2fe7..0814f9eeb 100644 --- a/app/Http/Controllers/Banking/Transfers.php +++ b/app/Http/Controllers/Banking/Transfers.php @@ -80,7 +80,7 @@ class Transfers extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -165,7 +165,7 @@ class Transfers extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -191,7 +191,7 @@ class Transfers extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Common/BulkActions.php b/app/Http/Controllers/Common/BulkActions.php index ef43531a8..314cc4f49 100644 --- a/app/Http/Controllers/Common/BulkActions.php +++ b/app/Http/Controllers/Common/BulkActions.php @@ -42,7 +42,7 @@ class BulkActions extends Controller } if (isset($bulk_actions->actions[$request->get('handle')]['permission']) && !user()->can($bulk_actions->actions[$request->get('handle')]['permission'])) { - flash(trans('errors.message.403'))->error(); + flash(trans('errors.message.403'))->error()->important(); return response()->json([ 'success' => false, diff --git a/app/Http/Controllers/Common/Companies.php b/app/Http/Controllers/Common/Companies.php index b5cf85efa..b6766947e 100644 --- a/app/Http/Controllers/Common/Companies.php +++ b/app/Http/Controllers/Common/Companies.php @@ -75,7 +75,7 @@ class Companies extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } session(['company_id' => $company_id]); @@ -128,7 +128,7 @@ class Companies extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } session(['company_id' => $company_id]); @@ -194,7 +194,7 @@ class Companies extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Common/Dashboards.php b/app/Http/Controllers/Common/Dashboards.php index 5e8170113..f0d912bcf 100644 --- a/app/Http/Controllers/Common/Dashboards.php +++ b/app/Http/Controllers/Common/Dashboards.php @@ -110,7 +110,7 @@ class Dashboards extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -156,7 +156,7 @@ class Dashboards extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -220,7 +220,7 @@ class Dashboards extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Common/Items.php b/app/Http/Controllers/Common/Items.php index f904b95fd..a836a40ec 100644 --- a/app/Http/Controllers/Common/Items.php +++ b/app/Http/Controllers/Common/Items.php @@ -78,7 +78,7 @@ class Items extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -172,7 +172,7 @@ class Items extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -234,7 +234,7 @@ class Items extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Common/Reports.php b/app/Http/Controllers/Common/Reports.php index b1f711a75..fb8361b01 100644 --- a/app/Http/Controllers/Common/Reports.php +++ b/app/Http/Controllers/Common/Reports.php @@ -112,7 +112,7 @@ class Reports extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -174,7 +174,7 @@ class Reports extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -200,7 +200,7 @@ class Reports extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Common/Uploads.php b/app/Http/Controllers/Common/Uploads.php index f0f897156..7b4871693 100644 --- a/app/Http/Controllers/Common/Uploads.php +++ b/app/Http/Controllers/Common/Uploads.php @@ -142,7 +142,7 @@ class Uploads extends Controller if (!$path = $this->getPath($media)) { $message = trans('messages.warning.deleted', ['name' => $media->basename, 'text' => $media->basename]); - flash($message)->warning(); + flash($message)->warning()->important(); return $return; } diff --git a/app/Http/Controllers/Modules/Item.php b/app/Http/Controllers/Modules/Item.php index 6649a4909..04cc336a3 100644 --- a/app/Http/Controllers/Modules/Item.php +++ b/app/Http/Controllers/Modules/Item.php @@ -259,7 +259,7 @@ class Item extends Controller } catch (\Exception $e) { $message = $e->getMessage(); - flash($message)->error(); + flash($message)->error()->important(); $json = [ 'success' => false, @@ -285,7 +285,7 @@ class Item extends Controller } catch (\Exception $e) { $message = $e->getMessage(); - flash($message)->error(); + flash($message)->error()->important(); } return redirect()->route('apps.app.show', $alias)->send(); @@ -304,7 +304,7 @@ class Item extends Controller } catch (\Exception $e) { $message = $e->getMessage(); - flash($message)->error(); + flash($message)->error()->important(); } return redirect()->route('apps.app.show', $alias)->send(); @@ -323,7 +323,7 @@ class Item extends Controller } catch (\Exception $e) { $message = $e->getMessage(); - flash($message)->error(); + flash($message)->error()->important(); } return redirect()->route('apps.app.show', $alias)->send(); diff --git a/app/Http/Controllers/Purchases/Bills.php b/app/Http/Controllers/Purchases/Bills.php index 16f7d637f..ac7606e2b 100644 --- a/app/Http/Controllers/Purchases/Bills.php +++ b/app/Http/Controllers/Purchases/Bills.php @@ -95,7 +95,7 @@ class Bills extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -182,7 +182,7 @@ class Bills extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -208,7 +208,7 @@ class Bills extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -318,7 +318,7 @@ class Bills extends Controller } catch(\Exception $e) { $message = $e->getMessage(); - flash($message)->error(); + flash($message)->error()->important(); } return redirect()->back(); diff --git a/app/Http/Controllers/Purchases/Payments.php b/app/Http/Controllers/Purchases/Payments.php index 7a53c6415..bf8b1851f 100644 --- a/app/Http/Controllers/Purchases/Payments.php +++ b/app/Http/Controllers/Purchases/Payments.php @@ -101,7 +101,7 @@ class Payments extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -220,7 +220,7 @@ class Payments extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -246,7 +246,7 @@ class Payments extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Purchases/Vendors.php b/app/Http/Controllers/Purchases/Vendors.php index b5bf6d05a..275ea79cd 100644 --- a/app/Http/Controllers/Purchases/Vendors.php +++ b/app/Http/Controllers/Purchases/Vendors.php @@ -128,7 +128,7 @@ class Vendors extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -217,7 +217,7 @@ class Vendors extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -279,7 +279,7 @@ class Vendors extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Sales/Customers.php b/app/Http/Controllers/Sales/Customers.php index ddcd21f16..d2a02b9ba 100644 --- a/app/Http/Controllers/Sales/Customers.php +++ b/app/Http/Controllers/Sales/Customers.php @@ -126,7 +126,7 @@ class Customers extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -215,7 +215,7 @@ class Customers extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -277,7 +277,7 @@ class Customers extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Sales/Invoices.php b/app/Http/Controllers/Sales/Invoices.php index 42f00c106..0bf72a264 100644 --- a/app/Http/Controllers/Sales/Invoices.php +++ b/app/Http/Controllers/Sales/Invoices.php @@ -94,7 +94,7 @@ class Invoices extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -181,7 +181,7 @@ class Invoices extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -207,7 +207,7 @@ class Invoices extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -367,7 +367,7 @@ class Invoices extends Controller } catch(\Exception $e) { $message = $e->getMessage(); - flash($message)->error(); + flash($message)->error()->important(); } return redirect()->back(); diff --git a/app/Http/Controllers/Sales/Revenues.php b/app/Http/Controllers/Sales/Revenues.php index 43a3a3de2..b1f7b73cd 100644 --- a/app/Http/Controllers/Sales/Revenues.php +++ b/app/Http/Controllers/Sales/Revenues.php @@ -101,7 +101,7 @@ class Revenues extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -220,7 +220,7 @@ class Revenues extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -246,7 +246,7 @@ class Revenues extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Settings/Categories.php b/app/Http/Controllers/Settings/Categories.php index b37a1132c..a0222b540 100644 --- a/app/Http/Controllers/Settings/Categories.php +++ b/app/Http/Controllers/Settings/Categories.php @@ -82,7 +82,7 @@ class Categories extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -132,7 +132,7 @@ class Categories extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -194,7 +194,7 @@ class Categories extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Settings/Currencies.php b/app/Http/Controllers/Settings/Currencies.php index cddc3a682..09be6ab8b 100644 --- a/app/Http/Controllers/Settings/Currencies.php +++ b/app/Http/Controllers/Settings/Currencies.php @@ -90,7 +90,7 @@ class Currencies extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -158,7 +158,7 @@ class Currencies extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -220,7 +220,7 @@ class Currencies extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Settings/Taxes.php b/app/Http/Controllers/Settings/Taxes.php index f466371c9..57d1332d4 100644 --- a/app/Http/Controllers/Settings/Taxes.php +++ b/app/Http/Controllers/Settings/Taxes.php @@ -88,7 +88,7 @@ class Taxes extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -143,7 +143,7 @@ class Taxes extends Controller $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -205,7 +205,7 @@ class Taxes extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Wizard/Currencies.php b/app/Http/Controllers/Wizard/Currencies.php index 38c8015fb..16fa0bbeb 100644 --- a/app/Http/Controllers/Wizard/Currencies.php +++ b/app/Http/Controllers/Wizard/Currencies.php @@ -68,7 +68,7 @@ class Currencies extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -95,7 +95,7 @@ class Currencies extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -121,7 +121,7 @@ class Currencies extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Http/Controllers/Wizard/Taxes.php b/app/Http/Controllers/Wizard/Taxes.php index 64fa6dc2e..5ba794d2e 100644 --- a/app/Http/Controllers/Wizard/Taxes.php +++ b/app/Http/Controllers/Wizard/Taxes.php @@ -55,7 +55,7 @@ class Taxes extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -82,7 +82,7 @@ class Taxes extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); @@ -108,7 +108,7 @@ class Taxes extends Controller } else { $message = $response['message']; - flash($message)->error(); + flash($message)->error()->important(); } return response()->json($response); diff --git a/app/Listeners/Auth/Login.php b/app/Listeners/Auth/Login.php index 6a6e8769f..99bdfc01a 100644 --- a/app/Listeners/Auth/Login.php +++ b/app/Listeners/Auth/Login.php @@ -22,7 +22,7 @@ class Login if (!$company) { app('App\Http\Controllers\Auth\Login')->logout(); - flash(trans('auth.error.no_company'))->error(); + flash(trans('auth.error.no_company'))->error()->important(); return; } diff --git a/app/Listeners/Document/CreateDocumentTransaction.php b/app/Listeners/Document/CreateDocumentTransaction.php index 300545a9e..7621755cc 100644 --- a/app/Listeners/Document/CreateDocumentTransaction.php +++ b/app/Listeners/Document/CreateDocumentTransaction.php @@ -32,13 +32,13 @@ class CreateDocumentTransaction $type = Str::plural($event->document->type); if (empty($user)) { - flash($message)->error(); + flash($message)->error()->important(); redirect()->route("signed.$type.show", $document->id)->send(); } if ($user->can('read-client-portal')) { - flash($message)->error(); + flash($message)->error()->important(); redirect()->route("portal.$type.show", $document->id)->send(); } diff --git a/app/Traits/Omnipay.php b/app/Traits/Omnipay.php index 4c63a2ff1..ea98037a4 100644 --- a/app/Traits/Omnipay.php +++ b/app/Traits/Omnipay.php @@ -145,7 +145,7 @@ trait Omnipay $invoice_url = $this->getInvoiceUrl($invoice); - flash($message)->error(); + flash($message)->error()->important(); if ($force_redirect) { return redirect($invoice_url); diff --git a/modules/OfflinePayments/Http/Controllers/Settings.php b/modules/OfflinePayments/Http/Controllers/Settings.php index e1d957ad5..148bab50a 100644 --- a/modules/OfflinePayments/Http/Controllers/Settings.php +++ b/modules/OfflinePayments/Http/Controllers/Settings.php @@ -122,7 +122,7 @@ class Settings extends Controller $message = $response['message']; - //flash($message)->error(); + //flash($message)->error()->important(); } return response()->json($response); From 52cf468d7083ddfb1964c79c59e7df9644f6c7be Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Fri, 12 Feb 2021 22:00:46 +0300 Subject: [PATCH 57/60] setting that named as `financial year denote` added to localization part and it will be considered on the preparation of reports --- app/Abstracts/Report.php | 10 +++++++++- app/Http/Controllers/Settings/Localisation.php | 8 +++++++- app/Traits/DateTime.php | 10 ++++++++-- config/setting.php | 1 + resources/lang/en-GB/settings.php | 5 +++++ resources/lang/tr-TR/settings.php | 5 +++++ resources/views/settings/localisation/edit.blade.php | 2 ++ 7 files changed, 37 insertions(+), 4 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index 6a121f0a8..e99744209 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -371,7 +371,15 @@ abstract class Report { switch ($this->getSetting('period')) { case 'yearly': - $i = $date->copy()->format($this->getYearlyDateFormat()); + $financial_year = $this->getFinancialYear($this->year); + + if ($date->greaterThanOrEqualTo($financial_year->getStartDate()) && $date->lessThanOrEqualTo($financial_year->getEndDate())) { + if (setting('localisation.financial_year_denote') == 'begins') { + $i = $financial_year->getStartDate()->copy()->format($this->getYearlyDateFormat()); + } else { + $i = $financial_year->getEndDate()->copy()->format($this->getYearlyDateFormat()); + } + } break; case 'quarterly': diff --git a/app/Http/Controllers/Settings/Localisation.php b/app/Http/Controllers/Settings/Localisation.php index 6f4b1f709..b538d865e 100644 --- a/app/Http/Controllers/Settings/Localisation.php +++ b/app/Http/Controllers/Settings/Localisation.php @@ -41,12 +41,18 @@ class Localisation extends Controller 'both' => trans('settings.localisation.discount_location.both'), ]; + $financial_year_denote_options = [ + 'begins' => trans('settings.localisation.financial_year_denote.begins'), + 'ends' => trans('settings.localisation.financial_year_denote.ends'), + ]; + return view('settings.localisation.edit', compact( 'timezones', 'date_formats', 'date_separators', 'percent_positions', - 'discount_locations' + 'discount_locations', + 'financial_year_denote_options' )); } } diff --git a/app/Traits/DateTime.php b/app/Traits/DateTime.php index 0f3fbe5ea..6bcaa4fe8 100644 --- a/app/Traits/DateTime.php +++ b/app/Traits/DateTime.php @@ -110,14 +110,20 @@ trait DateTime $financial_start = Date::create($year, $month, $day); - // Check if FS is in last calendar year - if ($now->diffInDays($financial_start, false) > 0) { + if (setting('localisation.financial_year_denote') == 'ends' && $financial_start->dayOfYear != 1) { $financial_start->subYear(); } return $financial_start; } + public function getFinancialYear($year = null) + { + $start = $this->getFinancialStart($year); + + return CarbonPeriod::create($start, $start->copy()->addYear()->subDay()); + } + public function getFinancialQuarters($year = null) { $quarters = []; diff --git a/config/setting.php b/config/setting.php index 6e4eb2620..ef2537a45 100644 --- a/config/setting.php +++ b/config/setting.php @@ -103,6 +103,7 @@ return [ 'date_separator' => env('SETTING_FALLBACK_LOCALISATION_DATE_SEPARATOR', 'space'), 'percent_position' => env('SETTING_FALLBACK_LOCALISATION_PERCENT_POSITION', 'after'), 'discount_location' => env('SETTING_FALLBACK_LOCALISATION_DISCOUNT_LOCATION', 'total'), + 'financial_year_denote' => env('SETTING_FALLBACK_LOCALISATION_FINANCIAL_YEAR_DENOTE', 'ends'), ], 'invoice' => [ 'number_prefix' => env('SETTING_FALLBACK_INVOICE_NUMBER_PREFIX', 'INV-'), diff --git a/resources/lang/en-GB/settings.php b/resources/lang/en-GB/settings.php index 36a5920ed..c5bf423e3 100644 --- a/resources/lang/en-GB/settings.php +++ b/resources/lang/en-GB/settings.php @@ -36,6 +36,11 @@ return [ 'total' => 'At total', 'both' => 'Both line and total', ], + 'financial_year_denote' => [ + 'title' => 'Financial Year Denote', + 'begins' => 'By the year it begins', + 'ends' => 'By the year it ends', + ], ], 'invoice' => [ diff --git a/resources/lang/tr-TR/settings.php b/resources/lang/tr-TR/settings.php index 921bf64e5..b2bc9bf44 100644 --- a/resources/lang/tr-TR/settings.php +++ b/resources/lang/tr-TR/settings.php @@ -35,6 +35,11 @@ return [ 'total' => 'Toplamda', 'both' => 'Satırda ve toplamda', ], + 'financial_year_denote' => [ + 'title' => 'Mali Yıl Gösterimi', + 'begins' => 'Başlangıç Yılı', + 'ends' => 'Bitiş Yılı', + ], ], 'invoice' => [ diff --git a/resources/views/settings/localisation/edit.blade.php b/resources/views/settings/localisation/edit.blade.php index 4d825715e..29f588924 100644 --- a/resources/views/settings/localisation/edit.blade.php +++ b/resources/views/settings/localisation/edit.blade.php @@ -20,6 +20,8 @@
{{ Form::dateGroup('financial_start', trans('settings.localisation.financial_start'), 'calendar', ['id' => 'financial_start', 'class' => 'form-control datepicker', 'show-date-format' => 'j F', 'date-format' => 'd-m', 'autocomplete' => 'off'], setting('localisation.financial_start')) }} + {{ Form::selectGroup('financial_year_denote', trans('settings.localisation.financial_year_denote.title'), 'calendar', $financial_year_denote_options, setting('localisation.financial_year_denote'), []) }} + {{ Form::selectGroupGroup('timezone', trans('settings.localisation.timezone'), 'globe', $timezones, setting('localisation.timezone'), []) }} {{ Form::selectGroup('date_format', trans('settings.localisation.date.format'), 'calendar', $date_formats, setting('localisation.date_format'), ['autocomplete' => 'off']) }} From 8cdb9a2a21d1c21f6852e41466f8b8631f8572a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Fri, 12 Feb 2021 23:05:50 +0300 Subject: [PATCH 58/60] formatting #1855 --- app/Abstracts/Report.php | 2 +- app/Http/Controllers/Settings/Localisation.php | 8 ++++---- app/Traits/DateTime.php | 2 +- config/setting.php | 2 +- resources/lang/en-GB/settings.php | 10 +++++----- resources/views/settings/localisation/edit.blade.php | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Abstracts/Report.php b/app/Abstracts/Report.php index e99744209..d8684fb3f 100644 --- a/app/Abstracts/Report.php +++ b/app/Abstracts/Report.php @@ -374,7 +374,7 @@ abstract class Report $financial_year = $this->getFinancialYear($this->year); if ($date->greaterThanOrEqualTo($financial_year->getStartDate()) && $date->lessThanOrEqualTo($financial_year->getEndDate())) { - if (setting('localisation.financial_year_denote') == 'begins') { + if (setting('localisation.financial_denote') == 'begins') { $i = $financial_year->getStartDate()->copy()->format($this->getYearlyDateFormat()); } else { $i = $financial_year->getEndDate()->copy()->format($this->getYearlyDateFormat()); diff --git a/app/Http/Controllers/Settings/Localisation.php b/app/Http/Controllers/Settings/Localisation.php index b538d865e..aff8cd058 100644 --- a/app/Http/Controllers/Settings/Localisation.php +++ b/app/Http/Controllers/Settings/Localisation.php @@ -41,9 +41,9 @@ class Localisation extends Controller 'both' => trans('settings.localisation.discount_location.both'), ]; - $financial_year_denote_options = [ - 'begins' => trans('settings.localisation.financial_year_denote.begins'), - 'ends' => trans('settings.localisation.financial_year_denote.ends'), + $financial_denote_options = [ + 'begins' => trans('settings.localisation.financial_denote.begins'), + 'ends' => trans('settings.localisation.financial_denote.ends'), ]; return view('settings.localisation.edit', compact( @@ -52,7 +52,7 @@ class Localisation extends Controller 'date_separators', 'percent_positions', 'discount_locations', - 'financial_year_denote_options' + 'financial_denote_options' )); } } diff --git a/app/Traits/DateTime.php b/app/Traits/DateTime.php index 6bcaa4fe8..79b2b2fae 100644 --- a/app/Traits/DateTime.php +++ b/app/Traits/DateTime.php @@ -110,7 +110,7 @@ trait DateTime $financial_start = Date::create($year, $month, $day); - if (setting('localisation.financial_year_denote') == 'ends' && $financial_start->dayOfYear != 1) { + if ((setting('localisation.financial_denote') == 'ends') && ($financial_start->dayOfYear != 1)) { $financial_start->subYear(); } diff --git a/config/setting.php b/config/setting.php index ef2537a45..c3082d162 100644 --- a/config/setting.php +++ b/config/setting.php @@ -98,12 +98,12 @@ return [ 'fallback' => [ 'localisation' => [ 'financial_start' => env('SETTING_FALLBACK_LOCALISATION_FINANCIAL_START', '01-01'), + 'financial_denote' => env('SETTING_FALLBACK_LOCALISATION_FINANCIAL_DENOTE', 'ends'), 'timezone' => env('SETTING_FALLBACK_LOCALISATION_TIMEZONE', 'Europe/London'), 'date_format' => env('SETTING_FALLBACK_LOCALISATION_DATE_FORMAT', 'd M Y'), 'date_separator' => env('SETTING_FALLBACK_LOCALISATION_DATE_SEPARATOR', 'space'), 'percent_position' => env('SETTING_FALLBACK_LOCALISATION_PERCENT_POSITION', 'after'), 'discount_location' => env('SETTING_FALLBACK_LOCALISATION_DISCOUNT_LOCATION', 'total'), - 'financial_year_denote' => env('SETTING_FALLBACK_LOCALISATION_FINANCIAL_YEAR_DENOTE', 'ends'), ], 'invoice' => [ 'number_prefix' => env('SETTING_FALLBACK_INVOICE_NUMBER_PREFIX', 'INV-'), diff --git a/resources/lang/en-GB/settings.php b/resources/lang/en-GB/settings.php index c5bf423e3..dc1516ed5 100644 --- a/resources/lang/en-GB/settings.php +++ b/resources/lang/en-GB/settings.php @@ -16,6 +16,11 @@ return [ 'description' => 'Set fiscal year, time zone, date format and more locals', 'financial_start' => 'Financial Year Start', 'timezone' => 'Time Zone', + 'financial_denote' => [ + 'title' => 'Financial Year Denote', + 'begins' => 'By the year in which it begins', + 'ends' => 'By the year in which it ends', + ], 'date' => [ 'format' => 'Date Format', 'separator' => 'Date Separator', @@ -36,11 +41,6 @@ return [ 'total' => 'At total', 'both' => 'Both line and total', ], - 'financial_year_denote' => [ - 'title' => 'Financial Year Denote', - 'begins' => 'By the year it begins', - 'ends' => 'By the year it ends', - ], ], 'invoice' => [ diff --git a/resources/views/settings/localisation/edit.blade.php b/resources/views/settings/localisation/edit.blade.php index 29f588924..2018e8346 100644 --- a/resources/views/settings/localisation/edit.blade.php +++ b/resources/views/settings/localisation/edit.blade.php @@ -20,7 +20,7 @@
{{ Form::dateGroup('financial_start', trans('settings.localisation.financial_start'), 'calendar', ['id' => 'financial_start', 'class' => 'form-control datepicker', 'show-date-format' => 'j F', 'date-format' => 'd-m', 'autocomplete' => 'off'], setting('localisation.financial_start')) }} - {{ Form::selectGroup('financial_year_denote', trans('settings.localisation.financial_year_denote.title'), 'calendar', $financial_year_denote_options, setting('localisation.financial_year_denote'), []) }} + {{ Form::selectGroup('financial_denote', trans('settings.localisation.financial_denote.title'), 'calendar', $financial_denote_options, setting('localisation.financial_denote'), []) }} {{ Form::selectGroupGroup('timezone', trans('settings.localisation.timezone'), 'globe', $timezones, setting('localisation.timezone'), []) }} From 5137ef3e983d31a59893307becee255d8ab2e3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sat, 13 Feb 2021 00:50:14 +0300 Subject: [PATCH 59/60] fixed auth profile permission --- resources/views/partials/admin/navbar.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/partials/admin/navbar.blade.php b/resources/views/partials/admin/navbar.blade.php index 2781d23b8..64a982f77 100644 --- a/resources/views/partials/admin/navbar.blade.php +++ b/resources/views/partials/admin/navbar.blade.php @@ -254,12 +254,12 @@ @stack('navbar_profile_edit') - @can(['read-auth-users', 'read-auth-profile']) + @canany(['read-auth-users', 'read-auth-profile']) {{ trans('auth.profile') }} - @endcan + @endcanany @canany(['read-auth-users', 'read-auth-roles', 'read-auth-permissions']) From 6afd559dcba132818050d3986c24e6abdde829dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sat, 13 Feb 2021 01:53:10 +0300 Subject: [PATCH 60/60] composer lock --- composer.lock | 202 +++++++++++++++++++++++++------------------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/composer.lock b/composer.lock index 589eedeca..8c39d390d 100644 --- a/composer.lock +++ b/composer.lock @@ -344,16 +344,16 @@ }, { "name": "akaunting/setting", - "version": "1.2.2", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/akaunting/setting.git", - "reference": "5731c99819961f912092d14f2fcf312aa4c48d61" + "reference": "1e7d9c9c35a6c8f86930b64c38f51db0fbde3111" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/akaunting/setting/zipball/5731c99819961f912092d14f2fcf312aa4c48d61", - "reference": "5731c99819961f912092d14f2fcf312aa4c48d61", + "url": "https://api.github.com/repos/akaunting/setting/zipball/1e7d9c9c35a6c8f86930b64c38f51db0fbde3111", + "reference": "1e7d9c9c35a6c8f86930b64c38f51db0fbde3111", "shasum": "" }, "require": { @@ -405,9 +405,9 @@ ], "support": { "issues": "https://github.com/akaunting/setting/issues", - "source": "https://github.com/akaunting/setting/tree/1.2.2" + "source": "https://github.com/akaunting/setting/tree/1.2.4" }, - "time": "2020-09-09T14:16:22+00:00" + "time": "2021-02-12T22:44:39+00:00" }, { "name": "akaunting/version", @@ -4528,16 +4528,16 @@ }, { "name": "laravel/framework", - "version": "v8.25.0", + "version": "v8.27.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "05da44d6823c2923597519ac10151f5827a24f80" + "reference": "a6680d98f9dadaa363aa7d5218517a08706cee64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/05da44d6823c2923597519ac10151f5827a24f80", - "reference": "05da44d6823c2923597519ac10151f5827a24f80", + "url": "https://api.github.com/repos/laravel/framework/zipball/a6680d98f9dadaa363aa7d5218517a08706cee64", + "reference": "a6680d98f9dadaa363aa7d5218517a08706cee64", "shasum": "" }, "require": { @@ -4692,7 +4692,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-01-26T14:40:21+00:00" + "time": "2021-02-09T15:14:54+00:00" }, { "name": "laravel/tinker", @@ -5341,16 +5341,16 @@ }, { "name": "livewire/livewire", - "version": "v2.3.8", + "version": "v2.3.17", "source": { "type": "git", "url": "https://github.com/livewire/livewire.git", - "reference": "c661e295428b2baaff04320d0a9424db5ca72be5" + "reference": "1a1d43ff365301ae99ed7f0ccf02c553d4eeba03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/livewire/livewire/zipball/c661e295428b2baaff04320d0a9424db5ca72be5", - "reference": "c661e295428b2baaff04320d0a9424db5ca72be5", + "url": "https://api.github.com/repos/livewire/livewire/zipball/1a1d43ff365301ae99ed7f0ccf02c553d4eeba03", + "reference": "1a1d43ff365301ae99ed7f0ccf02c553d4eeba03", "shasum": "" }, "require": { @@ -5401,7 +5401,7 @@ "description": "A front-end framework for Laravel.", "support": { "issues": "https://github.com/livewire/livewire/issues", - "source": "https://github.com/livewire/livewire/tree/v2.3.8" + "source": "https://github.com/livewire/livewire/tree/v2.3.17" }, "funding": [ { @@ -5409,20 +5409,20 @@ "type": "github" } ], - "time": "2021-01-21T14:01:48+00:00" + "time": "2021-02-09T15:15:49+00:00" }, { "name": "lorisleiva/laravel-search-string", - "version": "v1.1.0", + "version": "v1.1.1", "source": { "type": "git", "url": "https://github.com/lorisleiva/laravel-search-string.git", - "reference": "afed28a7c2f7a2921c43a31dd8896446844bad98" + "reference": "8b0b82053c51266f2d062f542ab67eac82cefcf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lorisleiva/laravel-search-string/zipball/afed28a7c2f7a2921c43a31dd8896446844bad98", - "reference": "afed28a7c2f7a2921c43a31dd8896446844bad98", + "url": "https://api.github.com/repos/lorisleiva/laravel-search-string/zipball/8b0b82053c51266f2d062f542ab67eac82cefcf9", + "reference": "8b0b82053c51266f2d062f542ab67eac82cefcf9", "shasum": "" }, "require": { @@ -5459,7 +5459,7 @@ "description": "Generates database queries based on one unique string using a simple and customizable syntax.", "support": { "issues": "https://github.com/lorisleiva/laravel-search-string/issues", - "source": "https://github.com/lorisleiva/laravel-search-string/tree/v1.1.0" + "source": "https://github.com/lorisleiva/laravel-search-string/tree/v1.1.1" }, "funding": [ { @@ -5467,7 +5467,7 @@ "type": "github" } ], - "time": "2021-01-29T10:07:03+00:00" + "time": "2021-02-05T17:50:31+00:00" }, { "name": "maatwebsite/excel", @@ -6215,16 +6215,16 @@ }, { "name": "nesbot/carbon", - "version": "2.44.0", + "version": "2.45.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "e6ef33cb1f67a4bed831ed6d0f7e156739a5d8cd" + "reference": "528783b188bdb853eb21239b1722831e0f000a8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e6ef33cb1f67a4bed831ed6d0f7e156739a5d8cd", - "reference": "e6ef33cb1f67a4bed831ed6d0f7e156739a5d8cd", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/528783b188bdb853eb21239b1722831e0f000a8d", + "reference": "528783b188bdb853eb21239b1722831e0f000a8d", "shasum": "" }, "require": { @@ -6304,7 +6304,7 @@ "type": "tidelift" } ], - "time": "2021-01-26T20:46:41+00:00" + "time": "2021-02-11T18:30:17+00:00" }, { "name": "nikic/php-parser", @@ -6843,16 +6843,16 @@ }, { "name": "php-http/message", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/php-http/message.git", - "reference": "39db36d5972e9e6d00ea852b650953f928d8f10d" + "reference": "fb0dbce7355cad4f4f6a225f537c34d013571f29" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/message/zipball/39db36d5972e9e6d00ea852b650953f928d8f10d", - "reference": "39db36d5972e9e6d00ea852b650953f928d8f10d", + "url": "https://api.github.com/repos/php-http/message/zipball/fb0dbce7355cad4f4f6a225f537c34d013571f29", + "reference": "fb0dbce7355cad4f4f6a225f537c34d013571f29", "shasum": "" }, "require": { @@ -6868,15 +6868,15 @@ "ergebnis/composer-normalize": "^2.6", "ext-zlib": "*", "guzzlehttp/psr7": "^1.0", + "laminas/laminas-diactoros": "^2.0", "phpspec/phpspec": "^5.1 || ^6.3", - "slim/slim": "^3.0", - "zendframework/zend-diactoros": "^1.0" + "slim/slim": "^3.0" }, "suggest": { "ext-zlib": "Used with compressor/decompressor streams", "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", - "slim/slim": "Used with Slim Framework PSR-7 implementation", - "zendframework/zend-diactoros": "Used with Diactoros Factories" + "laminas/laminas-diactoros": "Used with Diactoros Factories", + "slim/slim": "Used with Slim Framework PSR-7 implementation" }, "type": "library", "extra": { @@ -6911,9 +6911,9 @@ ], "support": { "issues": "https://github.com/php-http/message/issues", - "source": "https://github.com/php-http/message/tree/1.10.0" + "source": "https://github.com/php-http/message/tree/1.11.0" }, - "time": "2020-11-11T10:19:56+00:00" + "time": "2021-02-01T08:54:58+00:00" }, { "name": "php-http/message-factory", @@ -8737,16 +8737,16 @@ }, { "name": "symfony/console", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a" + "reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d62ec79478b55036f65e2602e282822b8eaaff0a", - "reference": "d62ec79478b55036f65e2602e282822b8eaaff0a", + "url": "https://api.github.com/repos/symfony/console/zipball/89d4b176d12a2946a1ae4e34906a025b7b6b135a", + "reference": "89d4b176d12a2946a1ae4e34906a025b7b6b135a", "shasum": "" }, "require": { @@ -8814,7 +8814,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.2.2" + "source": "https://github.com/symfony/console/tree/v5.2.3" }, "funding": [ { @@ -8830,11 +8830,11 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:15:41+00:00" + "time": "2021-01-28T22:06:19+00:00" }, { "name": "symfony/css-selector", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -8879,7 +8879,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v5.2.2" + "source": "https://github.com/symfony/css-selector/tree/v5.2.3" }, "funding": [ { @@ -9035,16 +9035,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "4fd4a377f7b7ec7c3f3b40346a1411e0a83f9d40" + "reference": "48f18b3609e120ea66d59142c23dc53e9562c26d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/4fd4a377f7b7ec7c3f3b40346a1411e0a83f9d40", - "reference": "4fd4a377f7b7ec7c3f3b40346a1411e0a83f9d40", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/48f18b3609e120ea66d59142c23dc53e9562c26d", + "reference": "48f18b3609e120ea66d59142c23dc53e9562c26d", "shasum": "" }, "require": { @@ -9084,7 +9084,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.2.2" + "source": "https://github.com/symfony/error-handler/tree/v5.2.3" }, "funding": [ { @@ -9100,11 +9100,11 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:15:41+00:00" + "time": "2021-01-28T22:06:19+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -9169,7 +9169,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.2" + "source": "https://github.com/symfony/event-dispatcher/tree/v5.2.3" }, "funding": [ { @@ -9268,7 +9268,7 @@ }, { "name": "symfony/filesystem", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -9310,7 +9310,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.2.2" + "source": "https://github.com/symfony/filesystem/tree/v5.2.3" }, "funding": [ { @@ -9330,16 +9330,16 @@ }, { "name": "symfony/finder", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e" + "reference": "4adc8d172d602008c204c2e16956f99257248e03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/196f45723b5e618bf0e23b97e96d11652696ea9e", - "reference": "196f45723b5e618bf0e23b97e96d11652696ea9e", + "url": "https://api.github.com/repos/symfony/finder/zipball/4adc8d172d602008c204c2e16956f99257248e03", + "reference": "4adc8d172d602008c204c2e16956f99257248e03", "shasum": "" }, "require": { @@ -9371,7 +9371,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.2.2" + "source": "https://github.com/symfony/finder/tree/v5.2.3" }, "funding": [ { @@ -9387,7 +9387,7 @@ "type": "tidelift" } ], - "time": "2021-01-27T10:01:46+00:00" + "time": "2021-01-28T22:06:19+00:00" }, { "name": "symfony/http-client-contracts", @@ -9470,16 +9470,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "16dfa5acf8103f0394d447f8eea3ea49f9e50855" + "reference": "20c554c0f03f7cde5ce230ed248470cccbc34c36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/16dfa5acf8103f0394d447f8eea3ea49f9e50855", - "reference": "16dfa5acf8103f0394d447f8eea3ea49f9e50855", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/20c554c0f03f7cde5ce230ed248470cccbc34c36", + "reference": "20c554c0f03f7cde5ce230ed248470cccbc34c36", "shasum": "" }, "require": { @@ -9523,7 +9523,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.2.2" + "source": "https://github.com/symfony/http-foundation/tree/v5.2.3" }, "funding": [ { @@ -9539,20 +9539,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T11:19:04+00:00" + "time": "2021-02-03T04:42:09+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "831b51e9370ece0febd0950dd819c63f996721c7" + "reference": "89bac04f29e7b0b52f9fa6a4288ca7a8f90a1a05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/831b51e9370ece0febd0950dd819c63f996721c7", - "reference": "831b51e9370ece0febd0950dd819c63f996721c7", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/89bac04f29e7b0b52f9fa6a4288ca7a8f90a1a05", + "reference": "89bac04f29e7b0b52f9fa6a4288ca7a8f90a1a05", "shasum": "" }, "require": { @@ -9635,7 +9635,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.2.2" + "source": "https://github.com/symfony/http-kernel/tree/v5.2.3" }, "funding": [ { @@ -9651,20 +9651,20 @@ "type": "tidelift" } ], - "time": "2021-01-27T14:45:46+00:00" + "time": "2021-02-03T04:51:58+00:00" }, { "name": "symfony/mime", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "37bade585ea100d235c031b258eff93b5b6bb9a9" + "reference": "7dee6a43493f39b51ff6c5bb2bd576fe40a76c86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/37bade585ea100d235c031b258eff93b5b6bb9a9", - "reference": "37bade585ea100d235c031b258eff93b5b6bb9a9", + "url": "https://api.github.com/repos/symfony/mime/zipball/7dee6a43493f39b51ff6c5bb2bd576fe40a76c86", + "reference": "7dee6a43493f39b51ff6c5bb2bd576fe40a76c86", "shasum": "" }, "require": { @@ -9717,7 +9717,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.2.2" + "source": "https://github.com/symfony/mime/tree/v5.2.3" }, "funding": [ { @@ -9733,7 +9733,7 @@ "type": "tidelift" } ], - "time": "2021-01-25T14:08:25+00:00" + "time": "2021-02-02T06:10:15+00:00" }, { "name": "symfony/polyfill-ctype", @@ -10466,7 +10466,7 @@ }, { "name": "symfony/process", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", @@ -10508,7 +10508,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.2.2" + "source": "https://github.com/symfony/process/tree/v5.2.3" }, "funding": [ { @@ -10528,7 +10528,7 @@ }, { "name": "symfony/routing", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", @@ -10598,7 +10598,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.2.2" + "source": "https://github.com/symfony/routing/tree/v5.2.3" }, "funding": [ { @@ -10697,7 +10697,7 @@ }, { "name": "symfony/string", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", @@ -10760,7 +10760,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.2.2" + "source": "https://github.com/symfony/string/tree/v5.2.3" }, "funding": [ { @@ -10780,7 +10780,7 @@ }, { "name": "symfony/translation", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", @@ -10853,7 +10853,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.2.2" + "source": "https://github.com/symfony/translation/tree/v5.2.3" }, "funding": [ { @@ -10951,7 +10951,7 @@ }, { "name": "symfony/var-dumper", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", @@ -11019,7 +11019,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.2.2" + "source": "https://github.com/symfony/var-dumper/tree/v5.2.3" }, "funding": [ { @@ -11580,16 +11580,16 @@ }, { "name": "facade/ignition", - "version": "2.5.9", + "version": "2.5.11", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "66b3138ecce38024723fb3bfc66ef8852a779ea9" + "reference": "e91d67353054bf827c64687fcac5ea44e4dcec54" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/66b3138ecce38024723fb3bfc66ef8852a779ea9", - "reference": "66b3138ecce38024723fb3bfc66ef8852a779ea9", + "url": "https://api.github.com/repos/facade/ignition/zipball/e91d67353054bf827c64687fcac5ea44e4dcec54", + "reference": "e91d67353054bf827c64687fcac5ea44e4dcec54", "shasum": "" }, "require": { @@ -11653,7 +11653,7 @@ "issues": "https://github.com/facade/ignition/issues", "source": "https://github.com/facade/ignition" }, - "time": "2021-01-26T14:45:19+00:00" + "time": "2021-02-05T12:52:11+00:00" }, { "name": "facade/ignition-contracts", @@ -12598,16 +12598,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.1", + "version": "9.5.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360" + "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e7bdf4085de85a825f4424eae52c99a1cec2f360", - "reference": "e7bdf4085de85a825f4424eae52c99a1cec2f360", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f661659747f2f87f9e72095bb207bceb0f151cb4", + "reference": "f661659747f2f87f9e72095bb207bceb0f151cb4", "shasum": "" }, "require": { @@ -12685,7 +12685,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.1" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.2" }, "funding": [ { @@ -12697,7 +12697,7 @@ "type": "github" } ], - "time": "2021-01-17T07:42:25+00:00" + "time": "2021-02-02T14:45:58+00:00" }, { "name": "sebastian/cli-parser",