From 90404da0a74ee999520f43b2caf5cb4d56cec932 Mon Sep 17 00:00:00 2001 From: Maximilien Valenzano Date: Tue, 23 Jan 2024 15:55:55 +0100 Subject: [PATCH 1/5] fix: use the currency for propal signature page --- htdocs/public/onlinesign/newonlinesign.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 0bf197e7a5edc..4f4df59656960 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -350,7 +350,7 @@ // Amount $amount = ''.$langs->trans("Amount"); $amount .= ''; - $amount .= ''.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).''; + $amount .= ''.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).''; $amount .= ''."\n"; // Call Hook amountPropalSign From e644782b53b4d0eb98c4fce70be5ae4dbfbeb815 Mon Sep 17 00:00:00 2001 From: Maximilien Valenzano Date: Tue, 23 Jan 2024 17:54:11 +0100 Subject: [PATCH 2/5] fix: diff for currency while currency of propal is not the same as global currency, we show both with propal currency in parentheses --- htdocs/public/onlinesign/newonlinesign.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 4f4df59656960..43cd662677a53 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -348,9 +348,13 @@ print ''."\n"; // Amount + $amount = ''.$langs->trans("Amount"); $amount .= ''; - $amount .= ''.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).''; + $amount .= ''.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).''; + if ($object->multicurrency_code != $conf->currency) { + $amount .= ' ('.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).')'; + } $amount .= ''."\n"; // Call Hook amountPropalSign From dedd0ef20d9b657da45273c0b6f2ea431e0efa89 Mon Sep 17 00:00:00 2001 From: atm-adrien Date: Tue, 30 Jan 2024 15:15:32 +0100 Subject: [PATCH 3/5] FIX : Adding hooks init --- htdocs/commande/contact.php | 3 +++ htdocs/commande/document.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index a5fc715eb38df..dd0fa8d35f6ef 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -45,6 +45,9 @@ if ($user->socid) { $socid = $user->socid; } +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('ordercontact')); + $result = restrictedArea($user, 'commande', $id, ''); $usercancreate = $user->hasRight("commande", "creer"); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index f16ad2ad3d305..3d5449c6c8392 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -80,6 +80,10 @@ if ($user->socid) { $socid = $user->socid; } + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('ordercarddocument')); + $result = restrictedArea($user, 'commande', $id, ''); From 570fcd9174ae8ebbc6b489e1a7783c93efab4df3 Mon Sep 17 00:00:00 2001 From: atm-adrien Date: Wed, 31 Jan 2024 10:33:25 +0100 Subject: [PATCH 4/5] FIX : Retours PR --- htdocs/commande/contact.php | 2 +- htdocs/commande/document.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index dd0fa8d35f6ef..ef8cfa95070a9 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -46,7 +46,7 @@ $socid = $user->socid; } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('ordercontact')); +$hookmanager->initHooks(array('ordercontact', 'globalcard')); $result = restrictedArea($user, 'commande', $id, ''); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 3d5449c6c8392..f8e540855835c 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -82,7 +82,7 @@ } // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('ordercarddocument')); +$hookmanager->initHooks(array('orderdocument', 'globalcard')); $result = restrictedArea($user, 'commande', $id, ''); From afbb6b665918a6d2549095e4c96f016ca12b6f2b Mon Sep 17 00:00:00 2001 From: Alban Durrheimer Date: Wed, 31 Jan 2024 16:32:43 +0100 Subject: [PATCH 5/5] Fix blank page with sub MO --- htdocs/mrp/mo_card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 52f93870619ea..6d66e83517422 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -168,7 +168,7 @@ $res = $object->add_object_linked('mo', $mo_parent->id); } - header("Location: ".dol_buildpath('/mrp/mo_card.php?id='.((int) $moline->fk_mo), 1)); + header("Location: ".dol_buildpath('/mrp/mo_card.php?id='.((int) $mo_parent->id), 1)); exit; }