| @@ 541-554 (lines=14) @@ | ||
| 538 | * @return Champ |
|
| 539 | * Pile complétée par le code à générer |
|
| 540 | **/ |
|
| 541 | function balise_TOTAL_BOUCLE_dist($p) { |
|
| 542 | $b = $p->nom_boucle ? $p->nom_boucle : $p->descr['id_mere']; |
|
| 543 | if ($b === '' || !isset($p->boucles[$b])) { |
|
| 544 | $msg = array( |
|
| 545 | 'zbug_champ_hors_boucle', |
|
| 546 | array('champ' => "#$b" . 'TOTAL_BOUCLE') |
|
| 547 | ); |
|
| 548 | erreur_squelette($msg, $p); |
|
| 549 | } else { |
|
| 550 | $p->code = "\$Numrows['$b']['total']"; |
|
| 551 | $p->boucles[$b]->numrows = true; |
|
| 552 | $p->interdire_scripts = false; |
|
| 553 | } |
|
| 554 | ||
| 555 | return $p; |
|
| 556 | } |
|
| 557 | ||
| @@ 1238-1252 (lines=15) @@ | ||
| 1235 | * @return Champ |
|
| 1236 | * Pile complétée par le code à générer |
|
| 1237 | **/ |
|
| 1238 | function balise_GRAND_TOTAL_dist($p) { |
|
| 1239 | $b = $p->nom_boucle ? $p->nom_boucle : $p->descr['id_mere']; |
|
| 1240 | if ($b === '' || !isset($p->boucles[$b])) { |
|
| 1241 | $msg = array( |
|
| 1242 | 'zbug_champ_hors_boucle', |
|
| 1243 | array('champ' => "#$b" . 'TOTAL_BOUCLE') |
|
| 1244 | ); |
|
| 1245 | erreur_squelette($msg, $p); |
|
| 1246 | } else { |
|
| 1247 | $p->code = "(isset(\$Numrows['$b']['grand_total']) |
|
| 1248 | ? \$Numrows['$b']['grand_total'] : \$Numrows['$b']['total'])"; |
|
| 1249 | $p->boucles[$b]->numrows = true; |
|
| 1250 | $p->interdire_scripts = false; |
|
| 1251 | } |
|
| 1252 | ||
| 1253 | return $p; |
|
| 1254 | } |
|
| 1255 | ||