From 66748959fad41cc41b1947f93f52e32d230dc6fd Mon Sep 17 00:00:00 2001 From: sausin Date: Wed, 5 Dec 2018 20:49:44 +0530 Subject: [PATCH 01/36] Fix typo for inclusive tax type --- app/Jobs/Expense/CreateBillItem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/Expense/CreateBillItem.php b/app/Jobs/Expense/CreateBillItem.php index cc83823b3..9df227f78 100644 --- a/app/Jobs/Expense/CreateBillItem.php +++ b/app/Jobs/Expense/CreateBillItem.php @@ -77,7 +77,7 @@ class CreateBillItem $tax = Tax::find($tax_id); switch ($tax->type) { - case 'included': + case 'inclusive': $inclusives[] = $tax; break; case 'compound': From f763ae5a1546263d38659cbc63a3d20dadc7cdea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Ba=C5=9F?= Date: Fri, 7 Dec 2018 12:07:36 +0300 Subject: [PATCH 02/36] Login Test --- tests/Feature/Auth/LoginTest.php | 64 ++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 tests/Feature/Auth/LoginTest.php diff --git a/tests/Feature/Auth/LoginTest.php b/tests/Feature/Auth/LoginTest.php new file mode 100644 index 000000000..89db499a5 --- /dev/null +++ b/tests/Feature/Auth/LoginTest.php @@ -0,0 +1,64 @@ +get(route('login')) + ->assertStatus(200) + ->assertSeeText(trans('auth.login_to')); + } + + public function testItShouldLoginUser() + { + $this->post(route('login'), ['email' => $this->user->email, 'password' => $this->user->password]) + ->assertStatus(302) + ->assertRedirect(url('/')); + + $this->isAuthenticated($this->user->user); + } + + public function testItShouldNotLoginUser() + { + $user = factory(User::class)->create([ + 'password' => bcrypt($password = 'correct-password'), + ]); + + $this->post(route('login'), ['email' => $user->email, 'password' != $user->password = $password]) + ->assertStatus(302); + + $this->dontSeeIsAuthenticated(); + } + + public function testItShouldLogoutUser() + { + $user = User::create($this->getLoginRequest()); + + $this->loginAs() + ->get(route('logout',$user->id)) + ->assertStatus(302) + ->assertRedirect(route('login')); + + $this->dontSeeIsAuthenticated(); + } + + private function getLoginRequest() + { + $password = $this->faker->password(); + return[ + 'name' => $this->faker->name, + 'email' => $this->faker->email, + 'password' => $password, + 'companies' => [session('company_id')], + 'roles' => Role::take(1)->pluck('id')->toArray(), + 'enabled' => $this->faker->boolean ? 1 : 0, + ]; + } +} \ No newline at end of file From b7de4bad6f280a726ba48500cbe5cd04c831756a Mon Sep 17 00:00:00 2001 From: denisdulici Date: Tue, 11 Dec 2018 16:42:36 +0300 Subject: [PATCH 03/36] not setting active language in html tag --- resources/views/layouts/admin.blade.php | 2 +- resources/views/layouts/auth.blade.php | 2 +- resources/views/layouts/bill.blade.php | 2 +- resources/views/layouts/customer.blade.php | 2 +- resources/views/layouts/invoice.blade.php | 2 +- resources/views/layouts/link.blade.php | 2 +- resources/views/layouts/modules.blade.php | 2 +- resources/views/layouts/print.blade.php | 2 +- resources/views/layouts/wizard.blade.php | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index d7e792cb8..29a46a36a 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -1,4 +1,4 @@ - + @include('partials.admin.head') diff --git a/resources/views/layouts/auth.blade.php b/resources/views/layouts/auth.blade.php index 764ba35ce..39d33605b 100644 --- a/resources/views/layouts/auth.blade.php +++ b/resources/views/layouts/auth.blade.php @@ -1,4 +1,4 @@ - + @include('partials.auth.head') diff --git a/resources/views/layouts/bill.blade.php b/resources/views/layouts/bill.blade.php index fdb27abf1..6d0794ada 100644 --- a/resources/views/layouts/bill.blade.php +++ b/resources/views/layouts/bill.blade.php @@ -1,4 +1,4 @@ - + @include('partials.bill.head') diff --git a/resources/views/layouts/customer.blade.php b/resources/views/layouts/customer.blade.php index 508f273f9..322e4c169 100644 --- a/resources/views/layouts/customer.blade.php +++ b/resources/views/layouts/customer.blade.php @@ -1,4 +1,4 @@ - + @include('partials.customer.head') diff --git a/resources/views/layouts/invoice.blade.php b/resources/views/layouts/invoice.blade.php index de9e5a0f9..1faa39b20 100644 --- a/resources/views/layouts/invoice.blade.php +++ b/resources/views/layouts/invoice.blade.php @@ -1,4 +1,4 @@ - + @include('partials.invoice.head') diff --git a/resources/views/layouts/link.blade.php b/resources/views/layouts/link.blade.php index b49a34515..b2e367c51 100644 --- a/resources/views/layouts/link.blade.php +++ b/resources/views/layouts/link.blade.php @@ -1,4 +1,4 @@ - + @include('partials.link.head') diff --git a/resources/views/layouts/modules.blade.php b/resources/views/layouts/modules.blade.php index 927d517a4..87566dbca 100644 --- a/resources/views/layouts/modules.blade.php +++ b/resources/views/layouts/modules.blade.php @@ -1,4 +1,4 @@ - + @include('partials.modules.head') diff --git a/resources/views/layouts/print.blade.php b/resources/views/layouts/print.blade.php index cbcb4ad4b..06685cd12 100644 --- a/resources/views/layouts/print.blade.php +++ b/resources/views/layouts/print.blade.php @@ -1,4 +1,4 @@ - + @include('partials.admin.head') @push('css') diff --git a/resources/views/layouts/wizard.blade.php b/resources/views/layouts/wizard.blade.php index 278b51d48..49de44e7b 100644 --- a/resources/views/layouts/wizard.blade.php +++ b/resources/views/layouts/wizard.blade.php @@ -1,4 +1,4 @@ - + @include('partials.wizard.head') From f2d47b5b1930a9061827aabc49fea8af0426ac5d Mon Sep 17 00:00:00 2001 From: denisdulici Date: Tue, 11 Dec 2018 16:47:45 +0300 Subject: [PATCH 04/36] updated translations --- resources/lang/de-DE/messages.php | 2 +- resources/lang/de-DE/modules.php | 3 ++ resources/lang/de-DE/reconciliations.php | 4 +- resources/lang/fa-IR/auth.php | 4 +- resources/lang/fa-IR/general.php | 38 +++++++-------- resources/lang/fa-IR/invoices.php | 8 +-- resources/lang/fa-IR/messages.php | 3 ++ resources/lang/fa-IR/modules.php | 11 +++-- resources/lang/fa-IR/reconciliations.php | 8 +-- resources/lang/it-IT/modules.php | 3 ++ resources/lang/nb-NO/auth.php | 8 +-- resources/lang/nb-NO/bills.php | 14 +++--- resources/lang/nb-NO/companies.php | 2 +- resources/lang/nb-NO/customers.php | 4 +- resources/lang/nb-NO/general.php | 62 ++++++++++++------------ resources/lang/nb-NO/header.php | 2 +- resources/lang/nb-NO/import.php | 2 +- resources/lang/nb-NO/install.php | 4 +- resources/lang/nb-NO/invoices.php | 18 +++---- resources/lang/nb-NO/items.php | 4 +- resources/lang/nb-NO/messages.php | 13 +++-- resources/lang/nb-NO/modules.php | 37 +++++++------- resources/lang/nb-NO/notifications.php | 8 +-- resources/lang/nb-NO/passwords.php | 2 +- resources/lang/nb-NO/reconciliations.php | 18 ++++--- resources/lang/nb-NO/reports.php | 2 +- resources/lang/nb-NO/settings.php | 24 ++++----- resources/lang/nb-NO/taxes.php | 3 ++ resources/lang/nb-NO/transfers.php | 2 +- resources/lang/nb-NO/validation.php | 4 +- resources/lang/nl-NL/bills.php | 2 +- resources/lang/nl-NL/modules.php | 3 ++ resources/lang/pt-BR/bills.php | 2 +- resources/lang/pt-BR/general.php | 2 - resources/lang/pt-BR/messages.php | 3 ++ resources/lang/pt-BR/modules.php | 3 ++ resources/lang/pt-BR/reconciliations.php | 2 + resources/lang/sq-AL/general.php | 2 - resources/lang/sq-AL/messages.php | 3 ++ resources/lang/sq-AL/modules.php | 3 ++ resources/lang/sq-AL/reconciliations.php | 2 + resources/lang/sr-RS/customers.php | 2 +- resources/lang/sr-RS/dashboard.php | 2 +- resources/lang/sr-RS/footer.php | 2 +- resources/lang/sr-RS/general.php | 2 - resources/lang/sr-RS/invoices.php | 2 +- resources/lang/sr-RS/messages.php | 3 ++ resources/lang/sr-RS/modules.php | 3 ++ resources/lang/sr-RS/notifications.php | 6 +-- resources/lang/sr-RS/reconciliations.php | 2 + resources/lang/sr-RS/taxes.php | 4 +- resources/lang/tr-TR/modules.php | 9 ++-- 52 files changed, 213 insertions(+), 168 deletions(-) diff --git a/resources/lang/de-DE/messages.php b/resources/lang/de-DE/messages.php index 12976d3de..525e86358 100644 --- a/resources/lang/de-DE/messages.php +++ b/resources/lang/de-DE/messages.php @@ -26,7 +26,7 @@ return [ 'warning' => [ 'deleted' => 'Warnung: Sie dürfen :name nicht löschen, da :text dazu in Bezug steht.', 'disabled' => 'Warnung: Sie dürfen :name nicht deaktivieren, da :text dazu in Bezug steht.', - 'disable_code' => 'Warning: You are not allowed to disable or change the currency of :name because it has :text related.', + 'disable_code' => 'Warnung: Sie dürfen die Währung von :name nicht deaktivieren oder verändern, da :text dazu in Bezug steht.', ], ]; diff --git a/resources/lang/de-DE/modules.php b/resources/lang/de-DE/modules.php index e9a83233e..88146a078 100644 --- a/resources/lang/de-DE/modules.php +++ b/resources/lang/de-DE/modules.php @@ -23,6 +23,9 @@ return [ 'added' => 'Hinzugefügt', 'updated' => 'Aktualisiert', 'compatibility' => 'Kompatibilität', + 'documentation' => 'Dokumentation', + 'view' => 'Ansicht', + 'back' => 'Zurück', 'installed' => ':module installiert', 'uninstalled' => ':module deinstalliert', diff --git a/resources/lang/de-DE/reconciliations.php b/resources/lang/de-DE/reconciliations.php index 627d47c0d..5a89ee2b0 100644 --- a/resources/lang/de-DE/reconciliations.php +++ b/resources/lang/de-DE/reconciliations.php @@ -10,7 +10,7 @@ return [ 'start_date' => 'Startdatum', 'end_date' => 'Enddatum', 'cleared_amount' => 'Ausgeglichener Betrag', - 'deposit' => 'Deposit', - 'withdrawal' => 'Withdrawal', + 'deposit' => 'Einzahlung', + 'withdrawal' => 'Auszahlung', ]; diff --git a/resources/lang/fa-IR/auth.php b/resources/lang/fa-IR/auth.php index 0f4e80d54..3b6ee2b85 100644 --- a/resources/lang/fa-IR/auth.php +++ b/resources/lang/fa-IR/auth.php @@ -23,7 +23,7 @@ return [ 'error' => [ 'self_delete' => 'خطا: نمی‌توانید خودتان حذف کنید!', - 'no_company' => 'خطا: هیچ کمپانی به حساب شما متصل نمیباشد. لطفا با مدیر سیستم تماس بگیرید.', + 'no_company' => 'خطا: هیچ کمپانی به حساب شما متصل نیست. لطفا با مدیر سیستم تماس بگیرید.', ], 'failed' => 'مشخصات وارد شده با اطلاعات ما سازگار نیست.', @@ -31,7 +31,7 @@ return [ 'throttle' => 'دفعات تلاش شما برای ورود بیش از حد مجاز است. لطفا پس از :seconds ثانیه مجددا تلاش فرمایید.', 'notification' => [ - 'message_1' => 'شما این ایمیل را دریافت نموده اید چون ما درخواست بازیابی رمزعبور حساب شما را دریافت کرده ای.', + 'message_1' => 'شما این ایمیل را دریافت نموده اید چون ما درخواست بازیابی رمزعبور حساب شما را دریافت کرده ایم.', 'message_2' => 'اگر شما درخواست بازیابی رمزعبور حسابتان را ثبت نکرده اید، این پیام را نادیده بگیرید.', 'button' => 'بازیابی رمزعبور', ], diff --git a/resources/lang/fa-IR/general.php b/resources/lang/fa-IR/general.php index 6418d0108..43f91e51b 100644 --- a/resources/lang/fa-IR/general.php +++ b/resources/lang/fa-IR/general.php @@ -40,8 +40,6 @@ return [ 'others' => 'سایر |‌ سایرین', 'contacts' => 'Contact|Contacts', 'reconciliations' => 'Reconciliation|Reconciliations', - 'deposits' => 'Deposit|Deposits', - 'withdrawals' => 'Withdrawal|Withdrawals', 'dashboard' => 'پیشخوان', 'banking' => 'بانکداری', @@ -85,7 +83,7 @@ return [ 'color' => 'رنگ', 'save' => 'ذخیره کردن', 'cancel' => 'انصراف', - 'loading' => 'Loading...', + 'loading' => 'درحال بارگذاری...', 'from' => 'از', 'to' => 'به', 'print' => 'چاپ کن', @@ -106,26 +104,26 @@ return [ 'partially' => 'جزئی', 'partially_paid' => 'پرداخت جزئی', 'export' => 'گرفتن خروجی', - 'finish' => 'Finish', + 'finish' => 'پایان', 'wizard' => 'Wizard', - 'skip' => 'Skip', + 'skip' => 'صرف‌نظر', 'enable' => 'فعال', 'disable' => 'غیر فعال', - 'select_all' => 'Select All', - 'unselect_all' => 'Unselect All', - 'go_to' => 'Go to :name', - 'created_date' => 'Created Date', - 'period' => 'Period', - 'start' => 'Start', - 'end' => 'End', - 'clear' => 'Clear', - 'difference' => 'Difference', + 'select_all' => 'انتخاب همه', + 'unselect_all' => 'عدم انتخاب همه', + 'go_to' => 'برو به: نام', + 'created_date' => 'تاریخ ایجاد', + 'period' => 'دوره', + 'start' => 'شروع', + 'end' => 'پایان', + 'clear' => 'پاک کردن', + 'difference' => 'تفاوت', 'title' => [ 'new' => ':type جدید', 'edit' => 'ویرایش :type', - 'create' => 'Create :type', - 'send' => 'Send :type', + 'create' => 'ایجاد: نوع', + 'send' => 'ارسال: نوع', 'get' => 'Get :type', ], @@ -139,10 +137,10 @@ return [ ], 'date_range' => [ - 'today' => 'Today', - 'yesterday' => 'Yesterday', + 'today' => 'امروز', + 'yesterday' => 'ديروز', 'last_days' => 'Last :day Days', - 'this_month' => 'This Month', - 'last_month' => 'Last Month', + 'this_month' => 'این ماه', + 'last_month' => 'ماه قبل', ], ]; diff --git a/resources/lang/fa-IR/invoices.php b/resources/lang/fa-IR/invoices.php index 0dd7ccd36..3eebf587d 100644 --- a/resources/lang/fa-IR/invoices.php +++ b/resources/lang/fa-IR/invoices.php @@ -19,8 +19,8 @@ return [ 'item_name' => 'نام آیتم | نام آیتم ها', 'show_discount' => ':discount% Discount', - 'add_discount' => 'Add Discount', - 'discount_desc' => 'of subtotal', + 'add_discount' => 'افزودن تخفیف', + 'discount_desc' => 'از جمع کل', 'payment_due' => 'سررسید پرداخت', 'paid' => 'پرداخت شده', @@ -51,11 +51,11 @@ return [ 'status' => [ 'created' => 'Created on :date', 'send' => [ - 'draft' => 'Not sent', + 'draft' => 'ارسال نشده', 'sent' => 'Sent on :date', ], 'paid' => [ - 'await' => 'Awaiting payment', + 'await' => 'در انتظار پرداخت', ], ], ], diff --git a/resources/lang/fa-IR/messages.php b/resources/lang/fa-IR/messages.php index 77e4eb9b8..e79472691 100644 --- a/resources/lang/fa-IR/messages.php +++ b/resources/lang/fa-IR/messages.php @@ -11,6 +11,7 @@ return [ 'enabled' => ':type enabled!', 'disabled' => ':type disabled!', ], + 'error' => [ 'over_payment' => 'Error: Payment not added! The amount you entered passes the total: :amount', 'not_user_company' => 'خطا: شما اجازه مدیریت این شرکت را ندارید!', @@ -21,9 +22,11 @@ return [ 'import_column' => 'Error: :message Sheet name: :sheet. Line number: :line.', 'import_sheet' => 'Error: Sheet name is not valid. Please, check the sample file.', ], + 'warning' => [ 'deleted' => 'هشدار: شما نمی توانید :name را به دلیل :text حذف کنید.', 'disabled' => 'هشدار: شما نمی توانید :name را به دلیل :text غیر فعال کنید.', + 'disable_code' => 'Warning: You are not allowed to disable or change the currency of :name because it has :text related.', ], ]; diff --git a/resources/lang/fa-IR/modules.php b/resources/lang/fa-IR/modules.php index c1cba56ba..686ba45aa 100644 --- a/resources/lang/fa-IR/modules.php +++ b/resources/lang/fa-IR/modules.php @@ -4,25 +4,28 @@ return [ 'title' => 'API Token', 'api_token' => 'Token', - 'my_apps' => 'My Apps', + 'my_apps' => 'برنامه‌های من', 'top_paid' => 'بهترین غیر رایگان', 'new' => 'جدید', 'top_free' => 'بهترین رایگان', 'free' => 'رایگان', - 'search' => 'Search', + 'search' => 'جستجو', 'install' => 'نصب', 'buy_now' => 'خرید', 'token_link' => 'دریافت Token.', 'no_apps' => 'در این بخش هیچ نرم افزاری وجود ندارد.', 'developer' => 'آیا شما یک توسعه دهنده هستید؟با مراجعه به سایت فروشگاهی می توانید نرم افزار های خود را بسیازید و بفروشید.', - 'recommended_apps' => 'Recommended Apps', + 'recommended_apps' => 'برنامه‌های توصیه شده', 'about' => 'درباره ما', 'added' => 'اضافه شد', 'updated' => 'به روز رسانی شده', 'compatibility' => 'سازگاری', + 'documentation' => 'مستندات', + 'view' => 'مشاهده', + 'back' => 'برگشت', 'installed' => ':module نصب شد', 'uninstalled' => ':module حذف شد', @@ -34,7 +37,7 @@ return [ 'installation' => 'نصب', 'faq' => 'سوالات متداول', 'changelog' => 'تغییرات', - 'reviews' => 'Reviews', + 'reviews' => 'نظرات', ], 'installation' => [ diff --git a/resources/lang/fa-IR/reconciliations.php b/resources/lang/fa-IR/reconciliations.php index 0ab0e4022..456e11ef2 100644 --- a/resources/lang/fa-IR/reconciliations.php +++ b/resources/lang/fa-IR/reconciliations.php @@ -6,9 +6,11 @@ return [ 'reconciled' => 'Reconciled', 'closing_balance' => 'Closing Balance', 'unreconciled' => 'Unreconciled', - 'list_transactions' => 'List Transactions', - 'start_date' => 'Start Date', - 'end_date' => 'End Date', + 'list_transactions' => 'فهرست تراکنش‌ها', + 'start_date' => 'تاریخ شروع', + 'end_date' => 'تاریخ پایان', 'cleared_amount' => 'Cleared Amount', + 'deposit' => 'سپرده', + 'withdrawal' => 'Withdrawal', ]; diff --git a/resources/lang/it-IT/modules.php b/resources/lang/it-IT/modules.php index c98284c6a..dd86e8d92 100644 --- a/resources/lang/it-IT/modules.php +++ b/resources/lang/it-IT/modules.php @@ -23,6 +23,9 @@ return [ 'added' => 'Aggiunto', 'updated' => 'Aggiornato', 'compatibility' => 'Compatibilità', + 'documentation' => 'Documentazione', + 'view' => 'Visualizza', + 'back' => 'Indietro', 'installed' => ':module installato', 'uninstalled' => ':module disinstallato', diff --git a/resources/lang/nb-NO/auth.php b/resources/lang/nb-NO/auth.php index 9f8791551..3db6c1434 100644 --- a/resources/lang/nb-NO/auth.php +++ b/resources/lang/nb-NO/auth.php @@ -23,7 +23,7 @@ return [ 'error' => [ 'self_delete' => 'Feil: Du kan ikke slette deg selv.', - 'no_company' => 'Error: No company assigned to your account. Please, contact the system administrator.', + 'no_company' => 'Feil: Ingen foretak knyttet til din konto. Vennligst kontakt systemadministrator.', ], 'failed' => 'Disse opplysningene samsvarer ikke med våre oppføringer.', @@ -31,9 +31,9 @@ return [ 'throttle' => 'For mange innloggingsforsøk. Forsøk igjen om :seconds sekunder.', 'notification' => [ - 'message_1' => 'You are receiving this email because we received a password reset request for your account.', - 'message_2' => 'If you did not request a password reset, no further action is required.', - 'button' => 'Reset Password', + 'message_1' => 'Du mottar denne e-posten fordi vi mottok en forespørsel om pasordnullstilling for din konto.', + 'message_2' => 'Hvis du ikke ba om å nullstille passord trenger du ikke foreta deg noe mer.', + 'button' => 'Nullstill passord', ], ]; diff --git a/resources/lang/nb-NO/bills.php b/resources/lang/nb-NO/bills.php index da6ca4939..3e660e40d 100644 --- a/resources/lang/nb-NO/bills.php +++ b/resources/lang/nb-NO/bills.php @@ -16,7 +16,7 @@ return [ 'tax_total' => 'Mva', 'total' => 'Totalt', - 'item_name' => 'Enhetsnavn | Enhetsnavn', + 'item_name' => 'Artikkelnavn | Artikkelnavn', 'show_discount' => ':discount% rabatt', 'add_discount' => 'Legg til rabatt', @@ -26,7 +26,7 @@ return [ 'amount_due' => 'Forfallsbeløp', 'paid' => 'Betalt', 'histories' => 'Historikk', - 'payments' => 'Betalinger', + 'payments' => 'Utbetalinger', 'add_payment' => 'Legg til betaling', 'mark_received' => 'Merk som mottatt', 'download_pdf' => 'Last ned PDF', @@ -41,16 +41,16 @@ return [ 'messages' => [ 'received' => 'Faktura ble merket som mottatt.', - 'draft' => 'This is a DRAFT bill and will be reflected to charts after it gets received.', + 'draft' => 'Dette er en KLADD for fakturaen som vil bli oppdatert etter at den er mottatt.', 'status' => [ - 'created' => 'Created on :date', + 'created' => 'Opprettet :date', 'receive' => [ - 'draft' => 'Not sent', - 'received' => 'Received on :date', + 'draft' => 'Ikke sendt', + 'received' => 'Mottatt :date', ], 'paid' => [ - 'await' => 'Awaiting payment', + 'await' => 'Avventer betaling', ], ], ], diff --git a/resources/lang/nb-NO/companies.php b/resources/lang/nb-NO/companies.php index 2d8af9b1f..c287df324 100644 --- a/resources/lang/nb-NO/companies.php +++ b/resources/lang/nb-NO/companies.php @@ -7,7 +7,7 @@ return [ 'manage' => 'Administrer foretak', 'all' => 'Alle foretak', 'error' => [ - 'delete_active' => 'Feil. Kan ikke slette aktivt firma, du må bytte først.', + 'delete_active' => 'Feil. Kan ikke slette aktivt foretak, du må bytte først!', ], ]; diff --git a/resources/lang/nb-NO/customers.php b/resources/lang/nb-NO/customers.php index 07ceab30a..0855af7ac 100644 --- a/resources/lang/nb-NO/customers.php +++ b/resources/lang/nb-NO/customers.php @@ -10,7 +10,7 @@ return [ ], 'notification' => [ - 'message' => ':customer made :amount payment to invoice number :invoice_number.', - 'button' => 'Show', + 'message' => ':customer betalte :amount mot faktura :invoice_number.', + 'button' => 'Vis', ], ]; diff --git a/resources/lang/nb-NO/general.php b/resources/lang/nb-NO/general.php index c72177ebe..73622e499 100644 --- a/resources/lang/nb-NO/general.php +++ b/resources/lang/nb-NO/general.php @@ -2,15 +2,15 @@ return [ - 'items' => 'Enhet | Enheter', + 'items' => 'Artikkel | Artikler', 'incomes' => 'Inntekt | Inntekter', 'invoices' => 'Faktura | Fakturaer', - 'revenues' => 'Inntekt | Inntekter', + 'revenues' => 'Innbetaling | Innbetalinger', 'customers' => 'Kunde | Kunder', 'expenses' => 'Utgift | Utgifter', 'bills' => 'Faktura | Fakturaer', - 'payments' => 'Betaling | Betalinger', - 'vendors' => 'Selger | Selgere', + 'payments' => 'Utbetaling | Utbetalinger', + 'vendors' => 'Leverandør | Leverandører', 'accounts' => 'Konto | Kontoer', 'transfers' => 'Overføring | Overføringer', 'transactions' => 'Transaksjon | Transaksjoner', @@ -30,7 +30,7 @@ return [ 'pictures' => 'Bilde | Bilder', 'types' => 'Type | Typer', 'payment_methods' => 'Betalingsmåte | Betalingsmåter', - 'compares' => 'Inntekt vs. utgift | Inntekter vs. utgifter', + 'compares' => 'Inntekt mot utgift | Inntekter mot utgifter', 'notes' => 'Notat | Notater', 'totals' => 'Totalt | Totaler', 'languages' => 'Språk | Språk', @@ -38,10 +38,8 @@ return [ 'numbers' => 'Nummer | Nummer', 'statuses' => 'Status | Statuser', 'others' => 'Annen | Andre', - 'contacts' => 'Contact|Contacts', - 'reconciliations' => 'Reconciliation|Reconciliations', - 'deposits' => 'Deposit|Deposits', - 'withdrawals' => 'Withdrawal|Withdrawals', + 'contacts' => 'Kontakt|Kontakter', + 'reconciliations' => 'Avstemming|avstemminger', 'dashboard' => 'Kontrollpanel', 'banking' => 'Bank', @@ -68,7 +66,7 @@ return [ 'delete_confirm' => 'Bekreft sletting av :name :type?', 'name' => 'Navn', 'email' => 'E-post', - 'tax_number' => 'Organisasjonsnummer', + 'tax_number' => 'Org.nr', 'phone' => 'Telefon', 'address' => 'Adresse', 'website' => 'Nettside', @@ -85,7 +83,7 @@ return [ 'color' => 'Farge', 'save' => 'Lagre', 'cancel' => 'Avbryt', - 'loading' => 'Loading...', + 'loading' => 'Laster...', 'from' => 'Fra', 'to' => 'Til', 'print' => 'Skriv ut', @@ -105,28 +103,28 @@ return [ 'overdue' => 'Forfalt', 'partially' => 'Delvis', 'partially_paid' => 'Delvis betalt', - 'export' => 'Export', - 'finish' => 'Finish', - 'wizard' => 'Wizard', - 'skip' => 'Skip', - 'enable' => 'Enable', - 'disable' => 'Disable', - 'select_all' => 'Select All', - 'unselect_all' => 'Unselect All', - 'go_to' => 'Go to :name', - 'created_date' => 'Created Date', - 'period' => 'Period', + 'export' => 'Eksport', + 'finish' => 'Ferdigstill', + 'wizard' => 'Veiledning', + 'skip' => 'Hopp over', + 'enable' => 'Aktiver', + 'disable' => 'Deaktiver', + 'select_all' => 'Velg alle', + 'unselect_all' => 'Velg ingen', + 'go_to' => 'Gå til :name', + 'created_date' => 'Opprettet dato', + 'period' => 'Periode', 'start' => 'Start', - 'end' => 'End', - 'clear' => 'Clear', - 'difference' => 'Difference', + 'end' => 'Slutt', + 'clear' => 'Nullstill', + 'difference' => 'Forskjell', 'title' => [ 'new' => 'Ny :type', 'edit' => 'Endre :type', - 'create' => 'Create :type', + 'create' => 'Opprett :type', 'send' => 'Send :type', - 'get' => 'Get :type', + 'get' => 'Motta :type', ], 'form' => [ @@ -139,10 +137,10 @@ return [ ], 'date_range' => [ - 'today' => 'Today', - 'yesterday' => 'Yesterday', - 'last_days' => 'Last :day Days', - 'this_month' => 'This Month', - 'last_month' => 'Last Month', + 'today' => 'I dag', + 'yesterday' => 'I går', + 'last_days' => 'Siste :day dager', + 'this_month' => 'Denne måneden', + 'last_month' => 'Forrige måned', ], ]; diff --git a/resources/lang/nb-NO/header.php b/resources/lang/nb-NO/header.php index 98830de9a..2e881b5d7 100644 --- a/resources/lang/nb-NO/header.php +++ b/resources/lang/nb-NO/header.php @@ -8,7 +8,7 @@ return [ 'counter' => '{0} Du har ingen varsel |{1} Du har :count varsler|[2,*] Du har :count varsler', 'overdue_invoices' => '{1} :count forfalt faktura|[2,*] :count forfalte fakturaer', 'upcoming_bills' => '{1} :count kommende faktura [2,*] :count kommende fakturaer', - 'items_stock' => '{1} :count utsolgt produkt|[2,*] :count utsolgte produkter', + 'items_stock' => '{1} :count utsolgt artikkel|[2,*] :count utsolgte artikler', 'view_all' => 'Vis alle' ], 'docs_link' => 'https://akaunting.com/docs', diff --git a/resources/lang/nb-NO/import.php b/resources/lang/nb-NO/import.php index 5f9942c9f..88bb2b542 100644 --- a/resources/lang/nb-NO/import.php +++ b/resources/lang/nb-NO/import.php @@ -4,6 +4,6 @@ return [ 'import' => 'Importer', 'title' => 'Importer :type', - 'message' => 'Allowed file types: XLS, XLSX. Please, download the sample file.', + 'message' => 'Tillate filtyper: XLS, XLSX. Vennligst last ned malfilen.', ]; diff --git a/resources/lang/nb-NO/install.php b/resources/lang/nb-NO/install.php index aaf6ca132..accab6479 100644 --- a/resources/lang/nb-NO/install.php +++ b/resources/lang/nb-NO/install.php @@ -6,7 +6,7 @@ return [ 'refresh' => 'Oppfrisk', 'steps' => [ - 'requirements' => 'Please, ask your hosting provider to fix the errors!', + 'requirements' => 'Vennligst anmod din tjenestetilbyder om å rette opp problemene!', 'language' => 'Steg 1/3: Språkvalg', 'database' => 'Steg 2/3: Databaseoppsett', 'settings' => 'Steg 3/3: Foretak- og administratordetaljer', @@ -19,7 +19,7 @@ return [ 'requirements' => [ 'enabled' => ':feature må være aktivert.', 'disabled' => ':feature må være deaktivert.', - 'extension' => ':extension extension needs to be installed and loaded!', + 'extension' => 'Utvidelsen :extension må installeres og aktiveres!', 'directory' => 'Mappen :directory må være skrivbar.', ], diff --git a/resources/lang/nb-NO/invoices.php b/resources/lang/nb-NO/invoices.php index 95217fd10..efd599521 100644 --- a/resources/lang/nb-NO/invoices.php +++ b/resources/lang/nb-NO/invoices.php @@ -16,7 +16,7 @@ return [ 'tax_total' => 'Totalt mva', 'total' => 'Totalt', - 'item_name' => 'Enhetsnavn | Enhetsnavn', + 'item_name' => 'Artikkelnavn | Artikkelnavn', 'show_discount' => ':discount% rabatt', 'add_discount' => 'Legg til rabatt', @@ -25,13 +25,13 @@ return [ 'payment_due' => 'Forfallsdato', 'paid' => 'Betalt', 'histories' => 'Historikk', - 'payments' => 'Betalinger', + 'payments' => 'Utbetalinger', 'add_payment' => 'Legg til betaling', 'mark_paid' => 'Merk som betalt', 'mark_sent' => 'Merk som sendt', 'download_pdf' => 'Last ned PDF', 'send_mail' => 'Send e-post', - 'all_invoices' => 'Login to view all invoices', + 'all_invoices' => 'Logg inn for å se alle fakturaer', 'status' => [ 'draft' => 'Utkast', @@ -46,22 +46,22 @@ return [ 'email_sent' => 'E-post med faktura har blitt sendt.', 'marked_sent' => 'Faktura merket som sendt.', 'email_required' => 'E-postadresse må fylles inn.', - 'draft' => 'This is a DRAFT invoice and will be reflected to charts after it gets sent.', + 'draft' => 'Dette er en KLADD for fakturaen som vil bli oppdatert etter at den er sendt.', 'status' => [ - 'created' => 'Created on :date', + 'created' => 'Opprettet :date', 'send' => [ - 'draft' => 'Not sent', - 'sent' => 'Sent on :date', + 'draft' => 'Ikke sendt', + 'sent' => 'Sendt :date', ], 'paid' => [ - 'await' => 'Awaiting payment', + 'await' => 'Avventer betaling', ], ], ], 'notification' => [ - 'message' => 'Du mottar denne e-posten fordi du har en kommende faktura, pålydende :amount, til :costumer.', + 'message' => 'Du mottar denne e-posten med faktura til :customer, pålydende :amount.', 'button' => 'Betal nå', ], diff --git a/resources/lang/nb-NO/items.php b/resources/lang/nb-NO/items.php index 7ca6e6f3a..027f6148d 100644 --- a/resources/lang/nb-NO/items.php +++ b/resources/lang/nb-NO/items.php @@ -9,8 +9,8 @@ return [ 'notification' => [ 'message' => [ - 'reminder' => 'You are receiving this email because only :quantity of :name has remained.', - 'out_of_stock' => 'You are receiving this email because the :name is running out of stock.', + 'reminder' => 'Du mottar denne e-posten fordi det kun er :quantity av :name igjen.', + 'out_of_stock' => 'Du mottar denne e-posten fordi :name er nesten tom på lager.', ], 'button' => 'Vis nå', ], diff --git a/resources/lang/nb-NO/messages.php b/resources/lang/nb-NO/messages.php index bb9399104..4d40db6f3 100644 --- a/resources/lang/nb-NO/messages.php +++ b/resources/lang/nb-NO/messages.php @@ -8,22 +8,25 @@ return [ 'deleted' => ':type slettet.', 'duplicated' => ':type duplisert.', 'imported' => ':type importert.', - 'enabled' => ':type enabled!', - 'disabled' => ':type disabled!', + 'enabled' => ':type aktivert!', + 'disabled' => ':type deaktivert!', ], + 'error' => [ - 'over_payment' => 'Error: Payment not added! The amount you entered passes the total: :amount', + 'over_payment' => 'Feil: Betaling er ikke lagt til! Beløpet overskrider totalbeløp: :amount', 'not_user_company' => 'Feil: Du ikke kan administrere dette foretaket.', 'customer' => 'Feil: Bruker ble ikke opprettet. :name bruker allerede denne e-postadressen.', 'no_file' => 'Feil: Ingen fil er valgt.', 'last_category' => 'Feil: Kan ikke slette siste :type kategori.', 'invalid_token' => 'Feil: Angitt token er ugyldig.', - 'import_column' => 'Error: :message Sheet name: :sheet. Line number: :line.', - 'import_sheet' => 'Error: Sheet name is not valid. Please, check the sample file.', + 'import_column' => 'Feil: :message Arknavn: :sheet. Linjenummer: :line.', + 'import_sheet' => 'Feil: Arknavn er ikke gyldig. Vennligst sjekk malfilen.', ], + 'warning' => [ 'deleted' => 'Advarsel: Du har ikke mulighet til å slette :name fordi kontoen har :text relatert.', 'disabled' => 'Advarsel: Du kan ikke deaktivere :name fordi kontoen har :text relatert.', + 'disable_code' => 'Advarsel: Du har ikke tillatelse til å deaktivere eller endre valutaen for :name fordi den har relatert :text.', ], ]; diff --git a/resources/lang/nb-NO/modules.php b/resources/lang/nb-NO/modules.php index 4f6f8e7db..5195fe6eb 100644 --- a/resources/lang/nb-NO/modules.php +++ b/resources/lang/nb-NO/modules.php @@ -4,7 +4,7 @@ return [ 'title' => 'API-token', 'api_token' => 'Token', - 'my_apps' => 'My Apps', + 'my_apps' => 'Mine applikasjoner', 'top_paid' => 'Topp betalte', 'new' => 'Ny', 'top_free' => 'Topp gratis', @@ -16,13 +16,16 @@ return [ 'no_apps' => 'Det er ingen applikasjoner i denne kategorien ennå.', 'developer' => 'Er du en utvikler? Her kan du lære hvordan du lager en applikasjon for salg.', - 'recommended_apps' => 'Recommended Apps', + 'recommended_apps' => 'Anbefalte applikasjoner', 'about' => 'Om', 'added' => 'Lagt til', 'updated' => 'Oppdatert', 'compatibility' => 'Kompatibilitet', + 'documentation' => 'Dokumentasjon', + 'view' => 'Se', + 'back' => 'Tilbake', 'installed' => ':module installert', 'uninstalled' => ':module avinstallert', @@ -34,30 +37,30 @@ return [ 'installation' => 'Installering', 'faq' => 'FAQ', 'changelog' => 'Endringslogg', - 'reviews' => 'Reviews', + 'reviews' => 'Anmeldelser', ], 'installation' => [ 'header' => 'Applikasjonsinstallering', 'download' => 'Laster ned :module.', 'unzip' => 'Pakker ut :module.', - 'file_copy' => 'Copying :module files.', - 'migrate' => 'Applying :module updates.', - 'finish' => 'The update was successfully installed. You will be redirect Update Center.', + 'file_copy' => 'Kopierer filer til :module.', + 'migrate' => 'Legger til :module oppdateringer.', + 'finish' => 'Oppdateringen ble installert. Du vil bli videresendt til Oppdateringssenter.', 'install' => 'Installerer :module.', ], 'errors' => [ - 'download' => ':module can not download!', - 'upload' => 'Downloaded :module can not saved!', - 'unzip' => ':module can not unzip!', - 'file_copy' => ':module files can not copy!', - 'migrate' => ':module migrate broken!', - 'migrate core' => ':module already latest version so then yon can not update.', + 'download' => ':module kan ikke lastes ned!', + 'upload' => 'Nedlastet :module kan ikke lagres!', + 'unzip' => ':module kan ikke pakkes ut!', + 'file_copy' => ':module filer kan ikke kopieres!', + 'migrate' => ':module migrasjon mislykket!', + 'migrate core' => ':module er allerede siste versjon, så du kan ikke oppdatere.', ], 'badge' => [ - 'installed' => 'Installed', + 'installed' => 'Innstallert', ], 'button' => [ @@ -67,14 +70,14 @@ return [ ], 'my' => [ - 'purchased' => 'Purchased', - 'installed' => 'Installed', + 'purchased' => 'Kjøpt', + 'installed' => 'Installert', ], 'reviews' => [ 'button' => [ - 'add' => 'Add a Review' + 'add' => 'Legg til anmeldelse' ], - 'na' => 'There are no reviews.' + 'na' => 'Det er ingen anmeldelser.' ] ]; diff --git a/resources/lang/nb-NO/notifications.php b/resources/lang/nb-NO/notifications.php index 88c2f9da0..3a928f448 100644 --- a/resources/lang/nb-NO/notifications.php +++ b/resources/lang/nb-NO/notifications.php @@ -2,9 +2,9 @@ return [ - 'whoops' => 'Whoops!', - 'hello' => 'Hello!', - 'salutation' => 'Regards,
:company_name', - 'subcopy' => 'If you’re having trouble clicking the ":text" button, copy and paste the URL below into your web browser: [:url](:url)', + 'whoops' => 'Uff!', + 'hello' => 'God dag!', + 'salutation' => 'Vennlig hilsen
:company_name', + 'subcopy' => 'Hvis du har problememer med å klikke på ":text" knappen, vennligst kopier følgende URL til din nettleser: [:url](:url)', ]; diff --git a/resources/lang/nb-NO/passwords.php b/resources/lang/nb-NO/passwords.php index 3ca6625a9..4b4d8b53e 100644 --- a/resources/lang/nb-NO/passwords.php +++ b/resources/lang/nb-NO/passwords.php @@ -13,7 +13,7 @@ return [ | */ - 'password' => 'Passord må inneholde minst seks tegn, og også være være lik bekreftelsen.', + 'password' => 'Passord må inneholde minst seks tegn og være være lik bekreftelsen.', 'reset' => 'Passordet ble endret.', 'sent' => 'Vi har sendt deg en lenke på e-post, som du kan klikke på for å endre passord.', 'token' => 'Nullstillingskode for passord er ugyldig.', diff --git a/resources/lang/nb-NO/reconciliations.php b/resources/lang/nb-NO/reconciliations.php index 0ab0e4022..e42327236 100644 --- a/resources/lang/nb-NO/reconciliations.php +++ b/resources/lang/nb-NO/reconciliations.php @@ -2,13 +2,15 @@ return [ - 'reconcile' => 'Reconcile', - 'reconciled' => 'Reconciled', - 'closing_balance' => 'Closing Balance', - 'unreconciled' => 'Unreconciled', - 'list_transactions' => 'List Transactions', - 'start_date' => 'Start Date', - 'end_date' => 'End Date', - 'cleared_amount' => 'Cleared Amount', + 'reconcile' => 'Avstem', + 'reconciled' => 'Avstemt', + 'closing_balance' => 'Sluttbalanse', + 'unreconciled' => 'Uavstemt', + 'list_transactions' => 'Vis transaksjoner', + 'start_date' => 'Startdato', + 'end_date' => 'Sluttdato', + 'cleared_amount' => 'Klarert beløp', + 'deposit' => 'Innskudd', + 'withdrawal' => 'Uttak', ]; diff --git a/resources/lang/nb-NO/reports.php b/resources/lang/nb-NO/reports.php index fa6773283..9361d06f4 100644 --- a/resources/lang/nb-NO/reports.php +++ b/resources/lang/nb-NO/reports.php @@ -16,7 +16,7 @@ return [ 'summary' => [ 'income' => 'Inntektsammendrag', 'expense' => 'Utgiftsammendrag', - 'income_expense' => 'Inntekter mot utgifter', + 'income_expense' => 'Inntekt mot utgift', 'tax' => 'Avgiftsammendrag', ], diff --git a/resources/lang/nb-NO/settings.php b/resources/lang/nb-NO/settings.php index 6b4af56d2..b558fc983 100644 --- a/resources/lang/nb-NO/settings.php +++ b/resources/lang/nb-NO/settings.php @@ -33,16 +33,16 @@ return [ 'digit' => 'Antall siffer', 'next' => 'Neste nummer', 'logo' => 'Logo', - 'custom' => 'Custom', - 'item_name' => 'Item Name', - 'item' => 'Items', - 'product' => 'Products', - 'service' => 'Services', - 'price_name' => 'Price Name', - 'price' => 'Price', - 'rate' => 'Rate', - 'quantity_name' => 'Quantity Name', - 'quantity' => 'Quantity', + 'custom' => 'Tilpasset', + 'item_name' => 'Artikkelnavn', + 'item' => 'Artikler', + 'product' => 'Produkter', + 'service' => 'Tjenester', + 'price_name' => 'Prisnavn', + 'price' => 'Pris', + 'rate' => 'Sats', + 'quantity_name' => 'Kvantitetsnavn', + 'quantity' => 'Kvantitet', ], 'default' => [ 'tab' => 'Standardinnstilinger', @@ -76,8 +76,8 @@ return [ 'bill_days' => 'Antall dager før forfall for utsending', 'cron_command' => 'Cron-kommando', 'schedule_time' => 'Tid for kjøring', - 'send_item_reminder'=> 'Send Item Reminder', - 'item_stocks' => 'Send When Item Stock', + 'send_item_reminder'=> 'Send artikkelpåminnelse', + 'item_stocks' => 'Send en lagerpåminnelse', ], 'appearance' => [ 'tab' => 'Utseende', diff --git a/resources/lang/nb-NO/taxes.php b/resources/lang/nb-NO/taxes.php index 0ff1ac99f..7ef0cceac 100644 --- a/resources/lang/nb-NO/taxes.php +++ b/resources/lang/nb-NO/taxes.php @@ -4,5 +4,8 @@ return [ 'rate' => 'Sats', 'rate_percent' => 'Sats (%)', + 'normal' => 'Normal', + 'inclusive' => 'Inklusiv', + 'compound' => 'Tillegg', ]; diff --git a/resources/lang/nb-NO/transfers.php b/resources/lang/nb-NO/transfers.php index 4a2a76875..387bb2234 100644 --- a/resources/lang/nb-NO/transfers.php +++ b/resources/lang/nb-NO/transfers.php @@ -6,7 +6,7 @@ return [ 'to_account' => 'Til konto', 'messages' => [ - 'delete' => ':from to :to (:amount)', + 'delete' => ':from til :to (:amount)', ], ]; diff --git a/resources/lang/nb-NO/validation.php b/resources/lang/nb-NO/validation.php index 70520da6a..48ed1e6fc 100644 --- a/resources/lang/nb-NO/validation.php +++ b/resources/lang/nb-NO/validation.php @@ -101,8 +101,8 @@ return [ 'attribute-name' => [ 'rule-name' => 'custom-message', ], - 'invalid_currency' => 'The :attribute code is invalid.', - 'invalid_amount' => 'The amount :attribute is invalid.', + 'invalid_currency' => ':attribute koden er feil.', + 'invalid_amount' => 'Beløpets :attribute er feil.', ], /* diff --git a/resources/lang/nl-NL/bills.php b/resources/lang/nl-NL/bills.php index dc30e1e3a..7beede705 100644 --- a/resources/lang/nl-NL/bills.php +++ b/resources/lang/nl-NL/bills.php @@ -41,7 +41,7 @@ return [ 'messages' => [ 'received' => 'Factuur als \'succesvol ontvangen\' gemarkeerd!', - 'draft' => 'This is a DRAFT bill and will be reflected to charts after it gets received.', + 'draft' => 'Dit is een CONCEPT factuur en zal in de statistieken terugkomen zodra het is ontvangen.', 'status' => [ 'created' => 'Gemaakt op :date', diff --git a/resources/lang/nl-NL/modules.php b/resources/lang/nl-NL/modules.php index 423317181..2c782767e 100644 --- a/resources/lang/nl-NL/modules.php +++ b/resources/lang/nl-NL/modules.php @@ -23,6 +23,9 @@ return [ 'added' => 'Toegevoegd', 'updated' => 'Bijgewerkt', 'compatibility' => 'Compatibiliteit', + 'documentation' => 'Documentation', + 'view' => 'View', + 'back' => 'Back', 'installed' => ':module geïnstalleerd', 'uninstalled' => ':module verwijderd', diff --git a/resources/lang/pt-BR/bills.php b/resources/lang/pt-BR/bills.php index 51b1e486a..cd2a3b82a 100644 --- a/resources/lang/pt-BR/bills.php +++ b/resources/lang/pt-BR/bills.php @@ -41,7 +41,7 @@ return [ 'messages' => [ 'received' => 'Conta marcada como recebida com sucesso!', - 'draft' => 'Este é um RASCUNHO de fatura e será refletida nos gráficos depois que ela for recebida.', + 'draft' => 'This is a DRAFT bill and will be reflected to charts after it gets received.', 'status' => [ 'created' => 'Criado em :date', diff --git a/resources/lang/pt-BR/general.php b/resources/lang/pt-BR/general.php index 3c54407ea..d40b561e6 100644 --- a/resources/lang/pt-BR/general.php +++ b/resources/lang/pt-BR/general.php @@ -40,8 +40,6 @@ return [ 'others' => 'Outro | Outros', 'contacts' => 'Contato|Contatos', 'reconciliations' => 'Reconciliação|Reconciliações', - 'deposits' => 'Deposito|Depositos', - 'withdrawals' => 'Retirada|Retiradas', 'dashboard' => 'Painel', 'banking' => 'Banco', diff --git a/resources/lang/pt-BR/messages.php b/resources/lang/pt-BR/messages.php index c944b1c26..b3e85e48a 100644 --- a/resources/lang/pt-BR/messages.php +++ b/resources/lang/pt-BR/messages.php @@ -11,6 +11,7 @@ return [ 'enabled' => ': tipo habilitado!', 'disabled' => ': tipo desativado!', ], + 'error' => [ 'over_payment' => 'Erro: Pagamento não adicionado! O valor que você inseriu passa o total: :amount', 'not_user_company' => 'Erro: você não tem permissão para gerenciar esta empresa!', @@ -21,9 +22,11 @@ return [ 'import_column' => 'Erro: :message Planilha: :sheet. Número da linha: :line.', 'import_sheet' => 'Erro: Planilha não é válida. Por favor, verifique o arquivo de exemplo.', ], + 'warning' => [ 'deleted' => 'Aviso: Você não têm permissão para excluir :name, porque possui o :text relacionado.', 'disabled' => 'Aviso: Você não tem permissão para desativar :name, porque tem :text relacionado.', + 'disable_code' => 'Aviso: você não tem permissão para desativar ou alterar a moeda de :name porque possui :text relacionado.', ], ]; diff --git a/resources/lang/pt-BR/modules.php b/resources/lang/pt-BR/modules.php index 6b9443868..2409886ed 100644 --- a/resources/lang/pt-BR/modules.php +++ b/resources/lang/pt-BR/modules.php @@ -23,6 +23,9 @@ return [ 'added' => 'Adicionado', 'updated' => 'Atualizado', 'compatibility' => 'Compatibilidade', + 'documentation' => 'Documentação', + 'view' => 'Ver', + 'back' => 'Voltar', 'installed' => ':module instalado', 'uninstalled' => ':module removido', diff --git a/resources/lang/pt-BR/reconciliations.php b/resources/lang/pt-BR/reconciliations.php index 01b7ee59c..543384efa 100644 --- a/resources/lang/pt-BR/reconciliations.php +++ b/resources/lang/pt-BR/reconciliations.php @@ -10,5 +10,7 @@ return [ 'start_date' => 'Data de início', 'end_date' => 'Data Final', 'cleared_amount' => 'Quantidade liberada', + 'deposit' => 'Depósito', + 'withdrawal' => 'Saque', ]; diff --git a/resources/lang/sq-AL/general.php b/resources/lang/sq-AL/general.php index 10ac8ebba..f33659dfe 100644 --- a/resources/lang/sq-AL/general.php +++ b/resources/lang/sq-AL/general.php @@ -40,8 +40,6 @@ return [ 'others' => 'Tjetër | Të tjera', 'contacts' => 'Kontakti | Kontaktet', 'reconciliations' => 'Pajtimi | Pajtimet', - 'deposits' => 'Depozita | Depozitat', - 'withdrawals' => 'Tërheqje | Tërheqjet', 'dashboard' => 'Paneli Kryesor', 'banking' => 'Veprime Bankare', diff --git a/resources/lang/sq-AL/messages.php b/resources/lang/sq-AL/messages.php index c2db3d396..1a4fec046 100644 --- a/resources/lang/sq-AL/messages.php +++ b/resources/lang/sq-AL/messages.php @@ -11,6 +11,7 @@ return [ 'enabled' => ':type aktivizuar!', 'disabled' => ':type çaktivizuar!', ], + 'error' => [ 'over_payment' => 'Gabim: Pagesa nuk u shtua! Shuma që keni futur kalon totalin: amount', 'not_user_company' => 'Gabim: Nuk ju lejohet të menaxhoni këtë kompani!', @@ -21,9 +22,11 @@ return [ 'import_column' => 'Gabim: :message Fleta name: :sheet. Rreshti number: :line.', 'import_sheet' => 'Gabim: Emri i fletës nuk është i vlefshëm. Ju lutem, kontrolloni skedarin e mostrës.', ], + 'warning' => [ 'deleted' => 'Njoftim: :name nuk mund të fshihet sepse ka :text të lidhur.', 'disabled' => 'Njoftim: :name nuk mund të disable sepse ka :text të lidhur.', + 'disable_code' => 'Njoftim: Nuk ju lejohet të çaktivizoni ose të ndryshoni monedhën e :name, sepse ajo ka :text e lidhur.', ], ]; diff --git a/resources/lang/sq-AL/modules.php b/resources/lang/sq-AL/modules.php index 3a33d492a..2c6596d43 100644 --- a/resources/lang/sq-AL/modules.php +++ b/resources/lang/sq-AL/modules.php @@ -23,6 +23,9 @@ return [ 'added' => 'Shtuar', 'updated' => 'Përditësuar', 'compatibility' => 'Pajtueshmëri', + 'documentation' => 'Dokumentacioni', + 'view' => 'Pamje', + 'back' => 'Mbrapa', 'installed' => ':module instaluar', 'uninstalled' => ':module çinstaluar', diff --git a/resources/lang/sq-AL/reconciliations.php b/resources/lang/sq-AL/reconciliations.php index 3c8ac784c..3b5f35cab 100644 --- a/resources/lang/sq-AL/reconciliations.php +++ b/resources/lang/sq-AL/reconciliations.php @@ -10,5 +10,7 @@ return [ 'start_date' => 'Data e Fillimit', 'end_date' => 'Data e Mbarimit', 'cleared_amount' => 'Shuma e Pastruar', + 'deposit' => 'Depozite', + 'withdrawal' => 'Tërheqje', ]; diff --git a/resources/lang/sr-RS/customers.php b/resources/lang/sr-RS/customers.php index 7f1730f82..31e75f5b8 100644 --- a/resources/lang/sr-RS/customers.php +++ b/resources/lang/sr-RS/customers.php @@ -10,7 +10,7 @@ return [ ], 'notification' => [ - 'message' => ': купац направио: износ уплате на број фактуре: инвоице_нумбер.', + 'message' => ':customer је уплатио :amount по фактури број :invoice_number.', 'button' => 'Прикажи', ], ]; diff --git a/resources/lang/sr-RS/dashboard.php b/resources/lang/sr-RS/dashboard.php index ebd5f922a..3dc88b4ef 100644 --- a/resources/lang/sr-RS/dashboard.php +++ b/resources/lang/sr-RS/dashboard.php @@ -10,7 +10,7 @@ return [ 'payables' => 'Дуговања', 'open_bills' => 'Отворени рачуни', 'overdue_bills' => 'Неплаћени рачуни', - 'total_profit' => 'Укупна допит', + 'total_profit' => 'Укупна добит', 'open_profit' => 'Отворена добит', 'overdue_profit' => 'Доспела добит', 'cash_flow' => 'Новчани ток', diff --git a/resources/lang/sr-RS/footer.php b/resources/lang/sr-RS/footer.php index 90a479941..07c319721 100644 --- a/resources/lang/sr-RS/footer.php +++ b/resources/lang/sr-RS/footer.php @@ -5,6 +5,6 @@ return [ 'version' => 'Верзија', 'powered' => 'Омогућио вам је Akaunting', 'link' => 'https://akaunting.com', - 'software' => 'Слободан рачуноводсвени програм', + 'software' => 'Слободан рачуноводствени програм', ]; diff --git a/resources/lang/sr-RS/general.php b/resources/lang/sr-RS/general.php index 6b5d69143..0feea22db 100644 --- a/resources/lang/sr-RS/general.php +++ b/resources/lang/sr-RS/general.php @@ -40,8 +40,6 @@ return [ 'others' => 'Остали|Остало', 'contacts' => 'Контакт|Контакти', 'reconciliations' => 'Сравњење|Сравњивања', - 'deposits' => 'Депозит|Депозити', - 'withdrawals' => 'Опозив|Опозиви', 'dashboard' => 'Контролна табла', 'banking' => 'Банкарство', diff --git a/resources/lang/sr-RS/invoices.php b/resources/lang/sr-RS/invoices.php index e2546a9b3..629f0bf2a 100644 --- a/resources/lang/sr-RS/invoices.php +++ b/resources/lang/sr-RS/invoices.php @@ -61,7 +61,7 @@ return [ ], 'notification' => [ - 'message' => 'Примили сте ову е-пошту јер имате долазну :amount фактуру за :customer.', + 'message' => 'Примили сте ову е-пошту јер имате долазну фактуру од :amount за :customer.', 'button' => 'Платите сада', ], diff --git a/resources/lang/sr-RS/messages.php b/resources/lang/sr-RS/messages.php index 28b3827e3..9bb03b708 100644 --- a/resources/lang/sr-RS/messages.php +++ b/resources/lang/sr-RS/messages.php @@ -11,6 +11,7 @@ return [ 'enabled' => ':type омогућен!', 'disabled' => ':type онемогућен!', ], + 'error' => [ 'over_payment' => 'Грешка: Уплата није додата! Износ који сте унели прелази укупан износ: :amount', 'not_user_company' => 'Грешка: Није вам дозвољено управљање овом фирмом!', @@ -21,9 +22,11 @@ return [ 'import_column' => 'Грешка: :message Назив табле: :sheet. Број линије: :line.', 'import_sheet' => 'Грешка: Назив табле није валидан. Молимо Вас, проверите фајл узорак.', ], + 'warning' => [ 'deleted' => 'Упозорење: Није вам дозвољено да избришете :name јер постоји веза са :text.', 'disabled' => 'Упозорење: Није вам дозвољено да онемогућите :name јер постоји веза са :text.', + 'disable_code' => 'Warning: You are not allowed to disable or change the currency of :name because it has :text related.', ], ]; diff --git a/resources/lang/sr-RS/modules.php b/resources/lang/sr-RS/modules.php index 4c4b2b81b..64b948781 100644 --- a/resources/lang/sr-RS/modules.php +++ b/resources/lang/sr-RS/modules.php @@ -23,6 +23,9 @@ return [ 'added' => 'Додато', 'updated' => 'Ажурирано', 'compatibility' => 'Компатибилност', + 'documentation' => 'Documentation', + 'view' => 'View', + 'back' => 'Back', 'installed' => ':module инсталирана', 'uninstalled' => ':module разинсталирана', diff --git a/resources/lang/sr-RS/notifications.php b/resources/lang/sr-RS/notifications.php index 8afe2a52d..f8ec72499 100644 --- a/resources/lang/sr-RS/notifications.php +++ b/resources/lang/sr-RS/notifications.php @@ -2,9 +2,9 @@ return [ - 'whoops' => 'Ууупс!', + 'whoops' => 'Упс!', 'hello' => 'Здраво!', - 'salutation' => 'Поздрави,
:company_name', - 'subcopy' => 'Ако имате проблема кликнути на „:text” дугме, копирајте и налепите УРЛ адресу испод у wеб прегледачу: [:url](:url)', + 'salutation' => 'С поштовањем,
:company_name', + 'subcopy' => 'Ако имате проблема кликнути на „:text” дугме, копирајте и налепите УРЛ адресу испод у веб прегледачу: [:url](:url)', ]; diff --git a/resources/lang/sr-RS/reconciliations.php b/resources/lang/sr-RS/reconciliations.php index efafb7583..25f44b432 100644 --- a/resources/lang/sr-RS/reconciliations.php +++ b/resources/lang/sr-RS/reconciliations.php @@ -10,5 +10,7 @@ return [ 'start_date' => 'Датум почетка', 'end_date' => 'Датум завршетка', 'cleared_amount' => 'Очишћен износ', + 'deposit' => 'Deposit', + 'withdrawal' => 'Withdrawal', ]; diff --git a/resources/lang/sr-RS/taxes.php b/resources/lang/sr-RS/taxes.php index 972241848..508d866c0 100644 --- a/resources/lang/sr-RS/taxes.php +++ b/resources/lang/sr-RS/taxes.php @@ -5,7 +5,7 @@ return [ 'rate' => 'Стопа', 'rate_percent' => 'Стопа (%)', 'normal' => 'Нормално', - 'inclusive' => 'Укључујући', - 'compound' => 'Спој', + 'inclusive' => 'Укључен', + 'compound' => 'Кумулативан', ]; diff --git a/resources/lang/tr-TR/modules.php b/resources/lang/tr-TR/modules.php index 25b6d336c..4a741c086 100644 --- a/resources/lang/tr-TR/modules.php +++ b/resources/lang/tr-TR/modules.php @@ -23,6 +23,9 @@ return [ 'added' => 'Ekleme Tarihi', 'updated' => 'Güncelleme Tarihi', 'compatibility' => 'Uyumluluk', + 'documentation' => 'Dökümantasyon', + 'view' => 'Görüntüle', + 'back' => 'Geri', 'installed' => ':module yüklendi', 'uninstalled' => ':module kaldırıldı', @@ -34,7 +37,7 @@ return [ 'installation' => 'Yükleme', 'faq' => 'SSS', 'changelog' => 'Değişiklikler', - 'reviews' => 'İncelemeler', + 'reviews' => 'Yorumlar', ], 'installation' => [ @@ -73,8 +76,8 @@ return [ 'reviews' => [ 'button' => [ - 'add' => 'İnceleme Ekle' + 'add' => 'Yorum Ekle' ], - 'na' => 'Herhangi bir inceleme yok.' + 'na' => 'Herhangi bir yorum yok.' ] ]; From fb9ca669443886e3876d7e52538146197ebb383b Mon Sep 17 00:00:00 2001 From: denisdulici Date: Tue, 11 Dec 2018 16:58:10 +0300 Subject: [PATCH 05/36] changed vendor text --- resources/lang/en-GB/general.php | 1 + resources/views/modules/item/show.blade.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lang/en-GB/general.php b/resources/lang/en-GB/general.php index 59ae36859..0e4d963ea 100644 --- a/resources/lang/en-GB/general.php +++ b/resources/lang/en-GB/general.php @@ -40,6 +40,7 @@ return [ 'others' => 'Other|Others', 'contacts' => 'Contact|Contacts', 'reconciliations' => 'Reconciliation|Reconciliations', + 'developers' => 'Developer|Developers', 'dashboard' => 'Dashboard', 'banking' => 'Banking', diff --git a/resources/views/modules/item/show.blade.php b/resources/views/modules/item/show.blade.php index c660f56a2..def259bf8 100644 --- a/resources/views/modules/item/show.blade.php +++ b/resources/views/modules/item/show.blade.php @@ -205,7 +205,7 @@ @if ($module->vendor_name) - {{ trans_choice('general.vendors', 1) }} + {{ trans_choice('general.developers', 1) }} {{ $module->vendor_name }} @endif From f456dd3d436dca08f18ef2af14fe04a432f2107a Mon Sep 17 00:00:00 2001 From: cuneytsenturk Date: Tue, 11 Dec 2018 17:21:11 +0300 Subject: [PATCH 06/36] Module review and home page syntax fixed --- resources/views/modules/home/index.blade.php | 6 +++ .../views/partials/modules/reviews.blade.php | 54 ++++++++++--------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/resources/views/modules/home/index.blade.php b/resources/views/modules/home/index.blade.php index 38db3756e..11d966195 100644 --- a/resources/views/modules/home/index.blade.php +++ b/resources/views/modules/home/index.blade.php @@ -11,6 +11,7 @@ @include('partials.modules.bar')
+ @if ($paid)

{{ trans('modules.top_paid') }}

@@ -24,7 +25,9 @@ @include('partials.modules.no_apps') @endif
+ @endif + @if ($new)

{{ trans('modules.new') }}

@@ -38,7 +41,9 @@ @include('partials.modules.no_apps') @endif
+ @endif + @if ($free)

{{ trans('modules.top_free') }}

@@ -52,5 +57,6 @@ @include('partials.modules.no_apps') @endif
+ @endif
@endsection \ No newline at end of file diff --git a/resources/views/partials/modules/reviews.blade.php b/resources/views/partials/modules/reviews.blade.php index eaee484f3..2e125d8f5 100644 --- a/resources/views/partials/modules/reviews.blade.php +++ b/resources/views/partials/modules/reviews.blade.php @@ -1,60 +1,62 @@
@foreach($reviews->data as $review) -
-
- {{ $review->author }} - - {{ $review->author }} - - @for($i = 1; $i <= $review->rating; $i++) - - @endfor - @for($i = $review->rating; $i < 5; $i++) - - @endfor - +
+
+ {{ $review->author }} + + {{ $review->author }} + + @for($i = 1; $i <= $review->rating; $i++) + + @endfor + @for($i = $review->rating; $i < 5; $i++) + + @endfor - {{ \Carbon\Carbon::parse($review->created_at)->format('F d, Y') }} -
- -

- {!! nl2br($review->text) !!} -

+ + {{ Date::parse($review->created_at)->format($date_format) }}
+

+ {!! nl2br($review->text) !!} +

+
@endforeach @stack('pagination_start') + @php $review_first_item = count($reviews->data) > 0 ? ($reviews->current_page - 1) * $reviews->per_page + 1 : null; $review_last_item = count($reviews->data) > 0 ? $review_first_item + count($reviews->data) - 1 : null; @endphp + @if ($review_first_item)
{{ trans('pagination.showing', ['first' => $review_first_item, 'last' => $review_last_item, 'total' => $reviews->total, 'type' => strtolower(trans('modules.tab.reviews'))]) }}
+
    {{-- Previous Page Link --}} @if ($reviews->current_page <= 1) -
  • «
  • +
  • «
  • @else -
  • +
  • @endif {{-- Pagination Elements --}} @for ($page = 1; $page <= $reviews->last_page; $page++) @if ($page == $reviews->current_page) -
  • {{ $page }}
  • +
  • {{ $page }}
  • @else -
  • {{ $page }}
  • +
  • {{ $page }}
  • @endif @endfor {{-- Next Page Link --}} @if ($reviews->current_page != 1) -
  • +
  • @else -
  • »
  • +
  • »
  • @endif
@@ -65,4 +67,4 @@ @endif @stack('pagination_end') -
\ No newline at end of file +
\ No newline at end of file From 6ba3c1f8bc88bda8e70191cd1b2284a4cebad752 Mon Sep 17 00:00:00 2001 From: cuneytsenturk Date: Tue, 11 Dec 2018 17:50:08 +0300 Subject: [PATCH 07/36] Added Wizard Token control --- app/Http/Requests/Wizard/Company.php | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/app/Http/Requests/Wizard/Company.php b/app/Http/Requests/Wizard/Company.php index 114f6877f..c2d708fc8 100644 --- a/app/Http/Requests/Wizard/Company.php +++ b/app/Http/Requests/Wizard/Company.php @@ -2,10 +2,25 @@ namespace App\Http\Requests\Wizard; -use Illuminate\Foundation\Http\FormRequest; +use App\Http\Requests\Request; +use App\Traits\Modules as RemoteModules; +use Illuminate\Validation\Factory as ValidationFactory; -class Company extends FormRequest +class Company extends Request { + use RemoteModules; + + public function __construct(ValidationFactory $validation) + { + $validation->extend( + 'check', + function ($attribute, $value, $parameters) { + return $this->checkToken($value); + }, + trans('messages.error.invalid_token') + ); + } + /** * Determine if the user is authorized to make this request. * @@ -23,8 +38,14 @@ class Company extends FormRequest */ public function rules() { - return [ + $rules = [ 'company_logo' => 'mimes:' . setting('general.file_types') . '|between:0,' . setting('general.file_size') * 1024, ]; + + if (!setting('general.api_token', false)) { + $rules['api_token'] = 'required|string|check'; + } + + return $rules; } } From 8c312ad6cbf5859e99eae425c7f7cc3d51f9db08 Mon Sep 17 00:00:00 2001 From: cuneytsenturk Date: Tue, 11 Dec 2018 18:31:23 +0300 Subject: [PATCH 08/36] close #676 Fixed: Unique link not working. --- app/Http/Controllers/Customers/Invoices.php | 4 +- app/Http/Kernel.php | 6 +++ app/Http/Middleware/SignedUrlCompany.php | 33 +++++++++++++ app/Overrides/Akaunting/SignedUrl.php | 54 +++++++++++++++++++++ routes/web.php | 2 +- 5 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 app/Http/Middleware/SignedUrlCompany.php create mode 100644 app/Overrides/Akaunting/SignedUrl.php diff --git a/app/Http/Controllers/Customers/Invoices.php b/app/Http/Controllers/Customers/Invoices.php index aff6c3b32..a53fb0041 100644 --- a/app/Http/Controllers/Customers/Invoices.php +++ b/app/Http/Controllers/Customers/Invoices.php @@ -184,7 +184,9 @@ class Invoices extends Controller public function link(Invoice $invoice, Request $request) { - session(['company_id' => $invoice->company_id]); + if (empty($invoice)) { + redirect()->route('login'); + } $paid = 0; diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 8f21fcc23..596f625a2 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -73,6 +73,11 @@ class Kernel extends HttpKernel 'company.settings', 'company.currencies', ], + + 'signed' => [ + 'signed-url', + 'signed-url.company', + ] ]; /** @@ -100,5 +105,6 @@ class Kernel extends HttpKernel 'company.currencies' => \App\Http\Middleware\LoadCurrencies::class, 'dateformat' => \App\Http\Middleware\DateFormat::class, 'money' => \App\Http\Middleware\Money::class, + 'signed-url.company' => \App\Http\Middleware\SignedUrlCompany::class, ]; } diff --git a/app/Http/Middleware/SignedUrlCompany.php b/app/Http/Middleware/SignedUrlCompany.php new file mode 100644 index 000000000..88dee5246 --- /dev/null +++ b/app/Http/Middleware/SignedUrlCompany.php @@ -0,0 +1,33 @@ +get('company_id'); + + if (empty($company_id)) { + return $next($request); + } + + // Set company id + session(['company_id' => $company_id]); + + // Set the company settings + setting()->setExtraColumns(['company_id' => $company_id]); + setting()->load(true); + + return $next($request); + } +} diff --git a/app/Overrides/Akaunting/SignedUrl.php b/app/Overrides/Akaunting/SignedUrl.php new file mode 100644 index 000000000..65464c747 --- /dev/null +++ b/app/Overrides/Akaunting/SignedUrl.php @@ -0,0 +1,54 @@ +signatureKey = config('signed-url.signatureKey'); + $this->expiresParameter = config('signed-url.parameters.expires'); + $this->signatureParameter = config('signed-url.parameters.signature'); + } + + /** + * Get a secure URL to a controller action. + * + * @param string $url + * @param \DateTime|int|null $expiration Defaults to the config value + * + * @return string + */ + public function sign($url, $expiration = null) + { + $url .= '?company_id=' . session('company_id'); + + $expiration = $expiration ? $expiration : config('signed-url.default_expiration_time_in_days'); + + return parent::sign($url, $expiration); + } +} diff --git a/routes/web.php b/routes/web.php index eb2910458..737cbc61c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -237,7 +237,7 @@ Route::group(['middleware' => 'language'], function () { }); }); - Route::group(['middleware' => 'signed-url'], function () { + Route::group(['middleware' => 'signed'], function () { Route::group(['prefix' => 'links'], function () { Route::get('invoices/{invoice}', 'Customers\Invoices@link'); Route::get('invoices/{invoice}/print', 'Customers\Invoices@printInvoice'); From 8e67b33c29b691cc8dd5eda341e5900ec598e78f Mon Sep 17 00:00:00 2001 From: denisdulici Date: Tue, 11 Dec 2018 18:42:27 +0300 Subject: [PATCH 09/36] language fix --- resources/lang/en-GB/bills.php | 71 ++++++++-------- resources/lang/en-GB/invoices.php | 85 ++++++++++--------- resources/views/expenses/bills/show.blade.php | 6 +- .../views/incomes/invoices/show.blade.php | 6 +- 4 files changed, 87 insertions(+), 81 deletions(-) diff --git a/resources/lang/en-GB/bills.php b/resources/lang/en-GB/bills.php index 93a3b1f9c..13360748a 100644 --- a/resources/lang/en-GB/bills.php +++ b/resources/lang/en-GB/bills.php @@ -2,54 +2,57 @@ return [ - 'bill_number' => 'Bill Number', - 'bill_date' => 'Bill Date', - 'total_price' => 'Total Price', - 'due_date' => 'Due Date', - 'order_number' => 'Order Number', - 'bill_from' => 'Bill From', + 'bill_number' => 'Bill Number', + 'bill_date' => 'Bill Date', + 'total_price' => 'Total Price', + 'due_date' => 'Due Date', + 'order_number' => 'Order Number', + 'bill_from' => 'Bill From', - 'quantity' => 'Quantity', - 'price' => 'Price', - 'sub_total' => 'Subtotal', - 'discount' => 'Discount', - 'tax_total' => 'Tax Total', - 'total' => 'Total', + 'quantity' => 'Quantity', + 'price' => 'Price', + 'sub_total' => 'Subtotal', + 'discount' => 'Discount', + 'tax_total' => 'Tax Total', + 'total' => 'Total', - 'item_name' => 'Item Name|Item Names', + 'item_name' => 'Item Name|Item Names', - 'show_discount' => ':discount% Discount', - 'add_discount' => 'Add Discount', - 'discount_desc' => 'of subtotal', + 'show_discount' => ':discount% Discount', + 'add_discount' => 'Add Discount', + 'discount_desc' => 'of subtotal', - 'payment_due' => 'Payment Due', - 'amount_due' => 'Amount Due', - 'paid' => 'Paid', - 'histories' => 'Histories', - 'payments' => 'Payments', - 'add_payment' => 'Add Payment', - 'mark_received' => 'Mark Received', - 'download_pdf' => 'Download PDF', - 'send_mail' => 'Send Email', + 'payment_due' => 'Payment Due', + 'amount_due' => 'Amount Due', + 'paid' => 'Paid', + 'histories' => 'Histories', + 'payments' => 'Payments', + 'add_payment' => 'Add Payment', + 'mark_received' => 'Mark Received', + 'download_pdf' => 'Download PDF', + 'send_mail' => 'Send Email', + 'create_bill' => 'Create Bill', + 'receive_bill' => 'Receive Bill', + 'make_payment' => 'Make Payment', 'status' => [ - 'draft' => 'Draft', - 'received' => 'Received', - 'partial' => 'Partial', - 'paid' => 'Paid', + 'draft' => 'Draft', + 'received' => 'Received', + 'partial' => 'Partial', + 'paid' => 'Paid', ], 'messages' => [ - 'received' => 'Bill marked as received successfully!', - 'draft' => 'This is a DRAFT bill and will be reflected to charts after it gets received.', + 'received' => 'Bill marked as received successfully!', + 'draft' => 'This is a DRAFT bill and will be reflected to charts after it gets received.', 'status' => [ - 'created' => 'Created on :date', - 'receive' => [ + 'created' => 'Created on :date', + 'receive' => [ 'draft' => 'Not sent', 'received' => 'Received on :date', ], - 'paid' => [ + 'paid' => [ 'await' => 'Awaiting payment', ], ], diff --git a/resources/lang/en-GB/invoices.php b/resources/lang/en-GB/invoices.php index 63db9f663..e40dd303d 100644 --- a/resources/lang/en-GB/invoices.php +++ b/resources/lang/en-GB/invoices.php @@ -2,67 +2,70 @@ return [ - 'invoice_number' => 'Invoice Number', - 'invoice_date' => 'Invoice Date', - 'total_price' => 'Total Price', - 'due_date' => 'Due Date', - 'order_number' => 'Order Number', - 'bill_to' => 'Bill To', + 'invoice_number' => 'Invoice Number', + 'invoice_date' => 'Invoice Date', + 'total_price' => 'Total Price', + 'due_date' => 'Due Date', + 'order_number' => 'Order Number', + 'bill_to' => 'Bill To', - 'quantity' => 'Quantity', - 'price' => 'Price', - 'sub_total' => 'Subtotal', - 'discount' => 'Discount', - 'tax_total' => 'Tax Total', - 'total' => 'Total', + 'quantity' => 'Quantity', + 'price' => 'Price', + 'sub_total' => 'Subtotal', + 'discount' => 'Discount', + 'tax_total' => 'Tax Total', + 'total' => 'Total', - 'item_name' => 'Item Name|Item Names', + 'item_name' => 'Item Name|Item Names', - 'show_discount' => ':discount% Discount', - 'add_discount' => 'Add Discount', - 'discount_desc' => 'of subtotal', + 'show_discount' => ':discount% Discount', + 'add_discount' => 'Add Discount', + 'discount_desc' => 'of subtotal', - 'payment_due' => 'Payment Due', - 'paid' => 'Paid', - 'histories' => 'Histories', - 'payments' => 'Payments', - 'add_payment' => 'Add Payment', - 'mark_paid' => 'Mark Paid', - 'mark_sent' => 'Mark Sent', - 'download_pdf' => 'Download PDF', - 'send_mail' => 'Send Email', - 'all_invoices' => 'Login to view all invoices', + 'payment_due' => 'Payment Due', + 'paid' => 'Paid', + 'histories' => 'Histories', + 'payments' => 'Payments', + 'add_payment' => 'Add Payment', + 'mark_paid' => 'Mark Paid', + 'mark_sent' => 'Mark Sent', + 'download_pdf' => 'Download PDF', + 'send_mail' => 'Send Email', + 'all_invoices' => 'Login to view all invoices', + 'create_invoice' => 'Create Invoice', + 'send_invoice' => 'Send Invoice', + 'get_paid' => 'Get Paid', 'status' => [ - 'draft' => 'Draft', - 'sent' => 'Sent', - 'viewed' => 'Viewed', - 'approved' => 'Approved', - 'partial' => 'Partial', - 'paid' => 'Paid', + 'draft' => 'Draft', + 'sent' => 'Sent', + 'viewed' => 'Viewed', + 'approved' => 'Approved', + 'partial' => 'Partial', + 'paid' => 'Paid', ], 'messages' => [ - 'email_sent' => 'Invoice email has been sent successfully!', - 'marked_sent' => 'Invoice marked as sent successfully!', - 'email_required' => 'No email address for this customer!', - 'draft' => 'This is a DRAFT invoice and will be reflected to charts after it gets sent.', + 'email_sent' => 'Invoice email has been sent successfully!', + 'marked_sent' => 'Invoice marked as sent successfully!', + 'email_required' => 'No email address for this customer!', + 'draft' => 'This is a DRAFT invoice and will be reflected to charts after it gets sent.', 'status' => [ - 'created' => 'Created on :date', - 'send' => [ + 'created' => 'Created on :date', + 'send' => [ 'draft' => 'Not sent', 'sent' => 'Sent on :date', ], - 'paid' => [ + 'paid' => [ 'await' => 'Awaiting payment', ], ], ], 'notification' => [ - 'message' => 'You are receiving this email because you have an upcoming :amount invoice to :customer customer.', - 'button' => 'Pay Now', + 'message' => 'You are receiving this email because you have an upcoming :amount invoice to :customer customer.', + 'button' => 'Pay Now', ], ]; diff --git a/resources/views/expenses/bills/show.blade.php b/resources/views/expenses/bills/show.blade.php index 9b3168f2b..489feb93f 100644 --- a/resources/views/expenses/bills/show.blade.php +++ b/resources/views/expenses/bills/show.blade.php @@ -29,7 +29,7 @@
-

{{ trans('general.title.create', ['type' => trans_choice('general.bills', 1)]) }}

+

{{ trans('bills.create_bill') }}

{{ trans_choice('general.statuses', 1) . ': ' . trans('bills.messages.status.created', ['date' => Date::parse($bill->created_at)->format($date_format)]) }} @@ -44,7 +44,7 @@
-

{{ trans('general.title.send', ['type' => trans_choice('general.bills', 1)]) }}

+

{{ trans('bills.receive_bill') }}

@if ($bill->status->code == 'draft') @@ -63,7 +63,7 @@
-

{{ trans('general.title.get', ['type' => trans('general.paid')]) }}

+

{{ trans('bills.make_payment') }}

@if($bill->status->code != 'paid' && empty($bill->payments()->count())) diff --git a/resources/views/incomes/invoices/show.blade.php b/resources/views/incomes/invoices/show.blade.php index 058d014ab..ca230a31f 100644 --- a/resources/views/incomes/invoices/show.blade.php +++ b/resources/views/incomes/invoices/show.blade.php @@ -29,7 +29,7 @@
-

{{ trans('general.title.create', ['type' => trans_choice('general.invoices', 1)]) }}

+

{{ trans('invoices.create_invoice') }}

{{ trans_choice('general.statuses', 1) . ': ' . trans('invoices.messages.status.created', ['date' => Date::parse($invoice->created_at)->format($date_format)]) }} @@ -44,7 +44,7 @@
-

{{ trans('general.title.send', ['type' => trans_choice('general.invoices', 1)]) }}

+

{{ trans('invoices.send_invoice') }}

@if ($invoice->status->code != 'sent' && $invoice->status->code != 'partial') @@ -74,7 +74,7 @@
-

{{ trans('general.title.get', ['type' => trans('general.paid')]) }}

+

{{ trans('invoices.get_paid') }}

@if($invoice->status->code != 'paid' && empty($invoice->payments()->count())) From 345fcdb04692b0b87893904fc85223cf2f3bb318 Mon Sep 17 00:00:00 2001 From: Cahya Bagus Sanjaya <9c96b6@gmail.com> Date: Wed, 12 Dec 2018 17:09:44 +0700 Subject: [PATCH 10/36] ignore fonts --- storage/fonts/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 storage/fonts/.gitignore diff --git a/storage/fonts/.gitignore b/storage/fonts/.gitignore new file mode 100644 index 000000000..d6b7ef32c --- /dev/null +++ b/storage/fonts/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore From d32478fff181431d645152889f97618cb147dad8 Mon Sep 17 00:00:00 2001 From: denisdulici Date: Wed, 12 Dec 2018 20:28:16 +0300 Subject: [PATCH 11/36] small fixes --- app/Http/Controllers/Install/Updates.php | 2 +- app/Traits/Modules.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Install/Updates.php b/app/Http/Controllers/Install/Updates.php index c4b171ce4..6d1ed67f1 100644 --- a/app/Http/Controllers/Install/Updates.php +++ b/app/Http/Controllers/Install/Updates.php @@ -83,7 +83,7 @@ class Updates extends Controller public function update($alias, $version) { if ($alias == 'core') { - $name = 'Akaunting v' . $version; + $name = 'Akaunting ' . $version; $installed = version('short'); } else { diff --git a/app/Traits/Modules.php b/app/Traits/Modules.php index 89df5c919..7f1c1d33a 100644 --- a/app/Traits/Modules.php +++ b/app/Traits/Modules.php @@ -3,15 +3,15 @@ namespace App\Traits; use App\Utilities\Info; +use App\Models\Module\Module as Model; use Artisan; +use Cache; +use Date; use File; use GuzzleHttp\Client; use GuzzleHttp\Exception\RequestException; use Module; -use App\Models\Module\Module as MModule; use ZipArchive; -use Cache; -use Date; trait Modules { @@ -148,7 +148,7 @@ trait Modules $installed = []; $modules = Module::all(); - $installed_modules = MModule::where('company_id', '=', session('company_id'))->pluck('status', 'alias')->toArray(); + $installed_modules = Model::where('company_id', '=', session('company_id'))->pluck('status', 'alias')->toArray(); foreach ($modules as $module) { if (!array_key_exists($module->alias, $installed_modules)) { From 9768c47320f4e5505c2706a09796000b57240a4c Mon Sep 17 00:00:00 2001 From: denisdulici Date: Fri, 14 Dec 2018 15:06:20 +0300 Subject: [PATCH 12/36] fixed #630 --- resources/views/common/dashboard/index.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/common/dashboard/index.blade.php b/resources/views/common/dashboard/index.blade.php index f1508d715..920f67a19 100644 --- a/resources/views/common/dashboard/index.blade.php +++ b/resources/views/common/dashboard/index.blade.php @@ -265,8 +265,8 @@ ranges: { '{{ trans("reports.this_year") }}': [moment().startOf('year'), moment().endOf('year')], '{{ trans("reports.previous_year") }}': [moment().subtract(1, 'year').startOf('year'), moment().subtract(1, 'year').endOf('year')], - '{{ trans("reports.this_quarter") }}': [moment().subtract(2, 'months').startOf('month'), moment().endOf('month')], - '{{ trans("reports.previous_quarter") }}': [moment().subtract(5, 'months').startOf('month'), moment().subtract(3, 'months').endOf('month')], + '{{ trans("reports.this_quarter") }}': [moment().startOf('quarter'), moment().endOf('quarter')], + '{{ trans("reports.previous_quarter") }}': [moment().subtract(1, 'quarter').startOf('quarter'), moment().subtract(1, 'quarter').endOf('quarter')], '{{ trans("reports.last_12_months") }}': [moment().subtract(11, 'months').startOf('month'), moment().endOf('month')] } }, cb); From 456335e05b01eaf9bd6a95918533bdc431fe45b6 Mon Sep 17 00:00:00 2001 From: denisdulici Date: Fri, 14 Dec 2018 17:45:50 +0300 Subject: [PATCH 13/36] fix travis --- .travis.yml | 2 +- composer.json | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ee09abcd0..7e9fc52bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ before_install: before_script: - cp .env.testing .env - - composer install --no-interaction + - composer test --no-interaction script: - vendor/bin/phpunit \ No newline at end of file diff --git a/composer.json b/composer.json index bc092a99f..03595dd51 100644 --- a/composer.json +++ b/composer.json @@ -81,6 +81,13 @@ "php artisan clear-compiled", "php artisan optimize", "composer dump-autoload" + ], + "test": [ + "composer install --no-scripts", + "Illuminate\\Foundation\\ComposerScripts::postInstall", + "php artisan clear-compiled", + "php artisan optimize", + "composer dump-autoload" ] }, "config": { From df5eb71cbb97e7c0fb5e3c32ea1e88d8930d9ffa Mon Sep 17 00:00:00 2001 From: cuneytsenturk Date: Tue, 18 Dec 2018 12:55:19 +0300 Subject: [PATCH 14/36] Offline Payment re-factoring --- modules/OfflinePayment/Assets/.gitkeep | 0 modules/OfflinePayment/Config/.gitkeep | 0 modules/OfflinePayment/Config/config.php | 7 --- modules/OfflinePayment/Console/.gitkeep | 0 .../Database/Migrations/.gitkeep | 0 .../OfflinePayment/Database/Seeders/.gitkeep | 0 modules/OfflinePayment/Entities/.gitkeep | 0 modules/OfflinePayment/Events/.gitkeep | 0 .../OfflinePayment/Events/Handlers/.gitkeep | 0 .../OfflinePayment/Http/Controllers/.gitkeep | 0 .../Http/Controllers/OfflinePayment.php | 7 +-- .../Http/Controllers/Settings.php | 3 +- .../OfflinePayment/Http/Middleware/.gitkeep | 0 modules/OfflinePayment/Http/Requests/.gitkeep | 0 modules/OfflinePayment/Http/routes.php | 26 ++++++--- modules/OfflinePayment/Jobs/.gitkeep | 0 .../OfflinePaymentAdminMenu.php | 7 +-- .../OfflinePaymentGateway.php | 2 +- modules/OfflinePayment/Mail/.gitkeep | 0 modules/OfflinePayment/Providers/.gitkeep | 0 .../OfflinePaymentServiceProvider.php | 44 +++++---------- modules/OfflinePayment/Repositories/.gitkeep | 0 .../OfflinePayment/Resources/lang/.gitkeep | 0 .../Resources/lang/en-GB/general.php | 21 ++++++++ .../Resources/lang/en-GB/offlinepayment.php | 16 ------ .../OfflinePayment/Resources/views/.gitkeep | 0 .../Resources/views/confirm.blade.php | 2 +- .../Resources/views/edit.blade.php | 53 +++++++++++++------ .../Resources/views/link.blade.php | 3 +- .../Resources/views/show.blade.php | 3 +- modules/OfflinePayment/Tests/.gitkeep | 0 modules/OfflinePayment/module.json | 4 +- 32 files changed, 107 insertions(+), 91 deletions(-) delete mode 100644 modules/OfflinePayment/Assets/.gitkeep delete mode 100644 modules/OfflinePayment/Config/.gitkeep delete mode 100644 modules/OfflinePayment/Config/config.php delete mode 100644 modules/OfflinePayment/Console/.gitkeep delete mode 100644 modules/OfflinePayment/Database/Migrations/.gitkeep delete mode 100644 modules/OfflinePayment/Database/Seeders/.gitkeep delete mode 100644 modules/OfflinePayment/Entities/.gitkeep delete mode 100644 modules/OfflinePayment/Events/.gitkeep delete mode 100644 modules/OfflinePayment/Events/Handlers/.gitkeep delete mode 100644 modules/OfflinePayment/Http/Controllers/.gitkeep delete mode 100644 modules/OfflinePayment/Http/Middleware/.gitkeep delete mode 100644 modules/OfflinePayment/Http/Requests/.gitkeep delete mode 100644 modules/OfflinePayment/Jobs/.gitkeep rename modules/OfflinePayment/{Events/Handlers => Listeners}/OfflinePaymentAdminMenu.php (81%) rename modules/OfflinePayment/{Events/Handlers => Listeners}/OfflinePaymentGateway.php (86%) delete mode 100644 modules/OfflinePayment/Mail/.gitkeep delete mode 100644 modules/OfflinePayment/Providers/.gitkeep delete mode 100644 modules/OfflinePayment/Repositories/.gitkeep delete mode 100644 modules/OfflinePayment/Resources/lang/.gitkeep create mode 100644 modules/OfflinePayment/Resources/lang/en-GB/general.php delete mode 100644 modules/OfflinePayment/Resources/lang/en-GB/offlinepayment.php delete mode 100644 modules/OfflinePayment/Resources/views/.gitkeep delete mode 100644 modules/OfflinePayment/Tests/.gitkeep diff --git a/modules/OfflinePayment/Assets/.gitkeep b/modules/OfflinePayment/Assets/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Config/.gitkeep b/modules/OfflinePayment/Config/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Config/config.php b/modules/OfflinePayment/Config/config.php deleted file mode 100644 index f580eb589..000000000 --- a/modules/OfflinePayment/Config/config.php +++ /dev/null @@ -1,7 +0,0 @@ - 'OfflinePayment', - -]; diff --git a/modules/OfflinePayment/Console/.gitkeep b/modules/OfflinePayment/Console/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Database/Migrations/.gitkeep b/modules/OfflinePayment/Database/Migrations/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Database/Seeders/.gitkeep b/modules/OfflinePayment/Database/Seeders/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Entities/.gitkeep b/modules/OfflinePayment/Entities/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Events/.gitkeep b/modules/OfflinePayment/Events/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Events/Handlers/.gitkeep b/modules/OfflinePayment/Events/Handlers/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Http/Controllers/.gitkeep b/modules/OfflinePayment/Http/Controllers/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Http/Controllers/OfflinePayment.php b/modules/OfflinePayment/Http/Controllers/OfflinePayment.php index 61218ae71..4074a37d8 100644 --- a/modules/OfflinePayment/Http/Controllers/OfflinePayment.php +++ b/modules/OfflinePayment/Http/Controllers/OfflinePayment.php @@ -4,7 +4,6 @@ namespace Modules\OfflinePayment\Http\Controllers; use App\Events\InvoicePaid; -use Illuminate\Http\Response; use Illuminate\Routing\Controller; use Illuminate\Http\Request; @@ -16,11 +15,12 @@ use SignedUrl; class OfflinePayment extends Controller { + /** * Show the form for editing the specified resource. * @param Invoice * @param PaymentRequest - * @return Response + * @return JSON */ public function show(Invoice $invoice, PaymentRequest $request) { @@ -46,11 +46,12 @@ class OfflinePayment extends Controller 'html' => $html, ]); } + /** * Show the form for editing the specified resource. * @param $invoice * @param $request - * @return Response + * @return JSON */ public function link(Invoice $invoice, PaymentRequest $request) { diff --git a/modules/OfflinePayment/Http/Controllers/Settings.php b/modules/OfflinePayment/Http/Controllers/Settings.php index b0b14e110..9e5fca632 100644 --- a/modules/OfflinePayment/Http/Controllers/Settings.php +++ b/modules/OfflinePayment/Http/Controllers/Settings.php @@ -12,6 +12,7 @@ use Modules\OfflinePayment\Http\Requests\SettingDelete as DRequest; class Settings extends Controller { + /** * Show the form for editing the specified resource. * @@ -66,7 +67,7 @@ class Settings extends Controller Artisan::call('cache:clear'); - return redirect('apps/offlinepayment/settings'); + return redirect()->route('offlinepayment.edit'); } /** diff --git a/modules/OfflinePayment/Http/Middleware/.gitkeep b/modules/OfflinePayment/Http/Middleware/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Http/Requests/.gitkeep b/modules/OfflinePayment/Http/Requests/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Http/routes.php b/modules/OfflinePayment/Http/routes.php index c2c27f400..0dc0b97f7 100644 --- a/modules/OfflinePayment/Http/routes.php +++ b/modules/OfflinePayment/Http/routes.php @@ -1,18 +1,30 @@ ['web', 'auth', 'language', 'adminmenu', 'permission:read-admin-panel'], 'prefix' => 'apps/offlinepayment', 'namespace' => 'Modules\OfflinePayment\Http\Controllers'], function () { - Route::get('settings', 'Settings@edit'); - Route::post('settings', 'Settings@update'); - Route::post('settings/get', 'Settings@get'); - Route::post('settings/delete', 'Settings@delete'); +Route::group([ + 'middleware' => 'admin', + 'prefix' => 'apps/offlinepayment', + 'namespace' => 'Modules\OfflinePayment\Http\Controllers' +], function () { + Route::get('settings', 'Settings@edit')->name('offlinepayment.edit'); + Route::post('settings', 'Settings@update')->name('offlinepayment.update'); + Route::post('settings/get', 'Settings@get')->name('offlinepayment.get'); + Route::post('settings/delete', 'Settings@delete')->name('offlinepayment.delete'); }); -Route::group(['middleware' => ['web', 'auth', 'language', 'customermenu', 'permission:read-customer-panel'], 'prefix' => 'customers', 'namespace' => 'Modules\OfflinePayment\Http\Controllers'], function () { +Route::group([ + 'middleware' => ['web', 'auth', 'language', 'customermenu', 'permission:read-customer-panel'], + 'prefix' => 'customers', + 'namespace' => 'Modules\OfflinePayment\Http\Controllers' +], function () { Route::get('invoices/{invoice}/offlinepayment', 'OfflinePayment@show'); Route::post('invoices/{invoice}/offlinepayment/confirm', 'OfflinePayment@confirm'); }); -Route::group(['middleware' => ['web', 'language'], 'prefix' => 'links', 'namespace' => 'Modules\OfflinePayment\Http\Controllers'], function () { +Route::group([ + 'middleware' => ['web', 'language'], + 'prefix' => 'links', + 'namespace' => 'Modules\OfflinePayment\Http\Controllers' +], function () { Route::group(['middleware' => 'signed-url'], function () { Route::post('invoices/{invoice}/offlinepayment', 'OfflinePayment@link'); Route::post('invoices/{invoice}/offlinepayment/confirm', 'OfflinePayment@confirm'); diff --git a/modules/OfflinePayment/Jobs/.gitkeep b/modules/OfflinePayment/Jobs/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Events/Handlers/OfflinePaymentAdminMenu.php b/modules/OfflinePayment/Listeners/OfflinePaymentAdminMenu.php similarity index 81% rename from modules/OfflinePayment/Events/Handlers/OfflinePaymentAdminMenu.php rename to modules/OfflinePayment/Listeners/OfflinePaymentAdminMenu.php index 3ad2fb310..2aa3bcb6b 100644 --- a/modules/OfflinePayment/Events/Handlers/OfflinePaymentAdminMenu.php +++ b/modules/OfflinePayment/Listeners/OfflinePaymentAdminMenu.php @@ -1,12 +1,13 @@ menu->whereTitle(trans_choice('general.settings', 2)); - $item->url('apps/offlinepayment/settings', trans('offlinepayment::offlinepayment.offlinepayment'), 4, ['icon' => 'fa fa-angle-double-right']); + $item->url('apps/offlinepayment/settings', trans('offlinepayment::general.title'), 4, ['icon' => 'fa fa-angle-double-right']); } } } diff --git a/modules/OfflinePayment/Events/Handlers/OfflinePaymentGateway.php b/modules/OfflinePayment/Listeners/OfflinePaymentGateway.php similarity index 86% rename from modules/OfflinePayment/Events/Handlers/OfflinePaymentGateway.php rename to modules/OfflinePayment/Listeners/OfflinePaymentGateway.php index eaf12a187..2e03b8c46 100644 --- a/modules/OfflinePayment/Events/Handlers/OfflinePaymentGateway.php +++ b/modules/OfflinePayment/Listeners/OfflinePaymentGateway.php @@ -1,6 +1,6 @@ registerTranslations(); - $this->registerConfig(); $this->registerViews(); - $this->registerFactories(); + $this->registerMigrations(); - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); - - $this->app['events']->listen(AdminMenuCreated::class, OfflinePaymentAdminMenu::class); - $this->app['events']->listen(PaymentGatewayListing::class, OfflinePaymentGateway::class); + $this->registerEvents(); } /** @@ -48,21 +43,6 @@ class OfflinePaymentServiceProvider extends ServiceProvider // } - /** - * Register config. - * - * @return void - */ - protected function registerConfig() - { - $this->publishes([ - __DIR__.'/../Config/config.php' => config_path('offlinepayment.php'), - ], 'config'); - $this->mergeConfigFrom( - __DIR__.'/../Config/config.php', 'offlinepayment' - ); - } - /** * Register views. * @@ -99,15 +79,15 @@ class OfflinePaymentServiceProvider extends ServiceProvider } } - /** - * Register an additional directory of factories. - * @source https://github.com/sebastiaanluca/laravel-resource-flow/blob/develop/src/Modules/ModuleServiceProvider.php#L66 - */ - public function registerFactories() + public function registerMigrations() { - if (! app()->environment('production')) { - app(Factory::class)->load(__DIR__ . '/Database/factories'); - } + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + } + + public function registerEvents() + { + $this->app['events']->listen(AdminMenuCreated::class, OfflinePaymentAdminMenu::class); + $this->app['events']->listen(PaymentGatewayListing::class, OfflinePaymentGateway::class); } /** diff --git a/modules/OfflinePayment/Repositories/.gitkeep b/modules/OfflinePayment/Repositories/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Resources/lang/.gitkeep b/modules/OfflinePayment/Resources/lang/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Resources/lang/en-GB/general.php b/modules/OfflinePayment/Resources/lang/en-GB/general.php new file mode 100644 index 000000000..1a159e418 --- /dev/null +++ b/modules/OfflinePayment/Resources/lang/en-GB/general.php @@ -0,0 +1,21 @@ + 'Offline Payments', + + 'add_new' => 'Add New', + 'edit' => 'Edit: :method', + + 'form' => [ + 'code' => 'Code', + 'customer' => 'Show to Customer', + 'order' => 'Order' + ], + + 'payment_gateways' => 'Offline Payment Methods', + + 'confirm' => 'Confirm', + 'loading' => 'Loading', + +]; diff --git a/modules/OfflinePayment/Resources/lang/en-GB/offlinepayment.php b/modules/OfflinePayment/Resources/lang/en-GB/offlinepayment.php deleted file mode 100644 index 541a5c57c..000000000 --- a/modules/OfflinePayment/Resources/lang/en-GB/offlinepayment.php +++ /dev/null @@ -1,16 +0,0 @@ - 'Offline Payments', - 'add_new' => 'Add New', - 'edit' => 'Edit: :method', - 'code' => 'Code', - 'customer' => 'Show to Customer', - 'order' => 'Order', - 'payment_gateways' => 'Offline Payment Methods', - - 'confirm' => 'Confirm', - 'loading' => 'Loading', - -]; diff --git a/modules/OfflinePayment/Resources/views/.gitkeep b/modules/OfflinePayment/Resources/views/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/OfflinePayment/Resources/views/confirm.blade.php b/modules/OfflinePayment/Resources/views/confirm.blade.php index 7ab1f30bf..793869e38 100644 --- a/modules/OfflinePayment/Resources/views/confirm.blade.php +++ b/modules/OfflinePayment/Resources/views/confirm.blade.php @@ -4,4 +4,4 @@
{{ $gateway['description'] }}
-@endif \ No newline at end of file +@endif diff --git a/modules/OfflinePayment/Resources/views/edit.blade.php b/modules/OfflinePayment/Resources/views/edit.blade.php index c7dfd9be3..be5e0b6e2 100644 --- a/modules/OfflinePayment/Resources/views/edit.blade.php +++ b/modules/OfflinePayment/Resources/views/edit.blade.php @@ -1,29 +1,29 @@ @extends('layouts.admin') -@section('title', trans('offlinepayment::offlinepayment.offlinepayment')) +@section('title', trans('offlinepayment::general.title')) @section('content')
-

{{ trans('offlinepayment::offlinepayment.add_new') }}

+

{{ trans('offlinepayment::general.add_new') }}

- {!! Form::open(['url' => 'apps/offlinepayment/settings', 'files' => true, 'role' => 'form']) !!} + {!! Form::open(['route' => 'offlinepayment.update', 'files' => true, 'role' => 'form', 'class' => 'form-loading-button']) !!}
{{ Form::textGroup('name', trans('general.name'), 'id-card-o', ['required' => 'required'], null, 'col-md-12') }} - {{ Form::textGroup('code', trans('offlinepayment::offlinepayment.code'), 'key', ['required' => 'required'], null, 'col-md-12') }} + {{ Form::textGroup('code', trans('offlinepayment::general.form.code'), 'key', ['required' => 'required'], null, 'col-md-12') }} - {{ Form::radioGroup('customer', trans('offlinepayment::offlinepayment.customer'), '', ['required' => 'required'], 0, 'col-md-12') }} + {{ Form::radioGroup('customer', trans('offlinepayment::general.form.customer'), '', ['required' => 'required'], 0, 'col-md-12') }} - {{ Form::textGroup('order', trans('offlinepayment::offlinepayment.order'), 'sort', [], null, 'col-md-12') }} + {{ Form::textGroup('order', trans('offlinepayment::general.form.order'), 'sort', [], null, 'col-md-12') }} {{ Form::textareaGroup('description', trans('general.description')) }}
@@ -38,22 +38,25 @@
+
-

{{ trans('offlinepayment::offlinepayment.payment_gateways') }}

+

{{ trans('offlinepayment::general.payment_gateways') }}

+
+
- - + + @@ -86,13 +89,14 @@ @push('stylesheet') @endpush @@ -115,22 +123,25 @@
{{ trans('general.name') }}{{ trans('offlinepayment::offlinepayment.code') }}{{ trans('offlinepayment::offlinepayment.order') }}{{ trans('offlinepayment::general.form.code') }}{{ trans('offlinepayment::general.form.order') }} {{ trans('general.actions') }}