浏览代码

Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0

Conflicts:
	htdocs/compta/facture/list.php
	htdocs/langs/fr_FR/bills.lang
Laurent Destailleur 2 年之前
父节点
当前提交
2f269c75de

+ 1 - 0
htdocs/compta/facture/class/facture.class.php

@@ -5457,6 +5457,7 @@ class Facture extends CommonInvoice
 			$sql .= ", ".MAIN_DB_PREFIX."c_paiement as cp";
 		}
 		$sql .= " WHERE f.paye = 0";
+		$sql .= " AND f.fk_statut = ".self::STATUS_VALIDATED;
 		$sql .= " AND f.date_lim_reglement = '".$this->db->idate($tmpidate, 'gmt')."'";
 		$sql .= " AND f.entity IN (".getEntity('facture').")";
 		if (!empty($paymentmode) && $paymentmode != 'all') {

+ 23 - 23
htdocs/compta/facture/list.php

@@ -863,9 +863,9 @@ $sql .= empty($hookmanager->resPrint) ? "" : " HAVING 1=1 ".$hookmanager->resPri
 $nbtotalofrecords = '';
 if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
 	/* This old and fast method to get and count full list returns all record so use a high amount of memory.
-	$result = $db->query($sql);
-	$nbtotalofrecords = $db->num_rows($result);
-	*/
+	 $result = $db->query($sql);
+	 $nbtotalofrecords = $db->num_rows($result);
+	 */
 	/* The fast and low memory method to get and count full list converts the sql into a sql count */
 	if ($sall || $search_product_category > 0 || $search_user > 0) {
 		$sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(DISTINCT f.rowid) as nbtotalofrecords FROM', $sql);
@@ -1112,10 +1112,10 @@ if ($resql) {
 		$arrayofmassactions['makepayment'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakePaymentAndClassifyPayed");
 	}
 	if (!empty($conf->prelevement->enabled) && !empty($user->rights->prelevement->bons->creer)) {
-			$langs->load("withdrawals");
-			$arrayofmassactions['withdrawrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeWithdrawRequest");
+		$langs->load("withdrawals");
+		$arrayofmassactions['withdrawrequest'] = img_picto('', 'payment', 'class="pictofixedwidth"').$langs->trans("MakeWithdrawRequest");
 	}
-	if ($user->rights->facture->supprimer) {
+	if (!empty($user->rights->facture->supprimer)) {
 		if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) {
 			$arrayofmassactions['predeletedraft'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Deletedraft");
 		} elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) {	// mass deletion never possible on invoices on such situation
@@ -1300,11 +1300,11 @@ if ($resql) {
 		print '<td class="liste_titre center">';
 		print '<div class="nowrap">';
 		/*
-		print $langs->trans('From').' ';
-		print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1);
-		print '</div>';
-		print '<div class="nowrap">';
-		print $langs->trans('to').' ';*/
+		 print $langs->trans('From').' ';
+		 print $form->selectDate($search_datelimit_start ? $search_datelimit_start : -1, 'search_datelimit_start', 0, 0, 1);
+		 print '</div>';
+		 print '<div class="nowrap">';
+		 print $langs->trans('to').' ';*/
 		print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("Before"));
 		print '<br><input type="checkbox" name="search_option" value="late"'.($option == 'late' ? ' checked' : '').'> '.$langs->trans("Alert");
 		print '</div>';
@@ -1744,12 +1744,12 @@ if ($resql) {
 			$facturestatic->note_public = $obj->note_public;
 			$facturestatic->note_private = $obj->note_private;
 			if (!empty($conf->global->INVOICE_USE_SITUATION) && !empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) {
-				 $facturestatic->retained_warranty = $obj->retained_warranty;
-				 $facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit;
-				 $facturestatic->situation_final = $obj->retained_warranty_date_limit;
-				 $facturestatic->situation_final = $obj->retained_warranty_date_limit;
-				 $facturestatic->situation_cycle_ref = $obj->situation_cycle_ref;
-				 $facturestatic->situation_counter = $obj->situation_counter;
+				$facturestatic->retained_warranty = $obj->retained_warranty;
+				$facturestatic->retained_warranty_date_limit = $obj->retained_warranty_date_limit;
+				$facturestatic->situation_final = $obj->retained_warranty_date_limit;
+				$facturestatic->situation_final = $obj->retained_warranty_date_limit;
+				$facturestatic->situation_cycle_ref = $obj->situation_cycle_ref;
+				$facturestatic->situation_counter = $obj->situation_counter;
 			}
 			$companystatic->id = $obj->socid;
 			$companystatic->name = $obj->name;
@@ -2050,14 +2050,14 @@ if ($resql) {
 
 			// Amount HT
 			if (!empty($arrayfields['f.total_ht']['checked'])) {
-				  print '<td class="right nowraponall">'.price($obj->total_ht)."</td>\n";
+				print '<td class="right nowraponall">'.price($obj->total_ht)."</td>\n";
 				if (!$i) {
 					$totalarray['nbfield']++;
 				}
 				if (!$i) {
 					$totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht';
 				}
-				  $totalarray['val']['f.total_ht'] += $obj->total_ht;
+				$totalarray['val']['f.total_ht'] += $obj->total_ht;
 			}
 			// Amount VAT
 			if (!empty($arrayfields['f.total_tva']['checked'])) {
@@ -2225,16 +2225,16 @@ if ($resql) {
 
 			// Currency rate
 			if (!empty($arrayfields['f.multicurrency_tx']['checked'])) {
-				  print '<td class="nowraponall">';
-				  $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
-				  print "</td>\n";
+				print '<td class="nowraponall">';
+				$form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code);
+				print "</td>\n";
 				if (!$i) {
 					$totalarray['nbfield']++;
 				}
 			}
 			// Amount HT
 			if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) {
-				  print '<td class="right nowraponall amount">'.price($obj->multicurrency_total_ht)."</td>\n";
+				print '<td class="right nowraponall amount">'.price($obj->multicurrency_total_ht)."</td>\n";
 				if (!$i) {
 					$totalarray['nbfield']++;
 				}

+ 1 - 0
htdocs/core/actions_massactions.inc.php

@@ -74,6 +74,7 @@ if (!$error && $massaction == 'confirm_presend') {
 	$nbignored = 0;
 	$langs->load("mails");
 	include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+	include_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
 
 	$listofobjectid = array();
 	$listofobjectthirdparties = array();

+ 9 - 8
htdocs/expedition/shipment.php

@@ -610,7 +610,7 @@ if ($id > 0 || !empty($ref)) {
 		 *  Lines or orders with quantity shipped and remain to ship
 		 *  Note: Qty shipped are already available into $object->expeditions[fk_product]
 		 */
-		print '<table class="noborder noshadow" width="100%">';
+		print '<table id="tablelines" class="noborder noshadow" width="100%">';
 
 		$sql = "SELECT cd.rowid, cd.fk_product, cd.product_type as type, cd.label, cd.description,";
 		$sql .= " cd.price, cd.tva_tx, cd.subprice,";
@@ -635,18 +635,19 @@ if ($id > 0 || !empty($ref)) {
 		if ($resql) {
 			$num = $db->num_rows($resql);
 			$i = 0;
-
+			print '<thead>';
 			print '<tr class="liste_titre">';
-			print '<td>'.$langs->trans("Description").'</td>';
-			print '<td class="center">'.$langs->trans("QtyOrdered").'</td>';
-			print '<td class="center">'.$langs->trans("QtyShipped").'</td>';
-			print '<td class="center">'.$langs->trans("KeepToShip").'</td>';
+			print '<th>'.$langs->trans("Description").'</th>';
+			print '<th class="center">'.$langs->trans("QtyOrdered").'</th>';
+			print '<th class="center">'.$langs->trans("QtyShipped").'</th>';
+			print '<th class="center">'.$langs->trans("KeepToShip").'</th>';
 			if (!empty($conf->stock->enabled)) {
-				print '<td class="center">'.$langs->trans("RealStock").'</td>';
+				print '<th class="center">'.$langs->trans("RealStock").'</th>';
 			} else {
-				print '<td>&nbsp;</td>';
+				print '<th>&nbsp;</th>';
 			}
 			print "</tr>\n";
+			print '</thead>';
 
 			$toBeShipped = array();
 			$toBeShippedTotal = 0;

+ 5 - 1
htdocs/product/stock/replenish.php

@@ -137,7 +137,7 @@ if ($reshook < 0) {
  * Actions
  */
 
-if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') || GETPOST('valid')) { // Both test are required to be compatible with all browsers
+if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // Both test are required to be compatible with all browsers
 	$search_ref = '';
 	$search_label = '';
 	$sall = '';
@@ -669,6 +669,8 @@ if ($search_ref || $search_label || $sall || $salert || $draftorder || GETPOST('
 if ($limit > 0 && $limit != $conf->liste_limit) {
 	$filters .= '&limit='.urlencode($limit);
 }
+if (!empty($includeproductswithoutdesiredqty)) $filters .= '&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty);
+if (!empty($salert)) $filters .= '&salert='.urlencode($salert);
 
 $param = (isset($type) ? '&type='.urlencode($type) : '');
 $param .= '&fourn_id='.urlencode($fourn_id).'&search_label='.urlencode($search_label).'&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty).'&salert='.urlencode($salert).'&draftorder='.urlencode($draftorder);
@@ -676,6 +678,8 @@ $param .= '&search_ref='.urlencode($search_ref);
 $param .= '&mode='.urlencode($mode);
 $param .= '&fk_supplier='.urlencode($fk_supplier);
 $param .= '&fk_entrepot='.urlencode($fk_entrepot);
+if (!empty($includeproductswithoutdesiredqty)) $param .= '&includeproductswithoutdesiredqty='.urlencode($includeproductswithoutdesiredqty);
+if (!empty($salert)) $param .= '&salert='.urlencode($salert);
 
 $stocklabel = $langs->trans('Stock');
 $stocklabelbis = $langs->trans('Stock');

+ 2 - 2
htdocs/public/test/test_exec.php

@@ -85,7 +85,7 @@ print '<br><br>'."\n";
 print "*** TEST READ OF /test.txt FILE AND LS /dev/std*<br>\n";
 
 exec('cat /test.txt; ls /dev/std*; sleep 1;', $out, $ret);
-print $ret."<br>\n";
+print "ret=".$ret."<br>\n";
 print_r($out);
 print '<br>';
 
@@ -97,5 +97,5 @@ print "*** TRY TO RUN CLAMDSCAN<br>\n";
 $ret = 0;
 $out = null;
 exec('/usr/bin/clamdscan --fdpass filethatdoesnotexists.php', $out, $ret);
-print $ret."<br>\n";
+print "ret=".$ret."<br>\n";
 print_r($out);