From 858fcfe1d5ee973898b24e6424dddef6c7b8561a Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 13 Jun 2017 11:14:32 +0300 Subject: [PATCH] Fix for payment terms list --- app/Models/PaymentTerm.php | 2 +- resources/views/partials/email_templates.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/PaymentTerm.php b/app/Models/PaymentTerm.php index c54e8c73f0..5f12502842 100644 --- a/app/Models/PaymentTerm.php +++ b/app/Models/PaymentTerm.php @@ -36,7 +36,7 @@ class PaymentTerm extends EntityModel public static function getSelectOptions() { - $terms = Cache::get('paymentTerms'); + $terms = PaymentTerm::whereAccountId(0)->get(); foreach (PaymentTerm::scope()->get() as $term) { $terms->push($term); diff --git a/resources/views/partials/email_templates.blade.php b/resources/views/partials/email_templates.blade.php index 91f1bfb742..5836c1ffc9 100644 --- a/resources/views/partials/email_templates.blade.php +++ b/resources/views/partials/email_templates.blade.php @@ -38,8 +38,8 @@ 'customClient2': invoice ? invoice.client.custom_value2 : 'custom value', 'customContact1': invoice ? invoice.client.contacts[0].custom_value1 : 'custom value', 'customContact2': invoice ? invoice.client.contacts[0].custom_value2 : 'custom value', - 'customInvoice1': invoice ? invoice.custom_value1 : 'custom value', - 'customInvoice2': invoice ? invoice.custom_value2 : 'custom value', + 'customInvoice1': invoice ? invoice.custom_text_value1 : 'custom value', + 'customInvoice2': invoice ? invoice.custom_text_value2 : 'custom value', }; // Add any available payment method links