mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Scaffold for PDF generation for purchase orders
This commit is contained in:
parent
feacf65160
commit
888dfd3092
@ -159,7 +159,7 @@ class PurchaseOrder extends BaseModel
|
||||
if(!$invitation)
|
||||
throw new \Exception('Hard fail, could not create an invitation - is there a valid contact?');
|
||||
|
||||
$file_path = $this->client->credit_filepath($invitation).$this->numberFormatter().'.pdf';
|
||||
$file_path = $this->vendor->purchase_order_filepath($invitation).$this->numberFormatter().'.pdf';
|
||||
|
||||
if(Ninja::isHosted() && $portal && Storage::disk(config('filesystems.default'))->exists($file_path)){
|
||||
return Storage::disk(config('filesystems.default'))->{$type}($file_path);
|
||||
|
@ -146,4 +146,10 @@ class Vendor extends BaseModel
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public function purchase_order_filepath($invitation)
|
||||
{
|
||||
$contact_key = $invitation->contact->contact_key;
|
||||
return $this->company->company_key.'/'.$this->vendor_hash.'/'.$contact_key.'/purchase_orders/';
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user