|
@@ -218,7 +218,7 @@ class StatSaleClass extends BaseClass
|
|
|
$cgList = PurchaseOrderClass::getAllByCondition($cgWhere, null, '*');
|
|
$cgList = PurchaseOrderClass::getAllByCondition($cgWhere, null, '*');
|
|
|
$cg = 0;
|
|
$cg = 0;
|
|
|
if (!empty($cgList)) {
|
|
if (!empty($cgList)) {
|
|
|
- print_r($cgList);
|
|
|
|
|
|
|
+ //print_r($cgList);
|
|
|
foreach ($cgList as $cgKey => $cgItem) {
|
|
foreach ($cgList as $cgKey => $cgItem) {
|
|
|
$actPrice = $cgItem['actPrice'] ?? 0;
|
|
$actPrice = $cgItem['actPrice'] ?? 0;
|
|
|
$paidPrice = $cgItem['paidPrice'] ?? 0;
|
|
$paidPrice = $cgItem['paidPrice'] ?? 0;
|
|
@@ -234,11 +234,11 @@ class StatSaleClass extends BaseClass
|
|
|
$a = bcadd($a1, $a2, 2);
|
|
$a = bcadd($a1, $a2, 2);
|
|
|
$total = bcsub($total, $a, 2);
|
|
$total = bcsub($total, $a, 2);
|
|
|
}
|
|
}
|
|
|
- echo $total.' '.$cgItem->orderSn." \n<br/>";
|
|
|
|
|
|
|
+ //echo $total.' '.$cgItem->orderSn." \n<br/>";
|
|
|
$cg = bcadd($cg, $total, 2);
|
|
$cg = bcadd($cg, $total, 2);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- die;
|
|
|
|
|
|
|
+ //die;
|
|
|
$cg = floatval($cg);
|
|
$cg = floatval($cg);
|
|
|
|
|
|
|
|
$lsCgWhere = ['mainId' => $mainId, 'status' => 4,'belongCost'=>1];
|
|
$lsCgWhere = ['mainId' => $mainId, 'status' => 4,'belongCost'=>1];
|