moved folders to common directory
This commit is contained in:
parent
7fa629e8b5
commit
b1fd49c507
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use App\Models\Expense\Bill;
|
use App\Models\Expense\Bill;
|
||||||
use App\Notifications\Expense\Bill as Notification;
|
use App\Notifications\Expense\Bill as Notification;
|
||||||
use App\Utilities\Overrider;
|
use App\Utilities\Overrider;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use App\Models\Income\Invoice;
|
use App\Models\Income\Invoice;
|
||||||
use App\Notifications\Income\Invoice as Notification;
|
use App\Notifications\Income\Invoice as Notification;
|
||||||
use App\Utilities\Overrider;
|
use App\Utilities\Overrider;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use App\Models\Expense\BillHistory;
|
use App\Models\Expense\BillHistory;
|
||||||
use App\Models\Income\InvoiceHistory;
|
use App\Models\Income\InvoiceHistory;
|
||||||
use App\Notifications\Expense\Bill as BillNotification;
|
use App\Notifications\Expense\Bill as BillNotification;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Filters\Companies;
|
namespace App\Filters\Common;
|
||||||
|
|
||||||
use EloquentFilter\ModelFilter;
|
use EloquentFilter\ModelFilter;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Filters\Items;
|
namespace App\Filters\Common;
|
||||||
|
|
||||||
use EloquentFilter\ModelFilter;
|
use EloquentFilter\ModelFilter;
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Api\Companies;
|
namespace App\Http\Controllers\Api\Common;
|
||||||
|
|
||||||
use App\Http\Controllers\ApiController;
|
use App\Http\Controllers\ApiController;
|
||||||
use App\Http\Requests\Company\Company as Request;
|
use App\Http\Requests\Common\Company as Request;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use App\Transformers\Company\Company as Transformer;
|
use App\Transformers\Common\Company as Transformer;
|
||||||
use Dingo\Api\Routing\Helpers;
|
use Dingo\Api\Routing\Helpers;
|
||||||
|
|
||||||
class Companies extends ApiController
|
class Companies extends ApiController
|
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Api\Items;
|
namespace App\Http\Controllers\Api\Common;
|
||||||
|
|
||||||
use App\Http\Controllers\ApiController;
|
use App\Http\Controllers\ApiController;
|
||||||
use App\Http\Requests\Item\Item as Request;
|
use App\Http\Requests\Common\Item as Request;
|
||||||
use App\Models\Item\Item;
|
use App\Models\Common\Item;
|
||||||
use App\Transformers\Item\Item as Transformer;
|
use App\Transformers\Common\Item as Transformer;
|
||||||
use Dingo\Api\Routing\Helpers;
|
use Dingo\Api\Routing\Helpers;
|
||||||
|
|
||||||
class Items extends ApiController
|
class Items extends ApiController
|
@ -11,7 +11,7 @@ use App\Models\Expense\BillHistory;
|
|||||||
use App\Models\Expense\BillItem;
|
use App\Models\Expense\BillItem;
|
||||||
use App\Models\Expense\BillPayment;
|
use App\Models\Expense\BillPayment;
|
||||||
use App\Models\Expense\BillStatus;
|
use App\Models\Expense\BillStatus;
|
||||||
use App\Models\Item\Item;
|
use App\Models\Common\Item;
|
||||||
use App\Models\Setting\Tax;
|
use App\Models\Setting\Tax;
|
||||||
use App\Transformers\Expense\Bill as Transformer;
|
use App\Transformers\Expense\Bill as Transformer;
|
||||||
use Dingo\Api\Routing\Helpers;
|
use Dingo\Api\Routing\Helpers;
|
||||||
|
@ -11,9 +11,9 @@ use App\Models\Income\InvoiceHistory;
|
|||||||
use App\Models\Income\InvoiceItem;
|
use App\Models\Income\InvoiceItem;
|
||||||
use App\Models\Income\InvoicePayment;
|
use App\Models\Income\InvoicePayment;
|
||||||
use App\Models\Income\InvoiceTotal;
|
use App\Models\Income\InvoiceTotal;
|
||||||
use App\Models\Item\Item;
|
use App\Models\Common\Item;
|
||||||
use App\Models\Setting\Tax;
|
use App\Models\Setting\Tax;
|
||||||
use App\Notifications\Item\Item as ItemNotification;
|
use App\Notifications\Common\Item as ItemNotification;
|
||||||
use App\Transformers\Income\Invoice as Transformer;
|
use App\Transformers\Income\Invoice as Transformer;
|
||||||
use Dingo\Api\Routing\Helpers;
|
use Dingo\Api\Routing\Helpers;
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ class Users extends Controller
|
|||||||
// Mark item notifications as read
|
// Mark item notifications as read
|
||||||
foreach ($user->unreadNotifications as $notification) {
|
foreach ($user->unreadNotifications as $notification) {
|
||||||
// Not an item notification
|
// Not an item notification
|
||||||
if ($notification->getAttribute('type') != 'App\Notifications\Item\Item') {
|
if ($notification->getAttribute('type') != 'App\Notifications\Common\Item') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Companies;
|
namespace App\Http\Controllers\Common;
|
||||||
|
|
||||||
use App\Events\CompanySwitched;
|
use App\Events\CompanySwitched;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\Company\Company as Request;
|
use App\Http\Requests\Common\Company as Request;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use App\Models\Setting\Currency;
|
use App\Models\Setting\Currency;
|
||||||
use App\Traits\Uploads;
|
use App\Traits\Uploads;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class Companies extends Controller
|
|||||||
$company->setSettings();
|
$company->setSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('companies.companies.index', compact('companies'));
|
return view('common.companies.index', compact('companies'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -36,7 +36,7 @@ class Companies extends Controller
|
|||||||
*/
|
*/
|
||||||
public function show()
|
public function show()
|
||||||
{
|
{
|
||||||
return redirect('companies/companies');
|
return redirect('common/companies');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,7 +48,7 @@ class Companies extends Controller
|
|||||||
{
|
{
|
||||||
$currencies = Currency::enabled()->pluck('name', 'code');
|
$currencies = Currency::enabled()->pluck('name', 'code');
|
||||||
|
|
||||||
return view('companies.companies.create', compact('currencies'));
|
return view('common.companies.create', compact('currencies'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -91,7 +91,7 @@ class Companies extends Controller
|
|||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
|
|
||||||
return redirect('companies/companies');
|
return redirect('common/companies');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -109,14 +109,14 @@ class Companies extends Controller
|
|||||||
|
|
||||||
flash($message)->error();
|
flash($message)->error();
|
||||||
|
|
||||||
return redirect('companies/companies');
|
return redirect('common/companies');
|
||||||
}
|
}
|
||||||
|
|
||||||
$company->setSettings();
|
$company->setSettings();
|
||||||
|
|
||||||
$currencies = Currency::enabled()->pluck('name', 'code');
|
$currencies = Currency::enabled()->pluck('name', 'code');
|
||||||
|
|
||||||
return view('companies.companies.edit', compact('company', 'currencies'));
|
return view('common.companies.edit', compact('company', 'currencies'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -135,7 +135,7 @@ class Companies extends Controller
|
|||||||
|
|
||||||
flash($message)->error();
|
flash($message)->error();
|
||||||
|
|
||||||
return redirect('companies/companies');
|
return redirect('common/companies');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update company
|
// Update company
|
||||||
@ -171,7 +171,7 @@ class Companies extends Controller
|
|||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
|
|
||||||
return redirect('companies/companies');
|
return redirect('common/companies');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -189,7 +189,7 @@ class Companies extends Controller
|
|||||||
|
|
||||||
flash($message)->error();
|
flash($message)->error();
|
||||||
|
|
||||||
return redirect('companies/companies');
|
return redirect('common/companies');
|
||||||
}
|
}
|
||||||
|
|
||||||
$company->delete();
|
$company->delete();
|
||||||
@ -198,7 +198,7 @@ class Companies extends Controller
|
|||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
|
|
||||||
return redirect('companies/companies');
|
return redirect('common/companies');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Dashboard;
|
namespace App\Http\Controllers\Common;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Banking\Account;
|
use App\Models\Banking\Account;
|
||||||
@ -46,7 +46,7 @@ class Dashboard extends Controller
|
|||||||
|
|
||||||
$latest_expenses = $this->getLatestExpenses();
|
$latest_expenses = $this->getLatestExpenses();
|
||||||
|
|
||||||
return view('dashboard.dashboard.index', compact(
|
return view('common.dashboard.index', compact(
|
||||||
'total_incomes',
|
'total_incomes',
|
||||||
'total_expenses',
|
'total_expenses',
|
||||||
'total_profit',
|
'total_profit',
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Items;
|
namespace App\Http\Controllers\Common;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\Item\Item as Request;
|
use App\Http\Requests\Common\Item as Request;
|
||||||
use App\Models\Item\Item;
|
use App\Models\Common\Item;
|
||||||
use App\Models\Setting\Category;
|
use App\Models\Setting\Category;
|
||||||
use App\Models\Setting\Currency;
|
use App\Models\Setting\Currency;
|
||||||
use App\Models\Setting\Tax;
|
use App\Models\Setting\Tax;
|
||||||
@ -27,7 +27,7 @@ class Items extends Controller
|
|||||||
$categories = Category::enabled()->type('item')->pluck('name', 'id')
|
$categories = Category::enabled()->type('item')->pluck('name', 'id')
|
||||||
->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
|
->prepend(trans('general.all_type', ['type' => trans_choice('general.categories', 2)]), '');
|
||||||
|
|
||||||
return view('items.items.index', compact('items', 'categories'));
|
return view('common.items.index', compact('items', 'categories'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,7 +37,7 @@ class Items extends Controller
|
|||||||
*/
|
*/
|
||||||
public function show()
|
public function show()
|
||||||
{
|
{
|
||||||
return redirect('items/items');
|
return redirect('common/items');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -51,7 +51,7 @@ class Items extends Controller
|
|||||||
|
|
||||||
$taxes = Tax::enabled()->get()->pluck('title', 'id');
|
$taxes = Tax::enabled()->get()->pluck('title', 'id');
|
||||||
|
|
||||||
return view('items.items.create', compact('categories', 'taxes'));
|
return view('common.items.create', compact('categories', 'taxes'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -76,7 +76,7 @@ class Items extends Controller
|
|||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
|
|
||||||
return redirect('items/items');
|
return redirect('common/items');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -94,7 +94,7 @@ class Items extends Controller
|
|||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
|
|
||||||
return redirect('items/items/' . $clone->id . '/edit');
|
return redirect('common/items/' . $clone->id . '/edit');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,7 +119,7 @@ class Items extends Controller
|
|||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
|
|
||||||
return redirect('items/items');
|
return redirect('common/items');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -135,7 +135,7 @@ class Items extends Controller
|
|||||||
|
|
||||||
$taxes = Tax::enabled()->get()->pluck('title', 'id');
|
$taxes = Tax::enabled()->get()->pluck('title', 'id');
|
||||||
|
|
||||||
return view('items.items.edit', compact('item', 'categories', 'taxes'));
|
return view('common.items.edit', compact('item', 'categories', 'taxes'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -161,7 +161,7 @@ class Items extends Controller
|
|||||||
|
|
||||||
flash($message)->success();
|
flash($message)->success();
|
||||||
|
|
||||||
return redirect('items/items');
|
return redirect('common/items');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -190,7 +190,7 @@ class Items extends Controller
|
|||||||
flash($message)->warning();
|
flash($message)->warning();
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect('items/items');
|
return redirect('common/items');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function autocomplete()
|
public function autocomplete()
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Search;
|
namespace App\Http\Controllers\Common;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Banking\Account;
|
use App\Models\Banking\Account;
|
||||||
@ -10,7 +10,7 @@ use App\Models\Expense\Vendor;
|
|||||||
use App\Models\Income\Invoice;
|
use App\Models\Income\Invoice;
|
||||||
use App\Models\Income\Revenue;
|
use App\Models\Income\Revenue;
|
||||||
use App\Models\Income\Customer;
|
use App\Models\Income\Customer;
|
||||||
use App\Models\Item\Item;
|
use App\Models\Common\Item;
|
||||||
|
|
||||||
class Search extends Controller
|
class Search extends Controller
|
||||||
{
|
{
|
@ -43,7 +43,7 @@ class Controller extends BaseController
|
|||||||
$controller .= kebab_case($arr[0]);
|
$controller .= kebab_case($arr[0]);
|
||||||
|
|
||||||
// Skip ACL
|
// Skip ACL
|
||||||
$skip = ['dashboard-dashboard', 'customers-dashboard'];
|
$skip = ['common-dashboard', 'customers-dashboard'];
|
||||||
if (in_array($controller, $skip)) {
|
if (in_array($controller, $skip)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ use App\Models\Expense\BillItem;
|
|||||||
use App\Models\Expense\BillTotal;
|
use App\Models\Expense\BillTotal;
|
||||||
use App\Models\Expense\BillHistory;
|
use App\Models\Expense\BillHistory;
|
||||||
use App\Models\Expense\BillPayment;
|
use App\Models\Expense\BillPayment;
|
||||||
use App\Models\Item\Item;
|
use App\Models\Common\Item;
|
||||||
use App\Models\Setting\Category;
|
use App\Models\Setting\Category;
|
||||||
use App\Models\Setting\Currency;
|
use App\Models\Setting\Currency;
|
||||||
use App\Models\Setting\Tax;
|
use App\Models\Setting\Tax;
|
||||||
|
@ -16,13 +16,13 @@ use App\Models\Income\InvoiceItem;
|
|||||||
use App\Models\Income\InvoiceTotal;
|
use App\Models\Income\InvoiceTotal;
|
||||||
use App\Models\Income\InvoicePayment;
|
use App\Models\Income\InvoicePayment;
|
||||||
use App\Models\Income\InvoiceStatus;
|
use App\Models\Income\InvoiceStatus;
|
||||||
use App\Models\Item\Item;
|
use App\Models\Common\Item;
|
||||||
use App\Models\Setting\Category;
|
use App\Models\Setting\Category;
|
||||||
use App\Models\Setting\Currency;
|
use App\Models\Setting\Currency;
|
||||||
use App\Models\Setting\Tax;
|
use App\Models\Setting\Tax;
|
||||||
use App\Models\Common\Media;
|
use App\Models\Common\Media;
|
||||||
use App\Notifications\Income\Invoice as Notification;
|
use App\Notifications\Income\Invoice as Notification;
|
||||||
use App\Notifications\Item\Item as ItemNotification;
|
use App\Notifications\Common\Item as ItemNotification;
|
||||||
use App\Traits\Currencies;
|
use App\Traits\Currencies;
|
||||||
use App\Traits\DateTime;
|
use App\Traits\DateTime;
|
||||||
use App\Traits\Incomes;
|
use App\Traits\Incomes;
|
||||||
|
@ -5,7 +5,7 @@ namespace App\Http\Controllers\Settings;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\Setting\Setting as Request;
|
use App\Http\Requests\Setting\Setting as Request;
|
||||||
use App\Models\Banking\Account;
|
use App\Models\Banking\Account;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use App\Models\Setting\Currency;
|
use App\Models\Setting\Currency;
|
||||||
use App\Models\Setting\Setting;
|
use App\Models\Setting\Setting;
|
||||||
use App\Models\Common\Media;
|
use App\Models\Common\Media;
|
||||||
|
@ -41,9 +41,9 @@ class AdminMenu
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// Items
|
// Items
|
||||||
if ($user->can('read-items-items')) {
|
if ($user->can('read-common-items')) {
|
||||||
$menu->add([
|
$menu->add([
|
||||||
'url' => 'items/items',
|
'url' => 'common/items',
|
||||||
'title' => trans_choice('general.items', 2),
|
'title' => trans_choice('general.items', 2),
|
||||||
'icon' => 'fa fa-cubes',
|
'icon' => 'fa fa-cubes',
|
||||||
'order' => 2,
|
'order' => 2,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Requests\Company;
|
namespace App\Http\Requests\Common;
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Requests\Item;
|
namespace App\Http\Requests\Common;
|
||||||
|
|
||||||
use App\Http\Requests\Request;
|
use App\Http\Requests\Request;
|
||||||
|
|
@ -51,7 +51,7 @@ class Header
|
|||||||
$invoices[$data['invoice_id']] = $data['amount'];
|
$invoices[$data['invoice_id']] = $data['amount'];
|
||||||
$notifications++;
|
$notifications++;
|
||||||
break;
|
break;
|
||||||
case 'App\Notifications\Item\Item':
|
case 'App\Notifications\Common\Item':
|
||||||
$items[$data['item_id']] = $data['name'];
|
$items[$data['item_id']] = $data['name'];
|
||||||
$notifications++;
|
$notifications++;
|
||||||
break;
|
break;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace App\Listeners\Updates;
|
namespace App\Listeners\Updates;
|
||||||
|
|
||||||
use App\Events\UpdateFinished;
|
use App\Events\UpdateFinished;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use App\Models\Expense\Bill;
|
use App\Models\Expense\Bill;
|
||||||
use App\Models\Expense\BillStatus;
|
use App\Models\Expense\BillStatus;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace App\Listeners\Updates;
|
namespace App\Listeners\Updates;
|
||||||
|
|
||||||
use App\Events\UpdateFinished;
|
use App\Events\UpdateFinished;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use Artisan;
|
use Artisan;
|
||||||
|
|
||||||
class Version109 extends Listener
|
class Version109 extends Listener
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace App\Listeners\Updates;
|
namespace App\Listeners\Updates;
|
||||||
|
|
||||||
use App\Events\UpdateFinished;
|
use App\Events\UpdateFinished;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use DotenvEditor;
|
use DotenvEditor;
|
||||||
|
|
||||||
class Version112 extends Listener
|
class Version112 extends Listener
|
||||||
|
@ -63,7 +63,7 @@ class Version119 extends Listener
|
|||||||
|
|
||||||
$migrations = [
|
$migrations = [
|
||||||
'\App\Models\Auth\User' => 'picture',
|
'\App\Models\Auth\User' => 'picture',
|
||||||
'\App\Models\Item\Item' => 'picture',
|
'\App\Models\Common\Item' => 'picture',
|
||||||
'\App\Models\Expense\Bill' => 'attachment',
|
'\App\Models\Expense\Bill' => 'attachment',
|
||||||
'\App\Models\Expense\BillPayment' => 'attachment',
|
'\App\Models\Expense\BillPayment' => 'attachment',
|
||||||
'\App\Models\Expense\Payment' => 'attachment',
|
'\App\Models\Expense\Payment' => 'attachment',
|
||||||
@ -138,7 +138,7 @@ class Version119 extends Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($path) && Storage::exists($path)) {
|
if (!empty($path) && Storage::exists($path)) {
|
||||||
$company = \App\Models\Company\Company::find($item->company_id);
|
$company = \App\Models\Common\Company::find($item->company_id);
|
||||||
|
|
||||||
$media = \App\Models\Common\Media::where('filename', '=', pathinfo(basename($path), PATHINFO_FILENAME))->first();
|
$media = \App\Models\Common\Media::where('filename', '=', pathinfo(basename($path), PATHINFO_FILENAME))->first();
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ namespace App\Listeners\Updates;
|
|||||||
use App\Events\UpdateFinished;
|
use App\Events\UpdateFinished;
|
||||||
use App\Models\Auth\Role;
|
use App\Models\Auth\Role;
|
||||||
use App\Models\Auth\Permission;
|
use App\Models\Auth\Permission;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use App\Models\Expense\Bill;
|
use App\Models\Expense\Bill;
|
||||||
use App\Models\Income\Invoice;
|
use App\Models\Income\Invoice;
|
||||||
use App\Models\Setting\Category;
|
use App\Models\Setting\Category;
|
||||||
|
52
app/Listeners/Updates/Version127.php
Normal file
52
app/Listeners/Updates/Version127.php
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Listeners\Updates;
|
||||||
|
|
||||||
|
use App\Events\UpdateFinished;
|
||||||
|
use App\Models\Auth\Permission;
|
||||||
|
use File;
|
||||||
|
|
||||||
|
class Version127 extends Listener
|
||||||
|
{
|
||||||
|
const ALIAS = 'core';
|
||||||
|
|
||||||
|
const VERSION = '1.2.7';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle the event.
|
||||||
|
*
|
||||||
|
* @param $event
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function handle(UpdateFinished $event)
|
||||||
|
{
|
||||||
|
// Check if should listen
|
||||||
|
if (!$this->check($event)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update permissions
|
||||||
|
$permissions = Permission::all();
|
||||||
|
foreach ($permissions as $permission) {
|
||||||
|
if (strstr($permission->name, '-companies-companies')) {
|
||||||
|
$permission->name = str_replace('-companies-companies', '-common-companies', $permission->name);
|
||||||
|
$permission->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strstr($permission->name, '-items-items')) {
|
||||||
|
$permission->name = str_replace('-items-items', '-common-items', $permission->name);
|
||||||
|
$permission->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete folders
|
||||||
|
$dirs = ['dashboard', 'search', 'companies', 'items'];
|
||||||
|
foreach ($dirs as $dir) {
|
||||||
|
File::deleteDirectory(app_path('Filters/' . ucfirst($dir)));
|
||||||
|
File::deleteDirectory(app_path('Http/Controllers/' . ucfirst($dir)));
|
||||||
|
File::deleteDirectory(app_path('Http/Requests/' . ucfirst(str_singular($dir))));
|
||||||
|
File::deleteDirectory(app_path('Transformers/' . ucfirst(str_singular($dir))));
|
||||||
|
File::deleteDirectory(resource_path('views/' . $dir));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -51,7 +51,7 @@ class User extends Authenticatable
|
|||||||
|
|
||||||
public function companies()
|
public function companies()
|
||||||
{
|
{
|
||||||
return $this->morphToMany('App\Models\Company\Company', 'user', 'user_companies', 'user_id', 'company_id');
|
return $this->morphToMany('App\Models\Common\Company', 'user', 'user_companies', 'user_id', 'company_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function customer()
|
public function customer()
|
||||||
|
260
app/Models/Common/Company.php
Normal file
260
app/Models/Common/Company.php
Normal file
@ -0,0 +1,260 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Common;
|
||||||
|
|
||||||
|
use Auth;
|
||||||
|
use EloquentFilter\Filterable;
|
||||||
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||||
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
use Kyslik\ColumnSortable\Sortable;
|
||||||
|
use App\Traits\Media;
|
||||||
|
|
||||||
|
class Company extends Eloquent
|
||||||
|
{
|
||||||
|
use Filterable, SoftDeletes, Sortable, Media;
|
||||||
|
|
||||||
|
protected $table = 'companies';
|
||||||
|
|
||||||
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
|
protected $fillable = ['domain', 'enabled'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sortable columns.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $sortable = ['name', 'domain', 'email', 'enabled', 'created_at'];
|
||||||
|
|
||||||
|
public function accounts()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Banking\Account');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bill_histories()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Expense\BillHistory');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bill_items()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Expense\BillItem');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bill_payments()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Expense\BillPayment');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bill_statuses()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Expense\BillStatus');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bills()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Expense\Bill');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function categories()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Setting\Category');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function currencies()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Setting\Currency');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function customers()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Income\Customer');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function invoice_histories()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Income\InvoiceHistory');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function invoice_items()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Income\InvoiceItem');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function invoice_payments()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Income\InvoicePayment');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function invoice_statuses()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Income\InvoiceStatus');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function invoices()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Income\Invoice');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function items()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Common\Item');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function payments()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Expense\Payment');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function recurring()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Common\Recurring');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function revenues()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Income\Revenue');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function settings()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Setting\Setting');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function taxes()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Setting\Tax');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function transfers()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Banking\Transfer');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function users()
|
||||||
|
{
|
||||||
|
return $this->morphedByMany('App\Models\Auth\User', 'user', 'user_companies', 'company_id', 'user_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function vendors()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Expense\Vendor');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSettings()
|
||||||
|
{
|
||||||
|
$settings = $this->settings;
|
||||||
|
|
||||||
|
foreach ($settings as $setting) {
|
||||||
|
list($group, $key) = explode('.', $setting->getAttribute('key'));
|
||||||
|
|
||||||
|
// Load only general settings
|
||||||
|
if ($group != 'general') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$value = $setting->getAttribute('value');
|
||||||
|
|
||||||
|
if (($key == 'company_logo') && empty($value)) {
|
||||||
|
$value = 'public/img/company.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->setAttribute($key, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set default default company logo if empty
|
||||||
|
if ($this->getAttribute('company_logo') == '') {
|
||||||
|
$this->setAttribute('company_logo', 'public/img/company.png');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the filter provider globally.
|
||||||
|
*
|
||||||
|
* @return ModelFilter
|
||||||
|
*/
|
||||||
|
public function modelFilter()
|
||||||
|
{
|
||||||
|
list($folder, $file) = explode('/', \Route::current()->uri());
|
||||||
|
|
||||||
|
if (empty($folder) || empty($file)) {
|
||||||
|
return $this->provideFilter();
|
||||||
|
}
|
||||||
|
|
||||||
|
$class = '\App\Filters\\' . ucfirst($folder) .'\\' . ucfirst($file);
|
||||||
|
|
||||||
|
return $this->provideFilter($class);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scope to get all rows filtered, sorted and paginated.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
* @param $sort
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
|
*/
|
||||||
|
public function scopeCollect($query, $sort = 'name')
|
||||||
|
{
|
||||||
|
$request = request();
|
||||||
|
|
||||||
|
$input = $request->input();
|
||||||
|
$limit = $request->get('limit', setting('general.list_limit', '25'));
|
||||||
|
|
||||||
|
return Auth::user()->companies()->filter($input)->sortable($sort)->paginate($limit);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scope to only include companies of a given enabled value.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
* @param mixed $value
|
||||||
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
|
*/
|
||||||
|
public function scopeEnabled($query, $value = 1)
|
||||||
|
{
|
||||||
|
return $query->where('enabled', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sort by company name
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
* @param $direction
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
|
*/
|
||||||
|
public function nameSortable($query, $direction)
|
||||||
|
{
|
||||||
|
return $query->join('settings', 'companies.id', '=', 'settings.company_id')
|
||||||
|
->where('key', 'general.company_name')
|
||||||
|
->orderBy('value', $direction)
|
||||||
|
->select('companies.*');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sort by company email
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
* @param $direction
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
|
*/
|
||||||
|
public function emailSortable($query, $direction)
|
||||||
|
{
|
||||||
|
return $query->join('settings', 'companies.id', '=', 'settings.company_id')
|
||||||
|
->where('key', 'general.company_email')
|
||||||
|
->orderBy('value', $direction)
|
||||||
|
->select('companies.*');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current balance.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getCompanyLogoAttribute()
|
||||||
|
{
|
||||||
|
return $this->getMedia('company_logo')->last();
|
||||||
|
}
|
||||||
|
}
|
158
app/Models/Common/Item.php
Normal file
158
app/Models/Common/Item.php
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Common;
|
||||||
|
|
||||||
|
use App\Models\Model;
|
||||||
|
use App\Traits\Currencies;
|
||||||
|
use Bkwld\Cloner\Cloneable;
|
||||||
|
use Sofa\Eloquence\Eloquence;
|
||||||
|
use App\Traits\Media;
|
||||||
|
|
||||||
|
class Item extends Model
|
||||||
|
{
|
||||||
|
use Cloneable, Currencies, Eloquence, Media;
|
||||||
|
|
||||||
|
protected $table = 'items';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The accessors to append to the model's array form.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $appends = ['item_id'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attributes that should be mass-assignable.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = ['company_id', 'name', 'sku', 'description', 'sale_price', 'purchase_price', 'quantity', 'category_id', 'tax_id', 'enabled'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sortable columns.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $sortable = ['name', 'category', 'quantity', 'sale_price', 'purchase_price', 'enabled'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Searchable rules.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $searchableColumns = [
|
||||||
|
'name' => 10,
|
||||||
|
'sku' => 5,
|
||||||
|
'description' => 2,
|
||||||
|
];
|
||||||
|
|
||||||
|
public function category()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('App\Models\Setting\Category');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tax()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('App\Models\Setting\Tax');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bill_items()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Expense\BillItem');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function invoice_items()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Income\InvoiceItem');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert sale price to double.
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setSalePriceAttribute($value)
|
||||||
|
{
|
||||||
|
$this->attributes['sale_price'] = (double) $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert purchase price to double.
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setPurchasePriceAttribute($value)
|
||||||
|
{
|
||||||
|
$this->attributes['purchase_price'] = (double) $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the item id.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getItemIdAttribute()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scope autocomplete.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
* @param array $filter
|
||||||
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
|
*/
|
||||||
|
public function scopeAutocomplete($query, $filter)
|
||||||
|
{
|
||||||
|
return $query->where(function ($query) use ($filter) {
|
||||||
|
foreach ($filter as $key => $value) {
|
||||||
|
$query->orWhere($key, 'LIKE', "%" . $value . "%");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scope quantity.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
|
*/
|
||||||
|
public function scopeQuantity($query)
|
||||||
|
{
|
||||||
|
return $query->where('quantity', '>', '0');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sort by category name
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
* @param $direction
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
|
*/
|
||||||
|
public function categorySortable($query, $direction)
|
||||||
|
{
|
||||||
|
return $query->join('categories', 'categories.id', '=', 'items.category_id')
|
||||||
|
->orderBy('name', $direction)
|
||||||
|
->select('items.*');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current balance.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getPictureAttribute($value)
|
||||||
|
{
|
||||||
|
if (!empty($value) && !$this->hasMedia('picture')) {
|
||||||
|
return $value;
|
||||||
|
} elseif (!$this->hasMedia('picture')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->getMedia('picture')->last();
|
||||||
|
}
|
||||||
|
}
|
@ -2,259 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Models\Company;
|
namespace App\Models\Company;
|
||||||
|
|
||||||
use Auth;
|
use App\Models\Common\Company as C;
|
||||||
use EloquentFilter\Filterable;
|
|
||||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
||||||
use Kyslik\ColumnSortable\Sortable;
|
|
||||||
use App\Traits\Media;
|
|
||||||
|
|
||||||
class Company extends Eloquent
|
|
||||||
{
|
|
||||||
use Filterable, SoftDeletes, Sortable, Media;
|
|
||||||
|
|
||||||
protected $table = 'companies';
|
|
||||||
|
|
||||||
protected $dates = ['deleted_at'];
|
|
||||||
|
|
||||||
protected $fillable = ['domain', 'enabled'];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sortable columns.
|
* @deprecated since 1.2.7 version. use Common\Company instead.
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
*/
|
||||||
public $sortable = ['name', 'domain', 'email', 'enabled', 'created_at'];
|
class Company extends C {}
|
||||||
|
|
||||||
public function accounts()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Banking\Account');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function bill_histories()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Expense\BillHistory');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function bill_items()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Expense\BillItem');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function bill_payments()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Expense\BillPayment');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function bill_statuses()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Expense\BillStatus');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function bills()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Expense\Bill');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function categories()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Setting\Category');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function currencies()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Setting\Currency');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function customers()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Income\Customer');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function invoice_histories()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Income\InvoiceHistory');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function invoice_items()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Income\InvoiceItem');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function invoice_payments()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Income\InvoicePayment');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function invoice_statuses()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Income\InvoiceStatus');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function invoices()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Income\Invoice');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function items()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Item\Item');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function payments()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Expense\Payment');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function recurring()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Common\Recurring');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function revenues()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Income\Revenue');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function settings()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Setting\Setting');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function taxes()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Setting\Tax');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function transfers()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Banking\Transfer');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function users()
|
|
||||||
{
|
|
||||||
return $this->morphedByMany('App\Models\Auth\User', 'user', 'user_companies', 'company_id', 'user_id');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function vendors()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Expense\Vendor');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setSettings()
|
|
||||||
{
|
|
||||||
$settings = $this->settings;
|
|
||||||
|
|
||||||
foreach ($settings as $setting) {
|
|
||||||
list($group, $key) = explode('.', $setting->getAttribute('key'));
|
|
||||||
|
|
||||||
// Load only general settings
|
|
||||||
if ($group != 'general') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$value = $setting->getAttribute('value');
|
|
||||||
|
|
||||||
if (($key == 'company_logo') && empty($value)) {
|
|
||||||
$value = 'public/img/company.png';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->setAttribute($key, $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set default default company logo if empty
|
|
||||||
if ($this->getAttribute('company_logo') == '') {
|
|
||||||
$this->setAttribute('company_logo', 'public/img/company.png');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the filter provider globally.
|
|
||||||
*
|
|
||||||
* @return ModelFilter
|
|
||||||
*/
|
|
||||||
public function modelFilter()
|
|
||||||
{
|
|
||||||
list($folder, $file) = explode('/', \Route::current()->uri());
|
|
||||||
|
|
||||||
if (empty($folder) || empty($file)) {
|
|
||||||
return $this->provideFilter();
|
|
||||||
}
|
|
||||||
|
|
||||||
$class = '\App\Filters\\' . ucfirst($folder) .'\\' . ucfirst($file);
|
|
||||||
|
|
||||||
return $this->provideFilter($class);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scope to get all rows filtered, sorted and paginated.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
|
||||||
* @param $sort
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Database\Eloquent\Builder
|
|
||||||
*/
|
|
||||||
public function scopeCollect($query, $sort = 'name')
|
|
||||||
{
|
|
||||||
$request = request();
|
|
||||||
|
|
||||||
$input = $request->input();
|
|
||||||
$limit = $request->get('limit', setting('general.list_limit', '25'));
|
|
||||||
|
|
||||||
return Auth::user()->companies()->filter($input)->sortable($sort)->paginate($limit);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scope to only include companies of a given enabled value.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
|
||||||
* @param mixed $value
|
|
||||||
* @return \Illuminate\Database\Eloquent\Builder
|
|
||||||
*/
|
|
||||||
public function scopeEnabled($query, $value = 1)
|
|
||||||
{
|
|
||||||
return $query->where('enabled', $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sort by company name
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
|
||||||
* @param $direction
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Database\Eloquent\Builder
|
|
||||||
*/
|
|
||||||
public function nameSortable($query, $direction)
|
|
||||||
{
|
|
||||||
return $query->join('settings', 'companies.id', '=', 'settings.company_id')
|
|
||||||
->where('key', 'general.company_name')
|
|
||||||
->orderBy('value', $direction)
|
|
||||||
->select('companies.*');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sort by company email
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
|
||||||
* @param $direction
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Database\Eloquent\Builder
|
|
||||||
*/
|
|
||||||
public function emailSortable($query, $direction)
|
|
||||||
{
|
|
||||||
return $query->join('settings', 'companies.id', '=', 'settings.company_id')
|
|
||||||
->where('key', 'general.company_email')
|
|
||||||
->orderBy('value', $direction)
|
|
||||||
->select('companies.*');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the current balance.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getCompanyLogoAttribute()
|
|
||||||
{
|
|
||||||
return $this->getMedia('company_logo')->last();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -26,7 +26,7 @@ class BillHistory extends Model
|
|||||||
|
|
||||||
public function item()
|
public function item()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Item\Item');
|
return $this->belongsTo('App\Models\Common\Item');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tax()
|
public function tax()
|
||||||
|
@ -26,7 +26,7 @@ class BillItem extends Model
|
|||||||
|
|
||||||
public function item()
|
public function item()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Item\Item');
|
return $this->belongsTo('App\Models\Common\Item');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tax()
|
public function tax()
|
||||||
|
@ -39,7 +39,7 @@ class BillPayment extends Model
|
|||||||
|
|
||||||
public function item()
|
public function item()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Item\Item');
|
return $this->belongsTo('App\Models\Common\Item');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tax()
|
public function tax()
|
||||||
|
@ -26,7 +26,7 @@ class InvoiceHistory extends Model
|
|||||||
|
|
||||||
public function item()
|
public function item()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Item\Item');
|
return $this->belongsTo('App\Models\Common\Item');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tax()
|
public function tax()
|
||||||
|
@ -26,7 +26,7 @@ class InvoiceItem extends Model
|
|||||||
|
|
||||||
public function item()
|
public function item()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Item\Item');
|
return $this->belongsTo('App\Models\Common\Item');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tax()
|
public function tax()
|
||||||
|
@ -39,7 +39,7 @@ class InvoicePayment extends Model
|
|||||||
|
|
||||||
public function item()
|
public function item()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Item\Item');
|
return $this->belongsTo('App\Models\Common\Item');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tax()
|
public function tax()
|
||||||
|
@ -2,157 +2,9 @@
|
|||||||
|
|
||||||
namespace App\Models\Item;
|
namespace App\Models\Item;
|
||||||
|
|
||||||
use App\Models\Model;
|
use App\Models\Common\Item as I;
|
||||||
use App\Traits\Currencies;
|
|
||||||
use Bkwld\Cloner\Cloneable;
|
|
||||||
use Sofa\Eloquence\Eloquence;
|
|
||||||
use App\Traits\Media;
|
|
||||||
|
|
||||||
class Item extends Model
|
|
||||||
{
|
|
||||||
use Cloneable, Currencies, Eloquence, Media;
|
|
||||||
|
|
||||||
protected $table = 'items';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The accessors to append to the model's array form.
|
* @deprecated since 1.2.7 version. use Common\Item instead.
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
*/
|
||||||
protected $appends = ['item_id'];
|
class Item extends I {}
|
||||||
|
|
||||||
/**
|
|
||||||
* Attributes that should be mass-assignable.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $fillable = ['company_id', 'name', 'sku', 'description', 'sale_price', 'purchase_price', 'quantity', 'category_id', 'tax_id', 'enabled'];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sortable columns.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $sortable = ['name', 'category', 'quantity', 'sale_price', 'purchase_price', 'enabled'];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Searchable rules.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $searchableColumns = [
|
|
||||||
'name' => 10,
|
|
||||||
'sku' => 5,
|
|
||||||
'description' => 2,
|
|
||||||
];
|
|
||||||
|
|
||||||
public function category()
|
|
||||||
{
|
|
||||||
return $this->belongsTo('App\Models\Setting\Category');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function tax()
|
|
||||||
{
|
|
||||||
return $this->belongsTo('App\Models\Setting\Tax');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function bill_items()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Expense\BillItem');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function invoice_items()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\Models\Income\InvoiceItem');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert sale price to double.
|
|
||||||
*
|
|
||||||
* @param string $value
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setSalePriceAttribute($value)
|
|
||||||
{
|
|
||||||
$this->attributes['sale_price'] = (double) $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert purchase price to double.
|
|
||||||
*
|
|
||||||
* @param string $value
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setPurchasePriceAttribute($value)
|
|
||||||
{
|
|
||||||
$this->attributes['purchase_price'] = (double) $value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the item id.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getItemIdAttribute()
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scope autocomplete.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
|
||||||
* @param array $filter
|
|
||||||
* @return \Illuminate\Database\Eloquent\Builder
|
|
||||||
*/
|
|
||||||
public function scopeAutocomplete($query, $filter)
|
|
||||||
{
|
|
||||||
return $query->where(function ($query) use ($filter) {
|
|
||||||
foreach ($filter as $key => $value) {
|
|
||||||
$query->orWhere($key, 'LIKE', "%" . $value . "%");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Scope quantity.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
|
||||||
* @return \Illuminate\Database\Eloquent\Builder
|
|
||||||
*/
|
|
||||||
public function scopeQuantity($query)
|
|
||||||
{
|
|
||||||
return $query->where('quantity', '>', '0');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sort by category name
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
|
||||||
* @param $direction
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Database\Eloquent\Builder
|
|
||||||
*/
|
|
||||||
public function categorySortable($query, $direction)
|
|
||||||
{
|
|
||||||
return $query->join('categories', 'categories.id', '=', 'items.category_id')
|
|
||||||
->orderBy('name', $direction)
|
|
||||||
->select('items.*');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the current balance.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getPictureAttribute($value)
|
|
||||||
{
|
|
||||||
if (!empty($value) && !$this->hasMedia('picture')) {
|
|
||||||
return $value;
|
|
||||||
} elseif (!$this->hasMedia('picture')) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->getMedia('picture')->last();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -35,7 +35,7 @@ class Model extends Eloquent
|
|||||||
*/
|
*/
|
||||||
public function company()
|
public function company()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Company\Company');
|
return $this->belongsTo('App\Models\Common\Company');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,7 +34,7 @@ class Category extends Model
|
|||||||
|
|
||||||
public function items()
|
public function items()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Models\Item\Item');
|
return $this->hasMany('App\Models\Common\Item');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function payments()
|
public function payments()
|
||||||
|
@ -43,7 +43,7 @@ class Setting extends Model
|
|||||||
*/
|
*/
|
||||||
public function company()
|
public function company()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Company\Company');
|
return $this->belongsTo('App\Models\Common\Company');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -32,7 +32,7 @@ class Tax extends Model
|
|||||||
|
|
||||||
public function items()
|
public function items()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Models\Item\Item');
|
return $this->hasMany('App\Models\Common\Item');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function bill_items()
|
public function bill_items()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Notifications\Item;
|
namespace App\Notifications\Common;
|
||||||
|
|
||||||
use Illuminate\Notifications\Notification;
|
use Illuminate\Notifications\Notification;
|
||||||
use Illuminate\Notifications\Messages\MailMessage;
|
use Illuminate\Notifications\Messages\MailMessage;
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Observers;
|
namespace App\Observers;
|
||||||
|
|
||||||
use App\Models\Company\Company as Model;
|
use App\Models\Common\Company as Model;
|
||||||
use Artisan;
|
use Artisan;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
'App\Listeners\Updates\Version119',
|
'App\Listeners\Updates\Version119',
|
||||||
'App\Listeners\Updates\Version120',
|
'App\Listeners\Updates\Version120',
|
||||||
'App\Listeners\Updates\Version126',
|
'App\Listeners\Updates\Version126',
|
||||||
|
'App\Listeners\Updates\Version127',
|
||||||
],
|
],
|
||||||
'Illuminate\Auth\Events\Login' => [
|
'Illuminate\Auth\Events\Login' => [
|
||||||
'App\Listeners\Auth\Login',
|
'App\Listeners\Auth\Login',
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class ObserverServiceProvider extends ServiceProvider
|
class ObserverServiceProvider extends ServiceProvider
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Transformers\Company;
|
namespace App\Transformers\Common;
|
||||||
|
|
||||||
use App\Models\Company\Company as Model;
|
use App\Models\Common\Company as Model;
|
||||||
use League\Fractal\TransformerAbstract;
|
use League\Fractal\TransformerAbstract;
|
||||||
|
|
||||||
class Company extends TransformerAbstract
|
class Company extends TransformerAbstract
|
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Transformers\Item;
|
namespace App\Transformers\Common;
|
||||||
|
|
||||||
use App\Transformers\Setting\Category;
|
use App\Transformers\Setting\Category;
|
||||||
use App\Transformers\Setting\Tax;
|
use App\Transformers\Setting\Tax;
|
||||||
use App\Models\Item\Item as Model;
|
use App\Models\Common\Item as Model;
|
||||||
use League\Fractal\TransformerAbstract;
|
use League\Fractal\TransformerAbstract;
|
||||||
|
|
||||||
class Item extends TransformerAbstract
|
class Item extends TransformerAbstract
|
@ -3,7 +3,7 @@
|
|||||||
namespace App\Utilities;
|
namespace App\Utilities;
|
||||||
|
|
||||||
use DB;
|
use DB;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
|
|
||||||
class Info
|
class Info
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
namespace App\Utilities;
|
namespace App\Utilities;
|
||||||
|
|
||||||
use App\Models\Auth\User;
|
use App\Models\Auth\User;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use Artisan;
|
use Artisan;
|
||||||
use Config;
|
use Config;
|
||||||
use DB;
|
use DB;
|
||||||
|
175
composer.lock
generated
175
composer.lock
generated
@ -127,22 +127,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "akaunting/setting",
|
"name": "akaunting/setting",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/akaunting/setting.git",
|
"url": "https://github.com/akaunting/setting.git",
|
||||||
"reference": "23276f2efb3fd355d4a53a80e792c757d427b857"
|
"reference": "ebe1552b6cd97fa762432285efa04f87be803898"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/akaunting/setting/zipball/23276f2efb3fd355d4a53a80e792c757d427b857",
|
"url": "https://api.github.com/repos/akaunting/setting/zipball/ebe1552b6cd97fa762432285efa04f87be803898",
|
||||||
"reference": "23276f2efb3fd355d4a53a80e792c757d427b857",
|
"reference": "ebe1552b6cd97fa762432285efa04f87be803898",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"laravel/framework": "5.2.* || 5.3.* || 5.4.* || 5.5.*",
|
"laravel/framework": ">=5.2 <6.0",
|
||||||
"php": ">=5.5.9"
|
"php": ">=5.5.9"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"laravel/framework": ">=5.2 <6.0",
|
||||||
|
"mockery/mockery": "0.9.*",
|
||||||
|
"phpunit/phpunit": ">=4.8, <6"
|
||||||
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"laravel": {
|
"laravel": {
|
||||||
@ -181,7 +186,7 @@
|
|||||||
"laravel",
|
"laravel",
|
||||||
"persistent"
|
"persistent"
|
||||||
],
|
],
|
||||||
"time": "2018-04-19T11:11:57+00:00"
|
"time": "2018-06-01T07:02:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "akaunting/version",
|
"name": "akaunting/version",
|
||||||
@ -822,30 +827,30 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/annotations",
|
"name": "doctrine/annotations",
|
||||||
"version": "v1.4.0",
|
"version": "v1.6.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/doctrine/annotations.git",
|
"url": "https://github.com/doctrine/annotations.git",
|
||||||
"reference": "54cacc9b81758b14e3ce750f205a393d52339e97"
|
"reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97",
|
"url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5",
|
||||||
"reference": "54cacc9b81758b14e3ce750f205a393d52339e97",
|
"reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"doctrine/lexer": "1.*",
|
"doctrine/lexer": "1.*",
|
||||||
"php": "^5.6 || ^7.0"
|
"php": "^7.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/cache": "1.*",
|
"doctrine/cache": "1.*",
|
||||||
"phpunit/phpunit": "^5.7"
|
"phpunit/phpunit": "^6.4"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.4.x-dev"
|
"dev-master": "1.6.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -886,37 +891,41 @@
|
|||||||
"docblock",
|
"docblock",
|
||||||
"parser"
|
"parser"
|
||||||
],
|
],
|
||||||
"time": "2017-02-24T16:22:25+00:00"
|
"time": "2017-12-06T07:11:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/cache",
|
"name": "doctrine/cache",
|
||||||
"version": "v1.6.2",
|
"version": "v1.7.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/doctrine/cache.git",
|
"url": "https://github.com/doctrine/cache.git",
|
||||||
"reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b"
|
"reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b",
|
"url": "https://api.github.com/repos/doctrine/cache/zipball/b3217d58609e9c8e661cd41357a54d926c4a2a1a",
|
||||||
"reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b",
|
"reference": "b3217d58609e9c8e661cd41357a54d926c4a2a1a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "~5.5|~7.0"
|
"php": "~7.1"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"doctrine/common": ">2.2,<2.4"
|
"doctrine/common": ">2.2,<2.4"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.8|~5.0",
|
"alcaeus/mongo-php-adapter": "^1.1",
|
||||||
"predis/predis": "~1.0",
|
"mongodb/mongodb": "^1.1",
|
||||||
"satooshi/php-coveralls": "~0.6"
|
"phpunit/phpunit": "^5.7",
|
||||||
|
"predis/predis": "~1.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.6.x-dev"
|
"dev-master": "1.7.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -956,24 +965,24 @@
|
|||||||
"cache",
|
"cache",
|
||||||
"caching"
|
"caching"
|
||||||
],
|
],
|
||||||
"time": "2017-07-22T12:49:21+00:00"
|
"time": "2017-08-25T07:02:50+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/collections",
|
"name": "doctrine/collections",
|
||||||
"version": "v1.4.0",
|
"version": "v1.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/doctrine/collections.git",
|
"url": "https://github.com/doctrine/collections.git",
|
||||||
"reference": "1a4fb7e902202c33cce8c55989b945612943c2ba"
|
"reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/doctrine/collections/zipball/1a4fb7e902202c33cce8c55989b945612943c2ba",
|
"url": "https://api.github.com/repos/doctrine/collections/zipball/a01ee38fcd999f34d9bfbcee59dbda5105449cbf",
|
||||||
"reference": "1a4fb7e902202c33cce8c55989b945612943c2ba",
|
"reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.6 || ^7.0"
|
"php": "^7.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"doctrine/coding-standard": "~0.1@dev",
|
"doctrine/coding-standard": "~0.1@dev",
|
||||||
@ -1023,7 +1032,7 @@
|
|||||||
"collections",
|
"collections",
|
||||||
"iterator"
|
"iterator"
|
||||||
],
|
],
|
||||||
"time": "2017-01-03T10:49:41+00:00"
|
"time": "2017-07-22T10:37:32+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/common",
|
"name": "doctrine/common",
|
||||||
@ -1171,33 +1180,33 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/inflector",
|
"name": "doctrine/inflector",
|
||||||
"version": "v1.1.0",
|
"version": "v1.3.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/doctrine/inflector.git",
|
"url": "https://github.com/doctrine/inflector.git",
|
||||||
"reference": "90b2128806bfde671b6952ab8bea493942c1fdae"
|
"reference": "5527a48b7313d15261292c149e55e26eae771b0a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae",
|
"url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a",
|
||||||
"reference": "90b2128806bfde671b6952ab8bea493942c1fdae",
|
"reference": "5527a48b7313d15261292c149e55e26eae771b0a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.2"
|
"php": "^7.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "4.*"
|
"phpunit/phpunit": "^6.2"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.1.x-dev"
|
"dev-master": "1.3.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-4": {
|
||||||
"Doctrine\\Common\\Inflector\\": "lib/"
|
"Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
@ -1234,7 +1243,7 @@
|
|||||||
"singularize",
|
"singularize",
|
||||||
"string"
|
"string"
|
||||||
],
|
],
|
||||||
"time": "2015-11-06T14:35:42+00:00"
|
"time": "2018-01-09T20:05:19+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/lexer",
|
"name": "doctrine/lexer",
|
||||||
@ -2766,16 +2775,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
"version": "1.28.0",
|
"version": "1.29.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||||
"reference": "00149d95fc91ef10f19d3a66889bc3bb7500fa7b"
|
"reference": "ed6aa898982f441ccc9b2acdec51490f2bc5d337"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/00149d95fc91ef10f19d3a66889bc3bb7500fa7b",
|
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ed6aa898982f441ccc9b2acdec51490f2bc5d337",
|
||||||
"reference": "00149d95fc91ef10f19d3a66889bc3bb7500fa7b",
|
"reference": "ed6aa898982f441ccc9b2acdec51490f2bc5d337",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2810,28 +2819,28 @@
|
|||||||
"datetime",
|
"datetime",
|
||||||
"time"
|
"time"
|
||||||
],
|
],
|
||||||
"time": "2018-05-18T15:26:18+00:00"
|
"time": "2018-05-29T15:23:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v3.1.5",
|
"version": "v4.0.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce"
|
"reference": "35b8caf75e791ba1b2d24fec1552168d72692b12"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bb87e28e7d7b8d9a7fda231d37457c9210faf6ce",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/35b8caf75e791ba1b2d24fec1552168d72692b12",
|
||||||
"reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce",
|
"reference": "35b8caf75e791ba1b2d24fec1552168d72692b12",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-tokenizer": "*",
|
"ext-tokenizer": "*",
|
||||||
"php": ">=5.5"
|
"php": ">=7.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~4.0|~5.0"
|
"phpunit/phpunit": "^6.5 || ^7.0"
|
||||||
},
|
},
|
||||||
"bin": [
|
"bin": [
|
||||||
"bin/php-parse"
|
"bin/php-parse"
|
||||||
@ -2839,7 +2848,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "3.0-dev"
|
"dev-master": "4.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -2861,7 +2870,7 @@
|
|||||||
"parser",
|
"parser",
|
||||||
"php"
|
"php"
|
||||||
],
|
],
|
||||||
"time": "2018-02-28T20:30:58+00:00"
|
"time": "2018-06-03T11:33:10+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nwidart/laravel-menus",
|
"name": "nwidart/laravel-menus",
|
||||||
@ -3084,16 +3093,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phenx/php-svg-lib",
|
"name": "phenx/php-svg-lib",
|
||||||
"version": "v0.3",
|
"version": "v0.3.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/PhenX/php-svg-lib.git",
|
"url": "https://github.com/PhenX/php-svg-lib.git",
|
||||||
"reference": "a85f7fe9fe08d093a4a8583cdd306b553ff918aa"
|
"reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/a85f7fe9fe08d093a4a8583cdd306b553ff918aa",
|
"url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/ccc46ef6340d4b8a4a68047e68d8501ea961442c",
|
||||||
"reference": "a85f7fe9fe08d093a4a8583cdd306b553ff918aa",
|
"reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -3120,7 +3129,7 @@
|
|||||||
],
|
],
|
||||||
"description": "A library to read, parse and export to PDF SVG files.",
|
"description": "A library to read, parse and export to PDF SVG files.",
|
||||||
"homepage": "https://github.com/PhenX/php-svg-lib",
|
"homepage": "https://github.com/PhenX/php-svg-lib",
|
||||||
"time": "2017-05-24T10:07:27+00:00"
|
"time": "2018-06-03T10:10:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpdocumentor/reflection-common",
|
"name": "phpdocumentor/reflection-common",
|
||||||
@ -3490,16 +3499,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psy/psysh",
|
"name": "psy/psysh",
|
||||||
"version": "v0.9.4",
|
"version": "v0.9.5",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/bobthecow/psysh.git",
|
"url": "https://github.com/bobthecow/psysh.git",
|
||||||
"reference": "4d969a0e08e1e05e7207c07cb4207017ecc9a331"
|
"reference": "0951e91ac04ca28cf317f3997a0adfc319e80106"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/4d969a0e08e1e05e7207c07cb4207017ecc9a331",
|
"url": "https://api.github.com/repos/bobthecow/psysh/zipball/0951e91ac04ca28cf317f3997a0adfc319e80106",
|
||||||
"reference": "4d969a0e08e1e05e7207c07cb4207017ecc9a331",
|
"reference": "0951e91ac04ca28cf317f3997a0adfc319e80106",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -3558,7 +3567,7 @@
|
|||||||
"interactive",
|
"interactive",
|
||||||
"shell"
|
"shell"
|
||||||
],
|
],
|
||||||
"time": "2018-05-22T06:48:07+00:00"
|
"time": "2018-06-02T16:39:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ramsey/uuid",
|
"name": "ramsey/uuid",
|
||||||
@ -4021,7 +4030,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/class-loader",
|
"name": "symfony/class-loader",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/class-loader.git",
|
"url": "https://github.com/symfony/class-loader.git",
|
||||||
@ -4077,7 +4086,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
@ -4146,7 +4155,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/css-selector.git",
|
"url": "https://github.com/symfony/css-selector.git",
|
||||||
@ -4199,7 +4208,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/debug",
|
"name": "symfony/debug",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/debug.git",
|
"url": "https://github.com/symfony/debug.git",
|
||||||
@ -4255,7 +4264,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||||
@ -4318,7 +4327,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/finder",
|
"name": "symfony/finder",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/finder.git",
|
"url": "https://github.com/symfony/finder.git",
|
||||||
@ -4367,16 +4376,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/http-foundation",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-foundation.git",
|
"url": "https://github.com/symfony/http-foundation.git",
|
||||||
"reference": "9a7469ec3e0225e7f0e14264bcd9e838e16186fe"
|
"reference": "a7b5fc605d1c215cea1122359044b1e682eb70c0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/9a7469ec3e0225e7f0e14264bcd9e838e16186fe",
|
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/a7b5fc605d1c215cea1122359044b1e682eb70c0",
|
||||||
"reference": "9a7469ec3e0225e7f0e14264bcd9e838e16186fe",
|
"reference": "a7b5fc605d1c215cea1122359044b1e682eb70c0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -4417,20 +4426,20 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony HttpFoundation Component",
|
"description": "Symfony HttpFoundation Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-05-16T08:49:21+00:00"
|
"time": "2018-05-25T11:07:31+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-kernel",
|
"name": "symfony/http-kernel",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-kernel.git",
|
"url": "https://github.com/symfony/http-kernel.git",
|
||||||
"reference": "66644bc7d17cc071d796efab9b950adbb86da134"
|
"reference": "3dac45df55ee0c5134c457a730cd68e2a2ce0445"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/66644bc7d17cc071d796efab9b950adbb86da134",
|
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/3dac45df55ee0c5134c457a730cd68e2a2ce0445",
|
||||||
"reference": "66644bc7d17cc071d796efab9b950adbb86da134",
|
"reference": "3dac45df55ee0c5134c457a730cd68e2a2ce0445",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -4506,7 +4515,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony HttpKernel Component",
|
"description": "Symfony HttpKernel Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-05-21T13:44:03+00:00"
|
"time": "2018-05-25T13:16:28+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
@ -4791,7 +4800,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/process.git",
|
"url": "https://github.com/symfony/process.git",
|
||||||
@ -4840,7 +4849,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/routing",
|
"name": "symfony/routing",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/routing.git",
|
"url": "https://github.com/symfony/routing.git",
|
||||||
@ -4918,7 +4927,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation",
|
"name": "symfony/translation",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/translation.git",
|
"url": "https://github.com/symfony/translation.git",
|
||||||
@ -4986,7 +4995,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-dumper",
|
"name": "symfony/var-dumper",
|
||||||
"version": "v3.4.10",
|
"version": "v3.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/var-dumper.git",
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
|
@ -34,10 +34,10 @@ class Roles extends Seeder
|
|||||||
'auth-roles' => 'c,r,u,d',
|
'auth-roles' => 'c,r,u,d',
|
||||||
'auth-permissions' => 'c,r,u,d',
|
'auth-permissions' => 'c,r,u,d',
|
||||||
'auth-profile' => 'r,u',
|
'auth-profile' => 'r,u',
|
||||||
'companies-companies' => 'c,r,u,d',
|
'common-companies' => 'c,r,u,d',
|
||||||
'common-import' => 'c',
|
'common-import' => 'c',
|
||||||
|
'common-items' => 'c,r,u,d',
|
||||||
'common-uploads' => 'd',
|
'common-uploads' => 'd',
|
||||||
'items-items' => 'c,r,u,d',
|
|
||||||
'incomes-invoices' => 'c,r,u,d',
|
'incomes-invoices' => 'c,r,u,d',
|
||||||
'incomes-revenues' => 'c,r,u,d',
|
'incomes-revenues' => 'c,r,u,d',
|
||||||
'incomes-customers' => 'c,r,u,d',
|
'incomes-customers' => 'c,r,u,d',
|
||||||
@ -68,9 +68,9 @@ class Roles extends Seeder
|
|||||||
'manager' => [
|
'manager' => [
|
||||||
'admin-panel' => 'r',
|
'admin-panel' => 'r',
|
||||||
'auth-profile' => 'r,u',
|
'auth-profile' => 'r,u',
|
||||||
'companies-companies' => 'c,r,u,d',
|
'common-companies' => 'c,r,u,d',
|
||||||
'common-import' => 'c',
|
'common-import' => 'c',
|
||||||
'items-items' => 'c,r,u,d',
|
'common-items' => 'c,r,u,d',
|
||||||
'incomes-invoices' => 'c,r,u,d',
|
'incomes-invoices' => 'c,r,u,d',
|
||||||
'incomes-revenues' => 'c,r,u,d',
|
'incomes-revenues' => 'c,r,u,d',
|
||||||
'incomes-customers' => 'c,r,u,d',
|
'incomes-customers' => 'c,r,u,d',
|
||||||
|
@ -4,7 +4,7 @@ namespace Database\Seeds;
|
|||||||
|
|
||||||
use App\Models\Model;
|
use App\Models\Model;
|
||||||
use App\Models\Auth\User;
|
use App\Models\Auth\User;
|
||||||
use App\Models\Company\Company;
|
use App\Models\Common\Company;
|
||||||
use Jenssegers\Date\Date;
|
use Jenssegers\Date\Date;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Setting;
|
use Setting;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
<!-- Default box -->
|
<!-- Default box -->
|
||||||
<div class="box box-success">
|
<div class="box box-success">
|
||||||
{!! Form::open(['url' => 'companies/companies', 'files' => true, 'role' => 'form']) !!}
|
{!! Form::open(['url' => 'common/companies', 'files' => true, 'role' => 'form']) !!}
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
{{ Form::textGroup('company_name', trans('general.name'), 'id-card-o') }}
|
{{ Form::textGroup('company_name', trans('general.name'), 'id-card-o') }}
|
||||||
|
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
|
|
||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
{{ Form::saveButtons('companies/companies') }}
|
{{ Form::saveButtons('common/companies') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-footer -->
|
<!-- /.box-footer -->
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
<div class="box box-success">
|
<div class="box box-success">
|
||||||
{!! Form::model($company, [
|
{!! Form::model($company, [
|
||||||
'method' => 'PATCH',
|
'method' => 'PATCH',
|
||||||
'url' => ['companies/companies', $company->id],
|
'url' => ['common/companies', $company->id],
|
||||||
'files' => true,
|
'files' => true,
|
||||||
'role' => 'form'
|
'role' => 'form'
|
||||||
]) !!}
|
]) !!}
|
||||||
@ -29,9 +29,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
|
|
||||||
@permission('update-companies-companies')
|
@permission('update-common-companies')
|
||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
{{ Form::saveButtons('companies/companies') }}
|
{{ Form::saveButtons('common/companies') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-footer -->
|
<!-- /.box-footer -->
|
||||||
@endpermission
|
@endpermission
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
@section('title', trans_choice('general.companies', 2))
|
@section('title', trans_choice('general.companies', 2))
|
||||||
|
|
||||||
@permission('create-companies-companies')
|
@permission('create-common-companies')
|
||||||
@section('new_button')
|
@section('new_button')
|
||||||
<span class="new-button"><a href="{{ url('companies/companies/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
<span class="new-button"><a href="{{ url('common/companies/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||||
@endsection
|
@endsection
|
||||||
@endpermission
|
@endpermission
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<div class="box box-success">
|
<div class="box box-success">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
{!! Form::open(['url' => 'companies/companies', 'role' => 'form', 'method' => 'GET']) !!}
|
{!! Form::open(['url' => 'common/companies', 'role' => 'form', 'method' => 'GET']) !!}
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
|
<span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
|
||||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||||
@ -45,7 +45,7 @@
|
|||||||
@foreach($companies as $item)
|
@foreach($companies as $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hidden-xs">{{ $item->id }}</td>
|
<td class="hidden-xs">{{ $item->id }}</td>
|
||||||
<td><a href="{{ url('companies/companies/' . $item->id . '/edit') }}">{{ $item->company_name }}</a></td>
|
<td><a href="{{ url('common/companies/' . $item->id . '/edit') }}">{{ $item->company_name }}</a></td>
|
||||||
<td class="hidden-xs">{{ $item->domain }}</td>
|
<td class="hidden-xs">{{ $item->domain }}</td>
|
||||||
<td class="hidden-xs">{{ $item->company_email }}</td>
|
<td class="hidden-xs">{{ $item->company_email }}</td>
|
||||||
<td class="hidden-xs">{{ Date::parse($item->created_at)->format($date_format) }}</td>
|
<td class="hidden-xs">{{ Date::parse($item->created_at)->format($date_format) }}</td>
|
||||||
@ -63,11 +63,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
@if ($item->enabled)
|
@if ($item->enabled)
|
||||||
<li><a href="{{ url('companies/companies/' . $item->id . '/set') }}">{{ trans('general.switch') }}</a></li>
|
<li><a href="{{ url('common/companies/' . $item->id . '/set') }}">{{ trans('general.switch') }}</a></li>
|
||||||
@endif
|
@endif
|
||||||
<li><a href="{{ url('companies/companies/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>
|
<li><a href="{{ url('common/companies/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>
|
||||||
@permission('delete-companies-companies')
|
@permission('delete-common-companies')
|
||||||
<li>{!! Form::deleteLink($item, 'companies/companies', '', 'company_name') !!}</li>
|
<li>{!! Form::deleteLink($item, 'common/companies', '', 'company_name') !!}</li>
|
||||||
@endpermission
|
@endpermission
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
@ -267,7 +267,7 @@
|
|||||||
var period = $('#period').val();
|
var period = $('#period').val();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("dashboard/dashboard/cashflow") }}',
|
url: '{{ url("common/dashboard/cashflow") }}',
|
||||||
type: 'get',
|
type: 'get',
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
data: 'period=' + period + '&start=' + picker.startDate.format('YYYY-MM-DD') + '&end=' + picker.endDate.format('YYYY-MM-DD'),
|
data: 'period=' + period + '&start=' + picker.startDate.format('YYYY-MM-DD') + '&end=' + picker.endDate.format('YYYY-MM-DD'),
|
||||||
@ -283,7 +283,7 @@
|
|||||||
$('#period').val('month');
|
$('#period').val('month');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("dashboard/dashboard/cashflow") }}',
|
url: '{{ url("common/dashboard/cashflow") }}',
|
||||||
type: 'get',
|
type: 'get',
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
data: 'period=month&start=' + picker.startDate.format('YYYY-MM-DD') + '&end=' + picker.endDate.format('YYYY-MM-DD'),
|
data: 'period=month&start=' + picker.startDate.format('YYYY-MM-DD') + '&end=' + picker.endDate.format('YYYY-MM-DD'),
|
||||||
@ -299,7 +299,7 @@
|
|||||||
$('#period').val('quarter');
|
$('#period').val('quarter');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("dashboard/dashboard/cashflow") }}',
|
url: '{{ url("common/dashboard/cashflow") }}',
|
||||||
type: 'get',
|
type: 'get',
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
data: 'period=quarter&start=' + picker.startDate.format('YYYY-MM-DD') + '&end=' + picker.endDate.format('YYYY-MM-DD'),
|
data: 'period=quarter&start=' + picker.startDate.format('YYYY-MM-DD') + '&end=' + picker.endDate.format('YYYY-MM-DD'),
|
@ -5,7 +5,7 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
<!-- Default box -->
|
<!-- Default box -->
|
||||||
<div class="box box-success">
|
<div class="box box-success">
|
||||||
{!! Form::open(['url' => 'items/items', 'files' => true, 'role' => 'form']) !!}
|
{!! Form::open(['url' => 'common/items', 'files' => true, 'role' => 'form']) !!}
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
{{ Form::textGroup('name', trans('general.name'), 'id-card-o') }}
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
|
|
||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
{{ Form::saveButtons('items/items') }}
|
{{ Form::saveButtons('common/items') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-footer -->
|
<!-- /.box-footer -->
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
{!! Form::model($item, [
|
{!! Form::model($item, [
|
||||||
'method' => 'PATCH',
|
'method' => 'PATCH',
|
||||||
'files' => true,
|
'files' => true,
|
||||||
'url' => ['items/items', $item->id],
|
'url' => ['common/items', $item->id],
|
||||||
'role' => 'form'
|
'role' => 'form'
|
||||||
]) !!}
|
]) !!}
|
||||||
|
|
||||||
@ -35,9 +35,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
|
|
||||||
@permission('update-items-items')
|
@permission('update-common-items')
|
||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
{{ Form::saveButtons('items/items') }}
|
{{ Form::saveButtons('common/items') }}
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-footer -->
|
<!-- /.box-footer -->
|
||||||
@endpermission
|
@endpermission
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
@section('title', trans_choice('general.items', 2))
|
@section('title', trans_choice('general.items', 2))
|
||||||
|
|
||||||
@permission('create-items-items')
|
@permission('create-common-items')
|
||||||
@section('new_button')
|
@section('new_button')
|
||||||
<span class="new-button"><a href="{{ url('items/items/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
<span class="new-button"><a href="{{ url('common/items/create') }}" class="btn btn-success btn-sm"><span class="fa fa-plus"></span> {{ trans('general.add_new') }}</a></span>
|
||||||
<span><a href="{{ url('common/import/items/items') }}" class="btn btn-success btn-sm"><span class="fa fa-download"></span> {{ trans('import.import') }}</a></span>
|
<span><a href="{{ url('common/import/common/items') }}" class="btn btn-success btn-sm"><span class="fa fa-download"></span> {{ trans('import.import') }}</a></span>
|
||||||
@endsection
|
@endsection
|
||||||
@endpermission
|
@endpermission
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<!-- Default box -->
|
<!-- Default box -->
|
||||||
<div class="box box-success">
|
<div class="box box-success">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
{!! Form::open(['url' => 'items/items', 'role' => 'form', 'method' => 'GET']) !!}
|
{!! Form::open(['url' => 'common/items', 'role' => 'form', 'method' => 'GET']) !!}
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
|
<span class="title-filter hidden-xs">{{ trans('general.search') }}:</span>
|
||||||
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
{!! Form::text('search', request('search'), ['class' => 'form-control input-filter input-sm', 'placeholder' => trans('general.search_placeholder')]) !!}
|
||||||
@ -47,7 +47,7 @@
|
|||||||
@foreach($items as $item)
|
@foreach($items as $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hidden-xs"><img src="{{ $item->picture ? Storage::url($item->picture->id) : asset('public/img/akaunting-logo-green.png') }}" class="img-thumbnail" width="50" alt="{{ $item->name }}"></td>
|
<td class="hidden-xs"><img src="{{ $item->picture ? Storage::url($item->picture->id) : asset('public/img/akaunting-logo-green.png') }}" class="img-thumbnail" width="50" alt="{{ $item->name }}"></td>
|
||||||
<td><a href="{{ url('items/items/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
<td><a href="{{ url('common/items/' . $item->id . '/edit') }}">{{ $item->name }}</a></td>
|
||||||
<td class="hidden-xs">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
|
<td class="hidden-xs">{{ $item->category ? $item->category->name : trans('general.na') }}</td>
|
||||||
<td class="hidden-xs">{{ $item->quantity }}</td>
|
<td class="hidden-xs">{{ $item->quantity }}</td>
|
||||||
<td class="text-right amount-space">{{ money($item->sale_price, setting('general.default_currency'), true) }}</td>
|
<td class="text-right amount-space">{{ money($item->sale_price, setting('general.default_currency'), true) }}</td>
|
||||||
@ -65,14 +65,14 @@
|
|||||||
<i class="fa fa-ellipsis-h"></i>
|
<i class="fa fa-ellipsis-h"></i>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right">
|
<ul class="dropdown-menu dropdown-menu-right">
|
||||||
<li><a href="{{ url('items/items/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>
|
<li><a href="{{ url('common/items/' . $item->id . '/edit') }}">{{ trans('general.edit') }}</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
@permission('create-items-items')
|
@permission('create-common-items')
|
||||||
<li><a href="{{ url('items/items/' . $item->id . '/duplicate') }}">{{ trans('general.duplicate') }}</a></li>
|
<li><a href="{{ url('common/items/' . $item->id . '/duplicate') }}">{{ trans('general.duplicate') }}</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
@endpermission
|
@endpermission
|
||||||
@permission('delete-items-items')
|
@permission('delete-common-items')
|
||||||
<li>{!! Form::deleteLink($item, 'items/items') !!}</li>
|
<li>{!! Form::deleteLink($item, 'common/items') !!}</li>
|
||||||
@endpermission
|
@endpermission
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
@ -220,7 +220,7 @@
|
|||||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
var autocomplete_path = "{{ url('common/items/autocomplete') }}";
|
||||||
|
|
||||||
$(document).on('click', '.form-control.typeahead', function() {
|
$(document).on('click', '.form-control.typeahead', function() {
|
||||||
input_id = $(this).attr('id').split('-');
|
input_id = $(this).attr('id').split('-');
|
||||||
@ -336,7 +336,7 @@
|
|||||||
|
|
||||||
function totalItem() {
|
function totalItem() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("items/items/totalItem") }}',
|
url: '{{ url("common/items/totalItem") }}',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'JSON',
|
dataType: 'JSON',
|
||||||
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||||
|
@ -253,7 +253,7 @@
|
|||||||
});
|
});
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
var autocomplete_path = "{{ url('common/items/autocomplete') }}";
|
||||||
|
|
||||||
$(document).on('click', '.form-control.typeahead', function() {
|
$(document).on('click', '.form-control.typeahead', function() {
|
||||||
input_id = $(this).attr('id').split('-');
|
input_id = $(this).attr('id').split('-');
|
||||||
@ -369,7 +369,7 @@
|
|||||||
|
|
||||||
function totalItem() {
|
function totalItem() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("items/items/totalItem") }}',
|
url: '{{ url("common/items/totalItem") }}',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'JSON',
|
dataType: 'JSON',
|
||||||
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||||
|
@ -221,7 +221,7 @@
|
|||||||
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
placeholder : '{{ trans('general.form.no_file_selected') }}'
|
||||||
});
|
});
|
||||||
|
|
||||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
var autocomplete_path = "{{ url('common/items/autocomplete') }}";
|
||||||
|
|
||||||
$(document).on('click', '.form-control.typeahead', function() {
|
$(document).on('click', '.form-control.typeahead', function() {
|
||||||
input_id = $(this).attr('id').split('-');
|
input_id = $(this).attr('id').split('-');
|
||||||
@ -337,7 +337,7 @@
|
|||||||
|
|
||||||
function totalItem() {
|
function totalItem() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("items/items/totalItem") }}',
|
url: '{{ url("common/items/totalItem") }}',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'JSON',
|
dataType: 'JSON',
|
||||||
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||||
|
@ -252,7 +252,7 @@
|
|||||||
});
|
});
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
var autocomplete_path = "{{ url('common/items/autocomplete') }}";
|
||||||
|
|
||||||
$(document).on('click', '.form-control.typeahead', function() {
|
$(document).on('click', '.form-control.typeahead', function() {
|
||||||
input_id = $(this).attr('id').split('-');
|
input_id = $(this).attr('id').split('-');
|
||||||
@ -368,7 +368,7 @@
|
|||||||
|
|
||||||
function totalItem() {
|
function totalItem() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '{{ url("items/items/totalItem") }}',
|
url: '{{ url("common/items/totalItem") }}',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'JSON',
|
dataType: 'JSON',
|
||||||
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
data: $('#currency_code, #discount input[type=\'number\'], #items input[type=\'text\'],#items input[type=\'number\'],#items input[type=\'hidden\'], #items textarea, #items select'),
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
||||||
|
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript"><!--
|
||||||
var url_search = '{{ url("search/search/search") }}';
|
var url_search = '{{ url("common/search/search") }}';
|
||||||
//--></script>
|
//--></script>
|
||||||
|
|
||||||
@stack('js')
|
@stack('js')
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pull-left info">
|
<div class="pull-left info">
|
||||||
<p>{{ str_limit(setting('general.company_name'), 22) }}</p>
|
<p>{{ str_limit(setting('general.company_name'), 22) }}</p>
|
||||||
@permission('read-companies-companies')
|
@permission('read-common-companies')
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="caret"></span> {{ trans('general.switch') }}</a>
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><span class="caret"></span> {{ trans('general.switch') }}</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
@foreach($companies as $com)
|
@foreach($companies as $com)
|
||||||
<li><a href="{{ url('companies/companies/'. $com->id .'/set') }}">{{ str_limit($com->company_name, 18) }}</a></li>
|
<li><a href="{{ url('common/companies/'. $com->id .'/set') }}">{{ str_limit($com->company_name, 18) }}</a></li>
|
||||||
@endforeach
|
@endforeach
|
||||||
@permission('update-companies-companies')
|
@permission('update-common-companies')
|
||||||
<li role="separator" class="divider"></li>
|
<li role="separator" class="divider"></li>
|
||||||
<li><a href="{{ url('companies/companies') }}">{{ trans('companies.manage') }}</a></li>
|
<li><a href="{{ url('common/companies') }}">{{ trans('companies.manage') }}</a></li>
|
||||||
@endpermission
|
@endpermission
|
||||||
</ul>
|
</ul>
|
||||||
@endpermission
|
@endpermission
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
||||||
|
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript"><!--
|
||||||
var url_search = '{{ url("search/search/search") }}';
|
var url_search = '{{ url("common/search/search") }}';
|
||||||
//--></script>
|
//--></script>
|
||||||
|
|
||||||
@stack('js')
|
@stack('js')
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
<script src="{{ asset('public/js/app.js?v=1.0') }}"></script>
|
||||||
|
|
||||||
<script type="text/javascript"><!--
|
<script type="text/javascript"><!--
|
||||||
var url_search = '{{ url("search/search/search") }}';
|
var url_search = '{{ url("common/search/search") }}';
|
||||||
//--></script>
|
//--></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -5,10 +5,10 @@ $api = app('Dingo\Api\Routing\Router');
|
|||||||
$api->version('v1', ['middleware' => ['api']], function($api) {
|
$api->version('v1', ['middleware' => ['api']], function($api) {
|
||||||
$api->group(['namespace' => 'App\Http\Controllers\Api'], function($api) {
|
$api->group(['namespace' => 'App\Http\Controllers\Api'], function($api) {
|
||||||
// Companies
|
// Companies
|
||||||
$api->resource('companies', 'Companies\Companies');
|
$api->resource('companies', 'Common\Companies');
|
||||||
|
|
||||||
// Items
|
// Items
|
||||||
$api->resource('items', 'Items\Items');
|
$api->resource('items', 'Common\Items');
|
||||||
|
|
||||||
// Incomes
|
// Incomes
|
||||||
$api->resource('customers', 'Incomes\Customers');
|
$api->resource('customers', 'Incomes\Customers');
|
||||||
|
@ -8,28 +8,24 @@ Route::group(['middleware' => 'language'], function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['middleware' => ['adminmenu', 'permission:read-admin-panel']], function () {
|
Route::group(['middleware' => ['adminmenu', 'permission:read-admin-panel']], function () {
|
||||||
Route::get('/', 'Dashboard\Dashboard@index');
|
Route::get('/', 'Common\Dashboard@index');
|
||||||
Route::get('dashboard/dashboard/cashflow', 'Dashboard\Dashboard@cashFlow');
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'uploads'], function () {
|
Route::group(['prefix' => 'uploads'], function () {
|
||||||
Route::delete('{id}', 'Common\Uploads@destroy');
|
Route::delete('{id}', 'Common\Uploads@destroy');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => 'search'], function () {
|
|
||||||
Route::get('search/search', 'Search\Search@search');
|
|
||||||
Route::resource('search', 'Search\Search');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'common'], function () {
|
Route::group(['prefix' => 'common'], function () {
|
||||||
|
Route::get('companies/{company}/set', 'Common\Companies@set');
|
||||||
|
Route::resource('companies', 'Common\Companies');
|
||||||
|
Route::get('dashboard/cashflow', 'Common\Dashboard@cashFlow');
|
||||||
Route::get('import/{group}/{type}', 'Common\Import@create');
|
Route::get('import/{group}/{type}', 'Common\Import@create');
|
||||||
});
|
Route::get('items/autocomplete', 'Common\Items@autocomplete');
|
||||||
|
Route::post('items/totalItem', 'Common\Items@totalItem');
|
||||||
Route::group(['prefix' => 'items'], function () {
|
Route::get('items/{item}/duplicate', 'Common\Items@duplicate');
|
||||||
Route::get('items/autocomplete', 'Items\Items@autocomplete');
|
Route::post('items/import', 'Common\Items@import');
|
||||||
Route::post('items/totalItem', 'Items\Items@totalItem');
|
Route::resource('items', 'Common\Items');
|
||||||
Route::get('items/{item}/duplicate', 'Items\Items@duplicate');
|
Route::get('search/search', 'Common\Search@search');
|
||||||
Route::post('items/import', 'Items\Items@import');
|
Route::resource('search', 'Common\Search');
|
||||||
Route::resource('items', 'Items\Items');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => 'auth'], function () {
|
Route::group(['prefix' => 'auth'], function () {
|
||||||
@ -43,11 +39,6 @@ Route::group(['middleware' => 'language'], function () {
|
|||||||
Route::resource('permissions', 'Auth\Permissions');
|
Route::resource('permissions', 'Auth\Permissions');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => 'companies'], function () {
|
|
||||||
Route::get('companies/{company}/set', 'Companies\Companies@set');
|
|
||||||
Route::resource('companies', 'Companies\Companies');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::group(['prefix' => 'incomes'], function () {
|
Route::group(['prefix' => 'incomes'], function () {
|
||||||
Route::get('invoices/{invoice}/sent', 'Incomes\Invoices@markSent');
|
Route::get('invoices/{invoice}/sent', 'Incomes\Invoices@markSent');
|
||||||
Route::get('invoices/{invoice}/email', 'Incomes\Invoices@emailInvoice');
|
Route::get('invoices/{invoice}/email', 'Incomes\Invoices@emailInvoice');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user