From 5599deec004815d1867c854c4118c0067dd64a20 Mon Sep 17 00:00:00 2001 From: Sof Date: Tue, 24 Feb 2015 13:44:00 +0100 Subject: [PATCH] FIX : Edit in place of "Outstanding Limit" Edit in place not working for field "Outstanding Limit" in view mode for third party : - Field type 'amount' do not work in "Edit in place" mode. - Update returns an error "Unknown field 'OutstandingBill' in field list" when in "Edit in place" mode. --- htdocs/comm/card.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index dc74935ce98..d654bf13d17 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -143,10 +143,10 @@ if (empty($reshook)) } // update outstandng limit - if ($action == 'setOutstandingBill') + if ($action == 'setoutstanding_limit') { $object->fetch($id); - $object->outstanding_limit=GETPOST('OutstandingBill'); + $object->outstanding_limit=GETPOST('setoutstanding_limit'); $result=$object->set_OutstandingBill($user); if ($result < 0) setEventMessage($object->error,'errors'); } @@ -393,9 +393,10 @@ if ($id > 0) { print ''; print ''; - print $form->editfieldkey("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer); + print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer); print ''; - print $form->editfieldval("OutstandingBill",'OutstandingBill',$object->outstanding_limit,$object,$user->rights->societe->creer,'amount',($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); + $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount'; + print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); print ''; print ''; }