@extends('layouts.mainlayout') @section('fullwidth', true) @section('content') @php $farms = DB::table('farm')->select('id', 'farm_name')->where('status', 1)->orderBy('farm_name')->get(); $salaryYears = collect(DB::select("SELECT SUBSTRING_INDEX(table_name, '_', -1) AS year FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name REGEXP '^konyvel_ado_[0-9]{4}$' ORDER BY table_name DESC")); $exchangeRates = DB::table('a_sek_price')->orderByDesc('p_date')->limit(4)->get()->reverse(); $exchangeExists = DB::table('a_sek_price')->whereYear('p_date', date('Y'))->whereMonth('p_date', date('m'))->exists(); $canSeeAccounting = Auth::user()->hasRoleOrSuperAdmin('accountancy') || Auth::user()->hasRoleOrSuperAdmin('contactperson'); @endphp