Pārlūkot izejas kodu

[common] Correctif modèle Product

refactoring
Guillaume pirms 4 gadiem
vecāks
revīzija
2da1652542
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. +3
    -1
      common/models/Product.php

+ 3
- 1
common/models/Product.php Parādīt failu

@@ -176,7 +176,9 @@ class Product extends ActiveRecordCommon
public function afterFind() {
if ($this->taxRate == null) {
$producer = Producer::searchOne(['id' => GlobalParam::getCurrentProducerId()]) ;
$this->populateRelation('taxRate', $producer->taxRate);
if($producer) {
$this->populateRelation('taxRate', $producer->taxRate);
}
//$this->populateRelation('taxRate', GlobalParam::getCurrentProducer()->taxRate);
}


Notiek ielāde…
Atcelt
Saglabāt