           product.supplier = supplier
           break
 
+
     $scope.updateOnHand = (product) ->
       product.on_hand = $scope.onHand(product)
+
 
     $scope.onHand = (product) ->
       onHand = 0

      productsToSubmit = filterSubmitProducts($scope.dirtyProducts)
      $scope.updateProducts productsToSubmit

    $scope.setMessage = (model, text, style, timeout) ->
      model.text = text
      model.style = style

          $scope.setMessage model, "", {}, false
        , timeout, true)


    $scope.displayUpdating = ->
      $scope.setMessage $scope.updateStatusMessage, "Updating...",
        color: "orange"
      , false


    $scope.displaySuccess = ->
      $scope.setMessage $scope.updateStatusMessage, "Update complete",
        color: "green"
      , 3000


    $scope.displayFailure = (failMessage) ->
      $scope.setMessage $scope.updateStatusMessage, "Updating failed. " + failMessage,
        color: "red"
      , 10000


    $scope.displayDirtyProducts = ->
      if $scope.dirtyProductCount() > 0
