[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 75/162: Bug : in Purchase and Sale , the last
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 75/162: Bug : in Purchase and Sale , the last rows disappear when we change the ledger |
Date: |
Sat, 11 Jul 2020 13:23:42 -0400 (EDT) |
sparkyx pushed a commit to annotated tag E-4
in repository noalyss.
commit 5b558f0d0ff1fd1c2420463ac64a93dd1eb08b9a
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sat Sep 29 12:25:04 2018 +0200
Bug : in Purchase and Sale , the last rows disappear when we change the
ledger
---
html/js/acc_ledger.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js
index 52aa5b7..e488708 100644
--- a/html/js/acc_ledger.js
+++ b/html/js/acc_ledger.js
@@ -175,19 +175,21 @@ function update_row(ctl)
var answer = request.responseText.evalJSON(true);
var row = parseFloat(answer.row);
var current_row = parseFloat($('nb_item').value);
+ var table_to_update=$(ctl);
if (current_row > row) {
- // Too many row
- var delta = $('nb_item').value - row;
+ // Too many row, we always must keep 2 rows
for the sum
+ var delta = $('nb_item').value - row ;
var idx = $('nb_item').value;
for (var i = 0; i < delta; i++) {
- $(ctl).deleteRow(-1);
+ var pos_row=table_to_update.rows.length;
+ table_to_update.deleteRow(pos_row-3);
idx--;
}
$('nb_item').value = row;
}
if (current_row < row) {
// We need to add rows
- var delta = row - current_row;
+ var delta = row - current_row ;
for (var i = 0; i < delta; i++) {
if (ctl == 'fin_item') {
ledger_fin_add_row();
- [Noalyss-commit] [noalyss] 53/162: integrate fix for bug in insert_quant_purchase which cannot save private fee Conflicts: include/sql/patch/upgrade128.sql, (continued)
- [Noalyss-commit] [noalyss] 53/162: integrate fix for bug in insert_quant_purchase which cannot save private fee Conflicts: include/sql/patch/upgrade128.sql, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 58/162: Security fix : f_id is a number, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 60/162: translation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 61/162: CFGLED : security fix : remove $_REQUEST, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 63/162: Merge branch 'master' into r700-currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 64/162: Remove the default "<div class=content>" which lead to cosmetic bug in the plugins, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 65/162: Documentation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 69/162: Check for date and number : isdate and isnumeric, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 71/162: Improve waiting box, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 72/162: Bug : cannot set group, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 75/162: Bug : in Purchase and Sale , the last rows disappear when we change the ledger,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 66/162: Documentation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 67/162: Create lib for Tabs, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 68/162: Merge tag 'rel7008' into r700-currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 70/162: Merge branch 'master' into r700-currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 73/162: Manage_Table : issue with the type select, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 74/162: Bug : ajax fails if wait_box does not exist, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 76/162: Improve debug info, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 77/162: adapt to 7.2 , error with sizeof, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 80/162: Style.css Ajout de nowrap, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 82/162: Currency : show the currency of the ledger when entering info, Dany De Bontridder, 2020/07/11