Hi. I have just recently switched from odoo to erpnext and have lots of questions. One is that my print output is very different from my preview.
The preview is exactly how I wanted where I have made some custom changes in the CSS. Not much but some. But when I print it on my printer the bill is really different. Like the horizontal lines are not being printed and also there are margins or paddings which I cannot remove. And also I find a lot of classes mentioned but it is not seen defined anywhere on the html part. And also vice versas. Many classes are called from different tags but the style is not seen anywhere.
This is what is looks like now. The amount is not visible completely. And the columns have been broken.
This is my code:
.nomargin { margin: 0px; padding: 0px; } .print-format table, .print-format tr, .print-format td, .print-format div, .print-format p { font-family: Caslon; line-height: 200%; vertical-align: left; } @media screen { .print-format { width: 4in; padding: 0.25in; min-height: 8in; } }
{{ company }}
{{ __("POS # : ") }} {{ offline_pos_name }}
{{ __("Customer") }}: {{ customer }}
{{ __("Date") }}: {{ dateutil.global_date_format(posting_date) }}
GSTIN No: 29AAJCR6143B1ZE
{% for item in items %} {% endfor %}
{{ __("Description") }} | {{ __("Qty") }} | {{ __("Rate") }} | {{ __("Amount") }} |
---|---|---|---|
{{ item.item_name }} | {{ format_number(item.qty, null,precision("difference")) }} | {{ format_currency(item.rate, currency) }} | {{ format_currency(item.amount, currency) }} |
{{ __("Net Total") }} | {{ format_currency(total, currency) }} |
{{ row.description }} | {{ format_currency(row.tax_amount, currency) }} |
{{ __("Discount") }} | {{ format_currency(discount_amount, currency) }} |
{{ __("Grand Total") }} | {{ format_currency(grand_total, currency) }} |
{{ __("Paid Amount") }} | {{ format_currency(paid_amount, currency) }} |
{{ __("Qty Total") }} | {{ qty_total }} |
{{ terms }}
{{ __("Thank you, please visit again.") }}