浏览代码

[common] Correctif modèle Product

refactoring
Guillaume 4 年前
父节点
当前提交
2da1652542
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      common/models/Product.php

+ 3
- 1
common/models/Product.php 查看文件

@@ -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);
}


正在加载...
取消
保存