MS-PDRLKVHCADMG\Administrator %!s(int64=5) %!d(string=hai) anos
pai
achega
0241c53e11
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      api/application/controllers/Lampcontrol.php

+ 4 - 2
api/application/controllers/Lampcontrol.php

@@ -934,8 +934,10 @@ class Lampcontrol extends Base_Controller {
             $data['fascal_year'] = $fascal_year;
 
             $fascal_year_phase = $this->input->post('fascal_year_phase',true);
-            if (empty($fascal_year_phase)) $fascal_year_phase = date('Y');
-            $data['fascal_year_phase'] = $fascal_year_phase.'-'.date('Y',strtotime($fascal_year_phase.' +1 year'));
+            if (empty($fascal_year_phase)) {
+                $fascal_year_phase = date('Y');
+                $data['fascal_year_phase'] = $fascal_year_phase.'-'.date('Y',strtotime($fascal_year_phase.' +1 year'));
+            }            
 
             $lamp = $this->Lamp_model->get_one(array('address'=>$data['address']),'projectid,number');
             if (!empty($lamp)) {