diff --git a/src/Model/Estimate.php b/src/Model/Estimate.php index 23e5b37..af35154 100644 --- a/src/Model/Estimate.php +++ b/src/Model/Estimate.php @@ -936,6 +936,14 @@ protected function get_prefix() */ protected function getPrefix(): string { + $prefix = $this + ->dbObject('Prefix') + ->getValue(); + + if (!empty($prefix)) { + return (string)$prefix; + } + $config = SiteConfig::current_site_config(); return (string)$config->EstimateNumberPrefix; } diff --git a/src/Model/Invoice.php b/src/Model/Invoice.php index 45244d2..9b4504e 100644 --- a/src/Model/Invoice.php +++ b/src/Model/Invoice.php @@ -491,6 +491,14 @@ protected function get_prefix() */ protected function getPrefix(): string { + $prefix = $this + ->dbObject('Prefix') + ->getValue(); + + if (!empty($prefix)) { + return (string)$prefix; + } + $config = SiteConfig::current_site_config(); return (string)$config->InvoiceNumberPrefix; }