|
|
|
|
|
|
|
|
public function afterFind() { |
|
|
public function afterFind() { |
|
|
if ($this->taxRate == null) { |
|
|
if ($this->taxRate == null) { |
|
|
$producer = Producer::searchOne(['id' => GlobalParam::getCurrentProducerId()]) ; |
|
|
$producer = Producer::searchOne(['id' => GlobalParam::getCurrentProducerId()]) ; |
|
|
$this->populateRelation('taxRate', $producer->taxRate); |
|
|
|
|
|
|
|
|
if($producer) { |
|
|
|
|
|
$this->populateRelation('taxRate', $producer->taxRate); |
|
|
|
|
|
} |
|
|
//$this->populateRelation('taxRate', GlobalParam::getCurrentProducer()->taxRate); |
|
|
//$this->populateRelation('taxRate', GlobalParam::getCurrentProducer()->taxRate); |
|
|
} |
|
|
} |
|
|
|
|
|
|