Improve the reliability and usability of the shipping rates import process and update PDF document templates for better visual fidelity. - Enhance `ImportShippingRates` command with `--clear` and `--dry-run` options to prevent accidental data loss and allow safe testing. - Implement error handling and statistics tracking in `ShippingRatesImport` to capture skipped rows and import errors. - Refactor AWB and Label PDF templates to use A4 standard dimensions and improved CSS layouts. - Integrate company logo into PDF headers. - Add a new pricing inquiry page and navigation link. - Clean up obsolete test scripts.
23 lines
636 B
PHP
23 lines
636 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Country;
|
|
use App\Models\SystemSetting;
|
|
use Illuminate\Http\Request;
|
|
|
|
class PricingPageController extends Controller
|
|
{
|
|
public function __invoke()
|
|
{
|
|
$countries = Country::orderBy('name')->get(['id', 'name', 'iso_code']);
|
|
$settings = [
|
|
'aed_to_irr' => (float) SystemSetting::get('aed_to_irr', 455000),
|
|
'profit_margin' => (float) SystemSetting::get('profit_margin', 1.25),
|
|
'vat_rate' => (float) SystemSetting::get('vat_rate', 0.09),
|
|
];
|
|
|
|
return view('pricing.index', compact('countries', 'settings'));
|
|
}
|
|
}
|