修改采购价格录入限制
This commit is contained in:
parent
e6e0eaadab
commit
daf4b858ce
@ -218,7 +218,7 @@ class PurchaseProductOfferLogic extends BaseLogic
|
|||||||
$lastPrice = PurchaseProductOffer::where(['product_id' => $offer['product_id']])->where('status', 1)->order('id desc')->value('price');
|
$lastPrice = PurchaseProductOffer::where(['product_id' => $offer['product_id']])->where('status', 1)->order('id desc')->value('price');
|
||||||
$currentPrice = bcdiv($params['total_price'], $params['buyer_nums'], 2);
|
$currentPrice = bcdiv($params['total_price'], $params['buyer_nums'], 2);
|
||||||
if ($lastPrice > 0 && ($currentPrice > $lastPrice * 3 || $currentPrice < $lastPrice / 3)) {
|
if ($lastPrice > 0 && ($currentPrice > $lastPrice * 3 || $currentPrice < $lastPrice / 3)) {
|
||||||
throw new BusinessException('价格异常,请重新输入');
|
// throw new BusinessException('价格异常,请重新输入');
|
||||||
}
|
}
|
||||||
// $uid=Admin::where('id',$params['admin_id'])->value('uid');
|
// $uid=Admin::where('id',$params['admin_id'])->value('uid');
|
||||||
// if($params['admin_id']!=1){
|
// if($params['admin_id']!=1){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user