I am using the media type directive in my Sales invoice template to distinguish between the invoice in view mode and the print/email version which goes to the customer. In manager 15.7.31 it seems that the email version no longer supports the media type directive. The hard-copy (print) still does.
It’s possible this got broken. Honestly, I didn’t realize someone would use in templates different CSS media types directives.
I will look into this next month. Just out of curiosity, why do you use different CSS for screen and different for print?
Hi @lubos,
I have several reasons for that. I will post here my main and one additional reason.
Main
The obvious main reason is that I want different data on the sales invoice in view mode compared to print/email version.
For example; we deliver directly to customers instead of businesses. Therefore we don’t have to specify a VAT percentage/amount per line item. A total VAT amount at the bottom of the invoice or even a line stating that all amounts are VAT inclusive is enough, which makes it simpler for the customer.
But in view mode I do want to see these VAT percentages as a means to verify I gave all inventory items the right VAT percentage. So I gave this column a special CSS style to only show when media is screen.
Additional
One additional reason was the footer of the invoice. This gave me a headache, nothing seemed to work, not even the sticky footer
solution, until I found your suggestion below. This method however needs a directive otherwise is shows at the bottom of manager. (original post: Problems with invoice template)
@media print { #invoice-footer { width: 100%; display: block; position: fixed; bottom: 0; } }
Thanks, this is helpful. I completely forgot about sticky footer support.