diff --git a/html/js/accounting_item.js b/html/js/accounting_item.js index f7445bb81..c58b0e6e0 100644 --- a/html/js/accounting_item.js +++ b/html/js/accounting_item.js @@ -77,6 +77,10 @@ function search_poste(obj) if ( obj.jrn) { queryString+="&j="+obj.jrn; + }else { + if ($("p_jrn")) { + queryString+="&j="+$("p_jrn").value; + } } if ( obj.account) { diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php index d7efb992f..e9683ee31 100644 --- a/include/class/acc_ledger.class.php +++ b/include/class/acc_ledger.class.php @@ -927,7 +927,6 @@ class Acc_Ledger extends jrn_def_sql // Account $poste=new IPoste(); $poste->name='poste'.$i; - $poste->set_attribute('jrn', $this->id); $poste->set_attribute('ipopup', 'ipop_account'); $poste->set_attribute('label', 'ld'.$i); $poste->set_attribute('account', 'poste'.$i); diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php index f2f8a01e7..e4942bb4a 100644 --- a/include/class/fiche.class.php +++ b/include/class/fiche.class.php @@ -477,6 +477,7 @@ class Fiche { $w=new IPoste("av_text".$attr->ad_id); $w->set_attribute('ipopup','ipop_account'); + $w->set_attribute('jrn','0'); $w->set_attribute('account',"av_text".$attr->ad_id); $w->dbl_click_history(); // account created automatically @@ -639,6 +640,7 @@ class Fiche $w->id=$p_in."av_text".$r->ad_id; $w->set_attribute('ipopup', 'ipop_account'); $w->set_attribute('account', $w->id); + $w->set_attribute('jrn','0'); $w->dbl_click_history(); // account created automatically $w->table=0; @@ -696,6 +698,7 @@ class Fiche $w->table=0; $bulle=Icon_Action::infobulle(14); $w->value=$r->av_text; + $w->set_attribute('jrn','0'); break; case 'card': $uniq=rand(0, 1000);