Why am i getting a error for this?
How do i get the rate?
This is the code:
<table class="table table-condensed cart no-border">
<thead>
<tr>
<th width="20%" class="text-right">{{ _("Item Name") }}</th>
<th width="20%" class="text-right">{{ _("Sqm_ft") }}</th>
<th width="20%" class="text-right">{{ _("Rate") }}</th>
<th width="30%" class="text-right">{{ _("Amount") }}</th>
</tr>
</thead>
<tbody>
<table>
<tbody>
<!-- group items by item_code //-->
{% for item, item_group in doc.items|groupby('item_group') %}
<tr>
<td>{{item}}</td>
<!-- get group total //-->
<td>{{item_group|sum(attribute='qty') }}</td>
<td>{{item_group|format(attribute='rate') }}</td>
<td>{{item_group|sum(attribute='amount')}}</td>
</tr>
{%- endfor -%}
</tbody>
</table>