├── .env.example ├── .gitattributes ├── .gitignore ├── _config.yml ├── app ├── Banks.php ├── Console │ └── Kernel.php ├── Customers.php ├── Exceptions │ └── Handler.php ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ ├── RegisterController.php │ │ │ └── ResetPasswordController.php │ │ ├── AuthenticateController.php │ │ ├── BanksController.php │ │ ├── ContactUsController.php │ │ ├── Controller.php │ │ ├── CustomersController.php │ │ ├── ForgotPasswordController.php │ │ ├── HomeAuthController.php │ │ ├── PaymentsController.php │ │ ├── PreferencesController.php │ │ ├── PrintPDFController.php │ │ ├── PrintReportController.php │ │ ├── ProductCategoryController.php │ │ ├── ProductController.php │ │ ├── ProductImageController.php │ │ ├── RemoteController.php │ │ ├── SalesController.php │ │ ├── SalesCustomersController.php │ │ ├── SalesItemsController.php │ │ ├── SalesTaxController.php │ │ ├── SlipNumbersController.php │ │ ├── SlipPostageController.php │ │ ├── TaxesController.php │ │ ├── UserController.php │ │ └── UserGroupController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── RedirectIfNotAnAdmin.php │ │ ├── RedirectIfNotUser.php │ │ ├── RedirectIfThisItemIsDifferentOwner.php │ │ ├── TrimStrings.php │ │ └── VerifyCsrfToken.php │ └── Requests │ │ ├── AuthenticateRequest.php │ │ ├── BanksFormRequest.php │ │ ├── CustomersFormRequest.php │ │ ├── ForgotPasswordRequest.php │ │ ├── PreferencesFormRequest.php │ │ ├── ProductCategoryFormRequest.php │ │ ├── ProductFormRequest.php │ │ ├── ProductImageFormRequest.php │ │ ├── SalesFormRequest.php │ │ ├── TaxesFormRequest.php │ │ ├── UserFormRequest.php │ │ └── UserGroupFormRequest.php ├── Mail │ ├── ContactUs.php │ └── SendInvoice.php ├── Model.php ├── Payments.php ├── Preferences.php ├── Product.php ├── ProductCategory.php ├── ProductImage.php ├── Providers │ ├── AppServiceProvider.php │ ├── AuthServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Sales.php ├── SalesCustomers.php ├── SalesItems.php ├── SalesTax.php ├── SlipNumbers.php ├── SlipPostage.php ├── Taxes.php ├── User.php └── UserGroup.php ├── artisan ├── bootstrap ├── app.php ├── autoload.php └── cache │ ├── .gitignore │ ├── packages.php │ └── services.php ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── broadcasting.php ├── cache.php ├── database.php ├── filesystems.php ├── mail.php ├── queue.php ├── services.php ├── session.php ├── sluggable.php └── view.php ├── database ├── .gitignore ├── factories │ └── ModelFactory.php ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2017_03_12_091611_create_product_images_table.php │ ├── 2017_03_14_001723_create_products_table.php │ ├── 2017_04_01_170946_create_user_groups_table.php │ ├── 2017_04_09_080258_create_product_categories_table.php │ ├── 2017_04_10_022558_create_sales_table.php │ ├── 2017_04_10_022855_create_sales_items_table.php │ ├── 2017_04_10_022910_create_customers_table.php │ ├── 2017_04_29_010707_create_slip_postages_table.php │ ├── 2017_04_29_145442_create_banks_table.php │ ├── 2017_04_29_145506_create_payments_table.php │ ├── 2017_05_02_070956_create_slip_numbers_table.php │ ├── 2017_05_03_012521_create_taxes_table.php │ ├── 2017_05_03_012957_create_sales_taxes_table.php │ ├── 2017_05_09_161603_create_sales_customers_table.php │ ├── 2017_05_15_032723_create_preferences_table.php │ ├── 2017_12_24_172032_add_slug.php │ ├── 2017_12_24_174618_add_slug_to_taxes.php │ └── 2017_12_24_175021_add_slug_to_products.php ├── seeds │ ├── BanksSeed.php │ ├── DatabaseSeeder.php │ ├── PreferencesSeed.php │ ├── ProductCategorySeed.php │ ├── ProductImagesSeed.php │ ├── ProductsSeed.php │ ├── TaxesSeed.php │ ├── UserGroupSeed.php │ └── UserSeed.php └── versions │ ├── v1 - invoice.sql │ └── v2 - tribas.sql ├── package-lock.json ├── package.json ├── phpunit.xml ├── public ├── .htaccess ├── PIE.htc ├── css │ ├── app.css │ └── jquery.minicolors.png ├── favicon.ico ├── favicon.png ├── fonts │ └── vendor │ │ ├── bootstrap-sass │ │ ├── bootstrap │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── stylesheets │ │ │ └── bootstrap │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── font-awesome │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── index.php ├── js │ ├── app.js │ ├── app.js.LICENSE.txt │ └── ucwords.js ├── mix-manifest.json ├── readme.txt ├── robots.txt └── web.config ├── readme.md ├── resources ├── assets │ ├── js │ │ ├── app.js │ │ ├── bootstrap-datepicker.js │ │ ├── bootstrap.js │ │ ├── bootstrapvalidator.js │ │ ├── datatables.net.js │ │ ├── jquery-chained.js │ │ ├── jquery-minicolors.js │ │ ├── jquery.cookie.js │ │ ├── select2.js │ │ └── sweetalert2.js │ └── sass │ │ └── app.scss ├── lang │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── auth │ ├── create.blade.php │ ├── index.blade.php │ └── passwords │ │ └── reset.blade.php │ ├── banks │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php │ ├── category │ ├── create.blade.php │ └── edit.blade.php │ ├── customers │ ├── edit.blade.php │ └── index.blade.php │ ├── email │ ├── contactus.blade.php │ └── invoice.blade.php │ ├── forgotpassword │ └── create.blade.php │ ├── homeauth │ └── home.blade.php │ ├── layout │ ├── errorform.blade.php │ ├── gnav.blade.php │ ├── info.blade.php │ ├── jscript.blade.php │ └── master.blade.php │ ├── preferences │ └── edit.blade.php │ ├── printpdf │ ├── auditreport.blade.php │ ├── emailpdf.blade.php │ ├── invoice.blade.php │ ├── payment.blade.php │ └── salesreport.blade.php │ ├── printreport │ └── index.blade.php │ ├── product │ ├── create.blade.php │ └── edit.blade.php │ ├── productimage │ └── edit.blade.php │ ├── sales │ ├── create.blade-backup.php │ ├── create.blade.php │ ├── edit.blade-backup.php │ ├── edit.blade.php │ └── index.blade.php │ ├── taxes │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php │ ├── user │ ├── create.blade.php │ ├── edit.blade.php │ └── index.blade.php │ └── usergroup │ └── create.blade.php ├── routes ├── api.php ├── channels.php ├── console.php └── web.php ├── server.php ├── storage ├── app │ ├── .gitignore │ └── public │ │ └── .gitignore ├── db.db ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ ├── testing │ │ └── .gitignore │ └── views │ │ └── .gitignore ├── logs │ └── .gitignore └── uploads │ ├── images │ └── index.txt │ ├── pdf │ └── index.txt │ └── pdfimages │ └── index.txt ├── tests ├── CreatesApplication.php ├── Feature │ └── ExampleTest.php ├── TestCase.php └── Unit │ └── ExampleTest.php └── webpack.mix.js /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_KEY= 3 | APP_DEBUG=true 4 | APP_LOG_LEVEL=debug 5 | APP_URL=http://localhost 6 | 7 | DB_CONNECTION=mysql 8 | DB_HOST=127.0.0.1 9 | DB_PORT=3306 10 | DB_DATABASE=homestead 11 | DB_USERNAME=homestead 12 | DB_PASSWORD=secret 13 | 14 | BROADCAST_DRIVER=log 15 | CACHE_DRIVER=file 16 | SESSION_DRIVER=file 17 | QUEUE_DRIVER=sync 18 | 19 | REDIS_HOST=127.0.0.1 20 | REDIS_PASSWORD=null 21 | REDIS_PORT=6379 22 | 23 | MAIL_DRIVER=smtp 24 | MAIL_HOST=smtp.mailtrap.io 25 | MAIL_PORT=2525 26 | MAIL_USERNAME=null 27 | MAIL_PASSWORD=null 28 | MAIL_ENCRYPTION=null 29 | 30 | PUSHER_APP_ID= 31 | PUSHER_APP_KEY= 32 | PUSHER_APP_SECRET= 33 | -------------------------------------------------------------------------------- /.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/storage 3 | /public/hot 4 | /storage/*.key 5 | /vendor 6 | /.idea 7 | /.vagrant 8 | Homestead.json 9 | Homestead.yaml 10 | .env 11 | /storage/framework/sessions/* 12 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /app/Banks.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | 31 | /** 32 | * Register the Closure based commands for the application. 33 | * 34 | * @return void 35 | */ 36 | protected function commands() 37 | { 38 | require base_path('routes/console.php'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Customers.php: -------------------------------------------------------------------------------- 1 | hasMany('App\SalesCustomers', 'id_customer'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | reportable(function (Throwable $e) { 38 | // 39 | }); 40 | } 41 | } -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.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'); 40 | } 41 | 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @param array $data 46 | * @return \Illuminate\Contracts\Validation\Validator 47 | */ 48 | protected function validator(array $data) 49 | { 50 | return Validator::make($data, [ 51 | 'name' => 'required|max:255', 52 | 'email' => 'required|email|max:255|unique:users', 53 | 'password' => 'required|min:6|confirmed', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'name' => $data['name'], 67 | 'email' => $data['email'], 68 | 'password' => bcrypt($data['password']), 69 | ]); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Controllers/AuthenticateController.php: -------------------------------------------------------------------------------- 1 | middleware('guest', ['except' => 'destroy']); 20 | } 21 | 22 | public function index() 23 | { 24 | return view('auth.index'); 25 | } 26 | 27 | public function create() 28 | { 29 | return view('auth.create'); 30 | } 31 | 32 | public function store(AuthenticateRequest $request) 33 | { 34 | $remember_me = $request->has('remember') ? true : false; 35 | // attempt to authenticate the user 36 | if( !auth()->attempt(request(['username', 'password']), $remember_me) ) { 37 | Session::flash('flash_message', 'Please check your credential'); 38 | return back(); 39 | } 40 | $users = \App\User::find(auth()->user()->id); 41 | $users->touch(); 42 | return redirect(route('homeauth.home')); // redirect back to original route 43 | } 44 | 45 | public function destroy() 46 | { 47 | // logout 48 | auth()->logout(); 49 | return redirect(route('auth.index')); 50 | } 51 | 52 | public function forgot() { 53 | return view('auth.forgot'); 54 | } 55 | 56 | public function pastore(AuthenticateRequest $request) 57 | { 58 | return view('auth.remember'); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /app/Http/Controllers/BanksController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 18 | $this->middleware('admin'); 19 | } 20 | 21 | public function index() 22 | { 23 | return view('banks.index'); 24 | } 25 | 26 | public function create() 27 | { 28 | return view('banks.create'); 29 | } 30 | 31 | public function store(BanksFormRequest $request) 32 | { 33 | if ($request->active == NULL) { 34 | $request->active = 0; 35 | } 36 | $ban = Banks::create([ 37 | 'bank' => $request->bank, 38 | 'city' => $request->city, 39 | 'swift_code' => $request->swift_code, 40 | 'account' => $request->account, 41 | 'active' => $request->active, 42 | ]); 43 | Session::flash('flash_message', 'Data successfully edited!'); 44 | return redirect(route('banks.index')); 45 | } 46 | 47 | public function show(Banks $banks) 48 | { 49 | // 50 | } 51 | 52 | public function edit(Banks $banks) 53 | { 54 | return view('banks.edit', compact(['banks'])); 55 | } 56 | 57 | public function update(BanksFormRequest $request, Banks $banks) 58 | { 59 | // dd(request()->all()); 60 | $duit = Banks::find($banks->id) 61 | ->update(request([ 62 | 'bank', 'city', 'swift_code', 'account', 63 | ])); 64 | $banks->touch(); 65 | // info when update success 66 | Session::flash('flash_message', 'Data successfully edited!'); 67 | return redirect(route('banks.index')); 68 | } 69 | 70 | public function destroy(Banks $banks) 71 | { 72 | // 73 | } 74 | 75 | public function active(Banks $banks) 76 | { 77 | // toggle 78 | $act = Banks::find($banks->id); 79 | 80 | // get active value 81 | $act->active; 82 | if($act->active == 1) { 83 | $act->update([ 84 | 'active' => 0, 85 | ]); 86 | // info when update success 87 | Session::flash('flash_message', 'Successfully deactivate '.$banks->bank); 88 | } else { 89 | $act->update([ 90 | 'active' => 1, 91 | ]); 92 | // info when update success 93 | Session::flash('flash_message', 'Successfully activate '.$banks->bank); 94 | } 95 | $banks->touch(); 96 | return redirect()->back(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /app/Http/Controllers/ContactUsController.php: -------------------------------------------------------------------------------- 1 | validate($request, [ 26 | 'name' => 'required|min:4', 27 | 'email' => 'required|email', 28 | 'subject' => 'required|min:4', 29 | 'message' => 'required', 30 | ]); 31 | 32 | 33 | // start sending email 34 | Mail::to(['to' => [ 35 | 'email' => request('email'), 36 | 'name' => request('name'), 37 | ]]) 38 | ->cc(['cc' => [ 39 | 'email' => $re->company_email, 40 | 'name' => $re->company_name, 41 | ]]) 42 | // ->bcc($evenMoreUsers) 43 | ->send(new ContactUs($request)); 44 | 45 | Session::flash('flash_message', 'Done send email.'); 46 | return redirect()->back(); // redirect back to original route 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 16 | } 17 | 18 | public function index() 19 | { 20 | return view('customers.index'); 21 | } 22 | 23 | public function create() 24 | { 25 | // 26 | } 27 | 28 | public function store(CustomersFormRequest $request) 29 | { 30 | // 31 | } 32 | 33 | 34 | public function show(Customers $customers) 35 | { 36 | // 37 | } 38 | 39 | public function edit(Customers $customers) 40 | { 41 | return view('customers.edit', compact(['customers'])); 42 | } 43 | 44 | public function update(CustomersFormRequest $request, Customers $customers) 45 | { 46 | $duit = Customers::find($customers->id) 47 | ->update(request([ 48 | 'client', 'client_address', 'client_poskod', 'client_phone', 'client_email', 'updated_at', 49 | ])); 50 | // $customers->touch(); 51 | // info when update success 52 | Session::flash('flash_message', 'Data successfully edited!'); 53 | return redirect(route('customers.index')); 54 | } 55 | 56 | public function destroy(Customers $customers) 57 | { 58 | 59 | return response()->json([ 60 | 'message' => 'Data deleted', 61 | 'status' => 'success' 62 | ]); 63 | } 64 | 65 | public function search(Request $request) 66 | { 67 | $valid = TRUE; 68 | $cust = Customers::where('client', $request->client)->count(); 69 | $cust_email = Customers::where('client_email', $request->client_email)->count(); 70 | $cust_phone = Customers::where('client_phone', $request->client_phone)->count(); 71 | // dd($cust); 72 | 73 | if ($cust == 1) 74 | { 75 | $valid = FALSE; 76 | } 77 | else 78 | { 79 | if ($cust_phone == 1) 80 | { 81 | $valid = FALSE; 82 | } 83 | else 84 | { 85 | if ($cust_email == 1) 86 | { 87 | $valid = FALSE; 88 | } else { 89 | $valid = TRUE; 90 | } 91 | } 92 | } 93 | 94 | return response()->json(['valid' => $valid]); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /app/Http/Controllers/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 18 | } 19 | 20 | /** 21 | * Display a listing of the resource. 22 | * 23 | * @return \Illuminate\Http\Response 24 | */ 25 | public function index() 26 | { 27 | // 28 | } 29 | 30 | /** 31 | * Show the form for creating a new resource. 32 | * 33 | * @return \Illuminate\Http\Response 34 | */ 35 | public function create() 36 | { 37 | return view('forgotpassword.create'); 38 | } 39 | 40 | /** 41 | * Store a newly created resource in storage. 42 | * 43 | * @param \Illuminate\Http\Request $request 44 | * @return \Illuminate\Http\Response 45 | */ 46 | public function store(ForgotPasswordRequest $request) 47 | { 48 | // 49 | } 50 | 51 | /** 52 | * Display the specified resource. 53 | * 54 | * @param int $id 55 | * @return \Illuminate\Http\Response 56 | */ 57 | public function show($id) 58 | { 59 | // 60 | } 61 | 62 | /** 63 | * Show the form for editing the specified resource. 64 | * 65 | * @param int $id 66 | * @return \Illuminate\Http\Response 67 | */ 68 | public function edit($id) 69 | { 70 | // 71 | } 72 | 73 | /** 74 | * Update the specified resource in storage. 75 | * 76 | * @param \Illuminate\Http\Request $request 77 | * @param int $id 78 | * @return \Illuminate\Http\Response 79 | */ 80 | public function update(Request $request, $id) 81 | { 82 | // 83 | } 84 | 85 | /** 86 | * Remove the specified resource from storage. 87 | * 88 | * @param int $id 89 | * @return \Illuminate\Http\Response 90 | */ 91 | public function destroy($id) 92 | { 93 | // 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /app/Http/Controllers/HomeAuthController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 26 | } 27 | 28 | public function home() 29 | { 30 | $graph = Sales::graph(); 31 | // dd($graph); 32 | return view('homeauth.home', compact(['graph'])); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Http/Controllers/PaymentsController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 15 | } 16 | 17 | public function index() 18 | { 19 | // 20 | } 21 | 22 | public function create() 23 | { 24 | // 25 | } 26 | 27 | public function store(Request $request) 28 | { 29 | // 30 | } 31 | 32 | public function show(Payments $payments) 33 | { 34 | // 35 | } 36 | 37 | public function edit(Payments $payments) 38 | { 39 | // 40 | } 41 | 42 | public function update(Request $request, Payments $payments) 43 | { 44 | // 45 | } 46 | 47 | public function destroy(Request $request) 48 | { 49 | $si = Payments::destroy($request->id); 50 | 51 | // info when update success 52 | // Session::flash('flash_message', 'Data successfully deleted!'); 53 | 54 | // return redirect()->back(); // redirect back to original route 55 | 56 | if ($si) { 57 | return response()->json([ 58 | 'message' => 'Data deleted', 59 | 'status' => 'success' 60 | ]); 61 | } else { 62 | return response()->json([ 63 | 'message' => 'Data cant be deleted, Please try again later.', 64 | 'status' => 'error' 65 | ]); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/Http/Controllers/PreferencesController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 25 | $this->middleware('admin'); 26 | } 27 | 28 | public function index() 29 | { 30 | // 31 | } 32 | 33 | public function create() 34 | { 35 | // 36 | } 37 | 38 | public function store(PreferencesFormRequest $request) 39 | { 40 | // 41 | } 42 | 43 | public function show(Preferences $preferences) 44 | { 45 | // 46 | } 47 | 48 | public function edit(Preferences $preferences) 49 | { 50 | return view('preferences.edit', compact(['preferences'])); 51 | } 52 | 53 | public function update(PreferencesFormRequest $request, Preferences $preferences) 54 | { 55 | $option = Preferences::updateOrCreate( 56 | ['id' => $preferences->id], 57 | request([ 58 | 'company_name', 'company_address', 'company_postcode', 'company_tagline', 'company_fixed_line', 'company_mobile', 'company_registration', 'company_owner', 'company_email', 'company_person_in-charge' 59 | ]) 60 | ); 61 | 62 | if ($request->file('logo') != NULL) { 63 | foreach($request->file('logo') as $file) 64 | { 65 | $mime = $file->getMimeType(); 66 | $filename = $file->store('images'); 67 | $imag = Image::make(storage_path().'/uploads/'.$filename); 68 | 69 | // // resize the image to a height of 100 and constrain aspect ratio (auto width) 70 | $imag->resize 71 | ( 72 | null, 800, function ($constraint) 73 | { 74 | $constraint->aspectRatio(); 75 | } 76 | ); 77 | 78 | $imag->save(); 79 | 80 | $img = Preferences::updateOrCreate( 81 | ['id' => $preferences->id], [ 82 | 'company_logo_image' => base64_encode( file_get_contents( storage_path().'/uploads/'.$filename ) ), 83 | 'company_logo_mime' => $mime, 84 | ]); 85 | } 86 | } 87 | 88 | // clean up 89 | $files2 = File::allFiles(storage_path('uploads/images')); 90 | foreach($files2 as $h) 91 | { 92 | if (File::extension($h) != 'txt') 93 | { 94 | // echo $l.'
'; 95 | File::delete($h); 96 | } 97 | } 98 | 99 | // info when update success 100 | Session::flash('flash_message', 'Data successfully save!'); 101 | return redirect()->back(); // redirect back to original route 102 | } 103 | 104 | public function destroy(Preferences $preferences) 105 | { 106 | // 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /app/Http/Controllers/PrintPDFController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 36 | $this->middleware('notowned'); 37 | } 38 | 39 | public function print(Sales $sales) 40 | { 41 | echo view('printpdf.invoice', compact(['sales'])); 42 | 43 | // clean up 44 | $files = File::allFiles(storage_path().'/uploads/pdf'); 45 | foreach ($files as $l){ 46 | // echo File::extension($l).'
'; 47 | if (File::extension($l) == 'pdf') { 48 | // echo $l.'
'; 49 | File::delete($l); 50 | } 51 | } 52 | $files2 = File::allFiles(storage_path('uploads/pdfimages')); 53 | foreach($files2 as $h) { 54 | if (File::extension($h) != 'txt') { 55 | // echo $l.'
'; 56 | File::delete($h); 57 | } 58 | } 59 | } 60 | 61 | public function email_invoice(Sales $sales) 62 | { 63 | // check weather client got email 64 | $scust = SalesCustomers::where(['id_sales' => $sales->id])->first(); 65 | $client = Customers::findOrFail($scust->id_customer); 66 | // dd($client); 67 | if ($client->client_email != NULL) { 68 | 69 | // generate pdf 70 | echo view('printpdf.emailpdf', compact(['sales'])); 71 | 72 | // start sending email 73 | Mail::to(['to' => [ 74 | 'name' => $client->client, 75 | 'email' => $client->client_email 76 | ]]) 77 | // ->cc($moreUsers) 78 | // ->bcc($evenMoreUsers) 79 | ->send(new SendInvoice($sales)); 80 | 81 | // clean up 82 | $files = File::allFiles(storage_path().'/uploads/pdf'); 83 | foreach ($files as $l){ 84 | // echo File::extension($l).'
'; 85 | if (File::extension($l) == 'pdf') { 86 | // echo $l.'
'; 87 | File::delete($l); 88 | } 89 | } 90 | $files2 = File::allFiles(storage_path('uploads/pdfimages')); 91 | foreach($files2 as $h) { 92 | if (File::extension($h) != 'txt') { 93 | // echo $l.'
'; 94 | File::delete($h); 95 | } 96 | } 97 | Session::flash('flash_message', 'Done send email.'); 98 | return redirect()->back(); // redirect back to original route 99 | } else { 100 | Session::flash('flash_message', 'Sorry, cant send email. Customer\'s email havent been set.'); 101 | return redirect()->back(); // redirect back to original route 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /app/Http/Controllers/PrintReportController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 27 | // $this->middleware('admin', ['except' => ['create', 'store']]); 28 | } 29 | 30 | public function index() 31 | { 32 | return view('printreport.index'); 33 | } 34 | 35 | public function store(Request $request) 36 | { 37 | $this->validate($request, [ 38 | 'from' => 'required|date_format:Y-m-d|before_or_equal:to', 39 | 'to' => 'required|date_format:Y-m-d|after_or_equal:from', 40 | 'user' => 'required', 41 | 'user.*' => 'integer', 42 | ]); 43 | echo view('printpdf.salesreport', compact(['request'])); 44 | } 45 | 46 | public function audit(Request $request) 47 | { 48 | $this->validate($request, [ 49 | 'from1' => 'required|date_format:Y-m-d|before_or_equal:to1', 50 | 'to1' => 'required|date_format:Y-m-d|after_or_equal:from1', 51 | 'user1' => 'required', 52 | 'user1.*' => 'integer', 53 | ]); 54 | echo view('printpdf.auditreport', compact(['request'])); 55 | 56 | $files2 = File::allFiles(storage_path('uploads/pdfimages')); 57 | foreach($files2 as $h) { 58 | if (File::extension($h) != 'txt') { 59 | // echo $l.'
'; 60 | File::delete($h); 61 | } 62 | } 63 | } 64 | 65 | public function payment(Request $request) 66 | { 67 | $this->validate($request, [ 68 | 'from2' => 'required|date_format:Y-m-d|before_or_equal:to2', 69 | 'to2' => 'required|date_format:Y-m-d|after:from2', 70 | 'user2' => 'required', 71 | 'user2.*' => 'integer', 72 | ]); 73 | echo view('printpdf.payment', compact(['request'])); 74 | $files2 = File::allFiles(storage_path('uploads/pdfimages')); 75 | foreach($files2 as $h) { 76 | if (File::extension($h) != 'txt') { 77 | // echo $l.'
'; 78 | File::delete($h); 79 | } 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /app/Http/Controllers/ProductImageController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 27 | $this->middleware('admin'); 28 | } 29 | 30 | public function index() 31 | { 32 | // 33 | } 34 | 35 | public function create() 36 | { 37 | // 38 | } 39 | 40 | public function store(ProductImageFormRequest $request) 41 | { 42 | // 43 | } 44 | 45 | 46 | public function show(ProductImage $productImage) 47 | { 48 | // 49 | } 50 | 51 | public function edit(ProductImage $productImage) 52 | { 53 | return view('productimage.edit', compact(['productImage'])); 54 | } 55 | 56 | public function update(ProductImageFormRequest $request, ProductImage $productImage) 57 | { 58 | $file = $request->file('image'); 59 | echo 'test'; 60 | $mime = $file->getMimeType(); 61 | 62 | $filename = $file->store('images'); 63 | 64 | $imag = Image::make(storage_path().'/uploads/'.$filename); 65 | 66 | // // resize the image to a height of 100 and constrain aspect ratio (auto width) 67 | $imag->resize(null, 100, function ($constraint) { 68 | $constraint->aspectRatio(); 69 | }); 70 | 71 | $imag->save(); 72 | 73 | $imh = ProductImage::where('image', base64_encode( file_get_contents( storage_path().'/uploads/'.$filename ) )); 74 | 75 | // if image already existed in the database 76 | if($imh->count() < 1) { 77 | $img = ProductImage::where(['id' => $productImage->id]) 78 | ->update([ 79 | 'image' => base64_encode( file_get_contents( storage_path().'/uploads/'.$filename ) ), 80 | 'mime' => $mime, 81 | ]); 82 | $productImage->touch(); 83 | } 84 | 85 | // clean up 86 | $files2 = File::allFiles(storage_path('uploads/images')); 87 | foreach($files2 as $h) { 88 | if (File::extension($h) != 'txt') { 89 | // echo $l.'
'; 90 | File::delete($h); 91 | } 92 | } 93 | // info when update success 94 | Session::flash('flash_message', 'Image successfully updated!'); 95 | return redirect(route('product.edit', $productImage->id_product)); // redirect back to original route 96 | } 97 | 98 | public function destroy(Request $request) 99 | { 100 | $prod = ProductImage::destroy($request->id); 101 | 102 | // info when update success 103 | // Session::flash('flash_message', 'Image successfully deleted!'); 104 | 105 | // return redirect()->back(); // redirect back to original route 106 | return response()->json([ 107 | 'message' => 'Data deleted', 108 | 'status' => 'success' 109 | ]); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /app/Http/Controllers/RemoteController.php: -------------------------------------------------------------------------------- 1 | 'admin@domain.com', 21 | // 'administrator' => 'administrator@domain.com', 22 | // 'root' => 'root@domain.com', 23 | // ); 24 | 25 | $users1 = User::all(); 26 | foreach($users1 as $wer) { 27 | $users[$wer['username']] = $wer['email']; 28 | } 29 | // dd(request('email')); 30 | 31 | if (request('username') && array_key_exists(request('username'), $users)) { 32 | $valid = false; 33 | } else if (request('email')) { 34 | $email = request('email'); 35 | 36 | foreach ($users as $k => $v) { 37 | if ($email == $v) { 38 | $valid = false; 39 | break; 40 | } 41 | } 42 | } 43 | echo json_encode(array('valid' => $valid,)); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/Http/Controllers/SalesCustomersController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 15 | } 16 | 17 | public function index() 18 | { 19 | // 20 | } 21 | 22 | public function create() 23 | { 24 | // 25 | } 26 | 27 | public function store(Request $request) 28 | { 29 | // 30 | } 31 | 32 | public function show(SalesItems $salesItems) 33 | { 34 | // 35 | } 36 | 37 | public function edit(SalesItems $salesItems) 38 | { 39 | // 40 | } 41 | 42 | public function update(Request $request, SalesItems $salesItems) 43 | { 44 | // 45 | } 46 | 47 | public function destroy(Request $request) 48 | { 49 | $si = SalesItems::destroy($request->id); 50 | 51 | // info when update success 52 | // Session::flash('flash_message', 'Data successfully deleted!'); 53 | 54 | // return redirect()->back(); // redirect back to original route 55 | if ($si) { 56 | return response()->json([ 57 | 'message' => 'Data deleted', 58 | 'status' => 'success' 59 | ]); 60 | } else { 61 | return response()->json([ 62 | 'message' => 'Data cant be deleted, Please try again later.', 63 | 'status' => 'error' 64 | ]); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /app/Http/Controllers/SalesTaxController.php: -------------------------------------------------------------------------------- 1 | id); 86 | // delete related model 87 | $result = $si->delete(); 88 | 89 | // info when update success 90 | // Session::flash('flash_message', 'Data successfully deleted!'); 91 | // return redirect()->back(); // redirect back to original route 92 | 93 | if ($result) { 94 | return response()->json([ 95 | 'message' => 'Data deleted', 96 | 'status' => 'success' 97 | ]); 98 | } else { 99 | return response()->json([ 100 | 'message' => 'Data cant be deleted, Please try again later.', 101 | 'status' => 'error' 102 | ]); 103 | } 104 | } 105 | 106 | public function search(Request $request) 107 | { 108 | $valid = TRUE; 109 | // dd($cust); 110 | foreach ($request->serial as $key => $val) { 111 | $serialtrack = SlipNumbers::where('tracking_number', $val['tracking_number'])->count(); 112 | if ($serialtrack == 1) { 113 | $valid = FALSE; 114 | } else { 115 | $valid = TRUE; 116 | } 117 | return response()->json(['valid' => $valid]); 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /app/Http/Controllers/SlipPostageController.php: -------------------------------------------------------------------------------- 1 | id); 86 | // info when update success 87 | // Session::flash('flash_message', 'Data successfully deleted!'); 88 | 89 | // return redirect()->back(); // redirect back to original route 90 | if ($result) { 91 | return response()->json([ 92 | 'message' => 'Data deleted', 93 | 'status' => 'success' 94 | ]); 95 | } else { 96 | return response()->json([ 97 | 'message' => 'Data cant be deleted, Please try again later.', 98 | 'status' => 'error' 99 | ]); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /app/Http/Controllers/TaxesController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 17 | $this->middleware('admin'); 18 | } 19 | 20 | public function index() 21 | { 22 | return view('taxes.index'); 23 | } 24 | 25 | public function create() 26 | { 27 | return view('taxes.create'); 28 | } 29 | 30 | public function store(TaxesFormRequest $request) 31 | { 32 | Taxes::create(request([ 33 | 'tax', 'amount', 34 | ])); 35 | Session::flash('flash_message', 'Data successfully added!'); 36 | 37 | return redirect(route('taxes.index')); // redirect back to original route 38 | } 39 | 40 | public function show(Taxes $taxes) 41 | { 42 | // 43 | } 44 | 45 | public function edit(Taxes $taxes) 46 | { 47 | return view('taxes.edit', compact('taxes')); 48 | } 49 | 50 | public function update(TaxesFormRequest $request, Taxes $taxes) 51 | { 52 | Taxes::find($taxes->id) 53 | -> update(request([ 54 | 'tax', 'amount' 55 | ])); 56 | Session::flash('flash_message', 'Data successfully update!'); 57 | 58 | return redirect(route('taxes.index')); // redirect back to original route 59 | } 60 | 61 | public function destroy(Taxes $taxes) 62 | { 63 | Taxes::destroy($taxes->id); 64 | Session::flash('flash_message', 'Data successfully delete!'); 65 | 66 | return redirect(route('taxes.index')); // redirect back to original route 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserGroupController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 21 | $this->middleware('admin'); 22 | } 23 | /** 24 | * Display a listing of the resource. 25 | * 26 | * @return \Illuminate\Http\Response 27 | */ 28 | public function index() 29 | { 30 | // 31 | } 32 | 33 | /** 34 | * Show the form for creating a new resource. 35 | * 36 | * @return \Illuminate\Http\Response 37 | */ 38 | public function create() 39 | { 40 | // pass database data to view 41 | $ug = UserGroup::all(); 42 | 43 | // display form for storing data 44 | return view('usergroup.create', compact('ug')); 45 | } 46 | 47 | /** 48 | * Store a newly created resource in storage. 49 | * 50 | * @param \Illuminate\Http\Request $request 51 | * @return \Illuminate\Http\Response 52 | */ 53 | public function store(UserGroupFormRequest $request) 54 | { 55 | // storing the data into database Categories 56 | UserGroup::create([ 57 | 'group' => title_case(request('group')), 58 | ]); 59 | 60 | Session::flash('flash_message', 'Data successfully added!'); 61 | 62 | return redirect()->back(); // redirect back to original route 63 | } 64 | 65 | /** 66 | * Display the specified resource. 67 | * 68 | * @param \App\UserGroup $userGroup 69 | * @return \Illuminate\Http\Response 70 | */ 71 | public function show(UserGroup $userGroup) 72 | { 73 | // 74 | } 75 | 76 | /** 77 | * Show the form for editing the specified resource. 78 | * 79 | * @param \App\UserGroup $userGroup 80 | * @return \Illuminate\Http\Response 81 | */ 82 | public function edit(UserGroup $userGroup) 83 | { 84 | // 85 | } 86 | 87 | /** 88 | * Update the specified resource in storage. 89 | * 90 | * @param \Illuminate\Http\Request $request 91 | * @param \App\UserGroup $userGroup 92 | * @return \Illuminate\Http\Response 93 | */ 94 | public function update(UserGroupFormRequest $request, UserGroup $userGroup) 95 | { 96 | // 97 | } 98 | 99 | /** 100 | * Remove the specified resource from storage. 101 | * 102 | * @param \App\UserGroup $userGroup 103 | * @return \Illuminate\Http\Response 104 | */ 105 | public function destroy(UserGroup $userGroup) 106 | { 107 | // 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 30 | \App\Http\Middleware\EncryptCookies::class, 31 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 32 | \Illuminate\Session\Middleware\StartSession::class, 33 | // \Illuminate\Session\Middleware\AuthenticateSession::class, 34 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 35 | \App\Http\Middleware\VerifyCsrfToken::class, 36 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 37 | ], 38 | 39 | 'api' => [ 40 | 'throttle:60,1', 41 | 'bindings', 42 | ], 43 | ]; 44 | 45 | /** 46 | * The application's route middleware. 47 | * 48 | * These middleware may be assigned to groups or used individually. 49 | * 50 | * @var array 51 | */ 52 | protected $routeMiddleware = [ 53 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, 54 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 55 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 56 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 57 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 58 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 59 | 60 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////// 61 | // middleware for admin purpose 62 | 'admin' => \App\Http\Middleware\RedirectIfNotAnAdmin::class, 63 | 'notowned' => \App\Http\Middleware\RedirectIfThisItemIsDifferentOwner::class, 64 | 'userown' => \App\Http\Middleware\RedirectIfNotUser::class, 65 | 66 | ]; 67 | } 68 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/home'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfNotAnAdmin.php: -------------------------------------------------------------------------------- 1 | isAnAdmin 22 | if ( ! $request->user()->isAnAdmin() ) { 23 | return redirect()->back(); 24 | } 25 | return $next($request); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfNotUser.php: -------------------------------------------------------------------------------- 1 | user()->notUser( $request->route()->user->id ) ) { 12 | return redirect()->back(); 13 | } 14 | return $next($request); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfThisItemIsDifferentOwner.php: -------------------------------------------------------------------------------- 1 | route()->sales->id_user ); 20 | // dd( $request->route()->parameters() ); 21 | 22 | // foreach ($request->route()->parameters() as $key => $value) { 23 | // echo $key.'
'; 24 | // echo $value->id_user.'
'; 25 | // } 26 | 27 | if ( ! $request->user()->OwnerOfThisItem( $request->route()->sales->id_user ) ) { 28 | return redirect()->back(); 29 | } 30 | return $next($request); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 'required|string', 28 | 'password' => 'required', 29 | 'remember' => 'bool', 30 | ]; 31 | } 32 | 33 | public function messages() 34 | { 35 | return [ 36 | 'email.required' => 'your email please', 37 | 'password.required' => 'your password please', 38 | ]; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/Http/Requests/BanksFormRequest.php: -------------------------------------------------------------------------------- 1 | banks['id']); 17 | return [ 18 | 'bank' => 'required', 19 | 'city' => 'required', 20 | 'swift_code' => 'required|alpha|unique:banks,swift_code,'.$this->banks['id'], 21 | 'account' => 'nullable|alpha_dash', 22 | 'active' => 'nullable' 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Http/Requests/CustomersFormRequest.php: -------------------------------------------------------------------------------- 1 | 'required_without:repeatcust|unique:customers,client,'.$this->customers['id'], 18 | 'client_address' => 'required_with:client_poskod', 19 | 'client_poskod' => 'required_with:client_address', 20 | 'client_phone' => 'required_without:repeatcust|nullable|numeric|min:10|unique:customers,client_phone,'.$this->customers['id'], 21 | 'client_email' => 'required_without:repeatcust|nullable|email|unique:customers,client_email,'.$this->customers['id'], 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Requests/ForgotPasswordRequest.php: -------------------------------------------------------------------------------- 1 | 'required|email', 28 | ]; 29 | } 30 | 31 | public function messages() 32 | { 33 | return [ 34 | 'email.required' => 'your email please', 35 | ]; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Requests/PreferencesFormRequest.php: -------------------------------------------------------------------------------- 1 | 'required', 19 | 'company_registration' => 'required|alpha_dash', 20 | 'company_tagline' => '', 21 | 'logo.*' => 'image|max:5000', 22 | 'company_address' => 'required', 23 | 'company_postcode' => 'numeric', 24 | 'company_fixed_line' => 'numeric', 25 | 'company_mobile' => 'numeric', 26 | 'company_email' => 'email', 27 | 'company_owner' => 'required', 28 | 'company_person_in-charge' => 'required', 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/ProductCategoryFormRequest.php: -------------------------------------------------------------------------------- 1 | productCategory['id']); 27 | return [ 28 | 'category' => 'required|unique:product_categories,product_category,'.$this->productCategory['id'].'|alpha', // '.$this->categories['id']' to ignore for the update process 29 | 'active' => 'integer', 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Requests/ProductFormRequest.php: -------------------------------------------------------------------------------- 1 | product['id']); 18 | return [ 19 | // 20 | 'product' => 'required', 21 | 'retail' => 'required|numeric', 22 | 'commission' => 'required|numeric', 23 | 'id_category' => 'required|integer', 24 | // 'image' => 'required', // multiple file validation 25 | 'image.*' => 'image|max:5000', // multiple file validation 26 | 'active' => 'integer', 27 | ]; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Http/Requests/ProductImageFormRequest.php: -------------------------------------------------------------------------------- 1 | 'required|image', // multiple file validation 20 | ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Requests/SalesFormRequest.php: -------------------------------------------------------------------------------- 1 | customers['id']); 17 | return [ 18 | 'id_user' => 'required', 19 | 'date_sale' => 'required|date_format:Y-m-d', 20 | 'serial.*.tracking_number' => 'alpha_num', 21 | 'image.*' => 'image|max:5000', 22 | 'repeatcust' => 'required_without_all:client,client_phone', 23 | 'client' => 'required_without:repeatcust|unique:customers,client', 24 | 'client_address' => 'required_with:client_poskod', 25 | 'client_poskod' => 'required_with:client_address', 26 | 'client_phone' => 'required_without:repeatcust|nullable|numeric', 27 | 'client_email' => 'nullable|email', 28 | 'inv.*.id_product' => 'required|integer', 29 | 'inv.*.commission' => 'required|numeric', 30 | 'inv.*.retail' => 'required|numeric', 31 | 'inv.*.quantity' => 'required|integer', 32 | 'tax.*' => 'nullable|integer', 33 | 'pay.*.id_bank' => 'integer|required_with:pay.*.date_payment,pay.*.amount', 34 | 'pay.*.date_payment' => 'date_format:Y-m-d|required_with:pay.*.id_bank,pay.*.amount', 35 | 'pay.*.amount' => 'numeric|required_with:pay.*.id_bank,pay.*.date_payment', 36 | ]; 37 | } 38 | 39 | public function messages() 40 | { 41 | return [ 42 | 'inv.required' => 'Please insert product by clicking "Add Products"', 43 | 'image.*.required' => 'Slip postage image is required', 44 | 'serial.*.tracking_number.alpha_num' => 'Receipt or Postage Tracking number can be consists of alphabet and/or digits.', 45 | ]; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/Http/Requests/TaxesFormRequest.php: -------------------------------------------------------------------------------- 1 | 'alpha|unique:taxes,tax,'.$this->taxes['id'], 28 | 'amount' => 'numeric', 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Requests/UserFormRequest.php: -------------------------------------------------------------------------------- 1 | user['id']); 27 | return [ 28 | 'name' => 'required|unique:users,name,'.$this->user['id'], 29 | 'email' => 'required|email|unique:users,email,'.$this->user['id'], 30 | 'password' => 'required|min:6|max:8', 31 | 'password_confirmation' => 'required|same:password', 32 | 'id_group' => 'required|integer', 33 | 'color' => 'required', 34 | ]; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/UserGroupFormRequest.php: -------------------------------------------------------------------------------- 1 | user_groups['id']); 29 | return [ 30 | // 31 | 'group' => 'required|unique:user_groups,group,'.$this->user_groups['id'].'|alpha', 32 | ]; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Mail/ContactUs.php: -------------------------------------------------------------------------------- 1 | request = $request; 20 | } 21 | 22 | public function build() 23 | { 24 | $re = Preferences::find(1); 25 | return $this->markdown('email.contactus') 26 | ->from($re->company_email, $re->company_name) 27 | ->subject(ucwords(strtolower(request('subject')))); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Mail/SendInvoice.php: -------------------------------------------------------------------------------- 1 | sales = $sales; 31 | } 32 | 33 | public function build() 34 | { 35 | // resolve filename to attach 36 | $scust = SalesCustomers::where(['id_sales' => $this->sales->id])->first(); 37 | $client = Customers::findOrFail($scust->id_customer); 38 | $filename = 'Invoice for '.$client->client.'.pdf'; 39 | 40 | // resolve sender i.e company 41 | $comp = Preferences::find(1); 42 | $sender = $comp->company_name; 43 | $sender_email = strtolower($comp->company_email); 44 | 45 | return $this->markdown('email.invoice') 46 | // ->from('address', 'name') 47 | ->from($sender_email, $sender) 48 | // ->text('emails.orders.shipped_plain'); 49 | // ->replyTo($address, $name) 50 | ->subject(ucwords(strtolower($comp->company_name)).' Invoice #'.$this->sales->id) 51 | ->attach(storage_path().'/uploads/pdf/'.$filename); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/Model.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Sales'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Preferences.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'source' => 'product' 19 | ] 20 | ]; 21 | } 22 | 23 | public function getRouteKeyName() 24 | { 25 | return 'slug'; 26 | } 27 | 28 | ##################################################################################### 29 | 30 | public function productimage() { 31 | return $this->hasMany('App\ProductImage', 'id_product'); 32 | } 33 | 34 | public function category() { 35 | return $this->belongsTo('App\ProductCategory'); 36 | } 37 | 38 | public function transaction() 39 | { 40 | return $this->hasMany('App\Transactions', 'id_user'); 41 | } 42 | 43 | public function belonging() 44 | { 45 | return $this->belongsTo('App\User'); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/ProductCategory.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Product', 'id_category'); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/ProductImage.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Product'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /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 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /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/SalesCustomers.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Customers'); 16 | } 17 | 18 | public function customerssales() { 19 | return $this->belongsTo('App\Sales'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/SalesItems.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Sales'); 16 | } 17 | 18 | public function product() { 19 | return $this->belongsTo('App\Product'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/SalesTax.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Sales'); 16 | } 17 | 18 | public function tax() { 19 | return $this->belongsTo('App\Taxes'); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/SlipNumbers.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Sales'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/SlipPostage.php: -------------------------------------------------------------------------------- 1 | belongsTo('App\Sales'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Taxes.php: -------------------------------------------------------------------------------- 1 | [ 23 | 'source' => 'taxes' 24 | ] 25 | ]; 26 | } 27 | 28 | public function getRouteKeyName() 29 | { 30 | return 'slug'; 31 | } 32 | 33 | public function taxessales() { 34 | return $this->hasMany('App\Sales', 'id_sales'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | [ 19 | 'source' => 'name' 20 | ] 21 | ]; 22 | } 23 | 24 | public function getRouteKeyName() 25 | { 26 | return 'slug'; 27 | } 28 | 29 | use Notifiable; 30 | 31 | /** 32 | * The attributes that are mass assignable. 33 | * 34 | * @var array 35 | */ 36 | protected $fillable = [ 37 | 'name', 'username', 'email', 'password', 'id_group', 'color', 38 | ]; 39 | 40 | /** 41 | * The attributes that should be hidden for arrays. 42 | * 43 | * @var array 44 | */ 45 | protected $hidden = [ 46 | 'password', 'remember_token', 47 | ]; 48 | 49 | public function usergroup() 50 | { 51 | return $this->belongsTo('App\UserGroup'/*, 'id_group'*/); 52 | } 53 | 54 | public function userInvoices() 55 | { 56 | return $this->hasMany('App\Sales', 'id_user'); 57 | } 58 | 59 | public function createdby() 60 | { 61 | return $this->hasMany('App\Product', 'id_user'); 62 | } 63 | 64 | ///////////////////////////////////////////////////////////////////////////////////////////////////// 65 | // this is for middleware truly for an admin purpose 66 | public function isAnAdmin() { 67 | // dd(auth()->user()->id_group); 68 | if ( auth()->user()->id_group == 1 ) { 69 | return true; 70 | } else { 71 | return false; 72 | } 73 | } 74 | 75 | // invoice item can only be edited by its respective owner and Admin ONLY 76 | public function OwnerOfThisItem( $id ) 77 | { 78 | // dd($id); 79 | if ( auth()->user()->id_group == 2 && auth()->user()->id == $id ) { 80 | return true; 81 | } else { 82 | // give access for admin 83 | if ( auth()->user()->id_group == 1 ) { 84 | return true; 85 | } else { 86 | return false; 87 | } 88 | } 89 | } 90 | 91 | // no one can edit user bio except by him/herself ant the admin 92 | public function notUser( $id ) { 93 | if ( auth()->user()->id == $id ) { 94 | return true; 95 | } else { 96 | if ( auth()->user()->id_group == 1 ) { 97 | return true; 98 | } else { 99 | return false; 100 | } 101 | } 102 | } 103 | 104 | } 105 | -------------------------------------------------------------------------------- /app/UserGroup.php: -------------------------------------------------------------------------------- 1 | hasMany('App\Users', 'id_user'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /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/autoload.php: -------------------------------------------------------------------------------- 1 | 3 | array ( 4 | 'providers' => 5 | array ( 6 | 0 => 'Crabbly\\Fpdf\\FpdfServiceProvider', 7 | ), 8 | ), 9 | 'cviebrock/eloquent-sluggable' => 10 | array ( 11 | 'providers' => 12 | array ( 13 | 0 => 'Cviebrock\\EloquentSluggable\\ServiceProvider', 14 | ), 15 | ), 16 | 'fideloper/proxy' => 17 | array ( 18 | 'providers' => 19 | array ( 20 | 0 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider', 21 | ), 22 | ), 23 | 'intervention/image' => 24 | array ( 25 | 'providers' => 26 | array ( 27 | 0 => 'Intervention\\Image\\ImageServiceProvider', 28 | ), 29 | 'aliases' => 30 | array ( 31 | 'Image' => 'Intervention\\Image\\Facades\\Image', 32 | ), 33 | ), 34 | 'laravel/tinker' => 35 | array ( 36 | 'providers' => 37 | array ( 38 | 0 => 'Laravel\\Tinker\\TinkerServiceProvider', 39 | ), 40 | ), 41 | 'laravel/ui' => 42 | array ( 43 | 'providers' => 44 | array ( 45 | 0 => 'Laravel\\Ui\\UiServiceProvider', 46 | ), 47 | ), 48 | 'laravelcollective/html' => 49 | array ( 50 | 'providers' => 51 | array ( 52 | 0 => 'Collective\\Html\\HtmlServiceProvider', 53 | ), 54 | 'aliases' => 55 | array ( 56 | 'Form' => 'Collective\\Html\\FormFacade', 57 | 'Html' => 'Collective\\Html\\HtmlFacade', 58 | ), 59 | ), 60 | 'nesbot/carbon' => 61 | array ( 62 | 'providers' => 63 | array ( 64 | 0 => 'Carbon\\Laravel\\ServiceProvider', 65 | ), 66 | ), 67 | ); -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=7.0.0", 9 | "crabbly/fpdf-laravel": "^1.0", 10 | "cviebrock/eloquent-sluggable": "^8.0", 11 | "fideloper/proxy": "^4.4", 12 | "intervention/image": "^2.6", 13 | "laravel/framework": "^8.0", 14 | "laravel/tinker": "^2.0", 15 | "laravel/ui": "^3.3", 16 | "laravelcollective/html": "^6.2" 17 | }, 18 | "autoload": { 19 | "classmap": [ 20 | "database/seeds", 21 | "database/factories" ], 22 | "psr-4": { 23 | "App\\": "app/" 24 | } 25 | }, 26 | "autoload-dev": { 27 | "psr-4": { 28 | "Tests\\": "tests/" 29 | } 30 | }, 31 | "extra": { 32 | "laravel": { 33 | "dont-discover": [ 34 | ] 35 | } 36 | }, 37 | "scripts": { 38 | "post-root-package-install": [ 39 | "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" 40 | ], 41 | "post-create-project-cmd": [ 42 | "php artisan key:generate" 43 | ], 44 | "post-autoload-dump": [ 45 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", 46 | "@php artisan package:discover" 47 | ] 48 | 49 | }, 50 | "config": { 51 | "preferred-install": "dist", 52 | "sort-packages": true, 53 | "optimize-autoloader": true 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /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 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | You may specify multiple password reset configurations if you have more 85 | | than one user table or model in the application and you want to have 86 | | separate password reset settings based on the specific user types. 87 | | 88 | | The expire time is the number of minutes that the reset token should be 89 | | considered valid. This security feature keeps tokens short-lived so 90 | | they have less time to be guessed. You may change this as needed. 91 | | 92 | */ 93 | 94 | 'passwords' => [ 95 | 'users' => [ 96 | 'provider' => 'users', 97 | 'table' => 'password_resets', 98 | 'expire' => 60, 99 | ], 100 | ], 101 | 102 | ]; 103 | -------------------------------------------------------------------------------- /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 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; 59 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Cache Stores 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the cache "stores" for your application as 26 | | well as their drivers. You may even define multiple stores for the 27 | | same cache driver to group types of items stored in your caches. 28 | | 29 | */ 30 | 31 | 'stores' => [ 32 | 33 | 'apc' => [ 34 | 'driver' => 'apc', 35 | ], 36 | 37 | 'array' => [ 38 | 'driver' => 'array', 39 | ], 40 | 41 | 'database' => [ 42 | 'driver' => 'database', 43 | 'table' => 'cache', 44 | 'connection' => null, 45 | ], 46 | 47 | 'file' => [ 48 | 'driver' => 'file', 49 | 'path' => storage_path('framework/cache/data'), 50 | ], 51 | 52 | 'memcached' => [ 53 | 'driver' => 'memcached', 54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), 55 | 'sasl' => [ 56 | env('MEMCACHED_USERNAME'), 57 | env('MEMCACHED_PASSWORD'), 58 | ], 59 | 'options' => [ 60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000, 61 | ], 62 | 'servers' => [ 63 | [ 64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 65 | 'port' => env('MEMCACHED_PORT', 11211), 66 | 'weight' => 100, 67 | ], 68 | ], 69 | ], 70 | 71 | 'redis' => [ 72 | 'driver' => 'redis', 73 | 'connection' => 'default', 74 | ], 75 | 76 | ], 77 | 78 | /* 79 | |-------------------------------------------------------------------------- 80 | | Cache Key Prefix 81 | |-------------------------------------------------------------------------- 82 | | 83 | | When utilizing a RAM based store such as APC or Memcached, there might 84 | | be other applications utilizing the same cache. So, we'll specify a 85 | | value to get prefixed to all our keys so we can avoid collisions. 86 | | 87 | */ 88 | 89 | 'prefix' => 'laravel', 90 | 91 | ]; 92 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | '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' => '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", "s3", "rackspace" 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path('uploads'), 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_KEY'), 61 | 'secret' => env('AWS_SECRET'), 62 | 'region' => env('AWS_REGION'), 63 | 'bucket' => env('AWS_BUCKET'), 64 | ], 65 | 66 | ], 67 | 68 | ]; 69 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 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 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 90, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /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' => realpath(storage_path('framework/views')), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 16 | static $password; 17 | 18 | return [ 19 | 'name' => $faker->name, 20 | 'email' => $faker->unique()->safeEmail, 21 | 'password' => $password ?: $password = bcrypt('secret'), 22 | 'remember_token' => str_random(10), 23 | ]; 24 | }); 25 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('name'); 19 | // $table->integer('id_group'); 20 | $table->unsignedBigInteger('id_group'); 21 | $table->foreign('id_group')->references('id')->on('user_groups'); 22 | $table->string('color'); 23 | $table->string('email')->unique(); 24 | $table->string('password'); 25 | $table->rememberToken(); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::dropIfExists('users'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /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/2017_03_12_091611_create_product_images_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | // $table->integer('id_product'); 19 | $table->unsignedBigInteger('id_product'); 20 | $table->foreign('id_product')->references('id')->on('products'); 21 | $table->text('mime'); 22 | // $table->longText('image')->unique(); // --> for sqlite 23 | $table->longText('image'); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('product_images'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2017_03_14_001723_create_products_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | // $table->integer('id_user'); 19 | $table->unsignedBigInteger('id_user'); 20 | $table->foreign('id_user')->references('id')->on('users'); // table name itself 21 | $table->string('product')->unique(); 22 | // $table->integer('id_category'); 23 | $table->unsignedBigInteger('id_category'); 24 | $table->foreign('id_category')->references('id')->on('categories'); 25 | $table->float('retail', 8, 2); 26 | $table->float('commission', 8, 2); 27 | $table->boolean('active'); 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('products'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2017_04_01_170946_create_user_groups_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('group'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::dropIfExists('user_groups'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2017_04_09_080258_create_product_categories_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | // $table->integer('id_user'); 19 | $table->unsignedBigInteger('id_user'); 20 | $table->foreign('id_user')->references('id')->on('users')->onUpdate('cascade'); // table name itself 21 | $table->string('product_category')->unique(); 22 | $table->boolean('active')->nullable(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('product_categories'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2017_04_10_022558_create_sales_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 13 | // $table->integer('id_user'); 14 | $table->unsignedBigInteger('id_user'); 15 | $table->foreign('id_user')->references('id')->on('users'); 16 | $table->date('date_sale'); 17 | $table->softDeletes(); 18 | $table->timestamps(); 19 | }); 20 | } 21 | 22 | public function down() 23 | { 24 | Schema::dropIfExists('sales'); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/migrations/2017_04_10_022855_create_sales_items_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | // $table->integer('id_sales'); 19 | $table->unsignedBigInteger('id_sales'); 20 | $table->foreign('id_sales')->references('id')->on('sales'); 21 | // $table->integer('id_product'); 22 | $table->unsignedBigInteger('id_product'); 23 | $table->foreign('id_product')->references('id')->on('products'); 24 | $table->float('commission', 8, 2); 25 | $table->float('retail', 8, 2); 26 | $table->integer('quantity'); 27 | $table->softDeletes(); 28 | $table->timestamps(); 29 | }); 30 | } 31 | 32 | /** 33 | * Reverse the migrations. 34 | * 35 | * @return void 36 | */ 37 | public function down() 38 | { 39 | Schema::dropIfExists('sales_items'); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2017_04_10_022910_create_customers_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 13 | $table->text('client'); 14 | $table->longText('client_address')->nullable(); 15 | $table->string('client_poskod')->nullable(); 16 | $table->string('client_phone')->nullable(); 17 | $table->string('client_email')->nullable(); 18 | $table->softDeletes(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | public function down() 24 | { 25 | Schema::dropIfExists('customers'); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/migrations/2017_04_29_010707_create_slip_postages_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | // $table->integer('id_sales'); 19 | $table->unsignedBigInteger('id_sales'); 20 | $table->foreign('id_sales')->references('id')->on('sales'); 21 | $table->text('mime'); 22 | $table->longText('image'); 23 | $table->softDeletes(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::dropIfExists('slip_postages'); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /database/migrations/2017_04_29_145442_create_banks_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 16 | $table->string('bank'); 17 | $table->string('city'); 18 | $table->string('swift_code'); 19 | $table->string('account')->nullable(); 20 | $table->boolean('active'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | Schema::dropIfExists('banks'); 32 | } 33 | } -------------------------------------------------------------------------------- /database/migrations/2017_04_29_145506_create_payments_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | // $table->integer('id_sales'); 19 | $table->unsignedBigInteger('id_sales'); 20 | $table->foreign('id_sales')->references('id')->on('sales'); 21 | // $table->integer('id_bank'); 22 | $table->unsignedBigInteger('id_bank'); 23 | $table->foreign('id_bank')->references('id')->on('banks'); 24 | $table->date('date_payment'); 25 | $table->float('amount', 8, 2); 26 | $table->softDeletes(); 27 | $table->timestamps(); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::dropIfExists('payments'); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2017_05_02_070956_create_slip_numbers_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | // $table->integer('id_sales'); 19 | $table->unsignedBigInteger('id_sales'); 20 | $table->foreign('id_sales')->references('id')->on('sales'); 21 | $table->text('tracking_number'); 22 | $table->softDeletes(); 23 | $table->timestamps(); 24 | }); 25 | } 26 | 27 | /** 28 | * Reverse the migrations. 29 | * 30 | * @return void 31 | */ 32 | public function down() 33 | { 34 | Schema::dropIfExists('slip_numbers'); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2017_05_03_012521_create_taxes_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | $table->string('tax'); 19 | $table->float('amount', 8, 2); 20 | $table->softDeletes(); 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/2017_05_03_012957_create_sales_taxes_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | // $table->integer('id_sales'); 19 | $table->unsignedBigInteger('id_sales'); 20 | $table->foreign('id_sales')->references('id')->on('sales'); 21 | // $table->integer('id_tax'); 22 | $table->unsignedBigInteger('id_tax'); 23 | $table->foreign('id_tax')->references('id')->on('taxes'); 24 | $table->softDeletes(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('sales_taxes'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2017_05_09_161603_create_sales_customers_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 18 | // $table->integer('id_sales'); 19 | $table->unsignedBigInteger('id_sales'); 20 | $table->foreign('id_sales')->references('id')->on('sales'); 21 | // $table->integer('id_customer'); 22 | $table->unsignedBigInteger('id_customer'); 23 | $table->foreign('id_customer')->references('id')->on('customers'); 24 | $table->softDeletes(); 25 | $table->timestamps(); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::dropIfExists('sales_customers'); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2017_05_15_032723_create_preferences_table.php: -------------------------------------------------------------------------------- 1 | bigIncrements('id'); 14 | $table->text('company_name'); 15 | $table->text('company_registration'); 16 | $table->longText('company_logo_image'); 17 | $table->string('company_tagline'); 18 | $table->text('company_address'); 19 | $table->string('company_postcode'); 20 | $table->text('company_logo_mime'); 21 | $table->string('company_fixed_line'); 22 | $table->string('company_mobile'); 23 | $table->string('company_email'); 24 | $table->integer('company_owner'); 25 | $table->integer('company_person_in-charge'); 26 | $table->timestamps(); 27 | }); 28 | } 29 | 30 | public function down() 31 | { 32 | Schema::dropIfExists('preferences'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2017_12_24_172032_add_slug.php: -------------------------------------------------------------------------------- 1 | string('slug')->after('name'); 18 | $table->string('username')->after('id_group'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::table('users', function (Blueprint $table) { 30 | $table->dropColumn(['slug', 'username']); 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2017_12_24_174618_add_slug_to_taxes.php: -------------------------------------------------------------------------------- 1 | string('slug')->after('tax'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('taxes', function (Blueprint $table) { 29 | $table->dropColumn('slug'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2017_12_24_175021_add_slug_to_products.php: -------------------------------------------------------------------------------- 1 | string('slug')->after('product'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('products', function (Blueprint $table) { 29 | $table->dropColumn('slug'); 30 | }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | $this->call(UserSeed::class); 16 | $this->call(UserGroupSeed::class); 17 | $this->call(ProductCategorySeed::class); 18 | $this->call(ProductsSeed::class); 19 | $this->call(ProductImagesSeed::class); 20 | $this->call(BanksSeed::class); 21 | $this->call(TaxesSeed::class); 22 | $this->call(PreferencesSeed::class); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeds/ProductCategorySeed.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | 'id_user' => 1, 16 | 'product_category' => 'Mengandung', 17 | 'active' => 1 18 | ]); 19 | DB::table('product_categories')->insert([ 20 | 'id_user' => 1, 21 | 'product_category' => 'Bersalin', 22 | 'active' => 1 23 | ]); 24 | DB::table('product_categories')->insert([ 25 | 'id_user' => 1, 26 | 'product_category' => 'Berpantang', 27 | 'active' => 1 28 | ]); 29 | DB::table('product_categories')->insert([ 30 | 'id_user' => 1, 31 | 'product_category' => 'Normal', 32 | 'active' => 1 33 | ]); 34 | DB::table('product_categories')->insert([ 35 | 'id_user' => 1, 36 | 'product_category' => 'Perkhidmatan', 37 | 'active' => 1 38 | ]); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /database/seeds/TaxesSeed.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | 'tax' => 'GST', 16 | 'amount' => 6.00, 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /database/seeds/UserGroupSeed.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | 'group' => 'Administrator', 16 | ]); 17 | DB::table('user_groups')->insert([ 18 | 'group' => 'Staff', 19 | ]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /database/seeds/UserSeed.php: -------------------------------------------------------------------------------- 1 | insert([ 15 | 'id_group' => 1, 16 | 'name' => 'Dhiauddin', 17 | 'email' => 'dhiauddin@gmail.com', 18 | 'password' => bcrypt('123123'), 19 | 'color' => 'rgba(250, 0, 0, 0.61)', 20 | ]); 21 | DB::table('users')->insert([ 22 | 'id_group' => 2, 23 | 'name' => 'Fatihah', 24 | 'email' => 'fatihah@gmail.com', 25 | 'password' => bcrypt('123123'), 26 | 'color' => 'rgba(102, 92, 214, 0.8)', 27 | ]); 28 | DB::table('users')->insert([ 29 | 'id_group' => 2, 30 | 'name' => 'Syazwani', 31 | 'email' => 'syazwani@gmail.com', 32 | 'password' => bcrypt('123123'), 33 | 'color' => 'rgba(150, 245, 106, 0.8)', 34 | ]); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "dev": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 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": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 7 | "watch-poll": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 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": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", 10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" 11 | }, 12 | "devDependencies": { 13 | "@claviska/jquery-minicolors": "^2.3.5", 14 | "axios": "^0.21.4", 15 | "bootstrap": "3.4.1", 16 | "bootstrap-datepicker": "^1.9.0", 17 | "bootstrap-sass": "^3.4.1", 18 | "bootstrapvalidator": "^0.5.4", 19 | "datatables.net": "^1.11.2", 20 | "datatables.net-bs": "^1.11.2", 21 | "datatables.net-responsive": "^2.2.9", 22 | "datatables.net-responsive-bs": "^2.2.9", 23 | "font-awesome": "^4.7.0", 24 | "imagemin": "^8.0.1", 25 | "jquery": "^3.6.0", 26 | "jquery-chained": "1.0", 27 | "jquery.cookie": "^1.4.1", 28 | "laravel-mix": "^6.0.31", 29 | "lodash": "^4.17.21", 30 | "popper.js": "^1.16.1", 31 | "resolve-url-loader": "^4.0.0", 32 | "sass": "^1.41.1", 33 | "sass-loader": "^12.1.0", 34 | "select2": "^4.1.0-rc.0", 35 | "select2-bootstrap-css": "^1.4.6", 36 | "sweetalert2": "^11.1.5", 37 | "vue-template-compiler": "^2.6.14" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests/Feature 14 | 15 | 16 | 17 | ./tests/Unit 18 | 19 | 20 | 21 | 22 | ./app 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /public/css/jquery.minicolors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/css/jquery.minicolors.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/favicon.ico -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/favicon.png -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/stylesheets/bootstrap/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/bootstrap-sass/stylesheets/bootstrap/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/stylesheets/bootstrap/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/bootstrap-sass/stylesheets/bootstrap/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/stylesheets/bootstrap/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/bootstrap-sass/stylesheets/bootstrap/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/fonts/vendor/bootstrap-sass/stylesheets/bootstrap/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/bootstrap-sass/stylesheets/bootstrap/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/fonts/vendor/font-awesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/font-awesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/fonts/vendor/font-awesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/font-awesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/fonts/vendor/font-awesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/font-awesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/fonts/vendor/font-awesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/public/fonts/vendor/font-awesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Register The Auto Loader 13 | |-------------------------------------------------------------------------- 14 | | 15 | | Composer provides a convenient, automatically generated class loader for 16 | | our application. We just need to utilize it! We'll simply require it 17 | | into the script here so that we don't have to worry about manual 18 | | loading any of our classes later on. It feels great to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/../bootstrap/autoload.php'; 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Turn On The Lights 27 | |-------------------------------------------------------------------------- 28 | | 29 | | We need to illuminate PHP development, so let us turn on the lights. 30 | | This bootstraps the framework and gets it ready for use, then it 31 | | will load up this application so that we can run it and send 32 | | the responses back to the browser and delight our users. 33 | | 34 | */ 35 | 36 | $app = require_once __DIR__.'/../bootstrap/app.php'; 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Run The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once we have the application, we can handle the incoming request 44 | | through the kernel, and send the associated response back to 45 | | the client's browser allowing them to enjoy the creative 46 | | and wonderful application we have prepared for them. 47 | | 48 | */ 49 | 50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 51 | 52 | $response = $kernel->handle( 53 | $request = Illuminate\Http\Request::capture() 54 | ); 55 | 56 | $response->send(); 57 | 58 | $kernel->terminate($request, $response); 59 | -------------------------------------------------------------------------------- /public/js/app.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.4.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | 7 | /*! 8 | * BootstrapValidator (http://bootstrapvalidator.com) 9 | * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 10 | * 11 | * @version v0.5.4, built on 2014-12-11 9:05:43 AM 12 | * @author https://twitter.com/nghuuphuoc 13 | * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc 14 | * @license Commercial: http://bootstrapvalidator.com/license/ 15 | * Non-commercial: http://creativecommons.org/licenses/by-nc-nd/3.0/ 16 | */ 17 | 18 | /*! 19 | * Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker) 20 | * 21 | * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) 22 | */ 23 | 24 | /*! 25 | * Select2 4.1.0-rc.0 26 | * https://select2.github.io 27 | * 28 | * Released under the MIT license 29 | * https://github.com/select2/select2/blob/master/LICENSE.md 30 | */ 31 | 32 | /*! 33 | * Sizzle CSS Selector Engine v2.3.6 34 | * https://sizzlejs.com/ 35 | * 36 | * Copyright JS Foundation and other contributors 37 | * Released under the MIT license 38 | * https://js.foundation/ 39 | * 40 | * Date: 2021-02-16 41 | */ 42 | 43 | /*! 44 | * jQuery Cookie Plugin v1.4.1 45 | * https://github.com/carhartl/jquery-cookie 46 | * 47 | * Copyright 2013 Klaus Hartl 48 | * Released under the MIT license 49 | */ 50 | 51 | /*! 52 | * jQuery JavaScript Library v3.6.0 53 | * https://jquery.com/ 54 | * 55 | * Includes Sizzle.js 56 | * https://sizzlejs.com/ 57 | * 58 | * Copyright OpenJS Foundation and other contributors 59 | * Released under the MIT license 60 | * https://jquery.org/license 61 | * 62 | * Date: 2021-03-02T17:08Z 63 | */ 64 | 65 | /*! Bootstrap integration for DataTables' Responsive 66 | * ©2015-2016 SpryMedia Ltd - datatables.net/license 67 | */ 68 | 69 | /*! DataTables 1.11.1 70 | * ©2008-2021 SpryMedia Ltd - datatables.net/license 71 | */ 72 | 73 | /*! DataTables Bootstrap 3 integration 74 | * ©2011-2015 SpryMedia Ltd - datatables.net/license 75 | */ 76 | 77 | /*! Responsive 2.2.9 78 | * 2014-2021 SpryMedia Ltd - datatables.net/license 79 | */ 80 | 81 | /** 82 | * @license 83 | * Lodash 84 | * Copyright OpenJS Foundation and other contributors 85 | * Released under MIT license 86 | * Based on Underscore.js 1.8.3 87 | * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors 88 | */ 89 | -------------------------------------------------------------------------------- /public/js/ucwords.js: -------------------------------------------------------------------------------- 1 | // http://www.jquery4u.com/events/capitalize-letter-word-keypress/ 2 | 3 | //usage 4 | // $("input").keyup(function() { 5 | // tch(this); 6 | // }); 7 | 8 | 9 | //////////////////////////////////////////////////////////////////////////////////// 10 | // Title Case Helper 11 | function tch(obj) { 12 | var mystring = obj.value; 13 | var sp = mystring.split(' '); 14 | var wl=0; 15 | var f ,r; 16 | var word = new Array(); 17 | for (i = 0 ; i < sp.length ; i ++ ) { 18 | f = sp[i].substring(0,1).toUpperCase(); 19 | r = sp[i].substring(1).toLowerCase(); 20 | word[i] = f+r; 21 | } 22 | newstring = word.join(' '); 23 | obj.value = newstring; 24 | return true; 25 | } 26 | 27 | //////////////////////////////////////////////////////////////////////////////////// 28 | // lower case helper 29 | function lch(obj) { 30 | var mystring = obj.value; 31 | var sp = mystring.split(' '); 32 | var wl=0; 33 | var f ,r; 34 | var word = new Array(); 35 | for (i = 0 ; i < sp.length ; i ++ ) { 36 | f = sp[i].substring(0,1).toLowerCase(); 37 | r = sp[i].substring(1).toLowerCase(); 38 | word[i] = f+r; 39 | } 40 | newstring = word.join(' '); 41 | obj.value = newstring; 42 | return true; 43 | } 44 | 45 | /////////////////////////////////////////////////////////////////////////////////////// 46 | // UPPER CASE HELPER 47 | function uch(obj) { 48 | var mystring = obj.value; 49 | var sp = mystring.split(' '); 50 | var wl=0; 51 | var f ,r; 52 | var word = new Array(); 53 | for (i = 0 ; i < sp.length ; i ++ ) { 54 | f = sp[i].substring(0,1).toUpperCase(); 55 | r = sp[i].substring(1).toUpperCase(); 56 | word[i] = f+r; 57 | } 58 | newstring = word.join(' '); 59 | obj.value = newstring; 60 | return true; 61 | } 62 | /////////////////////////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /public/mix-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "/js/app.js": "/js/app.js", 3 | "/css/app.css": "/css/app.css" 4 | } 5 | -------------------------------------------------------------------------------- /public/readme.txt: -------------------------------------------------------------------------------- 1 | Thanks for downloading this theme! 2 | 3 | Theme Name: Knight 4 | Theme URL: https://bootstrapmade.com/knight-free-bootstrap-theme/ 5 | Author: BootstrapMade 6 | Author URL: https://bootstrapmade.com -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # About Laravel-Invoice 2 | Created to help me for the commission to my staff and to keep track of the products, sales and some other things. 3 | This is an invoice system based on laravel 5.4 using mysql. im trying not to make it scroll side by side or scrolling right or left cos im not using "table" for the invoice part i.e adding or removing invoice item. the invoice page was running perfectly according to me.. :D 4 | 5 | ## Features: 6 | 7 | - Print invoices 8 | - Graphs 9 | - Customers list 10 | - Invoices manament 11 | - Product manament 12 | 13 | ## Installation 14 | Current Laravel version suported 5.8 15 | - 1 Import the lastest DB version from _database/versions_ 16 | - 2 `` composer update`` 17 | - 3 ``npm install`` 18 | 19 | ### Login info. 20 | |Username|Password|Role| 21 | |--|--|--| 22 | |dhiauddin|123123|admin| 23 | |fatihah|123123|staff| 24 | 25 | 26 | ## Enhances 27 | I've got a few idea on this partial project such as : 28 | 1. Daily income and expenses for the individual, family or/and organisations (a very simple one that is and easy to operate and understand) 29 | 30 | 31 | ## More info. 32 | contact me if u r interested to make something awesome! @kroos -------------------------------------------------------------------------------- /resources/assets/js/app.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * First we will load all of this project's JavaScript dependencies which 4 | * includes Vue and other libraries. It is a great starting point when 5 | * building robust, powerful web applications using Vue and Laravel. 6 | */ 7 | 8 | require('./bootstrap'); 9 | require('./jquery-minicolors'); 10 | require('./bootstrapvalidator'); 11 | require('./jquery-chained'); 12 | require('./select2'); 13 | require('./datatables.net'); 14 | require('./bootstrap-datepicker'); 15 | require('./jquery.cookie'); 16 | require('./sweetalert2'); 17 | -------------------------------------------------------------------------------- /resources/assets/js/bootstrap-datepicker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * We'll load jQuery and the formvalidation jQuery plugin which provides support 3 | * for JavaScript based formvalidation features such as modals and tabs. This 4 | * code may be modified to fit the specific needs of your application. 5 | */ 6 | 7 | try { 8 | window.$ = window.jQuery = 9 | 10 | require('jquery'); 11 | require('bootstrap-datepicker'); 12 | } catch (e) {} -------------------------------------------------------------------------------- /resources/assets/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | try { 11 | window.$ = window.jQuery = require('jquery'); 12 | 13 | require('bootstrap-sass'); 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 | * Next we will register the CSRF Token as a common header with Axios so that 28 | * all outgoing HTTP requests automatically have it attached. This is just 29 | * a simple convenience so we don't have to attach every token manually. 30 | */ 31 | 32 | let token = document.head.querySelector('meta[name="csrf-token"]'); 33 | 34 | if (token) { 35 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; 36 | } else { 37 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); 38 | } 39 | 40 | /** 41 | * Echo exposes an expressive API for subscribing to channels and listening 42 | * for events that are broadcast by Laravel. Echo and event broadcasting 43 | * allows your team to easily build robust real-time web applications. 44 | */ 45 | 46 | // import Echo from 'laravel-echo' 47 | 48 | // window.Pusher = require('pusher-js'); 49 | 50 | // window.Echo = new Echo({ 51 | // broadcaster: 'pusher', 52 | // key: process.env.MIX_PUSHER_APP_KEY, 53 | // cluster: process.env.MIX_PUSHER_APP_CLUSTER, 54 | // encrypted: true 55 | // }); -------------------------------------------------------------------------------- /resources/assets/js/bootstrapvalidator.js: -------------------------------------------------------------------------------- 1 | /** 2 | * We'll load jQuery and the formvalidation jQuery plugin which provides support 3 | * for JavaScript based formvalidation features such as modals and tabs. This 4 | * code may be modified to fit the specific needs of your application. 5 | */ 6 | 7 | try { 8 | window.$ = window.jQuery = 9 | 10 | require('jquery'); 11 | require('bootstrapvalidator'); 12 | } catch (e) {} -------------------------------------------------------------------------------- /resources/assets/js/datatables.net.js: -------------------------------------------------------------------------------- 1 | /** 2 | * We'll load jQuery and the formvalidation jQuery plugin which provides support 3 | * for JavaScript based formvalidation features such as modals and tabs. This 4 | * code may be modified to fit the specific needs of your application. 5 | */ 6 | 7 | try { 8 | window.$ = window.jQuery = 9 | 10 | require('jquery'); 11 | require('datatables.net'); 12 | require('datatables.net-bs'); 13 | require('datatables.net-responsive'); 14 | require('datatables.net-responsive-bs'); 15 | } catch (e) {} -------------------------------------------------------------------------------- /resources/assets/js/jquery-chained.js: -------------------------------------------------------------------------------- 1 | /** 2 | * We'll load jQuery and the formvalidation jQuery plugin which provides support 3 | * for JavaScript based formvalidation features such as modals and tabs. This 4 | * code may be modified to fit the specific needs of your application. 5 | */ 6 | 7 | try { 8 | window.$ = window.jQuery = 9 | 10 | require('jquery'); 11 | require('jquery-chained/jquery.chained.js'); 12 | } catch (e) {} -------------------------------------------------------------------------------- /resources/assets/js/jquery-minicolors.js: -------------------------------------------------------------------------------- 1 | 2 | window._ = require('lodash'); 3 | 4 | /** 5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support 6 | * for JavaScript based Bootstrap features such as modals and tabs. This 7 | * code may be modified to fit the specific needs of your application. 8 | */ 9 | 10 | window.$ = window.jQuery = require('jquery'); 11 | 12 | require('@claviska/jquery-minicolors'); 13 | -------------------------------------------------------------------------------- /resources/assets/js/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /** 2 | * We'll load jQuery and the formvalidation jQuery plugin which provides support 3 | * for JavaScript based formvalidation features such as modals and tabs. This 4 | * code may be modified to fit the specific needs of your application. 5 | */ 6 | 7 | try { 8 | window.$ = window.jQuery = 9 | 10 | require('jquery'); 11 | require('jquery.cookie'); 12 | } catch (e) {} -------------------------------------------------------------------------------- /resources/assets/js/select2.js: -------------------------------------------------------------------------------- 1 | /** 2 | * We'll load jQuery and the formvalidation jQuery plugin which provides support 3 | * for JavaScript based formvalidation features such as modals and tabs. This 4 | * code may be modified to fit the specific needs of your application. 5 | */ 6 | 7 | try { 8 | window.$ = window.jQuery = 9 | 10 | require('jquery'); 11 | require('select2'); 12 | } catch (e) {} -------------------------------------------------------------------------------- /resources/assets/js/sweetalert2.js: -------------------------------------------------------------------------------- 1 | /** 2 | * We'll load jQuery and the sweetalert2 jQuery plugin which provides support 3 | * for JavaScript based sweetalert2 features such as modals and tabs. This 4 | * code may be modified to fit the specific needs of your application. 5 | */ 6 | 7 | // not jquery dependency 8 | try { 9 | window.swal = require('sweetalert2'); 10 | } catch (e) {} -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | 2 | // Fonts 3 | @import url(https://fonts.googleapis.com/css?family=Sanchez:300,400,600); 4 | 5 | // Bootstrap 6 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 7 | 8 | 9 | // Style 10 | body { 11 | font-family: 'Sanchez', serif; 12 | font-size: 15px; 13 | background-color: lightblue; 14 | padding-top: 105px; 15 | } 16 | h1 { 17 | color: darkblue; 18 | text-align: center; 19 | font-size: 48px; 20 | } 21 | p { 22 | 23 | } 24 | .back { 25 | background-color: #fff; 26 | color: #000; 27 | } 28 | .page-footer { 29 | text-align: right; 30 | font-size: 11px; 31 | border-top: 1px solid #D0D0D0; 32 | line-height: 32px; 33 | padding: 0 10px 0 10px; 34 | margin: 20px 0 0 0; 35 | } 36 | .info { 37 | color: red; 38 | } 39 | .col-centered{ 40 | float: none; 41 | margin: 0 auto; 42 | } 43 | 44 | 45 | // font awesome 4 46 | @import "~font-awesome/scss/font-awesome"; 47 | 48 | // select2 themes default 49 | 50 | // select2 bootstrap css 51 | @import '~select2/src/scss/core'; 52 | @import "~select2-bootstrap-css/lib/select2-bootstrap"; 53 | @import "~select2/src/scss/theme/default/layout"; 54 | 55 | // sweetalert2 56 | //@import '~sweetalert2/src/sweetalert2'; 57 | -------------------------------------------------------------------------------- /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 six 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/views/auth/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | 5 | @include('layout.errorform') 6 | @include('layout.info') 7 | 8 |
9 |
10 |
Home
11 |
12 |

WELCOME TO INVOICE SYSTEM MANAGEMENT

13 |

To begin, please login.

14 |
15 |
16 |
17 | 18 | 19 | @endsection 20 | 21 | 22 | @section('jquery') 23 | @endsection -------------------------------------------------------------------------------- /resources/views/auth/passwords/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | 5 | @include('layout.errorform') 6 | @include('layout.info') 7 | 8 | @if (session('status')) 9 |
10 | {{ session('status') }} 11 |
12 | @endif 13 | 14 |
15 |
Reset Password
16 |
17 | {!! Form::open(['route' => 'password.request', 'id' => 'form', 'class' => 'form-horizontal']) !!} 18 | {!! Form::hidden('token', $token) !!} 19 |
20 | {!! Form::label('na', 'Email :', ['class' => 'col-sm-2 control-label']) !!} 21 |
22 | {!! Form::text('email', @$value, ['class' => 'form-control', 'id' => 'na', 'placeholder' => 'Email', 'autocomplete' => 'off']) !!} 23 |
24 |
25 | 26 |
27 | {!! Form::label('nap', 'Password :', ['class' => 'col-sm-2 control-label']) !!} 28 |
29 | {!! Form::input('password', 'password', @$value, ['class' => 'form-control', 'id' => 'nap', 'placeholder' => 'Password']) !!} 30 |
31 |
32 | 33 |
34 | {!! Form::label('napq', 'Password Confirmation :', ['class' => 'col-sm-2 control-label']) !!} 35 |
36 | {!! Form::input('password', 'password_confirmation', @$value, ['class' => 'form-control', 'id' => 'napq', 'placeholder' => 'Password Confirmation']) !!} 37 |
38 |
39 | 40 |
41 | {!! Form::submit('Reset', ['class' => 'btn btn-primary btn-lg btn-block']) !!} 42 |
43 | 44 | {!! Form::close() !!} 45 |
46 | 47 | 48 | @endsection 49 | 50 | 51 | @section('jquery') 52 | 53 | 54 | 55 | 56 | //////////////////////////////////////////////////////////////////////////////////// 57 | // bootstrap validator 58 | $("#form").bootstrapValidator({ 59 | feedbackIcons: { 60 | valid: 'glyphicon glyphicon-ok', 61 | invalid: 'glyphicon glyphicon-remove', 62 | validating: 'glyphicon glyphicon-refresh' 63 | }, 64 | fields: { 65 | email: { 66 | validators: { 67 | notEmpty: { 68 | message: 'Please insert your email ' 69 | }, 70 | regexp: { 71 | regexp: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, 72 | message: ' Please insert your valid email address' 73 | }, 74 | } 75 | }, 76 | password: { 77 | validators: { 78 | notEmpty: { 79 | message: 'Please insert your password. ' 80 | }, 81 | regexp: { 82 | regexp: /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,16}$/, 83 | message: 'Passwords are 8-16 characters with uppercase letters, lowercase letters and at least one number. ' 84 | }, 85 | } 86 | }, 87 | password_confirmation: { 88 | validators: { 89 | notEmpty: { 90 | message: 'Please insert your confirmation password. ' 91 | }, 92 | identical: { 93 | field: 'password', 94 | message: 'The password and its confirmation are not the same. ' 95 | } 96 | } 97 | }, 98 | } 99 | }) 100 | 101 | //////////////////////////////////////////////////////////////////////////////////// 102 | @endsection -------------------------------------------------------------------------------- /resources/views/banks/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 | {!! Form::open(['route' => 'banks.store', 'class' => 'form-horizontal']) !!} 8 |
9 |
10 |
11 |
Add Bank
12 |
13 |
14 |
15 | {!! Form::label('cate', 'Name :', ['class' => 'col-sm-2 control-label']) !!} 16 |
17 | {!! Form::input('text', 'bank', @$value, ['class' => 'form-control', 'placeholder' => 'Name', 'id' => 'cate']) !!} 18 |
19 |
20 |
21 | {!! Form::label('cit', 'City :', ['class' => 'col-sm-2 control-label']) !!} 22 |
23 | {!! Form::input('text', 'city', @$value, ['class' => 'form-control', 'placeholder' => 'City', 'id' => 'cit']) !!} 24 |
25 |
26 |
27 | {!! Form::label('scode', 'Swift Code :', ['class' => 'col-sm-2 control-label']) !!} 28 |
29 | {!! Form::input('text', 'swift_code', @$value, ['class' => 'form-control', 'placeholder' => 'Swift Code', 'id' => 'scode']) !!} 30 |
31 |
32 |
33 | {!! Form::label('acc', 'Account :', ['class' => 'col-sm-2 control-label']) !!} 34 |
35 | {!! Form::input('text', 'account', @$value, ['class' => 'form-control', 'placeholder' => 'Account', 'id' => 'acc']) !!} 36 |
37 |
38 | 39 |
40 |
41 |
42 | 45 |
46 |
47 |
48 |
49 |
50 | {!! Form::submit('Save', ['class' => 'btn btn-primary btn-lg btn-block']) !!} 51 |
52 |
53 |
54 | {!! Form::close() !!} 55 | 56 |
57 |
58 |
59 |
60 | @endsection 61 | 62 | 63 | @section('jquery') 64 | $("input").keyup(function() { 65 | toUppercase(this); 66 | }); 67 | 68 | function toUppercase(obj) { 69 | var mystring = obj.value; 70 | var sp = mystring.split(' '); 71 | var wl=0; 72 | var f ,r; 73 | var word = new Array(); 74 | for (i = 0 ; i < sp.length ; i ++ ) { 75 | f = sp[i].substring(0,1).toUpperCase(); 76 | r = sp[i].substring(1).toUpperCase(); 77 | word[i] = f+r; 78 | } 79 | newstring = word.join(' '); 80 | obj.value = newstring; 81 | return true; 82 | } 83 | @endsection -------------------------------------------------------------------------------- /resources/views/banks/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 |
8 |
9 |
Banks and Financial Institutions
10 |
11 |
12 | 13 | {!! Form::model($banks, ['route' => ['banks.update', $banks->id], 'method' => 'PATCH', 'class' => 'form-horizontal', 'autocomplete' => 'off']) !!} 14 | 15 |
16 | {!! Form::label('commission', 'Bank :', ['class' => 'col-sm-2 control-label']) !!} 17 |
18 | {!! Form::input('text', 'bank', $banks->bank, ['class' => 'form-control', 'placeholder' => 'Bank', 'id' => 'commission']) !!} 19 |
20 |
21 | 22 |
23 | {!! Form::label('city', 'City :', ['class' => 'col-sm-2 control-label']) !!} 24 |
25 | {!! Form::input('text', 'city', $banks->city, ['class' => 'form-control', 'placeholder' => 'City', 'id' => 'city']) !!} 26 |
27 |
28 | 29 |
30 | {!! Form::label('swift_code', 'Swift Code :', ['class' => 'col-sm-2 control-label']) !!} 31 |
32 | {!! Form::input('text', 'swift_code', $banks->swift_code, ['class' => 'form-control', 'placeholder' => 'Swift Code', 'id' => 'swift_code']) !!} 33 |
34 |
35 | 36 |
37 | {!! Form::label('account', 'Account Number :', ['class' => 'col-sm-2 control-label']) !!} 38 |
39 | {!! Form::input('text', 'account', $banks->account, ['class' => 'form-control', 'placeholder' => 'No. Account', 'id' => 'account']) !!} 40 |
41 |
42 | 43 |
44 |
45 |

{!! Form::submit('Save', ['class' => 'btn btn-primary btn-lg btn-block']) !!}

46 |
47 |
48 | {!! Form::close() !!} 49 | 50 |
51 |
52 |
53 |
54 | 55 | @endsection 56 | 57 | 58 | @section('jquery') 59 | //////////////////////////////////////////////////////////////////////////////////// 60 | // uppercase input for tracking number and customer section 61 | 62 | $(document).on('keyup', 'input', function () { 63 | toUppercase(this); 64 | }); 65 | 66 | function toUppercase(obj) { 67 | var mystring = obj.value; 68 | var sp = mystring.split(' '); 69 | var wl=0; 70 | var f ,r; 71 | var word = new Array(); 72 | for (i = 0 ; i < sp.length ; i ++ ) { 73 | f = sp[i].substring(0,1).toUpperCase(); 74 | r = sp[i].substring(1).toUpperCase(); 75 | word[i] = f+r; 76 | } 77 | newstring = word.join(' '); 78 | obj.value = newstring; 79 | return true; 80 | } 81 | @endsection -------------------------------------------------------------------------------- /resources/views/banks/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 |
8 |
9 |
Banks and Financial Institutions
10 |
11 |

New Bank

12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | @foreach($inv as $in) 28 | 29 | 30 | 31 | 32 | 33 | 36 | 39 | 40 | @endforeach 41 | 42 |
bankcityswift codeaccount numberactiveedit
{!! $in->bank !!}{!! $in->city !!}{!! $in->swift_code !!}{!! $in->account !!} 34 | active == 1)?'active':'inactive' ?> 35 | 37 | 38 |
43 | 44 |
45 |
46 |
47 |
48 | 49 | @endsection 50 | 51 | 52 | @section('jquery') 53 | 54 | @endsection -------------------------------------------------------------------------------- /resources/views/category/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 |
8 |

9 | Back to category 10 |

11 |
12 | 13 | {!! Form::model($productCategory, [ 'route' => ['category.update', $productCategory->id], 'method' => 'PATCH', 'class' => 'form-horizontal' ]) !!} 14 | 15 |
16 |
17 |
Edit Product Category
18 |
19 |
20 |
21 | {!! Form::label('cate', 'Category :', ['class' => 'col-sm-2 control-label']) !!} 22 |
23 | {!! Form::text('category', $productCategory->product_category, ['class' => 'form-control', 'placeholder' => 'Category', 'id' => 'cate']) !!} 24 |
25 |
26 |
27 |
28 |
29 | 32 |
33 |
34 |
35 |
36 |
37 | {!! Form::submit('Update', ['class' => 'btn btn-primary btn-lg btn-block']) !!} 38 |
39 |
40 | {!! Form::close() !!} 41 |
42 |
43 |
44 |
45 | 46 | @endsection 47 | 48 | 49 | @section('jquery') 50 | $("input").keyup(function() { 51 | tch(this); 52 | }); 53 | @endsection -------------------------------------------------------------------------------- /resources/views/customers/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 |
8 |

9 | Back to customers list 10 |

11 |
12 | 13 | {!! Form::model($customers, [ 'route' => ['customers.update', $customers->id], 'method' => 'PATCH', 'class' => 'form-horizontal', 'autocomplete' => 'off']) !!} 14 | 15 |
16 |
17 |
Edit Customer
18 |
19 |
20 |
21 |
22 | {!! Form::label('pel', 'Customer :', ['class' => 'col-sm-2 control-label']) !!} 23 |
24 | {!! Form::input('text', 'client', @$value, ['class' => 'form-control', 'placeholder' => 'Customer', 'id' => 'pel']) !!} 25 |
26 |
27 |
28 | {!! Form::label('apel', 'Customer Address :', ['class' => 'col-sm-2 control-label']) !!} 29 |
30 | {!! Form::textarea('client_address', @$value, ['class' => 'form-control', 'placeholder' => 'Customer Address', 'id' => 'apel']) !!} 31 |
32 |
33 |
34 | {!! Form::label('pos', 'Postcode :', ['class' => 'col-sm-2 control-label']) !!} 35 |
36 | {!! Form::input('text', 'client_poskod', @$value, ['class' => 'form-control', 'placeholder' => 'Postcode', 'id' => 'pos']) !!} 37 |
38 |
39 |
40 | {!! Form::label('tel', 'Phone :', ['class' => 'col-sm-2 control-label']) !!} 41 |
42 | {!! Form::input('text', 'client_phone', @$value, ['class' => 'form-control', 'placeholder' => 'Phone', 'id' => 'tel']) !!} 43 |
44 |
45 |
46 | {!! Form::label('tela', 'Email :', ['class' => 'col-sm-2 control-label']) !!} 47 |
48 | {!! Form::input('text', 'client_email', @$value, ['class' => 'form-control', 'placeholder' => 'Email', 'id' => 'tela']) !!} 49 |
50 |
51 |
52 |
53 |

{!! Form::submit('Update', ['class' => 'btn btn-primary btn-lg btn-block']) !!}

54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 | @endsection 63 | 64 | 65 | @section('jquery') 66 | //////////////////////////////////////////////////////////////////////////////////// 67 | // ucwords input 68 | $(document).on('keyup', '#pel', function () { 69 | // $("input").keyup(function() { 70 | tch(this); 71 | }); 72 | 73 | //////////////////////////////////////////////////////////////////////////////////// 74 | // uppercase input for tracking number and customer section 75 | $(document).on('keyup', '#apel, #catel', function () { 76 | uch(this); 77 | }); 78 | 79 | //////////////////////////////////////////////////////////////////////////////////// 80 | @endsection -------------------------------------------------------------------------------- /resources/views/customers/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 |
8 |
9 |
Customers List
10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | user()->id_group == 1 ) { 25 | $inv = App\Customers::withTrashed()->get(); 26 | } else { 27 | $inv = App\Customers::all(); 28 | } 29 | 30 | $inv = App\Customers::all(); 31 | ?> 32 | @foreach($inv as $in) 33 | 34 | 35 | 36 | 37 | 38 | 39 | 43 | 44 | @endforeach 45 | 46 |
customeraddresspostcodephoneemailaction
{!! $in->client !!}{!! $in->client_address !!}{!! $in->client_postcode !!}{!! $in->client_phone !!}{!! $in->client_email !!} 40 | 41 | 42 |
47 | 48 |
49 |
50 |
51 |
52 | 53 | @endsection 54 | 55 | 56 | @section('jquery') 57 | ///////////////////////////////////////////////////////////////////////////////////////// 58 | // ajax post delete row 59 | // readProducts(); /* it will load products when document loads */ 60 | 61 | $(document).on('click', '.delete_button', function(e){ 62 | var productId = $(this).data('id'); 63 | SwalDelete(productId); 64 | e.preventDefault(); 65 | }); 66 | 67 | // function readProducts(){ 68 | // $('#load-products').load('read.php'); 69 | // } 70 | 71 | function SwalDelete(productId){ 72 | swal.fire({ 73 | title: 'Are you sure?', 74 | text: "It will be deleted permanently!", 75 | type: 'warning', 76 | showCancelButton: true, 77 | confirmButtonColor: '#3085d6', 78 | cancelButtonColor: '#d33', 79 | confirmButtonText: 'Yes, delete it!', 80 | showLoaderOnConfirm: true, 81 | allowOutsideClick: false, 82 | 83 | preConfirm: function(){ 84 | return new Promise(function(resolve) { 85 | $.ajax({ 86 | headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')}, 87 | url: 'id)?>', 88 | type: 'delete', 89 | data: { 90 | id: productId, 91 | _token : $('meta[name=csrf-token]').attr('content') 92 | }, 93 | dataType: 'json' 94 | }) 95 | .done(function(response){ 96 | swal.fire('Deleted!', response.message, response.status); 97 | // readProducts(); 98 | // $('#delete_product_' + productId).text('imhere').css({"color": "red"}); 99 | $('#delete_product_' + productId).parent().parent().remove(); 100 | }) 101 | .fail(function(){ 102 | swal.fire('Oops...', 'Something went wrong with ajax !', 'error'); 103 | }); 104 | console.log() 105 | }); 106 | }, 107 | }); 108 | } 109 | 110 | ///////////////////////////////////////////////////////////////////////////////////////// 111 | @endsection -------------------------------------------------------------------------------- /resources/views/email/contactus.blade.php: -------------------------------------------------------------------------------- 1 | @component('mail::message') 2 | # Introduction 3 | 4 | Hi there, 5 | 6 | I am {!! $request->name !!}. 7 | 8 | {!! $request->message !!} 9 | 10 | 11 | Thanks,
12 | {{ $request->name }} 13 | @endcomponent 14 | -------------------------------------------------------------------------------- /resources/views/email/invoice.blade.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | @component('mail::message') 9 | 10 | $sales->id])->first(); 13 | $client = Customers::findOrFail($scust->id_customer); 14 | $filename = 'Invoice for '.$client->client.'.pdf'; 15 | 16 | // resolve sender i.e company 17 | $comp = Preferences::find(1); 18 | $sender = $comp->company_name; 19 | $sender_email = strtolower($comp->company_email); 20 | 21 | $coowner = User::where(['id' => $comp->company_owner])->first(); 22 | 23 | ?> 24 | 25 | # Hi {!! $client->client !!}. 26 | 27 | Thank you for giving {!! $sender !!} the opportunity to serve you. 28 | 29 | Enclosed is our invoice for your purchase. 30 | 31 | Please let us know if you have any questions regarding this invoice. We look forward to serve you in the future. 32 | 33 | Regards, 34 | 35 | {!! ucwords(strtolower($coowner->name)) !!} 36 | 37 | 38 | encl: {!! $filename !!} 39 | 40 | Thanks,
41 | {{ config('app.name') }} 42 | @endcomponent 43 | -------------------------------------------------------------------------------- /resources/views/forgotpassword/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | 5 | @include('layout.errorform') 6 | @include('layout.info') 7 | 8 | @if (session('status')) 9 |
10 | {{ session('status') }} 11 |
12 | @endif 13 | 14 |
15 |
Forgot Password
16 |
17 | {!! Form::open(['route' => 'password.email', 'class' => 'form-horizontal', 'id' => 'form']) !!} 18 |
19 | {!! Form::label('na', 'Email :', ['class' => 'col-sm-2 control-label']) !!} 20 |
21 | {!! Form::text('email', @$value, ['class' => 'form-control', 'id' => 'na', 'placeholder' => 'Email']) !!} 22 |
23 |
24 | 25 |
26 | {!! Form::submit('Send Password Reset Link', ['class' => 'btn btn-primary btn-lg btn-block']) !!} 27 |
28 | 29 | {!! Form::close() !!} 30 |
31 | 32 | 33 | @endsection 34 | 35 | 36 | @section('jquery') 37 | 38 | $("#na").keyup(function() { 39 | lch(this); 40 | }); 41 | 42 | //////////////////////////////////////////////////////////////////////////////////// 43 | // bootstrap validator 44 | $("#form").bootstrapValidator({ 45 | feedbackIcons: { 46 | valid: 'glyphicon glyphicon-ok', 47 | invalid: 'glyphicon glyphicon-remove', 48 | validating: 'glyphicon glyphicon-refresh' 49 | }, 50 | fields: { 51 | email: { 52 | validators: { 53 | notEmpty: { 54 | message: 'Please insert your email ' 55 | }, 56 | regexp: { 57 | regexp: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, 58 | message: ' Please insert your valid email address' 59 | }, 60 | } 61 | }, 62 | } 63 | }) 64 | 65 | //////////////////////////////////////////////////////////////////////////////////// 66 | @endsection -------------------------------------------------------------------------------- /resources/views/layout/errorform.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | @if(count($errors) > 0 ) 4 |
    5 | @foreach($errors->all() as $err) 6 |
  • 7 | {!! $err !!} 8 |
  • 9 | @endforeach 10 |
11 | @endif 12 |
13 |
-------------------------------------------------------------------------------- /resources/views/layout/gnav.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 74 | -------------------------------------------------------------------------------- /resources/views/layout/info.blade.php: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | @if(Session::has('flash_message')) 5 |
6 | {{ Session::get('flash_message') }} 7 |
8 | @endif 9 |
10 |
-------------------------------------------------------------------------------- /resources/views/layout/jscript.blade.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /resources/views/layout/master.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {{ config('app.name') }} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | @include('layout.gnav') 32 | 33 |
34 |
35 |
36 | @section('content') 37 | @show 38 |
39 | 42 |
43 |
44 | 45 | @include('layout.jscript') 46 | 47 | 48 | -------------------------------------------------------------------------------- /resources/views/productimage/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | id_product) ?> 5 | 6 | @include('layout.errorform') 7 | @include('layout.info') 8 | 9 | {!! Form::model($productImage, ['route' => ['productimage.update',$productImage->id], 'method' => 'PATCH', 'class' => 'form-horizontal', 'files' => true]) !!} 10 | 11 | 12 |
13 |
Edit Image for {!! $rt->product !!}
14 |
15 | 16 |
17 | {!! Form::label('img', 'Image :', ['class' => 'col-sm-2 control-label']) !!} 18 |
19 | {!! Form::file('image', ['id' => 'img']) !!} 20 |
21 |
22 | 23 |
24 |
25 | {!! Form::submit('Update', ['class' => 'btn btn-primary btn-lg btn-block']) !!} 26 |
27 |
28 | {!! Form::close() !!} 29 |
30 |
31 | 32 | @endsection 33 | 34 | 35 | @section('jquery') 36 | ///////////////////////////////////////////////////////////////////////////////////////// 37 | $("input").keyup(function() { 38 | tch(this); 39 | }); 40 | 41 | ///////////////////////////////////////////////////////////////////////////////////////// 42 | 43 | 44 | 45 | @endsection -------------------------------------------------------------------------------- /resources/views/taxes/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 |
8 |
9 |
10 |
11 |
Add Tax
12 |
13 | {!! Form::open(['route' => 'taxes.store', 'class' => 'form-horizontal', 'autocomplete' => 'off']) !!} 14 |
15 | {!! Form::label('pr', 'Tax :', ['class' => 'col-sm-2 control-label']) !!} 16 |
17 | {!! Form::input('text', 'tax', @$value, ['class' => 'form-control', 'placeholder' => 'Tax', 'id' => 'pr']) !!} 18 |
19 |
20 | 21 |
22 | {!! Form::label('co', 'Amount :', ['class' => 'col-sm-2 control-label']) !!} 23 |
24 | {!! Form::input('text', 'amount', @$value, ['class' => 'form-control', 'placeholder' => 'Amount in Percent', 'id' => 'co']) !!} 25 |
26 |
27 | 28 |
29 |
30 | {!! Form::submit('Save', ['class' => 'btn btn-primary btn-lg btn-block']) !!} 31 |
32 |
33 | {!! Form::close() !!} 34 |
35 |
36 |
37 |
38 | 39 | @endsection 40 | 41 | 42 | @section('jquery') 43 | $(document).on('keyup', 'input', function () { 44 | toUppercase(this); 45 | }); 46 | 47 | function toUppercase(obj) { 48 | var mystring = obj.value; 49 | var sp = mystring.split(' '); 50 | var wl=0; 51 | var f ,r; 52 | var word = new Array(); 53 | for (i = 0 ; i < sp.length ; i ++ ) { 54 | f = sp[i].substring(0,1).toUpperCase(); 55 | r = sp[i].substring(1).toUpperCase(); 56 | word[i] = f+r; 57 | } 58 | newstring = word.join(' '); 59 | obj.value = newstring; 60 | return true; 61 | } 62 | @endsection -------------------------------------------------------------------------------- /resources/views/taxes/edit.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 |
8 |
9 |
Taxes
10 |
11 |
12 |

Please take note that the tax amount is in the percentage.

13 | {!! Form::model($taxes, ['route' => ['taxes.update', $taxes->id], 'method' => 'PATCH', 'class' => 'form-horizontal', 'autocomplete' => 'off']) !!} 14 | 15 |
16 | {!! Form::label('commission', 'Tax Name :', ['class' => 'col-sm-2 control-label']) !!} 17 |
18 | {!! Form::input('text', 'tax', $taxes->tax, ['class' => 'form-control', 'placeholder' => 'Tax Name', 'id' => 'commission']) !!} 19 |
20 |
21 | 22 |
23 | {!! Form::label('city', 'Amount in Percentage :', ['class' => 'col-sm-2 control-label']) !!} 24 |
25 | {!! Form::input('text', 'amount', $taxes->amount, ['class' => 'form-control', 'placeholder' => 'Amount in percentage', 'id' => 'city']) !!} 26 |
27 |
28 | 29 |
30 |
31 |

{!! Form::submit('Update', ['class' => 'btn btn-primary btn-lg btn-block']) !!}

32 |
33 |
34 | {!! Form::close() !!} 35 | 36 |
37 |
38 |
39 |
40 | 41 | @endsection 42 | 43 | 44 | @section('jquery') 45 | //////////////////////////////////////////////////////////////////////////////////// 46 | // uppercase input for tracking number and customer section 47 | 48 | $(document).on('keyup', 'input', function () { 49 | toUppercase(this); 50 | }); 51 | 52 | function toUppercase(obj) { 53 | var mystring = obj.value; 54 | var sp = mystring.split(' '); 55 | var wl=0; 56 | var f ,r; 57 | var word = new Array(); 58 | for (i = 0 ; i < sp.length ; i ++ ) { 59 | f = sp[i].substring(0,1).toUpperCase(); 60 | r = sp[i].substring(1).toUpperCase(); 61 | word[i] = f+r; 62 | } 63 | newstring = word.join(' '); 64 | obj.value = newstring; 65 | return true; 66 | } 67 | @endsection -------------------------------------------------------------------------------- /resources/views/taxes/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 |
8 |
9 |
Tax List
10 |
11 |
12 |

New Tax

13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | @foreach($ta as $in) 24 | 25 | 26 | 27 | 28 | 29 | 30 | @endforeach 31 | 32 |
edittaxcharges (%)delete

Edit {!! $in->id !!}

{!! $in->tax !!}{!! $in->amount !!}

delete id?>

33 | 34 |
35 |
36 |
37 |
38 | 39 | @endsection 40 | 41 | 42 | @section('jquery') 43 | 44 | @endsection -------------------------------------------------------------------------------- /resources/views/user/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | 5 | user index page 6 | 7 | @endsection 8 | 9 | 10 | @section('jquery') 11 | $("input").keyup(function() { 12 | toUpper(this); 13 | }); 14 | @endsection -------------------------------------------------------------------------------- /resources/views/usergroup/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('layout.master') 2 | 3 | @section('content') 4 | @include('layout.errorform') 5 | @include('layout.info') 6 | 7 |
8 |
9 |
Add User Group
10 |
11 | {!! Form::open(['route' => 'usergroup.store', 'class' => 'form-horizontal']) !!} 12 |
13 | {!! Form::label('ug', 'User Group :', ['class' => 'col-sm-2 control-label']) !!} 14 |
15 | {!! Form::input('text', 'group', @$value, ['class' => 'form-control', 'placeholder' => 'User Group', 'id' => 'ug']) !!} 16 |
17 |
18 | 19 |
20 |
21 | {!! Form::submit('Save', ['class' => 'btn btn-primary btn-lg btn-block']) !!} 22 |
23 |
24 | {!! Form::close() !!} 25 |
26 |
27 |
28 | 29 |
30 |
31 |
User Groups List
32 |
33 |
34 |
35 |
36 | 37 | @if( count($ug) > 0 ) 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | @foreach ($ug as $k) 49 | 50 | 51 | 52 | 53 | @endforeach 54 | 55 |
idgroup
idgroup
{!! $k->id !!}{!! $k->group !!}
56 | @else 57 | @endif 58 |
59 |
60 |
61 |
62 |
63 |
64 | 65 | @endsection 66 | 67 | 68 | @section('jquery') 69 | $("input").keyup(function() { 70 | toUpper(this); 71 | }); 72 | @endsection -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/db.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/storage/db.db -------------------------------------------------------------------------------- /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 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.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/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/uploads/images/index.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/storage/uploads/images/index.txt -------------------------------------------------------------------------------- /storage/uploads/pdf/index.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/storage/uploads/pdf/index.txt -------------------------------------------------------------------------------- /storage/uploads/pdfimages/index.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kroos/laravel-invoice/8522108466d05b5c863a6550fb0da7407898cf93/storage/uploads/pdfimages/index.txt -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 19 | 20 | return $app; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/Feature/ExampleTest.php: -------------------------------------------------------------------------------- 1 | get('/'); 20 | 21 | $response->assertStatus(200); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | assertTrue(true); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /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/assets/js/app.js', 'public/js') 15 | .sass('resources/assets/sass/app.scss', 'public/css') 16 | .combine([ 17 | 'public/css/app.css', 18 | 'node_modules/@claviska/jquery-minicolors/jquery.minicolors.css', 19 | 'node_modules/bootstrap/dist/css/bootstrap.css', 20 | 'node_modules/bootstrap/dist/css/bootstrap-theme.css', 21 | 'node_modules/bootstrapvalidator/dist/css/bootstrapValidator.css', 22 | 'node_modules/datatables.net-bs/css/dataTables.bootstrap.css', 23 | 'node_modules/datatables.net-responsive-bs/css/responsive.bootstrap.css', 24 | 'node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker3.css', 25 | ], 'public/css/app.css') 26 | ; 27 | --------------------------------------------------------------------------------