From 5de859d14b0335cf08ac2a2d00041fae23187889 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 16 Mar 2012 17:26:19 +0100 Subject: [PATCH 1/2] Fix: missing colspan if view line number is active --- htdocs/core/tpl/freeproductline_edit.tpl.php | 4 ++-- htdocs/core/tpl/predefinedproductline_edit.tpl.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/tpl/freeproductline_edit.tpl.php b/htdocs/core/tpl/freeproductline_edit.tpl.php index 91c4824536a..ecb93691832 100644 --- a/htdocs/core/tpl/freeproductline_edit.tpl.php +++ b/htdocs/core/tpl/freeproductline_edit.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2011 Laurent Destailleur + * Copyright (C) 2010-2012 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -34,7 +34,7 @@ > - + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> id; ?>" /> > - + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> From ccf166583769981e5c7475fa26c07568156d9b6a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 16 Mar 2012 17:37:18 +0100 Subject: [PATCH 2/2] Fix: missing status after set draft --- htdocs/comm/propal.php | 20 ++++++++++---------- htdocs/comm/propal/class/propal.class.php | 1 + 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index b99249129eb..ffb71c6b284 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -843,7 +843,7 @@ else if ($action == "addline" && $user->rights->propale->creer) } // Mise a jour d'une ligne dans la propale -if ($action == 'updateligne' && $user->rights->propale->creer && $_POST["save"] == $langs->trans("Save")) +else if ($action == 'updateligne' && $user->rights->propale->creer && $_POST["save"] == $langs->trans("Save")) { if (! $object->fetch($_POST["id"]) > 0) { @@ -950,28 +950,28 @@ else if ($action == 'builddoc' && $user->rights->propale->creer) } // Set project -else if ($action == 'classin') +else if ($action == 'classin' && $user->rights->propale->creer) { $object->fetch($id); $object->setProject($_POST['projectid']); } // Delai de livraison -else if ($action == 'setavailability') +else if ($action == 'setavailability' && $user->rights->propale->creer) { $object->fetch($id); $result = $object->availability($_POST['availability_id']); } // Origine de la propale -else if ($action == 'setdemandreason') +else if ($action == 'setdemandreason' && $user->rights->propale->creer) { $object->fetch($id); $result = $object->demand_reason($_POST['demand_reason_id']); } // Conditions de reglement -else if ($action == 'setconditions') +else if ($action == 'setconditions' && $user->rights->propale->creer) { $object->fetch($id); $result = $object->setPaymentTerms(GETPOST('cond_reglement_id','int')); @@ -990,7 +990,7 @@ else if ($action == 'setremiseabsolue' && $user->rights->propale->creer) } // Mode de reglement -else if ($action == 'setmode') +else if ($action == 'setmode' && $user->rights->propale->creer) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int')); @@ -1090,25 +1090,25 @@ if ($id > 0 || ! empty($ref)) } // Confirm delete - if ($action == 'delete') + else if ($action == 'delete') { $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp',$object->ref), 'confirm_delete','',0,1); } // Confirm reopen - if ($action == 'reopen') + else if ($action == 'reopen') { $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp',$object->ref), 'confirm_reopen','',0,1); } // Confirmation delete product/service line - if ($action == 'ask_deleteline') + else if ($action == 'ask_deleteline') { $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline','',0,1); } // Confirm validate proposal - if ($action == 'validate') + else if ($action == 'validate') { $error=0; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 449a2a73c23..bfb34473086 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1575,6 +1575,7 @@ class Propal extends CommonObject if ($this->db->query($sql)) { + $this->statut = 0; return 1; } else