SHOW:
|
|
- or go back to the newest paste.
1 | <tr> | |
2 | <?php foreach ($category as $cf1): ?> | |
3 | <?php if($cf->md_rooms_rtype_id==$cf1->md_rooms_rtype_id) { ?> | |
4 | <td class="col-xs-2 col-sm-2 col-md-2 bg-color">JUMLAH</td> | |
5 | <td> | |
6 | <div class="row"> | |
7 | <div class="col-xs-3 col-sm-3 col-md-4"> | |
8 | - | <?php $sum=0; ?> |
8 | + | <?php $sum=$sum2=0; ?> |
9 | - | <?php foreach($cfields2 as $cf2): ?> |
9 | + | <?php |
10 | - | <?php if($cf2->md_rooms_rtype_id==$cf->md_rooms_rtype_id){?> |
10 | + | foreach($cfields2 as $cf2): ?> |
11 | - | <input type="text" class="form-control input-sm" name="type_id[]" value="<?php echo $sum+=$cf2->md_rooms_rrates_price; ?>"> |
11 | + | <?php |
12 | - | <?php } endforeach ?> |
12 | + | $sum2+=$cf2->md_rooms_rrates_price; |
13 | - | </div> |
13 | + | if($cf2->md_rooms_rtype_id==$cf->md_rooms_rtype_id){ |
14 | $sum+=$cf2->md_rooms_rrates_price; | |
15 | } | |
16 | ||
17 | endforeach ?> | |
18 | <input type="text" class="form-control input-sm" name="type_id[]" | |
19 | value="<?php echo $sum; ?>" value='<?=$sum2;?>' /> </div> | |
20 | </div> | |
21 | </td> | |
22 | <?php } endforeach; ?> | |
23 | </tr> |