From 95e1b97f42350375af61e1d9c45fe9714f163c88 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Sep 2022 13:09:21 +0200 Subject: [PATCH 1/8] Fix missing inventory code in reception --- htdocs/fourn/class/fournisseur.commande.class.php | 4 +++- htdocs/fourn/commande/dispatch.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index f350c4f3640..08126bf5974 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2006,6 +2006,8 @@ class CommandeFournisseur extends CommonOrder $now = dol_now(); + $inventorycode = $langs->trans("Reception").' '.$this->ref; + if (($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY || $this->statut == self::STATUS_RECEIVED_COMPLETELY)) { $this->db->begin(); @@ -2039,7 +2041,7 @@ class CommandeFournisseur extends CommonOrder // $price should take into account discount (except if option STOCK_EXCLUDE_DISCOUNT_FOR_PMP is on) $mouv->origin = &$this; $mouv->setOrigin($this->element, $this->id); - $result = $mouv->reception($user, $product, $entrepot, $qty, $price, $comment, $eatby, $sellby, $batch); + $result = $mouv->reception($user, $product, $entrepot, $qty, $price, $comment, $eatby, $sellby, $batch, $inventorycode); if ($result < 0) { $this->error = $mouv->error; $this->errors = $mouv->errors; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index a1ddef959a0..acb9766a318 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -221,6 +221,7 @@ if ($action == 'denydispatchline' && $permissiontocontrol) { if ($action == 'dispatch' && $permissiontoreceive) { $error = 0; + $notrigger = 0; $db->begin(); From f48752fc1693c792951a5fd2d194f4ccf9ea1315 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Sep 2022 13:25:07 +0200 Subject: [PATCH 2/8] FIX inventory code must be different at each transation --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- htdocs/mrp/mo_production.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 08126bf5974..ad666573b18 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/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(); diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 1c6f3f7ec39..34b9191db94 100644 --- a/htdocs/mrp/mo_production.php +++ b/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 '
'; print '
'.$langs->trans("ConfirmProductionDesc", $langs->transnoentitiesnoconv("Confirm")).'
'; From a35d7f8a4b1199add41780d23765ad4e857c996b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Sep 2022 14:17:14 +0200 Subject: [PATCH 3/8] Fix must not overwrite the var that is an object of cache --- htdocs/fourn/commande/dispatch.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index acb9766a318..ccf95de4232 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -1202,10 +1202,6 @@ if ($id > 0 || !empty($ref)) { while ($i < $num) { $objp = $db->fetch_object($resql); - $tmpproduct->id = $objp->fk_product; - $tmpproduct->ref = $objp->ref; - $tmpproduct->label = $objp->label; - if ($action == 'editline' && $lineid == $objp->dispatchlineid) { print '
From 3c5f3f7b858d57a82be46c08b4999a96cd4ba7a7 Mon Sep 17 00:00:00 2001 From: Atm-Gregr Date: Mon, 12 Sep 2022 16:28:06 +0200 Subject: [PATCH 4/8] fix --- htdocs/projet/tasks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 4af49c7a3d5..181ae20589d 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -988,7 +988,7 @@ while ($i < min($num, $limit)) { // Description if (!empty($arrayfields['t.description']['checked'])) { print ''; - print dol_escape_htmltag($object->description); + print $object->description; print ''; if (!$i) { $totalarray['nbfield']++; From 527cfadf0f168e61918c1e1a8aa3215cc4236934 Mon Sep 17 00:00:00 2001 From: Atm-Gregr Date: Mon, 12 Sep 2022 16:31:00 +0200 Subject: [PATCH 5/8] nl2br like on the card --- htdocs/projet/tasks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 181ae20589d..65ceda08242 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -988,7 +988,7 @@ while ($i < min($num, $limit)) { // Description if (!empty($arrayfields['t.description']['checked'])) { print ''; - print $object->description; + print nl2br($object->description); print ''; if (!$i) { $totalarray['nbfield']++; From 77ec9ee669275b8125b49057f8d45a249736409c Mon Sep 17 00:00:00 2001 From: ksar <35605507+ksar-ksar@users.noreply.github.com> Date: Tue, 13 Sep 2022 11:26:37 +0200 Subject: [PATCH 6/8] FIX : ToOfferALinkForOnlinePayment not translated ToOfferALinkForOnlinePayment is defined on stripe.lang --- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 72eb041f873..c47e9fc7c60 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1265,7 +1265,7 @@ class pdf_sponge extends ModelePDFFactures require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; global $langs; - $langs->loadLangs(array('payment', 'paybox')); + $langs->loadLangs(array('payment', 'paybox', 'stripe')); $servicename = $langs->transnoentities('Online'); $paiement_url = getOnlinePaymentUrl('', 'invoice', $object->ref, '', '', ''); $linktopay = $langs->trans("ToOfferALinkForOnlinePayment", $servicename).' '.$outputlangs->transnoentities("ClickHere").''; From 4f9c273c644f2ccc157674144ec9a87cd9102db4 Mon Sep 17 00:00:00 2001 From: Atm-Gregr Date: Tue, 13 Sep 2022 14:19:28 +0200 Subject: [PATCH 7/8] retours --- htdocs/projet/tasks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 65ceda08242..4f7c4bf7a42 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -988,7 +988,7 @@ while ($i < min($num, $limit)) { // Description if (!empty($arrayfields['t.description']['checked'])) { print ''; - print nl2br($object->description); + print dolGetFirstLineOfText($object->description, 5); print ''; if (!$i) { $totalarray['nbfield']++; From 7d4c7e0f6b7090a98838366da9df4049efb27f88 Mon Sep 17 00:00:00 2001 From: Atm-Gregr Date: Tue, 13 Sep 2022 14:28:57 +0200 Subject: [PATCH 8/8] stickler --- htdocs/projet/tasks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 4f7c4bf7a42..d74b84dd7ba 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -988,7 +988,7 @@ while ($i < min($num, $limit)) { // Description if (!empty($arrayfields['t.description']['checked'])) { print ''; - print dolGetFirstLineOfText($object->description, 5); + print dolGetFirstLineOfText($object->description, 5); print ''; if (!$i) { $totalarray['nbfield']++;