bug fix for old docs

This commit is contained in:
Hesabix 2024-05-22 17:16:20 +00:00
parent 74dd972f3d
commit 151f6f2c17

View file

@ -124,7 +124,7 @@ class Explore
}
public static function ExploreHesabdariRow(HesabdariRow $row)
{
return [
$temp = [
'id' => $row->getId(),
'bid' => self::ExploreBid($row->getBid()),
'year' => self::ExploreYear($row->getYear()),
@ -139,9 +139,14 @@ class Explore
'plugin' => $row->getPlugin(),
'commodity_count' => $row->getCommdityCount(),
'commodity' => self::ExploreCommodity($row->getCommodity(), $row->getCommdityCount(), $row->getDes()),
'tax' =>$row->getTax(),
'discount' =>$row->getDiscount(),
];
if (!$row->getTax())
$row->setTax(0);
if (!$row->getDiscount())
$row->setDiscount(0);
$temp['tax'] = $row->getTax();
$temp['discount'] = $row->getDiscount();
return $temp;
}
public static function ExploreCommodity(Commodity | null $item, int | null $count = 0, string $des = '')