mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for paths
This commit is contained in:
parent
73bb2c96db
commit
725aca8796
16
app/Jobs/Vendor/CreatePurchaseOrderPdf.php
vendored
16
app/Jobs/Vendor/CreatePurchaseOrderPdf.php
vendored
@ -65,6 +65,10 @@ class CreatePurchaseOrderPdf implements ShouldQueue
|
|||||||
|
|
||||||
public $vendor;
|
public $vendor;
|
||||||
|
|
||||||
|
private string $path = '';
|
||||||
|
|
||||||
|
private string $file_path = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
@ -96,10 +100,10 @@ class CreatePurchaseOrderPdf implements ShouldQueue
|
|||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
||||||
if(!Storage::disk($this->disk)->exists($path))
|
if(!Storage::disk($this->disk)->exists($this->path))
|
||||||
Storage::disk($this->disk)->makeDirectory($path, 0775);
|
Storage::disk($this->disk)->makeDirectory($this->path, 0775);
|
||||||
|
|
||||||
Storage::disk($this->disk)->put($file_path, $pdf, 'public');
|
Storage::disk($this->disk)->put($this->file_path, $pdf, 'public');
|
||||||
|
|
||||||
}
|
}
|
||||||
catch(\Exception $e)
|
catch(\Exception $e)
|
||||||
@ -110,7 +114,7 @@ class CreatePurchaseOrderPdf implements ShouldQueue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $file_path;
|
return $this->file_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function rawPdf()
|
public function rawPdf()
|
||||||
@ -135,10 +139,10 @@ class CreatePurchaseOrderPdf implements ShouldQueue
|
|||||||
|
|
||||||
$entity_design_id = '';
|
$entity_design_id = '';
|
||||||
|
|
||||||
$path = $this->vendor->purchase_order_filepath($this->invitation);
|
$this->path = $this->vendor->purchase_order_filepath($this->invitation);
|
||||||
$entity_design_id = 'purchase_order_design_id';
|
$entity_design_id = 'purchase_order_design_id';
|
||||||
|
|
||||||
$file_path = $path.$this->entity->numberFormatter().'.pdf';
|
$this->file_path = $this->path.$this->entity->numberFormatter().'.pdf';
|
||||||
|
|
||||||
$entity_design_id = $this->entity->design_id ? $this->entity->design_id : $this->decodePrimaryKey('Wpmbk5ezJn');
|
$entity_design_id = $this->entity->design_id ? $this->entity->design_id : $this->decodePrimaryKey('Wpmbk5ezJn');
|
||||||
|
|
||||||
|
@ -373,6 +373,8 @@ class Account extends BaseModel
|
|||||||
|
|
||||||
public function getDailyEmailLimit()
|
public function getDailyEmailLimit()
|
||||||
{
|
{
|
||||||
|
if(Carbon::createFromTimestamp($this->created_at)->diffInDays() == 0)
|
||||||
|
return 7;
|
||||||
|
|
||||||
if(Carbon::createFromTimestamp($this->created_at)->diffInWeeks() == 0)
|
if(Carbon::createFromTimestamp($this->created_at)->diffInWeeks() == 0)
|
||||||
return 20;
|
return 20;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user