@php $mpCategory = \App\Models\ProductCategory::pluck('category_name', 'id')->toArray(); $mpBrands = \App\Models\Brand::where('status', 1)->pluck('brand_name', 'id')->toArray(); $mpUnits = \App\Models\Unit::where('status', 1)->get()->mapWithKeys(function ($item) { return [strtolower($item->name) => $item->name]; })->toArray(); $mpTaxGroup = \App\Models\TaxGroup::pluck('tax_slab', 'id') ->map(function ($taxSlab) { if ($taxSlab === 'None' || $taxSlab === 'Exempt') { return $taxSlab; } return 'GST@' . $taxSlab . '%'; }) ->toArray(); $mpManufacturers = \App\Models\Manufacturer::pluck('name', 'id')->toArray(); $mpSettings = \App\Models\ItemSetting::first(); if (!$mpSettings) { $mpSettings = (object) [ 'item_category_enabled' => true, 'mrp_enabled' => true, 'gst_enabled' => true, 'stock_maintenance_enabled' => true, 'brand_enabled' => true, 'part_number_enabled' => true, 'item_code_sku_enabled' => true, 'model_no_enabled' => false, 'size_enabled' => false, 'batch_tracking_enabled' => false, 'manufacturing_date_enabled' => false, 'expiry_date_enabled' => false, 'description_enabled' => true, ]; } @endphp
@include('common.modal.category') @include('common.modal.brand') @include('common.modal.unit') @push('footer_script') @endpush