Showing AI reviews for army
Project AI Score ?
67%
Quality Avg ?
72%
Security Avg ?
54%
Reviews ?
37

Review Result ?

jattin01/army · 700cd56c
This commit introduces a helper class and a controller for managing designations. The helper methods include Indian currency formatting, date handling, and business-specific computations, which are well structured and provide reusable utilities. The controller manages CRUD operations with basic input validation and duplicate checks. However, the code lacks prepared statements in the sense of parameter binding security (though Laravel's DB::statement with ? placeholders helps prevent SQL injection, usage of Eloquent ORM or query builder would be preferable). There is limited error handling and no input sanitization beyond trim. The commit message is not descriptive enough about what these changes introduce. Some string manipulation can be brittle, e.g. FY calculation in buildOrderNo and buildCaseNo might fail on invalid dates or out-of-bound inputs.
Quality ?
85%
Security ?
60%
Business Value ?
70%
Maintainability ?
83%
Issues & Suggested Fixes ?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Too Generic
Where commit message
Issue / Evidence too generic
Suggested Fix provide a descriptive commit message summarizing the purpose and scope of the changes
Fragile Explode Usage Without Checking If...
Where app/Helpers/LpoHelper.php:24
Issue / Evidence fragile explode usage without checking if decimal point present
Suggested Fix add validation or fallback to avoid warnings
Handle Invalid Or Unexpected Orderdate For...
Where app/Helpers/LpoHelper.php:91
Issue / Evidence handle invalid or unexpected orderDate format input
Suggested Fix add input validation and error handling
Use Carbon::parse With Try Catch To Handle...
Where app/Helpers/LpoHelper.php:113
Issue / Evidence use Carbon::parse with try-catch to handle invalid NAC date inputs
Suggested Fix add input validation
Duplicate Logic
Where app/Http/Controllers/Adm/AdmDesignationController.php:25
Issue / Evidence duplicate check could be optimized using Laravel query builder for clarity and security
Suggested Fix refactor to use query builder
Missing Validation
Where app/Http/Controllers/Adm/AdmDesignationController.php:38
Issue / Evidence duplicate check in update lacks ICNo and Designation validation before query
Suggested Fix add validation to prevent invalid queries
Lack Of Confirmation Before Deleting A Des...
Where app/Http/Controllers/Adm/AdmDesignationController.php:47
Issue / Evidence lack of confirmation before deleting a designation record
Suggested Fix implement confirmation or soft deletes to prevent accidental data loss
Code Change Preview · app/Helpers/LpoHelper.php ?
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Helpers;
+ 
+ class LpoHelper
+ {
+     /**
+      * Format a number as Indian Rupees: ₹1,23,456
+      */
+     public static function formatINR(float $amount): string
+     {
+         return '₹' . self::numberFormatIndian($amount);
+     }
+ 
+     /**
+      * Indian number formatting (lakhs / crores)
+      */
+     public static function numberFormatIndian(float $n, int $decimals = 0): string
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Adm;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ 
+ class AdmDesignationController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $editId  = (int)$request->query('edit', 0);
+         $editRow = $editId ? DB::selectOne("SELECT * FROM Designation WHERE DesignationID=?", [$editId]) : null;
+         $rows    = DB::select("SELECT DesignationID,ICNo,Rank,Designation,OffrsName FROM Designation ORDER BY Rank,OffrsName");
+         return view('adm.designation', compact('rows','editRow'));
+     }
+ 
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Adm;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ 
+ class FinPowersController extends Controller
+ {
+     public function index()
+     {
+         $grants       = DB::select("SELECT GrantID, GrantName FROM Grants ORDER BY GrantName");
+         $designations = DB::select("SELECT DesignationID, Designation FROM Designation ORDER BY Designation");
+         $finPowers    = DB::select("SELECT fp.FinPowerID, g.GrantName, d.Designation, fp.Inherent, fp.WithIFA, fp.CreatedDate FROM FinPower fp INNER JOIN Grants g ON fp.GrantID=g.GrantID INNER JOIN Designation d ON fp.DesignationID=d.DesignationID ORDER BY g.GrantName, fp.Inherent");
+         return view('adm.fin-powers', compact('grants','designations','finPowers'));
+     }
+ 
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Adm;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ 
+ class FundTransactionController extends Controller
+ {
+     public function index()
+     {
+         $grants       = DB::select("SELECT GrantID, GrantName FROM Grants ORDER BY GrantName");
+         $designations = DB::select("SELECT DesignationID, Designation FROM Designation ORDER BY Designation");
+         $transactions = DB::select("SELECT TOP 50 g.GrantName, ft.TransactionType, ft.Amount, ft.Authority, ft.AuthorityDate, ft.TransactionDate FROM FundTransactions ft INNER JOIN Grants g ON ft.GrantID=g.GrantID ORDER BY ft.TransactionDate DESC");
+         return view('adm.fund-transaction', compact('grants','designations','transactions'));
+     }
+ 
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Adm;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ 
+ class VendorController extends Controller
+ {
+     public function index()
+     {
+         $vendors = DB::select("SELECT VendorID,VendorName,ContactPerson,Email,Phone,Address,IsActive,CreatedDate FROM Vendors ORDER BY VendorName");
+         return view('adm.vendor-entry', compact('vendors'));
+     }
+ 
+     public function store(Request $request)
+     {
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Aon;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class AonController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $caseId    = (int)$request->query('CaseID', 0);
+         $cases     = DB::select("SELECT CaseID, CaseNo FROM Cases ORDER BY CaseNo");
+         $procRules = DB::select("SELECT ProcRuleID, ProcRule FROM ProcRules ORDER BY ProcRule");
+ 
+         $aonRows   = [];
Removed / Before Commit
- 5️⃣ SHORT LEAVE / DH
- (priority before late limit)
- ======================*/
-             if ($lateMinutes >= 240) {
-                 $status = 'Half Day';
-                 $remark = 'DH Applied';
- 
-             } elseif ($lateMinutes >= 180) {
-                 $remark = '3 Hour Short Leave';
- 
-             } elseif ($lateMinutes >= 120) {
-                 $remark = '2 Hour Short Leave';
- 
-             } elseif ($lateMinutes > 60) {
-                 $remark = '1 Hour Short Leave';
-             }
- elseif ($lateMinutes > 0 && $lateMinutes <= 60) {
- $remark = 'Late more than allowed limit';
Added / After Commit
+ 5️⃣ SHORT LEAVE / DH
+ (priority before late limit)
+ ======================*/
+             // if ($lateMinutes >= 240) {
+             //     $status = 'Half Day';
+             //     $remark = 'Half Day';
+ 
+             // }
+             
+             // elseif ($lateMinutes > 120 && $lateMinutes <= 180) {
+             //     $remark = '3 Hour Short Leave';
+ 
+             // } elseif ($lateMinutes > 60 && $lateMinutes <= 120) {
+             //     $remark = 'Leave not sanctioned';
+ 
+             // }
+             if ($lateMinutes > 60) {
+                 $remark = 'Leave not sanctioned';
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Bid;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class BidController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $caseId   = (int)$request->query('CaseID', 0);
+         $cases    = DB::select("SELECT CaseID, CaseNo FROM Cases ORDER BY CaseNo");
+         $bidData  = null;
+         $bidSpares = [];
+ 
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ namespace App\Http\Controllers\Boo;
+ use Illuminate\Http\Request;
+ 
+ class BenchmarkingController extends CsBaseController
+ {
+     protected bool $showLPP = true;
+     public function index(Request $request) { return $this->loadView($request, 'boo.form.benchmarking'); }
+     public function save(Request $request)  { return $this->saveCs($request); }
+ }
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ namespace App\Http\Controllers\Boo;
+ use Illuminate\Http\Request;
+ 
+ class ComparativeStatementController extends CsBaseController
+ {
+     protected bool $showLPP = false;
+     public function index(Request $request) { return $this->loadView($request, 'boo.form.comparative-statement'); }
+     public function save(Request $request)  { return $this->saveCs($request); }
+ }
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Boo;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ /**
+  * Benchmarking and Comparative Statement share identical DB logic;
+  * the only difference is whether the LPP (Last Purchase Price) column appears.
+  */
+ abstract class CsBaseController extends Controller
+ {
+     protected bool $showLPP = false;
+ 
+     protected function loadView(Request $request, string $view): \Illuminate\View\View
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Boo;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class FinancialOpeningController extends Controller
+ {
+     public function index()
+     {
+         $cases   = DB::select("SELECT CaseID, CaseNo FROM Cases ORDER BY CaseNo DESC");
+         $vendors = DB::select("SELECT VendorID, VendorName FROM Vendors WHERE IsActive=1 ORDER BY VendorName");
+         return view('boo.form.financial-opening', compact('cases', 'vendors'));
+     }
+ 
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Boo;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class PriceNegotiationController extends Controller
+ {
+     public function index()
+     {
+         $cases = DB::select("SELECT CaseID, CaseNo FROM Cases ORDER BY CaseNo DESC");
+         return view('boo.form.price-negotiation', compact('cases'));
+     }
+ 
+     public function loadCase(int $caseId)
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Boo;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class VendorsParticipationController extends Controller
+ {
+     public function index()
+     {
+         $cases   = DB::select("SELECT CaseID, CaseNo FROM Cases ORDER BY CaseNo DESC");
+         $vendors = DB::select("SELECT VendorID, VendorName FROM Vendors ORDER BY VendorName");
+         return view('boo.form.vendors-participation', compact('cases', 'vendors'));
+     }
+ 
Removed / Before Commit
- {
- $request->validate([
- 'part_no' => 'required',
- 'equipment_name' => 'required',
- 'nomenclature' => 'required',
- 'hours' => 'required|numeric'
- 'equipment_name' => $request->equipment_name,
- 'nomenclature' => $request->nomenclature,
- 'hours' => $request->hours,
- ]);
- 
- return redirect()->back()->with('success', 'Record Updated Successfully');
Added / After Commit
+ {
+ $request->validate([
+ 'part_no' => 'required',
+             'mfr_no' => 'required', // 👈 add
+ 'equipment_name' => 'required',
+ 'nomenclature' => 'required',
+ 'hours' => 'required|numeric'
+ 'equipment_name' => $request->equipment_name,
+ 'nomenclature' => $request->nomenclature,
+ 'hours' => $request->hours,
+             'mfr_no' => $request->mfr_no, // 👈 add
+ ]);
+ 
+ return redirect()->back()->with('success', 'Record Updated Successfully');
Removed / Before Commit
- ->leftJoin('work_equipment','work_equipment.id','=','ber_details.equipment_id')
- ->leftJoin('work_orders','work_orders.id','=','work_equipment.work_order_id')
- 
- ->select(
- 'ber_details.*',
- 'work_orders.job_no',
- 'work_equipment.wcn_number as wcn_no',
-     'work_orders.c_n as crc_no'
- );
- 
- 
- $query->where('work_equipment.wcn_number',$request->wcn_no);
- }
- 
- 
- 
- /*
- 
Added / After Commit
+ ->leftJoin('work_equipment','work_equipment.id','=','ber_details.equipment_id')
+ ->leftJoin('work_orders','work_orders.id','=','work_equipment.work_order_id')
+ 
+ // 1st join
+ ->leftJoin('work_units','work_units.id','=','work_orders.work_unit_id')
+ 
+ // 2nd join (final unit table)
+ ->leftJoin('units','units.id','=','work_units.unit')
+ ->select(
+ 'ber_details.*',
+ 'work_orders.job_no',
+ 'work_equipment.wcn_number as wcn_no',
+     'work_orders.c_n as crc_no',
+     'units.name as unit_name'
+ );
+ 
+ 
+ $query->where('work_equipment.wcn_number',$request->wcn_no);
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers;
+ 
+ use Illuminate\Http\Request;
+ use App\Services\DaService;
+ use App\Models\DaRate;
+ use App\Models\DaRateLog;
+ use Illuminate\Support\Facades\DB;
+ 
+ class DaController extends Controller
+ {
+     protected $service;
+ 
+     public function __construct(DaService $service)
+     {
+         $this->service = $service;
+     }
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Eas;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class EasController extends Controller
+ {
+     public function index()
+     {
+         $cases   = DB::select("SELECT CaseID, CaseNo FROM Cases ORDER BY CaseNo DESC");
+         $vendors = DB::select("SELECT VendorID, VendorName FROM Vendors WHERE IsActive=1 ORDER BY VendorName");
+         return view('eas.form', compact('cases', 'vendors'));
+     }
+ 
Removed / Before Commit
- 
- 
- return redirect()->route('gatepass.index', [
-     'control_no' => $controlNo   // variable jisme control no hai
- ])->with('success', 'Gate Pass created successfully.');
- }
- 
- public function commit(Request $request)
Added / After Commit
+ 
+ 
+ return redirect()->route('gatepass.index', [
+             'control_no' => $controlNo   // variable jisme control no hai
+         ])->with('success', 'Gate Pass created successfully.');
+ }
+ 
+ public function commit(Request $request)
Removed / Before Commit
- {
- $activeYear = ProductionYear::where('is_active', 1)
- ->value('financial_year');
- 
- /*
- |--------------------------------------------------------------------------
- | 2. Selected Production Year
- if (!empty($request->year)) {
- 
- $selectedYear = decrypt($request->year);
- 
- // agar active year match kare to wahi use karo
- $prod_year = ($selectedYear == $activeYear)
- 
- // safety → always string
- $prod_year = (string) $prod_year;
- 
- /*
Added / After Commit
+ {
+ $activeYear = ProductionYear::where('is_active', 1)
+ ->value('financial_year');
+     
+ /*
+ |--------------------------------------------------------------------------
+ | 2. Selected Production Year
+ if (!empty($request->year)) {
+ 
+ $selectedYear = decrypt($request->year);
+         
+ 
+ // agar active year match kare to wahi use karo
+ $prod_year = ($selectedYear == $activeYear)
+ 
+ // safety → always string
+ $prod_year = (string) $prod_year;
+    
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers;
+ 
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class LPODashboardController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $fy      = LpoHelper::getFYDates($request->query('fy'));
+         $fyStart = $fy['start'];
+         $fyEnd   = $fy['end'];
+         $currentFY = $fy['fy'];
+ 
+         // ── Dropdown lists for FY selectors ──────────────────────────────
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Lpr;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class LprEditController extends Controller
+ {
+     /** GET /lpr/edit – search form */
+     public function index()
+     {
+         $userGroups = DB::select("SELECT UserGroupID, UserGroupName FROM UserGroups ORDER BY UserGroupName");
+         $spares     = DB::select("SELECT SpareID, Nomenclature FROM Spares ORDER BY Nomenclature");
+         $jobs       = DB::select("SELECT JobID, JobNo FROM Jobs ORDER BY JobNo");
+         return view('lpr.edit', compact('userGroups', 'spares', 'jobs'));
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Lpr;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ use Carbon\Carbon;
+ 
+ class LprEntryController extends Controller
+ {
+     /** GET /lpr/create – show the LPR entry form */
+     public function create()
+     {
+         $userGroups = DB::select("SELECT UserGroupID, UserGroupName FROM UserGroups ORDER BY UserGroupName");
+         $grants     = DB::select("SELECT GrantID, GrantName FROM Grants ORDER BY GrantName");
+         $aus        = DB::select("SELECT AUID, AUName FROM AU ORDER BY AUName");
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Lpr;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class PendingLprController extends Controller
+ {
+     public function index()
+     {
+         $userGroups = DB::select("SELECT UserGroupID, UserGroupName FROM UserGroups ORDER BY UserGroupName");
+         $jobTypes   = DB::select("SELECT JobTypeID, JobType FROM JobTypes ORDER BY JobType");
+         return view('lpr.pending', compact('userGroups', 'jobTypes'));
+     }
+ 
Removed / Before Commit
- use Illuminate\Http\Request;
- use App\Models\McoSubmission;
- use App\Models\WorkEquipment;
- use DB;
- 
- class McoDemandController extends Controller
- // ));
- // }
- 
- public function index(Request $request)
- {
- /*
Added / After Commit
+ use Illuminate\Http\Request;
+ use App\Models\McoSubmission;
+ use App\Models\WorkEquipment;
+ use App\Models\Group;
+ use App\Models\ProductionYear;
+ use App\Models\RepairClass;
+ use DB;
+ 
+ class McoDemandController extends Controller
+ // ));
+ // }
+ 
+     public function getDropdownData()
+     {
+         // Get all active groups
+         $groups = Group::where('is_active', 1)
+             ->orderBy('name')
+             ->pluck('name', 'id');
Removed / Before Commit
- ->pluck('job_no');
- 
- // Get Equipments (Nothing hidden)
-     $equipments = WorkEquipment::whereHas('workOrder', function ($q) use ($selectedJob) {
- 
-             $q->whereNull('control_no')
-               ->where('job_no', 'like', 'M&R/%');
- 
-             if ($selectedJob) {
-                 $q->where('job_no', $selectedJob);
-             }
-         })
-         ->with('workOrder')
-         ->get()
-         ->map(function ($item) {
- 
-             $item->remaining_quantity =
-                 $item->quantity - $item->manufactured_quantity;
Added / After Commit
+ ->pluck('job_no');
+ 
+ // Get Equipments (Nothing hidden)
+    $equipments = WorkEquipment::whereHas('workOrder', function ($q) use ($selectedJob) {
+ 
+         $q->whereNull('control_no')
+           ->where('job_no', 'like', 'M&R/%');
+ 
+         if ($selectedJob) {
+             $q->where('job_no', $selectedJob);
+         }
+     })
+     ->with(['workOrder'])
+     ->get()
+     ->groupBy(function ($item) {
+         return $item->workOrder->job_no;
+     })
+     ->map(function ($group) {
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Order;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class ChallanController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $orderNo      = trim($request->query('OrderNo', ''));
+         $orderNos     = DB::select("SELECT DISTINCT OrderNo FROM SupplyOrders WHERE OrderNo IS NOT NULL AND LTRIM(RTRIM(OrderNo))!='' ORDER BY OrderNo");
+         $orderDetails = null;
+         $challanRows  = [];
+ 
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Order;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class CrvController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $orderNo      = trim($request->query('OrderNo', ''));
+         $orderNos     = DB::select("SELECT DISTINCT OrderNo FROM SupplyOrders WHERE OrderNo IS NOT NULL AND LTRIM(RTRIM(OrderNo))!='' ORDER BY OrderNo");
+         $orderDetails = null;
+         $gridRows     = [];
+ 
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Order;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ 
+ class DeliveryPeriodController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $orderNo  = trim($request->query('OrderNo', ''));
+         $orderNos = DB::select(
+             "SELECT DISTINCT OrderNo FROM LPRspares
+              WHERE OrderNo IS NOT NULL AND LTRIM(RTRIM(OrderNo))!=''
+              ORDER BY OrderNo"
+         );
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Order;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ 
+ class OrderCancellationController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $orderNo = trim($request->query('OrderNo', ''));
+ 
+         $orderNos = DB::select(
+             "SELECT DISTINCT OrderNo FROM LPRspares
+              WHERE OrderNo IS NOT NULL AND LTRIM(RTRIM(OrderNo)) != ''
+              ORDER BY OrderNo"
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Order;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ 
+ class SubmitBillController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $selectedOrder = trim($request->query('OrderNo', ''));
+ 
+         $orderNos = DB::select(
+             "SELECT DISTINCT ls.OrderNo
+              FROM LPRspares ls
+              INNER JOIN LPRs  l ON ls.LPRID   = l.LPRID
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Order;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class SupplyOrderController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $caseId      = (int)$request->query('CaseID', 0);
+         $cases       = DB::select("SELECT CaseID, CaseNo FROM Cases ORDER BY CaseNo");
+         $caseDetails = null;
+         $orderRows   = [];
+         $orderSummary = [];
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers;
+ 
+ use Illuminate\Http\Request;
+ use App\Models\PayMatrix;
+ 
+ class PayMatrixController extends Controller
+ {
+     /**
+      * Display pay matrix in a table format
+      */
+     public function index()
+     {
+         // Get all unique levels and cells
+         $levels = PayMatrix::select('level')->distinct()->orderBy('level')->pluck('level');
+         $maxCells = PayMatrix::select('cell')->distinct()->orderBy('cell', 'desc')->first()->cell ?? 0;
+         
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers;
+ 
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class PrintController extends Controller
+ {
+     // ── Shared case loader ─────────────────────────────────────────────────
+     private function caseData(int $caseId): object
+     {
+         $case = DB::selectOne("SELECT c.*, d.Designation AS CFA, d.ICNo, d.Rank, d.OffrsName, g.GrantName, pr.ProcRule FROM Cases c LEFT JOIN Designation d ON c.DesignationID=d.DesignationID LEFT JOIN (SELECT TOP 1 l.GrantID FROM LPRs l WHERE l.CaseNoID=?) lg ON 1=1 LEFT JOIN Grants g ON lg.GrantID=g.GrantID LEFT JOIN ProcRules pr ON c.ProcRuleID=pr.ProcRuleID WHERE c.CaseID=?", [$caseId, $caseId]);
+         abort_if(!$case, 404, 'Case not found');
+         return $case;
+     }
+ 
Removed / Before Commit
- 
- return redirect('qa-inspections')->with('success', 'QA Inspection saved successfully.');
- }
-     public function reject(Request $request)
- {
- $request->validate([
- 'work_order_id' => 'required',
- 'work_equipment_id' => 'required',
-         'vir_id' => 'required',
- 'remark' => 'required|string'
- ]);
- 
-     // 🔹 NEW ENTRY in equipment_repairs
-     EquipmentRepair::create([
-         'work_order_id'        => $request->work_order_id,
-         'work_equipment_id'    => $request->work_equipment_id,
-         'vir_id'               => $request->vir_id,
-         'repair_progress_remark' => $request->remark,
Added / After Commit
+ 
+ return redirect('qa-inspections')->with('success', 'QA Inspection saved successfully.');
+ }
+    public function reject(Request $request)
+ {
+ $request->validate([
+ 'work_order_id' => 'required',
+ 'work_equipment_id' => 'required',
+ 'remark' => 'required|string'
+ ]);
+ 
+     // Get Work Order
+     $workOrder = WorkOrder::find($request->work_order_id);
+ 
+     // 🔥 Check M&R Case
+     if ($workOrder && str_contains($workOrder->job_no, 'M&R/')) {
+ 
+         // 👉 Direct update WorkEquipment
Removed / Before Commit
- }
- 
- 
-     public function store(Request $request)
- {
- $request->validate([
- 'work_order_id' => 'required|exists:work_orders,id',
- 'remark' => 'nullable|string',
- ]);
- 
-     // ✅ Get Active Production Year
- $productionYear = \DB::table('production_years')
- ->where('is_active', 1)
- ->value('financial_year');
- 
- $virs = VIR::where('work_order_id', $request->work_order_id)
- ->where('status', 'Accepted')
-         ->with('workEquipment') // performance
Added / After Commit
+ }
+ 
+ 
+ 
+ public function store(Request $request)
+ {
+ $request->validate([
+ 'work_order_id' => 'required|exists:work_orders,id',
+ 'remark' => 'nullable|string',
+ ]);
+ 
+ $productionYear = \DB::table('production_years')
+ ->where('is_active', 1)
+ ->value('financial_year');
+ 
+     $qcNumbers = []; // 👈 store all QC numbers
+ 
+ $virs = VIR::where('work_order_id', $request->work_order_id)
Removed / Before Commit
- $request->validate([
- 'work_order_id'     => 'required',
- 'work_equipment_id' => 'required',
-         'vir_id'            => 'required',
- 'remark'            => 'required|string'
- ]);
- 
-     DB::transaction(function () use ($request) {
- 
-         // 🔴 1️⃣ QC initiate table se DELETE
-         QAInspection::where([
-             'work_order_id'     => $request->work_order_id,
-             'work_equipment_id' => $request->work_equipment_id,
-             'vir_id'            => $request->vir_id,
-         ])->delete();
- 
-         QaInspectionInitate::where([
-             'work_order_id'     => $request->work_order_id,
Added / After Commit
+ $request->validate([
+ 'work_order_id'     => 'required',
+ 'work_equipment_id' => 'required',
+ 'remark'            => 'required|string'
+ ]);
+ 
+     $workOrder = WorkOrder::find($request->work_order_id);
+ 
+      if ($workOrder && str_contains($workOrder->job_no, 'M&R/')) 
+     {
+         $workEquipment = WorkEquipment::find($request->work_equipment_id);
+ 
+         if ($workEquipment) {
+             $workEquipment->status = 'QC REJECTED';
+             $workEquipment->remark = $request->remark; // 👈 new column (add if not exists)
+             $workEquipment->save();
+         }
+     }
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Reports;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ use App\Helpers\LpoHelper;
+ 
+ class AbcReportController extends Controller
+ {
+     private const PAGE_SIZE = 15;
+ 
+     public function index(Request $request)
+     {
+         $selFY    = $request->query('ddlFY', 'All');
+         $selGrant = $request->query('ddlGrant', 'All');
+         $page     = max(0, (int)$request->query('pg', 0));
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Reports;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ 
+ class OrderStateController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $grantId  = (int)$request->query('GrantID', 0);
+         $vendorId = (int)$request->query('VendorID', 0);
+         $ugId     = (int)$request->query('UserGroupID', 0);
+         $fy       = trim($request->query('FY', ''));
+         $status   = trim($request->query('status', ''));
+ 
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Http\Controllers\Reports;
+ 
+ use App\Http\Controllers\Controller;
+ use Illuminate\Http\Request;
+ use Illuminate\Support\Facades\DB;
+ 
+ class SearchController extends Controller
+ {
+     public function index(Request $request)
+     {
+         $selectedTable  = trim($request->query('table', ''));
+         $selectedColumn = trim($request->query('column', ''));
+         $searchTerm     = trim($request->query('search', ''));
+ 
+         $tables  = DB::select("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND TABLE_NAME NOT LIKE 'sys%' AND TABLE_NAME NOT LIKE 'dt%' ORDER BY TABLE_NAME");
+         $columns = [];
Removed / Before Commit
- public function store(Request $request) {
- $request->validate([
- 'name' => 'required|string',
- 'type' => 'required|in:earning,deduction',
- 'calculation_type' => 'required|in:fixed,percentage,formula',
- 'frequency' => 'required|in:monthly,quarterly,half-yearly,yearly'
- public function update(Request $request, SalaryComponent $salaryComponent) {
- $request->validate([
- 'name' => 'required|string',
- 'type' => 'required|in:earning,deduction',
- 'calculation_type' => 'required|in:fixed,percentage,formula',
- 'frequency' => 'required|in:monthly,quarterly,half-yearly,yearly'
- $salaryComponent->delete();
- return redirect()->route('salary-components.index')->with('success', 'Component deleted successfully.');
- }
- }
Added / After Commit
+ public function store(Request $request) {
+ $request->validate([
+ 'name' => 'required|string',
+             'category' => 'required|in:1,2',
+ 'type' => 'required|in:earning,deduction',
+ 'calculation_type' => 'required|in:fixed,percentage,formula',
+ 'frequency' => 'required|in:monthly,quarterly,half-yearly,yearly'
+ public function update(Request $request, SalaryComponent $salaryComponent) {
+ $request->validate([
+ 'name' => 'required|string',
+             'category' => 'required|in:1,2',
+ 'type' => 'required|in:earning,deduction',
+ 'calculation_type' => 'required|in:fixed,percentage,formula',
+ 'frequency' => 'required|in:monthly,quarterly,half-yearly,yearly'
+ $salaryComponent->delete();
+ return redirect()->route('salary-components.index')->with('success', 'Component deleted successfully.');
+ }
+ 
Removed / Before Commit
- use Carbon\Carbon;
- use App\Models\Holiday;
- use App\Models\Attendance;
- use App\Models\Leave;
- use PDF;
- 
- ));
- }
- 
- public function store(Request $request, Employee $employee)
- {
- // Validate input
- return $pdf->download('SalarySlip_' . $salarySlip->employee->name . '_' . $salarySlip->month . '_' . $salarySlip->year . '.pdf');
- }
- 
- 
- 
- }
Added / After Commit
+ use Carbon\Carbon;
+ use App\Models\Holiday;
+ use App\Models\Attendance;
+ use App\Models\SalaryComponent;
+ use App\Models\Leave;
+ use PDF;
+ 
+ ));
+ }
+ 
+     public function saveSlip(Request $request)
+     {
+         \Log::info('=== SAVE SALARY SLIP START ===', $request->all());
+         
+         $validated = $request->validate([
+             'employee_id' => 'required|exists:staff,id',
+             'components' => 'nullable|array',
+         ]);
Removed / Before Commit
- 'equipments',
- 'equipments.vir',
- 'equipments.subassy'
-     ])
- 
- // atleast ek equipment hona chahiye
- ->whereHas('equipments')
- ->whereDoesntHave('equipments', function ($q) {
- $q->whereNotIn('status', [
- 'AWAITING JOB NO',
-             'VIR REJECTED'
- ]);
- })
Added / After Commit
+ 'equipments',
+ 'equipments.vir',
+ 'equipments.subassy'
+         ])
+ 
+ // atleast ek equipment hona chahiye
+ ->whereHas('equipments')
+ ->whereDoesntHave('equipments', function ($q) {
+ $q->whereNotIn('status', [
+ 'AWAITING JOB NO',
+             'VIR REJECTED',
+             'EQPT COLLECTED'
+ ]);
+ })
Removed / Before Commit
- 
- protected $fillable = [
- 'part_no',
- 'equipment_name',
- 'nomenclature',
- 'hours',
Added / After Commit
+ 
+ protected $fillable = [
+ 'part_no',
+         'mfr_no', 
+ 'equipment_name',
+ 'nomenclature',
+ 'hours',
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ 
+ namespace App\Models;
+ 
+ use Illuminate\Database\Eloquent\Model;
+ 
+ class DaRate extends Model
+ {
+     protected $fillable = [
+         'percentage',
+         'effective_from',
+         'is_active',
+         'created_by'
+     ];
+ 
+     protected $casts = [
+         'is_active' => 'boolean',
+         'effective_from' => 'date'
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Models;
+ 
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
+ use Illuminate\Database\Eloquent\Model;
+ 
+ class DaRateLog extends Model
+ {
+     use HasFactory;
+ 
+       protected $fillable = [
+         'da_rate_id',
+         'old_percentage',
+         'new_percentage',
+         'changed_by',
+         'changed_at'
+     ];
Removed / Before Commit

                                                
Added / After Commit
+ <?php
+ 
+ namespace App\Models;
+ 
+ use Illuminate\Database\Eloquent\Factories\HasFactory;
+ use Illuminate\Database\Eloquent\Model;
+ 
+ class PayMatrix extends Model
+ {
+     use HasFactory;
+     
+     protected $table = 'pay_matrix';
+     
+     protected $fillable = ['level', 'cell', 'basic'];
+ }
Removed / Before Commit
- class SalaryComponent extends Model
- {
- protected $fillable = [
-         'name', 'type', 'calculation_type', 'frequency', 'is_active'
- ];
- 
- public function employeeComponents() {
Added / After Commit
+ class SalaryComponent extends Model
+ {
+ protected $fillable = [
+         'name', 'category', 'code', 'type', 'calculation_type', 'formula', 'priority', 'frequency', 'is_active'
+ ];
+ 
+ public function employeeComponents() {
Removed / Before Commit
- // Salary
- 'salary_group_id',
- 'basic_salary',
- ];
- 
- protected $casts = [
- 'children_details' => 'array',
- 'dependent_details' => 'array',
- 'spouse_details' => 'array',
- 
- 'have_children' => 'boolean',
- 'dependents' => 'boolean',
- return self::statuses()[$this->status] ?? 'Unknown';
- }
- 
- 
- }
- \ No newline at end of file
Added / After Commit
+ // Salary
+ 'salary_group_id',
+ 'basic_salary',
+         'salary_level',
+         'level_id',
+         'pay_level',
+         'pay_cell',
+         'hra',
+         'da',
+         'extra_data',
+ ];
+ 
+ protected $casts = [
+ 'children_details' => 'array',
+ 'dependent_details' => 'array',
+ 'spouse_details' => 'array',
+         'extra_data' => 'array',
+ 
Removed / Before Commit
- 'status',
- 'sus',
- 'repair_remarks',
- 'type',
- 'created_at',
- 'updated_at',
Added / After Commit
+ 'status',
+ 'sus',
+ 'repair_remarks',
+         'remark',
+ 'type',
+ 'created_at',
+ 'updated_at',
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <?php
+ namespace App\Services;
+ 
+ use App\Models\DaRate;
+ use Illuminate\Support\Facades\DB;
+ 
+ class DaService
+ {
+     // Get DA based on date
+     public function getRate($date)
+     {
+         return DaRate::where('effective_from', '<=', $date)
+             ->orderByDesc('effective_from')
+             ->value('percentage') ?? 0;
+     }
+ 
+     // Store new DA rate
+     public function create($percentage, $effectiveDate, $userId)
Removed / Before Commit
- return ['valid' => false, 'message' => 'This leave type is currently inactive.'];
- }
- 
-         // 2. Check employee category and gender compatibility
-         $employeeCategoryId = $employee->employee_category_id;
- $leaveGender = strtolower(trim($leaveType->gender));
- $employeeGender = strtolower(trim($employee->gender));
- 
-         // Gender validation
- if ($leaveGender !== 'both' && $leaveGender !== $employeeGender) {
- return [
- 'valid' => false,
- 'message' => "This leave type is only available for {$leaveType->gender} employees."
- ];
- }
- 
-         // Category validation - check if employee category ID exists in leave_category comma-separated values
-         if (!empty($leaveType->leave_category)) {
Added / After Commit
+ return ['valid' => false, 'message' => 'This leave type is currently inactive.'];
+ }
+ 
+ $leaveGender = strtolower(trim($leaveType->gender));
+ $employeeGender = strtolower(trim($employee->gender));
+ 
+ if ($leaveGender !== 'both' && $leaveGender !== $employeeGender) {
+ return [
+ 'valid' => false,
+ 'message' => "This leave type is only available for {$leaveType->gender} employees."
+ ];
+ }
+ 
+ 
+ 
+ // 3. Check employee type (Permanent/Contract/Probation)
+ }
+ }
Removed / Before Commit

                                                
Added / After Commit
+ @if(session('success'))
+     <div class="alert alert-success alert-dismissible border-start border-5 border-success fw-bold mb-3" role="alert">
+         {{ session('success') }}
+         <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+     </div>
+ @endif
+ @if(session('error'))
+     <div class="alert alert-danger alert-dismissible border-start border-5 border-danger fw-bold mb-3" role="alert">
+         {{ session('error') }}
+         <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+     </div>
+ @endif
+ @if(session('warning'))
+     <div class="alert alert-warning alert-dismissible border-start border-5 border-warning fw-bold mb-3" role="alert">
+         {{ session('warning') }}
+         <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+     </div>
+ @endif
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Designation Entry')
+ @section('content')
+ <div class="container-fluid mt-3">
+ <div class="card shadow-sm mb-4" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745">
+         <h5 class="mb-0 text-success">🎖️ {{ $editRow ? 'Edit Designation' : 'New Designation Entry' }}</h5>
+     </div>
+     <div class="card-body">
+         <form method="POST" action="{{ $editRow ? route('adm.designations.update', $editRow->DesignationID) : route('adm.designations.store') }}">
+             @csrf
+             @if($editRow) @method('PATCH') @endif
+             <div class="row g-3 mb-3">
+                 <div class="col-md-3"><label class="form-label fw-bold">IC No <span class="text-danger">*</span></label><input type="text" name="ICNo" class="form-control" required value="{{ $editRow->ICNo??'' }}"></div>
+                 <div class="col-md-2"><label class="form-label fw-bold">Rank</label><input type="text" name="Rank" class="form-control" value="{{ $editRow->Rank??'' }}"></div>
+                 <div class="col-md-3"><label class="form-label fw-bold">Designation <span class="text-danger">*</span></label><input type="text" name="Designation" class="form-control" required value="{{ $editRow->Designation??'' }}"></div>
+                 <div class="col-md-4"><label class="form-label fw-bold">Officer's Name</label><input type="text" name="OffrsName" class="form-control" value="{{ $editRow->OffrsName??'' }}"></div>
+             </div>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Financial Powers')
+ @section('content')
+ @php use App\Helpers\LpoHelper; @endphp
+ <div class="container-fluid mt-3">
+ <div class="card shadow-sm mb-4" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745"><h5 class="mb-0 text-success">💼 Add Financial Power</h5></div>
+     <div class="card-body">
+         <form method="POST" action="{{ route('adm.fin-powers.store') }}">
+             @csrf
+             <div class="row g-3 mb-3">
+                 <div class="col-md-3"><label class="form-label fw-bold">Grant <span class="text-danger">*</span></label>
+                     <select name="GrantID" class="form-select"><option value="">-- Select Grant --</option>@foreach($grants as $g)<option value="{{ $g->GrantID }}">{{ $g->GrantName }}</option>@endforeach</select>
+                 </div>
+                 <div class="col-md-3"><label class="form-label fw-bold">CFA / Designation <span class="text-danger">*</span></label>
+                     <select name="DesignationID" class="form-select"><option value="">-- Select CFA --</option>@foreach($designations as $d)<option value="{{ $d->DesignationID }}">{{ $d->Designation }}</option>@endforeach</select>
+                 </div>
+                 <div class="col-md-2"><label class="form-label fw-bold">Inherent (₹)</label><input type="number" name="Inherent" class="form-control" min="0" step="0.01"></div>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Fund Transaction')
+ @section('content')
+ @php use App\Helpers\LpoHelper; @endphp
+ <div class="container-fluid mt-3">
+ <div class="card shadow-sm mb-4" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745"><h5 class="mb-0 text-success">💰 Fund Transaction</h5></div>
+     <div class="card-body">
+         <form method="POST" action="{{ route('adm.fund.store') }}">
+             @csrf
+             <div class="row g-3 mb-3">
+                 <div class="col-md-3"><label class="form-label fw-bold">Grant Name <span class="text-danger">*</span></label>
+                     <select name="GrantID" class="form-select"><option value="">-- Select Grant --</option>@foreach($grants as $g)<option value="{{ $g->GrantID }}">{{ $g->GrantName }}</option>@endforeach</select>
+                 </div>
+                 <div class="col-md-2"><label class="form-label fw-bold">Transaction Type <span class="text-danger">*</span></label>
+                     <select name="TransactionType" class="form-select"><option value="">-- Select --</option><option>Credit</option><option>Debit</option></select>
+                 </div>
+                 <div class="col-md-2"><label class="form-label fw-bold">Amount (₹) <span class="text-danger">*</span></label><input type="number" name="Amount" class="form-control" min="0" step="0.01"></div>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Vendor Entry')
+ @section('content')
+ <div class="container-fluid mt-3">
+ <div class="card shadow-sm mb-4" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745"><h5 class="mb-0 text-success">🏪 New Vendor Entry</h5></div>
+     <div class="card-body">
+         <form method="POST" action="{{ route('adm.vendors.store') }}">
+             @csrf
+             <div class="row g-3 mb-3">
+                 <div class="col-md-3"><label class="form-label fw-bold">Vendor Name <span class="text-danger">*</span></label><input type="text" name="VendorName" class="form-control" required></div>
+                 <div class="col-md-3"><label class="form-label">Contact Person</label><input type="text" name="ContactPerson" class="form-control"></div>
+                 <div class="col-md-3"><label class="form-label">Email</label><input type="email" name="Email" class="form-control"></div>
+                 <div class="col-md-3"><label class="form-label">Phone</label><input type="text" name="Phone" class="form-control"></div>
+             </div>
+             <div class="row g-3 mb-3">
+                 <div class="col-md-6"><label class="form-label">Address</label><input type="text" name="Address" class="form-control"></div>
+                 <div class="col-md-3"><label class="form-label">Active</label>
Removed / Before Commit
- id="salary" role="tabpanel">
- <div class="mt-1 mx-3">
- 
- 
- <div class="row mb-3">
- <div class="col-md-6">
-                                         <label for="basic_salary" class="form-label">Basic Salary</label>
-                                         <input type="text" name="basic_salary" id="basic_salary" class="form-control"
-                                             value="{{ old('basic_salary', $staff->basic_salary ?? '') }}"  >
- </div>
-                                     {{-- Salary Group --}}
-                                     <div class="col-md-12">
-                                         <label for="salary_group_id" class="form-label mt-3">Salary Group</label>
-                                         <div class="d-flex align-items-center">
-                                             <select name="salary_group_id" id="salary_group_id"
-                                                 class="form-select w-100">
-                                                 <option value="">Select Salary Group...</option>
-                                                 @foreach ($salaryGroups as $group)
Added / After Commit
+ id="salary" role="tabpanel">
+ <div class="mt-1 mx-3">
+ 
+                                 <h5 class="mb-3">Salary Components</h5>
+ 
+ <div class="row mb-3">
+                                     {{-- Level Dropdown from Pay Matrix --}}
+ <div class="col-md-6">
+                                         <label for="pay_level" class="form-label">Level <span class="text-danger">*</span></label>
+                                         <select name="pay_level" id="pay_level" class="form-select" required>
+                                             <option value="">Select Level...</option>
+                                             @php
+                                                 $levels = \App\Models\PayMatrix::select('level')->distinct()->orderBy('level')->pluck('level');
+                                             @endphp
+                                             @foreach($levels as $level)
+                                                 <option value="{{ $level }}" {{ old('pay_level', $staff->pay_level ?? '') == $level ? 'selected' : '' }}>
+                                                     Level {{ $level }}
+                                                 </option>
Removed / Before Commit
- </select>
- </div>
- 
-                         
- 
- <div class="me-2">
- <div>
- <div>
- <label class="form-label fw-bold">Department</label>
- </div>
-                             <select name="department_id" class="form-select select2" onchange="$('#filterForm').submit()">
- <option value="">-- Department --</option>
- @foreach ($departments as $department)
- <option value="{{ $department->id }}"
- @endforeach
- </select>
- </div>
-                         
Added / After Commit
+ </select>
+ </div>
+ 
+                         <div class="me-2">
+                             <div>
+                                 <label class="form-label fw-bold">Search</label>
+                             </div>
+                             <input type="text" name="search" class="form-control" placeholder="Emp-No, Biometric"
+                                 value="{{ request('search') }}" oninput="setTimeout(() => this.form.submit(), 4000)"
+                                 style="min-width: 200px;">
+                         </div>
+ 
+ <div class="me-2">
+ <div>
+ <div>
+ <label class="form-label fw-bold">Department</label>
+ </div>
+                             <select name="department_id" class="form-select select2" onchange="$('#filterForm').submit()"
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','AON Entry')
+ @section('content')
+ @php use App\Helpers\LpoHelper; @endphp
+ <div class="container-fluid mt-3">
+ 
+ @if(session('success'))<div class="alert alert-success border-start border-5 fw-bold">{{ session('success') }}</div>@endif
+ @if(session('error'))<div class="alert alert-danger border-start border-5 fw-bold">{{ session('error') }}</div>@endif
+ 
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745">
+         <h5 class="mb-0 text-success"><i class="bi bi-file-earmark-text me-2"></i>AON – Acceptance of Necessity</h5>
+     </div>
+     <div class="card-body">
+         <form method="GET" class="row g-3 align-items-end">
+             <div class="col-md-4">
+                 <label class="form-label fw-bold">Select Case</label>
+                 <select name="CaseID" class="form-select" onchange="this.form.submit()">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>AON Print – {{ $case->CaseNo }}</title>
+ <style>
+     @page { size: A4 portrait; margin: 0.8cm; }
+     body { font-family: Arial, sans-serif; font-size: 14px; color: #000; line-height: 1.4; margin: 0; padding: 0; }
+ 
+     .title-section { text-align: center; font-weight: bold; margin: 0 30px 20px 30px; line-height: 1.2; text-transform: uppercase; }
+ 
+     .para, .sub-para, .para-number, .para-text, .sub-para-number, .sub-para-text { font-size: 14px; line-height: 1.4; }
+     .para { margin: 0 0 12px 0; text-align: justify; }
+     .para-number { display: inline-block; min-width: 25px; }
+     .para-text { display: inline; font-weight: normal; }
+     .sub-para { margin-left: 35px; margin-bottom: 10px; text-align: justify; }
+     .sub-para-number { display: inline-block; width: 35px; margin-right: 10px; }
+     .sub-para-text { display: inline; font-weight: normal; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Cost Proposal – {{ $case->CaseNo }}</title>
+ <style>
+     @page { size: A4 portrait; margin: 0.8cm; }
+     body { font-family: Arial, sans-serif; font-size: 14px; color: #000; line-height: 1.4; margin: 0; padding: 0; }
+     hr { border: none; border-top: 1px solid #000; margin: 12px 0; }
+     .para { margin-bottom: 12px; }
+     .para-number { display: inline-block; min-width: 25px; font-weight: bold; }
+     table { width: 100%; border-collapse: collapse; margin: 0; }
+     table, th, td { border: 1px solid #000; }
+     th, td { padding: 4px; text-align: center; vertical-align: middle; }
+     .signature-block { margin-top: 90px; text-align: left; font-weight: bold; }
+     .no-print { text-align: right; margin-bottom: 10px; }
+     @media print {
+         .no-print { display: none; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="robots" content="noindex, nofollow">
+ <meta name="referrer" content="no-referrer">
+ <title>Fund Availability Certificate – {{ $case->CaseNo }}</title>
+ <style>
+     @page {
+         size: A4 portrait;
+         margin: 0.75in 0.5in 0.75in 0.5in;
+     }
+ 
+     body {
+         font-family: Arial, sans-serif;
+         font-size: 14px;
+         color: #000;
+         line-height: 1.4;
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Undertaking – {{ $case->CaseNo }}</title>
+ <style>
+     @page { size: A4 portrait; margin: 1cm 1.5cm 1cm 2.5cm; }
+ 
+     body {
+         font-family: Arial, sans-serif;
+         font-size: 12pt;
+         line-height: 1.4;
+         margin: 0;
+         padding: 0;
+         color: #000;
+     }
+ 
+     .header-section {
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Bid Entry')
+ @section('content')
+ @php use App\Helpers\LpoHelper; @endphp
+ <div class="container-fluid mt-3">
+ @if(session('success'))<div class="alert alert-success border-start border-5 fw-bold">{{ session('success') }}</div>@endif
+ @if(session('error'))<div class="alert alert-danger border-start border-5 fw-bold">{{ session('error') }}</div>@endif
+ 
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745">
+         <h5 class="mb-0 text-success"><i class="bi bi-envelope me-2"></i>Bid Entry</h5>
+     </div>
+     <div class="card-body">
+         <form method="GET" class="row g-3 align-items-end">
+             <div class="col-md-4"><label class="form-label fw-bold">Select Case</label>
+                 <select name="CaseID" class="form-select" onchange="this.form.submit()">
+                     <option value="0">-- Select Case --</option>
+                     @foreach($cases as $c)<option value="{{ $c->CaseID }}" @selected($c->CaseID==$caseId)>{{ $c->CaseNo }}</option>@endforeach
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title', $showLPP ? 'Benchmarking' : 'Comparative Statement')
+ @push('head')
+ <style>.rate-input{width:80px!important;text-align:right}.gst-input{width:55px!important;text-align:right}</style>
+ @endpush
+ @section('content')
+ <div class="container-fluid mt-3">
+ @include('_partials.flash')
+ 
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745">
+         <h5 class="mb-0 text-success"><i class="bi bi-graph-up-arrow me-2"></i>{{ $showLPP ? 'Benchmarking' : 'Comparative Statement' }}</h5>
+     </div>
+     <div class="card-body">
+         <form method="get" class="row g-3 align-items-end">
+             <div class="col-md-4">
+                 <label class="form-label fw-bold">Select Case</label>
+                 <select name="CaseID" class="form-select" onchange="this.form.submit()">
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title', $showLPP ? 'Benchmarking' : 'Comparative Statement')
+ @push('head')
+ <style>.rate-input{width:80px!important;text-align:right}.gst-input{width:55px!important;text-align:right}</style>
+ @endpush
+ @section('content')
+ <div class="container-fluid mt-3">
+ @if(session('success'))<div class="alert alert-success border-start border-5 fw-bold">{{ session('success') }}</div>@endif
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745">
+         <h5 class="mb-0 text-success">{{ $showLPP ? 'Benchmarking' : 'Comparative Statement' }}</h5>
+     </div>
+     <div class="card-body">
+         <form method="GET" class="row g-3 align-items-end">
+             <div class="col-md-4"><label class="form-label fw-bold">Select Case</label>
+                 <select name="CaseID" class="form-select" onchange="this.form.submit()">
+                     <option value="0">-- Select Case --</option>
+                     @foreach($cases as $c)<option value="{{ $c->CaseID }}" @selected($c->CaseID==$caseId)>{{ $c->CaseNo }}</option>@endforeach
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title', $showLPP ? 'Benchmarking' : 'Comparative Statement')
+ @push('head')
+ <style>.rate-input{width:80px!important;text-align:right}.gst-input{width:55px!important;text-align:right}</style>
+ @endpush
+ @section('content')
+ <div class="container-fluid mt-3">
+ @if(session('success'))<div class="alert alert-success border-start border-5 fw-bold">{{ session('success') }}</div>@endif
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745">
+         <h5 class="mb-0 text-success">{{ $showLPP ? 'Benchmarking' : 'Comparative Statement' }}</h5>
+     </div>
+     <div class="card-body">
+         <form method="GET" class="row g-3 align-items-end">
+             <div class="col-md-4"><label class="form-label fw-bold">Select Case</label>
+                 <select name="CaseID" class="form-select" onchange="this.form.submit()">
+                     <option value="0">-- Select Case --</option>
+                     @foreach($cases as $c)<option value="{{ $c->CaseID }}" @selected($c->CaseID==$caseId)>{{ $c->CaseNo }}</option>@endforeach
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Financial Opening')
+ 
+ @push('head')
+ <style>
+     .financial-card   { border:1px solid #D9E2EC; background:#fff; }
+     .financial-header { background:#D9E2EC; border-bottom:2px solid #28a745; }
+     .readonly-field   { background-color:#f8f9fa !important; }
+     .amount-input     { text-align:right; }
+     table th, table td { white-space:nowrap; }
+     .bid-high { color:red !important; font-weight:bold; background-color:#ffe6e6 !important; }
+     .bid-low  { color:green !important; font-weight:bold; background-color:#e6ffe6 !important; }
+ </style>
+ @endpush
+ 
+ @section('content')
+ <div class="container-fluid mt-3">
+ 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Price Negotiation (PNC)')
+ @section('content')
+ <div class="container-fluid mt-3">
+ <div id="msgBox" class="alert d-none fw-bold border-start border-5 mb-3"></div>
+ 
+ <div class="card shadow-sm mb-4" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #17a2b8">
+         <h5 class="mb-0 text-info"><i class="bi bi-handshake me-2"></i>Price Negotiation Details</h5>
+     </div>
+     <div class="card-body">
+         <div class="row g-3 mb-3">
+             <div class="col-md-3"><label class="form-label fw-bold">Case No <span class="text-danger">*</span></label>
+                 <select id="ddlCaseID" class="form-select" onchange="loadCase()">
+                     <option value="0">-- Select Case --</option>
+                     @foreach($cases as $c)<option value="{{ $c->CaseID }}">{{ $c->CaseNo }}</option>@endforeach
+                 </select>
+             </div>
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ @section('title','TEC / Vendors Participation')
+ 
+ @push('head')
+ <style>
+     .vendor-card    { border:1px solid #D9E2EC; background:#fff; }
+     .vendor-header  { background:#D9E2EC; border-bottom:2px solid #0d6efd; }
+     .msg-gradient   { background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); color:white; }
+     .field-grid-section { background:#f8f9fa; border-left:4px solid #0d6efd; padding:15px; margin-bottom:20px; }
+     .datasheet-grid { font-size:0.9rem; }
+ </style>
+ @endpush
+ 
+ @section('content')
+ <div class="container-fluid mt-3">
+ 
+     <div id="msgBox" class="alert d-none fw-bold border-start border-5 mb-3" role="alert"></div>
+ 
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Commercial Opening Board – {{ $case->CaseNo }}</title>
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
+ <style>
+     body { background: white; padding: 30px; font-size: 14px; }
+     .print-header { text-align: center; margin-bottom: 10px; }
+     .master-table td { padding: 6px 10px; }
+     .para { margin: 0 0 14px 0; text-align: justify; }
+     .para-number { display: inline-block; width: 20px; margin-right: 15px; }
+     .para-text { display: inline; }
+     .sub-para { margin-left: 35px; margin-bottom: 10px; text-align: justify; }
+     .sub-para-number { display: inline-block; width: 35px; font-weight: bold; margin-right: 15px; }
+     .sub-para-text { display: inline; }
+     .no-print { text-align: right; margin-bottom: 10px; }
+     @media print {
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Comparative Statement – {{ $case->CaseNo }}</title>
+ <style>
+     @page { size: A4 portrait; margin: 0.8cm; }
+ 
+     body {
+         font-family: Arial, sans-serif;
+         font-size: 14px;
+         color: #000;
+         line-height: 1.4;
+         margin: 0;
+         padding: 0;
+     }
+ 
+     .certificate-box { width: 100%; margin: auto; margin-bottom: 20px; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>PNC Board Report – {{ $case->CaseNo }}</title>
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
+ <style>
+     body { background: white; padding: 30px; font-size: 14px; }
+     .master-table td { padding: 6px 10px; }
+     .para { margin: 0 0 14px 0; text-align: justify; }
+     .para-number { display: inline-block; width: 20px; margin-right: 15px; }
+     .para-text { display: inline; }
+     .sub-para { margin-left: 35px; margin-bottom: 10px; text-align: justify; }
+     .sub-para-number { display: inline-block; width: 35px; font-weight: bold; margin-right: 15px; }
+     .sub-para-text { display: inline; }
+     .no-print { text-align: right; margin-bottom: 10px; }
+     @media print {
+         body { margin: 0; padding: 15px; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>TEC Report – {{ $case->CaseNo }}</title>
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
+ <style>
+     @page { size: A4 portrait; margin: 0.8cm; }
+     body { font-family: Arial, sans-serif; font-size: 14px; color: #000; line-height: 1.4; margin: 0; padding: 0; }
+     .master-table td { padding: 6px 10px; }
+     .para { margin: 0 0 14px 0; text-align: justify; }
+     .para-number { display: inline-block; width: 20px; margin-right: 15px; }
+     .para-text { display: inline; }
+     .sub-para { margin-left: 35px; margin-bottom: 10px; text-align: justify; }
+     .sub-para-number { display: inline-block; width: 35px; font-weight: bold; margin-right: 15px; }
+     .sub-para-text { display: inline; }
+     .no-print { text-align: right; margin-bottom: 10px; }
+     @media print {
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <div class="card-header">
+         <h4>Add Salary Component</h4>
+     </div>
+     <div class="card-body">
+         <form method="POST" action="{{ route('salary-components.store') }}">
+             @csrf
+ 
+             <div class="mb-3">
+                 <label>Name</label>
+                 <input type="text" name="name" class="form-control" required>
+             </div>
+ 
+             <!-- ✅ NEW FIELD: CODE -->
+             <div class="mb-3">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <div class="card-header">
+         <h4>Edit Salary Component</h4>
+     </div>
+     <div class="card-body">
+         <form method="POST" action="{{ route('salary-components.update', $salaryComponent->id) }}">
+             @csrf
+             @method('PUT')
+             
+             <div class="mb-3">
+                 <label>Name</label>
+                 <input type="text" name="name" class="form-control" value="{{ $salaryComponent->name }}" required>
+             </div>
+ 
+             
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <!-- <div class="card-header">
+         <div class="row align-items-end">
+             <div class="col-md-3">
+                 <h4>Salary Components</h4>
+             </div>
+ 
+             <div class=" row col-md-7 align-items-center">
+                 <form method="GET" action="{{ route('salary-components.index') }}" id="filterForm" class="row g-2 mb-3">
+                     <div class="col-md-2">
+                         <label class="form-label">Name</label>
+                         <input type="text" name="name" value="{{ request('name') }}"
+                             class="form-control" placeholder="Name"
+                             onchange="this.form.submit()">
+                     </div>
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <div class="card-header">
+         <h4>Add Salary Component</h4>
+     </div>
+     <div class="card-body">
+         <form method="POST" action="{{ route('salary-components.store') }}">
+             @csrf
+ 
+             <div class="mb-3">
+                 <label>Name</label>
+                 <input type="text" name="name" class="form-control" required>
+             </div>
+ 
+             <!-- ✅ NEW FIELD: CODE -->
+             <div class="mb-3">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <div class="card-header">
+         <h4>Edit Salary Component</h4>
+     </div>
+     <div class="card-body">
+         <form method="POST" action="{{ route('salary-components.update', $salaryComponent->id) }}">
+             @csrf
+             @method('PUT')
+             
+             <div class="mb-3">
+                 <label>Name</label>
+                 <input type="text" name="name" class="form-control" value="{{ $salaryComponent->name }}" required>
+             </div>
+ 
+             
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <!-- <div class="card-header">
+         <div class="row align-items-end">
+             <div class="col-md-3">
+                 <h4>Salary Components</h4>
+             </div>
+ 
+             <div class=" row col-md-7 align-items-center">
+                 <form method="GET" action="{{ route('salary-components.index') }}" id="filterForm" class="row g-2 mb-3">
+                     <div class="col-md-2">
+                         <label class="form-label">Name</label>
+                         <input type="text" name="name" value="{{ request('name') }}"
+                             class="form-control" placeholder="Name"
+                             onchange="this.form.submit()">
+                     </div>
Removed / Before Commit
- <tr>
- <th>#</th>
- <th>Part No</th>
- <th>Equipment Name</th>
- <th>Nomenclature</th>
- <th>Hours</th>
- <tr>
- <td>{{ $loop->iteration }}</td>
- <td>{{ $row->part_no }}</td>
- <td>{{ $row->equipment_name }}</td>
- <td>{{ $row->nomenclature }}</td>
- <td>{{ $row->hours }}</td>
- data-equipment_name="{{ $row->equipment_name }}"
- data-nomenclature="{{ $row->nomenclature }}"
- data-hours="{{ $row->hours }}"
- onclick="openEditModal(this)"
- >
- <i class="fa fa-edit"></i>
Added / After Commit
+ <tr>
+ <th>#</th>
+ <th>Part No</th>
+                         <th>MFR No</th>
+ <th>Equipment Name</th>
+ <th>Nomenclature</th>
+ <th>Hours</th>
+ <tr>
+ <td>{{ $loop->iteration }}</td>
+ <td>{{ $row->part_no }}</td>
+                             <td>{{ $row->mfr_no }}</td>
+ <td>{{ $row->equipment_name }}</td>
+ <td>{{ $row->nomenclature }}</td>
+ <td>{{ $row->hours }}</td>
+ data-equipment_name="{{ $row->equipment_name }}"
+ data-nomenclature="{{ $row->nomenclature }}"
+ data-hours="{{ $row->hours }}"
+                                     data-mfr_no="{{ $row->mfr_no }}"
Removed / Before Commit
- <td>
- @foreach($entry->WorkOrders as $workorder)
- @foreach ($workorder->crcequipments as $iv)
-                             <div>{{ $iv->CrcEquipments->part_no }}</div>
- @endforeach
- @endforeach
- </td>
Added / After Commit
+ <td>
+ @foreach($entry->WorkOrders as $workorder)
+ @foreach ($workorder->crcequipments as $iv)
+                             <div>{{ $iv?->CrcEquipments?->part_no }}</div>
+ @endforeach
+ @endforeach
+ </td>
Removed / Before Commit
- 
- <tr>
- <td>{{ $item->CrcEquipments->part_no }}</td>
- <td></td>
- <td>{{ $item->CrcEquipments->nomenclature }}</td>
- <td>{{ $qty }}</td>
- <td></td>
Added / After Commit
+ 
+ <tr>
+ <td>{{ $item->CrcEquipments->part_no }}</td>
+ <td>{{ $item->CrcEquipments->mfr_no }}</td>
+ <td>{{ $item->CrcEquipments->nomenclature }}</td>
+ <td>{{ $qty }}</td>
+ <td></td>
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container">
+     <h4 class="mb-4">Update DA Rate</h4>
+ 
+     <form method="POST" action="{{ route('da.store') }}">
+         @csrf
+ 
+         <div class="row mb-3">
+ 
+             <div class="col-md-4">
+                 <label>Current DA</label>
+                 <input type="text" class="form-control" 
+                     value="{{ $currentDa }} %" disabled>
+             </div>
+ 
+             <div class="col-md-4">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container">
+     <h4 class="mb-4">Update DA Rate</h4>
+ 
+     <form method="POST" action="{{ route('da.store') }}">
+         @csrf
+ 
+         <div class="row mb-3">
+ 
+             <div class="col-md-4">
+                 <label>Current DA</label>
+                 <input type="text" class="form-control" 
+                     value="{{ $currentDa }} %" disabled>
+             </div>
+ 
+             <div class="col-md-4">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container">
+     <h4 class="mb-4">DA Change History</h4>
+ 
+     <div class="card">
+         <div class="card-body">
+ 
+             <div class="table-responsive">
+                 <table class="table table-bordered table-striped">
+ 
+                     <thead class="table-primary">
+                         <tr>
+                             <th>#</th>
+                             <th>Old DA (%)</th>
+                             <th>New DA (%)</th>
+                             <th>Effective From</th>
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container">
+     <h4 class="mb-4">DA Rates</h4>
+ 
+     <div class="card shadow-sm">
+         <div class="card-body">
+ 
+             <div class="table-responsive">
+                 <table class="table table-bordered table-striped align-middle">
+ 
+                     <thead class="table-primary text-center">
+                         <tr>
+                             <th>#</th>
+                             <th>DA (%)</th>
+                             <th>Effective From</th>
+                             <th>Created By</th>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container">
+     <h4 class="mb-4">Edit DA Rate</h4>
+ 
+     <div class="card shadow-sm">
+         <div class="card-body">
+             <form action="{{ route('da.update', $daRate->id) }}" method="POST">
+                 @csrf
+                 @method('PUT')
+ 
+                 <div class="row">
+                     <div class="col-md-6 mb-3">
+                         <label for="percentage" class="form-label">DA Percentage <span class="text-danger">*</span></label>
+                         <div class="input-group">
+                             <input type="number" 
+                                    name="percentage" 
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container">
+     <h4 class="mb-4">DA Change History</h4>
+ 
+     <div class="card">
+         <div class="card-body">
+ 
+             <div class="table-responsive">
+                 <table class="table table-bordered table-striped">
+ 
+                     <thead class="table-primary">
+                         <tr>
+                             <th>#</th>
+                             <th>Old DA (%)</th>
+                             <th>New DA (%)</th>
+                             <th>Effective From</th>
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container">
+     <h4 class="mb-4">DA Rates</h4>
+ 
+     <div class="card shadow-sm">
+         <div class="card-body">
+ 
+             <div class="table-responsive">
+                 <table class="table table-bordered table-striped align-middle">
+ 
+                     <thead class="table-primary text-center">
+                         <tr>
+                             <th>#</th>
+                             <th>DA (%)</th>
+                             <th>Effective From</th>
+                             <th>Status</th>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title', 'Dashboard')
+ 
+ @push('head')
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet">
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2"></script>
+ <style>
+ :root{--primary-gradient:linear-gradient(135deg,#667eea 0%,#764ba2 100%)}
+ body{background:linear-gradient(135deg,#f5f7fa 0%,#c3cfe2 100%)}
+ .dashboard-container{max-width:1400px;margin:0 auto;padding-top:1rem}
+ .row-1{display:grid;grid-template-columns:20% 20% 56%;gap:1.5rem;margin-bottom:2rem;min-height:520px;align-items:stretch}
+ .card{border:none;border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.08);transition:transform .3s,box-shadow .3s;animation:fadeInUp .6s ease forwards;background:#fff}
+ .card:hover{transform:translateY(-6px);box-shadow:0 20px 40px rgba(0,0,0,.12)}
+ .card-header{background:linear-gradient(135deg,#6c757d,#495057);border-radius:16px 16px 0 0;padding:1rem 1.25rem;display:flex;align-items:center;justify-content:space-between;min-height:64px}
+ .card-header h5,.card-header h6{margin:0;color:#fff!important;font-size:.9rem;text-shadow:0 2px 4px rgba(0,0,0,.3)}
+ .card-body{padding:1.25rem .75rem;display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;gap:.5rem;min-height:380px}
+ .vertical-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;padding:1rem .75rem;background:linear-gradient(135deg,rgba(255,255,255,.9),rgba(255,255,255,.7));border-radius:16px;box-shadow:0 8px 24px rgba(0,0,0,.06);text-align:center;flex:1;min-height:100px;transition:transform .3s}
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ @section('title','EAS Creation')
+ 
+ @push('head')
+ <style>
+     .eas-card      { border:1px solid #D9E2EC; background:#fff; }
+     .eas-header    { background:#D9E2EC; border-bottom:2px solid #28a745; }
+     .readonly-field { background-color:#f8f9fa !important; }
+     .order-input:focus { background-color:#d4edda !important; }
+     table th, table td { white-space: nowrap; }
+     .price-high { background-color:#f8d7da !important; color:#842029 !important; font-weight:bold; }
+     .price-low  { background-color:#d1e7dd !important; color:#0f5132 !important; font-weight:bold; }
+     .btn-custom { font-size:0.8rem; padding:0.25rem 0.6rem; }
+ </style>
+ @endpush
+ 
+ @section('content')
+ <div class="container-fluid mt-3">
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>EAS Approval Print – {{ $case->CaseNo }}</title>
+ <style>
+     @page { size: A4 portrait; margin: 0.8cm; }
+ 
+     body {
+         font-family: Arial, sans-serif;
+         font-size: 14px;
+         color: #000;
+         line-height: 1.4;
+         margin: 0;
+         padding: 0;
+     }
+ 
+     .header-section, .title-section { text-align: center; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Rule 155 Approval Print – {{ $case->CaseNo }}</title>
+ <style>
+     @page { size: A4 portrait; margin: 0.8cm; }
+ 
+     body {
+         font-family: Arial, sans-serif;
+         font-size: 14px;
+         color: #000;
+         line-height: 1.4;
+         margin: 0;
+         padding: 0;
+     }
+ 
+     .header-section, .title-section { text-align: center; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>DPMF-1 Certificate – {{ $case->CaseNo }}</title>
+ <style>
+     body { font-family: Arial, sans-serif; font-size: 14px; }
+ 
+     .container { width: 900px; margin: auto; }
+ 
+     h2 { text-align: center; }
+     h3 { text-align: left; margin: 5px 0; margin-left: 170px; }
+ 
+     table { width: 100%; border-collapse: collapse; }
+     table, td, th { border: 1px solid black; }
+     td, th { padding: 8px; }
+ 
+     .no-border td { border: none; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>EAS Direct Purchase – {{ $case->CaseNo }}</title>
+ <style>
+     @page { size: A4 portrait; margin: 0.8cm; }
+     body { font-family: Arial, sans-serif; font-size: 14px; color: #000; line-height: 1.4; margin: 0; padding: 0; }
+     .title-section { text-align: center; font-weight: bold; margin: 0 50px 20px 50px; line-height: 1.2; text-transform: uppercase; }
+     .para { margin: 0 0 12px 0; text-align: justify; }
+     .para-number { display: inline-block; min-width: 25px; }
+     .para-text { display: inline; font-weight: normal; }
+     .sub-para { margin-left: 35px; margin-bottom: 10px; text-align: justify; }
+     .sub-para-number { display: inline-block; width: 35px; margin-right: 10px; }
+     .sub-para-text { display: inline; font-weight: normal; }
+     table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
+     th, td { padding: 4px; border: 1px solid #000; text-align: center; vertical-align: middle; }
+     .signature-block { margin-top: 80px; font-weight: bold; text-align: left; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>EAS Approval GeM – {{ $case->CaseNo }}</title>
+ <style>
+     @page { size: A4 portrait; margin: 0.8cm; }
+     body { font-family: Arial, sans-serif; font-size: 14px; color: #000; line-height: 1.4; margin: 0; padding: 0; }
+     .title-section { text-align: center; font-weight: bold; margin: 0 50px 20px 50px; line-height: 1.2; text-transform: uppercase; }
+     .para { margin: 0 0 12px 0; text-align: justify; }
+     .para-number { display: inline-block; min-width: 25px; }
+     .para-text { display: inline; font-weight: normal; }
+     .sub-para { margin-left: 35px; margin-bottom: 10px; text-align: justify; }
+     .sub-para-number { display: inline-block; width: 35px; margin-right: 10px; }
+     .sub-para-text { display: inline; font-weight: normal; }
+     table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
+     th, td { padding: 4px; border: 1px solid #000; text-align: center; vertical-align: middle; }
+     .signature-block { margin-top: 90px; font-weight: bold; text-align: left; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Sanction Print – {{ $case->CaseNo }}</title>
+ <style>
+     @page { size: A4 portrait; margin: 0.8cm; }
+     body { font-family: Arial, sans-serif; font-size: 14px; color: #000; line-height: 1.4; margin: 0; padding: 0; }
+ 
+     .title { text-align: center; font-weight: bold; text-transform: uppercase; margin-bottom: 15px; }
+ 
+     table { width: 100%; border-collapse: collapse; }
+     th, td { border: 1px solid #000; padding: 6px; vertical-align: top; }
+     .no-border td { border: none; }
+     .center { text-align: center; }
+     .bold { font-weight: bold; }
+ 
+     .footer { margin-top: 20px; text-align: justify; text-indent: 30px; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>Supply Order – {{ $case->CaseNo }}</title>
+ <style>
+ * { margin:0; padding:0; box-sizing:border-box; }
+ body { font-family: Arial, sans-serif; font-size: 10.5pt; color: #000; background: #fff; }
+ 
+ .page {
+     width: 190mm;
+     height: 277mm;
+     margin: auto;
+     padding: 10mm 18mm;
+     page-break-after: always;
+     overflow: hidden;
+ }
+ .page:last-child { page-break-after: avoid; }
Removed / Before Commit
- <select id="productionYear" class="form-select">
- @foreach($years as $year)
- <option value="{{ encrypt($year->financial_year) }}"
-                                         {{ $year->is_active ? 'selected' : '' }}>
- {{ $year->financial_year }}
- </option>
- @endforeach
Added / After Commit
+ <select id="productionYear" class="form-select">
+ @foreach($years as $year)
+ <option value="{{ encrypt($year->financial_year) }}"
+                                         {{ $prod_year == $year->financial_year ? 'selected' : '' }}>
+ {{ $year->financial_year }}
+ </option>
+ @endforeach
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','All LPRs')
+ @section('content')
+ @php use App\Helpers\LpoHelper; @endphp
+ <div class="container-fluid mt-3">
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745">
+         <h5 class="mb-0 text-success"><i class="bi bi-clipboard-data me-2"></i>All LPRs</h5>
+     </div>
+     <div class="card-body">
+         <form method="GET" action="{{ route('lpr.all') }}" class="row g-3 align-items-end">
+             <div class="col-md-2"><label class="form-label fw-bold small">From Date</label><input type="date" name="from_date" class="form-control form-control-sm" value="{{ $fromDate }}"></div>
+             <div class="col-md-2"><label class="form-label fw-bold small">To Date</label><input type="date" name="to_date" class="form-control form-control-sm" value="{{ $toDate }}"></div>
+             <div class="col-md-3"><label class="form-label fw-bold small">User Group</label>
+                 <select name="UserGroupID" class="form-select form-select-sm">
+                     <option value="0">-- All --</option>
+                     @foreach($userGroups as $ug)<option value="{{ $ug->UserGroupID }}" @selected($ug->UserGroupID==$ugId)>{{ $ug->UserGroupName }}</option>@endforeach
+                 </select>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','LPR Edit')
+ @push('head')
+ <style>.lpr-header{background:#D9E2EC;border-bottom:2px solid #28a745}.readonly-field{background:#f8f9fa}table th,table td{white-space:nowrap}</style>
+ @endpush
+ @section('content')
+ <div class="container-fluid mt-3">
+ <div id="msgBox" class="alert d-none fw-bold border-start border-5" role="alert"></div>
+ 
+ {{-- Search --}}
+ <div class="card shadow-sm mb-4" style="border:1px solid #D9E2EC">
+     <div class="card-header lpr-header"><h5 class="mb-0 text-success"><i class="bi bi-search me-2"></i>Search LPR</h5></div>
+     <div class="card-body">
+         <div class="row g-3 align-items-end">
+             <div class="col-md-3">
+                 <label class="form-label fw-bold">User Group</label>
+                 <select id="ddlUserGroup" class="form-select" onchange="loadLPRs()">
+                     <option value="">-- All Groups --</option>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','LPR Entry')
+ @push('head')
+ <style>
+ .lpr-header{background:#D9E2EC;border-bottom:2px solid #28a745}
+ .readonly-field{background:#f8f9fa}
+ </style>
+ @endpush
+ 
+ @section('content')
+ <div class="container-fluid mt-3">
+ <div id="msgBox" class="alert d-none fw-bold border-start border-5" role="alert"></div>
+ 
+ {{-- LPR Master --}}
+ <div class="card shadow-sm mb-4" style="border:1px solid #D9E2EC">
+     <div class="card-header lpr-header d-flex justify-content-between align-items-center">
+         <h5 class="mb-0 text-success"><i class="bi bi-file-earmark-text me-2"></i>LPR Details</h5>
+     </div>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Pending LPRs / Cost Analysis')
+ @push('head')
+ <style>.lpr-card{border:1px solid #D9E2EC;background:#fff}.lpr-header{background:#D9E2EC;border-bottom:2px solid #007bff}.text-purple{color:#6f42c1!important}table th,table td{white-space:nowrap}</style>
+ @endpush
+ @section('content')
+ <div class="container-fluid mt-3">
+ <div id="msgBox" class="alert d-none fw-bold border-start border-5 mb-3" role="alert"></div>
+ 
+ {{-- Filters --}}
+ <div class="card shadow-sm mb-3">
+     <div class="card-body p-2">
+         <div class="row g-2 align-items-end">
+             <div class="col-lg-1 col-md-2"><label class="form-label small mb-1">From</label><input type="date" id="txtFromDate" class="form-control form-control-sm"></div>
+             <div class="col-lg-1 col-md-2"><label class="form-label small mb-1">To</label><input type="date" id="txtToDate" class="form-control form-control-sm"></div>
+             <div class="col-lg-1 col-md-2">
+                 <label class="form-label small mb-1">Month</label>
+                 <select id="ddlMonth" class="form-select form-select-sm">
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('content')
+ <style>
+ .select2-container { width: 100% !important; }
+ .select2-selection--single { min-height: 36px !important; display: flex !important; align-items: center !important; }
+ .select2-selection__rendered { line-height: 36px !important; }
+ .select2-selection__arrow { height: 36px !important; }
+ .select2-results__option { padding-left: 10px; display: flex; align-items: center; }
+ 
+ .filter-card {
+     border: 1px solid #dee2e6;
+     border-radius: 10px;
+     background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
+     box-shadow: 0 2px 8px rgba(0,0,0,0.06);
+     margin-bottom: 20px;
+ }
+ .filter-card-header {
+     background: linear-gradient(90deg, #0d6efd 0%, #0a58ca 100%);
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('content')
+ <style>
+ .select2-container { width: 100% !important; }
+ .select2-selection--single { min-height: 36px !important; display: flex !important; align-items: center !important; }
+ .select2-selection__rendered { line-height: 36px !important; }
+ .select2-selection__arrow { height: 36px !important; }
+ .select2-results__option { padding-left: 10px; display: flex; align-items: center; }
+ .filter-card { border: 1px solid #dee2e6; border-radius: 10px; background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%); box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px; }
+ .filter-card-header { background: linear-gradient(90deg, #0d6efd 0%, #0a58ca 100%); color: #fff; border-radius: 9px 9px 0 0; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
+ .filter-card-header .filter-title { font-weight: 600; font-size: 14px; letter-spacing: 0.3px; }
+ .filter-card-body { padding: 16px 18px 10px; }
+ .filter-label { font-size: 11.5px; font-weight: 600; color: #495057; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 0.4px; display: block; }
+ .active-filter-badge { display: inline-block; background: #fff; color: #0d6efd; border-radius: 12px; padding: 1px 9px; font-size: 11px; font-weight: 700; margin-left: 8px; }
+ .btn-reset-filters { font-size: 12px; padding: 3px 12px; border-radius: 20px; color: #0d6efd; background: #fff; border: none; font-weight: 600; text-decoration: none; }
+ .btn-reset-filters:hover { background: #e9f0ff; color: #0a58ca; }
+ #filterChevron { transition: transform 0.3s ease; }
+ .range-sep { display: flex; align-items: center; justify-content: center; font-weight: 700; color: #6c757d; padding-top: 22px; }
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('content')
+ <style>
+ .select2-container { width: 100% !important; }
+ .select2-selection { min-height: 32px; }
+ form { margin-bottom: 40px; }
+ .select2-results__option { padding-left: 10px; display: flex; align-items: center; }
+ .stat-box { padding: 15px; background: #f1f5f9; border-left: 5px solid #0d6efd; border-radius: 4px; margin-bottom: 15px; }
+ .btnt{
+ color:#6c757d!important;
+ }
+ .btnt:hover{
+ color:white!important;
+ }
+ button.btn{
+     color:#6c757d;
+ }
+ </style>
Removed / Before Commit
- <td>{{$remaining}}</td>
- <td>{{ \Carbon\Carbon::parse($row->date)->format('d-m-Y') }}</td>
- <td>
-             @if(!empty($row->qaInspectionInitiate->workEquipment->wcn_number))
- <small><b>WCN No:</b> {{ $row->qaInspectionInitiate->workEquipment->wcn_number ?? '-' }}</small>
- @elseif($row->qa_initiated)
-         <span class="badge bg-info">Sent to QA</span>
- 
- @else
- <form action="{{ route('mr.initiate.qa', $row->id) }}" method="POST">
Added / After Commit
+ <td>{{$remaining}}</td>
+ <td>{{ \Carbon\Carbon::parse($row->date)->format('d-m-Y') }}</td>
+ <td>
+            @if(!empty($row->qaInspectionInitiate?->workEquipment?->status == 'QA REJECTED'))
+            <small><b>QA REJECTED:</b>  <br>{{$row->qaInspectionInitiate->workEquipment->remark }}</small>
+             @elseif(!empty($row->qaInspectionInitiate?->workEquipment?->status == 'QC REJECTED'))
+            <small><b>QA REJECTED:</b>  <br>{{$row->qaInspectionInitiate->workEquipment->remark }}</small>
+             @elseif(!empty($row->qaInspectionInitiate->workEquipment->wcn_number))
+ <small><b>WCN No:</b> {{ $row->qaInspectionInitiate->workEquipment->wcn_number ?? '-' }}</small>
+ @elseif($row->qa_initiated)
+         <span class="badge bg-info">Sent to QA </span>
+ 
+ @else
+ <form action="{{ route('mr.initiate.qa', $row->id) }}" method="POST">
Removed / Before Commit
- <tbody>
- @foreach($equipments as $eq)
- @php
-                         $addedQty = $eq->mrManufacturingHistory->sum('quantity');
-                         $remaining = $eq->quantity - $addedQty;
- $latestDate = optional($eq->mrManufacturingHistory->sortByDesc('date')->first())->date;
- @endphp
- <tr>
- <td>{{ $eq->workOrder->job_no }}</td>
- <td>{{ $eq->main_eqpt }}</td>
- <td>{{ $eq->quantity }}</td>
-                         <td>{{ $remaining }}</td>
- <td>{{ $latestDate }}</td>
- <td>
-                             <button class="btn" onclick="openAddQtyModal({{ $eq->id }}, {{ $remaining }})"><i class="fas fa-plus" aria-hidden="true"></i></button>
- <a href="{{ route('mr_process.history', $eq->id) }}"><i class="fa fa-eye" aria-hidden="true"></i></a>
- </td>
- </tr>
Added / After Commit
+ <tbody>
+ @foreach($equipments as $eq)
+ @php
+ $latestDate = optional($eq->mrManufacturingHistory->sortByDesc('date')->first())->date;
+ @endphp
+ <tr>
+ <td>{{ $eq->workOrder->job_no }}</td>
+ <td>{{ $eq->main_eqpt }}</td>
+ <td>{{ $eq->quantity }}</td>
+                         <td>{{ $eq->remaining_quantity }}</td>
+ <td>{{ $latestDate }}</td>
+ <td>
+                             <button class="btn" onclick="openAddQtyModal({{ $eq->id }}, {{ $eq->remaining_quantity }})"><i class="fas fa-plus" aria-hidden="true"></i></button>
+ <a href="{{ route('mr_process.history', $eq->id) }}"><i class="fa fa-eye" aria-hidden="true"></i></a>
+ </td>
+ </tr>
+ <form id="addQtyForm" class="modal-content">
+ @csrf
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Vendor Bill Submission')
+ 
+ @push('head')
+ <style>
+     .eas-card    { border:1px solid #dee2e6; background:#fff; border-radius:8px; box-shadow:0 2px 4px rgba(0,0,0,.1); }
+     .eas-header  { background:#f8f9fa; border-bottom:2px solid #28a745; padding:15px 20px; }
+     .form-label  { font-weight:600; color:#495057; margin-bottom:.4rem; display:block; font-size:.88rem; }
+     .readonly-field   { background:#f8f9fa!important; color:#6c757d; }
+     .order-input:focus{ border-color:#28a745; box-shadow:0 0 0 .2rem rgba(40,167,69,.25); }
+     .locked-field { background:#e9ecef!important; opacity:.65; cursor:not-allowed; pointer-events:none; }
+     .currency-label { color:#28a745; font-weight:600; }
+     .btn-custom-sm { padding:.35rem .75rem!important; font-size:.82rem!important; border-radius:6px!important; height:36px!important; line-height:1.4!important; }
+     .btn-submit-custom  { background:linear-gradient(45deg,#28a745,#20c997)!important; border-color:#28a745!important; color:#fff!important; }
+     .btn-submit-custom:hover  { background:linear-gradient(45deg,#218838,#1ea085)!important; transform:translateY(-1px); }
+     .btn-dv-custom      { background:linear-gradient(45deg,#007bff,#0056b3)!important; border-color:#007bff!important; color:#fff!important; }
+     .btn-dv-custom:hover      { background:linear-gradient(45deg,#0069d9,#004085)!important; transform:translateY(-1px); }
+     .btn-save-dv-custom { background:linear-gradient(45deg,#17a2b8,#117a8b)!important; border-color:#17a2b8!important; color:#fff!important; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Order Cancellation')
+ 
+ @push('head')
+ <style>
+     .eas-card   { border:1px solid #dee2e6; background:#fff; border-radius:8px; box-shadow:0 2px 4px rgba(0,0,0,.1); margin-bottom:20px; }
+     .eas-header { background:#f8f9fa; border-bottom:2px solid #dc3545; padding:15px 20px; }
+     .form-label { font-weight:600; color:#495057; margin-bottom:.25rem!important; font-size:.8rem!important; }
+     .readonly-field     { background:#f8f9fa!important; color:#6c757d!important; }
+     .form-field-uniform { height:34px!important; min-height:34px!important; padding-top:.35rem!important; padding-bottom:.35rem!important; line-height:1.2!important; }
+     .currency-label     { color:#17a745; font-weight:600; }
+     .btn-cancel-custom  { background:linear-gradient(45deg,#dc3545,#fd7e14)!important; border-color:#dc3545!important; color:#fff!important; }
+     .btn-print-custom   { background:linear-gradient(45deg,#6f42c1,#20c997)!important; border-color:#6f42c1!important; color:#fff!important; }
+     .cancel-grid thead th { background:#dc3545!important; color:#fff!important; font-weight:600!important; position:sticky; top:0; z-index:1; font-size:.78rem; }
+     .cancel-grid tbody td { font-size:.8rem; vertical-align:middle; }
+     .status-cancelled   { color:#dc3545; font-weight:bold; background:#f8d7da; border-radius:4px; padding:2px 6px; white-space:nowrap; }
+     .status-cancellable { color:#856404; font-weight:bold; background:#fff3cd; border-radius:4px; padding:2px 6px; }
+     .status-blocked     { color:#6c757d; font-weight:bold; background:#e2e3e5; border-radius:4px; padding:2px 6px; white-space:nowrap; font-size:.75rem; }
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Challan Entry')
+ @section('content')
+ @php use App\Helpers\LpoHelper; @endphp
+ <div class="container-fluid mt-3">
+ @if(session('success'))<div class="alert alert-success border-start border-5 fw-bold">{{ session('success') }}</div>@endif
+ @if(session('error'))<div class="alert alert-danger border-start border-5 fw-bold">{{ session('error') }}</div>@endif
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745"><h5 class="mb-0 text-success"><i class="bi bi-truck me-2"></i>Challan Entry</h5></div>
+     <div class="card-body">
+         <form method="GET" class="row g-3 align-items-end">
+             <div class="col-md-4"><label class="form-label fw-bold">Select Order No</label>
+                 <select name="OrderNo" class="form-select" onchange="this.form.submit()">
+                     <option value="">Select Order No</option>
+                     @foreach($orderNos as $o)<option value="{{ $o->OrderNo }}" @selected($o->OrderNo===$orderNo)>{{ $o->OrderNo }}</option>@endforeach
+                 </select>
+             </div>
+         </form>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','CRV Entry')
+ @section('content')
+ <div class="container-fluid mt-3">
+ @if(session('success'))<div class="alert alert-success border-start border-5 fw-bold">{{ session('success') }}</div>@endif
+ @if(session('error'))<div class="alert alert-danger border-start border-5 fw-bold">{{ session('error') }}</div>@endif
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745"><h5 class="mb-0 text-success"><i class="bi bi-receipt me-2"></i>CRV Entry</h5></div>
+     <div class="card-body">
+         <form method="GET" class="row g-3 align-items-end">
+             <div class="col-md-4"><label class="form-label fw-bold">Select Order No</label>
+                 <select name="OrderNo" class="form-select" onchange="this.form.submit()">
+                     <option value="">Select Order No</option>
+                     @foreach($orderNos as $o)<option value="{{ $o->OrderNo }}" @selected($o->OrderNo===$orderNo)>{{ $o->OrderNo }}</option>@endforeach
+                 </select>
+             </div>
+         </form>
+     </div>
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Delivery Period Extension')
+ 
+ @push('head')
+ <style>
+     .eas-card         { border:1px solid #dee2e6; background:#fff; border-radius:8px; box-shadow:0 2px 4px rgba(0,0,0,.1); margin-bottom:20px; }
+     .eas-header       { background:#f8f9fa; border-bottom:2px solid #0d6efd; padding:15px 20px; }
+     .form-label       { font-weight:600; color:#495057; margin-bottom:.25rem !important; font-size:.875rem !important; }
+     .readonly-field   { background-color:#f8f9fa !important; color:#6c757d !important; }
+     .form-field-uniform { height:34px !important; min-height:34px !important; padding-top:.35rem !important; padding-bottom:.35rem !important; line-height:1.2 !important; }
+     .currency-label   { color:#17a745; font-weight:600; }
+     .btn-extend-custom { background:linear-gradient(45deg,#0d6efd,#198754) !important; border-color:#0d6efd !important; color:white !important; }
+     .btn-print-custom  { background:linear-gradient(45deg,#6f42c1,#20c997) !important; border-color:#6f42c1 !important; color:white !important; }
+     .btn-clear-custom  { background:linear-gradient(45deg,#6c757d,#adb5bd) !important; border-color:#6c757d !important; color:white !important; }
+     .extend-grid th   { background-color:#0d6efd !important; color:white !important; font-weight:600 !important; position:sticky; top:0; }
+     .status-extendable { color:#198754; font-weight:bold; background:#d1e7dd !important; border-radius:4px; padding:2px 8px; }
+     .status-extended   { color:#0d6efd; font-weight:bold; background:#cfe2ff !important; border-radius:4px; padding:2px 8px; }
+     .card-actions-footer { border-top:1px solid #dee2e6; padding:15px 20px; background:#f8f9fa; border-radius:0 0 8px 8px; }
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Supply Orders')
+ @section('content')
+ @php use App\Helpers\LpoHelper; @endphp
+ <div class="container-fluid mt-3">
+ <div id="msgBox" class="alert d-none fw-bold border-start border-5"></div>
+ 
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745">
+         <h5 class="mb-0 text-success"><i class="bi bi-cart me-2"></i>Supply Orders</h5>
+     </div>
+     <div class="card-body">
+         <form method="GET" class="row g-3 align-items-end">
+             <div class="col-md-4"><label class="form-label fw-bold">Select Case</label>
+                 <select name="CaseID" class="form-select" onchange="this.form.submit()">
+                     <option value="0">Select Case</option>
+                     @foreach($cases as $c)<option value="{{ $c->CaseID }}" @selected($c->CaseID==$caseId)>{{ $c->CaseNo }}</option>@endforeach
+                 </select>
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <title>Extension of Delivery Period</title>
+ <script>
+ window.onload = function () { window.print(); };
+ </script>
+ <style>
+ @page { size: A4 portrait; margin: 0.8cm; }
+ body { font-family: Arial; font-size: 14px; color: #000; line-height: 1.4; margin: 0; padding: 0; }
+ .title-section { text-align: center; font-weight: bold; margin: 0 30px 20px 30px; text-transform: uppercase; }
+ .para { margin: 0 0 12px 0; text-align: justify; }
+ .para-number { display: inline-block; min-width: 25px; }
+ table { width: 100%; border-collapse: collapse; margin-top: 10px; margin-bottom: 10px; }
+ th, td { padding: 4px; border: 1px solid #000; text-align: center; vertical-align: middle; }
+ .print-header { margin-bottom: 10px; }
+ .signature-block { margin-top: 80px; font-weight: bold; }
Removed / Before Commit
- \ No newline at end of file
Added / After Commit
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <title>Inspection Note</title>
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" />
+ <style>
+ @media print {
+     @page { margin-left:.5cm; margin-right:.5cm; margin-top:.5cm; margin-bottom:.5cm; }
+     .no-print { display: none; }
+ }
+ body { padding: 40px; font-size: 14px; font-family: Arial, sans-serif; }
+ .title { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 25px; letter-spacing: 1px; }
+ table td { padding: 4px 0; vertical-align: top; }
+ .table-bordered th, .table-bordered td { border: 1px solid #000 !important; }
+ .grid-header { background-color: #f1f1f1; font-weight: 600; text-align: center; }
+ .signature-section { margin-top: 40px; }
+ .receipt-cert { text-align: center; font-weight: bold; text-decoration: underline; margin: 12px 0; }
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container-fluid">
+     <div class="row">
+         <div class="col-md-6 offset-md-3">
+             <div class="card">
+                 <div class="card-header">
+                     <h4 class="mb-0">Add Pay Matrix Entry</h4>
+                 </div>
+                 <div class="card-body">
+                     <form action="{{ route('pay-matrix.store') }}" method="POST">
+                         @csrf
+                         
+                         <div class="mb-3">
+                             <label for="level" class="form-label">Level <span class="text-danger">*</span></label>
+                             <input type="number" 
+                                    name="level" 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container-fluid">
+     <div class="row">
+         <div class="col-md-6 offset-md-3">
+             <div class="card">
+                 <div class="card-header">
+                     <h4 class="mb-0">Edit Pay Matrix Entry</h4>
+                 </div>
+                 <div class="card-body">
+                     <form action="{{ route('pay-matrix.update', $payMatrix->id) }}" method="POST">
+                         @csrf
+                         @method('PUT')
+                         
+                         <div class="mb-3">
+                             <label for="level" class="form-label">Level <span class="text-danger">*</span></label>
+                             <input type="number" 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container-fluid">
+     <div class="row">
+         <div class="col-12">
+             <div class="card">
+                 <div class="card-header">
+                     <h4 class="mb-0">Pay Matrix</h4>
+                 </div>
+                 <div class="card-body">
+                     @if(session('success'))
+                         <div class="alert alert-success alert-dismissible fade show" role="alert">
+                             {{ session('success') }}
+                             <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+                         </div>
+                     @endif
+ 
Removed / Before Commit
- </select>
- </div>
- 
-         <!-- <div class="col-md-3">
-             <a href="{{ route('qc.index') }}" class="btn btn-info">Reset</a>
-         </div> -->
- </div>
- </form>
- 
- 
-                 <!-- <form method="GET" action="{{ route('qc.index') }}" class="mb-1">
-                     <div class="row align-items-end">
-                     <div class="col-md-5">
-                         <label for="job_no" class="form-label">Job Number</label>
-                         <select name="job_no" class="form-select select2" data-placeholder="Select or search Job Number">
-                             <option value="">-- Select Job No --</option>
-                             @foreach($jobNumbers as $jobNo)
-                                 <option value="{{ $jobNo }}" {{ request('job_no') == $jobNo ? 'selected' : '' }}>
Added / After Commit
+ </select>
+ </div>
+ 
+ </div>
+ </form>
+ 
+ </div>
+ </div>
+ </div>
+ });
+ });
+ </script>
+ <script>
+ $(document).ready(function () {
+ 
+     $('#qcModal form').on('submit', function (e) {
+         e.preventDefault();
+ 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','ABC Analysis Report')
+ @section('content')
+ @php use App\Helpers\LpoHelper; @endphp
+ <div class="container-fluid mt-3">
+ 
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745"><h5 class="mb-0 text-success"><i class="bi bi-pie-chart me-2"></i>ABC Analysis Report</h5></div>
+     <div class="card-body">
+         <form method="GET" class="row g-3 align-items-end">
+             <div class="col-md-3"><label class="form-label fw-bold">Financial Year</label>
+                 <select name="ddlFY" class="form-select">
+                     <option value="All" @selected($selFY==='All')>All Years</option>
+                     @foreach($fyList as $fy)<option value="{{ $fy->FinancialYear }}" @selected($selFY==$fy->FinancialYear)>{{ $fy->FinancialYear }}</option>@endforeach
+                 </select>
+             </div>
+             <div class="col-md-3"><label class="form-label fw-bold">Grant</label>
+                 <select name="ddlGrant" class="form-select">
Removed / Before Commit
- 
- </select>
- </div>
- 
- 
- 
- <tr>
- 
- <th>Ser No</th>
- <th>Job No</th>
- <th>CRC No</th>
- <th>WCN No</th>
- <tr>
- 
- <td>{{ $records->firstItem() + $index }}</td>
- 
- <td>{{ $r->job_no }}</td>
- <td>{{ $r->crc_no }}</td>
Added / After Commit
+ 
+ </select>
+ </div>
+ <div class="col-md-2 mt-3">
+     <label class="form-label">Unit</label>
+     <select name="unit_id" class="form-select select2">
+         <option value="">-- Select --</option>
+ 
+         @foreach($units as $id => $name)
+             <option value="{{ $id }}" {{ request('unit_id')==$id ? 'selected':'' }}>
+                 {{ $name }}
+             </option>
+         @endforeach
+     </select>
+ </div>
+ 
+ 
+ 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Order State Report')
+ @section('content')
+ @php use App\Helpers\LpoHelper; @endphp
+ <div class="container-fluid mt-3">
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745"><h5 class="mb-0 text-success"><i class="bi bi-list-check me-2"></i>Order State Report</h5></div>
+     <div class="card-body">
+         <form method="GET" class="row g-2 align-items-end">
+             <div class="col-md-2"><label class="form-label fw-bold small">Grant</label>
+                 <select name="GrantID" class="form-select form-select-sm">@foreach($grants as $g)<option value="{{ $g->GrantID }}" @selected($g->GrantID==$grantId)>{{ $g->GrantName }}</option>@endforeach</select>
+             </div>
+             <div class="col-md-2"><label class="form-label fw-bold small">Vendor</label>
+                 <select name="VendorID" class="form-select form-select-sm">@foreach($vendors as $v)<option value="{{ $v->VendorID }}" @selected($v->VendorID==$vendorId)>{{ $v->VendorName }}</option>@endforeach</select>
+             </div>
+             <div class="col-md-2"><label class="form-label fw-bold small">User Group</label>
+                 <select name="UserGroupID" class="form-select form-select-sm">@foreach($ugroups as $u)<option value="{{ $u->UserGroupID }}" @selected($u->UserGroupID==$ugId)>{{ $u->UserGroupName }}</option>@endforeach</select>
+             </div>
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ @section('title','Master Search')
+ @section('content')
+ <div class="container-fluid mt-3">
+ <div class="card shadow-sm mb-3" style="border:1px solid #D9E2EC">
+     <div class="card-header" style="background:#D9E2EC;border-bottom:2px solid #28a745"><h5 class="mb-0 text-success"><i class="bi bi-search me-2"></i>Master Search</h5></div>
+     <div class="card-body">
+         <form method="GET" class="row g-3 align-items-end">
+             <div class="col-md-3"><label class="form-label fw-bold">Table</label>
+                 <select name="table" class="form-select" onchange="this.form.submit()">
+                     <option value="">-- Select Table --</option>
+                     @foreach($tables as $t)<option value="{{ $t->TABLE_NAME }}" @selected($t->TABLE_NAME===$selectedTable)>{{ $t->TABLE_NAME }}</option>@endforeach
+                 </select>
+             </div>
+             <div class="col-md-3"><label class="form-label fw-bold">Column</label>
+                 <select name="column" class="form-select" @disabled(empty($columns))>
+                     <option value="">-- Select Column --</option>
+                     @foreach($columns as $c)<option value="{{ $c->COLUMN_NAME }}" @selected($c->COLUMN_NAME===$selectedColumn)>{{ $c->COLUMN_NAME }} ({{ $c->DATA_TYPE }})</option>@endforeach
Removed / Before Commit
- <div class="card-body">
- <form method="POST" action="{{ route('salary-components.store') }}">
- @csrf
- <div class="mb-3">
- <label>Name</label>
- <input type="text" name="name" class="form-control" required>
- </div>
- <div class="mb-3">
- <label>Type</label>
- <select name="type" class="form-control">
- <option value="earning">Earning</option>
- <option value="deduction">Deduction</option>
- </select>
- </div>
- <div class="mb-3">
- <label>Calculation Type</label>
-                 <select name="calculation_type" class="form-control">
- <option value="fixed">Fixed</option>
Added / After Commit
+ <div class="card-body">
+ <form method="POST" action="{{ route('salary-components.store') }}">
+ @csrf
+ 
+ <div class="mb-3">
+ <label>Name</label>
+ <input type="text" name="name" class="form-control" required>
+ </div>
+ 
+             <!-- ✅ NEW FIELD: CODE -->
+             <div class="mb-3">
+                 <label>Code</label>
+                 <input type="text" name="code" class="form-control" required placeholder="e.g., BASIC, DA, HRA">
+                 <small class="text-muted">Unique code (UPPERCASE recommended)</small>
+             </div>
+ 
+             <div class="mb-3">
+                 <label>Category</label>
Removed / Before Commit
- <input type="text" name="name" class="form-control" value="{{ $salaryComponent->name }}" required>
- </div>
- 
- <div class="mb-3">
- <label>Type</label>
- <select name="type" class="form-control">
- 
- <div class="mb-3">
- <label>Calculation Type</label>
-                 <select name="calculation_type" class="form-control">
- <option value="fixed" {{ $salaryComponent->calculation_type=='fixed' ? 'selected' : '' }}>Fixed</option>
- <option value="percentage" {{ $salaryComponent->calculation_type=='percentage' ? 'selected' : '' }}>Percentage</option>
- <option value="formula" {{ $salaryComponent->calculation_type=='formula' ? 'selected' : '' }}>Formula</option>
- </select>
- </div>
- 
- <div class="mb-3">
- <label>Frequency</label>
Added / After Commit
+ <input type="text" name="name" class="form-control" value="{{ $salaryComponent->name }}" required>
+ </div>
+ 
+             
+             <div class="mb-3">
+                 <label>Code</label>
+                 <input type="text" name="code" class="form-control"
+                        value="{{ $salaryComponent->code }}"
+                        required placeholder="e.g., BASIC, DA, HRA">
+                 <small class="text-muted">Unique code (UPPERCASE recommended)</small>
+             </div>
+ 
+             <div class="mb-3">
+                 <label>Category</label>
+                 <select name="category" class="form-control" required>
+                     <option value="1" {{ $salaryComponent->category==1 ? 'selected' : '' }}>Government</option>
+                     <option value="2" {{ $salaryComponent->category==2 ? 'selected' : '' }}>Non-Government</option>
+                 </select>
Removed / Before Commit
- <tr>
- <th>Name</th>
- <th>Type</th>
- <th>Calculation Type</th>
- <th>Frequency</th>
- <th>Status</th>
- <th>Action</th>
- <tr>
- <td>{{ $comp->name }}</td>
- <td>{{ ucfirst($comp->type) }}</td>
- <td>{{ ucfirst($comp->calculation_type) }}</td>
- <td>{{ ucfirst($comp->frequency) }}</td>
- <td>{{ $comp->is_active ? 'Active' : 'Inactive' }}</td>
- <td>
- </a>
- 
- <!-- Delete -->
-                         @if(!in_array($comp->name, $govtFixedComponents))
Added / After Commit
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+                     <th>Code</th>
+ <th>Calculation Type</th>
+                     <th>Components Type</th>
+                     <th>Formula</th>
+ <th>Frequency</th>
+ <th>Status</th>
+ <th>Action</th>
+ <tr>
+ <td>{{ $comp->name }}</td>
+ <td>{{ ucfirst($comp->type) }}</td>
+                     <td>{{ ucfirst($comp->code) }}</td>
+ <td>{{ ucfirst($comp->calculation_type) }}</td>
+                     <td>@if($comp->category==1) Goverment @else Non-Goverment @endif</td>
+                     <td>
+                         @if($comp->calculation_type == 'formula' && $comp->formula)
Removed / Before Commit
- <h4>Edit Salary Group</h4>
- <a href="{{ route('salary-groups.index') }}" class="btn btn-secondary btn-sm">Back</a>
- </div>
- <div class="card-body">
- <form action="{{ route('salary-groups.update', $group->id) }}" method="POST">
- @csrf
- @method('PUT')
- 
- <div class="mb-3">
- <label>Group Name <span class="text-danger">*</span></label>
-                 <input type="text" name="name" class="form-control" value="{{ old('name', $group->name) }}" required>
- </div>
- 
- <div class="mb-3">
- <label>Description</label>
-                 <textarea name="description" class="form-control" placeholder="Optional description">{{ old('description', $group->description) }}</textarea>
- </div>
- 
Added / After Commit
+ <h4>Edit Salary Group</h4>
+ <a href="{{ route('salary-groups.index') }}" class="btn btn-secondary btn-sm">Back</a>
+ </div>
+ 
+ <div class="card-body">
+ <form action="{{ route('salary-groups.update', $group->id) }}" method="POST">
+ @csrf
+ @method('PUT')
+ 
+ <div class="mb-3">
+ <label>Group Name <span class="text-danger">*</span></label>
+                 <input type="text" name="name" class="form-control"
+                        value="{{ old('name', $group->name) }}" required>
+ </div>
+ 
+ <div class="mb-3">
+ <label>Description</label>
+                 <textarea name="description" class="form-control"
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <div class="card-header py-3">
+         <div class="row align-items-center">
+             <div class="col-md-10">
+                 <h4 class="mb-0"><b>Add Salary Level</b></h4>
+             </div>
+             <div class="col-md-2">
+                 <a href="{{ route('salary-levels.index') }}" class="btn btn-secondary btn-sm float-end">Back to List</a>
+             </div>
+         </div>
+     </div>
+ 
+     <div class="card-body">
+         @if($errors->any())
+             <div class="alert alert-danger">
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <div class="card-header py-3">
+         <div class="row align-items-center">
+             <div class="col-md-10">
+                 <h4 class="mb-0"><b>Edit Salary Level</b></h4>
+             </div>
+             <div class="col-md-2">
+                 <a href="{{ route('salary-levels.index') }}" class="btn btn-secondary btn-sm float-end">Back to List</a>
+             </div>
+         </div>
+     </div>
+ 
+     <div class="card-body">
+         @if($errors->any())
+             <div class="alert alert-danger">
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="card">
+     <div class="card-header py-3">
+         <div class="row align-items-center">
+             <div class="col-md-10">
+                 <h4 class="mb-0"><b>Salary Levels</b></h4>
+             </div>
+             <div class="col-md-2">
+                 <a href="{{ route('salary-levels.create') }}" class="btn btn-primary btn-sm float-end">+ Add Level</a>
+             </div>
+         </div>
+     </div>
+ 
+     <div class="card-body">
+         @if(session('success'))
+             <div class="alert alert-success alert-dismissible fade show" role="alert">
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container-fluid">
+     <div class="row">
+         <div class="col-md-6 offset-md-3">
+             <div class="card">
+                 <div class="card-header">
+                     <h4 class="mb-0">Add Pay Matrix Entry</h4>
+                 </div>
+                 <div class="card-body">
+                     <form action="{{ route('pay-matrix.store') }}" method="POST">
+                         @csrf
+                         
+                         <div class="mb-3">
+                             <label for="level" class="form-label">Level <span class="text-danger">*</span></label>
+                             <input type="number" 
+                                    name="level" 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container-fluid">
+     <div class="row">
+         <div class="col-md-6 offset-md-3">
+             <div class="card">
+                 <div class="card-header">
+                     <h4 class="mb-0">Edit Pay Matrix Entry</h4>
+                 </div>
+                 <div class="card-body">
+                     <form action="{{ route('pay-matrix.update', $payMatrix->id) }}" method="POST">
+                         @csrf
+                         @method('PUT')
+                         
+                         <div class="mb-3">
+                             <label for="level" class="form-label">Level <span class="text-danger">*</span></label>
+                             <input type="number" 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <div class="container-fluid">
+     <div class="row">
+         <div class="col-12">
+             <div class="card">
+                 <div class="card-header">
+                     <h4 class="mb-0">Pay Matrix</h4>
+                 </div>
+                 <div class="card-body">
+                     @if(session('success'))
+                         <div class="alert alert-success alert-dismissible fade show" role="alert">
+                             {{ session('success') }}
+                             <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+                         </div>
+                     @endif
+ 
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <style>
+     @media print {
+         .no-print { display: none; }
+         .salary-slip { box-shadow: none !important; }
+     }
+     
+     .salary-slip {
+         background: white;
+         padding: 30px;
+         box-shadow: 0 0 10px rgba(0,0,0,0.1);
+     }
+     
+     .slip-header {
+         border-bottom: 3px solid #333;
+         padding-bottom: 15px;
Removed / Before Commit

                                                
Added / After Commit
+ @extends('layouts.app')
+ 
+ @section('content')
+ <style>
+     .info-card {
+         border-left: 4px solid #198754;
+         background: #f8f9fa;
+     }
+     .section-header {
+         background: linear-gradient(135deg, #198754 0%, #20c997 100%);
+         color: white;
+         padding: 10px 15px;
+         border-radius: 5px;
+         margin-bottom: 15px;
+     }
+     .component-row {
+         border-bottom: 1px solid #dee2e6;
+         padding: 10px 0;
Removed / Before Commit

                                                
Added / After Commit
+ <!DOCTYPE html>
+ <html>
+ <head>
+     <meta charset="utf-8">
+     <title>Salary Slip - {{ $monthName }}</title>
+     <style>
+         * {
+             margin: 0;
+             padding: 0;
+             box-sizing: border-box;
+         }
+         
+         body {
+             font-family: 'DejaVu Sans', sans-serif;
+             font-size: 11px;
+             color: #333;
+             line-height: 1.4;
+         }