Move category/category_name product::class methods into __get(), no functional changes

This commit is contained in:
2025-05-22 12:01:31 +10:00
parent 04ae35b1dd
commit 5ef1a27a64
23 changed files with 63 additions and 85 deletions

View File

@@ -31,19 +31,17 @@ class OrderRequestApprove extends Mailable
/**
* Build the message.
*
* @return $this
*/
public function build()
{
Config::set('site',$this->so->site);
// @todo This is not consistent with Cancel/Change Request
switch ($this->so->product->category) {
case 'broadband': $subject = sprintf('%s: %s',$this->so->product->category,$this->so->type->service_address);
switch ($this->so->product->category_lc) {
case 'broadband': $subject = sprintf('%s: %s',$this->so->product->category_name,$this->so->type->service_address);
break;
case 'phone': $subject = sprintf('%s: %s',$this->so->product->category,$this->so->type->service_number);
case 'phone': $subject = sprintf('%s: %s',$this->so->product->category_name,$this->so->type->service_number);
break;
default: