{% set total = 0 %}
Item Code
Item Name
Qty
Rate
Selling Price
{%- for row in doc.items -%}
{% set rate=frappe.db.get_value("Item Price",{"item_code":row.item_code,"price_list":doc.price_list,"selling":1},"price_list_rate") %}
{{row.item_code}}
{{row.item_name}}
{{row.qty}}
{{rate}}
{{'%0.3f'| format(row.selling_price)}}
{% set total = total + row.selling_price %}
{%- endfor -%}
Total: {{ total }}
1条答案
按热度按时间zengzsys1#
如果要添加“销售价格”列的总计,可以在for循环外创建变量总计,然后将每行的销售价格值添加到该变量总计中。在循环结束时,可以显示总计值。