Bläddra i källkod

NEW order by batch number in product batch find all method (#26486)

* NEW order by batch number in product batch find all method

* Remove const PRODUCTBATCH_ORDER_BY_BATCH_NUMBER
lvessiller-opendsi 1 år sedan
förälder
incheckning
5fdfa4b971
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1 0
      htdocs/product/class/productbatch.class.php

+ 1 - 0
htdocs/product/class/productbatch.class.php

@@ -493,6 +493,7 @@ class Productbatch extends CommonObject
 		if ($fk_product > 0) { $sql .= "pl.eatby ASC, pl.sellby ASC, "; }
 		$sql .= "t.eatby ASC, t.sellby ASC ";
 		$sql .= ", t.qty ".(empty($conf->global->DO_NOT_TRY_TO_DEFRAGMENT_STOCKS_WAREHOUSE)?'ASC':'DESC'); // Note : qty ASC is important for expedition card, to avoid stock fragmentation
+		$sql .= ", t.batch ASC";
 
 		dol_syslog("productbatch::findAll", LOG_DEBUG);