├── .editorconfig
├── .env.example
├── .gitattributes
├── .gitignore
├── .idea
├── misc.xml
├── modules.xml
├── php.xml
├── saleserp.iml
└── workspace.xml
├── .styleci.yml
├── app
├── Category.php
├── Console
│ └── Kernel.php
├── Customer.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── Auth
│ │ │ ├── ForgotPasswordController.php
│ │ │ ├── LoginController.php
│ │ │ ├── RegisterController.php
│ │ │ ├── ResetPasswordController.php
│ │ │ └── VerificationController.php
│ │ ├── CategoryController.php
│ │ ├── Controller.php
│ │ ├── CustomerController.php
│ │ ├── HomeController.php
│ │ ├── InvoiceController.php
│ │ ├── ProductController.php
│ │ ├── PurchaseController.php
│ │ ├── SupplierController.php
│ │ ├── TaxController.php
│ │ └── UnitController.php
│ ├── Kernel.php
│ └── Middleware
│ │ ├── Authenticate.php
│ │ ├── CheckForMaintenanceMode.php
│ │ ├── EncryptCookies.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustProxies.php
│ │ └── VerifyCsrfToken.php
├── Invoice.php
├── Product.php
├── ProductSale.php
├── ProductSupplier.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── Purchase.php
├── Sale.php
├── Supplier.php
├── Tax.php
├── Unit.php
└── User.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── composer.lock
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── database.php
├── filesystems.php
├── hashing.php
├── logging.php
├── mail.php
├── queue.php
├── services.php
├── session.php
└── view.php
├── database
├── .gitignore
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2014_10_12_000000_create_users_table.php
│ ├── 2014_10_12_100000_create_password_resets_table.php
│ ├── 2019_09_14_134301_create_categories_table.php
│ ├── 2019_09_15_053453_create_taxes_table.php
│ ├── 2019_09_15_055531_create_units_table.php
│ ├── 2019_09_15_061238_create_suppliers_table.php
│ ├── 2019_09_15_065207_create_customers_table.php
│ ├── 2019_09_15_101601_create_products_table.php
│ ├── 2019_09_17_043116_create_product_suppliers_table.php
│ ├── 2019_09_18_180122_create_invoices_table.php
│ ├── 2019_09_24_071816_create_sales_table.php
│ └── 2019_09_25_123326_create_purchases_table.php
└── seeds
│ ├── DatabaseSeeder.php
│ └── UsersTableSeeder.php
├── package.json
├── phpunit.xml
├── public
├── .htaccess
├── css
│ ├── app.css
│ └── main.css
├── favicon.ico
├── images
│ ├── product
│ │ ├── Greg-Emerson-edit-2.jpg
│ │ └── user.png
│ └── user
│ │ └── avatar1.png
├── index.php
├── js
│ ├── app.js
│ ├── bootstrap.min.js
│ ├── jquery-3.2.1.min.js
│ ├── main.js
│ ├── multifield
│ │ ├── Gruntfile.js
│ │ ├── jquery.multifield.js
│ │ └── jquery.multifield.min.js
│ ├── plugins
│ │ ├── bootstrap-datepicker.min.js
│ │ ├── bootstrap-notify.min.js
│ │ ├── chart.js
│ │ ├── dataTables.bootstrap.min.js
│ │ ├── fullcalendar.min.js
│ │ ├── jquery-ui.custom.min.js
│ │ ├── jquery.dataTables.min.js
│ │ ├── jquery.vmap.min.js
│ │ ├── jquery.vmap.sampledata.js
│ │ ├── jquery.vmap.world.js
│ │ ├── moment.min.js
│ │ ├── pace.min.js
│ │ ├── select2.min.js
│ │ └── sweetalert.min.js
│ └── popper.min.js
├── robots.txt
└── web.config
├── readme.md
├── resources
├── js
│ ├── app.js
│ ├── bootstrap.js
│ └── components
│ │ └── ExampleComponent.vue
├── lang
│ └── en
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
├── sass
│ ├── _variables.scss
│ └── app.scss
└── views
│ ├── auth
│ ├── login.blade.php
│ ├── passwords
│ │ ├── email.blade.php
│ │ └── reset.blade.php
│ ├── register.blade.php
│ └── verify.blade.php
│ ├── category
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── customer
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── home.blade.php
│ ├── invoice
│ ├── create.blade.php
│ ├── edit.blade.php
│ ├── index.blade.php
│ └── show.blade.php
│ ├── layouts
│ ├── app.blade.php
│ └── master.blade.php
│ ├── partials
│ ├── content.blade.php
│ ├── header.blade.php
│ └── sidebar.blade.php
│ ├── product
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── profile
│ ├── edit_profile.blade.php
│ └── password.blade.php
│ ├── purchase
│ ├── create.blade.php
│ ├── edit.blade.php
│ ├── index.blade.php
│ └── show.blade.php
│ ├── supplier
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── tax
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ ├── unit
│ ├── create.blade.php
│ ├── edit.blade.php
│ └── index.blade.php
│ └── welcome.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── saleserp.png
├── server.php
├── storage
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ ├── .gitignore
│ │ └── data
│ │ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
└── logs
│ └── .gitignore
├── tests
├── CreatesApplication.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
└── Unit
│ └── ExampleTest.php
└── webpack.mix.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | insert_final_newline = true
7 | indent_style = space
8 | indent_size = 4
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.yml]
15 | indent_size = 2
16 |
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=Laravel
2 | APP_ENV=local
3 | APP_KEY=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | LOG_CHANNEL=stack
8 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=127.0.0.1
11 | DB_PORT=3306
12 | DB_DATABASE=laravel
13 | DB_USERNAME=root
14 | DB_PASSWORD=
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | QUEUE_CONNECTION=sync
19 | SESSION_DRIVER=file
20 | SESSION_LIFETIME=120
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_DRIVER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 |
33 | AWS_ACCESS_KEY_ID=
34 | AWS_SECRET_ACCESS_KEY=
35 | AWS_DEFAULT_REGION=us-east-1
36 | AWS_BUCKET=
37 |
38 | PUSHER_APP_ID=
39 | PUSHER_APP_KEY=
40 | PUSHER_APP_SECRET=
41 | PUSHER_APP_CLUSTER=mt1
42 |
43 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
44 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
45 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | .env
7 | .env.backup
8 | .phpunit.result.cache
9 | Homestead.json
10 | Homestead.yaml
11 | npm-debug.log
12 | yarn-error.log
13 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.styleci.yml:
--------------------------------------------------------------------------------
1 | php:
2 | preset: laravel
3 | disabled:
4 | - unused_use
5 | finder:
6 | not-name:
7 | - index.php
8 | - server.php
9 | js:
10 | finder:
11 | not-name:
12 | - webpack.mix.js
13 | css: true
14 |
--------------------------------------------------------------------------------
/app/Category.php:
--------------------------------------------------------------------------------
1 | hasMany('App\Product');
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
28 | // ->hourly();
29 | }
30 |
31 | /**
32 | * Register the commands for the application.
33 | *
34 | * @return void
35 | */
36 | protected function commands()
37 | {
38 | $this->load(__DIR__.'/Commands');
39 |
40 | require base_path('routes/console.php');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/Customer.php:
--------------------------------------------------------------------------------
1 | hasMany('App\Invoice');
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/LoginController.php:
--------------------------------------------------------------------------------
1 | middleware('guest')->except('logout');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/RegisterController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
41 | }
42 |
43 | /**
44 | * Get a validator for an incoming registration request.
45 | *
46 | * @param array $data
47 | * @return \Illuminate\Contracts\Validation\Validator
48 | */
49 | protected function validator(array $data)
50 | {
51 | return Validator::make($data, [
52 | 'name' => ['required', 'string', 'max:255'],
53 | 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
54 | 'password' => ['required', 'string', 'min:8', 'confirmed'],
55 | ]);
56 | }
57 |
58 | /**
59 | * Create a new user instance after a valid registration.
60 | *
61 | * @param array $data
62 | * @return \App\User
63 | */
64 | protected function create(array $data)
65 | {
66 | return User::create([
67 | 'name' => $data['name'],
68 | 'email' => $data['email'],
69 | 'password' => Hash::make($data['password']),
70 | ]);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ResetPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/VerificationController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
38 | $this->middleware('signed')->only('verify');
39 | $this->middleware('throttle:6,1')->only('verify', 'resend');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/Http/Controllers/CategoryController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
20 | }
21 |
22 |
23 | public function index()
24 | {
25 | $categories = Category::all();
26 | return view('category.index', compact('categories'));
27 | }
28 |
29 | /**
30 | * Show the form for creating a new resource.
31 | *
32 | * @return \Illuminate\Http\Response
33 | */
34 | public function create()
35 | {
36 | return view('category.create');
37 | }
38 |
39 | /**
40 | * Store a newly created resource in storage.
41 | *
42 | * @param \Illuminate\Http\Request $request
43 | * @return \Illuminate\Http\Response
44 | */
45 | public function store(Request $request)
46 | {
47 | $request->validate([
48 | 'name' => 'required|min:3|unique:categories|regex:/^[a-zA-Z ]+$/',
49 | ]);
50 |
51 | $category = new Category();
52 | $category->name = $request->name;
53 | $category->slug = str_slug($request->name);
54 | $category->status = 1;
55 | $category->save();
56 |
57 | return redirect()->back()->with('message', 'Category Created Successfully');
58 | }
59 |
60 | /**
61 | * Display the specified resource.
62 | *
63 | * @param int $id
64 | * @return \Illuminate\Http\Response
65 | */
66 | public function show($id)
67 | {
68 | //
69 | }
70 |
71 | /**
72 | * Show the form for editing the specified resource.
73 | *
74 | * @param int $id
75 | * @return \Illuminate\Http\Response
76 | */
77 | public function edit($id)
78 | {
79 | $category = Category::findOrFail($id);
80 | return view('category.edit', compact('category'));
81 | }
82 |
83 | /**
84 | * Update the specified resource in storage.
85 | *
86 | * @param \Illuminate\Http\Request $request
87 | * @param int $id
88 | * @return \Illuminate\Http\Response
89 | */
90 | public function update(Request $request, $id)
91 | {
92 | $request->validate([
93 | 'name' => 'required|min:3|regex:/^[a-zA-Z ]+$/',
94 | ]);
95 |
96 | $category = Category::findOrFail($id);
97 | $category->name = $request->name;
98 | $category->slug = str_slug($request->name);
99 | $category->save();
100 |
101 | return redirect()->back()->with('message', 'Category Updated Successfully');
102 | }
103 |
104 | /**
105 | * Remove the specified resource from storage.
106 | *
107 | * @param int $id
108 | * @return \Illuminate\Http\Response
109 | */
110 | public function destroy($id)
111 | {
112 | $category = Category::find($id);
113 | $category->delete();
114 | return redirect()->back();
115 |
116 | }
117 | }
118 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
14 | }
15 |
16 |
17 | public function index()
18 | {
19 | $customers = Customer::all();
20 | return view('customer.index', compact('customers'));
21 | }
22 |
23 | /**
24 | * Show the form for creating a new resource.
25 | *
26 | * @return \Illuminate\Http\Response
27 | */
28 | public function create()
29 | {
30 | return view('customer.create');
31 | }
32 |
33 | /**
34 | * Store a newly created resource in storage.
35 | *
36 | * @param \Illuminate\Http\Request $request
37 | * @return \Illuminate\Http\Response
38 | */
39 | public function store(Request $request)
40 | {
41 | $request->validate([
42 | 'name' => 'required|min:3|unique:customers|regex:/^[a-zA-Z ]+$/',
43 | 'address' => 'required|min:3',
44 | 'mobile' => 'required|min:3|digits:11',
45 | 'details' => 'required|min:3|',
46 | 'previous_balance' => 'min:3',
47 |
48 | ]);
49 |
50 | $customer = new Customer();
51 | $customer->name = $request->name;
52 | $customer->address = $request->address;
53 | $customer->mobile = $request->mobile;
54 | $customer->details = $request->details;
55 | $customer->previous_balance = $request->previous_balance;
56 | $customer->save();
57 |
58 | return redirect()->back()->with('message', 'Customer Created Successfully');
59 | }
60 |
61 | /**
62 | * Display the specified resource.
63 | *
64 | * @param int $id
65 | * @return \Illuminate\Http\Response
66 | */
67 | public function show($id)
68 | {
69 | //
70 | }
71 |
72 | /**
73 | * Show the form for editing the specified resource.
74 | *
75 | * @param int $id
76 | * @return \Illuminate\Http\Response
77 | */
78 | public function edit($id)
79 | {
80 | $customer = Customer::findOrFail($id);
81 | return view('customer.edit', compact('customer'));
82 | }
83 |
84 | /**
85 | * Update the specified resource in storage.
86 | *
87 | * @param \Illuminate\Http\Request $request
88 | * @param int $id
89 | * @return \Illuminate\Http\Response
90 | */
91 | public function update(Request $request, $id)
92 | {
93 | $request->validate([
94 | 'name' => 'required|min:3|regex:/^[a-zA-Z ]+$/',
95 | 'address' => 'required|min:3',
96 | 'mobile' => 'required|min:3|digits:11',
97 | 'details' => 'required|min:3|',
98 | 'previous_balance' => 'min:3',
99 | ]);
100 |
101 | $customer = Customer::findOrFail($id);
102 | $customer->name = $request->name;
103 | $customer->address = $request->address;
104 | $customer->mobile = $request->mobile;
105 | $customer->details = $request->details;
106 | $customer->previous_balance = $request->previous_balance;
107 | $customer->save();
108 |
109 | return redirect()->back()->with('message', 'Customer Updated Successfully');
110 | }
111 |
112 | /**
113 | * Remove the specified resource from storage.
114 | *
115 | * @param int $id
116 | * @return \Illuminate\Http\Response
117 | */
118 | public function destroy($id)
119 | {
120 | $customer = Customer::find($id);
121 | $customer->delete();
122 | return redirect()->back();
123 |
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/app/Http/Controllers/HomeController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
19 | }
20 |
21 | /**
22 | * Show the application dashboard.
23 | *
24 | * @return \Illuminate\Contracts\Support\Renderable
25 | */
26 | public function index()
27 | {
28 | return view('home');
29 | }
30 |
31 | public function edit_profile(){
32 | return view('profile.edit_profile');
33 | }
34 |
35 | public function update_profile(Request $request, $id){
36 |
37 |
38 | $user = User::find($id);
39 | $user->f_name = $request->f_name;
40 | $user->l_name = $request->l_name;
41 | $user->email = $request->email;
42 |
43 | if ($request->hasFile('image')){
44 | $image_path ="images/user/".$user->image;
45 | if (file_exists($image_path)){
46 | unlink($image_path);
47 | }
48 | $imageName =request()->image->getClientOriginalName();
49 | request()->image->move(public_path('images/user/'), $imageName);
50 | $user->image = $imageName;
51 | }
52 |
53 |
54 |
55 | $user->save();
56 |
57 | return redirect()->back();
58 | }
59 |
60 |
61 | public function update_password(){
62 | return view('profile.password');
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/app/Http/Controllers/SupplierController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
14 | }
15 |
16 |
17 | public function index()
18 | {
19 | $suppliers = Supplier::all();
20 | return view('supplier.index', compact('suppliers'));
21 | }
22 |
23 | /**
24 | * Show the form for creating a new resource.
25 | *
26 | * @return \Illuminate\Http\Response
27 | */
28 | public function create()
29 | {
30 | return view('supplier.create');
31 | }
32 |
33 | /**
34 | * Store a newly created resource in storage.
35 | *
36 | * @param \Illuminate\Http\Request $request
37 | * @return \Illuminate\Http\Response
38 | */
39 | public function store(Request $request)
40 | {
41 | $request->validate([
42 | 'name' => 'required|min:3|unique:suppliers|regex:/^[a-zA-Z ]+$/',
43 | 'address' => 'required|min:3',
44 | 'mobile' => 'required|min:3|digits:11',
45 | 'details' => 'required|min:3|',
46 | 'previous_balance' => 'min:3',
47 |
48 | ]);
49 |
50 | $supplier = new Supplier();
51 | $supplier->name = $request->name;
52 | $supplier->address = $request->address;
53 | $supplier->mobile = $request->mobile;
54 | $supplier->details = $request->details;
55 | $supplier->previous_balance = $request->previous_balance;
56 | $supplier->save();
57 |
58 | return redirect()->back()->with('message', 'Supplier Created Successfully');
59 | }
60 |
61 | /**
62 | * Display the specified resource.
63 | *
64 | * @param int $id
65 | * @return \Illuminate\Http\Response
66 | */
67 | public function show($id)
68 | {
69 | //
70 | }
71 |
72 | /**
73 | * Show the form for editing the specified resource.
74 | *
75 | * @param int $id
76 | * @return \Illuminate\Http\Response
77 | */
78 | public function edit($id)
79 | {
80 | $supplier = Supplier::findOrFail($id);
81 | return view('supplier.edit', compact('supplier'));
82 | }
83 |
84 | /**
85 | * Update the specified resource in storage.
86 | *
87 | * @param \Illuminate\Http\Request $request
88 | * @param int $id
89 | * @return \Illuminate\Http\Response
90 | */
91 | public function update(Request $request, $id)
92 | {
93 | $request->validate([
94 | 'name' => 'required|min:3|regex:/^[a-zA-Z ]+$/',
95 | 'address' => 'required|min:3',
96 | 'mobile' => 'required|min:3|digits:11',
97 | 'details' => 'required|min:3|',
98 | 'previous_balance' => 'min:3',
99 | ]);
100 |
101 | $supplier = Supplier::findOrFail($id);
102 | $supplier->name = $request->name;
103 | $supplier->address = $request->address;
104 | $supplier->mobile = $request->mobile;
105 | $supplier->details = $request->details;
106 | $supplier->previous_balance = $request->previous_balance;
107 | $supplier->save();
108 |
109 | return redirect()->back()->with('message', 'Suppler Updated Successfully');
110 | }
111 |
112 | /**
113 | * Remove the specified resource from storage.
114 | *
115 | * @param int $id
116 | * @return \Illuminate\Http\Response
117 | */
118 | public function destroy($id)
119 | {
120 | $supplier = Supplier::find($id);
121 | $supplier->delete();
122 | return redirect()->back();
123 |
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/app/Http/Controllers/TaxController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
14 | }
15 |
16 |
17 | public function index()
18 | {
19 | $taxes = Tax::all();
20 | return view('tax.index', compact('taxes'));
21 | }
22 |
23 | /**
24 | * Show the form for creating a new resource.
25 | *
26 | * @return \Illuminate\Http\Response
27 | */
28 | public function create()
29 | {
30 | return view('tax.create');
31 | }
32 |
33 | /**
34 | * Store a newly created resource in storage.
35 | *
36 | * @param \Illuminate\Http\Request $request
37 | * @return \Illuminate\Http\Response
38 | */
39 | public function store(Request $request)
40 | {
41 | $request->validate([
42 | 'name' => 'required|unique:taxes|numeric',
43 | ]);
44 |
45 | $tax = new Tax();
46 | $tax->name = $request->name;
47 | $tax->slug = str_slug($request->name);
48 | $tax->status = 1;
49 | $tax->save();
50 |
51 | return redirect()->back()->with('message', 'Tax Created Successfully');
52 | }
53 |
54 | /**
55 | * Display the specified resource.
56 | *
57 | * @param int $id
58 | * @return \Illuminate\Http\Response
59 | */
60 | public function show($id)
61 | {
62 | //
63 | }
64 |
65 | /**
66 | * Show the form for editing the specified resource.
67 | *
68 | * @param int $id
69 | * @return \Illuminate\Http\Response
70 | */
71 | public function edit($id)
72 | {
73 | $tax = Tax::findOrFail($id);
74 | return view('tax.edit', compact('tax'));
75 | }
76 |
77 | /**
78 | * Update the specified resource in storage.
79 | *
80 | * @param \Illuminate\Http\Request $request
81 | * @param int $id
82 | * @return \Illuminate\Http\Response
83 | */
84 | public function update(Request $request, $id)
85 | {
86 | $request->validate([
87 | 'name' => 'required|numeric',
88 | ]);
89 |
90 | $tax = Tax::findOrFail($id);
91 | $tax->name = $request->name;
92 | $tax->slug = str_slug($request->name);
93 | $tax->save();
94 |
95 | return redirect()->back()->with('message', 'Tax Updated Successfully');
96 | }
97 |
98 | /**
99 | * Remove the specified resource from storage.
100 | *
101 | * @param int $id
102 | * @return \Illuminate\Http\Response
103 | */
104 | public function destroy($id)
105 | {
106 | $tax = Tax::find($id);
107 | $tax->delete();
108 | return redirect()->back();
109 |
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/app/Http/Controllers/UnitController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
14 | }
15 |
16 |
17 | public function index()
18 | {
19 | $units = Unit::all();
20 | return view('unit.index', compact('units'));
21 | }
22 |
23 | /**
24 | * Show the form for creating a new resource.
25 | *
26 | * @return \Illuminate\Http\Response
27 | */
28 | public function create()
29 | {
30 | return view('unit.create');
31 | }
32 |
33 | /**
34 | * Store a newly created resource in storage.
35 | *
36 | * @param \Illuminate\Http\Request $request
37 | * @return \Illuminate\Http\Response
38 | */
39 | public function store(Request $request)
40 | {
41 | $request->validate([
42 | 'name' => 'required|min:2|unique:units|regex:/^[a-zA-Z ]+$/',
43 | ]);
44 |
45 | $unit = new Unit();
46 | $unit->name = $request->name;
47 | $unit->slug = str_slug($request->name);
48 | $unit->status = 1;
49 | $unit->save();
50 |
51 | return redirect()->back()->with('message', 'Unite Created Successfully');
52 | }
53 |
54 | /**
55 | * Display the specified resource.
56 | *
57 | * @param int $id
58 | * @return \Illuminate\Http\Response
59 | */
60 | public function show($id)
61 | {
62 | //
63 | }
64 |
65 | /**
66 | * Show the form for editing the specified resource.
67 | *
68 | * @param int $id
69 | * @return \Illuminate\Http\Response
70 | */
71 | public function edit($id)
72 | {
73 | $unit = Unit::findOrFail($id);
74 | return view('unit.edit', compact('unit'));
75 | }
76 |
77 | /**
78 | * Update the specified resource in storage.
79 | *
80 | * @param \Illuminate\Http\Request $request
81 | * @param int $id
82 | * @return \Illuminate\Http\Response
83 | */
84 | public function update(Request $request, $id)
85 | {
86 | $request->validate([
87 | 'name' => 'required|min:2|regex:/^[a-zA-Z ]+$/',
88 | ]);
89 |
90 | $unit = Unit::findOrFail($id);
91 | $unit->name = $request->name;
92 | $unit->slug = str_slug($request->name);
93 | $unit->save();
94 |
95 | return redirect()->back()->with('message', 'Unit Updated Successfully');
96 | }
97 |
98 | /**
99 | * Remove the specified resource from storage.
100 | *
101 | * @param int $id
102 | * @return \Illuminate\Http\Response
103 | */
104 | public function destroy($id)
105 | {
106 | $unit = Unit::find($id);
107 | $unit->delete();
108 | return redirect()->back();
109 |
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 | [
31 | \App\Http\Middleware\EncryptCookies::class,
32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
33 | \Illuminate\Session\Middleware\StartSession::class,
34 | // \Illuminate\Session\Middleware\AuthenticateSession::class,
35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
36 | \App\Http\Middleware\VerifyCsrfToken::class,
37 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
38 | ],
39 |
40 | 'api' => [
41 | 'throttle:60,1',
42 | 'bindings',
43 | ],
44 | ];
45 |
46 | /**
47 | * The application's route middleware.
48 | *
49 | * These middleware may be assigned to groups or used individually.
50 | *
51 | * @var array
52 | */
53 | protected $routeMiddleware = [
54 | 'auth' => \App\Http\Middleware\Authenticate::class,
55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
57 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
58 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
59 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
60 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
61 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
62 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
63 | ];
64 |
65 | /**
66 | * The priority-sorted list of middleware.
67 | *
68 | * This forces non-global middleware to always be in the given order.
69 | *
70 | * @var array
71 | */
72 | protected $middlewarePriority = [
73 | \Illuminate\Session\Middleware\StartSession::class,
74 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
75 | \App\Http\Middleware\Authenticate::class,
76 | \Illuminate\Session\Middleware\AuthenticateSession::class,
77 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
78 | \Illuminate\Auth\Middleware\Authorize::class,
79 | ];
80 | }
81 |
--------------------------------------------------------------------------------
/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
18 | return route('login');
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/Http/Middleware/CheckForMaintenanceMode.php:
--------------------------------------------------------------------------------
1 | check()) {
21 | return redirect('/home');
22 | }
23 |
24 | return $next($request);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | hasMany('App\Sales');
12 | }
13 |
14 | public function customer(){
15 | return $this->belongsTo('App\Customer');
16 | }
17 |
18 |
19 |
20 |
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/app/Product.php:
--------------------------------------------------------------------------------
1 | belongsTo('App\Category');
11 | }
12 | public function unit(){
13 | return $this->belongsTo('App\Unit');
14 | }
15 | public function tax(){
16 | return $this->belongsTo('App\Tax');
17 | }
18 |
19 | public function additionalProduct(){
20 | return $this->hasMany('App\ProductSupplier');
21 | }
22 |
23 | public function sale(){
24 | return $this->hasMany('App\Sale');
25 | }
26 |
27 | public function invoice(){
28 | return $this->belongsToMany('App\Invoice');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/ProductSale.php:
--------------------------------------------------------------------------------
1 | belongsTo('App\Product');
11 | }
12 |
13 | public function sale(){
14 | return $this->belongsTo('App\Sale');
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/ProductSupplier.php:
--------------------------------------------------------------------------------
1 | belongsTo('App\Product');
12 | }
13 |
14 | public function supplier(){
15 | return $this->belongsTo('App\Supplier');
16 | }
17 |
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/app/Providers/AppServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | *
22 | * @return void
23 | */
24 | public function boot()
25 | {
26 | $this->registerPolicies();
27 |
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
19 | SendEmailVerificationNotification::class,
20 | ],
21 | ];
22 |
23 | /**
24 | * Register any events for your application.
25 | *
26 | * @return void
27 | */
28 | public function boot()
29 | {
30 | parent::boot();
31 |
32 | //
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapApiRoutes();
39 |
40 | $this->mapWebRoutes();
41 |
42 | //
43 | }
44 |
45 | /**
46 | * Define the "web" routes for the application.
47 | *
48 | * These routes all receive session state, CSRF protection, etc.
49 | *
50 | * @return void
51 | */
52 | protected function mapWebRoutes()
53 | {
54 | Route::middleware('web')
55 | ->namespace($this->namespace)
56 | ->group(base_path('routes/web.php'));
57 | }
58 |
59 | /**
60 | * Define the "api" routes for the application.
61 | *
62 | * These routes are typically stateless.
63 | *
64 | * @return void
65 | */
66 | protected function mapApiRoutes()
67 | {
68 | Route::prefix('api')
69 | ->middleware('api')
70 | ->namespace($this->namespace)
71 | ->group(base_path('routes/api.php'));
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/Purchase.php:
--------------------------------------------------------------------------------
1 | belongsTo('App\Invoice');
11 | }
12 |
13 | public function product(){
14 | return $this->belongsTo('App\Product');
15 | }
16 |
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/app/Supplier.php:
--------------------------------------------------------------------------------
1 | hasMany('App\Product');
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/Tax.php:
--------------------------------------------------------------------------------
1 | hasMany('App\Product');
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/Unit.php:
--------------------------------------------------------------------------------
1 | hasMany('App\Product');
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/User.php:
--------------------------------------------------------------------------------
1 | 'datetime',
38 | ];
39 |
40 | public function getFullNameAttribute() {
41 | return ucfirst($this->f_name) . ' ' . ucfirst($this->l_name);
42 | }
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
34 |
35 | $status = $kernel->handle(
36 | $input = new Symfony\Component\Console\Input\ArgvInput,
37 | new Symfony\Component\Console\Output\ConsoleOutput
38 | );
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Shutdown The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once Artisan has finished running, we will fire off the shutdown events
46 | | so that any final work may be done by the application before we shut
47 | | down the process. This is the last thing to happen to the request.
48 | |
49 | */
50 |
51 | $kernel->terminate($input, $status);
52 |
53 | exit($status);
54 |
--------------------------------------------------------------------------------
/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "laravel/laravel",
3 | "type": "project",
4 | "description": "The Laravel Framework.",
5 | "keywords": [
6 | "framework",
7 | "laravel"
8 | ],
9 | "license": "MIT",
10 | "require": {
11 | "php": "^7.1.3",
12 | "fideloper/proxy": "^4.0",
13 | "laravel/framework": "5.8.*",
14 | "laravel/tinker": "^1.0"
15 | },
16 | "require-dev": {
17 | "beyondcode/laravel-dump-server": "^1.0",
18 | "filp/whoops": "^2.0",
19 | "fzaninotto/faker": "^1.4",
20 | "mockery/mockery": "^1.0",
21 | "nunomaduro/collision": "^3.0",
22 | "phpunit/phpunit": "^7.5"
23 | },
24 | "config": {
25 | "optimize-autoloader": true,
26 | "preferred-install": "dist",
27 | "sort-packages": true
28 | },
29 | "extra": {
30 | "laravel": {
31 | "dont-discover": []
32 | }
33 | },
34 | "autoload": {
35 | "psr-4": {
36 | "App\\": "app/"
37 | },
38 | "classmap": [
39 | "database/seeds",
40 | "database/factories"
41 | ]
42 | },
43 | "autoload-dev": {
44 | "psr-4": {
45 | "Tests\\": "tests/"
46 | }
47 | },
48 | "minimum-stability": "dev",
49 | "prefer-stable": true,
50 | "scripts": {
51 | "post-autoload-dump": [
52 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
53 | "@php artisan package:discover --ansi"
54 | ],
55 | "post-root-package-install": [
56 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
57 | ],
58 | "post-create-project-cmd": [
59 | "@php artisan key:generate --ansi"
60 | ]
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/config/auth.php:
--------------------------------------------------------------------------------
1 | [
17 | 'guard' => 'web',
18 | 'passwords' => 'users',
19 | ],
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Authentication Guards
24 | |--------------------------------------------------------------------------
25 | |
26 | | Next, you may define every authentication guard for your application.
27 | | Of course, a great default configuration has been defined for you
28 | | here which uses session storage and the Eloquent user provider.
29 | |
30 | | All authentication drivers have a user provider. This defines how the
31 | | users are actually retrieved out of your database or other storage
32 | | mechanisms used by this application to persist your user's data.
33 | |
34 | | Supported: "session", "token"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 |
44 | 'api' => [
45 | 'driver' => 'token',
46 | 'provider' => 'users',
47 | 'hash' => false,
48 | ],
49 | ],
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | User Providers
54 | |--------------------------------------------------------------------------
55 | |
56 | | All authentication drivers have a user provider. This defines how the
57 | | users are actually retrieved out of your database or other storage
58 | | mechanisms used by this application to persist your user's data.
59 | |
60 | | If you have multiple user tables or models you may configure multiple
61 | | sources which represent each model / table. These sources may then
62 | | be assigned to any extra authentication guards you have defined.
63 | |
64 | | Supported: "database", "eloquent"
65 | |
66 | */
67 |
68 | 'providers' => [
69 | 'users' => [
70 | 'driver' => 'eloquent',
71 | 'model' => App\User::class,
72 | ],
73 |
74 | // 'users' => [
75 | // 'driver' => 'database',
76 | // 'table' => 'users',
77 | // ],
78 | ],
79 |
80 | /*
81 | |--------------------------------------------------------------------------
82 | | Resetting Passwords
83 | |--------------------------------------------------------------------------
84 | |
85 | | You may specify multiple password reset configurations if you have more
86 | | than one user table or model in the application and you want to have
87 | | separate password reset settings based on the specific user types.
88 | |
89 | | The expire time is the number of minutes that the reset token should be
90 | | considered valid. This security feature keeps tokens short-lived so
91 | | they have less time to be guessed. You may change this as needed.
92 | |
93 | */
94 |
95 | 'passwords' => [
96 | 'users' => [
97 | 'provider' => 'users',
98 | 'table' => 'password_resets',
99 | 'expire' => 60,
100 | ],
101 | ],
102 |
103 | ];
104 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'useTLS' => true,
41 | ],
42 | ],
43 |
44 | 'redis' => [
45 | 'driver' => 'redis',
46 | 'connection' => 'default',
47 | ],
48 |
49 | 'log' => [
50 | 'driver' => 'log',
51 | ],
52 |
53 | 'null' => [
54 | 'driver' => 'null',
55 | ],
56 |
57 | ],
58 |
59 | ];
60 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Cache Stores
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may define all of the cache "stores" for your application as
29 | | well as their drivers. You may even define multiple stores for the
30 | | same cache driver to group types of items stored in your caches.
31 | |
32 | */
33 |
34 | 'stores' => [
35 |
36 | 'apc' => [
37 | 'driver' => 'apc',
38 | ],
39 |
40 | 'array' => [
41 | 'driver' => 'array',
42 | ],
43 |
44 | 'database' => [
45 | 'driver' => 'database',
46 | 'table' => 'cache',
47 | 'connection' => null,
48 | ],
49 |
50 | 'file' => [
51 | 'driver' => 'file',
52 | 'path' => storage_path('framework/cache/data'),
53 | ],
54 |
55 | 'memcached' => [
56 | 'driver' => 'memcached',
57 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
58 | 'sasl' => [
59 | env('MEMCACHED_USERNAME'),
60 | env('MEMCACHED_PASSWORD'),
61 | ],
62 | 'options' => [
63 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
64 | ],
65 | 'servers' => [
66 | [
67 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
68 | 'port' => env('MEMCACHED_PORT', 11211),
69 | 'weight' => 100,
70 | ],
71 | ],
72 | ],
73 |
74 | 'redis' => [
75 | 'driver' => 'redis',
76 | 'connection' => 'cache',
77 | ],
78 |
79 | 'dynamodb' => [
80 | 'driver' => 'dynamodb',
81 | 'key' => env('AWS_ACCESS_KEY_ID'),
82 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
83 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
84 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
85 | 'endpoint' => env('DYNAMODB_ENDPOINT'),
86 | ],
87 |
88 | ],
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | Cache Key Prefix
93 | |--------------------------------------------------------------------------
94 | |
95 | | When utilizing a RAM based store such as APC or Memcached, there might
96 | | be other applications utilizing the same cache. So, we'll specify a
97 | | value to get prefixed to all our keys so we can avoid collisions.
98 | |
99 | */
100 |
101 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
102 |
103 | ];
104 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DRIVER', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'url' => env('APP_URL').'/storage',
55 | 'visibility' => 'public',
56 | ],
57 |
58 | 's3' => [
59 | 'driver' => 's3',
60 | 'key' => env('AWS_ACCESS_KEY_ID'),
61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
62 | 'region' => env('AWS_DEFAULT_REGION'),
63 | 'bucket' => env('AWS_BUCKET'),
64 | 'url' => env('AWS_URL'),
65 | ],
66 |
67 | ],
68 |
69 | ];
70 |
--------------------------------------------------------------------------------
/config/hashing.php:
--------------------------------------------------------------------------------
1 | 'bcrypt',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Bcrypt Options
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may specify the configuration options that should be used when
26 | | passwords are hashed using the Bcrypt algorithm. This will allow you
27 | | to control the amount of time it takes to hash the given password.
28 | |
29 | */
30 |
31 | 'bcrypt' => [
32 | 'rounds' => env('BCRYPT_ROUNDS', 10),
33 | ],
34 |
35 | /*
36 | |--------------------------------------------------------------------------
37 | | Argon Options
38 | |--------------------------------------------------------------------------
39 | |
40 | | Here you may specify the configuration options that should be used when
41 | | passwords are hashed using the Argon algorithm. These will allow you
42 | | to control the amount of time it takes to hash the given password.
43 | |
44 | */
45 |
46 | 'argon' => [
47 | 'memory' => 1024,
48 | 'threads' => 2,
49 | 'time' => 2,
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/config/logging.php:
--------------------------------------------------------------------------------
1 | env('LOG_CHANNEL', 'stack'),
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Log Channels
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may configure the log channels for your application. Out of
27 | | the box, Laravel uses the Monolog PHP logging library. This gives
28 | | you a variety of powerful log handlers / formatters to utilize.
29 | |
30 | | Available Drivers: "single", "daily", "slack", "syslog",
31 | | "errorlog", "monolog",
32 | | "custom", "stack"
33 | |
34 | */
35 |
36 | 'channels' => [
37 | 'stack' => [
38 | 'driver' => 'stack',
39 | 'channels' => ['daily'],
40 | 'ignore_exceptions' => false,
41 | ],
42 |
43 | 'single' => [
44 | 'driver' => 'single',
45 | 'path' => storage_path('logs/laravel.log'),
46 | 'level' => 'debug',
47 | ],
48 |
49 | 'daily' => [
50 | 'driver' => 'daily',
51 | 'path' => storage_path('logs/laravel.log'),
52 | 'level' => 'debug',
53 | 'days' => 14,
54 | ],
55 |
56 | 'slack' => [
57 | 'driver' => 'slack',
58 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
59 | 'username' => 'Laravel Log',
60 | 'emoji' => ':boom:',
61 | 'level' => 'critical',
62 | ],
63 |
64 | 'papertrail' => [
65 | 'driver' => 'monolog',
66 | 'level' => 'debug',
67 | 'handler' => SyslogUdpHandler::class,
68 | 'handler_with' => [
69 | 'host' => env('PAPERTRAIL_URL'),
70 | 'port' => env('PAPERTRAIL_PORT'),
71 | ],
72 | ],
73 |
74 | 'stderr' => [
75 | 'driver' => 'monolog',
76 | 'handler' => StreamHandler::class,
77 | 'formatter' => env('LOG_STDERR_FORMATTER'),
78 | 'with' => [
79 | 'stream' => 'php://stderr',
80 | ],
81 | ],
82 |
83 | 'syslog' => [
84 | 'driver' => 'syslog',
85 | 'level' => 'debug',
86 | ],
87 |
88 | 'errorlog' => [
89 | 'driver' => 'errorlog',
90 | 'level' => 'debug',
91 | ],
92 | ],
93 |
94 | ];
95 |
--------------------------------------------------------------------------------
/config/queue.php:
--------------------------------------------------------------------------------
1 | env('QUEUE_CONNECTION', 'sync'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Queue Connections
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure the connection information for each server that
24 | | is used by your application. A default configuration has been added
25 | | for each back-end shipped with Laravel. You are free to add more.
26 | |
27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'sync' => [
34 | 'driver' => 'sync',
35 | ],
36 |
37 | 'database' => [
38 | 'driver' => 'database',
39 | 'table' => 'jobs',
40 | 'queue' => 'default',
41 | 'retry_after' => 90,
42 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'retry_after' => 90,
49 | 'block_for' => 0,
50 | ],
51 |
52 | 'sqs' => [
53 | 'driver' => 'sqs',
54 | 'key' => env('AWS_ACCESS_KEY_ID'),
55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'),
58 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
59 | ],
60 |
61 | 'redis' => [
62 | 'driver' => 'redis',
63 | 'connection' => 'default',
64 | 'queue' => env('REDIS_QUEUE', 'default'),
65 | 'retry_after' => 90,
66 | 'block_for' => null,
67 | ],
68 |
69 | ],
70 |
71 | /*
72 | |--------------------------------------------------------------------------
73 | | Failed Queue Jobs
74 | |--------------------------------------------------------------------------
75 | |
76 | | These options configure the behavior of failed queue job logging so you
77 | | can control which database and table are used to store the jobs that
78 | | have failed. You may change them to any database / table you wish.
79 | |
80 | */
81 |
82 | 'failed' => [
83 | 'database' => env('DB_CONNECTION', 'mysql'),
84 | 'table' => 'failed_jobs',
85 | ],
86 |
87 | ];
88 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
21 | ],
22 |
23 | 'postmark' => [
24 | 'token' => env('POSTMARK_TOKEN'),
25 | ],
26 |
27 | 'ses' => [
28 | 'key' => env('AWS_ACCESS_KEY_ID'),
29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
31 | ],
32 |
33 | 'sparkpost' => [
34 | 'secret' => env('SPARKPOST_SECRET'),
35 | ],
36 |
37 | ];
38 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 | *.sqlite-journal
3 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | define(User::class, function (Faker $faker) {
20 | return [
21 | 'name' => $faker->name,
22 | 'email' => $faker->unique()->safeEmail,
23 | 'email_verified_at' => now(),
24 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
25 | 'remember_token' => Str::random(10),
26 | ];
27 | });
28 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->string('f_name');
19 | $table->string('l_name');
20 | $table->string('email')->unique();
21 | $table->string('image');
22 | $table->timestamp('email_verified_at')->nullable();
23 | $table->string('password');
24 | $table->rememberToken();
25 | $table->timestamps();
26 | });
27 | }
28 |
29 | /**
30 | * Reverse the migrations.
31 | *
32 | * @return void
33 | */
34 | public function down()
35 | {
36 | Schema::dropIfExists('users');
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
18 | $table->string('token');
19 | $table->timestamp('created_at')->nullable();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::dropIfExists('password_resets');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_14_134301_create_categories_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->string('name');
19 | $table->string('slug');
20 | $table->boolean('status');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists('categories');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_15_053453_create_taxes_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->string('name');
19 | $table->string('slug');
20 | $table->boolean('status');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists('taxes');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_15_055531_create_units_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->string('name');
19 | $table->string('slug');
20 | $table->boolean('status');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists('units');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_15_061238_create_suppliers_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->string('name');
19 | $table->string('mobile');
20 | $table->string('address');
21 | $table->text('details');
22 | $table->text('previous_balance');
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('suppliers');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_15_065207_create_customers_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->string('name');
19 | $table->string('mobile');
20 | $table->string('address');
21 | $table->text('details');
22 | $table->text('previous_balance');
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('customers');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_15_101601_create_products_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->string('name');
19 | $table->integer('serial_number');
20 | $table->string('model');
21 | $table->integer('category_id');
22 | $table->string('sales_price');
23 | $table->integer('unit_id');
24 | $table->string('image');
25 | $table->string('tax_id');
26 | $table->timestamps();
27 | });
28 | }
29 |
30 | /**
31 | * Reverse the migrations.
32 | *
33 | * @return void
34 | */
35 | public function down()
36 | {
37 | Schema::dropIfExists('products');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_17_043116_create_product_suppliers_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->integer('product_id');
19 | $table->integer('supplier_id');
20 | $table->integer('price');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists('product_suppliers');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_18_180122_create_invoices_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->bigInteger('customer_id')->unsigned();
19 | $table->string('total');
20 | $table->foreign('customer_id')
21 | ->references('id')->on('customers')
22 | ->onDelete('cascade');
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('invoices');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_24_071816_create_sales_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->bigInteger('invoice_id')->unsigned();
19 | $table->bigInteger('product_id')->unsigned();
20 | $table->integer('qty');
21 | $table->integer('price');
22 | $table->integer('dis');
23 | $table->integer('amount');
24 | $table->foreign('invoice_id')
25 | ->references('id')->on('invoices')
26 | ->onDelete('cascade');
27 | $table->foreign('product_id')
28 | ->references('id')->on('products')
29 | ->onDelete('cascade');
30 | $table->timestamps();
31 | });
32 | }
33 |
34 | /**
35 | * Reverse the migrations.
36 | *
37 | * @return void
38 | */
39 | public function down()
40 | {
41 | Schema::dropIfExists('sales');
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/database/migrations/2019_09_25_123326_create_purchases_table.php:
--------------------------------------------------------------------------------
1 | bigIncrements('id');
18 | $table->timestamps();
19 | });
20 | }
21 |
22 | /**
23 | * Reverse the migrations.
24 | *
25 | * @return void
26 | */
27 | public function down()
28 | {
29 | Schema::dropIfExists('purchases');
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call(UsersTableSeeder::class);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/database/seeds/UsersTableSeeder.php:
--------------------------------------------------------------------------------
1 | insert([
15 | 'f_name' => "Admin",
16 | 'l_name' => "User",
17 | 'image' => "user.jpg",
18 | 'email' => 'admin@example.com',
19 | 'password' => bcrypt('password'),
20 | ]);
21 |
22 |
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "npm run development -- --watch",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "axios": "^0.19",
14 | "bootstrap": "^4.1.0",
15 | "cross-env": "^5.1",
16 | "jquery": "^3.2",
17 | "laravel-mix": "^4.0.7",
18 | "lodash": "^4.17.13",
19 | "popper.js": "^1.12",
20 | "resolve-url-loader": "^2.3.1",
21 | "sass": "^1.15.2",
22 | "sass-loader": "^7.1.0",
23 | "vue": "^2.5.17"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | ./tests/Unit
14 |
15 |
16 |
17 | ./tests/Feature
18 |
19 |
20 |
21 |
22 | ./app
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews -Indexes
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Handle Authorization Header
9 | RewriteCond %{HTTP:Authorization} .
10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
11 |
12 | # Redirect Trailing Slashes If Not A Folder...
13 | RewriteCond %{REQUEST_FILENAME} !-d
14 | RewriteCond %{REQUEST_URI} (.+)/$
15 | RewriteRule ^ %1 [L,R=301]
16 |
17 | # Handle Front Controller...
18 | RewriteCond %{REQUEST_FILENAME} !-d
19 | RewriteCond %{REQUEST_FILENAME} !-f
20 | RewriteRule ^ index.php [L]
21 |
22 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshrafulRasel/SalesERP/62091eb4c0d634edbd8c434a11a8e2e7243fdaeb/public/favicon.ico
--------------------------------------------------------------------------------
/public/images/product/Greg-Emerson-edit-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshrafulRasel/SalesERP/62091eb4c0d634edbd8c434a11a8e2e7243fdaeb/public/images/product/Greg-Emerson-edit-2.jpg
--------------------------------------------------------------------------------
/public/images/product/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshrafulRasel/SalesERP/62091eb4c0d634edbd8c434a11a8e2e7243fdaeb/public/images/product/user.png
--------------------------------------------------------------------------------
/public/images/user/avatar1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshrafulRasel/SalesERP/62091eb4c0d634edbd8c434a11a8e2e7243fdaeb/public/images/user/avatar1.png
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | define('LARAVEL_START', microtime(true));
11 |
12 | /*
13 | |--------------------------------------------------------------------------
14 | | Register The Auto Loader
15 | |--------------------------------------------------------------------------
16 | |
17 | | Composer provides a convenient, automatically generated class loader for
18 | | our application. We just need to utilize it! We'll simply require it
19 | | into the script here so that we don't have to worry about manual
20 | | loading any of our classes later on. It feels great to relax.
21 | |
22 | */
23 |
24 | require __DIR__.'/../vendor/autoload.php';
25 |
26 | /*
27 | |--------------------------------------------------------------------------
28 | | Turn On The Lights
29 | |--------------------------------------------------------------------------
30 | |
31 | | We need to illuminate PHP development, so let us turn on the lights.
32 | | This bootstraps the framework and gets it ready for use, then it
33 | | will load up this application so that we can run it and send
34 | | the responses back to the browser and delight our users.
35 | |
36 | */
37 |
38 | $app = require_once __DIR__.'/../bootstrap/app.php';
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Run The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once we have the application, we can handle the incoming request
46 | | through the kernel, and send the associated response back to
47 | | the client's browser allowing them to enjoy the creative
48 | | and wonderful application we have prepared for them.
49 | |
50 | */
51 |
52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
53 |
54 | $response = $kernel->handle(
55 | $request = Illuminate\Http\Request::capture()
56 | );
57 |
58 | $response->send();
59 |
60 | $kernel->terminate($request, $response);
61 |
--------------------------------------------------------------------------------
/public/js/main.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | "use strict";
3 |
4 | var treeviewMenu = $('.app-menu');
5 |
6 | // Toggle Sidebar
7 | $('[data-toggle="sidebar"]').click(function(event) {
8 | event.preventDefault();
9 | $('.app').toggleClass('sidenav-toggled');
10 | });
11 |
12 | // Activate sidebar treeview toggle
13 | $("[data-toggle='treeview']").click(function(event) {
14 | event.preventDefault();
15 | if(!$(this).parent().hasClass('is-expanded')) {
16 | treeviewMenu.find("[data-toggle='treeview']").parent().removeClass('is-expanded');
17 | }
18 | $(this).parent().toggleClass('is-expanded');
19 | });
20 |
21 | // Set initial active toggle
22 | $("[data-toggle='treeview.'].is-expanded").parent().toggleClass('is-expanded');
23 |
24 | //Activate bootstrip tooltips
25 | $("[data-toggle='tooltip']").tooltip();
26 |
27 | })();
28 |
--------------------------------------------------------------------------------
/public/js/multifield/Gruntfile.js:
--------------------------------------------------------------------------------
1 | module.exports = function (grunt) {
2 | grunt.initConfig({
3 | pkg: grunt.file.readJSON('package.json'),
4 |
5 | jshint: {
6 | options: {
7 | curly: true,
8 | eqeqeq: true,
9 | immed: true,
10 | latedef: true,
11 | newcap: true,
12 | noarg: true,
13 | sub: true,
14 | undef: true,
15 | eqnull: true,
16 | browser: true,
17 | globals: {
18 | jQuery: true,
19 | $: true,
20 | console: true
21 | }
22 | },
23 | '<%= pkg.name %>': {
24 | src: [ 'src/js/**/*.js' ]
25 | }
26 | },
27 |
28 | uglify: {
29 | options: {
30 | stripBanners: true,
31 | banner: '/* <%= pkg.name %> - v<%= pkg.version %> - <%= pkg.homepage %> */\n'
32 | },
33 |
34 | build: {
35 | src: 'jquery.multifield.js',
36 | dest: 'jquery.multifield.min.js'
37 | }
38 | },
39 |
40 |
41 | });
42 |
43 |
44 | grunt.loadNpmTasks('grunt-contrib-jshint');
45 | grunt.loadNpmTasks('grunt-contrib-uglify');
46 |
47 |
48 | grunt.registerTask('default', ['jshint', 'uglify']);
49 | };
--------------------------------------------------------------------------------
/public/js/multifield/jquery.multifield.js:
--------------------------------------------------------------------------------
1 | /**
2 | * jQuery Multifield plugin
3 | *
4 | * https://github.com/maxkostinevich/jquery-multifield
5 | */
6 |
7 |
8 | // the semi-colon before function invocation is a safety net against concatenated
9 | // scripts and/or other plugins which may not be closed properly.
10 | ;(function ( $, window, document, undefined ) {
11 |
12 | /*
13 | * Plugin Options
14 | * section (string) - selector of the section which is located inside of the parent wrapper
15 | * max (int) - Maximum sections
16 | * btnAdd (string) - selector of the "Add section" button - can be located everywhere on the page
17 | * btnRemove (string) - selector of the "Remove section" button - should be located INSIDE of the "section"
18 | * locale (string) - language to use, default is english
19 | */
20 |
21 | // our plugin constructor
22 | var multiField = function( elem, options ){
23 | this.elem = elem;
24 | this.$elem = $(elem);
25 | this.options = options;
26 | // Localization
27 | this.localize_i18n={
28 | "multiField": {
29 | "messages": {
30 | "removeConfirmation": "Are you sure you want to remove this section?"
31 | }
32 | }
33 | };
34 |
35 | // This next line takes advantage of HTML5 data attributes
36 | // to support customization of the plugin on a per-element
37 | // basis. For example,
38 | //
39 | this.metadata = this.$elem.data( 'mfield-options' );
40 | };
41 |
42 | // the plugin prototype
43 | multiField.prototype = {
44 |
45 | defaults: {
46 | max: 0,
47 | locale: 'default'
48 | },
49 |
50 |
51 | init: function() {
52 | var $this = this; //Plugin object
53 | // Introduce defaults that can be extended either
54 | // globally or using an object literal.
55 | this.config = $.extend({}, this.defaults, this.options,
56 | this.metadata);
57 |
58 | // Load localization object
59 | if(this.config.locale !== 'default'){
60 | $this.localize_i18n = this.config.locale;
61 | }
62 |
63 | // Hide 'Remove' buttons if only one section exists
64 | if(this.getSectionsCount()<2) {
65 | $(this.config.btnRemove, this.$elem).hide();
66 | }
67 |
68 | // Add section
69 | this.$elem.on('click',this.config.btnAdd,function(e){
70 | e.preventDefault();
71 | $this.cloneSection();
72 | });
73 |
74 | // Remove section
75 | this.$elem.on('click',this.config.btnRemove,function(e){
76 | e.preventDefault();
77 | var currentSection=$(e.target.closest($this.config.section));
78 | $this.removeSection(currentSection);
79 | });
80 |
81 | return this;
82 | },
83 |
84 |
85 | /*
86 | * Add new section
87 | */
88 | cloneSection : function() {
89 | // Allow to add only allowed max count of sections
90 | if((this.config.max!==0)&&(this.getSectionsCount()+1)>this.config.max){
91 | return false;
92 | }
93 |
94 | // Clone last section
95 | var newChild = $(this.config.section, this.$elem).last().clone().attr('style', '').attr('id', '').fadeIn('fast');
96 |
97 |
98 | // Clear input values
99 | $('input[type!="radio"],textarea', newChild).each(function () {
100 | $(this).val('');
101 | });
102 |
103 | // Fix radio buttons: update name [i] to [i+1]
104 | newChild.find('input[type="radio"]').each(function(){var name=$(this).attr('name');$(this).attr('name',name.replace(/([0-9]+)/g,1*(name.match(/([0-9]+)/g))+1));});
105 | // Reset radio button selection
106 | $('input[type=radio]',newChild).attr('checked', false);
107 |
108 | // Clear images src with reset-image-src class
109 | $('img.reset-image-src', newChild).each(function () {
110 | $(this).attr('src', '');
111 | });
112 |
113 | // Append new section
114 | this.$elem.append(newChild);
115 |
116 | // Show 'remove' button
117 | $(this.config.btnRemove, this.$elem).show();
118 | },
119 |
120 | /*
121 | * Remove existing section
122 | */
123 | removeSection : function(section){
124 | if (confirm(this.localize_i18n.multiField.messages.removeConfirmation)){
125 | var sectionsCount = this.getSectionsCount();
126 |
127 | if(sectionsCount<=2){
128 | $(this.config.btnRemove,this.$elem).hide();
129 | }
130 | section.slideUp('fast', function () {$(this).detach();});
131 | }
132 | },
133 |
134 | /*
135 | * Get sections count
136 | */
137 | getSectionsCount: function(){
138 | return this.$elem.children(this.config.section).length;
139 | }
140 |
141 | };
142 |
143 | multiField.defaults = multiField.prototype.defaults;
144 |
145 | $.fn.multifield = function(options) {
146 | return this.each(function() {
147 | new multiField(this, options).init();
148 | });
149 | };
150 |
151 |
152 |
153 | })( jQuery, window, document );
154 |
--------------------------------------------------------------------------------
/public/js/multifield/jquery.multifield.min.js:
--------------------------------------------------------------------------------
1 | /* jquery-multifield - v2.0.0 - https://github.com/maxkostinevich/jquery-multifield */
2 | !function(a,b,c,d){var e=function(b,c){this.elem=b,this.$elem=a(b),this.options=c,this.localize_i18n={multiField:{messages:{removeConfirmation:"Are you sure you want to remove this section?"}}},this.metadata=this.$elem.data("mfield-options")};e.prototype={defaults:{max:0,locale:"default"},init:function(){var b=this;return this.config=a.extend({},this.defaults,this.options,this.metadata),"default"!==this.config.locale&&(b.localize_i18n=this.config.locale),this.getSectionsCount()<2&&a(this.config.btnRemove,this.$elem).hide(),this.$elem.on("click",this.config.btnAdd,function(a){a.preventDefault(),b.cloneSection()}),this.$elem.on("click",this.config.btnRemove,function(c){c.preventDefault();var d=a(c.target.closest(b.config.section));b.removeSection(d)}),this},cloneSection:function(){if(0!==this.config.max&&this.getSectionsCount()+1>this.config.max)return!1;var b=a(this.config.section,this.$elem).last().clone().attr("style","").attr("id","").fadeIn("fast");a('input[type!="radio"],textarea',b).each(function(){a(this).val("")}),b.find('input[type="radio"]').each(function(){var b=a(this).attr("name");a(this).attr("name",b.replace(/([0-9]+)/g,1*b.match(/([0-9]+)/g)+1))}),a("input[type=radio]",b).attr("checked",!1),a("img.reset-image-src",b).each(function(){a(this).attr("src","")}),this.$elem.append(b),a(this.config.btnRemove,this.$elem).show()},removeSection:function(b){if(confirm(this.localize_i18n.multiField.messages.removeConfirmation)){var c=this.getSectionsCount();c<=2&&a(this.config.btnRemove,this.$elem).hide(),b.slideUp("fast",function(){a(this).detach()})}},getSectionsCount:function(){return this.$elem.children(this.config.section).length}},e.defaults=e.prototype.defaults,a.fn.multifield=function(a){return this.each(function(){new e(this,a).init()})}}(jQuery,window,document);
3 |
--------------------------------------------------------------------------------
/public/js/plugins/dataTables.bootstrap.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | DataTables Bootstrap 3 integration
3 | ©2011-2015 SpryMedia Ltd - datatables.net/license
4 | */
5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
6 | renderer:"bootstrap"});b.extend(f.ext.classes,{sWrapper:"dataTables_wrapper container-fluid dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&
7 | o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l",{"class":t.sPageButton+" "+g,id:0===r&&
8 | "string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#","aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('').children("ul"),s);i!==m&&b(h).find("[data-dt-idx="+i+"]").focus()};return f});
9 |
--------------------------------------------------------------------------------
/public/js/plugins/jquery.vmap.sampledata.js:
--------------------------------------------------------------------------------
1 | var sample_data = {"af":"16.63","al":"11.58","dz":"158.97","ao":"85.81","ag":"1.1","ar":"351.02","am":"8.83","au":"1219.72","at":"366.26","az":"52.17","bs":"7.54","bh":"21.73","bd":"105.4","bb":"3.96","by":"52.89","be":"461.33","bz":"1.43","bj":"6.49","bt":"1.4","bo":"19.18","ba":"16.2","bw":"12.5","br":"2023.53","bn":"11.96","bg":"44.84","bf":"8.67","bi":"1.47","kh":"11.36","cm":"21.88","ca":"1563.66","cv":"1.57","cf":"2.11","td":"7.59","cl":"199.18","cn":"5745.13","co":"283.11","km":"0.56","cd":"12.6","cg":"11.88","cr":"35.02","ci":"22.38","hr":"59.92","cy":"22.75","cz":"195.23","dk":"304.56","dj":"1.14","dm":"0.38","do":"50.87","ec":"61.49","eg":"216.83","sv":"21.8","gq":"14.55","er":"2.25","ee":"19.22","et":"30.94","fj":"3.15","fi":"231.98","fr":"2555.44","ga":"12.56","gm":"1.04","ge":"11.23","de":"3305.9","gh":"18.06","gr":"305.01","gd":"0.65","gt":"40.77","gn":"4.34","gw":"0.83","gy":"2.2","ht":"6.5","hn":"15.34","hk":"226.49","hu":"132.28","is":"12.77","in":"1430.02","id":"695.06","ir":"337.9","iq":"84.14","ie":"204.14","il":"201.25","it":"2036.69","jm":"13.74","jp":"5390.9","jo":"27.13","kz":"129.76","ke":"32.42","ki":"0.15","kr":"986.26","undefined":"5.73","kw":"117.32","kg":"4.44","la":"6.34","lv":"23.39","lb":"39.15","ls":"1.8","lr":"0.98","ly":"77.91","lt":"35.73","lu":"52.43","mk":"9.58","mg":"8.33","mw":"5.04","my":"218.95","mv":"1.43","ml":"9.08","mt":"7.8","mr":"3.49","mu":"9.43","mx":"1004.04","md":"5.36","mn":"5.81","me":"3.88","ma":"91.7","mz":"10.21","mm":"35.65","na":"11.45","np":"15.11","nl":"770.31","nz":"138","ni":"6.38","ne":"5.6","ng":"206.66","no":"413.51","om":"53.78","pk":"174.79","pa":"27.2","pg":"8.81","py":"17.17","pe":"153.55","ph":"189.06","pl":"438.88","pt":"223.7","qa":"126.52","ro":"158.39","ru":"1476.91","rw":"5.69","ws":"0.55","st":"0.19","sa":"434.44","sn":"12.66","rs":"38.92","sc":"0.92","sl":"1.9","sg":"217.38","sk":"86.26","si":"46.44","sb":"0.67","za":"354.41","es":"1374.78","lk":"48.24","kn":"0.56","lc":"1","vc":"0.58","sd":"65.93","sr":"3.3","sz":"3.17","se":"444.59","ch":"522.44","sy":"59.63","tw":"426.98","tj":"5.58","tz":"22.43","th":"312.61","tl":"0.62","tg":"3.07","to":"0.3","tt":"21.2","tn":"43.86","tr":"729.05","tm":0,"ug":"17.12","ua":"136.56","ae":"239.65","gb":"2258.57","us":"14624.18","uy":"40.71","uz":"37.72","vu":"0.72","ve":"285.21","vn":"101.99","ye":"30.02","zm":"15.69","zw":"5.57"};
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/public/web.config:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | #Project Overview:
2 | Sales ERP is a Modern and responsive small business management system. Developed by PHP and Laravel, JQery, Ajax, Bootstrap. It is Designed and Develop for thinking shop, small business, company and any types of business. Here has accounting,management, invoice user and Data analysis.
3 |
4 |
5 |
6 | 
7 |
8 | 
9 |
10 | 
11 |
12 | 
13 |
14 | 
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/resources/js/app.js:
--------------------------------------------------------------------------------
1 | /**
2 | * First we will load all of this project's JavaScript dependencies which
3 | * includes Vue and other libraries. It is a great starting point when
4 | * building robust, powerful web applications using Vue and Laravel.
5 | */
6 |
7 | require('./bootstrap');
8 |
9 | window.Vue = require('vue');
10 |
11 | /**
12 | * The following block of code may be used to automatically register your
13 | * Vue components. It will recursively scan this directory for the Vue
14 | * components and automatically register them with their "basename".
15 | *
16 | * Eg. ./components/ExampleComponent.vue ->
17 | */
18 |
19 | // const files = require.context('./', true, /\.vue$/i);
20 | // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default));
21 |
22 | Vue.component('example-component', require('./components/ExampleComponent.vue').default);
23 |
24 | /**
25 | * Next, we will create a fresh Vue application instance and attach it to
26 | * the page. Then, you may begin adding components to this application
27 | * or customize the JavaScript scaffolding to fit your unique needs.
28 | */
29 |
30 | const app = new Vue({
31 | el: '#app',
32 | });
33 |
--------------------------------------------------------------------------------
/resources/js/bootstrap.js:
--------------------------------------------------------------------------------
1 | window._ = require('lodash');
2 |
3 | /**
4 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support
5 | * for JavaScript based Bootstrap features such as modals and tabs. This
6 | * code may be modified to fit the specific needs of your application.
7 | */
8 |
9 | try {
10 | window.Popper = require('popper.js').default;
11 | window.$ = window.jQuery = require('jquery');
12 |
13 | require('bootstrap');
14 | } catch (e) {}
15 |
16 | /**
17 | * We'll load the axios HTTP library which allows us to easily issue requests
18 | * to our Laravel back-end. This library automatically handles sending the
19 | * CSRF token as a header based on the value of the "XSRF" token cookie.
20 | */
21 |
22 | window.axios = require('axios');
23 |
24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
25 |
26 | /**
27 | * Echo exposes an expressive API for subscribing to channels and listening
28 | * for events that are broadcast by Laravel. Echo and event broadcasting
29 | * allows your team to easily build robust real-time web applications.
30 | */
31 |
32 | // import Echo from 'laravel-echo';
33 |
34 | // window.Pusher = require('pusher-js');
35 |
36 | // window.Echo = new Echo({
37 | // broadcaster: 'pusher',
38 | // key: process.env.MIX_PUSHER_APP_KEY,
39 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER,
40 | // encrypted: true
41 | // });
42 |
--------------------------------------------------------------------------------
/resources/js/components/ExampleComponent.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | I'm an example component.
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
24 |
--------------------------------------------------------------------------------
/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least eight characters and match the confirmation.',
17 | 'reset' => 'Your password has been reset!',
18 | 'sent' => 'We have e-mailed your password reset link!',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that e-mail address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/resources/sass/_variables.scss:
--------------------------------------------------------------------------------
1 | // Body
2 | $body-bg: #f8fafc;
3 |
4 | // Typography
5 | $font-family-sans-serif: 'Nunito', sans-serif;
6 | $font-size-base: 0.9rem;
7 | $line-height-base: 1.6;
8 |
9 | // Colors
10 | $blue: #3490dc;
11 | $indigo: #6574cd;
12 | $purple: #9561e2;
13 | $pink: #f66d9b;
14 | $red: #e3342f;
15 | $orange: #f6993f;
16 | $yellow: #ffed4a;
17 | $green: #38c172;
18 | $teal: #4dc0b5;
19 | $cyan: #6cb2eb;
20 |
--------------------------------------------------------------------------------
/resources/sass/app.scss:
--------------------------------------------------------------------------------
1 | // Fonts
2 | @import url('https://fonts.googleapis.com/css?family=Nunito');
3 |
4 | // Variables
5 | @import 'variables';
6 |
7 | // Bootstrap
8 | @import '~bootstrap/scss/bootstrap';
9 |
--------------------------------------------------------------------------------
/resources/views/auth/login.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('content')
4 |
5 |
6 |
9 |
10 |
11 |
Sales Erp
12 |
13 |
63 |
64 |
65 | {{-- @if (Route::has('password.request'))--}}
66 | {{-- --}}
67 | {{-- {{ __('Forgot Your Password?') }}--}}
68 | {{-- --}}
69 | {{-- @endif--}}
70 |
71 | @endsection
72 |
--------------------------------------------------------------------------------
/resources/views/auth/passwords/email.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | @if (session('status'))
12 |
13 | {{ session('status') }}
14 |
15 | @endif
16 |
17 |
42 |
43 |
44 |
45 |
46 |
47 | @endsection
48 |
--------------------------------------------------------------------------------
/resources/views/auth/passwords/reset.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
65 | @endsection
66 |
--------------------------------------------------------------------------------
/resources/views/auth/register.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
77 | @endsection
78 |
--------------------------------------------------------------------------------
/resources/views/auth/verify.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content')
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | @if (session('resent'))
12 |
13 | {{ __('A fresh verification link has been sent to your email address.') }}
14 |
15 | @endif
16 |
17 | {{ __('Before proceeding, please check your email for a verification link.') }}
18 | {{ __('If you did not receive the email') }},
{{ __('click here to request another') }} .
19 |
20 |
21 |
22 |
23 |
24 | @endsection
25 |
--------------------------------------------------------------------------------
/resources/views/category/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Home | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
Form Samples
11 |
Sample forms
12 |
13 |
18 |
19 |
20 | @if(session()->has('message'))
21 |
22 | {{ session()->get('message') }}
23 |
24 | @endif
25 |
26 |
29 |
56 |
57 | @endsection
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/resources/views/category/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Home | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
Form Samples
11 |
Sample forms
12 |
13 |
18 |
19 |
20 | @if(session()->has('message'))
21 |
22 | {{ session()->get('message') }}
23 |
24 | @endif
25 |
26 |
52 |
53 | @endsection
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/resources/views/category/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @extends('layouts.master')
4 |
5 | @section('titel', 'Category | ')
6 | @section('content')
7 | @include('partials.header')
8 | @include('partials.sidebar')
9 |
10 |
11 |
12 |
13 |
Data Table
14 |
Table to display analytical data effectively
15 |
16 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | Category Name
34 | Status
35 | Action
36 |
37 |
38 |
39 | @foreach( $categories as $category)
40 |
41 | {{ $category->name }}
42 | @if($category->status)
43 | Active
44 | @else
45 | Inactive
46 | @endif
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
58 |
59 |
60 | @endforeach
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | @endsection
72 |
73 | @push('js')
74 |
75 |
76 |
77 |
78 |
110 | @endpush
111 |
--------------------------------------------------------------------------------
/resources/views/customer/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Tax | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
Customer
11 |
Sample forms
12 |
13 |
18 |
19 |
20 | @if(session()->has('message'))
21 |
22 | {{ session()->get('message') }}
23 |
24 | @endif
25 |
26 |
29 |
94 |
95 | @endsection
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/resources/views/customer/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @extends('layouts.master')
4 |
5 | @section('titel', 'Customer | ')
6 | @section('content')
7 | @include('partials.header')
8 | @include('partials.sidebar')
9 |
10 |
11 |
12 |
13 |
Customer Table
14 |
Table to display analytical data effectively
15 |
16 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | Customer Name
34 | Address
35 | Mobile
36 | Details
37 | Action
38 |
39 |
40 |
41 | @foreach( $customers as $customer)
42 |
43 | {{ $customer->name }}
44 | {{ $customer->address }}
45 | {{ $customer->mobile }}
46 | {{ $customer->details }}
47 |
48 |
49 |
50 |
51 |
52 |
53 | @csrf
54 | @method('DELETE')
55 |
56 |
57 |
58 | @endforeach
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | @endsection
70 |
71 | @push('js')
72 |
73 |
74 |
75 |
76 |
108 | @endpush
109 |
--------------------------------------------------------------------------------
/resources/views/home.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('titel', 'Home | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 | @include('partials.content')
9 |
10 | @endsection
11 |
--------------------------------------------------------------------------------
/resources/views/invoice/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Invoice | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
Invoice
11 |
A Printable Invoice Format
12 |
13 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
Date: {{$invoice->created_at->format('Y-m-d')}}
28 |
29 |
30 |
31 |
From
32 |
Sales ERP. Tongi Gazipur Email: hello@saleserp.com
33 |
34 |
To
35 |
{{$invoice->customer->name}} {{$invoice->customer->address}} Phone: {{$invoice->customer->mobile}} Email: {{$invoice->customer->email}}
36 |
37 |
Invoice #{{1000+$invoice->id}} Order ID: 4F3S8JPayment Due: {{$invoice->created_at->format('Y-m-d')}}Account: 968-34567
38 |
39 |
40 |
41 |
42 |
43 |
44 | Product
45 | Qty
46 | Price
47 | Amount
48 |
49 |
50 |
51 |
52 | {{$total=0}}
53 |
54 | @foreach($sales as $sale)
55 |
56 | {{$sale->product->name}}
57 | {{$sale->qty}}
58 | {{$sale->price}}
59 | {{$sale->amount}}
60 |
61 | {{$total +=$sale->amount}}
62 |
63 |
64 | @endforeach
65 |
66 |
67 |
68 |
69 |
70 | Total
71 | {{$total}}
72 |
73 |
74 |
75 |
76 |
77 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | @endsection
87 | @push('js')
88 | @endpush
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/resources/views/layouts/app.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ config('app.name', 'Laravel') }}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
73 |
74 |
75 |
76 | @yield('content')
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/resources/views/layouts/master.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | @yield('title')Sales Erp
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | @yield('content')
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
92 |
93 |
103 | @stack('js')
104 |
105 |
--------------------------------------------------------------------------------
/resources/views/partials/header.blade.php:
--------------------------------------------------------------------------------
1 |
24 |
--------------------------------------------------------------------------------
/resources/views/profile/edit_profile.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Profile | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
11 |
Profile Update
12 |
Bootstrap default form components
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
{{ Auth::user()->fullname }}
27 |
28 |
29 |
30 | @csrf
31 |
32 | First Name
33 |
34 |
35 |
36 | Last Name
37 |
38 |
39 |
40 | Email address
41 |
42 |
43 |
44 |
45 | Profile Picture
46 |
47 |
48 | Update
49 |
50 |
51 |
53 |
54 |
55 |
56 |
57 | @endsection
--------------------------------------------------------------------------------
/resources/views/profile/password.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 |
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
11 |
Password Change
12 |
Bootstrap default form components
13 |
14 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
{{ Auth::user()->fullname }}
27 |
28 |
29 |
30 | @csrf
31 |
32 |
33 |
34 |
47 |
48 |
61 |
62 |
69 |
70 |
77 |
78 |
79 |
81 |
82 |
83 |
84 |
85 | @endsection
--------------------------------------------------------------------------------
/resources/views/purchase/show.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Invoice | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
Invoice
11 |
A Printable Invoice Format
12 |
13 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
Date: {{$invoice->created_at->format('Y-m-d')}}
28 |
29 |
30 |
31 |
From
32 |
Sales ERP. Tongi Gazipur Email: hello@saleserp.com
33 |
34 |
To
35 |
{{$invoice->customer->name}} {{$invoice->customer->address}} Phone: {{$invoice->customer->mobile}} Email: {{$invoice->customer->email}}
36 |
37 |
Invoice #{{1000+$invoice->id}} Order ID: 4F3S8JPayment Due: {{$invoice->created_at->format('Y-m-d')}}Account: 968-34567
38 |
39 |
40 |
41 |
42 |
43 |
44 | Product
45 | Qty
46 | Price
47 | Amount
48 |
49 |
50 |
51 |
52 | {{$total=0}}
53 |
54 | @foreach($sales as $sale)
55 |
56 | {{$sale->product->name}}
57 | {{$sale->qty}}
58 | {{$sale->price}}
59 | {{$sale->amount}}
60 |
61 | {{$total +=$sale->amount}}
62 |
63 |
64 | @endforeach
65 |
66 |
67 |
68 |
69 |
70 | Total
71 | {{$total}}
72 |
73 |
74 |
75 |
76 |
77 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | @endsection
87 | @push('js')
88 | @endpush
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/resources/views/supplier/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @extends('layouts.master')
4 |
5 | @section('titel', 'Category | ')
6 | @section('content')
7 | @include('partials.header')
8 | @include('partials.sidebar')
9 |
10 |
11 |
12 |
13 |
Data Table
14 |
Table to display analytical data effectively
15 |
16 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | Supplier Name
34 | Address
35 | Mobile
36 | Details
37 | Action
38 |
39 |
40 |
41 | @foreach( $suppliers as $supplier)
42 |
43 | {{ $supplier->name }}
44 | {{ $supplier->address }}
45 | {{ $supplier->mobile }}
46 | {{ $supplier->details }}
47 |
48 |
49 |
50 |
51 |
52 |
53 | @csrf
54 | @method('DELETE')
55 |
56 |
57 |
58 | @endforeach
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | @endsection
70 |
71 | @push('js')
72 |
73 |
74 |
75 |
76 |
108 | @endpush
109 |
--------------------------------------------------------------------------------
/resources/views/tax/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Tax | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
Tax
11 |
Sample forms
12 |
13 |
14 |
15 | Forms
16 | Tax
17 |
18 |
19 |
20 | @if(session()->has('message'))
21 |
22 | {{ session()->get('message') }}
23 |
24 | @endif
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
Tax
35 |
36 |
37 | @csrf
38 |
39 | Tax Name
40 |
41 | @error('name')
42 |
43 | {{ $message }}
44 |
45 | @enderror
46 |
47 |
48 |
49 | Create
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | @endsection
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/resources/views/tax/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Tax | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
Tax Samples
11 |
Sample forms
12 |
13 |
14 |
15 | Forms
16 | Tax
17 |
18 |
19 |
20 | @if(session()->has('message'))
21 |
22 | {{ session()->get('message') }}
23 |
24 | @endif
25 |
26 |
27 |
28 |
29 |
30 |
Tax
31 |
32 |
33 | @csrf
34 | @method('PUT')
35 |
36 | Tax Name
37 |
38 | @error('name')
39 |
40 | {{ $message }}
41 |
42 | @enderror
43 |
44 |
45 | Update
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | @endsection
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/resources/views/tax/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @extends('layouts.master')
4 |
5 | @section('titel', 'Category | ')
6 | @section('content')
7 | @include('partials.header')
8 | @include('partials.sidebar')
9 |
10 |
11 |
12 |
13 |
Data Table
14 |
Table to display analytical data effectively
15 |
16 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | Tax
34 | Status
35 | Action
36 |
37 |
38 |
39 | @foreach( $taxes as $tax)
40 |
41 | {{ $tax->name }} %
42 | @if($tax->status)
43 | Active
44 | @else
45 | Inactive
46 | @endif
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | @csrf
56 | @method('DELETE')
57 |
58 |
59 |
60 | @endforeach
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | @endsection
72 |
73 | @push('js')
74 |
75 |
76 |
77 |
78 |
110 | @endpush
111 |
--------------------------------------------------------------------------------
/resources/views/unit/create.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Tax | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
Unit
11 |
Sample forms
12 |
13 |
14 |
15 | Forms
16 | Unit
17 |
18 |
19 |
20 | @if(session()->has('message'))
21 |
22 | {{ session()->get('message') }}
23 |
24 | @endif
25 |
26 |
29 |
30 |
31 |
32 |
33 |
34 |
Tax
35 |
36 |
37 | @csrf
38 |
39 | Unit Name
40 |
41 | @error('name')
42 |
43 | {{ $message }}
44 |
45 | @enderror
46 |
47 |
48 |
49 | Create
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | @endsection
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/resources/views/unit/edit.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.master')
2 |
3 | @section('title', 'Tax | ')
4 | @section('content')
5 | @include('partials.header')
6 | @include('partials.sidebar')
7 |
8 |
9 |
10 |
Unit Samples
11 |
Sample forms
12 |
13 |
14 |
15 | Forms
16 | Unit
17 |
18 |
19 |
20 | @if(session()->has('message'))
21 |
22 | {{ session()->get('message') }}
23 |
24 | @endif
25 |
26 |
27 |
28 |
29 |
30 |
Unit
31 |
32 |
33 | @csrf
34 | @method('PUT')
35 |
36 | Unit Name
37 |
38 | @error('name')
39 |
40 | {{ $message }}
41 |
42 | @enderror
43 |
44 |
45 | Update
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | @endsection
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/resources/views/unit/index.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | @extends('layouts.master')
4 |
5 | @section('titel', 'Category | ')
6 | @section('content')
7 | @include('partials.header')
8 | @include('partials.sidebar')
9 |
10 |
11 |
12 |
13 |
Data Table
14 |
Table to display analytical data effectively
15 |
16 |
21 |
22 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | Unit
34 | Status
35 | Action
36 |
37 |
38 |
39 | @foreach( $units as $unit)
40 |
41 | {{ $unit->name }}
42 | @if($unit->status)
43 | Active
44 | @else
45 | Inactive
46 | @endif
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | @csrf
56 | @method('DELETE')
57 |
58 |
59 |
60 | @endforeach
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | @endsection
72 |
73 | @push('js')
74 |
75 |
76 |
77 |
78 |
110 | @endpush
111 |
--------------------------------------------------------------------------------
/resources/views/welcome.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Laravel
8 |
9 |
10 |
11 |
12 |
13 |
65 |
66 |
67 |
68 | @if (Route::has('login'))
69 |
70 | @auth
71 |
Home
72 | @else
73 |
Login
74 |
75 | @if (Route::has('register'))
76 |
Register
77 | @endif
78 | @endauth
79 |
80 | @endif
81 |
82 |
83 |
84 | Laravel
85 |
86 |
87 |
96 |
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/routes/api.php:
--------------------------------------------------------------------------------
1 | get('/user', function (Request $request) {
17 | return $request->user();
18 | });
19 |
--------------------------------------------------------------------------------
/routes/channels.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
16 | });
17 |
--------------------------------------------------------------------------------
/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
18 | })->describe('Display an inspiring quote');
19 |
--------------------------------------------------------------------------------
/routes/web.php:
--------------------------------------------------------------------------------
1 | name('home');
19 | Route::get('/edit_profile', 'HomeController@edit_profile')->name('edit_profile');
20 | Route::POST('/update_profile/{id}', 'HomeController@update_profile')->name('update_profile');
21 | Route::get('/password_change/', 'HomeController@update_password')->name('update_password');
22 |
23 |
24 | Route::resource('category', 'CategoryController');
25 | Route::resource('tax', 'TaxController');
26 | Route::resource('unit', 'UnitController');
27 | Route::resource('supplier', 'SupplierController');
28 | Route::resource('customer', 'CustomerController');
29 | Route::resource('product', 'ProductController');
30 | Route::resource('invoice', 'InvoiceController');
31 | Route::resource('purchase', 'PurchaseController');
32 | Route::get('/findPrice', 'InvoiceController@findPrice')->name('findPrice');
33 |
--------------------------------------------------------------------------------
/saleserp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AshrafulRasel/SalesERP/62091eb4c0d634edbd8c434a11a8e2e7243fdaeb/saleserp.png
--------------------------------------------------------------------------------
/server.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | $uri = urldecode(
11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
12 | );
13 |
14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the
15 | // built-in PHP web server. This provides a convenient way to test a Laravel
16 | // application without having installed a "real" web server software here.
17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
18 | return false;
19 | }
20 |
21 | require_once __DIR__.'/public/index.php';
22 |
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | config.php
2 | routes.php
3 | schedule-*
4 | compiled.php
5 | services.json
6 | events.scanned.php
7 | routes.scanned.php
8 | down
9 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !data/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/framework/cache/data/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
19 |
20 | return $app;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tests/Feature/ExampleTest.php:
--------------------------------------------------------------------------------
1 | get('/');
18 |
19 | $response->assertStatus(200);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | assertTrue(true);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/webpack.mix.js:
--------------------------------------------------------------------------------
1 | const mix = require('laravel-mix');
2 |
3 | /*
4 | |--------------------------------------------------------------------------
5 | | Mix Asset Management
6 | |--------------------------------------------------------------------------
7 | |
8 | | Mix provides a clean, fluent API for defining some Webpack build steps
9 | | for your Laravel application. By default, we are compiling the Sass
10 | | file for the application as well as bundling up all the JS files.
11 | |
12 | */
13 |
14 | mix.js('resources/js/app.js', 'public/js')
15 | .sass('resources/sass/app.scss', 'public/css');
16 |
--------------------------------------------------------------------------------