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/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/Controller.php b/app/Abstracts/Http/Controller.php
index dfc1b9848..371a635fa 100644
--- a/app/Abstracts/Http/Controller.php
+++ b/app/Abstracts/Http/Controller.php
@@ -82,17 +82,29 @@ abstract class Controller extends BaseController
*
* @return mixed
*/
- public function importExcel($class, $request, $url)
+ public function importExcel($class, $request)
{
try {
Excel::import($class, $request->file('import'));
- } catch (SheetNotFoundException | ErrorException | Exception | Throwable $e) {
- flash($e->getMessage())->error()->important();
- return redirect()->route('import.create', explode('/', $url));
+ $response = [
+ 'success' => true,
+ 'error' => false,
+ 'data' => null,
+ 'message' => '',
+ ];
+ } catch (SheetNotFoundException | ErrorException | Exception | Throwable $e) {
+ $message = $e->getMessage();
+
+ $response = [
+ 'success' => false,
+ 'error' => true,
+ 'data' => null,
+ 'message' => $message,
+ ];
}
- return true;
+ return $response;
}
/**
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/Abstracts/Report.php b/app/Abstracts/Report.php
index 7a060173d..d8684fb3f 100644
--- a/app/Abstracts/Report.php
+++ b/app/Abstracts/Report.php
@@ -277,44 +277,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;
+ }
}
}
@@ -387,16 +371,35 @@ 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_denote') == 'begins') {
+ $i = $financial_year->getStartDate()->copy()->format($this->getYearlyDateFormat());
+ } else {
+ $i = $financial_year->getEndDate()->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->getFinancialQuarters($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;
}
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)
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 b28cc5f46..61a92d008 100644
--- a/app/Http/Controllers/Banking/Transactions.php
+++ b/app/Http/Controllers/Banking/Transactions.php
@@ -42,13 +42,23 @@ class Transactions extends Controller
*/
public function import(ImportRequest $request)
{
- \Excel::import(new Import(), $request->file('import'));
+ $response = $this->importExcel(new Import, $request);
- $message = trans('messages.success.imported', ['type' => trans_choice('general.transactions', 2)]);
+ if ($response['success']) {
+ $response['redirect'] = route('transactions.index');
- flash($message)->success();
+ $message = trans('messages.success.imported', ['type' => trans_choice('general.transactions', 1)]);
- return redirect()->route('transactions.index');
+ flash($message)->success();
+ } else {
+ $response['redirect'] = route('import.create', ['banking', 'transactions']);
+
+ $message = $response['message'];
+
+ flash($message)->error()->important();
+ }
+
+ return response()->json($response);
}
/**
@@ -71,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 70c6fc812..0814f9eeb 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'));
}
/**
@@ -133,7 +80,7 @@ class Transfers extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -148,15 +95,23 @@ class Transfers extends Controller
*/
public function import(ImportRequest $request)
{
- if (true !== $result = $this->importExcel(new Import, $request, 'banking/transfers')) {
- return $result;
+ $response = $this->importExcel(new Import, $request);
+
+ if ($response['success']) {
+ $response['redirect'] = route('transfers.index');
+
+ $message = trans('messages.success.imported', ['type' => trans_choice('general.transfers', 1)]);
+
+ flash($message)->success();
+ } else {
+ $response['redirect'] = route('import.create', ['banking', 'transfers']);
+
+ $message = $response['message'];
+
+ flash($message)->error()->important();
}
- $message = trans('messages.success.imported', ['type' => trans_choice('general.transfers', 2)]);
-
- flash($message)->success();
-
- return redirect()->route('transfers.index');
+ return response()->json($response);
}
/**
@@ -210,7 +165,7 @@ class Transfers extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -236,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 942b43eca..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);
@@ -111,15 +111,23 @@ class Items extends Controller
*/
public function import(ImportRequest $request)
{
- if (true !== $result = $this->importExcel(new Import, $request, 'common/items')) {
- return $result;
+ $response = $this->importExcel(new Import, $request);
+
+ if ($response['success']) {
+ $response['redirect'] = route('items.index');
+
+ $message = trans('messages.success.imported', ['type' => trans_choice('general.items', 1)]);
+
+ flash($message)->success();
+ } else {
+ $response['redirect'] = route('import.create', ['common', 'items']);
+
+ $message = $response['message'];
+
+ flash($message)->error()->important();
}
- $message = trans('messages.success.imported', ['type' => trans_choice('general.items', 2)]);
-
- flash($message)->success();
-
- return redirect()->route('items.index');
+ return response()->json($response);
}
/**
@@ -164,7 +172,7 @@ class Items extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -226,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 d846e96a8..fb8361b01 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.
*
@@ -101,7 +112,7 @@ class Reports extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -163,7 +174,7 @@ class Reports extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -189,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 bf097307e..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);
@@ -128,15 +128,23 @@ class Bills extends Controller
*/
public function import(ImportRequest $request)
{
- if (true !== $result = $this->importExcel(new Import, $request, 'purchases/bills')) {
- return $result;
+ $response = $this->importExcel(new Import, $request);
+
+ if ($response['success']) {
+ $response['redirect'] = route('bills.index');
+
+ $message = trans('messages.success.imported', ['type' => trans_choice('general.bills', 1)]);
+
+ flash($message)->success();
+ } else {
+ $response['redirect'] = route('import.create', ['purchases', 'bills']);
+
+ $message = $response['message'];
+
+ flash($message)->error()->important();
}
- $message = trans('messages.success.imported', ['type' => trans_choice('general.bills', 2)]);
-
- flash($message)->success();
-
- return redirect()->route('bills.index');
+ return response()->json($response);
}
/**
@@ -174,7 +182,7 @@ class Bills extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -200,7 +208,7 @@ class Bills extends Controller
} else {
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -310,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 f3980f8cd..bf8b1851f 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'));
}
/**
@@ -91,7 +101,7 @@ class Payments extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -124,15 +134,23 @@ class Payments extends Controller
*/
public function import(ImportRequest $request)
{
- if (true !== $result = $this->importExcel(new Import, $request, 'purchases/payments')) {
- return $result;
+ $response = $this->importExcel(new Import, $request);
+
+ if ($response['success']) {
+ $response['redirect'] = route('payments.index');
+
+ $message = trans('messages.success.imported', ['type' => trans_choice('general.payments', 1)]);
+
+ flash($message)->success();
+ } else {
+ $response['redirect'] = route('import.create', ['purchases', 'payments']);
+
+ $message = $response['message'];
+
+ flash($message)->error()->important();
}
- $message = trans('messages.success.imported', ['type' => trans_choice('general.payments', 2)]);
-
- flash($message)->success();
-
- return redirect()->route('payments.index');
+ return response()->json($response);
}
/**
@@ -166,7 +184,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'));
}
/**
@@ -192,7 +220,7 @@ class Payments extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -218,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 e0793ac16..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);
@@ -161,15 +161,23 @@ class Vendors extends Controller
*/
public function import(ImportRequest $request)
{
- if (true !== $result = $this->importExcel(new Import, $request, 'purchases/vendors')) {
- return $result;
+ $response = $this->importExcel(new Import, $request);
+
+ if ($response['success']) {
+ $response['redirect'] = route('vendors.index');
+
+ $message = trans('messages.success.imported', ['type' => trans_choice('general.vendors', 1)]);
+
+ flash($message)->success();
+ } else {
+ $response['redirect'] = route('import.create', ['purchases', 'vendors']);
+
+ $message = $response['message'];
+
+ flash($message)->error()->important();
}
- $message = trans('messages.success.imported', ['type' => trans_choice('general.vendors', 2)]);
-
- flash($message)->success();
-
- return redirect()->route('vendors.index');
+ return response()->json($response);
}
/**
@@ -209,7 +217,7 @@ class Vendors extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -271,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 cac9b0a6b..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);
@@ -159,15 +159,23 @@ class Customers extends Controller
*/
public function import(ImportRequest $request)
{
- if (true !== $result = $this->importExcel(new Import, $request, 'sales/customers')) {
- return $result;
+ $response = $this->importExcel(new Import, $request);
+
+ if ($response['success']) {
+ $response['redirect'] = route('customers.index');
+
+ $message = trans('messages.success.imported', ['type' => trans_choice('general.customers', 1)]);
+
+ flash($message)->success();
+ } else {
+ $response['redirect'] = route('import.create', ['sales', 'customers']);
+
+ $message = $response['message'];
+
+ flash($message)->error()->important();
}
- $message = trans('messages.success.imported', ['type' => trans_choice('general.customers', 2)]);
-
- flash($message)->success();
-
- return redirect()->route('customers.index');
+ return response()->json($response);
}
/**
@@ -207,7 +215,7 @@ class Customers extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -269,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 94dbc8867..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);
@@ -127,15 +127,23 @@ class Invoices extends Controller
*/
public function import(ImportRequest $request)
{
- if (true !== $result = $this->importExcel(new Import, $request, 'sales/invoices')) {
- return $result;
+ $response = $this->importExcel(new Import, $request);
+
+ if ($response['success']) {
+ $response['redirect'] = route('invoices.index');
+
+ $message = trans('messages.success.imported', ['type' => trans_choice('general.invoices', 1)]);
+
+ flash($message)->success();
+ } else {
+ $response['redirect'] = route('import.create', ['sales', 'invoices']);
+
+ $message = $response['message'];
+
+ flash($message)->error()->important();
}
- $message = trans('messages.success.imported', ['type' => trans_choice('general.invoices', 2)]);
-
- flash($message)->success();
-
- return redirect()->route('invoices.index');
+ return response()->json($response);
}
/**
@@ -173,7 +181,7 @@ class Invoices extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -199,7 +207,7 @@ class Invoices extends Controller
} else {
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -359,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 15aead9bf..b1f7b73cd 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'));
}
/**
@@ -91,7 +101,7 @@ class Revenues extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -124,15 +134,23 @@ class Revenues extends Controller
*/
public function import(ImportRequest $request)
{
- if (true !== $result = $this->importExcel(new Import, $request, 'sales/revenues')) {
- return $result;
+ $response = $this->importExcel(new Import, $request);
+
+ if ($response['success']) {
+ $response['redirect'] = route('revenues.index');
+
+ $message = trans('messages.success.imported', ['type' => trans_choice('general.revenues', 1)]);
+
+ flash($message)->success();
+ } else {
+ $response['redirect'] = route('import.create', ['sales', 'revenues']);
+
+ $message = $response['message'];
+
+ flash($message)->error()->important();
}
- $message = trans('messages.success.imported', ['type' => trans_choice('general.revenues', 2)]);
-
- flash($message)->success();
-
- return redirect()->route('revenues.index');
+ return response()->json($response);
}
/**
@@ -166,7 +184,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'));
}
/**
@@ -192,7 +220,7 @@ class Revenues extends Controller
$message = $response['message'];
- flash($message)->error();
+ flash($message)->error()->important();
}
return response()->json($response);
@@ -218,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/Localisation.php b/app/Http/Controllers/Settings/Localisation.php
index 6f4b1f709..aff8cd058 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_denote_options = [
+ 'begins' => trans('settings.localisation.financial_denote.begins'),
+ 'ends' => trans('settings.localisation.financial_denote.ends'),
+ ];
+
return view('settings.localisation.edit', compact(
'timezones',
'date_formats',
'date_separators',
'percent_positions',
- 'discount_locations'
+ 'discount_locations',
+ 'financial_denote_options'
));
}
}
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/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..eeee69e28
--- /dev/null
+++ b/app/Http/Middleware/Dropzone.php
@@ -0,0 +1,65 @@
+method(), ['POST', '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/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;
+ }
}
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,
];
}
diff --git a/app/Imports/Banking/Transfers.php b/app/Imports/Banking/Transfers.php
index 62d97de31..fcf796c72 100644
--- a/app/Imports/Banking/Transfers.php
+++ b/app/Imports/Banking/Transfers.php
@@ -8,7 +8,6 @@ use App\Models\Banking\Transfer as Model;
use App\Models\Setting\Category;
use App\Traits\Currencies;
use App\Utilities\Date;
-use PhpOffice\PhpSpreadsheet\Shared\Date as ExcelDate;
class Transfers extends Import
{
@@ -23,7 +22,7 @@ class Transfers extends Import
{
$row = parent::map($row);
- $row['transferred_at'] = Date::parse(ExcelDate::excelToDateTimeObject($row['transferred_at']))->format('Y-m-d');
+ $row['transferred_at'] = Date::parse($row['transferred_at'])->format('Y-m-d');
$row['from_account_id'] = $this->getFromAccountId($row);
$row['to_account_id'] = $this->getToAccountId($row);
$row['expense_transaction_id'] = $this->getExpenseTransactionId($row);
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..ea5733ce1 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->deleteMediaModel($this->transaction, 'attachment', $this->request);
- $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->deleteMediaModel($this->transaction, 'attachment', $this->request);
}
// Recurring
diff --git a/app/Jobs/Document/UpdateDocument.php b/app/Jobs/Document/UpdateDocument.php
index 680b4ab25..7edff00f9 100644
--- a/app/Jobs/Document/UpdateDocument.php
+++ b/app/Jobs/Document/UpdateDocument.php
@@ -46,13 +46,15 @@ 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));
$this->document->attachMedia($media, 'attachment');
}
+ } elseif (!$this->request->file('attachment') && $this->document->attachment) {
+ $this->deleteMediaModel($this->document, 'attachment', $this->request);
}
$this->deleteRelationships($this->document, ['items', 'item_taxes', 'totals']);
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/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();
+ }
+ }
}
/**
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/app/Traits/DateTime.php b/app/Traits/DateTime.php
index 8a34f319b..79b2b2fae 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
@@ -109,14 +110,32 @@ 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_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 = [];
+ $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';
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/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();
+ }
+ }
}
diff --git a/app/View/Components/Documents/Form/Company.php b/app/View/Components/Documents/Form/Company.php
index 7931216b1..1c0e1aa10 100644
--- a/app/View/Components/Documents/Form/Company.php
+++ b/app/View/Components/Documents/Form/Company.php
@@ -3,7 +3,7 @@
namespace App\View\Components\Documents\Form;
use App\Abstracts\View\Components\DocumentForm as Component;
-use Illuminate\Support\Str;
+use App\Models\Common\Company as Model;
class Company extends Component
{
@@ -14,7 +14,7 @@ class Company extends Component
*/
public function render()
{
- $company = user()->companies()->first();
+ $company = Model::find(session('company_id'));
$inputNameType = config('type.' . $this->type . '.route.parameter');
diff --git a/app/View/Components/EmptyPage.php b/app/View/Components/EmptyPage.php
new file mode 100644
index 000000000..afd846c04
--- /dev/null
+++ b/app/View/Components/EmptyPage.php
@@ -0,0 +1,146 @@
+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, $group, $urlDocsPath);
+ $this->checkPermissionCreate = $checkPermissionCreate;
+ $this->permissionCreate = $this->getPermissionCreate($page, $group, $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, $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, $group, $permissionCreate)
+ {
+ if ($permissionCreate) {
+ return $permissionCreate;
+ }
+
+ $pages = [
+ '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;
+ }
+
+ protected function getRouteCreate($page, $routeCreate)
+ {
+ if ($routeCreate) {
+ return $routeCreate;
+ }
+
+ return $page . '.create';
+ }
+}
diff --git a/app/View/Components/SearchString.php b/app/View/Components/SearchString.php
index 090f965c5..86315ee12 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),
@@ -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';
}
@@ -101,19 +105,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::kebab($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)
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/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",
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'],
diff --git a/config/search-string.php b/config/search-string.php
index b0bb646f6..00ff96ba3 100644
--- a/config/search-string.php
+++ b/config/search-string.php
@@ -111,9 +111,23 @@ 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],
+ 'settings.value' => ['searchable' => true],
'enabled' => ['boolean' => true],
],
],
diff --git a/config/setting.php b/config/setting.php
index 6e4eb2620..c3082d162 100644
--- a/config/setting.php
+++ b/config/setting.php
@@ -98,6 +98,7 @@ 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'),
diff --git a/database/factories/Transaction.php b/database/factories/Transaction.php
index 91335775e..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.
@@ -25,21 +25,23 @@ class Transaction extends Factory
public function definition()
{
$types = array_merge($this->getIncomeTypes(), $this->getExpenseTypes());
- $type = $this->faker->randomElement($types);
+ $type = $this->faker->randomElement($types);
- 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()->type($type)->get()->random(1)->pluck('id')->first(),
- 'reference' => $this->faker->text(5),
- 'payment_method' => setting('default.payment_method'),
- ];
+ $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'),
+ ];
}
/**
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);
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;
}
diff --git a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue
index 0fff9b98b..00b750b04 100644
--- a/resources/assets/js/components/AkauntingDropzoneFileUpload.vue
+++ b/resources/assets/js/components/AkauntingDropzoneFileUpload.vue
@@ -11,6 +11,11 @@
![]()
+
+
+
+
+
...
@@ -20,6 +25,10 @@
![]()
+
+
+
+
@@ -107,85 +116,114 @@ 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);
+ }
+
+ if (file.type.indexOf("image") == -1) {
+ let ext = file.name.split('.').pop();
+
+ file.previewElement.querySelector("[data-dz-thumbnail]").classList.add("d-none");
+ file.previewElement.querySelector("[data-dz-name]").classList.remove("d-none");
+
+ if (ext == "pdf") {
+ 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-word]").classList.remove("d-none");
+ } else if ((ext.indexOf("xls") != -1) || (ext.indexOf("xlsx") != -1)) {
+ file.previewElement.querySelector("[data-dz-thumbnail-excel]").classList.remove("d-none");
+ } else {
+ file.previewElement.querySelector("[data-dz-thumbnail-image]").classList.remove("d-none");
+ }
+ }
+ }),
- 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) => {
+ var mockFile = {
+ id: attachment.id,
+ name: attachment.name,
+ size: attachment.size,
+ type: attachment.type,
+ download: attachment.downloadPath,
+ dropzone: 'edit',
+ };
+
+ 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) {
+ 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
- });
- }
},
async mounted() {
diff --git a/resources/assets/js/mixins/global.js b/resources/assets/js/mixins/global.js
index b17e26608..7df0318c2 100644
--- a/resources/assets/js/mixins/global.js
+++ b/resources/assets/js/mixins/global.js
@@ -27,7 +27,6 @@ import NProgressAxios from './../plugins/nprogress-axios';
import { Select, Option, Steps, Step, Button, Link, Tooltip, ColorPicker } from 'element-ui';
import Form from './../plugins/form';
-import { concat } from 'lodash';
export default {
components: {
@@ -95,10 +94,15 @@ export default {
flash_notification.forEach(notify => {
let type = notify.level;
+ let timeout = 5000;
+
+ if (notify.important) {
+ timeout = 0;
+ }
this.$notify({
message: notify.message,
- timeout: 5000,
+ timeout: timeout,
icon: 'fas fa-bell',
type
});
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/assets/js/views/common/imports.js b/resources/assets/js/views/common/imports.js
new file mode 100644
index 000000000..a386f0800
--- /dev/null
+++ b/resources/assets/js/views/common/imports.js
@@ -0,0 +1,31 @@
+/**
+ * First we will load all of this project's JavaScript dependencies which
+ * includes Vue and other libraries. It is a great starting point when
+ * building robust, powerful web applications using Vue and Laravel.
+ */
+
+require('../../bootstrap');
+
+import Vue from 'vue';
+
+import DashboardPlugin from '../../plugins/dashboard-plugin';
+
+import Global from '../../mixins/global';
+import Form from './../../plugins/form';
+
+// plugin setup
+Vue.use(DashboardPlugin);
+
+const app = new Vue({
+ el: '#app',
+
+ mixins: [
+ Global
+ ],
+
+ data: function () {
+ return {
+ form: new Form('import'),
+ }
+ }
+});
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..bdf382b82
--- /dev/null
+++ b/resources/lang/az-AZ/search_string.php
@@ -0,0 +1,20 @@
+ [
+ '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ı',
+ 'expense_account' => 'Göndərən Hesab',
+ 'income_account' => 'Qəbul Edən Hesab',
+ ],
+
+];
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/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/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/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/en-GB/items.php b/resources/lang/en-GB/items.php
index 1ffc7f336..a00c2d803 100644
--- a/resources/lang/en-GB/items.php
+++ b/resources/lang/en-GB/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-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/lang/en-GB/settings.php b/resources/lang/en-GB/settings.php
index 820d8e51d..dc1516ed5 100644
--- a/resources/lang/en-GB/settings.php
+++ b/resources/lang/en-GB/settings.php
@@ -3,18 +3,24 @@
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' => [
'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',
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/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' => 'สกุลไฟล์ไม่รองรับ',
],
/*
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/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/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' => [
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 6c4a63031..de69651de 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) |
@else
- @include('partials.admin.empty_page', ['page' => 'transfers', 'docs_path' => 'banking/transfers'])
+
@endif
@endsection
diff --git a/resources/views/common/import/create.blade.php b/resources/views/common/import/create.blade.php
index b90ff025e..c8b62a05f 100644
--- a/resources/views/common/import/create.blade.php
+++ b/resources/views/common/import/create.blade.php
@@ -6,9 +6,13 @@
@php
$form_open = [
+ 'id' => 'import',
+ '@submit.prevent' => 'onSubmit',
+ '@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
- 'class' => 'form-loading-button'
+ 'class' => 'form-loading-button',
+ 'novalidate' => true
];
if (!empty($route)) {
@@ -26,24 +30,9 @@
{!! trans('import.message', ['link' => url('public/files/import/' . $type . '.xlsx')]) !!}
-
- @stack('import_input_start')
-
-
-
-
-
-
-
-
-
- 
-
-
- {!! $errors->first('import', ' :message ') !!}
-
- @stack('import_input_end')
+ {{ Form::fileGroup('import', '', 'plus', ['dropzone-class' => 'form-file', 'options' => ['acceptedFiles' => '.xls,.xlsx']], null, 'col-md-12') }}
+
{!! Form::close() !!}
@endsection
+
+@push('scripts_start')
+
+@endpush
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/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
diff --git a/resources/views/components/documents/form/advanced.blade.php b/resources/views/components/documents/form/advanced.blade.php
index c9f6f7985..4c70647e4 100644
--- a/resources/views/components/documents/form/advanced.blade.php
+++ b/resources/views/components/documents/form/advanced.blade.php
@@ -26,6 +26,8 @@
{{ Form::selectRemoteAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, $document->category_id ?? setting('default.' . $categoryType . '_category'), ['required' => 'required', 'path' => route('modals.categories.create') . '?type=' . $categoryType, 'remote_action' => route('categories.index'). '?search=type:' . $categoryType], $more_form_class) }}
@endif
+ @else
+ {{ Form::hidden('category_id', $document->category_id ?? setting('default.' . $categoryType . '_category')) }}
@endif
@stack('more_row_end')
diff --git a/resources/views/components/documents/form/company.blade.php b/resources/views/components/documents/form/company.blade.php
index f3621b3be..d9b06cd94 100644
--- a/resources/views/components/documents/form/company.blade.php
+++ b/resources/views/components/documents/form/company.blade.php
@@ -24,12 +24,12 @@
@if (!$hideCompanyEdit)
@if (!$hideFooter)
diff --git a/resources/views/components/documents/form/line-item.blade.php b/resources/views/components/documents/form/line-item.blade.php
index ab86a5609..8cf6758ee 100644
--- a/resources/views/components/documents/form/line-item.blade.php
+++ b/resources/views/components/documents/form/line-item.blade.php
@@ -57,7 +57,7 @@
@if (!$hideDescription)
@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
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 @@
+
+
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'])
diff --git a/resources/views/partials/form/file_group.blade.php b/resources/views/partials/form/file_group.blade.php
index 7591b9a36..1b7158f4d 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' => $value->id,
'name' => $value->filename . '.' . $value->extension,
- 'path' => route('uploads.get', $value->id)
+ 'path' => route('uploads.get', $value->id),
+ 'type' => $value->mime_type,
+ 'size' => $value->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
diff --git a/resources/views/purchases/bills/create.blade.php b/resources/views/purchases/bills/create.blade.php
index e5a797b6d..318226008 100644
--- a/resources/views/purchases/bills/create.blade.php
+++ b/resources/views/purchases/bills/create.blade.php
@@ -3,7 +3,7 @@
@section('title', trans('general.title.new', ['type' => 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')
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') }}
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/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')
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/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') }}
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/localisation/edit.blade.php b/resources/views/settings/localisation/edit.blade.php
index 4d825715e..2018e8346 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_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'), []) }}
{{ Form::selectGroup('date_format', trans('settings.localisation.date.format'), 'calendar', $date_formats, setting('localisation.date_format'), ['autocomplete' => 'off']) }}
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
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');
});
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');
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();
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();
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();
diff --git a/tests/Feature/Purchases/VendorsTest.php b/tests/Feature/Purchases/VendorsTest.php
index ccb2cdda0..f96c57145 100644
--- a/tests/Feature/Purchases/VendorsTest.php
+++ b/tests/Feature/Purchases/VendorsTest.php
@@ -2,8 +2,11 @@
namespace Tests\Feature\Purchases;
+use App\Exports\Purchases\Vendors 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,69 @@ 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();
diff --git a/tests/Feature/Sales/CustomersTest.php b/tests/Feature/Sales/CustomersTest.php
index 9e04fcdf2..ddc78c1e6 100644
--- a/tests/Feature/Sales/CustomersTest.php
+++ b/tests/Feature/Sales/CustomersTest.php
@@ -2,136 +2,201 @@
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
{
- 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 testItShouldNotDeleteCustomerIfHasRelations()
- {
- $this->assertTrue(true);
- //TODO : This will write after done invoice and revenues tests.
- }
+ 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 + 1;
+ }
+ );
+ }
+
+ public function testItShouldExportSelectedCustomers()
+ {
+ $count = 5;
+ $customers = Contact::factory()->customer()->count($count)->create();
+
+ \Excel::fake();
+
+ $this->loginAs()
+ ->post(
+ route('bulk-actions.action', ['group' => 'sales', '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 getRequest()
{
return Contact::factory()->customer()->enabled()->raw();
}
- public function getRequestWithUser()
- {
- $password = $this->faker->password;
+ public function getRequestWithUser()
+ {
+ $password = $this->faker->password;
- return $this->getRequest() + [
- 'create_user' => 'true',
- 'locale' => 'en-GB',
- 'password' => $password,
- 'password_confirmation' => $password,
- ];
- }
+ return $this->getRequest() + [
+ 'create_user' => 'true',
+ 'locale' => 'en-GB',
+ 'password' => $password,
+ 'password_confirmation' => $password,
+ ];
+ }
}
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();
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();
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')
|