From 3df33b0cba899121eed03083d9385fff897b2f46 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 18 Jun 2012 19:31:45 +0000 Subject: [PATCH] =?UTF-8?q?0000530:=20Ajouter=20la=20possibilit=C3=A9=20d'?= =?UTF-8?q?entrer=20une=20date=20par=20op=C3=A9ration=20dans=20la=20saisie?= =?UTF-8?q?=20du=20journal=20de=20banque?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/js/acc_ledger.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index 1e9cfbeef..47a540ff3 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -245,6 +245,9 @@ function ledger_fin_add_row() for ( var e=0;e < nNumberCell;e++) { var newCell=row.insertCell(e); + if ( e==0) { + newCell.id='tdchdate'+nb.value; + } var tt=rowToCopy.cells[e].innerHTML; var new_tt=tt.replace(/e_other0/g,"e_other"+nb.value); new_tt=new_tt.replace(/e_other0_comment/g,"e_other"+nb.value+'_comment'); @@ -252,7 +255,7 @@ function ledger_fin_add_row() new_tt=new_tt.replace(/e_other0_amount/g,"e_other"+nb.value+'_amount'); new_tt=new_tt.replace(/e_concerned0/g,"e_concerned"+nb.value); new_tt=new_tt.replace(/e_other0_label/g,"e_other"+nb.value+'_label'); - new_tt=new_tt.replace(/dateop0/g,"date"+nb.value); + new_tt=new_tt.replace(/dateop0/g,"dateop"+nb.value); newCell.innerHTML=new_tt; new_tt.evalScripts(); } @@ -261,7 +264,12 @@ function ledger_fin_add_row() g("e_other"+nb.value+'_amount').value="0"; g("e_other"+nb.value+'_comment').value=""; g("e_concerned"+nb.value).value=""; - nb.value++; + + var ch=$('chdate').options[$('chdate').selectedIndex].value; + if (ch == 1 ) { + $('tdchdate'+nb.value).hide(); + } + nb.value++; } /** * @brief add a line in the form for the purchase ledger