|
| 1 | +<main class="bg-white h-full" :style="{ 'font-family': print.font }"> |
| 2 | + <!-- Invoice Header --> |
| 3 | + <header class="bg-gray-100 px-12 py-10"> |
| 4 | + <!-- Company Details --> |
| 5 | + <section class="flex items-center"> |
| 6 | + <img |
| 7 | + v-if="print.displayLogo" |
| 8 | + class="h-12 max-w-32 object-contain mr-4" |
| 9 | + :src="print.logo" |
| 10 | + /> |
| 11 | + |
| 12 | + <div> |
| 13 | + <p class="font-semibold text-xl" :style="{ color: print.color }"> |
| 14 | + {{ print.companyName }} |
| 15 | + </p> |
| 16 | + |
| 17 | + <p class="text-sm text-gray-800" v-if="print.address"> |
| 18 | + {{ print.links.address.addressDisplay }} |
| 19 | + </p> |
| 20 | + |
| 21 | + <p class="text-sm text-gray-800" v-if="print.gstin"> |
| 22 | + GSTIN: {{ print.gstin }} |
| 23 | + </p> |
| 24 | + </div> |
| 25 | + </section> |
| 26 | + |
| 27 | + <!-- Sub Heading Section --> |
| 28 | + <div class="mt-8 text-lg"> |
| 29 | + <!-- Doc Details --> |
| 30 | + <section class="flex"> |
| 31 | + <h3 class="w-1/3 font-semibold">{{t`Bill`}}</h3> |
| 32 | + <div class="w-2/3 text-gray-800"> |
| 33 | + <p class="font-semibold">{{ doc.name }}</p> |
| 34 | + |
| 35 | + <div class="flex gap-2"> |
| 36 | + <p>{{ doc.date }}</p> |
| 37 | + <p>{{doc?.time }}</p> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + </section> |
| 41 | + |
| 42 | + <!-- Party Details --> |
| 43 | + <section class="mt-4 flex"> |
| 44 | + <h3 class="w-1/3 font-semibold">{{t`party`}}</h3> |
| 45 | + |
| 46 | + <div class="w-2/3 text-gray-800" v-if="doc.party"> |
| 47 | + <p class="font-semibold">{{ doc.party }}</p> |
| 48 | + |
| 49 | + <p v-if="doc.links.party.address"> |
| 50 | + {{ doc.links.party.links.address.addressDisplay }} |
| 51 | + </p> |
| 52 | + |
| 53 | + <p v-if="doc.links.party.gstin">GSTIN: {{ doc.links.party.gstin }}</p> |
| 54 | + </div> |
| 55 | + </section> |
| 56 | + </div> |
| 57 | + </header> |
| 58 | + |
| 59 | + <!-- Items Table --> |
| 60 | + <section class="mt-5 mx-16"> |
| 61 | + <!-- Heading Row --> |
| 62 | + <section class="w-full font-semibold flex border-b"> |
| 63 | + <div class="py-1 w-1/2">{{ t`Item` }}</div> |
| 64 | + <div class="py-1 text-right w-3/12" v-if="doc.showHSN"> |
| 65 | + {{ t`HSN/SAC` }} |
| 66 | + </div> |
| 67 | + <div class="py-1 text-right w-1/4">{{ t`From` }}</div> |
| 68 | + <div class="py-1 text-right w-1/4">{{ t`Quantity` }}</div> |
| 69 | + <div class="py-1 text-right w-3/12">{{ t`Rate` }}</div> |
| 70 | + <div class="py-1 text-right w-3/12">{{ t`Amount` }}</div> |
| 71 | + </section> |
| 72 | + |
| 73 | + <!-- Body Rows --> |
| 74 | + <section |
| 75 | + class="flex py-1 text-gray-900 w-full border-b" |
| 76 | + v-for="row in doc.items" |
| 77 | + :key="row.name" |
| 78 | + > |
| 79 | + <div class="w-1/2 py-1">{{ row.item }}</div> |
| 80 | + <div class="w-3/12 text-right py-1" v-if="doc.showHSN"> |
| 81 | + {{ row.hsnCode }} |
| 82 | + </div> |
| 83 | + <div class="w-1/4 text-right py-1">{{ row.location }}</div> |
| 84 | + <div class="w-1/4 text-right py-1">{{ row.quantity }}</div> |
| 85 | + <div class="w-3/12 text-right py-1">{{ row.rate }}</div> |
| 86 | + <div class="w-3/12 text-right py-1">{{ row.amount }}</div> |
| 87 | + </section> |
| 88 | + </section> |
| 89 | + <footer class="px-12 pt-10 text-lg"> |
| 90 | + <!-- Totaled Amounts --> |
| 91 | + <section class="flex -mx-3 justify-end flex-1 bg-gray-100 gap-8"> |
| 92 | + <div class="flex items-center">{{doc.grandTotalInWords}}</div> |
| 93 | + |
| 94 | + <!-- Grand Total --> |
| 95 | + <div |
| 96 | + class="py-3 px-4 text-right text-white" |
| 97 | + :style="{ backgroundColor: print.color }" |
| 98 | + > |
| 99 | + <h3>{{ t`Grand Total` }}</h3> |
| 100 | + <p class="text-2xl mt-2 font-semibold">{{ doc.grandTotal }}</p> |
| 101 | + </div> |
| 102 | + </section> |
| 103 | + |
| 104 | + <!-- Invoice Terms --> |
| 105 | + <section class="mt-12" v-if="doc.terms"> |
| 106 | + <h3 class="text-lg font-semibold">Notes</h3> |
| 107 | + |
| 108 | + <p class="mt-4 text-lg whitespace-pre-line">{{ doc.terms }}</p> |
| 109 | + </section> |
| 110 | + </footer> |
| 111 | +</main> |
0 commit comments