Example #1
0
            $template .= "{$message}<p/>\r\n\r\n";
        }
        return $template . "\$footer";
    }
    public function getEmailFooter()
    {
        if ($this->email_footer) {
            // Add line breaks if HTML isn't already being used
            return strip_tags($this->email_footer) == $this->email_footer ? nl2br($this->email_footer) : $this->email_footer;
        } else {
            return "<p>" . trans('texts.email_signature') . "<br>\$account</p>";
        }
    }
    public function showTokenCheckbox()
    {
        if (!$this->isGatewayConfigured(GATEWAY_STRIPE)) {
            return false;
        }
        return $this->token_billing_type_id == TOKEN_BILLING_OPT_IN || $this->token_billing_type_id == TOKEN_BILLING_OPT_OUT;
    }
    public function selectTokenCheckbox()
    {
        return $this->token_billing_type_id == TOKEN_BILLING_OPT_OUT;
    }
}
Account::updating(function ($account) {
    // Lithuanian requires UTF8 support
    if (!Utils::isPro()) {
        $account->utf8_invoices = $account->language_id == 13 ? 1 : 0;
    }
});