This commit is contained in:
parent
a728ea0dc6
commit
8ce456ec7b
|
@ -4,6 +4,8 @@ namespace Modules\Product\Database\Seeders;
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Modules\Product\Entities\Category;
|
||||||
|
use Modules\Setting\Entities\Unit;
|
||||||
|
|
||||||
class ProductDatabaseSeeder extends Seeder
|
class ProductDatabaseSeeder extends Seeder
|
||||||
{
|
{
|
||||||
|
@ -16,6 +18,16 @@ class ProductDatabaseSeeder extends Seeder
|
||||||
{
|
{
|
||||||
Model::unguard();
|
Model::unguard();
|
||||||
|
|
||||||
// $this->call("OthersTableSeeder");
|
Category::create([
|
||||||
|
'category_code' => 'CA_01',
|
||||||
|
'category_name' => 'Random'
|
||||||
|
]);
|
||||||
|
|
||||||
|
Unit::create([
|
||||||
|
'name' => 'Piece',
|
||||||
|
'short_name' => 'PC',
|
||||||
|
'operator' => '*',
|
||||||
|
'operation_value' => 1
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,8 +71,8 @@ class CategoriesController extends Controller
|
||||||
|
|
||||||
$category = Category::findOrFail($id);
|
$category = Category::findOrFail($id);
|
||||||
|
|
||||||
if ($category->products()->isNotEmpty()) {
|
if ($category->products()->exists()) {
|
||||||
return back()->withErrors('Can\'t delete beacuse there are products associated with this category.');
|
return back()->withErrors('Can\'t delete because there are products associated with this category.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$category->delete();
|
$category->delete();
|
||||||
|
|
|
@ -38,34 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Create Modal -->
|
<!-- Create Modal -->
|
||||||
<div class="modal fade" id="categoryCreateModal" tabindex="-1" role="dialog" aria-labelledby="categoryCreateModal" aria-hidden="true">
|
@include('product::includes.category-modal')
|
||||||
<div class="modal-dialog" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h5 class="modal-title" id="categoryCreateModalLabel">Create Category</h5>
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<form action="{{ route('product-categories.store') }}" method="POST">
|
|
||||||
@csrf
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="category_code">Category Code <span class="text-danger">*</span></label>
|
|
||||||
<input class="form-control" type="text" name="category_code" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="category_name">Category Name <span class="text-danger">*</span></label>
|
|
||||||
<input class="form-control" type="text" name="category_name" required>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="submit" class="btn btn-primary">Create <i class="bi bi-check"></i></button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@push('page_scripts')
|
@push('page_scripts')
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
@php
|
||||||
|
$category_max_id = \Modules\Product\Entities\Category::max('id') + 1;
|
||||||
|
$category_code = "CA_" . str_pad($category_max_id, 2, '0', STR_PAD_LEFT)
|
||||||
|
@endphp
|
||||||
|
<div class="modal fade" id="categoryCreateModal" tabindex="-1" role="dialog" aria-labelledby="categoryCreateModal" aria-hidden="true">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="categoryCreateModalLabel">Create Category</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<form action="{{ route('product-categories.store') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="category_code">Category Code <span class="text-danger">*</span></label>
|
||||||
|
<input class="form-control" type="text" name="category_code" required value="{{ $category_code }}">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="category_name">Category Name <span class="text-danger">*</span></label>
|
||||||
|
<input class="form-control" type="text" name="category_name" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" class="btn btn-primary">Create <i class="bi bi-check"></i></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -41,14 +41,19 @@
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<label for="category_id">Category <span class="text-danger">*</span></label>
|
||||||
<label for="category_id">Category <span class="text-danger">*</span></label>
|
<div class="input-group">
|
||||||
<select class="form-control" name="category_id" id="category_id" required>
|
<select class="form-control" name="category_id" id="category_id" required>
|
||||||
<option value="" selected disabled>Select Category</option>
|
<option value="" selected disabled>Select Category</option>
|
||||||
@foreach(\Modules\Product\Entities\Category::all() as $category)
|
@foreach(\Modules\Product\Entities\Category::all() as $category)
|
||||||
<option value="{{ $category->id }}">{{ $category->category_name }}</option>
|
<option value="{{ $category->id }}">{{ $category->category_name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
<div class="input-group-append d-flex">
|
||||||
|
<button data-toggle="modal" data-target="#categoryCreateModal" class="btn btn-outline-primary" type="button">
|
||||||
|
Add
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
@ -60,7 +65,7 @@
|
||||||
<option value="C39">Code 39</option>
|
<option value="C39">Code 39</option>
|
||||||
<option value="UPCA">UPC-A</option>
|
<option value="UPCA">UPC-A</option>
|
||||||
<option value="UPCE">UPC-E</option>
|
<option value="UPCE">UPC-E</option>
|
||||||
<option value="EAN13">EAN-13</option><option value="EAN8">EAN-8</option>
|
<option selected value="EAN13">EAN-13</option><option value="EAN8">EAN-8</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -91,7 +96,7 @@
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="product_stock_alert">Alert Quantity <span class="text-danger">*</span></label>
|
<label for="product_stock_alert">Alert Quantity <span class="text-danger">*</span></label>
|
||||||
<input type="number" class="form-control" name="product_stock_alert" required value="{{ old('product_stock_alert') }}" min="0" max="100">
|
<input type="number" class="form-control" name="product_stock_alert" required value="{{ old('product_stock_alert', 0) }}" min="0" max="100">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -107,7 +112,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="product_tax_type">Tax type</label>
|
<label for="product_tax_type">Tax type</label>
|
||||||
<select class="form-control" name="product_tax_type" id="product_tax_type">
|
<select class="form-control" name="product_tax_type" id="product_tax_type">
|
||||||
<option value="" selected disabled>Select Tax Type</option>
|
<option value="" selected >Select Tax Type</option>
|
||||||
<option value="1">Exclusive</option>
|
<option value="1">Exclusive</option>
|
||||||
<option value="2">Inclusive</option>
|
<option value="2">Inclusive</option>
|
||||||
</select>
|
</select>
|
||||||
|
@ -115,8 +120,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="product_unit">Unit <i class="bi bi-question-circle-fill text-info" data-toggle="tooltip" data-placement="top" title="This text will be placed after Product Quantity."></i> <span class="text-danger">*</span></label>
|
<label for="product_unit">Unit <i class="bi bi-question-circle-fill text-info" data-toggle="tooltip" data-placement="top" title="This short text will be placed after Product Quantity."></i> <span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="product_unit" value="{{ old('product_unit') }}" required>
|
<select class="form-control" name="product_unit" id="product_unit">
|
||||||
|
<option value="" selected >Select Unit</option>
|
||||||
|
@foreach(\Modules\Setting\Entities\Unit::all() as $unit)
|
||||||
|
<option value="{{ $unit->short_name }}">{{ $unit->name . ' | ' . $unit->short_name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,6 +156,9 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Create Category Modal -->
|
||||||
|
@include('product::includes.category-modal')
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('third_party_scripts')
|
@section('third_party_scripts')
|
||||||
|
|
|
@ -115,8 +115,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="product_unit">Unit <i class="bi bi-question-circle-fill text-info" data-toggle="tooltip" data-placement="top" title="This text will be placed after Product Quantity."></i> <span class="text-danger">*</span></label>
|
<label for="product_unit">Unit <i class="bi bi-question-circle-fill text-info" data-toggle="tooltip" data-placement="top" title="This short text will be placed after Product Quantity."></i> <span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="product_unit" value="{{ old('product_unit') ?? $product->product_unit }}" required>
|
<select class="form-control" name="product_unit" id="product_unit" required>
|
||||||
|
<option value="" selected >Select Unit</option>
|
||||||
|
@foreach(\Modules\Setting\Entities\Unit::all() as $unit)
|
||||||
|
<option {{ $product->product_unit == $unit->short_name ? 'selected' : '' }} value="{{ $unit->short_name }}">{{ $unit->name . ' | ' . $unit->short_name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateUnitsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('units', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->string('short_name')->nullable();
|
||||||
|
$table->string('operator')->nullable();
|
||||||
|
$table->integer('operation_value')->nullable();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('units');
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Setting\Entities;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
|
||||||
|
class Unit extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
|
||||||
|
protected $guarded = [];
|
||||||
|
|
||||||
|
protected static function newFactory()
|
||||||
|
{
|
||||||
|
return \Modules\Setting\Database\factories\UnitFactory::new();
|
||||||
|
}
|
||||||
|
}
|
|
@ -33,7 +33,6 @@ class SettingController extends Controller
|
||||||
'company_address' => $request->company_address,
|
'company_address' => $request->company_address,
|
||||||
'default_currency_id' => $request->default_currency_id,
|
'default_currency_id' => $request->default_currency_id,
|
||||||
'default_currency_position' => $request->default_currency_position,
|
'default_currency_position' => $request->default_currency_position,
|
||||||
'footer_text' => $request->footer_text
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
cache()->forget('settings');
|
cache()->forget('settings');
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Modules\Setting\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Routing\Controller;
|
||||||
|
use Modules\Setting\Entities\Unit;
|
||||||
|
|
||||||
|
class UnitsController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public function index() {
|
||||||
|
$units = Unit::all();
|
||||||
|
|
||||||
|
return view('setting::units.index', [
|
||||||
|
'units' => $units
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create() {
|
||||||
|
return view('setting::units.create');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(Request $request) {
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required|string|max:255',
|
||||||
|
'short_name' => 'required|string|max:255'
|
||||||
|
]);
|
||||||
|
|
||||||
|
Unit::create([
|
||||||
|
'name' => $request->name,
|
||||||
|
'short_name' => $request->short_name,
|
||||||
|
'operator' => $request->operator,
|
||||||
|
'operation_value' => $request->operation_value,
|
||||||
|
]);
|
||||||
|
|
||||||
|
toast('Unit Created!', 'success');
|
||||||
|
|
||||||
|
return redirect()->route('units.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit(Unit $unit) {
|
||||||
|
return view('setting::units.edit', [
|
||||||
|
'unit' => $unit
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update(Request $request, Unit $unit) {
|
||||||
|
$request->validate([
|
||||||
|
'name' => 'required|string|max:255',
|
||||||
|
'short_name' => 'required|string|max:255'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$unit->update([
|
||||||
|
'name' => $request->name,
|
||||||
|
'short_name' => $request->short_name,
|
||||||
|
'operator' => $request->operator,
|
||||||
|
'operation_value' => $request->operation_value,
|
||||||
|
]);
|
||||||
|
|
||||||
|
toast('Unit Updated!', 'info');
|
||||||
|
|
||||||
|
return redirect()->route('units.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function destroy(Unit $unit) {
|
||||||
|
$unit->delete();
|
||||||
|
|
||||||
|
toast('Unit Deleted!', 'warning');
|
||||||
|
|
||||||
|
return redirect()->route('units.index');
|
||||||
|
}
|
||||||
|
}
|
|
@ -72,18 +72,12 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="col-lg-6">
|
<div class="col-lg-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="company_address">Company Address <span class="text-danger">*</span></label>
|
<label for="company_address">Company Address <span class="text-danger">*</span></label>
|
||||||
<input type="text" class="form-control" name="company_address" value="{{ $settings->company_address }}">
|
<input type="text" class="form-control" name="company_address" value="{{ $settings->company_address }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="footer_text">Footer Text <span class="text-danger">*</span></label>
|
|
||||||
<textarea rows="1" name="footer_text" class="form-control">{!! $settings->footer_text !!}</textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group mb-0">
|
<div class="form-group mb-0">
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('title', 'Create Unit')
|
||||||
|
|
||||||
|
@section('breadcrumb')
|
||||||
|
<ol class="breadcrumb border-0 m-0">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('units.index') }}">Units</a></li>
|
||||||
|
<li class="breadcrumb-item active">Add</li>
|
||||||
|
</ol>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
<form action="{{ route('units.store') }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name">Unit Name <span class="text-danger">*</span></label>
|
||||||
|
<input type="text" class="form-control" name="name" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name">Short Name <span class="text-danger">*</span></label>
|
||||||
|
<input type="text" class="form-control" name="short_name" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="operator">Operator</label>
|
||||||
|
<input type="text" class="form-control" name="operator" placeholder="ex: * / + -">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="operation_value">Operation Value</label>
|
||||||
|
<input type="text" class="form-control" name="operation_value" placeholder="Enter a number">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12 d-flex justify-content-end">
|
||||||
|
<div class="form-group">
|
||||||
|
<button class="btn btn-primary">Create Unit <i class="bi bi-check"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('title', 'Edit Unit')
|
||||||
|
|
||||||
|
@section('breadcrumb')
|
||||||
|
<ol class="breadcrumb border-0 m-0">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('units.index') }}">Units</a></li>
|
||||||
|
<li class="breadcrumb-item active">Edit</li>
|
||||||
|
</ol>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
<form action="{{ route('units.update', $unit) }}" method="POST">
|
||||||
|
@csrf
|
||||||
|
@method('put')
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name">Unit Name <span class="text-danger">*</span></label>
|
||||||
|
<input type="text" class="form-control" name="name" required value="{{ $unit->name }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="short_name">Short Name <span class="text-danger">*</span></label>
|
||||||
|
<input type="text" class="form-control" name="short_name" required value="{{ $unit->short_name }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="operator">Operator</label>
|
||||||
|
<input type="text" class="form-control" name="operator" value="{{ $unit->operator }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="operation_value">Operation Value</label>
|
||||||
|
<input type="text" class="form-control" name="operation_value" value="{{ $unit->operation_value }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12 d-flex justify-content-end">
|
||||||
|
<div class="form-group">
|
||||||
|
<button class="btn btn-primary">Update Unit <i class="bi bi-check"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
|
@ -0,0 +1,105 @@
|
||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('title', 'Units')
|
||||||
|
|
||||||
|
@section('third_party_stylesheets')
|
||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap4.min.css">
|
||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/select/1.3.3/css/select.dataTables.min.css">
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('breadcrumb')
|
||||||
|
<ol class="breadcrumb border-0 m-0">
|
||||||
|
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
|
||||||
|
<li class="breadcrumb-item active">Units</li>
|
||||||
|
</ol>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card border-0 shadow-sm">
|
||||||
|
<div class="card-body">
|
||||||
|
<a href="{{ route('units.create') }}" class="btn btn-primary">
|
||||||
|
Add Unit <i class="bi bi-plus"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-bordered mb-0 text-center" id="data-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="align-middle">No.</th>
|
||||||
|
<th class="align-middle">Name</th>
|
||||||
|
<th class="align-middle">Short Name</th>
|
||||||
|
<th class="align-middle">Operator</th>
|
||||||
|
<th class="align-middle">Operation Value</th>
|
||||||
|
<th class="align-middle">Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($units as $key => $unit)
|
||||||
|
<tr>
|
||||||
|
<td class="align-middle">{{ $key + 1 }}</td>
|
||||||
|
<td class="align-middle">{{ $unit->name }}</td>
|
||||||
|
<td class="align-middle">{{ $unit->short_name }}</td>
|
||||||
|
<td class="align-middle">{{ $unit->operator }}</td>
|
||||||
|
<td class="align-middle">{{ $unit->operation_value }}</td>
|
||||||
|
<td class="align-middle">
|
||||||
|
<a href="{{ route('units.edit', $unit) }}" class="btn btn-primary btn-sm">
|
||||||
|
<i class="bi bi-pencil"></i>
|
||||||
|
</a>
|
||||||
|
<button id="delete" class="btn btn-danger btn-sm delete-confirm" onclick="
|
||||||
|
event.preventDefault();
|
||||||
|
if (confirm('Are you sure? It will delete the data permanently!')) {
|
||||||
|
document.getElementById('destroy{{ $unit->id }}').submit()
|
||||||
|
}
|
||||||
|
">
|
||||||
|
<i class="bi bi-trash"></i>
|
||||||
|
<form id="destroy{{ $unit->id }}" class="d-none" action="{{ route('units.destroy', $unit) }}"
|
||||||
|
method="POST">
|
||||||
|
@csrf
|
||||||
|
@method('delete')
|
||||||
|
</form>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@push('page_scripts')
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/jszip-2.5.0/dt-1.10.24/b-1.7.0/b-html5-1.7.0/b-print-1.7.0/datatables.min.js"></script>
|
||||||
|
<script type="text/javascript" src="https://cdn.datatables.net/select/1.3.3/js/dataTables.select.min.js"></script>
|
||||||
|
<script>
|
||||||
|
var table = $('#data-table').DataTable({
|
||||||
|
dom: "<'row'<'col-md-3'l><'col-md-5 mb-2'B><'col-md-4 justify-content-end'f>>tr<'row'<'col-md-5'i><'col-md-7 mt-2'p>>",
|
||||||
|
"buttons": [
|
||||||
|
{extend: 'excel',text: '<i class="bi bi-file-earmark-excel-fill"></i> Excel'},
|
||||||
|
{extend: 'csv',text: '<i class="bi bi-file-earmark-excel-fill"></i> CSV'},
|
||||||
|
{extend: 'print',
|
||||||
|
text: '<i class="bi bi-printer-fill"></i> Print',
|
||||||
|
title: "Units",
|
||||||
|
exportOptions: {
|
||||||
|
columns: [ 0, 1, 2, 3, 4 ]
|
||||||
|
},
|
||||||
|
customize: function (win) {
|
||||||
|
$(win.document.body).find('h1').css('font-size', '15pt');
|
||||||
|
$(win.document.body).find('h1').css('text-align', 'center');
|
||||||
|
$(win.document.body).find('h1').css('margin-bottom', '20px');
|
||||||
|
$(win.document.body).css('margin', '35px 25px');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
ordering: false,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endpush
|
|
@ -18,5 +18,6 @@ Route::group(['middleware' => 'auth'], function () {
|
||||||
//General Settings
|
//General Settings
|
||||||
Route::get('/settings', 'SettingController@index')->name('settings.index');
|
Route::get('/settings', 'SettingController@index')->name('settings.index');
|
||||||
Route::patch('/settings', 'SettingController@update')->name('settings.update');
|
Route::patch('/settings', 'SettingController@update')->name('settings.update');
|
||||||
|
// Units
|
||||||
|
Route::resource('units', 'UnitsController')->except('show');
|
||||||
});
|
});
|
||||||
|
|
|
@ -113,7 +113,9 @@ class PermissionsTableSeeder extends Seeder
|
||||||
'edit_currencies',
|
'edit_currencies',
|
||||||
'delete_currencies',
|
'delete_currencies',
|
||||||
//Settings
|
//Settings
|
||||||
'access_settings'
|
'access_settings',
|
||||||
|
//Units
|
||||||
|
'access_units'
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($permissions as $permission) {
|
foreach ($permissions as $permission) {
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||

|

|
||||||
**Live Demo:** Work In Progress
|
**Live Demo:** will update soon
|
||||||
|
|
||||||
## Triangle POS Features
|
## Triangle POS Features
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
- **User Management (Roles & Permissions)**
|
- **User Management (Roles & Permissions)**
|
||||||
- **Product Multiple Images**
|
- **Product Multiple Images**
|
||||||
- **Multiple Currency Settings**
|
- **Multiple Currency Settings**
|
||||||
|
- **Unit Settings**
|
||||||
- **System Settings**
|
- **System Settings**
|
||||||
- **Reports**
|
- **Reports**
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ class HomeController extends Controller
|
||||||
$product_costs = 0;
|
$product_costs = 0;
|
||||||
|
|
||||||
foreach (Sale::completed()->with('saleDetails')->get() as $sale) {
|
foreach (Sale::completed()->with('saleDetails')->get() as $sale) {
|
||||||
foreach ($sale->saleDetails??[] as $saleDetail) {
|
foreach ($sale->saleDetails as $saleDetail) {
|
||||||
if (!is_null($saleDetail->product())) {
|
if (!is_null($saleDetail->product)) {
|
||||||
$product_costs += $saleDetail->product->product_cost * $saleDetail->quantity;
|
$product_costs += $saleDetail->product->product_cost * $saleDetail->quantity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,26 +175,30 @@ class ProductCart extends Component
|
||||||
}
|
}
|
||||||
|
|
||||||
public function calculate($product) {
|
public function calculate($product) {
|
||||||
|
$product_price = $product['product_price'];
|
||||||
|
if ($this->cart_instance == 'purchase' || $this->cart_instance == 'purchase_return') {
|
||||||
|
$product_price = $product['product_cost'];
|
||||||
|
}
|
||||||
$price = 0;
|
$price = 0;
|
||||||
$unit_price = 0;
|
$unit_price = 0;
|
||||||
$product_tax = 0;
|
$product_tax = 0;
|
||||||
$sub_total = 0;
|
$sub_total = 0;
|
||||||
|
|
||||||
if ($product['product_tax_type'] == 1) {
|
if ($product['product_tax_type'] == 1) {
|
||||||
$price = $product['product_price'] + ($product['product_price'] * ($product['product_order_tax'] / 100));
|
$price = $product_price + ($product_price * ($product['product_order_tax'] / 100));
|
||||||
$unit_price = $product['product_price'];
|
$unit_price = $product_price;
|
||||||
$product_tax = $product['product_price'] * ($product['product_order_tax'] / 100);
|
$product_tax = $product_price * ($product['product_order_tax'] / 100);
|
||||||
$sub_total = $product['product_price'] + ($product['product_price'] * ($product['product_order_tax'] / 100));
|
$sub_total = $product_price + ($product_price * ($product['product_order_tax'] / 100));
|
||||||
} elseif ($product['product_tax_type'] == 2) {
|
} elseif ($product['product_tax_type'] == 2) {
|
||||||
$price = $product['product_price'];
|
$price = $product_price;
|
||||||
$unit_price = $product['product_price'] - ($product['product_price'] * ($product['product_order_tax'] / 100));
|
$unit_price = $product_price - ($product_price * ($product['product_order_tax'] / 100));
|
||||||
$product_tax = $product['product_price'] * ($product['product_order_tax'] / 100);
|
$product_tax = $product_price * ($product['product_order_tax'] / 100);
|
||||||
$sub_total = $product['product_price'];
|
$sub_total = $product_price;
|
||||||
} else {
|
} else {
|
||||||
$price = $product['product_price'];
|
$price = $product_price;
|
||||||
$unit_price = $product['product_price'];
|
$unit_price = $product_price;
|
||||||
$product_tax = 0.00;
|
$product_tax = 0.00;
|
||||||
$sub_total = $product['product_price'];
|
$sub_total = $product_price;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['price' => $price, 'unit_price' => $unit_price, 'product_tax' => $product_tax, 'sub_total' => $sub_total];
|
return ['price' => $price, 'unit_price' => $unit_price, 'product_tax' => $product_tax, 'sub_total' => $sub_total];
|
||||||
|
|
|
@ -52,7 +52,7 @@ class User extends Authenticatable implements HasMedia
|
||||||
public function registerMediaCollections(): void
|
public function registerMediaCollections(): void
|
||||||
{
|
{
|
||||||
$this->addMediaCollection('avatars')
|
$this->addMediaCollection('avatars')
|
||||||
->useFallbackUrl('https://www.gravatar.com/avatar/' . md5($this->attributes['email']));
|
->useFallbackUrl('https://www.gravatar.com/avatar/' . md5("test@mail.com"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function scopeIsActive(Builder $builder) {
|
public function scopeIsActive(Builder $builder) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Modules\Currency\Database\Seeders\CurrencyDatabaseSeeder;
|
use Modules\Currency\Database\Seeders\CurrencyDatabaseSeeder;
|
||||||
|
use Modules\Product\Database\Seeders\ProductDatabaseSeeder;
|
||||||
use Modules\Setting\Database\Seeders\SettingDatabaseSeeder;
|
use Modules\Setting\Database\Seeders\SettingDatabaseSeeder;
|
||||||
use Modules\User\Database\Seeders\PermissionsTableSeeder;
|
use Modules\User\Database\Seeders\PermissionsTableSeeder;
|
||||||
|
|
||||||
|
@ -20,5 +21,6 @@ class DatabaseSeeder extends Seeder
|
||||||
$this->call(SuperUserSeeder::class);
|
$this->call(SuperUserSeeder::class);
|
||||||
$this->call(CurrencyDatabaseSeeder::class);
|
$this->call(CurrencyDatabaseSeeder::class);
|
||||||
$this->call(SettingDatabaseSeeder::class);
|
$this->call(SettingDatabaseSeeder::class);
|
||||||
|
$this->call(ProductDatabaseSeeder::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -5,8 +5,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap v4.6.0 (https://getbootstrap.com/)
|
* Bootstrap v4.6.2 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -17,35 +17,16 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Sizzle CSS Selector Engine v2.3.6
|
* jQuery JavaScript Library v3.7.0
|
||||||
* https://sizzlejs.com/
|
|
||||||
*
|
|
||||||
* Copyright JS Foundation and other contributors
|
|
||||||
* Released under the MIT license
|
|
||||||
* https://js.foundation/
|
|
||||||
*
|
|
||||||
* Date: 2021-02-16
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* jQuery JavaScript Library v3.6.0
|
|
||||||
* https://jquery.com/
|
* https://jquery.com/
|
||||||
*
|
*
|
||||||
* Includes Sizzle.js
|
|
||||||
* https://sizzlejs.com/
|
|
||||||
*
|
|
||||||
* Copyright OpenJS Foundation and other contributors
|
* Copyright OpenJS Foundation and other contributors
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://jquery.org/license
|
* https://jquery.org/license
|
||||||
*
|
*
|
||||||
* Date: 2021-03-02T17:08Z
|
* Date: 2023-05-11T18:29Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
|
||||||
DataTables Bootstrap 4 integration
|
|
||||||
©2011-2017 SpryMedia Ltd - datatables.net/license
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*! Bootstrap integration for DataTables' Buttons
|
/*! Bootstrap integration for DataTables' Buttons
|
||||||
* ©2016 SpryMedia Ltd - datatables.net/license
|
* ©2016 SpryMedia Ltd - datatables.net/license
|
||||||
*/
|
*/
|
||||||
|
@ -54,8 +35,12 @@
|
||||||
* ©2016-2021 SpryMedia Ltd - datatables.net/license
|
* ©2016-2021 SpryMedia Ltd - datatables.net/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! DataTables 1.10.25
|
/*! DataTables 1.13.4
|
||||||
* ©2008-2021 SpryMedia Ltd - datatables.net/license
|
* ©2008-2023 SpryMedia Ltd - datatables.net/license
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! DataTables Bootstrap 3 integration
|
||||||
|
* ©2011-2015 SpryMedia Ltd - datatables.net/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! DataTables Bootstrap 4 integration
|
/*! DataTables Bootstrap 4 integration
|
||||||
|
|
|
@ -2,6 +2,22 @@
|
||||||
@import '~@coreui/coreui/scss/coreui';
|
@import '~@coreui/coreui/scss/coreui';
|
||||||
|
|
||||||
//Extra Overrides
|
//Extra Overrides
|
||||||
|
//.c-sidebar {
|
||||||
|
// background: #0f766e;
|
||||||
|
// color: #fff;
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
.c-sidebar .c-sidebar-nav-link.c-active, .c-sidebar .c-active.c-sidebar-nav-dropdown-toggle {
|
||||||
|
color: #fff;
|
||||||
|
background: $primary;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//.c-sidebar .c-sidebar-nav-link:hover {
|
||||||
|
// color: #fff;
|
||||||
|
// background: #0d9488;
|
||||||
|
//}
|
||||||
|
|
||||||
.btn:not([class*=ghost]):not([class*=link]):not([class*=outline]):not([class*=transparent]) {
|
.btn:not([class*=ghost]):not([class*=link]):not([class*=outline]):not([class*=transparent]) {
|
||||||
border: 0;
|
border: 0;
|
||||||
box-shadow: 0 1px 1px 0 rgb(60 75 100 / 14%), 0 2px 1px -1px rgb(60 75 100 / 12%), 0 1px 3px 0 rgb(60 75 100 / 20%);
|
box-shadow: 0 1px 1px 0 rgb(60 75 100 / 14%), 0 2px 1px -1px rgb(60 75 100 / 12%), 0 1px 3px 0 rgb(60 75 100 / 20%);
|
||||||
|
@ -28,6 +44,10 @@
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: initial;
|
font-size: initial;
|
||||||
}
|
}
|
||||||
|
.dropzone .dz-preview .dz-image img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 990px !important;
|
width: 990px !important;
|
||||||
|
|
|
@ -16,4 +16,26 @@
|
||||||
width: 65px;
|
width: 65px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
.select2-container--default .select2-selection--single {
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #D8DBE0;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.select2-container--default .select2-selection--multiple {
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #D8DBE0;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.select2-container .select2-selection--multiple {
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
.select2-container .select2-selection--single {
|
||||||
|
height: 35px;
|
||||||
|
}
|
||||||
|
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||||
|
line-height: 33px;
|
||||||
|
}
|
||||||
|
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<footer class="c-footer">
|
<footer class="c-footer">
|
||||||
<div>{!! settings()->footer_text !!}</div>
|
<div>Triangle Pos © {{ date('Y') }} || Developed by <strong><a target="_blank" href="https://fahimanzamdip.github.io">Fahim Anzam Dip</a></strong></div>
|
||||||
|
|
||||||
<div class="mfs-auto d-md-down-none">Powered by <a href="https://laravel.com" target="_blank">Laravel</a></div>
|
<div class="mfs-auto d-md-down-none">Version <strong class="text-danger">1.0.0</strong></div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
@can('access_adjustments')
|
@can('access_adjustments')
|
||||||
<li class="c-sidebar-nav-item c-sidebar-nav-dropdown {{ request()->routeIs('adjustments.*') ? 'c-show' : '' }}">
|
<li class="c-sidebar-nav-item c-sidebar-nav-dropdown {{ request()->routeIs('adjustments.*') ? 'c-show' : '' }}">
|
||||||
<a class="c-sidebar-nav-link c-sidebar-nav-dropdown-toggle" href="#">
|
<a class="c-sidebar-nav-link c-sidebar-nav-dropdown-toggle" href="#">
|
||||||
<i class="c-sidebar-nav-icon bi bi-clipboard-check" style="line-height: 1;"></i> Adjustments
|
<i class="c-sidebar-nav-icon bi bi-clipboard-check" style="line-height: 1;"></i> Stock Adjustments
|
||||||
</a>
|
</a>
|
||||||
<ul class="c-sidebar-nav-dropdown-items">
|
<ul class="c-sidebar-nav-dropdown-items">
|
||||||
@can('create_adjustments')
|
@can('create_adjustments')
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
@can('access_customers|access_suppliers')
|
@can('access_customers|access_suppliers')
|
||||||
<li class="c-sidebar-nav-item c-sidebar-nav-dropdown {{ request()->routeIs('customers.*') || request()->routeIs('suppliers.*') ? 'c-show' : '' }}">
|
<li class="c-sidebar-nav-item c-sidebar-nav-dropdown {{ request()->routeIs('customers.*') || request()->routeIs('suppliers.*') ? 'c-show' : '' }}">
|
||||||
<a class="c-sidebar-nav-link c-sidebar-nav-dropdown-toggle" href="#">
|
<a class="c-sidebar-nav-link c-sidebar-nav-dropdown-toggle" href="#">
|
||||||
<i class="c-sidebar-nav-icon bi bi-people" style="line-height: 1;"></i> People
|
<i class="c-sidebar-nav-icon bi bi-people" style="line-height: 1;"></i> Parties
|
||||||
</a>
|
</a>
|
||||||
<ul class="c-sidebar-nav-dropdown-items">
|
<ul class="c-sidebar-nav-dropdown-items">
|
||||||
@can('access_customers')
|
@can('access_customers')
|
||||||
|
@ -299,10 +299,19 @@
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can('access_currencies|access_settings')
|
@can('access_currencies|access_settings')
|
||||||
<li class="c-sidebar-nav-item c-sidebar-nav-dropdown {{ request()->routeIs('currencies*') ? 'c-show' : '' }}">
|
<li class="c-sidebar-nav-item c-sidebar-nav-dropdown {{ request()->routeIs('currencies*') || request()->routeIs('units*') ? 'c-show' : '' }}">
|
||||||
<a class="c-sidebar-nav-link c-sidebar-nav-dropdown-toggle" href="#">
|
<a class="c-sidebar-nav-link c-sidebar-nav-dropdown-toggle" href="#">
|
||||||
<i class="c-sidebar-nav-icon bi bi-gear" style="line-height: 1;"></i> Settings
|
<i class="c-sidebar-nav-icon bi bi-gear" style="line-height: 1;"></i> Settings
|
||||||
</a>
|
</a>
|
||||||
|
@can('access_units')
|
||||||
|
<ul class="c-sidebar-nav-dropdown-items">
|
||||||
|
<li class="c-sidebar-nav-item">
|
||||||
|
<a class="c-sidebar-nav-link {{ request()->routeIs('units*') ? 'c-active' : '' }}" href="{{ route('units.index') }}">
|
||||||
|
<i class="c-sidebar-nav-icon bi bi-calculator" style="line-height: 1;"></i> Units
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
@endcan
|
||||||
@can('access_currencies')
|
@can('access_currencies')
|
||||||
<ul class="c-sidebar-nav-dropdown-items">
|
<ul class="c-sidebar-nav-dropdown-items">
|
||||||
<li class="c-sidebar-nav-item">
|
<li class="c-sidebar-nav-item">
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Order Tax ({{ $global_tax }}%)</th>
|
<th>Tax ({{ $global_tax }}%)</th>
|
||||||
<td>(+) {{ format_currency(Cart::instance($cart_instance)->tax()) }}</td>
|
<td>(+) {{ format_currency(Cart::instance($cart_instance)->tax()) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="tax_percentage">Order Tax (%)</label>
|
<label for="tax_percentage">Tax (%)</label>
|
||||||
<input wire:model.lazy="global_tax" type="number" class="form-control" name="tax_percentage" min="0" max="100" value="{{ $global_tax }}" required>
|
<input wire:model.lazy="global_tax" type="number" class="form-control" name="tax_percentage" min="0" max="100" value="{{ $global_tax }}" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue