瀏覽代碼

Fix missing information propagated to trigger

Laurent Destailleur 3 年之前
父節點
當前提交
815dd74de0
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      htdocs/compta/facture/card.php

+ 3 - 0
htdocs/compta/facture/card.php

@@ -1109,6 +1109,8 @@ if (empty($reshook)) {
 						$facture_source->fetchPreviousNextSituationInvoice();
 					}
 				}
+
+
 				$id = $object->create($user);
 				if ($id < 0) {
 					$error++;
@@ -1236,6 +1238,7 @@ if (empty($reshook)) {
 							$line->multicurrency_total_tva = -$line->multicurrency_total_tva;
 							$line->multicurrency_total_ttc = -$line->multicurrency_total_ttc;
 
+							$line->context['createcreditnotefrominvoice'] = 1;
 							$result = $line->insert(0, 1); // When creating credit note with same lines than source, we must ignore error if discount alreayd linked
 
 							$object->lines[] = $line; // insert new line in current object