feat(tax): implement tax rate history tracking and API endpoints

This commit is contained in:
hamed
2026-06-24 13:17:08 +03:30
parent 148d033114
commit 89e4a424f8
7 changed files with 186 additions and 82 deletions
@@ -10,8 +10,6 @@ class SiteConfigRepository extends ServiceEntityRepository
{
// Default values returned when a key is missing from DB
private const DEFAULTS = [
'commission_enabled' => '0',
'commission_percent' => '0',
// financial engine
'appointment_commission_enabled' => '0',
'upgrade_commission_enabled' => '0',
@@ -0,0 +1,21 @@
<?php
namespace App\Config\Repository;
use App\Config\Entity\TaxRateHistory;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
class TaxRateHistoryRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, TaxRateHistory::class);
}
public function save(TaxRateHistory $entity, bool $flush = true): void
{
$this->getEntityManager()->persist($entity);
if ($flush) $this->getEntityManager()->flush();
}
}