'$number', 'account'=>'$company.name']); } public static function emailCreditSubject() { return ctrans('texts.credit_subject', ['number'=>'$number', 'account'=>'$company.name']); } public static function emailInvoiceTemplate() { $invoice_message = '

$client

'.self::transformText('invoice_message').'

$view_button
'; return $invoice_message; } public static function emailInvoiceReminderTemplate() { $invoice_message = '

$client

'.self::transformText('reminder_message').'

$view_button
'; return $invoice_message; } public static function emailQuoteSubject() { return ctrans('texts.quote_subject', ['number'=>'$number', 'account'=>'$company.name']); } public static function emailQuoteTemplate() { $quote_message = '

$client

'.self::transformText('quote_message').'

$view_button
'; return $quote_message; } public static function emailPaymentSubject() { return ctrans('texts.payment_subject'); } public static function emailPurchaseOrderSubject() { return ctrans('texts.purchase_order_subject', ['number' => '$number', 'account' => '$account']); } public static function emailPurchaseOrderTemplate() { $purchase_order_message = '

$vendor

'.self::transformText('purchase_order_message').'

$view_button
'; return $purchase_order_message; } public static function emailPaymentTemplate() { $payment_message = '

$client

'.self::transformText('payment_message').'

$invoices

$view_button
'; return $payment_message; } public static function emailCreditTemplate() { $credit_message = '

$client

'.self::transformText('credit_message').'

$view_button
'; return $credit_message; } public static function emailPaymentPartialTemplate() { $payment_message = '

$client

'.self::transformText('payment_message').'

$invoices

$view_button
'; return $payment_message; } public static function emailPaymentPartialSubject() { return ctrans('texts.payment_subject'); } public static function emailReminder1Subject() { return ctrans('texts.reminder_subject', ['invoice'=>'$number', 'account'=>'$company.name']); } public static function emailReminder1Template() { return self::emailInvoiceReminderTemplate(); } public static function emailReminder2Subject() { return ctrans('texts.reminder_subject', ['invoice'=>'$number', 'account'=>'$company.name']); } public static function emailReminder2Template() { return self::emailInvoiceReminderTemplate(); } public static function emailReminder3Subject() { return ctrans('texts.reminder_subject', ['invoice'=>'$number', 'account'=>'$company.name']); } public static function emailReminder3Template() { return self::emailInvoiceReminderTemplate(); } public static function emailReminderEndlessSubject() { return ctrans('texts.reminder_subject', ['invoice'=>'$number', 'account'=>'$company.name']); } public static function emailReminderEndlessTemplate() { return self::emailInvoiceReminderTemplate(); } public static function emailStatementSubject() { return ctrans('texts.your_statement'); } public static function emailStatementTemplate() { $statement_message = '

$client

'.self::transformText('client_statement_body').'

$invoices

'; return $statement_message; // return ctrans('texts.client_statement_body', ['start_date' => '$start_date', 'end_date' => '$end_date']); } private static function transformText($string) { //preformat the string, removing trailing colons. return str_replace(':', '$', rtrim(ctrans('texts.'.$string), ':')); } }