       (html
         (let [plan (get-in app state/org-plan-path)]
           [:div.row-fluid
-            (when (plan-model/has-active-discount? plan)
+            (when (pm/has-active-discount? plan)
               [:fieldset
                 [:legend.span8 "Discounts"]
                 [:div.span8 (format-discount plan)]])])))))

      (let [org-name (get-in app state/org-name-path)
            plan (get-in app state/org-plan-path)
            selected-containers (or (get-in app state/selected-containers-path)
                                    (plan-model/usable-containers plan))
            selected-paid-containers (max 0 (- selected-containers (plan-model/freemium-containers plan)))
            old-total (plan-model/stripe-cost plan)
            new-total (plan-model/cost plan selected-containers)
            container-cost (plan-model/per-container-cost plan)]
        (html
         (if-not plan
           [:div.loading-spinner common/spinner]

           [:div#edit-plan
            [:fieldset
             [:legend
              "Our pricing is flexible and scales with you. Add as many containers as you want for $"

            [frontend.routes :as routes]
            [frontend.datetime :as datetime]
            [frontend.models.organization :as org-model]
            [frontend.models.plan :as pm]
            [frontend.models.repo :as repo-model]
            [frontend.models.user :as user-model]
            [frontend.components.common :as common]
