diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index 7cf5d15f3a2..fa3386449a2 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -89,6 +89,25 @@ if ($action == 'setdate' && $user->rights->banque->cheque) } } +if ($action == 'setref' && $user->rights->banque->cheque) +{ + $result = $object->fetch(GETPOST('id','int')); + if ($result > 0) + { + $number=GETPOST('number'); + + $result=$object->set_number($user,$number); + if ($result < 0) + { + $mesg='
'.$object->error.'
'; + } + } + else + { + $mesg='
'.$object->error.'
'; + } +} + if ($action == 'create' && $_POST["accountid"] > 0 && $user->rights->banque->cheque) { if (is_array($_POST['toRemise'])) @@ -460,12 +479,30 @@ else $accountstatic->label=$object->account_label; print ''; - print '"; - print "\n"; + print ''; + print ''; print '
'.$langs->trans('Ref').''; + print '
'; - print $form->showrefnav($object,'ref',$linkback, 1, 'number'); + print ''; + if ($action != 'editref') print ''; + print '
'; + print $langs->trans('Ref'); + print 'id.'">'.img_edit($langs->trans('SetRef'),1).'
'; + print '
'; + if ($action == 'editref') + { + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'; + } + else + { + print $form->showrefnav($object,'ref',$linkback, 1, 'number'); + } - print "
';