Browse Source

Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/compta/facture.php
Laurent Destailleur 8 years ago
parent
commit
a8afa547f0

+ 25 - 15
htdocs/compta/facture/card.php

@@ -3890,29 +3890,20 @@ else if ($id > 0 || ! empty($ref))
 	// Lines
 	$result = $object->getLinesArray();
 
-	print '	<form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
-	<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
-	<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateligne') . '">
-	<input type="hidden" name="mode" value="">
-	<input type="hidden" name="id" value="' . $object->id . '">
-	';
-
-	if (! empty($conf->use_javascript_ajax) && $object->statut == 0) {
-		include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
-	}
-
-    print '<div class="div-table-responsive">';
-	print '<table id="tablelines" class="noborder noshadow" width="100%">';
-
 	// Show global modifiers
 	if (! empty($conf->global->INVOICE_USE_SITUATION))
 	{
 		if ($object->situation_cycle_ref && $object->statut == 0) {
-			print '<tr class="liste_titre nodrag nodrop">';
+			print '<div class="div-table-responsive">';
+			
 			print '<form name="updatealllines" id="updatealllines" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '"#updatealllines" method="POST">';
 			print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />';
 			print '<input type="hidden" name="action" value="updatealllines" />';
 			print '<input type="hidden" name="id" value="' . $object->id . '" />';
+			
+			print '<table id="tablelines" class="noborder noshadow" width="100%">';
+		    
+			print '<tr class="liste_titre nodrag nodrop">';
 
 			if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
 				print '<td align="center" width="5">&nbsp;</td>';
@@ -3949,10 +3940,29 @@ else if ($id > 0 || ! empty($ref))
 			print '<td align="right" class="nowrap"><input type="text" size="1" value="" name="all_progress">%</td>';
 			print '<td colspan="4" align="right"><input class="button" type="submit" name="all_percent" value="Modifier" /></td>';
 			print '</tr>';
+			
+			print '</table>';
+			
 			print '</form>';
+			
+			print '</div>';
 		}
 	}
 
+	print '	<form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
+	<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
+	<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateligne') . '">
+	<input type="hidden" name="mode" value="">
+	<input type="hidden" name="id" value="' . $object->id . '">
+	';
+	
+	if (! empty($conf->use_javascript_ajax) && $object->statut == 0) {
+	    include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
+	}
+	
+	print '<div class="div-table-responsive">';
+	print '<table id="tablelines" class="noborder noshadow" width="100%">';
+	
 	// Show object lines
 	if (! empty($object->lines))
 		$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1);

+ 4 - 4
htdocs/cron/list.php

@@ -408,11 +408,11 @@ if ($num > 0)
 		print '</td>';
 
 		print '<td class="center">';
-		if(!empty($obj->datestart)) {print dol_print_date($obj->datestart,'dayhour');}
+		if(!empty($obj->datestart)) {print dol_print_date($db->jdate($obj->datestart),'dayhour');}
 		print '</td>';
 
 		print '<td class="center">';
-		if(!empty($obj->dateend)) {print dol_print_date($obj->dateend,'dayhour');}
+		if(!empty($obj->dateend)) {print dol_print_date($db->jdate($obj->dateend),'dayhour');}
 		print '</td>';
 
 		print '<td align="right">';
@@ -424,11 +424,11 @@ if ($num > 0)
 		print '</td>';
 
 		print '<td class="center">';
-		if(!empty($obj->datenextrun)) {print dol_print_date($obj->datenextrun,'dayhour');}
+		if(!empty($obj->datenextrun)) {print dol_print_date($db->jdate($obj->datenextrun),'dayhour');}
 		print '</td>';
 
 		print '<td class="center">';
-		if(!empty($obj->datelastrun)) {print dol_print_date($obj->datelastrun,'dayhour');}
+		if(!empty($obj->datelastrun)) {print dol_print_date($db->jdate($obj->datelastrun),'dayhour');}
 		print '</td>';
 
 		print '<td class="center">';

+ 1 - 0
htdocs/langs/en_US/suppliers.lang

@@ -14,6 +14,7 @@ TotalSellingPriceMinShort=Total of subproducts selling prices
 SomeSubProductHaveNoPrices=Some sub-products have no price defined
 AddSupplierPrice=Add buying price
 ChangeSupplierPrice=Change buying price
+SupplierPrices=Supplier prices
 ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s
 NoRecordedSuppliers=No suppliers recorded
 SupplierPayment=Supplier payment

+ 5 - 3
htdocs/product/fournisseurs.php

@@ -585,6 +585,11 @@ if ($id > 0 || $ref)
 
 			if ($user->rights->fournisseur->lire)
 			{
+				$product_fourn = new ProductFournisseur($db);
+				$product_fourn_list = $product_fourn->list_product_fournisseur_price($object->id, $sortfield, $sortorder);
+				$nbtotalofrecords = count($product_fourn_list);
+			    print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($product_fourn_list), $nbtotalofrecords, 'title_accountancy.png');
+			     
 				// Suppliers list title
 			    print '<div class="div-table-responsive">';
 			    print '<table class="noborder" width="100%">';
@@ -612,9 +617,6 @@ if ($id > 0 || $ref)
 				print_liste_field_titre('');
 				print "</tr>\n";
 
-				$product_fourn = new ProductFournisseur($db);
-				$product_fourn_list = $product_fourn->list_product_fournisseur_price($object->id, $sortfield, $sortorder);
-
 				if (is_array($product_fourn_list))
 				{
 					$var=true;

+ 4 - 3
htdocs/product/price.php

@@ -1756,7 +1756,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
 	else if ($action != 'showlog_default_price' && $action != 'edit_price')
 	{
 		// List of all prices by customers
-
+        print '<!-- list of prices per customer -->'."\n";
+        
 		// Count total nb of records
 		$nbtotalofrecords = '';
 		if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
@@ -1793,8 +1794,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
 		if (count($prodcustprice->lines) > 0 || $search_soc)
 		{
     		print '<tr class="liste_titre">';
-    		print '<td><input type="text" class="flat" name="search_soc" value="' . $search_soc . '" size="20"></td>';
-    		print '<td colspan="8">&nbsp;</td>';
+    		print '<td class="liste_titre"><input type="text" class="flat" name="search_soc" value="' . $search_soc . '" size="20"></td>';
+    		print '<td class="liste_titre" colspan="8">&nbsp;</td>';
     		// Print the search button
             print '<td class="liste_titre" align="right">';
             $searchpitco=$form->showFilterAndCheckAddButtons(0);

+ 3 - 2
scripts/cron/cron_run_jobs.php

@@ -90,7 +90,7 @@ if ($userlogin == 'firstadmin')
         if ($obj) 
         {
             $userlogin = $obj->login;
-            echo "First admin user found is login '".$userlogin."'\n<br>";
+            echo "First admin user found is login '".$userlogin."'\n";
         }
     }
     else dol_print_error($db);
@@ -146,7 +146,8 @@ if(is_array($object->lines) && (count($object->lines)>0))
 	// Loop over job
 	foreach($object->lines as $line)
 	{
-	    dol_syslog("cron_run_jobs.php cronjobid: ".$line->id, LOG_WARNING);
+	    dol_syslog("cron_run_jobs.php cronjobid: ".$line->id, LOG_DEBUG);
+	    echo "cron_run_jobs.php cronjobid: ".$line->id."\n";
 	    
 		//If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database
 		if (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now))