4 Replies Latest reply on Apr 30, 2012 10:53 AM by frank929rr

    Inventory Backorder



      Inventory Backorder


      Hi.  I'm builiding a solution that sells a product.  When more product is ordered than is in invetory, the user is prompted to either ship the partial and move the remaining to a seperate "backorder" invoice, or make the entire ordered amount a "backorder" invoice.  I'm using a script to execute, but it's kind of clunky.  For example, when there are 2 products that need to be moved entirely to "backorder", I'm left with an original invoice with no line items, and 2 seperate backorders.  The products are only billed for once they are shipped.  Are there any examples of solutions that I would be able to view? Any suggestions?  I'm sure I need to give more info, but I'm new at this, so please ask if you need more info.  Thanks.



        • 1. Re: Inventory Backorder

          Well, we don't know what tables, layouts, scripts and relationships you have already created here...

          Wouldn't it make more sense that if all the items on the original invoice are to be backordered, just change the status of that existing invoice to "back ordered"? Your script could check for that possibility before creating a new invoice for back-ordered items.

          • 2. Re: Inventory Backorder

            Hi Phil.  Thanks for your response.  I'm using the fmstarting point, so my tables, etc are all basically the same.  


            My script loops through the line items, and moves each as required. If quantiy out is more than stock level, it processes it as a seperate backorder.  How can I make it check if all line items are backorders first before processing each line?   Thanks.

            If I'm asking something that has already been discussed, please advise, but I've searched for hours to no avail.

            • 3. Re: Inventory Backorder

              Use a separate loop that loops through all the lineitems.

              Set a variable to False before starting this loop.

              IF any record in the loop is for an item that is at least partially instock, set the variable to true and exit the loop.

              Then use an If statement that checks this variable's value. If it is false, the entire invoice needs to be back ordered. If it is true proceed with your current looping script and split the invoice into that which can be shipped immediately and that which will be backordered.

              • 4. Re: Inventory Backorder

                Thank you Phil!  I'm still a beginner, so sometimes the obvious is not so obvious.  I actually solved my problem by keeping the items on the original invoice, just being marked as backordered.  If an item is partial shipment, the script just creates a new line order with the backordered amount, of course flagged as a backorder.  I then attached a button that will move each item to a new invoice as the product(s) arrive.  Seems to be a cleaner approach.