Working on Gmail actions

This commit is contained in:
Hillel Coren 2015-11-08 17:01:41 +02:00
parent 2f4ed99580
commit ed021347cf
2 changed files with 4 additions and 16 deletions

View File

@ -5,7 +5,7 @@ use Laracasts\Presenter\Presenter;
class InvoicePresenter extends Presenter { class InvoicePresenter extends Presenter {
public function minimumAmountDue() public function balance_due()
{ {
$amount = $this->entity->getRequestedAmount(); $amount = $this->entity->getRequestedAmount();
$currencyId = $this->entity->client->currency_id; $currencyId = $this->entity->client->currency_id;
@ -13,12 +13,4 @@ class InvoicePresenter extends Presenter {
return Utils::formatMoney($amount, $currencyId); return Utils::formatMoney($amount, $currencyId);
} }
public function totalAmountDue()
{
$amount = $this->entity->balance;
$currencyId = $this->entity->client->currency_id;
return Utils::formatMoney($amount, $currencyId);
}
} }

View File

@ -4,10 +4,6 @@
{ {
"@context": "http://schema.org", "@context": "http://schema.org",
"@type": "Invoice", "@type": "Invoice",
"minimumPaymentDue": {
"@type": "PriceSpecification",
"price": "{{ $invoice->present()->minimumAmountDue }}"
},
"paymentStatus": "PaymentDue", "paymentStatus": "PaymentDue",
@if ($invoice->due_date) @if ($invoice->due_date)
"paymentDue": "{{ $invoice->due_date }}T00:00:00+00:00", "paymentDue": "{{ $invoice->due_date }}T00:00:00+00:00",
@ -23,7 +19,7 @@
}, },
"totalPaymentDue": { "totalPaymentDue": {
"@type": "PriceSpecification", "@type": "PriceSpecification",
"price": "{{ $invoice->present()->totalAmountDue }}" "price": "{{ $invoice->present()->balance_due }}"
} }
}, },
@endif @endif
@ -33,7 +29,7 @@
"action": { "action": {
"@type": "ViewAction", "@type": "ViewAction",
"url": "{!! $link !!}", "url": "{!! $link !!}",
"name": "View {{ $entityType }}" "name": "{{ trans("view_{$entityType}") }}"
} }
} }
] ]