|
|
@ -22,11 +22,15 @@ class ImsCjdcOrder extends Model |
|
|
return $this->hasOne('\App\Models\LanzuStore','id','store_id'); |
|
|
return $this->hasOne('\App\Models\LanzuStore','id','store_id'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static function getOrdersData($oid) |
|
|
|
|
|
|
|
|
public static function getOrdersData($goid,$oid) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
$orders = ImsCjdcOrder::with('user')->with('store') |
|
|
$orders = ImsCjdcOrder::with('user')->with('store') |
|
|
->where('order_main_id', $oid)->get()->toArray(); |
|
|
|
|
|
|
|
|
->where('order_main_id', $goid)->get()->toArray(); |
|
|
|
|
|
if (!count($orders)){ |
|
|
|
|
|
$orders = ImsCjdcOrder::with('user')->with('store') |
|
|
|
|
|
->where('order_main_id', $oid)->get()->toArray(); |
|
|
|
|
|
} |
|
|
if (count($orders)) { |
|
|
if (count($orders)) { |
|
|
$show_refund = []; |
|
|
$show_refund = []; |
|
|
foreach ($orders as &$or) { |
|
|
foreach ($orders as &$or) { |
|
|
|