|
S. No. |
Item Description |
Unit |
Quantity |
Unit Price |
Total |
|---|---|---|---|---|---|
|
<for each="line in purchase.lines"> |
|||||
|
? |
<for each="line in line.description.split('\n')"> <line> </for> |
<(format_number(line.quantity, purchase.party.lang, digits=line.unit_digits) + (line.unit and (' ' + line.unit.symbol) or '')) or ''> |
<format_currency(line.unit_price, purchase.party.lang, purchase.currency)> |
<format_currency(line.amount, purchase.party.lang, purchase.currency)> |
|
El 11/05/17 a les 09:59, Khurram Shahzad ha escrit:
Have you tried with enumerate?
Dear Cedric & Sergi,
Thanks for your kind responses.
In fact, I want to access the 'counter' attribute of the 'For Each'
construct in order to populate 'Serial No.' column of a table:
<for each="idx, line in enumerate(purchase.lines)">
Where idx will contain the 'counter' and line the line object.
Hope it helps!