Пример #1
0
 public static function customCount($request, $parameters)
 {
     return OrderStatus::where('lang_id_114', $parameters['lang'])->getQuery();
 }
Пример #2
0
 public function updateCustomRecord($parameters)
 {
     $order = Order::find($parameters['id']);
     Order::where('id_116', $parameters['id'])->update(['status_id_116' => $this->request->input('status'), 'payment_method_id_116' => $this->request->input('paymentMethod'), 'comments_116' => $this->request->has('comments') ? $this->request->input('comments') : null, 'has_gift_116' => $this->request->has('gift'), 'gift_from_116' => $this->request->has('giftFrom') ? $this->request->input('giftFrom') : null, 'gift_to_116' => $this->request->has('giftTo') ? $this->request->input('giftTo') : null, 'gift_message_116' => $this->request->has('giftMessage') ? $this->request->input('giftMessage') : null, 'customer_id_116' => $this->request->input('customerId'), 'customer_company_116' => $this->request->has('customerCompany') ? $this->request->input('customerCompany') : null, 'customer_tin_116' => $this->request->has('customerTin') ? $this->request->input('customerTin') : null, 'customer_name_116' => $this->request->has('customerName') ? $this->request->input('customerName') : null, 'customer_surname_116' => $this->request->has('customerSurname') ? $this->request->input('customerSurname') : null, 'customer_email_116' => $this->request->input('customerEmail'), 'customer_phone_116' => $this->request->has('customerPhone') ? $this->request->input('customerPhone') : null, 'customer_mobile_116' => $this->request->has('customerMobile') ? $this->request->input('customerMobile') : null, 'has_shipping_116' => $this->request->has('hasShipping'), 'shipping_company_116' => $this->request->has('shippingCompany') ? $this->request->input('shippingCompany') : null, 'shipping_name_116' => $this->request->has('shippingName') ? $this->request->input('shippingName') : null, 'shipping_surname_116' => $this->request->has('shippingSurname') ? $this->request->input('shippingSurname') : null, 'shipping_email_116' => $this->request->has('shippingEmail') ? $this->request->input('shippingEmail') : null, 'shipping_phone_116' => $this->request->has('shippingPhone') ? $this->request->input('shippingPhone') : null, 'shipping_mobile_116' => $this->request->has('shippingMobile') ? $this->request->input('shippingMobile') : null, 'shipping_amount_116' => $this->request->has('shippingAmount') ? $this->request->input('shippingAmount') : 0]);
     // if order status is different that previous status order, we record this change
     if ($order->status_id_116 != (int) $this->request->input('status')) {
         $orderStatus = OrderStatus::builder()->where('lang_id_114', base_lang()->id_001)->where('active_114', true)->get();
         Order::setOrderLog($parameters['id'], trans('market::pulsar.message_user_change_order_status', ['user' => auth('pulsar')->user()->user_010, 'oldStatus' => $orderStatus->where('id_114', $order->status_id_116)->first()->name_114, 'newStatus' => $orderStatus->where('id_114', (int) $this->request->input('status'))->first()->name_114]));
     }
 }
Пример #3
0
 public function updateCustomRecord($parameters)
 {
     OrderStatus::where('id_114', $parameters['id'])->where('lang_id_114', $this->request->input('lang'))->update(['name_114' => $this->request->input('name'), 'active_114' => $this->request->has('active')]);
 }
Пример #4
0
 public function editCustomRecord($parameters)
 {
     $parameters['orderStatus'] = OrderStatus::builder()->where('lang_id_114', $parameters['object']->lang_id)->where('active_114', true)->get();
     return $parameters;
 }
Пример #5
0
 public function run()
 {
     OrderStatus::insert([['id_114' => 1, 'lang_id_114' => 'es', 'name_114' => 'Pendiente de pago', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 1, 'lang_id_114' => 'en', 'name_114' => 'Outstanding', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 2, 'lang_id_114' => 'es', 'name_114' => 'Pago confirmado', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 2, 'lang_id_114' => 'en', 'name_114' => 'Payment Confirmed', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 3, 'lang_id_114' => 'es', 'name_114' => 'A la espera de existencias', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 3, 'lang_id_114' => 'en', 'name_114' => 'Pending stocks', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 4, 'lang_id_114' => 'es', 'name_114' => 'Preparando', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 4, 'lang_id_114' => 'en', 'name_114' => 'Preparing', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 5, 'lang_id_114' => 'es', 'name_114' => 'Enviado', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 5, 'lang_id_114' => 'en', 'name_114' => 'Dispatched', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 6, 'lang_id_114' => 'es', 'name_114' => 'Completado', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 6, 'lang_id_114' => 'en', 'name_114' => 'Completed', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 7, 'lang_id_114' => 'es', 'name_114' => 'Cancelado', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}'], ['id_114' => 7, 'lang_id_114' => 'en', 'name_114' => 'Cancel', 'active_114' => 0, 'data_lang_114' => '{"langs":["es","en"]}']]);
 }