NEW Can edit RUM number

This commit is contained in:
Laurent Destailleur 2016-10-10 00:24:05 +02:00
parent 27244c86ce
commit bae1e69da3

View File

@ -134,6 +134,7 @@ if (empty($reshook))
$account->proprio = GETPOST('proprio','alpha'); $account->proprio = GETPOST('proprio','alpha');
$account->owner_address = GETPOST('owner_address','alpha'); $account->owner_address = GETPOST('owner_address','alpha');
$account->frstrecur = GETPOST('frstrecur','alpha'); $account->frstrecur = GETPOST('frstrecur','alpha');
$account->rum = GETPOST('rum','alpha');
if (empty($account->rum)) if (empty($account->rum))
{ {
$account->rum = $prelevement->buildRumNumber($object->code_client, $account->datec, $account->id); $account->rum = $prelevement->buildRumNumber($object->code_client, $account->datec, $account->id);
@ -363,7 +364,7 @@ if ($socid && $action != 'edit' && $action != "create")
print '<td colspan="4">'.$account->bank.'</td></tr>'; print '<td colspan="4">'.$account->bank.'</td></tr>';
// Show fields of bank account // Show fields of bank account
foreach($account->getFieldsToShow() as $val) foreach($account->getFieldsToShow(1) as $val)
{ {
if ($val == 'BankCode') { if ($val == 'BankCode') {
$content = $account->code_banque; $content = $account->code_banque;
@ -692,7 +693,7 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
print '<td><input size="30" type="text" name="bank" value="'.$account->bank.'"></td></tr>'; print '<td><input size="30" type="text" name="bank" value="'.$account->bank.'"></td></tr>';
// Show fields of bank account // Show fields of bank account
foreach ($account->getFieldsToShow() as $val) { foreach ($account->getFieldsToShow(1) as $val) {
$require=false; $require=false;
if ($val == 'BankCode') { if ($val == 'BankCode') {
@ -754,11 +755,11 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer)
// RUM // RUM
print '<tr><td class="titlefield">'.$langs->trans("RUM").'</td>'; print '<tr><td class="titlefield">'.$langs->trans("RUM").'</td>';
print '<td colspan="4">'.$account->rum.'</td></tr>'; print '<td colspan="4"><input size="30" type="text" name="rum" value="'.dol_escape_htmltag($account->rum).'"></td></tr>';
// FRSTRECUR // FRSTRECUR
print '<tr><td>'.$langs->trans("WithdrawMode").'</td>'; print '<tr><td>'.$langs->trans("WithdrawMode").'</td>';
print '<td colspan="4"><input size="30" type="text" name="frstrecur" value="'.(GETPOST('frstrecur')?GETPOST('frstrecur'):$account->frstrecur).'"></td></tr>'; print '<td colspan="4"><input size="30" type="text" name="frstrecur" value="'.dol_escape_htmltag(GETPOST('frstrecur')?GETPOST('frstrecur'):$account->frstrecur).'"></td></tr>';
print '</table>'; print '</table>';
} }