2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 03:19:01 +00:00

incr(ui): show HSN in print if present

This commit is contained in:
18alantom 2022-06-09 13:06:51 +05:30 committed by Alan
parent a4500ec231
commit bb7ec1a6a8
4 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,9 @@ export default {
isSalesInvoice() {
return this.doc.schemaName === 'SalesInvoice';
},
showHSN() {
return this.doc.items.map((i) => i.hsnCode).every(Boolean);
},
},
};
</script>

View File

@ -67,6 +67,7 @@
<div>
<div class="text-gray-600 w-full flex border-b">
<div class="py-4 w-5/12">Item</div>
<div class="py-4 text-right w-2/12" v-if="showHSN">HSN/SAC</div>
<div class="py-4 text-right w-1/12">Quantity</div>
<div class="py-4 text-right w-3/12">Rate</div>
<div class="py-4 text-right w-3/12">Amount</div>
@ -77,6 +78,9 @@
:key="row.name"
>
<div class="w-5/12 py-4">{{ row.item }}</div>
<div class="w-2/12 text-right py-4" v-if="showHSN">
{{ row.hsnCode }}
</div>
<div class="w-1/12 text-right py-4">
{{ format(row, 'quantity') }}
</div>

View File

@ -67,6 +67,7 @@
<div class="px-12 py-12 text-lg">
<div class="mb-4 flex font-semibold">
<div class="w-4/12">Item</div>
<div class="w-2/12 text-right" v-if="showHSN">HSN/SAC</div>
<div class="w-2/12 text-right">Quantity</div>
<div class="w-3/12 text-right">Rate</div>
<div class="w-3/12 text-right">Amount</div>
@ -77,6 +78,7 @@
:key="row.name"
>
<div class="w-4/12">{{ row.item }}</div>
<div class="w-2/12 text-right" v-if="showHSN">{{ row.hsnCode }}</div>
<div class="w-2/12 text-right">{{ format(row, 'quantity') }}</div>
<div class="w-3/12 text-right">{{ format(row, 'rate') }}</div>
<div class="w-3/12 text-right">{{ format(row, 'amount') }}</div>

View File

@ -99,12 +99,14 @@
"
>
<div class="w-4/12">Item</div>
<div class="w-2/12 text-right" v-if="showHSN">HSN/SAC</div>
<div class="w-2/12 text-right">Quantity</div>
<div class="w-3/12 text-right">Rate</div>
<div class="w-3/12 text-right">Amount</div>
</div>
<div class="flex py-1 text-lg" v-for="row in doc.items" :key="row.name">
<div class="w-4/12">{{ row.item }}</div>
<div class="w-2/12 text-right" v-if="showHSN">{{ row.hsnCode }}</div>
<div class="w-2/12 text-right">{{ format(row, 'quantity') }}</div>
<div class="w-3/12 text-right">{{ format(row, 'rate') }}</div>
<div class="w-3/12 text-right">{{ format(row, 'amount') }}</div>