<?php
namespace App\Controllers\Accounting;

use App\Controllers\BaseController;
use Config\Database;

class Vat extends BaseController
{
    public function index()
    {
        $db = Database::connect();
        $receiptsCount = 0;
        try { $receiptsCount = $db->table('receipts')->countAllResults(); } catch (\Throwable $e) { $receiptsCount = 0; }
        return view('accounting/vat', [
            'title' => lang('App.vat_tax_overview'),
            'receiptsCount' => $receiptsCount,
        ]);
    }
}
