Skip to content

Commit

Permalink
Fix deletion of ledger line when editing transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 12, 2018
1 parent 284e6f1 commit 12e48e0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions htdocs/accountancy/bookkeeping/card.php
Expand Up @@ -615,8 +615,8 @@
print '<input type="text" name="subledger_account" value="'.$line->subledger_account.'">';
}
print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
print '<td><input type="text" class="minwidth100" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" class="minwidth300" name="label_operation" value="' . $line->label_operation. '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . price($line->debit) . '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . price($line->credit) . '"/></td>';
print '<td>';
Expand All @@ -636,8 +636,8 @@
print img_edit();
print '</a> &nbsp;';

$actiontodelete='detele';
if ($mode == '_tmp') $actiontodelete='confirm_delete';
$actiontodelete='delete';
if ($mode == '_tmp' || $action != 'delmouv') $actiontodelete='confirm_delete';

print '<a href="' . $_SERVER["PHP_SELF"] . '?action='.$actiontodelete.'&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
print img_delete();
Expand Down Expand Up @@ -673,8 +673,8 @@
print '<input type="text" name="subledger_account" value="">';
}
print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
print '<td><input type="text" class="minwidth100" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" class="minwidth300" name="label_operation" value="' . $line->label_operation. '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . ($debit ? price($debit) : '') . '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . ($credit ? price($credit) : '') . '"/></td>';
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';
Expand Down

0 comments on commit 12e48e0

Please sign in to comment.