Pārlūkot izejas kodu

Fix Debug and minor fixes

Laurent Destailleur 9 gadi atpakaļ
vecāks
revīzija
10f2d7cd67

+ 7 - 7
htdocs/categories/viewcat.php

@@ -297,7 +297,7 @@ else
 	}
 	else
 	{
-		print "<tr ".$bc[false].'><td colspan="3">'.$langs->trans("NoSubCat")."</td></tr>";
+		print "<tr ".$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoSubCat")."</td></tr>";
 	}
 	print "</table>\n";
 }
@@ -371,7 +371,7 @@ if ($object->type == Categorie::TYPE_PRODUCT)
 		}
 		else
 		{
-			print "<tr ".$bc[false].'><td colspan="2">'.$langs->trans("ThisCategoryHasNoProduct")."</td></tr>";
+			print "<tr ".$bc[false].'><td colspan="2" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoProduct")."</td></tr>";
 		}
 		print "</table>\n";
 	}
@@ -422,7 +422,7 @@ if ($object->type == Categorie::TYPE_SUPPLIER)
 		}
 		else
 		{
-			print "<tr ".$bc[false]."><td>".$langs->trans("ThisCategoryHasNoSupplier")."</td></tr>";
+			print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoSupplier").'</td></tr>';
 		}
 		print "</table>\n";
 	}
@@ -475,7 +475,7 @@ if($object->type == Categorie::TYPE_CUSTOMER)
 		}
 		else
 		{
-			print "<tr ".$bc[false]."><td>".$langs->trans("ThisCategoryHasNoCustomer")."</td></tr>";
+			print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoCustomer").'</td></tr>';
 		}
 		print "</table>\n";
 	}
@@ -529,7 +529,7 @@ if ($object->type == Categorie::TYPE_MEMBER)
 		}
 		else
 		{
-			print "<tr ".$bc[false].'><td colspan="3">'.$langs->trans("ThisCategoryHasNoMember")."</td></tr>";
+			print '<tr '.$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoMember").'</td></tr>';
 		}
 		print "</table>\n";
 	}
@@ -582,7 +582,7 @@ if($object->type == Categorie::TYPE_CONTACT)
 		}
 		else
 		{
-			print "<tr ".$bc[false]."><td>".$langs->trans("ThisCategoryHasNoContact")."</td></tr>";
+			print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoContact").'</td></tr>';
 		}
 		print "</table>\n";
 	}
@@ -636,7 +636,7 @@ if ($object->type == Categorie::TYPE_ACCOUNT)
         }
         else
         {
-            print "<tr ".$bc[false].'><td colspan="3">'.$langs->trans("ThisCategoryHasNoAccount")."</td></tr>";
+            print '<tr '.$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoAccount").'</td></tr>';
         }
         print "</table>\n";
     }

+ 5 - 0
htdocs/core/ajax/selectsearchbox.php

@@ -111,10 +111,15 @@ if (! empty($conf->ficheinter->enabled) && empty($conf->global->MAIN_SEARCHFORM_
 {
 	$arrayresult['searchintointervention']=array('text'=>img_picto('','object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php?sall='.urlencode($search_boxvalue));
 }
+// HR
 if (! empty($conf->expensereport->enabled) && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire)
 {
 	$arrayresult['searchintoexpensereport']=array('text'=>img_picto('','object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?sall='.urlencode($search_boxvalue));
 }
+if (! empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read)
+{
+    $arrayresult['searchintoleaves']=array('text'=>img_picto('','object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?sall='.urlencode($search_boxvalue));
+}
 
 
 /* Do we really need this. We already have a select for users, and we should be able to filter into user list on employee flag

+ 1 - 1
htdocs/core/menus/standard/eldy.lib.php

@@ -1155,8 +1155,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
 				$newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire);
 				$newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire);
 
-                if ($conf->supplier_order->enabled) $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire);
                 $newmenu->add("/product/stock/massstockmove.php", $langs->trans("MassStockTransferShort"), 1, $user->rights->stock->mouvement->creer);
+                if ($conf->supplier_order->enabled) $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire);
 			}
 
 			// Expeditions

+ 3 - 1
htdocs/holiday/list.php

@@ -85,6 +85,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP
 $fieldstosearchall = array(
     'cp.rowid'=>'Ref',
     'cp.description'=>'Description',
+    'uu.lastname'=>'EmployeeLastname',
+    'uu.firstname'=>'EmployeeFirstname'
 );
 
 
@@ -428,7 +430,7 @@ if (! empty($holiday->holiday))
 if($holiday_payes == '2')
 {
     print '<tr>';
-    print '<td colspan="10" '.$bc[false].'">'.$langs->trans('None').'</td>';
+    print '<td colspan="10" class="opacitymedium">'.$langs->trans('NoRecordFound').'</td>';
     print '</tr>';
 }
 

+ 2 - 0
htdocs/langs/en_US/holiday.lang

@@ -76,6 +76,8 @@ BoxTitleLastLeaveRequests=Latest %s modified leave requests
 HolidaysMonthlyUpdate=Monthly update
 ManualUpdate=Manual update
 HolidaysCancelation=Leave request cancelation
+EmployeeLastname=Employee lastname
+EmployeeFirstname=Employee firstname
 
 ## Configuration du Module ##
 LastUpdateCP=Latest automatic update of leaves allocation

+ 2 - 1
htdocs/langs/en_US/main.lang

@@ -751,5 +751,6 @@ SearchIntoCustomerProposals=Customer proposals
 SearchIntoSupplierProposals=Supplier proposals
 SearchIntoInterventions=Interventions
 SearchIntoContracts=Contracts
-SearchIntoExpenseReports=Expense reports
 SearchIntoCustomerShipments=Customer shipments
+SearchIntoExpenseReports=Expense reports
+SearchIntoLeaves=Leaves

+ 4 - 4
htdocs/product/stats/card.php

@@ -146,7 +146,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
     		// Choice of type of product
     		if (! empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";
     
-    		if ((string) $type != '0') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=0">';
+    		if ((string) $type != '0') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=0'.($mode?'&mode='.$mode:'').'">';
     		else print img_picto('','tick').' ';
     		print $langs->trans("Products");
     		if ((string) $type != '0') print '</a>';
@@ -154,7 +154,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
     		if (! empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n";
     		else print ' &nbsp; / &nbsp; ';
     
-    		if ((string) $type != '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=1">';
+    		if ((string) $type != '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'&type=1'.($mode?'&mode='.$mode:'').'">';
     		else print img_picto('','tick').' ';
     		print $langs->trans("Services");
     		if ((string) $type != '1') print '</a>';
@@ -162,7 +162,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
     		if (! empty($conf->dol_use_jmobile)) print '</div>'."\n".'<div class="nowrap">'."\n";
     		else print ' &nbsp; / &nbsp; ';
     
-    		if ((string) $type == '0' || (string) $type == '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).'">';
+    		if ((string) $type == '0' || (string) $type == '1') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).($mode?'&mode='.$mode:'').'">';
     		else print img_picto('','tick').' ';
     		print $langs->trans("ProductsAndServices");
     		if ((string) $type == '0' || (string) $type == '1') print '</a>';
@@ -172,7 +172,7 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all')
     		print '<br>';
 	    }
 	    
-		// Choice of stats
+		// Choice of stats mode (byunit or bynumber)
 		if (! empty($conf->dol_use_jmobile)) print "\n".'<div class="fichecenter"><div class="nowrap">'."\n";
 
 		if ($mode == 'bynumber') print '<a href="'.$_SERVER["PHP_SELF"].'?id='.(GETPOST('id')?GETPOST('id'):$object->id).($type != '' ? '&type='.$type:'').'&mode=byunit">';

+ 14 - 11
htdocs/projet/contact.php

@@ -196,17 +196,20 @@ if ($id > 0 || ! empty($ref))
 	print dol_print_date($object->date_end,'day');
 	print '</td></tr>';
 
-	// Opportunity status
-	print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
-	$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
-	if ($code) print $langs->trans("OppStatus".$code);
-	print '</td></tr>';
-
-	// Opportunity Amount
-	print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
-	if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
-	print '</td></tr>';
-
+    if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+    {
+    	// Opportunity status
+    	print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
+    	$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
+    	if ($code) print $langs->trans("OppStatus".$code);
+    	print '</td></tr>';
+    
+    	// Opportunity Amount
+    	print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
+    	if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
+    	print '</td></tr>';
+    }
+    
 	// Budget
 	print '<tr><td>'.$langs->trans("Budget").'</td><td>';
 	if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);

+ 13 - 10
htdocs/projet/element.php

@@ -157,16 +157,19 @@ print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
 print dol_print_date($object->date_end,'day');
 print '</td></tr>';
 
-// Opportunity status
-print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
-$code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
-if ($code) print $langs->trans("OppStatus".$code);
-print '</td></tr>';
-
-// Opportunity Amount
-print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
-if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
-print '</td></tr>';
+if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
+{
+    // Opportunity status
+    print '<tr><td>'.$langs->trans("OpportunityStatus").'</td><td>';
+    $code = dol_getIdFromCode($db, $object->opp_status, 'c_lead_status', 'rowid', 'code');
+    if ($code) print $langs->trans("OppStatus".$code);
+    print '</td></tr>';
+    
+    // Opportunity Amount
+    print '<tr><td>'.$langs->trans("OpportunityAmount").'</td><td>';
+    if (strcmp($object->opp_amount,'')) print price($object->opp_amount,'',$langs,0,0,0,$conf->currency);
+    print '</td></tr>';
+}
 
 // Budget
 print '<tr><td>'.$langs->trans("Budget").'</td><td>';

+ 6 - 2
htdocs/projet/ganttview.php

@@ -142,7 +142,11 @@ if ($id > 0 || ! empty($ref))
 	print dol_print_date($object->date_end,'day');
 	print '</td></tr>';
 
-
+	// Budget
+	print '<tr><td>'.$langs->trans("Budget").'</td><td>';
+	if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
+	print '</td></tr>';
+	
     print '</table>';
 
     print '</div>';
@@ -263,7 +267,7 @@ if (count($tasksarray)>0)
 }
 else
 {
-	print $langs->trans("NoTasks");
+	print '<div class="opacitymedium">'.$langs->trans("NoTasks").'</div>';
 }
 
 

+ 5 - 0
htdocs/projet/note.php

@@ -122,6 +122,11 @@ if ($id > 0 || ! empty($ref))
 	print dol_print_date($object->date_end,'day');
 	print '</td></tr>';
 
+	// Budget
+	print '<tr><td>'.$langs->trans("Budget").'</td><td>';
+	if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
+	print '</td></tr>';
+	
 	print "</table>";
 
 	print '<br>';

+ 6 - 1
htdocs/projet/tasks.php

@@ -248,6 +248,11 @@ if ($id > 0 || ! empty($ref))
 	print dol_print_date($object->date_end,'day');
 	print '</td></tr>';
 
+	// Budget
+	print '<tr><td>'.$langs->trans("Budget").'</td><td>';
+	if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,0,0,0,$conf->currency);
+	print '</td></tr>';
+	
 	// Other options
 	$parameters=array();
 	$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
@@ -444,7 +449,7 @@ else if ($id > 0 || ! empty($ref))
 	}
 	else
 	{
-		print '<tr '.$bc[false].'><td colspan="9">'.$langs->trans("NoTasks").'</td></tr>';
+		print '<tr '.$bc[false].'><td colspan="9" class="opacitymedium">'.$langs->trans("NoTasks").'</td></tr>';
 	}
 	print "</table>";