This topic contains 2 replies, has 0 voices, and was last updated by Olivier Gagnon NC 8 years ago.

  • Author
    Posts
  • #6192 Score: 0

    erik@extendtech.net
    • Contributions: 0
    • Level 1

    Hello all,

    As part of our process we have Item Fulfillment records which need to be Billed / Invoiced. After an Item Fulfillment is completed a checkbox is selected by a user to indicate that the Item Fulfillment is “Ready to Invoice” and then an Accounting user comes in later and clicks the “Bill” button on the Item Fulfillment to generate the invoice and print / mail to the customer.

    What we’re trying to do is automate the Invoice creation step so that we can just use a Saved Search to display Invoices generated by NetSuite overnight for bulk review (saving a person needing to create all the invoices manually).

    Initially we thought we’d be able to do this in a Workflow with a Transform action, but a Transform isn’t supported between an Item Fulfillment and Invoice. We tried the same process using a Scheduled Script to do a Sales Order to Invoice transform hoping that it would only bill Item Fulfillments which were ready to be billed, but when doing that NetSuite creates Invoice records for ALL Item Fulfillments on the Sales Order regardless of whether it is ready to be billed or not.

    We’re looking for an automated / scheduled way to create Invoice records from Item Fulfillment records which are ready to be billed (have the Bill button) along with a custom checkbox set to True. So far we’ve only been able to create Invoice records for every Item Fulfillment on the Sales Order record and are hoping we can find some help on only billing certain Item Fulfillments.

    Let me know if I need to clarify or if there’s any additional information which I can provide.

    Thanks!
    This is a cached copy. Click here to see the original post.

  • #6193 Score: 0

    david.smith
    • Contributions: 0
    • Level 1

    I think what you’re asking for should be a simple script.

  • #6194 Score: 0

    Olivier Gagnon NC
    • Contributions: 0
    • Level 1

    Ha, I literally coded this script about 5-6 years ago! Brings back memories…

    Anyway, yeah, NS will try to invoice everything fulfilled by default. If you want an Item Fulfillment-Invoice pairing, you’ll need to be more surgical in your approach. You’ll need to call a search to find newly created Fulfillments, and store those in an array or something. Then you’ll transform the SO. You’ll need to REMOVE items and quantity to make each transform match each Item Fulfillment you have, one by one. So you’ll transform the SO many time, pruning it each time.

    There are potentially complications to be wary of. What if an IF is edited or deleted? What if an Invoice is edited or deleted? Etc. It’s not a simple script, despite appearances.

You must be logged in to reply to this topic.