support totals on grant budget screen

This commit is contained in:
2019-08-19 17:06:17 -04:00
parent 956c1e90c6
commit 3534930f22
3 changed files with 32 additions and 0 deletions

View File

@ -12,6 +12,13 @@
<th>{ts}Amount Remaining{/ts}</th>
</thead>
{crmAPI var='result' entity='GrantBudget' action='getbudget' fiscal_year=$fiscalYear}
{crmAPI var='totals' entity='GrantBudget' action='getbudget' fiscal_year=$fiscalYear return_totals=1}
<tr id="GrantBudget-totals" class="crm-entity">
<td><strong>Totals:</strong></td>
{foreach from=$totals.values item=total}
<td><strong>{$total}</strong></td>
{/foreach}
</tr>
{foreach from=$result.values item=row}
{if $row.id}
{assign var='rowId' value=$row.id}
@ -25,6 +32,12 @@
<td>{$row.balance_amount}</td>
</tr>
{/foreach}
<tr id="GrantBudget-totals" class="crm-entity">
<td><strong>Totals:</strong></td>
{foreach from=$totals.values item=total}
<td><strong>{$total}</strong></td>
{/foreach}
</tr>
</table>
{crmButton p="civicrm" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
</div>