I’m trying to create a custom Commercial Invoice a...
# advancedpdf
k
I’m trying to create a custom Commercial Invoice advanced pdf form. Has anyone done this? It needs to only show the inventory and/or kit items (which I’ve done), but I also need the total to be just the total of those items, and this is where I’m running into issues. Is there a better way to accomplish this?
s
A general approach to do things like this in any advanced PDF is with a custom variable that you update selectively in your item list. Then, you’ll need to display it using
${nsformat_currency(custom_total)}
to get NetSuite to format it as a currency value.
👍 2
k
Thanks! I’ll give this a try.
n
We added a custom rate field to the SO which copies onto the IF. Then we did the math in the PDF.
@scottvonduhn we encountered the issue that the native IF doesn’t have a rate or sales amount? We created the commercial invoice from the IF as the shipped qty did not always match SO qty.
👍 2
k
@scottvonduhn I’ve got the assign part working, but I’m struggling with the item_is_shown part. I’m not sure where that tag is supposed to go. I keep getting the “If the failing expression is known to be legally refer to something that’s sometimes null…” error.
s
Sorry, I meant that as a placeholder for whatever logic you are using to determine which items to show, or not.
Hopefully that makes sense. If not, if you can share your item list / table, I may be able to help you figure out how to modify it
k
HAHAHA. Of course!
🤦‍♀️
I moved a couple things around and it seems to be fine now. Thank you!!