<?php

namespace Modules\Additional\Specifique\Client130\Modules\Panier\Service;

use Helpers\Outil\Sql;

class InitSpecifiqueCDC
{
    public static function getCDC(\PDO $pdo, string $cdc):string
    {
        $spec = new SpecPanierLigneService();

        $result = $spec->initAxesImputation(
            $pdo,
            $_SESSION['id_panier'],
            null,
            ['SI_CODE' => $_SESSION['Session_SectionImputation']],
            false
        );
        
        if ($result) {
            return (string) $result;
        } else {
            return $cdc;
        }
    }
}
