From e64c27e1c308f1157f24442020aad31f22a2f111 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Tue, 8 Jun 2021 10:27:33 +0200 Subject: [PATCH 1/6] FIX : need to add payment sum to getlibstatus function in object linked block --- htdocs/compta/facture/tpl/linkedobjectblock.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index a02a0fc1682..1e18eb6bfeb 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -85,7 +85,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) } } print ''; - print ''.$objectlink->getLibStatut(3).''; + print ''.$objectlink->getLibStatut(3, $objectlink->getSommePaiement()).''; print ''.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').''; print "\n"; } From 33553f33476efd363b93cf6c5257943b560b59a0 Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Mon, 14 Jun 2021 17:01:59 +0200 Subject: [PATCH 2/6] FIX : same thing on supplier orders --- htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index 1b85082616a..1e5ed8c724c 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -65,7 +65,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) echo ''.price($objectlink->total_ht).''; } } ?> - getLibStatut(3); ?> + getLibStatut(3, $objectlink->getSommePaiement()); ?> ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> Date: Mon, 14 Jun 2021 17:08:16 +0200 Subject: [PATCH 3/6] FIX : method exists --- htdocs/compta/facture/tpl/linkedobjectblock.tpl.php | 5 ++++- htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index 1e18eb6bfeb..1b81446c243 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -85,7 +85,10 @@ foreach ($linkedObjectBlock as $key => $objectlink) } } print ''; - print ''.$objectlink->getLibStatut(3, $objectlink->getSommePaiement()).''; + print ''; + if(method_exists($objectlink, 'getSommePaiement')) print $objectlink->getLibStatut(3, $objectlink->getSommePaiement()); + else print $objectlink->getLibStatut(3); + print ''; print ''.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').''; print "\n"; } diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index 1e5ed8c724c..5bb6e45a8c8 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -65,7 +65,10 @@ foreach ($linkedObjectBlock as $key => $objectlink) echo ''.price($objectlink->total_ht).''; } } ?> - getLibStatut(3, $objectlink->getSommePaiement()); ?> + getLibStatut(3, $objectlink->getSommePaiement()); + else echo $objectlink->getLibStatut(3); + ?> ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> Date: Mon, 14 Jun 2021 15:10:24 +0000 Subject: [PATCH 4/6] Fixing style errors. --- htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index 5bb6e45a8c8..20969cddf22 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -66,9 +66,9 @@ foreach ($linkedObjectBlock as $key => $objectlink) } } ?> getLibStatut(3, $objectlink->getSommePaiement()); + if(method_exists($objectlink, 'getSommePaiement')) echo $objectlink->getLibStatut(3, $objectlink->getSommePaiement()); else echo $objectlink->getLibStatut(3); - ?> + ?> ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> Date: Wed, 23 Jun 2021 10:47:23 +0200 Subject: [PATCH 5/6] Update linkedobjectblock.tpl.php --- htdocs/compta/facture/tpl/linkedobjectblock.tpl.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index 1b81446c243..60a4cced4d0 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -86,8 +86,12 @@ foreach ($linkedObjectBlock as $key => $objectlink) } print ''; print ''; - if(method_exists($objectlink, 'getSommePaiement')) print $objectlink->getLibStatut(3, $objectlink->getSommePaiement()); - else print $objectlink->getLibStatut(3); + if (method_exists($objectlink, 'getSommePaiement')) { + print $objectlink->getLibStatut(3, $objectlink->getSommePaiement()); + } + else { + print $objectlink->getLibStatut(3); + } print ''; print ''.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').''; print "\n"; From 9c657206b3ddf2268452f7ab4c5b6792ddf5c75f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Jun 2021 10:47:51 +0200 Subject: [PATCH 6/6] Update linkedobjectblock.tpl.php --- htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index 20969cddf22..b8954e7f5c2 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -66,8 +66,11 @@ foreach ($linkedObjectBlock as $key => $objectlink) } } ?> getLibStatut(3, $objectlink->getSommePaiement()); - else echo $objectlink->getLibStatut(3); + if (method_exists($objectlink, 'getSommePaiement')) { + echo $objectlink->getLibStatut(3, $objectlink->getSommePaiement()); + } else { + echo $objectlink->getLibStatut(3); + } ?> ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?>