From 91cc9c0e2d50b41fd0ee59b584c86d18c8e281d2 Mon Sep 17 00:00:00 2001 From: SoHardKI Date: Thu, 27 Jun 2019 17:36:56 +0300 Subject: [PATCH] add_script_for_transfer --- console/controllers/MovingController.php | 51 ++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 console/controllers/MovingController.php diff --git a/console/controllers/MovingController.php b/console/controllers/MovingController.php new file mode 100644 index 0000000..5d392c4 --- /dev/null +++ b/console/controllers/MovingController.php @@ -0,0 +1,51 @@ +all(); + +// var_dump($field_value[1]->id); + for($i=0;$iorder = $field_value[$i]->order; +// echo $send_value->order; +// echo '
'; + $send_value->field_id = $field_value[$i]->field_id; + $send_value->value = $field_value[$i]->value; + if($field_value[$i]->card_id != null) + { + $send_value->item_type = 0; + $send_value->item_id = $field_value[$i]->card_id; + } + if($field_value[$i]->balance_id != null) + { + $send_value->item_type = 3 ; + $send_value->item_id = $field_value[$i]->balance_id; + } + if($field_value[$i]->project_id != null) + { + $send_value->item_type = 1; + $send_value->item_id = $field_value[$i]->project_id; + } + if($field_value[$i]->company_id!= null) + { + $send_value->item_type = 2; + $send_value->item_id = $field_value[$i]->company_id; + } + $send_value->save(); + + } + } +} \ No newline at end of file