         "red"
 
     $scope.selectedPaymentMethodsCount = ->
-      $scope.PaymentMethods.reduce (count, PaymentMethod) ->
-        count++ if PaymentMethod.selected
+      $scope.PaymentMethods.reduce (count, payment_method) ->
+        count++ if payment_method.selected
         count
       , 0
 
-    for ShippingMethod in $scope.ShippingMethods
-      ShippingMethod.selected = if ShippingMethod.id in $scope.Enterprise.shipping_method_ids then true else false
+    for shipping_method in $scope.ShippingMethods
+      shipping_method.selected = shipping_method.id in $scope.Enterprise.shipping_method_ids
 
     $scope.shippingMethodsColor = ->
       if $scope.ShippingMethods.length > 0

        "red"

    $scope.selectedShippingMethodsCount = ->
      $scope.ShippingMethods.reduce (count, ShippingMethod) ->
        count++ if ShippingMethod.selected
        count
      , 0
    $scope.PaymentMethods = PaymentMethods.paymentMethods
    $scope.ShippingMethods = ShippingMethods.shippingMethods

    for payment_method in $scope.PaymentMethods
      payment_method.selected = payment_method.id in $scope.Enterprise.payment_method_ids

    $scope.paymentMethodsColor = ->
      if $scope.PaymentMethods.length > 0
