2015-03-16 22:45:25 +01:00
|
|
|
<script type="application/ld+json">
|
2015-11-08 09:43:49 +01:00
|
|
|
[
|
|
|
|
@if ($entityType == ENTITY_INVOICE)
|
|
|
|
{
|
|
|
|
"@context": "http://schema.org",
|
|
|
|
"@type": "Invoice",
|
2015-12-16 12:49:26 +01:00
|
|
|
"paymentStatus": "{{ $invoice->present()->paymentStatus }}",
|
2015-11-08 09:43:49 +01:00
|
|
|
@if ($invoice->due_date)
|
|
|
|
"paymentDue": "{{ $invoice->due_date }}T00:00:00+00:00",
|
|
|
|
@endif
|
|
|
|
"provider": {
|
|
|
|
"@type": "Organization",
|
|
|
|
"name": "{{ $account->getDisplayName() }}"
|
|
|
|
},
|
|
|
|
"broker": {
|
|
|
|
"@type": "Organization",
|
|
|
|
"name": "Invoice Ninja",
|
2018-03-27 11:52:37 +02:00
|
|
|
"url": "{{ NINJA_WEB_URL }}"
|
2015-11-08 09:43:49 +01:00
|
|
|
},
|
|
|
|
"totalPaymentDue": {
|
|
|
|
"@type": "PriceSpecification",
|
2015-12-16 12:49:26 +01:00
|
|
|
"price": "{{ $account->formatMoney(isset($payment) ? $payment->amount : $invoice->getRequestedAmount(), $client) }}"
|
2015-11-10 23:07:05 +01:00
|
|
|
},
|
|
|
|
"action": {
|
|
|
|
"@type": "ViewAction",
|
2018-03-27 11:52:37 +02:00
|
|
|
"url": "{{ $link }}"
|
2015-11-08 16:01:41 +01:00
|
|
|
}
|
2015-11-08 09:43:49 +01:00
|
|
|
},
|
|
|
|
@endif
|
|
|
|
{
|
|
|
|
"@context": "http://schema.org",
|
|
|
|
"@type": "EmailMessage",
|
|
|
|
"action": {
|
|
|
|
"@type": "ViewAction",
|
2018-03-27 11:52:37 +02:00
|
|
|
"url": "{{ $link }}",
|
|
|
|
"name": {!! json_encode(trans("texts.view_{$entityType}")) !!}
|
2015-11-08 09:43:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2018-03-27 11:52:37 +02:00
|
|
|
</script>
|