diff --git a/www/app/pages/reference/categorylist.php b/www/app/pages/reference/categorylist.php index 0715b5881..b49291ed5 100644 --- a/www/app/pages/reference/categorylist.php +++ b/www/app/pages/reference/categorylist.php @@ -406,6 +406,8 @@ public function savepriceOnClick($sender) { foreach($this->_cplist as $it ) { + if(round($it->newp)==0) continue; + $item= \App\Entity\Item::load($it->item_id); $item->{'price'.$pt} = round($it->newp); $item->save(); @@ -425,12 +427,12 @@ public function calcpriceOnClick($sender) { if($pt < 1) return; $v =trim($this->categoryprice->chprice->getText()); + $isper = strpos($v,'%') > 0; + $v = doubleval(str_replace('%','',$v) ); $rnd= $this->categoryprice->rnd->isChecked(); foreach( \App\Entity\Item::find("disabled <> 1 and cat_id=". $this->_category->cat_id,'itemname') as $item ) { - $isper = strpos($v,'%') > 0; - $v = doubleval(str_replace('%','',$v) ); $ip=$item->{'price'.$pt} ; if(strpos($ip,'%') > 0) continue; @@ -460,10 +462,7 @@ public function calcpriceOnClick($sender) { } - // $item->{'price'.$pt} = $ip; - - // $item->save(); - + $di = new \App\DataItem() ; $di->item_id=$item->item_id; diff --git a/www/templates/pages/reference/categorylist.html b/www/templates/pages/reference/categorylist.html index a7379f988..ef22d4566 100644 --- a/www/templates/pages/reference/categorylist.html +++ b/www/templates/pages/reference/categorylist.html @@ -170,7 +170,7 @@
- +