浏览代码

Fix var missing

Laurent Destailleur 3 年之前
父节点
当前提交
cde2af7614
共有 2 个文件被更改,包括 9 次插入8 次删除
  1. 2 2
      htdocs/compta/facture/info.php
  2. 7 6
      htdocs/core/class/cstate.class.php

+ 2 - 2
htdocs/compta/facture/info.php

@@ -131,7 +131,7 @@ if (!empty($conf->projet->enabled)) {
 }
 $morehtmlref .= '</div>';
 
-$object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status
+$object->totalpaid = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status
 
 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0);
 
@@ -140,7 +140,7 @@ print '<div class="underbanner clearboth"></div>';
 
 print '<br>';
 
-print '<table width="100%"><tr><td>';
+print '<table class="centpercent"><tr><td>';
 dol_print_object_info($object);
 print '</td></tr></table>';
 

+ 7 - 6
htdocs/core/class/cstate.class.php

@@ -51,6 +51,12 @@ class Cstate // extends CommonObject
 
 	public $code_departement;
 	public $code;
+
+	/**
+	 * @var string name
+	 */
+	public $name = '';
+
 	/**
 	 * @var string
 	 * @deprecated
@@ -58,10 +64,7 @@ class Cstate // extends CommonObject
 	 */
 	public $nom = '';
 
-	/**
-	 * @var string name
-	 */
-	public $name = '';
+	public $label;
 
 	public $active;
 
@@ -88,7 +91,6 @@ class Cstate // extends CommonObject
 	 */
 	public function create($user, $notrigger = 0)
 	{
-		global $conf, $langs;
 		$error = 0;
 
 		// Clean parameters
@@ -155,7 +157,6 @@ class Cstate // extends CommonObject
 	 */
 	public function fetch($id, $code = '')
 	{
-		global $langs;
 		$sql = "SELECT";
 		$sql .= " t.rowid,";
 		$sql .= " t.code_departement,";