|
1 | 1 | {%- macro add_header(page_num, max_pages, doc, letter_head, no_letterhead, footer, print_settings=None, |
2 | | -print_heading_template=None) -%} {% if letter_head and not no_letterhead %} |
3 | | -<div class="letter-head">{{ letter_head }}</div> |
4 | | -{% endif %} {% if print_heading_template %} {{ frappe.render_template(print_heading_template, {"doc":doc}) }} |
5 | | -{% endif %} {%- endmacro -%} {% for page in layout %} |
| 2 | +print_heading_template=None) -%} |
| 3 | +{% if letter_head and not no_letterhead %} |
| 4 | + <div class="letter-head">{{ letter_head }}</div> |
| 5 | +{% endif %} |
| 6 | +{% if print_heading_template %} |
| 7 | + {{ frappe.render_template(print_heading_template, {"doc":doc}) }} |
| 8 | +{% endif %} |
| 9 | +{%- endmacro -%} |
| 10 | +{% for page in layout %} |
6 | 11 | <div class="page-break invoice-page"> |
7 | 12 | <div {% if print_settings.repeat_header_footer %} id="header-html" class="hidden-pdf" {% endif %}> |
8 | 13 | {{ add_header(loop.index, layout|len, doc, letter_head, no_letterhead, footer, print_settings) }} |
|
11 | 16 | <style> |
12 | 17 | .letter-head { |
13 | 18 | padding-top: 12px !important; |
14 | | - /* margin-top: 0px !important; */ |
| 19 | + padding-bottom: 12px !important; |
15 | 20 | } |
16 | 21 | .invoice-page { |
17 | 22 | font-family: Inter, sans-serif; |
|
86 | 91 | border-bottom: none; |
87 | 92 | } |
88 | 93 |
|
89 | | - .items-table tr:first-child td:first-child, |
90 | | - .tax-table tr:first-child td:first-child { |
| 94 | + .items-table thead tr:first-child td:first-child, |
| 95 | + .tax-table thead tr:first-child td:first-child { |
91 | 96 | border-top-left-radius: 10px; |
92 | 97 | border-bottom-left-radius: 10px; |
93 | 98 | } |
94 | | - .items-table tr:first-child td:last-child, |
95 | | - .tax-table tr:first-child td:last-child { |
| 99 | + .items-table thead tr:first-child td:last-child, |
| 100 | + .tax-table thead tr:first-child td:last-child { |
96 | 101 | border-top-right-radius: 10px; |
97 | 102 | border-bottom-right-radius: 10px; |
98 | 103 | } |
|
113 | 118 | background: #f8f8f8; |
114 | 119 | } |
115 | 120 |
|
116 | | - .img-thumb { |
117 | | - min-width: 24px; |
118 | | - min-height: 24px; |
119 | | - max-width: 24px; |
120 | | - max-height: 24px; |
121 | | - border-radius: 6px; |
122 | | - overflow: hidden; |
123 | | - display: flex; |
124 | | - align-items: center; |
125 | | - justify-content: center; |
126 | | - background: #f0f0f0; |
127 | | - } |
128 | | - |
129 | 121 | .info-card { |
130 | 122 | margin-top: 40px; |
131 | 123 | color: #7c7c7c; |
|
156 | 148 |
|
157 | 149 | .tax-table td, |
158 | 150 | .items-table td { |
159 | | - height: 40px; |
| 151 | + height: auto !important; |
160 | 152 | } |
161 | 153 |
|
162 | 154 | .tax-table thead td, |
163 | 155 | .items-table thead td { |
164 | 156 | height: 32px; |
165 | 157 | } |
| 158 | + |
| 159 | + .item-img td { |
| 160 | + border: none !important; |
| 161 | + padding: 0px !important; |
| 162 | + } |
166 | 163 | </style> |
167 | 164 |
|
168 | 165 | <div class="print-format-body"> |
169 | | - <table class="info-table col-xs-12" style="width: 100%"> |
| 166 | + <table class="info-table col-xs-12" style="width: 100%; margin-left: 12px"> |
170 | 167 | <tr> |
171 | 168 | <td class="col-xs-7" style="padding: 0 !important"> |
172 | 169 | <div class="title col-xs-5 p-0"> |
|
219 | 216 | <tr> |
220 | 217 | <td class="text-center">{{ loop.index }}</td> |
221 | 218 | <td class="text-left"> |
222 | | - <div style="display: flex; align-items: center; gap: 8px"> |
223 | | - <div class="img-thumb"> |
| 219 | + <table class="item-img" style="border-collapse: collapse"> |
| 220 | + <tr> |
224 | 221 | {% if item.image %} |
225 | | - <div> |
226 | | - <img src="{{ item.image }}" alt="{{ item.item_name }}" /> |
227 | | - </div> |
| 222 | + <td class="no-style" style="border-radius: 6px; vertical-align: middle"> |
| 223 | + <img |
| 224 | + src="{{ item.image }}" |
| 225 | + alt="{{ item.item_name }}" |
| 226 | + style=" |
| 227 | + border-radius: 6px; |
| 228 | + max-height: 24px; |
| 229 | + min-height: 24px; |
| 230 | + max-width: 24px; |
| 231 | + min-width: 24px; |
| 232 | + margin-right: 8px; |
| 233 | + " |
| 234 | + /> |
| 235 | + </td> |
228 | 236 | {% endif %} |
229 | | - </div> |
230 | | - <div>{{ item.item_name }}</div> |
231 | | - </div> |
| 237 | + <td |
| 238 | + class="no-style" |
| 239 | + style="vertical-align: middle !important; padding: 0 !important" |
| 240 | + > |
| 241 | + {{ item.item_name }} |
| 242 | + </td> |
| 243 | + </tr> |
| 244 | + </table> |
232 | 245 | </td> |
233 | 246 |
|
234 | 247 | <td class="text-center">{{ item.gst_hsn_code }}</td> |
|
0 commit comments