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