|
|
@@ -706,23 +706,16 @@ class OrderService extends \app\BaseService
|
|
|
if (count($order_product_ids) != count($return_order_products)) return $this->fail(lang("The order item was incorrectly selected"));
|
|
|
$all_order_products = $this->orderProductModel->findByOrderId($order->id)->toArray();
|
|
|
|
|
|
- array_reduce($return_order_products, function ($result, $item) {
|
|
|
- $item[''];
|
|
|
- return $result;
|
|
|
- }, [
|
|
|
- 'total_real_price' => 0,
|
|
|
- 'total_annuity' => 0,
|
|
|
- 'service_charge' => 0,
|
|
|
- 'total_sales_tax' => 0,
|
|
|
- 'total_zue_coin' => 0,
|
|
|
- ]);
|
|
|
-
|
|
|
Db::startTrans();
|
|
|
try {
|
|
|
if(count($return_order_products) == count($all_order_products)) {
|
|
|
Db::table('erp_order')->where('id', $order->id)->update(['is_delete' => 1]);
|
|
|
Db::table('erp_order_product')->where('order_id', $order->id)->update(['is_delete' => 1]);
|
|
|
Db::table('erp_order')->where('id', $order->id)->update(['is_delete' => 1]);
|
|
|
+ } else {
|
|
|
+ foreach ($return_order_products as $return_order_product) {
|
|
|
+// $return_order_product['']
|
|
|
+ }
|
|
|
}
|
|
|
Db::commit();
|
|
|
} catch (\Exception $e) {
|