Merge pull request #1944 from aspangaro/develop-accounting
Fix :: Button on/off for account in chart of accounts
This commit is contained in:
commit
13090ed778
@ -65,8 +65,7 @@ if ($action == 'delete') {
|
|||||||
$accounting = new AccountingAccount($db);
|
$accounting = new AccountingAccount($db);
|
||||||
|
|
||||||
if ($action == 'disable') {
|
if ($action == 'disable') {
|
||||||
$accounting = $accounting->fetch($id);
|
if ($accounting->fetch($id)) {
|
||||||
if (! empty($accounting->id)) {
|
|
||||||
$result = $accounting->account_desactivate($id);
|
$result = $accounting->account_desactivate($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,10 +74,7 @@ if ($action == 'disable') {
|
|||||||
setEventMessage($accounting->error, 'errors');
|
setEventMessage($accounting->error, 'errors');
|
||||||
}
|
}
|
||||||
} else if ($action == 'enable') {
|
} else if ($action == 'enable') {
|
||||||
|
if ($accounting->fetch($id)) {
|
||||||
$accounting = $accounting->fetch($id);
|
|
||||||
|
|
||||||
if (! empty($accounting->id)) {
|
|
||||||
$result = $accounting->account_activate($id);
|
$result = $accounting->account_activate($id);
|
||||||
}
|
}
|
||||||
$action = 'update';
|
$action = 'update';
|
||||||
|
|||||||
@ -227,9 +227,8 @@ if ($result) {
|
|||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="8"> </td></tr><tr><td colspan="8" align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '"></td></tr>';
|
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '<br><div align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '"></div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->error();
|
||||||
|
|||||||
@ -208,10 +208,8 @@ if ($result) {
|
|||||||
$i ++;
|
$i ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="8"> </td></tr><tr><td colspan="8" align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventiler") . '"></td></tr>';
|
print '</table>';
|
||||||
|
print '<br><div align="center"><input type="submit" class="butAction" value="' . $langs->trans("Ventilate") . '"></div>';
|
||||||
print "</table>";
|
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
} else {
|
} else {
|
||||||
print $db->error();
|
print $db->error();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user