@@ -89,6 +89,7 @@ public function postCreate()
8989 $ component ->company_id = Company::getIdForCurrentUser (Input::get ('company_id ' ));
9090 $ component ->order_number = e (Input::get ('order_number ' ));
9191 $ component ->min_amt = e (Input::get ('min_amt ' ));
92+ $ component ->serial_number = e (Input::get ('serial_number ' ));
9293
9394 if (e (Input::get ('purchase_date ' )) == '' ) {
9495 $ component ->purchase_date = null ;
@@ -174,6 +175,7 @@ public function postEdit($componentId = null)
174175 $ component ->company_id = Company::getIdForCurrentUser (Input::get ('company_id ' ));
175176 $ component ->order_number = e (Input::get ('order_number ' ));
176177 $ component ->min_amt = e (Input::get ('min_amt ' ));
178+ $ component ->serial_number = e (Input::get ('serial_number ' ));
177179
178180 if (e (Input::get ('purchase_date ' )) == '' ) {
179181 $ component ->purchase_date = null ;
@@ -422,7 +424,7 @@ public function getDatatable()
422424 $ limit = 50 ;
423425 }
424426
425- $ allowed_columns = ['id ' ,'name ' ,'min_amt ' ,'order_number ' ,'purchase_date ' ,'purchase_cost ' ,'companyName ' ,'category ' ,'total_qty ' ];
427+ $ allowed_columns = ['id ' ,'name ' ,'min_amt ' ,'order_number ' ,'serial_number ' , ' purchase_date ' ,'purchase_cost ' ,'companyName ' ,'category ' ,'total_qty ' ];
426428 $ order = Input::get ('order ' ) === 'asc ' ? 'asc ' : 'desc ' ;
427429 $ sort = in_array (Input::get ('sort ' ), $ allowed_columns ) ? Input::get ('sort ' ) : 'created_at ' ;
428430
@@ -470,6 +472,7 @@ public function getDatatable()
470472 'checkbox ' =>'<div class="text-center"><input type="checkbox" name="component[ ' .$ component ->id .']" class="one_required"></div> ' ,
471473 'id ' => $ component ->id ,
472474 'name ' => (string )link_to ('admin/components/ ' .$ component ->id .'/view ' , e ($ component ->name )),
475+ 'serial_number ' => $ component ->serial_number ,
473476 'location ' => ($ component ->location ) ? e ($ component ->location ->name ) : '' ,
474477 'total_qty ' => e ($ component ->total_qty ),
475478 'min_amt ' => e ($ component ->min_amt ),
0 commit comments