Browse Source

FIX inventory code must be different at each transation

Laurent Destailleur 2 years ago
parent
commit
f48752fc16
2 changed files with 2 additions and 3 deletions
  1. 1 1
      htdocs/fourn/class/fournisseur.commande.class.php
  2. 1 2
      htdocs/mrp/mo_production.php

+ 1 - 1
htdocs/fourn/class/fournisseur.commande.class.php

@@ -2006,7 +2006,7 @@ class CommandeFournisseur extends CommonOrder
 
 		$now = dol_now();
 
-		$inventorycode = $langs->trans("Reception").' '.$this->ref;
+		$inventorycode = dol_print_date(dol_now(), 'dayhourlog');
 
 		if (($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY || $this->statut == self::STATUS_RECEIVED_COMPLETELY)) {
 			$this->db->begin();

+ 1 - 2
htdocs/mrp/mo_production.php

@@ -660,8 +660,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
 
 		if (in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
 			$defaultstockmovementlabel = GETPOST('inventorylabel', 'alphanohtml') ? GETPOST('inventorylabel', 'alphanohtml') : $langs->trans("ProductionForRef", $object->ref);
-			//$defaultstockmovementcode = GETPOST('inventorycode', 'alphanohtml') ? GETPOST('inventorycode', 'alphanohtml') : $object->ref.'_'.dol_print_date(dol_now(), 'dayhourlog');
-			$defaultstockmovementcode = GETPOST('inventorycode', 'alphanohtml') ? GETPOST('inventorycode', 'alphanohtml') : $langs->trans("ProductionForRef", $object->ref);
+			$defaultstockmovementcode = GETPOST('inventorycode', 'alphanohtml') ? GETPOST('inventorycode', 'alphanohtml') : dol_print_date(dol_now(), 'dayhourlog');
 
 			print '<div class="center'.(in_array($action, array('consumeorproduce', 'consumeandproduceall')) ? ' formconsumeproduce' : '').'">';
 			print '<div class="opacitymedium hideonsmartphone paddingbottom">'.$langs->trans("ConfirmProductionDesc", $langs->transnoentitiesnoconv("Confirm")).'<br></div>';