This topic contains 11 replies, has 0 voices, and was last updated by cr223309 7 years, 8 months ago.

  • Author
    Posts
  • #2072

    threehorn

    After four years with Netsuite, I am ready to ditch the Quickbooks amateur Invoice output that is stock. But, being a small company, we don’t have anyone that has the chops to build out an invoice template that works for us especially since the only template provided in the Advanced PDF list is not even close to what I want….

    I was hoping that there would be multiple template options that you could start with OR a place where others have shared their template designs…

    Can anyone advise and provide guidance? Perhaps the PDF design page isn’t as ominous as it looks?
    This is a cached copy. Click here to see the original post.

  • #2073

    Jochen

    Hi threehorn,

    I have a very custom advanced PDF with in page Freemarker intelligence and big faceless report markups. Took me long but it is way better than the standard NetSuite one.

    Code:
    //
    // Hint from the author:
    //
    // For formatting the content you need the manual for “The Big Faceless Report Generator”,
    // download http://bfo.com/products/report/docs/userguide.pdf
    //
    // For Freemarker help (the included script language) go to
    // http://freemarker.incubator.apache.org/docs/index.html
    //
    // With those tools you have everything you need to create great looking custom pdf forms
    // including in-form intelligence.
    //
    // Think of this document as a template to see what is possible. Of course, feel free to use and
    // customize it.
    //
    // There are many custom fields in this form. So just copy and paste will not perfectly work in
    // this case. Some names of the custom fields are self-explanatory (some even in german),
    // some are not. But I am sure you’re smart and you’ll get the idea of it.
    Try to copy and paste the following and check what happens

    Code:

    YOUR COMPANY SHORT ADDRESS, MANUALLY EDITED

    ${record.billaddress}

    Export InvoiceRechnungRechnungInvoice

    RechnungInvoice ${record.tranid}/${record.custbody_customerid}
    ${record.trandate@label} ${record.trandate}
    ${record.currency@label} ${record.currency}
    ${record.otherrefnum@label} ${record.otherrefnum}
    ${record.custbody_bestelleingang@label} ${record.custbody_bestelltvon} ${record.custbody_bestelleingang}
    ${record.custbody_datumbestellung} ${record.vatid}
    ${record.vatregnum@label} ${record.vatregnum}
    Page /

    //
    // Hint from the author:
    //
    // For formatting the content you need the manual for “The Big Faceless Report Generator”,
    // download http://bfo.com/products/report/docs/userguide.pdf
    //
    // For Freemarker help (the included script language) go to
    // http://freemarker.incubator.apache.org/docs/index.html
    //
    // With those tools you have everything you need to create great looking custom pdf forms
    // including in-form intelligence.
    //
    // Think of this document as a template to see what is possible. Of course, feel free to use and
    // customize it.
    //
    // There are many custom fields in this form. So just copy and paste will not perfectly work in
    // this case. Some names of the custom fields are self-explanatory (some even in german),
    // some are not. But I am sure you’re smart and you’ll get the idea of it.

    #page1 {padding-top:-10px;}
    #page2 {padding-top:-300px;}
    #page3 {padding-top:-300px;}
    #page4 {padding-top:-300px;}
    #page5 {padding-top:-300px;}
    #page6 {padding-top:-300px;}
    #page7 {padding-top:-300px;}
    #page8 {padding-top:-300px;}
    #page10 {padding-top:-300px;}
    #page11 {padding-top:-300px;}
    #page12 {padding-top:-300px;}
    #page13 {padding-top:-300px;}
    #page14 {padding-top:-300px;}
    #page15 {padding-top:-300px;}
    #page16 {padding-top:-300px;}
    #page17 {padding-top:-300px;}

    table {

    font-family: stsong, sans-serif;

    font-family: msung, sans-serif;

    font-family: heiseimin, sans-serif;

    font-family: hygothic, sans-serif;

    font-family: verdana;

    font-family: sans-serif;

    font-size: 8pt;
    margin-top: 10px;
    table-layout: fixed;
    width: 100%;
    }
    th {
    font-weight: bold;
    font-size: 8pt;
    vertical-align: middle;
    padding-right: 6px;
    padding-left: 6px;
    padding-bottom: 0px;
    padding-top: 5px;
    /* background-color: #e3e3e3; */
    color: #333333;
    border-bottom: 0px solid black;
    }
    td {
    padding-right: 6px;
    padding-left: 6px;
    padding-bottom: 4px;
    padding-top: 4px;
    }
    b {
    font-weight: bold;
    color: #333333;
    }
    table.header td {
    padding: 0px;
    font-size: 9pt;
    }
    table.footer td {
    padding: 3px;
    font-size: 7pt;
    white-space:nowrap;
    }
    table.itemtable th {
    }
    table.body td {
    padding-top: 2px;
    }
    table.total {
    page-break-inside: avoid;
    }
    table.comments {
    page-break-inside: avoid;
    }
    tr.totalrow {
    background-color: #e3e3e3;
    line-height: 200%;
    }
    td.headertext {
    padding-bottom: 2px;
    align: left;
    }
    td.totalboxtop {
    font-size: 12pt;
    background-color: #e3e3e3;
    }
    td.addressheader {
    font-size: 8pt;
    padding-top: 6px;
    padding-bottom: 2px;
    }
    td.address {
    padding-top: 0px;
    }
    td.totalboxmid {
    font-size: 28pt;
    padding-top: 20px;
    background-color: #e3e3e3;
    }
    td.totalboxbot {
    background-color: #e3e3e3;
    font-weight: bold;
    }
    td.itemprice {
    text-align: right;
    }
    span.compaddress {
    font-size: 7pt;
    }
    span.billaddress {
    font-size: 11pt;
    }
    span.title {
    font-size: 16pt;
    font-weight: bold;
    text-transform: capitalize:
    }
    span.number {
    font-size: 16pt;
    }
    span.itemname {
    font-weight: bold;
    line-height: 150%;
    }
    .totalboxmid {
    background-color: #f5f5f5;
    }
    .totalboxbot {
    background-color: #e3e3e3;
    }

    hr {
    width: 100%;
    color: #d3d3d3;
    background-color: #d3d3d3;
    height: 1px;
    }
    .description {
    font-size: 10pt;
    font-weight: bold;
    text-transform: uppercase;
    padding-top: 10px;
    }

  • #2074

    Jochen

    sorry, had to split the code because it exceeds 10.000 … simply put it after the first lines from the previous post.

    Code:


    ${item.item@label} ${item.quantity@label} ${item.custcol20@label} ${item.pricelevel.name@label} ${item.amount@label}

    ${item.description}
    ${item.custcol_itemnamewithoutid} ${item.description} ${item.amount}
    ${item.description} ${item.amount}
    ${item.custcol_artikelnummer} ${item.custcol_itemnamewithoutid}
    ${item.description}
    ${item.custcol_hscode@label}: ${item.custcol_hscode} / country of origin: ${item.custcol_countryoforigin}
    ${item.quantity} ${item.custcol21} ${item.amount}

    ${record.shipmethod@label}
    ${record.shipmethod} ${record.shipdate}
    ${record.linkedtrackingnumbers}

    ${record.shipaddress@label}
    ${record.shipaddress}

    ${record.currency@label}: ${record.currency}

    ${record.terms@label}
    ${record.terms} ${record.duedate}

    ${record.subtotal@label} ${record.subtotal}
    ${record.taxtotal@label} ${record.custbodytaxrate} ${record.taxtotal}
    ${record.total@label} ${record.total}
    ${record.custbody_recordtext}

    ${record.formdisclaimer}

    EXPORT DECLARATION: The exporter of the products covered by this document declares that, except where otherwise clearly indicated, these products are of preferential origin. Country of origin is your country.

    Wire transfer instructions for Australian Dollars only

    IBAN: DE1234567890123459
    BIC: DE 000 XXXX

    Beneficiary: your company name
    Institute: your institute
    Branch: location
    Street: address line 1
    Zip Code: 12346
    City: city, country
    Tel: +49 123 456789
    Fax: +49 123 456780

    Australian tariff codes, valid for all included goods

    enter appropriate

    Viel Spaß auf dem Wasser und beste Grüße!

    Das Lieferdatum entspricht beim Versand in der Regel dem Übergabedatum an den Spediteur.

    Die gelieferte Ware wird unter verlängertem UND erweitertem Eigentumsvorbehalt (§455 BGB) geliefert, bleibt so bis zur vollständigen Bezahlung unser Eigentum und darf nicht an Dritte verpfändet oder zur Sicherheit übereignet werden. Gerichtsstand ist Deine Stadt. Wir verweisen auf die ausschließliche Geltung unserer “Allgemeinen Geschäftsbedingungen”, die jederzeit in unserem Hauptsitz in Deiner Stadt, Strasse oder online unter http://www.voururl.com/agb einsehbar sind.

    Have fun on the water! Greetings from the your company team, name of region!

    The delivery date is the date of surrender to the freight forwarder. We refer to the exclusive coverage of our general terms and conditions, that you find in our headquarter in your city, address or online at http://www.yoururl.com/terms-and-conditions.

    Up to the complete payment the commodity remains property by your company name. They are obligated, your company name from all accesses third to the retention of title which are subject the goods (reservation commodity), in particular from enforcement measures or other seizures of informing and from all damage entered at the reservation commodity immediately.

  • #2075

    Jochen

    oh, and I forgot … wanted to send a screenshot of the final invoice but was aware of the fact that all business contents had to be blacked out. So it didn’t make sense, because nothing meanful was left on the screenshot .. Just do a copy and paste and you’ll see

  • #2076

    threehorn

    Thank you for the update!

    I copied the code into the source code page and hit preview. This is what I got… Any thoughts of what I did wrong?

  • #2077

    Jochen

    Yes, sure! Just read the error message attentively. This will occur for every custom transaction field that you don’t have in your NetSuite installation. We needed to set them up because we wanted to have them available in our forms.

    The one “isexportinvoice” for example: there is a custom checkbox field that we use in our form named “isexportinvoice”. The custom pdf uses it to display some special wordings in the pdf if the checkbox was checked or hide if the checkbox was not checked. The variable is “custbody_isexportinvoice”. The form asks if this is true or false.

    This error message will occur with all custom fields that are in the form – and I expect this is a lot – because we use a lot in the form.

    Let’s take this for an example:

    Code:

    EXPORT DECLARATION: The exporter of the products covered by this document declares that, except where otherwise clearly indicated, these products are of preferential origin. Country of origin is your country.

    In this case I am asking if the custom transaction checkbox in my transaction form named “isexportinvoice” was checked by the sales person. If it was checked, the html tags within the if-clause will be displayed in the pdf. In this case it is the export declaration that is displayed.

    Other samples, these ones are how we display the item lines in the invoice, description below:

    Code:

    ${item.description}

    If the item is a “description” item, we do another formatting. Larger font size, bold, no other columns for prices etc. We use a slighty different item id field, if you want to use this kind of formatting yu need of course to put in your item id variable.

    Code:

    ${item.custcol_itemnamewithoutid} ${item.description} ${item.amount}

    If any item is discounted – because the name of our discount items start with “Dsc” – we display this line. This discount line is smaller and the td contents are formatted differently – together with some colspans.

    Code:

    ${item.description}
    ${item.amount}

    This was the shipping conditions line. It also displayed differently, because it is not a normal sales item.

    Now we come to the sales item line itself:

    Code:

    ${item.custcol_artikelnummer}

    Our special formatted item id (numerical)

    Code:


    ${item.custcol_itemnamewithoutid}

    The item name without the numerical infront, this is a custom field.

    Code:

    ${item.description}

    ${item.custcol_hscode@label}: ${item.custcol_hscode} / country of origin: ${item.custcol_countryoforigin}

    Very interesting again: First the standard item description from NetSuite, the again the check for isexportinvoice and if yes, display the hs code and country of origin in smaller letters.

    Code:

    ${item.quantity}

    Quantity that was shipped. Standard Netsuite.

    Code:

    ${item.custcol21}

    This is again a custom field, where we store the EUR item price including VAT. In Netsuite we only have the net price stored in the standard price level field.

    Code:


    ${item.amount}

    And finally the amount the customer has to pay for the item.

    Hope this helps a little. I really think you should first get rid of all custcol_* and custbody_* before using this template.

  • #2078

    Jochen

    And here is though a little screenshot for the PDF invoice layout, just for you to have an idea of how it looks like and if it will fit your ideas somehow.

    Hope you were at least able to get some inspiration out of this!

  • #2079

    cr223309

    Hi Jochen This is great thanks for all the info!

    After customizing a different PDF template (checks) I wanted to see if you have had any success removing the Country from the Address field. We are trying to include the Vendor’s Address on a Check but want to remove the country field. Since the “Address” field is one block (instead of broken out by Address 1, Address 2, city, state, zip, country, etc) we haven’t been able to find a way to just remove the Country text and keep everything else.

    Have you had any success trying to remove a portion of an entire field (i.e Country from the Address field)?


    ChrisCorral replied on 04/27/2017, 02:40 PM: I’ve removed the country that prints in the address on the Advanced HTML/PDF using the “?replace” built-in reference in Free Marker. For example, on my check forms I added the following to the address field: ${check.address?replace(“United States”,””)}. The good part is that this solution only affects the template and nothing in the UI. The bad part is if you deal with multiple countries you must append the same syntax to the end of the address reference. Example: ${check.address?replace(“United States”,””)?replace(“Canada”,””)}.

    If the above is not ideal, you can always “override” the address bock on the transaction itself or like mentioned below, update the address form and delete the country from printing.

    Hope this helps.

  • #2080

    JCirocco

    Should be able to remove country via Customize -> Forms -> Address Forms?

  • #2081

    cr223309

    JCirocco Yes, I created my own address form without the Country but how do you actually apply this new address format to the Advanced PDF Check form that I created?

  • #2082

    JCirocco

    On the Countries sub-tab you specify what Country the customized Address form applies to or apply to all addresses.

  • #2083

    cr223309

    Yes, I saw that. I was looking to actually apply it to certain forms and not countries. For example I only want the address format to be different on the checks and not other transactions (i.e. standard for Invoices, Sales Orders, but different address format on checks). However, it doesn’t look like that is possible. Thanks!

You must be logged in to reply to this topic.