mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Show invoice expense documents
This commit is contained in:
parent
9f158868d6
commit
94c064fd05
51
app/DataMapper/Analytics/TrialFinished.php
Normal file
51
app/DataMapper/Analytics/TrialFinished.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\DataMapper\Analytics;
|
||||
|
||||
use Turbo124\Beacon\ExampleMetric\GenericCounter;
|
||||
|
||||
class TrialFinished extends GenericCounter
|
||||
{
|
||||
/**
|
||||
* The type of Sample.
|
||||
*
|
||||
* Monotonically incrementing counter
|
||||
*
|
||||
* - counter
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'counter';
|
||||
|
||||
/**
|
||||
* The name of the counter.
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'account.trial_finished';
|
||||
|
||||
/**
|
||||
* The datetime of the counter measurement.
|
||||
*
|
||||
* date("Y-m-d H:i:s")
|
||||
*
|
||||
* @var DateTime
|
||||
*/
|
||||
public $datetime;
|
||||
|
||||
/**
|
||||
* The increment amount... should always be
|
||||
* set to 0.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $metric = 0;
|
||||
}
|
51
app/DataMapper/Analytics/TrialStarted.php
Normal file
51
app/DataMapper/Analytics/TrialStarted.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\DataMapper\Analytics;
|
||||
|
||||
use Turbo124\Beacon\ExampleMetric\GenericCounter;
|
||||
|
||||
class TrialStarted extends GenericCounter
|
||||
{
|
||||
/**
|
||||
* The type of Sample.
|
||||
*
|
||||
* Monotonically incrementing counter
|
||||
*
|
||||
* - counter
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'counter';
|
||||
|
||||
/**
|
||||
* The name of the counter.
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'account.trial_started';
|
||||
|
||||
/**
|
||||
* The datetime of the counter measurement.
|
||||
*
|
||||
* date("Y-m-d H:i:s")
|
||||
*
|
||||
* @var DateTime
|
||||
*/
|
||||
public $datetime;
|
||||
|
||||
/**
|
||||
* The increment amount... should always be
|
||||
* set to 0.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $metric = 0;
|
||||
}
|
@ -228,9 +228,9 @@ class Invoice extends BaseModel
|
||||
return $this->hasMany(Task::class);
|
||||
}
|
||||
|
||||
public function expenses()
|
||||
public function expense()
|
||||
{
|
||||
return $this->hasMany(Expense::class);
|
||||
return $this->hasOne(Expense::class);
|
||||
}
|
||||
/**
|
||||
* Service entry points.
|
||||
|
@ -160,7 +160,6 @@ class CreditCard
|
||||
'TotalAmount' => $this->convertAmountForEway(),
|
||||
'CurrencyCode' => $this->eway_driver->client->currency()->code,
|
||||
'InvoiceNumber' => $invoice_numbers,
|
||||
'InvoiceDescription' => $description,
|
||||
'InvoiceReference' => $description,
|
||||
],
|
||||
'TransactionType' => \Eway\Rapid\Enum\TransactionType::PURCHASE,
|
||||
|
@ -1,4 +1,4 @@
|
||||
@if ($entity->documents->count() > 0 || $entity->company->documents->count() > 0)
|
||||
@if ($entity->documents->count() > 0 || $entity->company->documents->count() > 0 || ($entity->expense->exists() && $entity->expense->invoice_documents))
|
||||
<div class="bg-white shadow sm:rounded-lg my-4">
|
||||
<div class="px-4 py-5 sm:p-6">
|
||||
<div class="sm:flex sm:items-start sm:justify-between">
|
||||
@ -41,6 +41,27 @@
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@if($entity->expense->exists() && $entity->expense->invoice_documents)
|
||||
@foreach ($entity->expense->documents as $document)
|
||||
<div class="inline-flex items-center space-x-1">
|
||||
<a href="{{ route('client.documents.show', $document->hashed_id) }}" target="_blank"
|
||||
class="block text-sm button-link text-primary">{{ Illuminate\Support\Str::limit($document->name, 40) }}</a>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="text-primary h-6 w-4">
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>
|
||||
<polyline points="15 3 21 3 21 9"></polyline>
|
||||
<line x1="10" y1="14" x2="21" y2="3"></line>
|
||||
</svg>
|
||||
|
||||
@if (!$loop->last)
|
||||
<span>—</span>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -231,7 +231,7 @@
|
||||
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8 lg:flex lg:items-center lg:justify-between">
|
||||
<h2 class="text-3xl font-extrabold tracking-tight text-gray-900 sm:text-4xl">
|
||||
<span class="block">Enterprise Plan (1-2 Users) Annual</span>
|
||||
<span class="block text-indigo-600 mt-2">Buy 10 months, get 2 free!</span>
|
||||
<span class="block text-indigo-600 mt-2">Buy 10 months, get 2 free! $140</span>
|
||||
</h2>
|
||||
<div class="mt-8 flex lg:mt-0 lg:flex-shrink-0">
|
||||
<div class="inline-flex rounded-md shadow">
|
||||
@ -247,7 +247,7 @@
|
||||
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8 lg:flex lg:items-center lg:justify-between">
|
||||
<h2 class="text-3xl font-extrabold tracking-tight text-gray-900 sm:text-4xl">
|
||||
<span class="block">Pro Plan Annual</span>
|
||||
<span class="block text-indigo-600 mt-2">Buy 10 months, get 2 free!</span>
|
||||
<span class="block text-indigo-600 mt-2">Buy 10 months, get 2 free! $100</span>
|
||||
</h2>
|
||||
<div class="mt-8 flex lg:mt-0 lg:flex-shrink-0">
|
||||
<div class="inline-flex rounded-md shadow">
|
||||
|
@ -0,0 +1,21 @@
|
||||
@extends('portal.ninja2020.layout.app')
|
||||
@section('meta_title', ctrans('texts.account_management'))
|
||||
|
||||
@section('body')
|
||||
|
||||
<!-- This example requires Tailwind CSS v2.0+ -->
|
||||
<div class="bg-gray-50">
|
||||
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8 lg:flex lg:items-center lg:justify-between">
|
||||
<h2 class="text-3xl font-extrabold tracking-tight text-gray-900 sm:text-4xl">
|
||||
<span class="block">Invoice Ninja - Pro Plan.</span>
|
||||
<span class="block text-indigo-600 mt-2">Your Pro Plan trial is loaded and ready to go!</span>
|
||||
</h2>
|
||||
<div class="mt-8 flex lg:mt-0 lg:flex-shrink-0">
|
||||
<div class="inline-flex rounded-md shadow">
|
||||
<a href="https://invoicing.co" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700"> Account Login </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
Loading…
Reference in New Issue
Block a user