Hi <@U5TF1GQ20>, I am wonder how I can fulfill a “...
# suitescript
k
Hi @battk, I am wonder how I can fulfill a “partially fulfilled” sales order. I am able to do from pending fulfillment to pending billing but was wonder how I can filter out what line item is required of me . Is there a way for me to check which line item is already fulfilled or maybe I thought i need to somehow make a search to find the fulfillment record to cross reference between the remaining line item.
b
the transformed item fulfillment will only have the items that have not been fulfilled yet
k
Let me see if I can get what you are saying. I have a sales order with 5 line item. I partially fulfilled 3 of them. If i want to fufilled the rest, the number of line item i have is 2 when ever I do a record.transform?
Would I still run
Copy code
var fulfillment = record.transform({
          fromType: record.Type.SALES_ORDER,
          fromId: requestBody.id,
          toType: record.Type.ITEM_FULFILLMENT,
          defaultValues: {
            inventorylocation: requestBody.location,
          },
        });
or would it be something else?
Like
Copy code
var fulfillment = record.transform({
          fromType: record.Type.PARTIAL_FULFILLMENT,
          fromId: requestBody.id,
          toType: record.Type.ITEM_FULFILLMENT,
          defaultValues: {
            inventorylocation: requestBody.location,
          },
        });
?
b
depends on how you originally fulfilled them
partially fulfilled can both mean that you fulfilled some of the quantity of a particular item
or all the quantity of one line but not the other
k
I fulfilled each item in the line, fully. I need to fulfilled the last remaining line items because before they were stuck in back order, but now is fixed. Also no partial fulfill for each item line, only fully fulfill
b
then the fulfillment should only contain your 2 lines
k
ohhh
b
might contain less if your inventory was shipping from different locations
k
we are shipping purely from 1 location per SO
I think I know how to finish the fulfillment, thank you battk really appreciate it