1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fixes for settings purchase order designs

This commit is contained in:
David Bomba 2022-07-27 20:03:46 +10:00
parent fd42442beb
commit aceb377081
3 changed files with 5 additions and 3 deletions

View File

@ -564,7 +564,9 @@ class DesignController extends BaseController
case 'credit':
$company->credits()->update(['design_id' => $design_id]);
break;
case 'purchase_order':
$company->purchase_orders()->update(['design_id' => $design_id]);
break;
default:
// code...
break;

View File

@ -423,7 +423,7 @@ class MultiDB
* @param array $data
* @return User|null
*/
public static function hasPhoneNumber(string $phone) : ?User
public static function hasPhoneNumber(string $phone) : bool
{
if (! config('ninja.db.multi_db_enabled'))
return Account::where('account_sms_verification_number', $phone)->where('account_sms_verified', true)->exists();

View File

@ -52,7 +52,7 @@ class PurchaseOrderService
$settings = $this->purchase_order->company->settings;
if (! $this->purchase_order->design_id)
$this->purchase_order->design_id = $this->decodePrimaryKey($settings->invoice_design_id);
$this->purchase_order->design_id = $this->decodePrimaryKey($settings->purchase_order_design_id);
if (!isset($this->invoice->footer) || empty($this->invoice->footer))
$this->purchase_order->footer = $settings->purchase_order_footer;