Completed
Branch develop (68404b)
by
unknown
20:11
created
htdocs/product/stock/stocktransfer/class/stocktransferline.class.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	/**
95 95
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
96 96
 	 */
97
-	public $fields=array(
97
+	public $fields = array(
98 98
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"),
99 99
 		'amount' => array('type'=>'price', 'label'=>'Amount', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"Help text for amount",),
100 100
 		'qty' => array('type'=>'real', 'label'=>'Qty', 'enabled'=>'1', 'position'=>45, 'notnull'=>0, 'visible'=>1, 'default'=>'0', 'isameasure'=>'1', 'css'=>'maxwidth75imp', 'help'=>"Help text for quantity",),
@@ -449,9 +449,9 @@  discard block
 block discarded – undo
449 449
 
450 450
 		global $conf, $user, $langs;
451 451
 
452
-		require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
453
-		include_once DOL_DOCUMENT_ROOT . '/product/stock/class/mouvementstock.class.php';
454
-		include_once DOL_DOCUMENT_ROOT . '/product/stock/stocktransfer/class/stocktransfer.class.php';
452
+		require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
453
+		include_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
454
+		include_once DOL_DOCUMENT_ROOT.'/product/stock/stocktransfer/class/stocktransfer.class.php';
455 455
 
456 456
 		$p = new Product($this->db);
457 457
 		$p->fetch($this->fk_product);
Please login to merge, or discard this patch.
Braces   +50 added lines, -18 removed lines patch added patch discarded remove patch
@@ -128,8 +128,12 @@  discard block
 block discarded – undo
128 128
 
129 129
 		$this->db = $db;
130 130
 
131
-		if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0;
132
-		if (!isModEnabled('multicompany') && isset($this->fields['entity'])) $this->fields['entity']['enabled'] = 0;
131
+		if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) {
132
+			$this->fields['rowid']['visible'] = 0;
133
+		}
134
+		if (!isModEnabled('multicompany') && isset($this->fields['entity'])) {
135
+			$this->fields['entity']['enabled'] = 0;
136
+		}
133 137
 
134 138
 		// Example to show how to set values of fields definition dynamically
135 139
 		/*if ($user->rights->stocktransfer->stocktransferline->read) {
@@ -188,7 +192,9 @@  discard block
 block discarded – undo
188 192
 
189 193
 		// Load source object
190 194
 		$result = $object->fetchCommon($fromid);
191
-		if ($result > 0 && !empty($object->table_element_line)) $object->fetchLines();
195
+		if ($result > 0 && !empty($object->table_element_line)) {
196
+			$object->fetchLines();
197
+		}
192 198
 
193 199
 		// get lines so they will be clone
194 200
 		//foreach($this->lines as $line)
@@ -235,8 +241,9 @@  discard block
 block discarded – undo
235 241
 		if (!$error) {
236 242
 			// copy external contacts if same company
237 243
 			if (property_exists($this, 'socid') && $this->socid == $object->socid) {
238
-				if ($this->copy_linked_contact($object, 'external') < 0)
239
-					$error++;
244
+				if ($this->copy_linked_contact($object, 'external') < 0) {
245
+									$error++;
246
+				}
240 247
 			}
241 248
 		}
242 249
 
@@ -262,7 +269,9 @@  discard block
 block discarded – undo
262 269
 	public function fetch($id, $ref = null)
263 270
 	{
264 271
 		$result = $this->fetchCommon($id, $ref);
265
-		if ($result > 0 && !empty($this->table_element_line)) $this->fetchLines();
272
+		if ($result > 0 && !empty($this->table_element_line)) {
273
+			$this->fetchLines();
274
+		}
266 275
 		return $result;
267 276
 	}
268 277
 
@@ -300,8 +309,11 @@  discard block
 block discarded – undo
300 309
 		$sql = 'SELECT ';
301 310
 		$sql .= $this->getFieldList();
302 311
 		$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
303
-		if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' WHERE t.entity IN ('.getEntity($this->element).')';
304
-		else $sql .= ' WHERE 1 = 1';
312
+		if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
313
+			$sql .= ' WHERE t.entity IN ('.getEntity($this->element).')';
314
+		} else {
315
+			$sql .= ' WHERE 1 = 1';
316
+		}
305 317
 		// Manage filter
306 318
 		$sqlwhere = array();
307 319
 		if (count($filter) > 0) {
@@ -548,8 +560,12 @@  discard block
 block discarded – undo
548 560
 			$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
549 561
 			$sql .= " SET ref = '".$this->db->escape($num)."',";
550 562
 			$sql .= " status = ".self::STATUS_VALIDATED;
551
-			if (!empty($this->fields['date_validation'])) $sql .= ", date_validation = '".$this->db->idate($now)."',";
552
-			if (!empty($this->fields['fk_user_valid'])) $sql .= ", fk_user_valid = ".((int) $user->id);
563
+			if (!empty($this->fields['date_validation'])) {
564
+				$sql .= ", date_validation = '".$this->db->idate($now)."',";
565
+			}
566
+			if (!empty($this->fields['fk_user_valid'])) {
567
+				$sql .= ", fk_user_valid = ".((int) $user->id);
568
+			}
553 569
 			$sql .= " WHERE rowid = ".((int) $this->id);
554 570
 
555 571
 			dol_syslog(get_class($this)."::validate()", LOG_DEBUG);
@@ -563,7 +579,9 @@  discard block
 block discarded – undo
563 579
 			if (!$error && !$notrigger) {
564 580
 				// Call trigger
565 581
 				$result = $this->call_trigger('STOCKTRANSFERLINE_VALIDATE', $user);
566
-				if ($result < 0) $error++;
582
+				if ($result < 0) {
583
+					$error++;
584
+				}
567 585
 				// End call triggers
568 586
 			}
569 587
 		}
@@ -705,7 +723,10 @@  discard block
 block discarded – undo
705 723
 	{
706 724
 		global $conf, $langs, $hookmanager;
707 725
 
708
-		if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
726
+		if (!empty($conf->dol_no_mouse_hover)) {
727
+			$notooltip = 1;
728
+		}
729
+		// Force disable tooltips
709 730
 
710 731
 		$result = '';
711 732
 
@@ -737,7 +758,9 @@  discard block
 block discarded – undo
737 758
 			}
738 759
 			$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
739 760
 			$linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
740
-		} else $linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
761
+		} else {
762
+			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
763
+		}
741 764
 
742 765
 		$linkstart = '<a href="'.$url.'"';
743 766
 		$linkstart .= $linkclose.'>';
@@ -746,7 +769,9 @@  discard block
 block discarded – undo
746 769
 		$result .= $linkstart;
747 770
 
748 771
 		if (empty($this->showphoto_on_popup)) {
749
-			if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
772
+			if ($withpicto) {
773
+				$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
774
+			}
750 775
 		} else {
751 776
 			if ($withpicto) {
752 777
 				require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -772,7 +797,9 @@  discard block
 block discarded – undo
772 797
 			}
773 798
 		}
774 799
 
775
-		if ($withpicto != 2) $result .= $this->ref;
800
+		if ($withpicto != 2) {
801
+			$result .= $this->ref;
802
+		}
776 803
 
777 804
 		$result .= $linkend;
778 805
 		//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
@@ -781,8 +808,11 @@  discard block
 block discarded – undo
781 808
 		$hookmanager->initHooks(array('stocktransferlinedao'));
782 809
 		$parameters = array('id'=>$this->id, 'getnomurl'=>$result);
783 810
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
784
-		if ($reshook > 0) $result = $hookmanager->resPrint;
785
-		else $result .= $hookmanager->resPrint;
811
+		if ($reshook > 0) {
812
+			$result = $hookmanager->resPrint;
813
+		} else {
814
+			$result .= $hookmanager->resPrint;
815
+		}
786 816
 
787 817
 		return $result;
788 818
 	}
@@ -822,7 +852,9 @@  discard block
 block discarded – undo
822 852
 
823 853
 		$statusType = 'status'.$status;
824 854
 		//if ($status == self::STATUS_VALIDATED) $statusType = 'status1';
825
-		if ($status == self::STATUS_CANCELED) $statusType = 'status6';
855
+		if ($status == self::STATUS_CANCELED) {
856
+			$statusType = 'status6';
857
+		}
826 858
 
827 859
 		return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
828 860
 	}
Please login to merge, or discard this patch.
htdocs/core/modules/modStockTransfer.class.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -455,17 +455,17 @@
 block discarded – undo
455 455
 		// Rôles
456 456
 		$resql = $this->db->query('SELECT rowid FROM '.MAIN_DB_PREFIX.'c_type_contact WHERE code = "STDEST" AND element = "StockTransfer" AND source = "internal"');
457 457
 		$res = $this->db->fetch_object($resql);
458
-		$nextid=$this->getNextId();
458
+		$nextid = $this->getNextId();
459 459
 		if (empty($res)) $this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "internal", "STRESP", "Responsable du transfert de stocks", 1, NULL, 0)');
460 460
 
461 461
 		$resql = $this->db->query('SELECT rowid FROM '.MAIN_DB_PREFIX.'c_type_contact WHERE code = "STFROM" AND element = "StockTransfer" AND source = "external"');
462 462
 		$res = $this->db->fetch_object($resql);
463
-		$nextid=$this->getNextId();
463
+		$nextid = $this->getNextId();
464 464
 		if (empty($res)) $this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STFROM", "Contact expéditeur transfert de stocks", 1, NULL, 0)');
465 465
 
466 466
 		$resql = $this->db->query('SELECT rowid FROM '.MAIN_DB_PREFIX.'c_type_contact WHERE code = "STDEST" AND element = "StockTransfer" AND source = "external"');
467 467
 		$res = $this->db->fetch_object($resql);
468
-		$nextid=$this->getNextId();
468
+		$nextid = $this->getNextId();
469 469
 		if (empty($res)) $this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STDEST", "Contact destinataire transfert de stocks", 1, NULL, 0)');
470 470
 
471 471
 		return $this->_init($sql, $options);
Please login to merge, or discard this patch.
Braces   +13 added lines, -4 removed lines patch added patch discarded remove patch
@@ -426,7 +426,10 @@  discard block
 block discarded – undo
426 426
 		global  $conf, $langs;
427 427
 
428 428
 		$result = $this->_load_tables('/install/mysql/tables/', 'stocktransfer');
429
-		if ($result < 0) return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default')
429
+		if ($result < 0) {
430
+			return -1;
431
+		}
432
+		// Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default')
430 433
 
431 434
 		// Permissions
432 435
 		$this->remove($options);
@@ -437,17 +440,23 @@  discard block
 block discarded – undo
437 440
 		$resql = $this->db->query('SELECT rowid FROM '.MAIN_DB_PREFIX.'c_type_contact WHERE code = "STDEST" AND element = "StockTransfer" AND source = "internal"');
438 441
 		$res = $this->db->fetch_object($resql);
439 442
 		$nextid=$this->getNextId();
440
-		if (empty($res)) $this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "internal", "STRESP", "Responsable du transfert de stocks", 1, NULL, 0)');
443
+		if (empty($res)) {
444
+			$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "internal", "STRESP", "Responsable du transfert de stocks", 1, NULL, 0)');
445
+		}
441 446
 
442 447
 		$resql = $this->db->query('SELECT rowid FROM '.MAIN_DB_PREFIX.'c_type_contact WHERE code = "STFROM" AND element = "StockTransfer" AND source = "external"');
443 448
 		$res = $this->db->fetch_object($resql);
444 449
 		$nextid=$this->getNextId();
445
-		if (empty($res)) $this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STFROM", "Contact expéditeur transfert de stocks", 1, NULL, 0)');
450
+		if (empty($res)) {
451
+			$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STFROM", "Contact expéditeur transfert de stocks", 1, NULL, 0)');
452
+		}
446 453
 
447 454
 		$resql = $this->db->query('SELECT rowid FROM '.MAIN_DB_PREFIX.'c_type_contact WHERE code = "STDEST" AND element = "StockTransfer" AND source = "external"');
448 455
 		$res = $this->db->fetch_object($resql);
449 456
 		$nextid=$this->getNextId();
450
-		if (empty($res)) $this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STDEST", "Contact destinataire transfert de stocks", 1, NULL, 0)');
457
+		if (empty($res)) {
458
+			$this->db->query('INSERT INTO '.MAIN_DB_PREFIX.'c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES('.((int) $nextid).', "StockTransfer", "external", "STDEST", "Contact destinataire transfert de stocks", 1, NULL, 0)');
459
+		}
451 460
 
452 461
 		return $this->_init($sql, $options);
453 462
 	}
Please login to merge, or discard this patch.
htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
  *  \ingroup    stocktransfer
24 24
  *  \brief      File of class to manage StockTransfer numbering rules standard
25 25
  */
26
-require_once DOL_DOCUMENT_ROOT . '/core/modules/stocktransfer/modules_stocktransfer.php';
26
+require_once DOL_DOCUMENT_ROOT.'/core/modules/stocktransfer/modules_stocktransfer.php';
27 27
 
28 28
 
29 29
 /**
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,8 +134,11 @@  discard block
 block discarded – undo
134 134
 		$resql = $db->query($sql);
135 135
 		if ($resql) {
136 136
 			$obj = $db->fetch_object($resql);
137
-			if ($obj) $max = intval($obj->max);
138
-			else $max = 0;
137
+			if ($obj) {
138
+				$max = intval($obj->max);
139
+			} else {
140
+				$max = 0;
141
+			}
139 142
 		} else {
140 143
 			dol_syslog("mod_stocktransfer_standard::getNextValue", LOG_DEBUG);
141 144
 			return -1;
@@ -145,8 +148,13 @@  discard block
 block discarded – undo
145 148
 		$date = $object->date_creation;
146 149
 		$yymm = strftime("%y%m", $date);
147 150
 
148
-		if ($max >= (pow(10, 4) - 1)) $num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
149
-		else $num = sprintf("%04s", $max + 1);
151
+		if ($max >= (pow(10, 4) - 1)) {
152
+			$num = $max + 1;
153
+		}
154
+		// If counter > 9999, we do not format on 4 chars, we take number as it is
155
+		else {
156
+			$num = sprintf("%04s", $max + 1);
157
+		}
150 158
 
151 159
 		dol_syslog("mod_stocktransfer_standard::getNextValue return ".$this->prefix.$yymm."-".$num);
152 160
 		return $this->prefix.$yymm."-".$num;
Please login to merge, or discard this patch.
htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
  * \brief      File containing class for advanced numbering model of StockTransfer
28 28
  */
29 29
 
30
-require_once DOL_DOCUMENT_ROOT . '/core/modules/stocktransfer/modules_stocktransfer.php';
30
+require_once DOL_DOCUMENT_ROOT.'/core/modules/stocktransfer/modules_stocktransfer.php';
31 31
 
32 32
 
33 33
 /**
Please login to merge, or discard this patch.
htdocs/compta/facture/prelevement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -434,7 +434,7 @@
 block discarded – undo
434 434
 			$invoicecredits[] = $facavoir->getNomUrl(1);
435 435
 		}
436 436
 		print ' <span class="opacitymediumbycolor paddingleft">'.$langs->transnoentities("InvoiceHasAvoir");
437
-		print ' '. (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits);
437
+		print ' '.(count($invoicecredits) ? ' ' : '').implode(',', $invoicecredits);
438 438
 		print '</span>';
439 439
 	}
440 440
 	/*
Please login to merge, or discard this patch.
htdocs/commande/stats/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -394,7 +394,7 @@
 block discarded – undo
394 394
 	print '<tr class="oddeven" height="24">';
395 395
 	print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
396 396
 	print '<td class="right">'.$val['nb'].'</td>';
397
-	print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']): "0").'%</td>';
397
+	print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']) : "0").'%</td>';
398 398
 	print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
399 399
 	print '<td class="right opacitylow" style="'.((!isset($val['total_diff']) || $val['total_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['total_diff']) ? round($val['total_diff']) : "0").'%</td>';
400 400
 	print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
Please login to merge, or discard this patch.
htdocs/expensereport/ajax/ajaxik.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,26 +66,26 @@
 block discarded – undo
66 66
 $rep = new stdClass();
67 67
 $rep->response_status = 0;
68 68
 $rep->data = null;
69
-$rep->error = '';//@todo deprecated use error_message instead
69
+$rep->error = ''; //@todo deprecated use error_message instead
70 70
 $rep->errorMessage = '';
71 71
 
72 72
 
73 73
 if (empty($fk_expense) || $fk_expense < 0) {
74
-	$rep->errorMessage =   $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_expense, 'fk_expense');
74
+	$rep->errorMessage = $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_expense, 'fk_expense');
75 75
 } elseif (empty($fk_c_exp_tax_cat) || $fk_c_exp_tax_cat < 0) {
76
-	$rep->errorMessage =  $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_c_exp_tax_cat, 'fk_c_exp_tax_cat');
76
+	$rep->errorMessage = $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_c_exp_tax_cat, 'fk_c_exp_tax_cat');
77 77
 
78 78
 	$rep->response_status = 'error';
79 79
 } else {
80 80
 	// @see ndfp.class.php:3576 (method: compute_total_km)
81 81
 	$expense = new ExpenseReport($db);
82 82
 	if ($expense->fetch($fk_expense) <= 0) {
83
-		$rep->errorMessage =  $langs->transnoentitiesnoconv('ErrorRecordNotFound');
83
+		$rep->errorMessage = $langs->transnoentitiesnoconv('ErrorRecordNotFound');
84 84
 		$rep->response_status = 'error';
85 85
 	} else {
86 86
 		$userauthor = new User($db);
87 87
 		if ($userauthor->fetch($expense->fk_user_author) <= 0) {
88
-			$rep->errorMessage =  $langs->transnoentitiesnoconv('ErrorRecordNotFound');
88
+			$rep->errorMessage = $langs->transnoentitiesnoconv('ErrorRecordNotFound');
89 89
 			$rep->response_status = 'error';
90 90
 		} else {
91 91
 			$expense = new ExpenseReport($db);
Please login to merge, or discard this patch.
htdocs/core/class/html.formadmin.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 			$out .= '>'.$langs->trans("AutoDetectLang").'</option>';
114 114
 		}
115 115
 
116
-		asort($langs_available);	// array('XX' => 'Language (Country)', ...)
116
+		asort($langs_available); // array('XX' => 'Language (Country)', ...)
117 117
 
118 118
 		foreach ($langs_available as $key => $value) {
119 119
 			$valuetoshow = $value;
Please login to merge, or discard this patch.
htdocs/intracommreport/card.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,12 @@
 block discarded – undo
77 77
 //if ($user->socid > 0) $socid = $user->socid;
78 78
 //$isdraft = (isset($object->status) && ($object->status == $object::STATUS_DRAFT) ? 1 : 0);
79 79
 //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
80
-if (empty($conf->intracommreport->enabled)) accessforbidden();
81
-if (!$permissiontoread) accessforbidden();
80
+if (empty($conf->intracommreport->enabled)) {
81
+	accessforbidden();
82
+}
83
+if (!$permissiontoread) {
84
+	accessforbidden();
85
+}
82 86
 
83 87
 
84 88
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
 if ($action == 'add' && $permissiontoadd) {
119 119
 	$object->label = trim($label);
120 120
 	$object->type = trim($exporttype);
121
-	$object->type_declaration =  $type_declaration;
121
+	$object->type_declaration = $type_declaration;
122 122
 	//$object->subscription = (int) $subscription;
123 123
 
124 124
 	// Fill array 'array_options' with data from add form
Please login to merge, or discard this patch.