 
   constructor: (options = {}, data = {}) ->
 
-    @model = data  if data.planCode
+    model = data  if data.planCode
 
     options.isRecurOptional ?= yes
 
     options.callback ?= =>
-      @emit 'SaveRequested', @model, @getProductData()
+      @emit 'SaveRequested', model, @getProductData()
 
     options.buttons ?=
       Save        :


    super options, data

  getPlanInfo: (subscriptionType) ->
    feeUnit     : 'months'
    feeInterval : switch subscriptionType
      when 'mo'     then 1

          partial     : "/ #{ data.subscriptionType ? 'mo' }"
          cssClass    : 'fr'

    if options.showPriceIsVolatile
      options.fields.priceIsVolatile =
        label         : "Price is volatile"
        itemClass     : KDOnOffSwitch
        defaultValue  : data.priceIsVolatile
        callback      : =>
          enabled = @inputs.priceIsVolatile.getValue()
          do @fields.feeAmount[if enabled then 'hide' else 'show']

    if options.showOverage
      options.fields.overageEnabled =
        label         : "Overage enabled"
