|
|
@@ -22,14 +22,14 @@ class CgRefundItemClass extends BaseClass
|
|
|
$refundSn = $data['refundSn'] ?? '';
|
|
|
$ptItemId = $data['ptItemId'] ?? 0;
|
|
|
$name = $data['name'] ?? '';
|
|
|
- $unitPrice = $data['unitPrice'] ?? 0;
|
|
|
+ $unitCost = $data['unitCost'] ?? 0;
|
|
|
|
|
|
$mainId = $order->mainId ?? 0;
|
|
|
$shopId = $order->shopId ?? 0;
|
|
|
$sjId = $order->sjId ?? 0;
|
|
|
$ghsName = $order->ghsName ?? '';
|
|
|
|
|
|
- $stockInfo = ProductClass::decreaseStock($productId, $bigNum, $smallNum, false, true, ['cost' => $unitPrice]);
|
|
|
+ $stockInfo = ProductClass::decreaseStock($productId, $bigNum, $smallNum, false, true, ['cost' => $unitCost]);
|
|
|
$oldStock = $stockInfo['oldStock'] ?? 0;
|
|
|
$newStock = $stockInfo['newStock'] ?? 0;
|
|
|
if ($newStock < 0) {
|