How are PDFs Saved?

Hi there, I have a question about invoice data is saved as a PDF. I’m building a purchase order module that allows me to send POs to vendors as well as invoices to customers.

In my testing, I modified the logic in pdfmake.js (compiled into build.js) and used custom templates to build my own customer and vendor invoices. Everything works fine in the app.

However, the invoices that are attached as PDFs in emails to customers as well as embedded as iframes in the customer portals are missing data. Can you tell me where to find the files/functions that manage how invoice data is saved for emails and customer portal?

We use PhantomJS to convert the invoice from the client portal to a PDF for attachment.

I’d suggest testing the client portal using incognito mode.

Ok so here is the first issue:

$client.address1 and $client.shipping_address1 all work in the app, but $client.shipping_address1 does NOT work in the portal. Doesn’t all that stuff come from the same model and controller? I can’t see a reason why that would not work.

I think it’s a bug, we’ll make sure it’s corrected in our next release.