[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 79/218: Bug : in Purchase and Sale , the last
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 79/218: Bug : in Purchase and Sale , the last rows disappear when we change the ledger |
Date: |
Thu, 12 Sep 2019 15:58:44 -0400 (EDT) |
sparkyx pushed a commit to branch entreprise
in repository noalyss.
commit 5b558f0d0ff1fd1c2420463ac64a93dd1eb08b9a
Author: Dany De Bontridder <address@hidden>
Date: 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] 131/218: Translation + use of httpInput, (continued)
- [Noalyss-commit] [noalyss] 131/218: Translation + use of httpInput, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 124/218: Currency : when we pay at the same time as we record the sale / purchase , either the bank is in euro (default currency) or the sale/purchase has the same currency than the financial ledger, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 138/218: Translation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 139/218: Translation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 137/218: Translation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 140/218: Misc. Operation : input : Missing tag TR, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 144/218: Currency : meaning 1 EUR is worth x currency for Sales, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 141/218: Currency : for misc. operation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 159/218: Currency : because of Misc Operation, the tiers must also be saved into operation_currency. Fix also PRINTJRN for currency, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 166/218: Typo, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 79/218: Bug : in Purchase and Sale , the last rows disappear when we change the ledger,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 104/218: Reverse for Currency, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 118/218: Currency : export CSV history for card and accounting, fix bug with unneeded oc_vat_amount + add the currency rate, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 146/218: Currency : history for accounting , correct amount in currency, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 145/218: Currency : the meaning is : 1 euro is worth xxx Currency , so we divide the amount with the currency rate to compute the EUR value, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 150/218: Currency : detail operation Sale , the amount in currency were wrong in the summary, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 154/218: by default jrn is an empty array, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 164/218: Currency Show currency info for MISC, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 161/218: PHP 7.2 incomptability : sizeof of not array, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 155/218: Task #0001309: Association d'une opération avec elle-même., Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 158/218: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2019/09/12