更新发起转售判断条件
This commit is contained in:
parent
0d43115082
commit
d5e752f38e
@ -593,10 +593,10 @@ class CommunityRepository extends BaseRepository
|
||||
continue;
|
||||
}
|
||||
$purchaseRecord = PurchaseRecord::where('unique', $value['product_attr_unique'])->find();
|
||||
$exist = Resale::where('purchase_record_id', $purchaseRecord['id'])->find();
|
||||
if ($exist) {
|
||||
throw new ValidateException('已发起转售');
|
||||
}
|
||||
// $exist = Resale::where('purchase_record_id', $purchaseRecord['id'])->find();
|
||||
// if ($exist) {
|
||||
// throw new ValidateException('已发起转售');
|
||||
// }
|
||||
if (empty($purchaseRecord) || ($purchaseRecord['number'] - $purchaseRecord['sales_volume']) <= 0) {
|
||||
throw new ValidateException('进货记录不存在或已售罄');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user