On orders my company details spread outside the from box
How do I fix that?
On orders my company details spread outside the from box
How do I fix that?
Hi!
Which pdf model do you use?
right, that is important information, sorry I forgot to add it.
I actually tried all 3 built in
proforma
eratosthene
einstein
and they all have the same issue.
I suggest you use eratosthene is the newest.
Proforma is well for proforma invoices!
You can modify core/modules/commande/doc/pdf_eratosthene.modules.php
search for // Show sender and in the sections below you can modify positions.
You should also make a module after so as not to break your modifications with upgrades.
Hello,
What is strange, is that you are not supposed to have 2 blank spaces, but only one :
How the company configuration is made ?
I do not see any extra newlines in the company definition, and I also checked using arrow keys to move around in the boxes.
I might have tracked it down.
Iām also seeing it on orders, but for the recipient.
Iām using 1 big address field because I find it much easier for customers to fill out, and I donāt particular need to know where they are from, because I am using dolibarr to sell dance classes and workshops in our nonprofit, so we will never ship anything physical anyway. But we do need to know who our members and customers are.
Anyway, what I am seeing in the json for the address field is this:
"address": "Streetname\r\nPostal\r\nDenmark",
Notice all those \r and \n? Maybe I get an empty line because both the \r and \n are being translated to a newline?
Iāll now go test it.
YES, this \r seems to be the culprit.
When I stripped out \r before using the API to insert the address field, then I do not get any empty lines.
āaddressā: āSTREETNAME\nPOSTAL\nDenmarkā,
Looking at the json from API ā Setup ā GET /setup/company I see \r\n.
āaddressā: āc/o Jon Bendtsen\r\nSTREETNAMEā,
I used the GUI to create the address, I did not inject it using json.
I am using a mac to fill out my forms, maybe this injects a \r\n in the text field?
My iPhone does the same \r\n
My Android does the same \r\n
Maybe itās a browser issue? I doubt that
Mac == Brave
iPhone == firefox
Android == Chromium
So now I wonder if this issue is because the PDF is created on a Linux, which is complicated for me to test.
issue seems fixed