protected function moneyRemainingOnYearlyPlan(Plan $plan)
    {
        return ($plan->price / 365) * Carbon::today()->diffInDays(Carbon::instance(
            $this->asBraintreeSubscription()->billingPeriodEndDate
        ), false);
    }
protected function moneyRemainingOnYearlyPlan(Plan $plan)
    {
        return ($plan->price / 365) * Carbon::today()->diffInDays(Carbon::instance(
            $this->asBraintreeSubscription()->billingPeriodEndDate
        ), false);
    }
protected function moneyRemainingOnYearlyPlan ( Plan $ plan ) { return ( $ plan -> price / 365 ) * Carbon :: today ( ) -> diffInDays ( Carbon :: instance ( $ this -> asBraintreeSubscription ( ) -> billingPeriodEndDate ) , false ) ; }
Calculate the amount of discount to apply to a swap to monthly billing.

@param  \Braintree\Plan  $plan
@return float
Calculate the amount of discount to apply to a swap to monthly billing .