diff --git a/app/Abstracts/Http/Controller.php b/app/Abstracts/Http/Controller.php
index dbe2a5727..4ed55d0a1 100644
--- a/app/Abstracts/Http/Controller.php
+++ b/app/Abstracts/Http/Controller.php
@@ -39,7 +39,7 @@ abstract class Controller extends BaseController
*/
public function paginate($items, $perPage = 15, $page = null, $options = [])
{
- $perPage = $perPage ?: request('limit', setting('default.list_limit', '25'));
+ $perPage = $perPage ?: (int) request('limit', setting('default.list_limit', '25'));
$page = $page ?: (Paginator::resolveCurrentPage() ?: 1);
diff --git a/app/Abstracts/Model.php b/app/Abstracts/Model.php
index ae5842816..5a88999e8 100644
--- a/app/Abstracts/Model.php
+++ b/app/Abstracts/Model.php
@@ -113,7 +113,7 @@ abstract class Model extends Eloquent implements Ownable
return $query->get();
}
- $limit = $request->get('limit', setting('default.list_limit', '25'));
+ $limit = (int) $request->get('limit', setting('default.list_limit', '25'));
return $query->paginate($limit);
}
diff --git a/app/Http/Controllers/Purchases/Vendors.php b/app/Http/Controllers/Purchases/Vendors.php
index 131a2c56f..d970c6f86 100644
--- a/app/Http/Controllers/Purchases/Vendors.php
+++ b/app/Http/Controllers/Purchases/Vendors.php
@@ -87,7 +87,7 @@ class Vendors extends Controller
$amounts['paid'] += $item->getAmountConvertedToDefault();
});
- $limit = request('limit', setting('default.list_limit', '25'));
+ $limit = (int) request('limit', setting('default.list_limit', '25'));
$transactions = $this->paginate($transactions->sortByDesc('paid_at'), $limit);
$bills = $this->paginate($bills->sortByDesc('issued_at'), $limit);
diff --git a/app/Http/Controllers/Sales/Customers.php b/app/Http/Controllers/Sales/Customers.php
index 4667e5591..351b067c2 100644
--- a/app/Http/Controllers/Sales/Customers.php
+++ b/app/Http/Controllers/Sales/Customers.php
@@ -85,7 +85,7 @@ class Customers extends Controller
$amounts['paid'] += $item->getAmountConvertedToDefault();
});
- $limit = request('limit', setting('default.list_limit', '25'));
+ $limit = (int) request('limit', setting('default.list_limit', '25'));
$transactions = $this->paginate($transactions->sortByDesc('paid_at'), $limit);
$invoices = $this->paginate($invoices->sortByDesc('issued_at'), $limit);
diff --git a/app/Models/Auth/Permission.php b/app/Models/Auth/Permission.php
index 6e89fd53e..31108210f 100644
--- a/app/Models/Auth/Permission.php
+++ b/app/Models/Auth/Permission.php
@@ -42,7 +42,7 @@ class Permission extends LaratrustPermission
$request = request();
$search = $request->get('search');
- $limit = $request->get('limit', setting('default.list_limit', '25'));
+ $limit = (int) $request->get('limit', setting('default.list_limit', '25'));
return $query->usingSearchString($search)->sortable($sort)->paginate($limit);
}
diff --git a/app/Models/Auth/Role.php b/app/Models/Auth/Role.php
index 676ce046f..31523b9ff 100644
--- a/app/Models/Auth/Role.php
+++ b/app/Models/Auth/Role.php
@@ -35,7 +35,7 @@ class Role extends LaratrustRole
$request = request();
$search = $request->get('search');
- $limit = $request->get('limit', setting('default.list_limit', '25'));
+ $limit = (int) $request->get('limit', setting('default.list_limit', '25'));
return $query->usingSearchString($search)->sortable($sort)->paginate($limit);
}
diff --git a/app/Models/Auth/User.php b/app/Models/Auth/User.php
index 3d2c2157e..709ea5b47 100644
--- a/app/Models/Auth/User.php
+++ b/app/Models/Auth/User.php
@@ -176,7 +176,7 @@ class User extends Authenticatable implements HasLocalePreference
$request = request();
$search = $request->get('search');
- $limit = $request->get('limit', setting('default.list_limit', '25'));
+ $limit = (int) $request->get('limit', setting('default.list_limit', '25'));
return $query->usingSearchString($search)->sortable($sort)->paginate($limit);
}
diff --git a/app/Models/Common/Company.php b/app/Models/Common/Company.php
index 033d35a67..8a5662f1b 100644
--- a/app/Models/Common/Company.php
+++ b/app/Models/Common/Company.php
@@ -342,7 +342,7 @@ class Company extends Eloquent implements Ownable
return $query->get();
}
- $limit = $request->get('limit', setting('default.list_limit', '25'));
+ $limit = (int) $request->get('limit', setting('default.list_limit', '25'));
return $query->paginate($limit);
}
diff --git a/app/Transformers/Banking/Account.php b/app/Transformers/Banking/Account.php
index 5c8e2f7a6..d485a0503 100644
--- a/app/Transformers/Banking/Account.php
+++ b/app/Transformers/Banking/Account.php
@@ -20,9 +20,9 @@ class Account extends TransformerAbstract
'number' => $model->number,
'currency_code' => $model->currency_code,
'opening_balance' => $model->opening_balance,
- 'opening_balance_format' => money($model->opening_balance, $model->currency_code, true)->format(),
+ 'opening_balance_formatted' => money($model->opening_balance, $model->currency_code, true)->format(),
'current_balance' => $model->balance,
- 'current_balance_format' => money($model->balance, $model->currency_code, true)->format(),
+ 'current_balance_formatted' => money($model->balance, $model->currency_code, true)->format(),
'bank_name' => $model->bank_name,
'bank_phone' => $model->bank_phone,
'bank_address' => $model->bank_address,
diff --git a/app/Transformers/Banking/Reconciliation.php b/app/Transformers/Banking/Reconciliation.php
index 1829cd625..887a6d1ec 100644
--- a/app/Transformers/Banking/Reconciliation.php
+++ b/app/Transformers/Banking/Reconciliation.php
@@ -25,7 +25,7 @@ class Reconciliation extends TransformerAbstract
'started_at' => $model->started_at->toIso8601String(),
'ended_at' => $model->ended_at->toIso8601String(),
'closing_balance' => $model->closing_balance,
- 'closing_balance_format' => money($model->closing_balance, setting('default.currency'), true)->format(),
+ 'closing_balance_formatted' => money($model->closing_balance, setting('default.currency'), true)->format(),
'reconciled' => $model->reconciled,
'created_by' => $model->created_by,
'created_at' => $model->created_at->toIso8601String(),
diff --git a/app/Transformers/Banking/Transaction.php b/app/Transformers/Banking/Transaction.php
index f5a80c849..d1c33d21c 100644
--- a/app/Transformers/Banking/Transaction.php
+++ b/app/Transformers/Banking/Transaction.php
@@ -28,7 +28,7 @@ class Transaction extends TransformerAbstract
'account_id' => $model->account_id,
'paid_at' => $model->paid_at->toIso8601String(),
'amount' => $model->amount,
- 'amount_format' => money($model->amount, $model->currency_code, true)->format(),
+ 'amount_formatted' => money($model->amount, $model->currency_code, true)->format(),
'currency_code' => $model->currency_code,
'currency_rate' => $model->currency_rate,
'document_id' => $model->document_id,
diff --git a/app/Transformers/Banking/Transfer.php b/app/Transformers/Banking/Transfer.php
index 9d11a85be..d9d771008 100644
--- a/app/Transformers/Banking/Transfer.php
+++ b/app/Transformers/Banking/Transfer.php
@@ -29,7 +29,7 @@ class Transfer extends TransformerAbstract
'to_account' => $income_transaction->account->name,
'to_account_id' => $income_transaction->account->id,
'amount' => $expense_transaction->amount,
- 'amount_format' => money($expense_transaction->amount, $expense_transaction->currency_code, true)->format(),
+ 'amount_formatted' => money($expense_transaction->amount, $expense_transaction->currency_code, true)->format(),
'currency_code' => $expense_transaction->currency_code,
'paid_at' => $expense_transaction->paid_at ? $expense_transaction->paid_at->toIso8601String() : '',
'created_by' => $model->created_by,
diff --git a/app/Transformers/Common/Item.php b/app/Transformers/Common/Item.php
index c5b49e8dd..68846c053 100644
--- a/app/Transformers/Common/Item.php
+++ b/app/Transformers/Common/Item.php
@@ -25,9 +25,9 @@ class Item extends TransformerAbstract
'name' => $model->name,
'description' => $model->description,
'sale_price' => $model->sale_price,
- 'sale_price_format' => money($model->sale_price, setting('default.currency'), true)->format(),
+ 'sale_price_formatted' => money($model->sale_price, setting('default.currency'), true)->format(),
'purchase_price' => $model->purchase_price,
- 'purchase_price_format' => money($model->purchase_price, setting('default.currency'), true)->format(),
+ 'purchase_price_formatted' => money($model->purchase_price, setting('default.currency'), true)->format(),
'category_id' => $model->category_id,
'tax_ids' => $model->tax_ids,
'picture' => $model->picture,
diff --git a/app/Transformers/Document/Document.php b/app/Transformers/Document/Document.php
index 070463a03..8b57ac83b 100644
--- a/app/Transformers/Document/Document.php
+++ b/app/Transformers/Document/Document.php
@@ -31,7 +31,7 @@ class Document extends TransformerAbstract
'issued_at' => $model->issued_at ? $model->issued_at->toIso8601String() : '',
'due_at' => $model->due_at ? $model->due_at->toIso8601String() : '',
'amount' => $model->amount,
- 'amount_format' => money($model->amount, $model->currency_code, true)->format(),
+ 'amount_formatted' => money($model->amount, $model->currency_code, true)->format(),
'currency_code' => $model->currency_code,
'currency_rate' => $model->currency_rate,
'contact_id' => $model->contact_id,
diff --git a/app/Transformers/Document/DocumentItem.php b/app/Transformers/Document/DocumentItem.php
index 1635951b9..60beb328d 100644
--- a/app/Transformers/Document/DocumentItem.php
+++ b/app/Transformers/Document/DocumentItem.php
@@ -21,9 +21,9 @@ class DocumentItem extends TransformerAbstract
'item_id' => $model->item_id,
'name' => $model->name,
'price' => $model->price,
- 'price_format' => money($model->price, $model->document->currency_code, true)->format(),
+ 'price_formatted' => money($model->price, $model->document->currency_code, true)->format(),
'total' => $model->total,
- 'total_format' => money($model->total, $model->document->currency_code, true)->format(),
+ 'total_formatted' => money($model->total, $model->document->currency_code, true)->format(),
'tax' => $model->tax,
'tax_id' => $model->tax_id,
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
diff --git a/app/Transformers/Document/DocumentItemTax.php b/app/Transformers/Document/DocumentItemTax.php
index 305007adb..9b8c41e68 100644
--- a/app/Transformers/Document/DocumentItemTax.php
+++ b/app/Transformers/Document/DocumentItemTax.php
@@ -28,7 +28,7 @@ class DocumentItemTax extends TransformerAbstract
'tax_id' => $model->tax_id,
'name' => $model->name,
'amount' => $model->amount,
- 'amount_format' => money($model->amount, $model->document->currency_code, true)->format(),
+ 'amount_formatted' => money($model->amount, $model->document->currency_code, true)->format(),
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
];
diff --git a/app/Transformers/Document/DocumentTotal.php b/app/Transformers/Document/DocumentTotal.php
index aa0214fad..1c370e20c 100644
--- a/app/Transformers/Document/DocumentTotal.php
+++ b/app/Transformers/Document/DocumentTotal.php
@@ -22,7 +22,7 @@ class DocumentTotal extends TransformerAbstract
'code' => $model->code,
'name' => $model->name,
'amount' => $model->amount,
- 'amount_format' => money($model->amount, $model->document->currency_code, true)->format(),
+ 'amount_formatted' => money($model->amount, $model->document->currency_code, true)->format(),
'sort_order' => $model->sort_order,
'created_at' => $model->created_at ? $model->created_at->toIso8601String() : '',
'updated_at' => $model->updated_at ? $model->updated_at->toIso8601String() : '',
diff --git a/resources/lang/en-GB/header.php b/resources/lang/en-GB/header.php
index 2632643fb..f266fea8e 100644
--- a/resources/lang/en-GB/header.php
+++ b/resources/lang/en-GB/header.php
@@ -6,8 +6,8 @@ return [
'last_login' => 'Last login :time',
'notifications' => [
- 'counter' => '{0} You have no notification|{1} You have :count notification|[2,*] You have :count notifications',
- 'new_apps' => '{1} :count published app|[2,*] :count published apps',
+ 'counter' => '{0} You have no new notifications|{1} You have :count new notification|[2,*] You have :count new notifications',
+ 'new_apps' => '{1} :count new app is published|[2,*] :count new apps published',
'overdue_invoices' => '{1} :count overdue invoice|[2,*] :count overdue invoices',
'upcoming_bills' => '{1} :count upcoming bill|[2,*] :count upcoming bills',
'view_all' => 'View All',
diff --git a/resources/lang/en-GB/notifications.php b/resources/lang/en-GB/notifications.php
index af74a789d..1861b1790 100644
--- a/resources/lang/en-GB/notifications.php
+++ b/resources/lang/en-GB/notifications.php
@@ -70,7 +70,7 @@ return [
'messages' => [
'mark_read' => ':type is read this notification!',
- 'mark_read_all' => ':type is read all notification!',
+ 'mark_read_all' => ':type is read all notifications!',
'new_app' => ':type app published.',
'export' => 'Your :type export file is ready to download.',
'import' => 'Your :type lined :count data is imported successfully.',