@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // Get parameters |
55 | -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
55 | +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
56 | 56 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
57 | 57 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
58 | 58 | $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
@@ -53,20 +53,20 @@ discard block |
||
53 | 53 | // Security check |
54 | 54 | if ($user->socid) $socid = $user->socid; |
55 | 55 | |
56 | -$search_ref = GETPOST('search_ref', 'alpha'); |
|
57 | -$search_date_startday = GETPOST('search_date_startday', 'int'); |
|
58 | -$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); |
|
59 | -$search_date_startyear = GETPOST('search_date_startyear', 'int'); |
|
56 | +$search_ref = GETPOST('search_ref', 'alpha'); |
|
57 | +$search_date_startday = GETPOST('search_date_startday', 'int'); |
|
58 | +$search_date_startmonth = GETPOST('search_date_startmonth', 'int'); |
|
59 | +$search_date_startyear = GETPOST('search_date_startyear', 'int'); |
|
60 | 60 | $search_date_endday = GETPOST('search_date_endday', 'int'); |
61 | -$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
|
61 | +$search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
|
62 | 62 | $search_date_endyear = GETPOST('search_date_endyear', 'int'); |
63 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
63 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
64 | 64 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
65 | 65 | $search_company = GETPOST('search_company', 'alpha'); |
66 | 66 | $search_payment_type = GETPOST('search_payment_type'); |
67 | -$search_cheque_num = GETPOST('search_cheque_num', 'alpha'); |
|
67 | +$search_cheque_num = GETPOST('search_cheque_num', 'alpha'); |
|
68 | 68 | $search_bank_account = GETPOST('search_bank_account', 'int'); |
69 | -$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x' |
|
69 | +$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x' |
|
70 | 70 | |
71 | 71 | $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
72 | 72 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
@@ -207,10 +207,10 @@ discard block |
||
207 | 207 | $sql .= natural_search('p.ref', $search_ref); |
208 | 208 | } |
209 | 209 | if ($search_date_start) { |
210 | - $sql .= " AND p.datep >= '" . $db->idate($search_date_start) . "'"; |
|
210 | + $sql .= " AND p.datep >= '".$db->idate($search_date_start)."'"; |
|
211 | 211 | } |
212 | 212 | if ($search_date_end) { |
213 | - $sql .=" AND p.datep <= '" . $db->idate($search_date_end) . "'"; |
|
213 | + $sql .= " AND p.datep <= '".$db->idate($search_date_end)."'"; |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | if ($search_company) { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | // Put here all includes required by your class file |
29 | 29 | require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; |
30 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skillrank.lib.php'; |
|
30 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_skillrank.lib.php'; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Class for SkillRank |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | /** |
105 | 105 | * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. |
106 | 106 | */ |
107 | - public $fields=array( |
|
107 | + public $fields = array( |
|
108 | 108 | 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"), |
109 | 109 | 'fk_skill' => array('type'=>'integer:Skill:hrm/class/skill.class.php:1', 'label'=>'Skill', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>1, 'index'=>1,), |
110 | 110 | 'rankorder' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>1, 'default' => 0), |
@@ -371,13 +371,13 @@ discard block |
||
371 | 371 | global $user; |
372 | 372 | |
373 | 373 | $this->fk_skill = $currentSkill->fk_skill; |
374 | - $this->rankorder = $currentSkill->rankorder; |
|
374 | + $this->rankorder = $currentSkill->rankorder; |
|
375 | 375 | $this->fk_object = $fk_user; |
376 | 376 | $this->date_creation = dol_now(); |
377 | 377 | $this->fk_user_creat = $user->id; |
378 | 378 | $this->fk_user_modif = $user->id; |
379 | - $this->objecttype = self::SKILLRANK_TYPE_USER; |
|
380 | - $result = $this->create($user); |
|
379 | + $this->objecttype = self::SKILLRANK_TYPE_USER; |
|
380 | + $result = $this->create($user); |
|
381 | 381 | |
382 | 382 | return $result; |
383 | 383 | } |
@@ -108,14 +108,14 @@ discard block |
||
108 | 108 | { |
109 | 109 | global $db, $conf, $langs; |
110 | 110 | |
111 | - require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; |
|
112 | - require_once DOL_DOCUMENT_ROOT . '/hrm/class/skilldet.class.php'; |
|
111 | + require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php'; |
|
112 | + require_once DOL_DOCUMENT_ROOT.'/hrm/class/skilldet.class.php'; |
|
113 | 113 | |
114 | 114 | // On charge les différentes notes possibles pour la compétence $fk_skill |
115 | 115 | $skilldet = new Skilldet($db); |
116 | 116 | $Lines = $skilldet->fetchAll('ASC', 'rankorder', 0, 0, array('customsql'=>'fk_skill = '.$fk_skill)); |
117 | 117 | |
118 | - if (!is_array($Lines) && $Lines<0) { |
|
118 | + if (!is_array($Lines) && $Lines < 0) { |
|
119 | 119 | setEventMessages($skilldet->error, $skilldet->errors, 'errors'); |
120 | 120 | } |
121 | 121 | if (empty($Lines)) return $langs->trans('SkillHasNoLines'); |
@@ -128,29 +128,29 @@ discard block |
||
128 | 128 | continue; |
129 | 129 | } |
130 | 130 | |
131 | - $ret .= '<span title="' . $line->description . '" class="radio_js_bloc_number ' . $inputname . '_' . $line->fk_skill; |
|
131 | + $ret .= '<span title="'.$line->description.'" class="radio_js_bloc_number '.$inputname.'_'.$line->fk_skill; |
|
132 | 132 | $ret .= $line->rankorder == $selected_rank ? ' selected' : ''; |
133 | - $ret .= '">' . $line->rankorder . '</span>'; |
|
133 | + $ret .= '">'.$line->rankorder.'</span>'; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | if ($mode == 'edit') { |
137 | 137 | $ret .= ' |
138 | - <input type="hidden" id="' . $inputname . '_' . $fk_skill . '" name="' . $inputname . '[' . $fk_skill . ']" value="' . $selected_rank . '"> |
|
138 | + <input type="hidden" id="' . $inputname.'_'.$fk_skill.'" name="'.$inputname.'['.$fk_skill.']" value="'.$selected_rank.'"> |
|
139 | 139 | <script type="text/javascript"> |
140 | 140 | $(document).ready(function(){ |
141 | 141 | $(".radio_js_bloc_number").tooltip(); |
142 | 142 | var error,same; |
143 | - $(".' . $inputname . '_' . $fk_skill . '").on("click",function(){ |
|
143 | + $(".' . $inputname.'_'.$fk_skill.'").on("click",function(){ |
|
144 | 144 | same=false; |
145 | 145 | val = $(this).html(); |
146 | 146 | if($(this).hasClass("selected"))same=true; |
147 | - $(".' . $inputname . '_' . $fk_skill . '").removeClass("selected"); |
|
147 | + $(".' . $inputname.'_'.$fk_skill.'").removeClass("selected"); |
|
148 | 148 | if(same) |
149 | 149 | { |
150 | - $("#' . $inputname . '_' . $fk_skill . '").val(""); |
|
150 | + $("#' . $inputname.'_'.$fk_skill.'").val(""); |
|
151 | 151 | }else { |
152 | 152 | $(this).addClass("selected"); |
153 | - $("#' . $inputname . '_' . $fk_skill . '").val(val); |
|
153 | + $("#' . $inputname.'_'.$fk_skill.'").val(val); |
|
154 | 154 | } |
155 | 155 | }); |
156 | 156 |
@@ -373,7 +373,7 @@ |
||
373 | 373 | $caction = new CActionComm($this->db); |
374 | 374 | |
375 | 375 | // Suggest a list with manual events or all auto events |
376 | - $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. |
|
376 | + $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. |
|
377 | 377 | if (empty($multiselect)) { |
378 | 378 | // Add empty line at start only if no multiselect |
379 | 379 | array_unshift($arraylist, ' '); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | //Calcul total qty and amount for global if full scan list |
130 | 130 | $total_qty_toconsume = 0; |
131 | 131 | $total_qty_toproduce = 0; |
132 | - $product_cache=array(); |
|
132 | + $product_cache = array(); |
|
133 | 133 | $bom_data_result = array(); |
134 | 134 | |
135 | 135 | //Qauntity to produce |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | } |
180 | 180 | $bomtmp->fk_product = $objp->fk_product; |
181 | 181 | $bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production'); |
182 | - $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): ''); |
|
182 | + $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache) ? $product_cache[$objp->fk_product]->getNomUrl(1) : ''); |
|
183 | 183 | $bom_data_result[$objp->rowid]['qty_toproduce'] += ($objp->qty_toproduce > 0 ? $objp->qty_toproduce : 0); |
184 | 184 | $bom_data_result[$objp->rowid]['qty_toconsume'] = 0; |
185 | 185 | $bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour'); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | if (!array_key_exists($objp->rowid, $bom_data_result)) { |
244 | 244 | $bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production'); |
245 | - $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): ''); |
|
245 | + $bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache) ? $product_cache[$objp->fk_product]->getNomUrl(1) : ''); |
|
246 | 246 | $bom_data_result[$objp->rowid]['qty_toproduce'] = 0; |
247 | 247 | $bom_data_result[$objp->rowid]['qty_toconsume'] += ($objp->qty_toconsume > 0 ? $objp->qty_toconsume : 0); |
248 | 248 | $bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour'); |
@@ -80,7 +80,7 @@ |
||
80 | 80 | } else { |
81 | 81 | dol_print_error($db); |
82 | 82 | } |
83 | - dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
83 | + dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
84 | 84 | } |
85 | 85 | $head[$tab][0] = DOL_URL_ROOT.'/contact/project.php?id='.$object->id; |
86 | 86 | $head[$tab][1] = $langs->trans("Projects"); |
@@ -235,7 +235,7 @@ |
||
235 | 235 | $this->dateh = $this->db->jdate($obj->dateh); |
236 | 236 | $this->datef = $this->db->jdate($obj->datef); |
237 | 237 | $this->amount = $obj->subscription; |
238 | - $this->note = $obj->note_public; // deprecated |
|
238 | + $this->note = $obj->note_public; // deprecated |
|
239 | 239 | $this->note_public = $obj->note_public; |
240 | 240 | $this->fk_bank = $obj->fk_bank; |
241 | 241 | return 1; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | $action = GETPOST('action', 'aZ09'); |
48 | 48 | $value = GETPOST('value', 'alpha'); |
49 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
49 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
50 | 50 | |
51 | 51 | $label = GETPOST('label', 'alpha'); |
52 | 52 | $scandir = GETPOST('scan_dir', 'alpha'); |