Commit 104a320d authored by hangjun83's avatar hangjun83

罗恩测试工具

parent 5db27eb7
......@@ -47,7 +47,7 @@ class RhawnToolsService
$si_amount = 0;
if ($detail['p_id'] > 0) {
$si_discount = round($detail['si_price'] * $discount);
$si_amount = bcadd($detail['si_num'], $si_discount);
$si_amount = bcmul($detail['si_num'], $si_discount);
$connection->table('soitems')
->where('si_id',$detail['si_id'])
->update([
......@@ -61,7 +61,12 @@ class RhawnToolsService
->where('so_id',$order->so_id)
->select(DB::raw('sum(si_amount) as amount'))
->get();
var_dump($total);
$connection->table('sorders')
->where('so_id',$order->so_id)
->update([
'so_total' => $total->amount,
]);
}
}
$connection->commit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment