|
|
@@ -201,6 +201,17 @@ class StatSaleClass extends BaseClass
|
|
|
$actPrice = $cgItem['actPrice'] ?? 0;
|
|
|
$paidPrice = $cgItem['paidPrice'] ?? 0;
|
|
|
$total = bcadd($actPrice, $paidPrice, 2);
|
|
|
+ //物流费用不算成本
|
|
|
+ if (isset($cgItem['isCost']) && $cgItem['isCost'] == 0) {
|
|
|
+ $shortCharge = $cgItem['shortCharge'] ?? 0;
|
|
|
+ $longCharge = $cgItem['longCharge'] ?? 0;
|
|
|
+ $pickCharge = $cgItem['pickCharge'] ?? 0;
|
|
|
+ $localCharge = $cgItem['localCharge'] ?? 0;
|
|
|
+ $a1 = bcadd($shortCharge, $longCharge, 2);
|
|
|
+ $a2 = bcadd($pickCharge, $localCharge, 2);
|
|
|
+ $a = bcadd($a1, $a2, 2);
|
|
|
+ $total = bcsub($total, $a, 2);
|
|
|
+ }
|
|
|
$cg = bcadd($cg, $total, 2);
|
|
|
}
|
|
|
}
|