php - Calculate Field Dynamically With Search Condition in SuiteCRM -
i want make dynamic sum of field, example on ex1.jpg:
when use search condition, total list 21 data want sum 21 data @ bottom of list view displayed sum of 20 data (showed data).
but on bottom left of list view sum of data (more 21 data), on ex2.jpg:
i searched using different condition still displays sum of data.
can problem?
i done in custom module add total amount @ bottom of listview.
- need customized view.list.php
- create custom tpl form sum
- add custom tpl end of list tpl
- in list view function listviewprocess customized calculate total amount , assing in smarty variable
- use variable in sum tpl
in listview process code use calculate total.
$total = 0; foreach($this->lv->data['data'] $entry) { $total += unformat_number($entry['amount_usdollar']); }
Comments
Post a Comment