/** * Returns the order that has status = approved. * * @param $query * * @return mixed */ public static function whereNotFulfilled($query) { $ret = $query->where(function ($q) { $q->where('order_status_id', '<>', OrderStatus::Shipped()->id)->Where('order_status_id', '<>', OrderStatus::FirstOrder()->id)->Where('order_status_id', '<>', OrderStatus::Rejected()->id)->Where('order_status_id', '<>', OrderStatus::PaymentUploaded()->id)->Where('order_status_id', '<>', OrderStatus::Cancelled()->id)->Where('order_status_id', '<>', OrderStatus::NewOrderStatus()->id)->Where('order_status_id', '<>', OrderStatus::Printed()->id); }); return $ret; }
public function setPaymentUploaded($order) { $order->order_status_id = OrderStatus::PaymentUploaded()->id; $order->save(); Log::info("set-payment-uploaded\t#order:{$order->id} user:{$order->user->id} status:{$order->orderStatus->name}"); }