mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Adjustments for PDf previews
This commit is contained in:
parent
5ccd6949bd
commit
24c9edd1a7
@ -245,9 +245,6 @@ class Invoice extends BaseModel
|
||||
|
||||
public function getPartialDueDateAttribute($value)
|
||||
{
|
||||
if($value == "0000-00-00 00:00:00")
|
||||
return null;
|
||||
|
||||
return $this->dateMutator($value);
|
||||
}
|
||||
|
||||
@ -399,7 +396,7 @@ class Invoice extends BaseModel
|
||||
public function getStatusAttribute()
|
||||
{
|
||||
$due_date = $this->due_date ? Carbon::parse($this->due_date) : false;
|
||||
$partial_due_date = $this->partial_due_date ? Carbon::parse($this->partial_due_date) : false;
|
||||
$partial_due_date = $this->partial_due_Date ? Carbon::parse($this->partial_due_date) : false;
|
||||
|
||||
if ($this->status_id == self::STATUS_SENT && $due_date && $due_date->gt(now())) {
|
||||
return self::STATUS_UNPAID;
|
||||
|
@ -462,7 +462,7 @@ class PdfMock
|
||||
'$viewLink' => '<a class="button" href="http://ninja.test:8000/client/invoice/UAUY8vIPuno72igmXbbpldwo5BDDKIqs">View Invoice</a>',
|
||||
'$autoBill' => 'This invoice will automatically be billed to your credit card on file on the due date.',
|
||||
'$view_url' => 'http://ninja.test:8000/client/invoice/UAUY8vIPuno72igmXbbpldwo5BDDKIqs',
|
||||
'$font_url' => 'https://fonts.googleapis.com/css2?family=Roboto&display=swap',
|
||||
'$font_url' => isset($this->settings?->primary_font) ? \App\Utils\Helpers::resolveFont($this->settings->primary_font)['url'] : 'https://fonts.googleapis.com/css2?family=Roboto&display=swap',
|
||||
'$details' => '',
|
||||
'$balance' => '$40.00',
|
||||
'$partial' => '$30.00',
|
||||
|
Loading…
Reference in New Issue
Block a user