Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Get all of the quotes (with any necessary filters):

    Code Block
    qs = api.find("Q", i, step, null,

...

  1.  
        Filter.equal("quoteStatus", quoteStatus),

...

  1. 
        Filter.equal("workflowStatus", workflowStatus),

...

  1. 
        Filter.equal("customerId", customerId))

...


  1. Get the

...

  1. SKU or list of

...

  1. SKUs that you want to filter on.

...

  1. Iterate through each line item in each quote.

...

  1. Within each iteration, loop through the list of

...

  1. SKUs and

...

  1. compare it to the quote line item's

...

  1. SKU:

    Code Block
    def quotes =

...

  1.  []

...

  1. 
    if (skus) {

...

  1. 
      for (q in qs)

...

  1.  {
        for (li in q.lineItems)

...

  1.  {
          if (skus.contains(li.sku))

...

  1.  { 
            quotes.add(q)

...

  1. 
            break
          }
        }
      }
    }