Print format to display UOM after the quantity

@asneha1 a small trick is instead of building te whole document you can just create that only line you need, but in your case its a table so you need to build it all from 0

to help you get started you can use the following which will get most of what you want, just you do the styling:

<table style="line-height: 2em;width: 100%;" border="1" cellpadding="2" cellspacing="2">
  <thead>
        <tr>
            <th style="width:3%">#</th>
            <th style="width:40%" >{{ _("Description") }}</th>
            <th style="width:10%">{{_("Quantity")}}</th>
            <th style="width:10%">{{_("Rate")}}</th>
            <th style="width:10%">{{_("Amount")}}</th>
        </tr>
    </thead>
    <tbody>
        <tr>{%- for row in doc.items-%}
            <td>{{ row.idx }}</td>
            <td >{{ row.item_name}}</td>
            <td style="text-align:center">{{ row.qty}}</td>
            <td style="text-align:center">{{ row.get_formatted("rate", doc) or ''}}</td>
            <td>{{ row.get_formatted("amount", doc) or ''}}</td>
        </tr>{%- endfor -%}
    </tbody>
</table>
3 Likes