Skip to content

Commit

Permalink
FIX : Edit in place of "Outstanding Limit"
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mrsof committed Feb 24, 2015
1 parent 09013c7 commit 5599dee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions htdocs/comm/card.php
Expand Up @@ -143,10 +143,10 @@
}

// 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');
}
Expand Down Expand Up @@ -393,9 +393,10 @@
{
print '<tr>';
print '<td>';
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 '</td><td colspan="3">';
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 '</td>';
print '</tr>';
}
Expand Down

0 comments on commit 5599dee

Please sign in to comment.