<div dir="ltr"><div><div><div><div>hello <br></div>i use session for save somme data like this<br><br> foreach my $NumParc ( @NumParc ) {<br> my $parc = database('toto')->quick_select('Parc', { NumParc => $NumParc });<br>
<br> $Stock->{$NumParc} = ( $NumParc => { CodeArticle => $parc->{CodeArticle},<br> NumParc => $parc->{NumParc},<br>
NumSerie => $parc->{NumSerie},<br> NumContrat => $parc->{NumContrat}<br>
} );<br><br> session 'Stock' => $NewStock; <br><br></div>but is a bit complex in the template for seleting my fial values <br>the only things i can do is likke this <br>
<br>[% FOREACH NumParc IN stack.keys.sort %]<br><br> <tr><br> [% FOREACH item IN stack.$NumParc.values %]<br> <br> <td class="numcontrat">[% item %]</td><br>
[% END %]<br> <br> [% END %]<br></div>so i can not use item.keys to chosse my value like i hope<br><br>[% FOREACH NumParc IN stack.keys.sort %]<br><br> <tr><br>
[% FOREACH item IN stack.$NumParc.values %]<br> <br> <td class="numcontrat">[% item %]</td><br> <td class="numserie">[% item %]</td><br>
<td class="numParc">[% item %]</td><br><br> [% END %]<br> <br> [% END %]<br><br></div>this is the json session file for stock<br>
<ul class=""><li><br></li><li><span class=""><span class="">"</span>Stock<span class="">"</span></span>: {<ul class=""><li><span class=""><span class="">"</span>768572<span class="">"</span></span>: {<ul class="">
<li><span class=""><span class="">"</span>NumParc<span class="">"</span></span>: <span class="">"</span><span class=""><span class=""><span class=""></span>768572<span class=""></span></span>"</span>,</li>
<li><span class=""><span class="">"</span>NumContrat<span class="">"</span></span>: <span class="">"zzzzzzzzzzzzz"</span>,</li><li><span class=""><span class="">"</span>NumSerie<span class="">"</span></span>: <span class="">null</span>,</li>
<li><span class=""><span class="">"</span>CodeArticle<span class="">"</span></span>: <span class="">"SZZZZZtttttt"</span></li></ul>},</li><li><span class=""><span class="">"</span>768573<span class="">"</span></span>: {<ul class="">
<li><span class=""><span class="">"</span>NumParc<span class="">"</span></span>: <span class="">"</span><span class=""><span class=""><span class=""></span>768573<span class=""></span></span>"</span>,</li>
<li><span class=""><span class="">"</span>NumContrat<span class="">"</span></span>: <span class="">"30912045"</span>,</li><li><span class=""><span class="">"</span>NumSerie<span class="">"</span></span>: <span class="">null</span>,</li>
<li><span class=""><span class="">"</span>CodeArticle<span class="">"</span></span>: <span class="">"INST "</span></li></ul>},</li><li><span class=""><span class="">"</span>768571<span class="">"</span></span>: {<ul class="">
<li><span class=""><span class="">"</span>NumParc<span class="">"</span></span>: <span class="">"</span><span class=""><span class=""><span class=""></span>768571<span class=""></span></span>"</span>,</li>
<li><span class=""><span class="">"</span>NumContrat<span class="">"</span></span>: <span class="">"12045"</span>,</li><li><span class=""><span class="">"</span>NumSerie<span class="">"</span></span>: <span class="">"1314ffffff374798"</span>,</li>
<li><span class=""><span class="">"</span>CodeArticle<span class="">"</span></span>: <span class="">"250efg"</span></li></ul>}</li></ul>},</li></ul>the paste add bullet<br><div><div><div><div> if someone may explain me a little where i am doing wrong ? <br>
<br></div><div>Regards <br></div><div>T.<br></div></div></div></div></div>