| @@ 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 | ||
| @@ 1190-1204 (lines=15) @@ | ||
| 1187 | * @return Champ |
|
| 1188 | * Pile complétée par le code à générer |
|
| 1189 | **/ |
|
| 1190 | function balise_GRAND_TOTAL_dist($p) { |
|
| 1191 | $b = $p->nom_boucle ? $p->nom_boucle : $p->descr['id_mere']; |
|
| 1192 | if ($b === '' || !isset($p->boucles[$b])) { |
|
| 1193 | $msg = array( |
|
| 1194 | 'zbug_champ_hors_boucle', |
|
| 1195 | array('champ' => "#$b" . 'TOTAL_BOUCLE') |
|
| 1196 | ); |
|
| 1197 | erreur_squelette($msg, $p); |
|
| 1198 | } else { |
|
| 1199 | $p->code = "(isset(\$Numrows['$b']['grand_total']) |
|
| 1200 | ? \$Numrows['$b']['grand_total'] : \$Numrows['$b']['total'])"; |
|
| 1201 | $p->boucles[$b]->numrows = true; |
|
| 1202 | $p->interdire_scripts = false; |
|
| 1203 | } |
|
| 1204 | ||
| 1205 | return $p; |
|
| 1206 | } |
|
| 1207 | ||