From 1baf25de3c279f3b2663238d7aecd0fc355cab07 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Wed, 27 Jan 2016 12:04:00 +0100 Subject: [PATCH 1/3] FIX ISSUE #4506 : make working the PROPAL_CLONE_ON_CREATE_PAGE hidden constant --- htdocs/comm/propal.php | 3 ++- htdocs/comm/propal/class/propal.class.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 08106bc2151..a637e4a87fa 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -293,7 +293,8 @@ if (empty($reshook)) $object->note = GETPOST('note'); $object->statut = 0; - $id = $object->create_from($user); + // the create is done below and further more the existing create_from function is quite hilarating + //$id = $object->create_from($user); } else { setEventMessage($langs->trans("ErrorFailedToCopyProposal", GETPOST('copie_propal')), 'errors'); } diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 372ac5d5a61..c7e4724d027 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -946,6 +946,7 @@ class Propal extends CommonObject */ function create_from($user) { + // i love this function because $this->products is not used in create function... $this->products=$this->lines; return $this->create($user); From 7a6c7f10a6c14bcd93003a0e7ee29277d9d65535 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Fri, 5 Feb 2016 19:14:40 +0100 Subject: [PATCH 2/3] FIX: add missing global def for ttc column --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 99e497046e0..704bc097db7 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2540,7 +2540,7 @@ abstract class CommonObject */ function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0) { - global $conf,$langs,$user,$object,$hookmanager; + global $conf,$langs,$user,$object,$hookmanager,$inputalsopricewithtax; print ''; From 13c85516eee4ec976194248df856aae98742e474 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 14 Feb 2016 21:58:54 +0100 Subject: [PATCH 3/3] Doc comment --- htdocs/comm/propal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 08106bc2151..c7d9d385385 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -268,7 +268,7 @@ if (empty($reshook)) { $db->begin(); - // Si on a selectionne une propal a copier, on realise la copie + // If we select proposal to clone during creation (when option PROPAL_CLONE_ON_CREATE_PAGE is on) if (GETPOST('createmode') == 'copy' && GETPOST('copie_propal')) { if ($object->fetch(GETPOST('copie_propal')) > 0) {