Chargement en cours...
Une erreur s'est produite lors du traitement du gabarit.
For "...(...)" callee: Expected a method, but this has evaluated to a string (wrapper: f.t.SimpleScalar):
==> posteSemences?string  [in template "20099#20135#RESULTAT-MARGE-TOURNESOL-DETAIL" at line 661, column 24]

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${posteSemences?string("##0.00")?repl...  [in template "20099#20135#RESULTAT-MARGE-TOURNESOL-DETAIL" at line 661, column 22]
----
1<#import "${templatesPath}/UTIL" as util> 
2<#import "${templatesPath}/DICTIONNAIRE" as dico> 
3 
4<style type="text/css"> 
5    .h3top { 
6        text-align: center; 
7        max-width: 270px; 
8        margin: auto; 
9
10 
11    .libelleCourt { 
12        width: 245px; 
13        font-weight: bold; 
14        padding: 0 3px !important; 
15
16 
17    .libelleCourtGras { 
18        width: 245px; 
19        font-weight: bolder; 
20        font-size: larger; 
21        padding: 0 3px !important; 
22
23 
24    .uniteGauche { 
25        color: #9EB310; 
26        font-weight: bold; 
27        width: 70px; 
28        text-align: left; 
29        padding: 0 3px !important; 
30
31 
32    .uniteDroit { 
33        color: #9EB310; 
34        font-weight: bold; 
35        width: 70px; 
36        text-align: right; 
37        padding: 0 3px !important; 
38
39 
40    .uniteGrasGauche { 
41        color: #9EB310; 
42        font-weight: bolder; 
43        font-size: larger; 
44        width: 70px; 
45        text-align: left; 
46        padding: 0 3px !important; 
47
48 
49    .uniteGrasDroit { 
50        color: #9EB310; 
51        font-weight: bolder; 
52        font-size: larger; 
53        width: 70px; 
54        text-align: right; 
55        padding: 0 3px !important; 
56
57 
58    .libelleMargeBrute { 
59        width: 200px; 
60        font-weight: bolder; 
61        font-size: x-large; 
62        padding: 0 3px 0 10px !important; 
63
64 
65    .uniteGaucheMargeBrute { 
66        width: 70px; 
67        text-align: left; 
68        font-weight: bolder; 
69        font-size: x-large; 
70        padding: 0 3px !important; 
71
72 
73    .uniteDroitMargeBrute { 
74        width: 115px; 
75        text-align: right; 
76        font-weight: bolder; 
77        font-size: x-large; 
78        padding: 0 3px !important; 
79
80 
81    .chart { 
82        margin: 35px auto; 
83
84 
85    .accordion .fa { 
86        margin-right: 0.5rem; 
87        font-size: 24px; 
88        font-weight: bold; 
89        position: relative; 
90        top: 2px; 
91
92 
93    .btn-link { 
94        color: #9EB310; 
95
96 
97    .btn-link:hover { 
98        color: #629026; 
99
100 
101    .card-header { 
102        background-color: rgba(0, 0, 0, 0.01); 
103
104 
105    .card { 
106        border: none; 
107        border-style: none; 
108        border-bottom: 1px solid #9EB310; 
109        border-radius: 0; 
110
111 
112    @media (max-width: 600px) { 
113        .chart { 
114            margin: 35px -70px; 
115
116 
117        .responsiveTable { 
118            max-width: fit-content; 
119
120 
121        .apexcharts-legend { 
122            inset: auto 80px 16px !important; 
123
124
125     
126     @media print { 
127        .apexcharts-legend-marker:before { 
128            content: "\25A0"; 
129            position: absolute; 
130            top: -2px; 
131            left: -4px; 
132            display: block; 
133            line-height: 12px; 
134            font-size: 24px; 
135
136           
137        .col-12.col-lg-6 h3, 
138        #chart{ 
139            display: flex; 
140            justify-content: center; 
141
142         
143        .apexcharts-legend-marker { 
144            display: block; 
145
146         
147        .portlet > .portlet-topper { 
148            display: none; 
149
150         
151        .theme-selecteur { 
152            display: none; 
153
154         
155        a.btn.btn-primary { 
156            display: none; 
157
158         
159        .collapse { 
160            display: block; 
161
162         
163        .article.col-4-12 { 
164            display: none; 
165
166
167     
168</style> 
169 
170<script> 
171    $(document).ready(function () { 
172        // Add down arrow icon for collapse element which is open by default 
173        $(".collapse.show").each(function () { 
174            $(this).prev(".card-header").find(".fa").addClass("fa-angle-down").removeClass("fa-angle-right"); 
175        }); 
176 
177        // Toggle right and down arrow icon on show hide of collapse element 
178        $(".collapse").on('show.bs.collapse', function () { 
179            $(this).prev(".card-header").find(".fa").removeClass("fa-angle-right").addClass("fa-angle-down"); 
180        }).on('hide.bs.collapse', function () { 
181            $(this).prev(".card-header").find(".fa").removeClass("fa-angle-down").addClass("fa-angle-right"); 
182        }); 
183    }); 
184</script> 
185 
186<#assign 
187AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
188serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() 
189renderRequest = serviceContext.getRequest() 
190urlPortal = themeDisplay.getURLPortal() 
191currentUrl = portalUtil.getCurrentURL(renderRequest) 
192returnLink = urlPortal + "/tournesol" 
193stade = '' 
194categoryId = util.getNumericParameter(currentUrl, 'p_r_p_categoryId') 
195stadeId = categoryId 
196listThemeCulture = [] 
197 
198journalArticleId = .vars['reserved-article-id'].data 
199JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
200journalArticle = JournalArticleLocalService.fetchArticle(groupId, journalArticleId) 
201categories = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()) 
202 
203AssetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") 
204vocabularyCultureId = AssetVocabularyLocalService.fetchGroupVocabulary(company.getGroupId(), 'Culture').vocabularyId 
205listCategoriesCultureOuStade = util.filterCategoriesByVocabulary(categories, vocabularyCultureId) 
206
207 
208<#-- Recuperation du nom du stade --> 
209<#if stadeId?? && stadeId != ''> 
210    <#assign stade = AssetCategoryLocalService.fetchAssetCategory(stadeId?number)!''> 
211</#if> 
212 
213<#if stade?? && stade != '' && stade.name?contains(" - ")> 
214    <#assign 
215    nomStade = stade.name?split(" - ")[1] 
216    culture = stade.getParentCategory() 
217
218<#elseif listCategoriesCultureOuStade?has_content> 
219<#-- Le stade n'est pas dans l'url. On récupère le premier de la liste des stades  --> 
220    <#list listCategoriesCultureOuStade as cat> 
221        <#if !cat.isRootCategory()> 
222            <#assign firstStade=cat> 
223            <#break> 
224        <#elseif !(firstCulture)??> 
225        <#-- Si aucun stade n'est dans la liste, on récupère la première culture --> 
226            <#assign firstCulture=cat> 
227        </#if> 
228    </#list> 
229    <#if firstStade??> 
230        <#assign 
231        stade=firstStade 
232        stadeId=stade.categoryId 
233        culture=stade.getParentCategory() 
234
235    <#elseif firstCulture??> 
236        <#assign culture=firstCulture> 
237    </#if> 
238</#if> 
239 
240<#assign 
241nomCulture = (culture.name)!"" 
242listThemeCulture=util.getListThemeCulture(nomCulture) 
243
244 
245<div class="theme-selecteur"> 
246    <div class="ariane"> 
247        <ol itemscope itemtype="https://schema.org/BreadcrumbList"> 
248            <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> 
249                <a itemtype="https://schema.org/Thing" itemprop="item" href="${urlPortal}"> 
250                    <span itemprop="name">Accueil</span> 
251                </a> 
252                <meta itemprop="position" content="1"/> 
253            </li> 
254
255            <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> 
256                <a itemtype="https://schema.org/Thing" itemprop="item" href="${returnLink}" 
257                   onclick="window.localStorage.setItem('culture', '${nomCulture?lower_case}'); window.localStorage.setItem('p_r_p_categoryId', '${stadeId}');"> 
258                    <span itemprop="name">${dico.prettyCulture(nomCulture, true)}</span> 
259                </a> 
260                <meta itemprop="position" content="2"/> 
261            </li> 
262        </ol> 
263    </div> 
264    <div class="select-stade"> 
265        <#assign txtStade = ""> 
266 
267        <#if (stade?? || stade != '') && nomStade?? > 
268            <#assign txtStade = "<b>${nomStade}</b>"> 
269        </#if> 
270 
271        <div class="txt-culture"></div> 
272        <div class="select-stade-2"> 
273            <div class="txt-stade">${txtStade}</div> 
274            <div class="styled-select2"> 
275                <#assign hrefArticleTheme = ('/${nomCulture?lower_case}/articles-theme') > 
276                <#-- Si le theme est fourni dans l'url, on prend celui-ci. Sinon on prend le premier de la liste  --> 
277                <#assign selectedThemeId> 
278                    <#compress> 
279                        <#if themeId?has_content> 
280                        <#-- Si le theme est fourni dans l'url --> 
281                            ${themeId} 
282                        <#else> 
283                        <#--  S'il n'y a pas de thème, on n'en sélectionne aucun --> 
284                            ${((util.filterCategoriesByVocabulary(categories,vocabularyTheme.vocabularyId)?first).categoryId)!""} 
285                        </#if> 
286                    </#compress> 
287                </#assign> 
288                <select onchange="window.localStorage.setItem('p_r_p_categoryId', '${stadeId!""}'); window.localStorage.setItem('p_r_p_tag', this.value); location = '${hrefArticleTheme}';"> 
289                    <option value="">Filtrer par</option> 
290                    <#list listThemeCulture as theme> 
291                        <#assign selected = (selectedThemeId == theme.categoryId?string)?then("selected","")> 
292                        <option value="${theme.categoryId}" ${selected}>${theme.name}</option> 
293                    </#list> 
294                </select> 
295            </div> 
296        </div> 
297    </div> 
298</div> 
299 
300<#assign 
301posteSemences = "" 
302posteHerbi = "" 
303posteFerti = "" 
304posteFongi = "" 
305posteInsect = "" 
306posteIrri = "" 
307conseilPosteSemences = "" 
308conseilPosteHerbi = "" 
309conseilPosteFerti = "" 
310conseilPosteFongi = "" 
311conseilPosteInsect = "" 
312conseilPosteIrri = "" 
313
314<#attempt> 
315    <#if renderRequest.getParameter("idMargeTournesol")??> 
316        <#assign 
317        idMargeTournesol = renderRequest.getParameter("idMargeTournesol") 
318        margeTournesolLocalService = serviceLocator.findService("fr.tipi.service.builder.marge.tournesol.service.MargeTournesolLocalService") 
319        margeTournesol = margeTournesolLocalService.getMargeTournesolById(idMargeTournesol?number) 
320        posteSemences = margeTournesol.posteSemence 
321        posteHerbi = margeTournesol.posteHerbi 
322        posteFerti = margeTournesol.posteFerti 
323        posteFongi = (margeTournesol.posteFongi != -1)?then(margeTournesol.posteFongi?string(",##0.00"), "") 
324        posteInsect = margeTournesol.posteInsectiMollusci 
325        posteIrri = (margeTournesol.posteIrri != -1)?then(margeTournesol.posteIrri?string(",##0.00"), "") 
326        posteDesherbageMecanique = margeTournesol.posteOutils 
327        posteGestionOiseau = margeTournesol.posteOiseaux 
328        posteFraisSechage = (margeTournesol.posteSechage != -1)?then(margeTournesol.posteSechage?string(",##0.00"), "") 
329        rendementBrut = (margeTournesol.rendementBrut != -1)?then(margeTournesol.rendementBrut?string(",##0.00"), "") 
330        chargeOperationnelles = margeTournesol.chargeOperationnelles 
331        produitBrut = margeTournesol.produitBrut 
332        margeBrute = margeTournesol.margeBrute 
333        conseilPosteSemences = margeTournesol.conseilPosteSemences 
334        conseilPosteHerbi = margeTournesol.conseilPosteHerbi 
335        conseilPosteFerti = margeTournesol.conseilPosteFerti 
336        conseilPosteFongi = margeTournesol.conseilPosteFongi 
337        conseilPosteInsect = margeTournesol.conseilPosteInsect 
338        conseilPosteIrri = margeTournesol.conseilPosteIrri 
339        conseilPosteOutils = margeTournesol.conseilPosteOutils 
340        conseilPosteOiseaux = margeTournesol.conseilPosteOiseaux 
341        conseilPosteSechage = margeTournesol.conseilPosteSechage 
342
343    </#if> 
344    <#recover> 
345</#attempt> 
346 
347<div class="article-detail"> 
348    <div class="box-detail"> 
349        <#if themeDisplay.isSignedIn()> 
350            <h1 class="m-auto">Résultat OAD marge tournesol</h1> 
351            <div class="container-fluid"> 
352                <div class="row ml-0 mr-0"> 
353                    <div class="col-12 col-lg-6"> 
354                        <h3 class="h3top"><b>Récapitulatif de votre itinéraire technique</b></h3> 
355                        <table style="width: 445px!important; margin: auto;" class="responsiveTable"> 
356                            <tr> 
357                                <td colspan="3"/> 
358                            </tr> 
359                            <tr> 
360                                <td class="libelleCourt">Poste semence :</td> 
361                                <td class="uniteDroit">${posteSemences?string(",##0.00")}</td> 
362                                <td class="uniteGauche">€/ha</td> 
363                            </tr> 
364                            <tr> 
365                                <td class="libelleCourt">Poste fertilisation :</td> 
366                                <td class="uniteDroit">${posteFerti?string(",##0.00")}</td> 
367                                <td class="uniteGauche">€/ha</td> 
368                            </tr> 
369                            <tr> 
370                                <td class="libelleCourt">Poste herbicide :</td> 
371                                <td class="uniteDroit">${posteHerbi?string(",##0.00")}</td> 
372                                <td class="uniteGauche">€/ha</td> 
373                            </tr> 
374                            <tr> 
375                                <td class="libelleCourt">Poste désherbage mécanique :</td> 
376                                <td class="uniteDroit">${posteDesherbageMecanique?string(",##0.00")}</td> 
377                                <td class="uniteGauche">€/ha</td> 
378                            </tr> 
379                            <tr> 
380                                <td class="libelleCourt">Poste insecticide et molluscicide :</td> 
381                                <td class="uniteDroit">${posteInsect?string(",##0.00")}</td> 
382                                <td class="uniteGauche">€/ha</td> 
383                            </tr> 
384                            <tr> 
385                                <td class="libelleCourt">Poste gestion des oiseaux :</td> 
386                                <td class="uniteDroit">${posteGestionOiseau?string(",##0.00")}</td> 
387                                <td class="uniteGauche">€/ha</td> 
388                            </tr> 
389                            <tr> 
390                                <td class="libelleCourt">Poste désherbage fongicide :</td> 
391                                <td class="uniteDroit">${posteFongi}</td> 
392                                <td class="uniteGauche">€/ha</td> 
393                            </tr> 
394                            <tr> 
395                                <td class="libelleCourt">Poste irrigation :</td> 
396                                <td class="uniteDroit">${posteIrri}</td> 
397                                <td class="uniteGauche">€/ha</td> 
398                            </tr> 
399                            <tr> 
400                                <td class="libelleCourt">Poste frais de séchage :</td> 
401                                <td class="uniteDroit">${posteFraisSechage}</td> 
402                                <td class="uniteGauche">€/ha</td> 
403                            </tr> 
404                            <!--<tr> 
405                            <td class="libelleCourt">Rendement brut :</td> 
406                            <td class="uniteDroit">${rendementBrut}</td> 
407                            <td class="uniteGauche">€/ha</td> 
408                        </tr>--> 
409                            <tr> 
410                                <td colspan="3"/> 
411                            </tr> 
412                            <tr> 
413                                <td colspan="3"/> 
414                            </tr> 
415                            <tr> 
416                                <td class="libelleCourtGras">Charges opérationnelles :</td> 
417                                <td class="uniteGrasDroit">${chargeOperationnelles?string(",##0.00")}</td> 
418                                <td class="uniteGrasGauche">€/ha</td> 
419                            </tr> 
420                            <tr> 
421                                <td class="libelleCourtGras">Produit brut :</td> 
422                                <td class="uniteGrasDroit">${produitBrut?string(",##0.00")}</td> 
423                                <td class="uniteGrasGauche">€/ha</td> 
424                            </tr> 
425                        </table> 
426 
427                        <table style="background-color: #9EB310; font-weight: bold; color: white; width: 445px!important; margin: 15px auto auto;" 
428                               class="responsiveTable"> 
429                            <tr> 
430                                <td colspan="3" style="padding: 20px 10px;">Votre marge brute est estimée à :</td> 
431                            </tr> 
432                            <tr> 
433                                <td class="libelleMargeBrute">Marge brute *</td> 
434                                <td class="uniteDroitMargeBrute">${margeBrute?string(",##0.00")}</td> 
435                                <td class="uniteGaucheMargeBrute">€/ha</td> 
436                            </tr> 
437                            <tr> 
438                                <td colspan="3" style="font-weight: normal; font-size: xx-small; padding: 10px 10px;"> 
439                                    * Marge brute intégrant les coûts de passage du désherbage mécanique 
440                                </td> 
441                            </tr> 
442                        </table> 
443 
444                        <div style="text-align: center"> 
445                            <a class="btn btn-primary" style="color: #ffffff !important; margin-top: 15px;" 
446                               href="${urlPortal}/-/oad-marge-tournesol">Retour au formulaire</a> 
447                        </div> 
448                    </div> 
449                    <div class="col-12 col-lg-6"> 
450                        <h3><b>Répartition des postes de charge</b></h3> 
451                        <div class="chart m-auto" id="chart"></div> 
452                    </div> 
453                </div> 
454            </div> 
455            <h3><b>Pour en savoir plus</b></h3> 
456            <div> 
457                <div class="accordion" id="accordionSemence"> 
458                    <div class="card" style="border-bottom: none;"> 
459                        <div class="card-header" 
460                             style="border-bottom: none; background-color: rgba(0,0,0,0.0); padding: 0;" 
461                             id="headingOne"> 
462                            <h2 class="mb-0" style="padding: 0;"> 
463                                <button class="btn btn-link" data-target="#collapseUn" data-toggle="collapse" 
464                                        type="button"> 
465                                    <i class="fa fa-angle-right result risque-agro"></i>Poste semences 
466                                </button> 
467                            </h2> 
468                        </div> 
469                        <div aria-labelledby="headingOne" class="collapse" data-parent="#accordionSemence" 
470                             id="collapseUn"> 
471                            <div class="card-body"> 
472                                ${conseilPosteSemences} 
473                            </div> 
474                        </div> 
475                    </div> 
476                </div> 
477            </div> 
478            <div> 
479                <div class="accordion" id="accordionHerbi"> 
480                    <div class="card" style="border-bottom: none;"> 
481                        <div class="card-header" 
482                             style="border-bottom: none; background-color: rgba(0,0,0,0.0); padding: 0;" 
483                             id="headingOne"> 
484                            <h2 class="mb-0" style="padding: 0;"> 
485                                <button class="btn btn-link" data-target="#collapseDeux" data-toggle="collapse" 
486                                        type="button"> 
487                                    <i class="fa fa-angle-right result risque-agro"></i>Poste herbicides 
488                                </button> 
489                            </h2> 
490                        </div> 
491                        <div aria-labelledby="headingOne" class="collapse" data-parent="#accordionHerbi" 
492                             id="collapseDeux"> 
493                            <div class="card-body"> 
494                                ${conseilPosteHerbi} 
495                            </div> 
496                        </div> 
497                    </div> 
498                </div> 
499            </div> 
500            <div> 
501                <div class="accordion" id="accordionFerti"> 
502                    <div class="card" style="border-bottom: none;"> 
503                        <div class="card-header" 
504                             style="border-bottom: none; background-color: rgba(0,0,0,0.0); padding: 0;" 
505                             id="headingOne"> 
506                            <h2 class="mb-0" style="padding: 0;"> 
507                                <button class="btn btn-link" data-target="#collapseTrois" data-toggle="collapse" 
508                                        type="button"> 
509                                    <i class="fa fa-angle-right result risque-agro"></i>Poste fertilisation 
510                                </button> 
511                            </h2> 
512                        </div> 
513                        <div aria-labelledby="headingOne" class="collapse" data-parent="#accordionFerti" 
514                             id="collapseTrois"> 
515                            <div class="card-body"> 
516                                ${conseilPosteFerti} 
517                            </div> 
518                        </div> 
519                    </div> 
520                </div> 
521            </div> 
522            <div> 
523                <div class="accordion" id="accordionFongi"> 
524                    <div class="card" style="border-bottom: none;"> 
525                        <div class="card-header" 
526                             style="border-bottom: none; background-color: rgba(0,0,0,0.0); padding: 0;" 
527                             id="headingOne"> 
528                            <h2 class="mb-0" style="padding: 0;"> 
529                                <button class="btn btn-link" data-target="#collapseQuatre" data-toggle="collapse" 
530                                        type="button"> 
531                                    <i class="fa fa-angle-right result risque-agro"></i>Poste fongicides 
532                                </button> 
533                            </h2> 
534                        </div> 
535                        <div aria-labelledby="headingOne" class="collapse" data-parent="#accordionFongi" 
536                             id="collapseQuatre"> 
537                            <div class="card-body"> 
538                                ${conseilPosteFongi} 
539                            </div> 
540                        </div> 
541                    </div> 
542                </div> 
543            </div> 
544            <div> 
545                <div class="accordion" id="accordionInsect"> 
546                    <div class="card" style="border-bottom: none;"> 
547                        <div class="card-header" 
548                             style="border-bottom: none; background-color: rgba(0,0,0,0.0); padding: 0;" 
549                             id="headingOne"> 
550                            <h2 class="mb-0" style="padding: 0;"> 
551                                <button class="btn btn-link" data-target="#collapseCinq" data-toggle="collapse" 
552                                        type="button"> 
553                                    <i class="fa fa-angle-right result risque-agro"></i>Poste insecticides 
554                                </button> 
555                            </h2> 
556                        </div> 
557                        <div aria-labelledby="headingOne" class="collapse" data-parent="#accordionInsect" 
558                             id="collapseCinq"> 
559                            <div class="card-body"> 
560                                ${conseilPosteInsect} 
561                            </div> 
562                        </div> 
563                    </div> 
564                </div> 
565            </div> 
566            <div> 
567                <div class="accordion" id="accordionIrri"> 
568                    <div class="card" style="border-bottom: none;"> 
569                        <div class="card-header" 
570                             style="border-bottom: none; background-color: rgba(0,0,0,0.0); padding: 0;" 
571                             id="headingOne"> 
572                            <h2 class="mb-0" style="padding: 0;"> 
573                                <button class="btn btn-link" data-target="#collapseSix" data-toggle="collapse" 
574                                        type="button"> 
575                                    <i class="fa fa-angle-right result risque-agro"></i>Poste irrigation 
576                                </button> 
577                            </h2> 
578                        </div> 
579                        <div aria-labelledby="headingOne" class="collapse" data-parent="#accordionIrri" 
580                             id="collapseSix"> 
581                            <div class="card-body"> 
582                                ${conseilPosteIrri} 
583                            </div> 
584                        </div> 
585                    </div> 
586                </div> 
587            </div> 
588            <div> 
589                <div class="accordion" id="accordionOutils"> 
590                    <div class="card" style="border-bottom: none;"> 
591                        <div class="card-header" 
592                             style="border-bottom: none; background-color: rgba(0,0,0,0.0); padding: 0;" 
593                             id="headingOne"> 
594                            <h2 class="mb-0" style="padding: 0;"> 
595                                <button class="btn btn-link" data-target="#collapseSeven" data-toggle="collapse" 
596                                        type="button"> 
597                                    <i class="fa fa-angle-right result risque-agro"></i>Poste outils 
598                                </button> 
599                            </h2> 
600                        </div> 
601                        <div aria-labelledby="headingOne" class="collapse" data-parent="#accordionOutils" 
602                             id="collapseSeven"> 
603                            <div class="card-body"> 
604                                ${conseilPosteOutils} 
605                            </div> 
606                        </div> 
607                    </div> 
608                </div> 
609            </div> 
610            <div> 
611                <div class="accordion" id="accordionOiseaux"> 
612                    <div class="card" style="border-bottom: none;"> 
613                        <div class="card-header" 
614                             style="border-bottom: none; background-color: rgba(0,0,0,0.0); padding: 0;" 
615                             id="headingOne"> 
616                            <h2 class="mb-0" style="padding: 0;"> 
617                                <button class="btn btn-link" data-target="#collapseHeigth" data-toggle="collapse" 
618                                        type="button"> 
619                                    <i class="fa fa-angle-right result risque-agro"></i>Poste oiseaux 
620                                </button> 
621                            </h2> 
622                        </div> 
623                        <div aria-labelledby="headingOne" class="collapse" data-parent="#accordionOiseaux" 
624                             id="collapseHeigth"> 
625                            <div class="card-body"> 
626                                ${conseilPosteOiseaux} 
627                            </div> 
628                        </div> 
629                    </div> 
630                </div> 
631            </div> 
632            <div> 
633                <div class="accordion" id="accordionSechage"> 
634                    <div class="card" style="border-bottom: none;"> 
635                        <div class="card-header" 
636                             style="border-bottom: none; background-color: rgba(0,0,0,0.0); padding: 0;" 
637                             id="headingOne"> 
638                            <h2 class="mb-0" style="padding: 0;"> 
639                                <button class="btn btn-link" data-target="#collapseNine" data-toggle="collapse" 
640                                        type="button"> 
641                                    <i class="fa fa-angle-right result risque-agro"></i>Poste séchage 
642                                </button> 
643                            </h2> 
644                        </div> 
645                        <div aria-labelledby="headingOne" class="collapse" data-parent="#accordionSechage" 
646                             id="collapseNine"> 
647                            <div class="card-body"> 
648                                ${conseilPosteSechage} 
649                            </div> 
650                        </div> 
651                    </div> 
652                </div> 
653            </div> 
654        </#if> 
655    </div> 
656</div> 
657 
658<script src="/o/tipi-theme-public/js/apexcharts.js"></script> 
659<script> 
660    let options; 
661    let lstSeries = [${posteSemences?string('##0.00')?replace(',', '.')}, ${posteFerti?string('##0.00')?replace(',', '.')}, ${posteHerbi?string('##0.00')?replace(',', '.')}, ${posteDesherbageMecanique?string('##0.00')?replace(',', '.')}, ${posteInsect?string('##0.00')?replace(',', '.')}, ${posteGestionOiseau?string('##0.00')?replace(',', '.')}]; 
662    let lstColors = ['#923131', '#8EBF24', '#F08325', '#CE6525', '#578A30', '#6B6B9D']; 
663    let lstLibelles = ['Poste semences', 'Poste fertilisation', 'Poste herbicides', 'Poste désherbage mécanique', 'Poste insecticides', 'Poste gestion des oiseaux']; 
664 
665    if (${margeTournesol.posteFongi} > -1) { 
666        lstSeries.push(${margeTournesol.posteFongi?string('##0.00')?replace(',', '.')}); 
667        lstColors.push('#BD861F'); 
668        lstLibelles.push('Poste désherbage fongicide'); 
669
670 
671    if (${margeTournesol.posteIrri} > -1) { 
672        lstSeries.push(${margeTournesol.posteIrri?string('##0.00')?replace(',', '.')}); 
673        lstColors.push('#6490C0'); 
674        lstLibelles.push('Poste irrigation'); 
675
676 
677    if (${margeTournesol.posteSechage} > -1) { 
678        lstSeries.push(${margeTournesol.posteSechage?string('##0.00')?replace(',', '.')}); 
679        lstColors.push('#EBB402'); 
680        lstLibelles.push('Poste frais de séchage'); 
681
682 
683    options = { 
684        series: lstSeries, 
685        chart: { 
686            width: 500, 
687            type: 'pie' 
688        }, 
689        colors: lstColors, 
690        labels: lstLibelles, 
691        responsive: [ 
692
693                breakpoint: 600, 
694                options: { 
695                    plotOptions: { 
696                        pie: { 
697                            customScale: 0.75, 
698                            left: 0 
699
700                    }, 
701                    legend: { 
702                        position: "bottom", 
703                        horizontalAlign: "left" 
704
705
706
707
708
709 
710    let chart = new ApexCharts(document.querySelector('#chart'), options) 
711    chart.render() 
712</script> 
Chargement en cours...

Outil : Marge Tournesol