예제 #1
0
 public function showCustomRecord($parameters)
 {
     $parameters['companies'] = Company::all();
     $parameters['families'] = Family::all();
     $parameters['brands'] = Brand::all();
     $parameters['products'] = Product::builder()->where('brand_id_072', $parameters['object']->brand_id_078)->get();
     return $parameters;
 }
예제 #2
0
 public function showCustomRecord($parameters)
 {
     $parameters['companies'] = Company::all();
     $parameters['families'] = Family::all();
     $parameters['brands'] = Brand::all();
     $parameters['products'] = Product::builder()->where('active_072', true)->where('brand_id_072', $parameters['object']->brand_id_079)->get();
     if ($parameters['object']->stock_id_079 == null) {
         $parameters['afterButtonFooter'] = '<a class="btn btn-danger margin-l10 delete-lang-record" href="' . route($parameters['resource'] === 'octopus-laboratory-order' ? 'createOctopusLaboratoryStock' : 'createOctopusStock', ['id' => Crypt::encrypt($parameters['id']), 'offset' => $parameters['offset']]) . '">' . trans('octopus::pulsar.create_stock') . '</a>';
     }
     return $parameters;
 }
 public function run()
 {
     Company::insert([['id_074' => 1, 'company_name_074' => 'Perfumes y Diseño Comercial S.L.', 'tin_074' => 'B/81-061616', 'country_id_074' => 'ES', 'territorial_area_1_id_074' => 'ES-MD', 'territorial_area_2_id_074' => 'ES-M', 'territorial_area_3_id_074' => null, 'cp_074' => '28034', 'locality_074' => 'Madrid', 'address_074' => 'Calle de la Isla de Java, 33', 'contact_074' => null, 'phone_074' => '916 58 88 20', 'email_074' => null, 'web_074' => 'www.pyd.es'], ['id_074' => 2, 'company_name_074' => 'Tous Perfumes, S.A.', 'tin_074' => 'A/82-722042', 'country_id_074' => 'ES', 'territorial_area_1_id_074' => 'ES-MD', 'territorial_area_2_id_074' => 'ES-M', 'territorial_area_3_id_074' => null, 'cp_074' => '28034', 'locality_074' => 'Madrid', 'address_074' => 'Calle de la Isla de Java, 33', 'contact_074' => null, 'phone_074' => '916 58 88 20', 'email_074' => null, 'web_074' => 'www.pyd.es']]);
 }
예제 #4
0
 public function showCustomRecord($parameters)
 {
     $parameters['companies'] = Company::all();
     $parameters['families'] = Family::all();
     $parameters['brands'] = Brand::all();
     $parameters['products'] = Product::builder()->where('active_072', true)->where('brand_id_072', $parameters['object']->brand_id_080)->get();
     if ($parameters['object']->expiration_080 == null || $parameters['object']->expiration_080 > date('U')) {
         $parameters['afterButtonFooter'] = '<a class="btn btn-danger margin-l10 delete-lang-record" href="' . route($parameters['resource'] === 'octopus-supervisor-stock' ? 'createOctopusSupervisorRequestFromStock' : 'createOctopusRequestFromStock', ['stock' => $parameters['id'], 'offset' => $parameters['offset']]) . '">' . trans('octopus::pulsar.replace_stock') . '</a>';
     }
     return $parameters;
 }
예제 #5
0
 public function updateCustomRecord($parameters)
 {
     Company::where('id_074', $parameters['id'])->update(['company_name_074' => $this->request->input('companyName'), 'tin_074' => $this->request->has('tin') ? $this->request->input('tin') : null, 'country_id_074' => $this->request->input('country'), 'territorial_area_1_id_074' => $this->request->has('territorialArea1') ? $this->request->input('territorialArea1') : null, 'territorial_area_2_id_074' => $this->request->has('territorialArea2') ? $this->request->input('territorialArea2') : null, 'territorial_area_3_id_074' => $this->request->has('territorialArea3') ? $this->request->input('territorialArea3') : null, 'cp_074' => $this->request->has('cp') ? $this->request->input('cp') : null, 'locality_074' => $this->request->has('locality') ? $this->request->input('locality') : null, 'address_074' => $this->request->has('address') ? $this->request->input('address') : null, 'contact_074' => $this->request->has('contact') ? $this->request->input('contact') : null, 'phone_074' => $this->request->has('phone') ? $this->request->input('phone') : null, 'email_074' => $this->request->has('email') ? $this->request->input('email') : null, 'web_074' => $this->request->has('web') ? $this->request->input('web') : null]);
 }