diff --git a/README.md b/README.md
index d882332f5137..df0bfa0373f9 100644
--- a/README.md
+++ b/README.md
@@ -6,11 +6,11 @@
[](https://codecov.io/gh/invoiceninja/invoiceninja)
[](https://www.codacy.com/app/turbo124/invoiceninja?utm_source=github.com&utm_medium=referral&utm_content=invoiceninja/invoiceninja&utm_campaign=Badge_Grade)
-**Invoice Ninja v 2** is coming soon!
+# Invoice Ninja version 2.0 is coming!
We will be using the lessons learnt in Invoice Ninja 4.0 to build a bigger better platform to work from. If you would like to contribute to the project we will gladly accept contributions for code, user guides, bug tracking and feedback! Please consider the following guidelines prior to submitting a pull request:
-# Contribution guide.
+## Contribution guide.
Code Style to follow [PSR-2](https://www.php-fig.org/psr/psr-2/) standards.
@@ -26,9 +26,14 @@ PHP >= 7.3 allows the return type Nullable so there should be no circumstance a
`public function doThat() ?:string`
-To improve chances of PRs being merged please include teststo ensure your code works well and integrates with the rest of the project.
+To improve chances of PRs being merged please include tests to ensure your code works well and integrates with the rest of the project.
-
-# Documentation
+## Documentation
API documentation is hosted using Swagger and can be found [HERE](https://app.swaggerhub.com/apis-docs/InvoiceNinja/InvoiceNinjaV2/1.0.3)
+
+## Current work in progress
+
+Invoice Ninja is currently being written in a combination of Laravel for the API and Client Portal and Flutter for the front end management console. This will allow an immersive and consistent experience across any device: mobile, tablet or desktop.
+
+To manage our workflow we will be creating separate branches for the client (Flutter) and server (Laravel API / Client Portal) and merge these into a release branch for deployments.
diff --git a/app/Http/Controllers/ClientPortal/ProfileController.php b/app/Http/Controllers/ClientPortal/ProfileController.php
index d16ba037662f..79b0f44cf72f 100644
--- a/app/Http/Controllers/ClientPortal/ProfileController.php
+++ b/app/Http/Controllers/ClientPortal/ProfileController.php
@@ -70,19 +70,6 @@ class ProfileController extends Controller
if($request->input('password'))
$client_contact->password = Hash::make($request->input('password'));
- //update avatar if needed
- if($request->file('avatar'))
- {
- $path = UploadAvatar::dispatchNow($request->file('avatar'), auth()->user()->client->client_hash);
-
- if($path)
- {
- $client_contact->avatar = $path;
- $client_contact->avatar_size = $request->file('avatar')->getSize();
- $client_contact->avatar_type = $request->file('avatar')->getClientOriginalExtension();
- }
- }
-
$client_contact->save();
// auth()->user()->fresh();
@@ -95,6 +82,16 @@ class ProfileController extends Controller
$client = $client_contact->client;
+ //update avatar if needed
+ if($request->file('logo'))
+ {
+ $path = UploadAvatar::dispatchNow($request->file('logo'), auth()->user()->client->client_hash);
+
+ if($path)
+ $client->logo = $path;
+
+ }
+
$client->fill($request->all());
$client->save();
diff --git a/app/Http/Requests/ClientPortal/UpdateClientRequest.php b/app/Http/Requests/ClientPortal/UpdateClientRequest.php
index dc785889fc64..563b980af206 100644
--- a/app/Http/Requests/ClientPortal/UpdateClientRequest.php
+++ b/app/Http/Requests/ClientPortal/UpdateClientRequest.php
@@ -33,7 +33,8 @@ class UpdateClientRequest extends Request
{
return [
- 'name' => 'required'
+ 'name' => 'required',
+ 'file' => 'sometimes|nullable|max:100000|mimes:png,svg,jpeg,gif,jpg,bmp'
];
}
diff --git a/app/Http/Requests/ClientPortal/UpdateContactRequest.php b/app/Http/Requests/ClientPortal/UpdateContactRequest.php
index 1fbc67cb66c8..bd07dd11dd85 100644
--- a/app/Http/Requests/ClientPortal/UpdateContactRequest.php
+++ b/app/Http/Requests/ClientPortal/UpdateContactRequest.php
@@ -38,7 +38,6 @@ class UpdateContactRequest extends Request
'last_name' => 'required',
'email' => 'required|email|unique:client_contacts,email,' . auth()->user()->id,
'password' => 'sometimes|nullable|min:6|confirmed',
- 'file' => 'sometimes|nullable|max:100000|mimes:png,svg,jpeg,gif,jpg,bmp'
];
}
diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.php
index b06bbcc10967..98be784d6d11 100644
--- a/app/Transformers/AccountTransformer.php
+++ b/app/Transformers/AccountTransformer.php
@@ -27,9 +27,6 @@ use App\Utils\Traits\MakesHash;
class AccountTransformer extends EntityTransformer
{
use MakesHash;
- /**
- * @SWG\Property(property="account_key", type="string", example="123456")
- */
/**
* @var array
diff --git a/app/Transformers/ClientContactLoginTransformer.php b/app/Transformers/ClientContactLoginTransformer.php
index f476f9ddffb4..2c0bcad70944 100644
--- a/app/Transformers/ClientContactLoginTransformer.php
+++ b/app/Transformers/ClientContactLoginTransformer.php
@@ -16,8 +16,6 @@ use App\Utils\Traits\MakesHash;
/**
* Class ContactTransformer.
- *
- * @SWG\Definition(definition="ClientContact", @SWG\Xml(name="ClientContact"))
*/
class ClientContactLoginTransformer extends EntityTransformer
{
diff --git a/app/Transformers/ClientContactTransformer.php b/app/Transformers/ClientContactTransformer.php
index 58c5059ca36d..dd2aa0cb3714 100644
--- a/app/Transformers/ClientContactTransformer.php
+++ b/app/Transformers/ClientContactTransformer.php
@@ -17,7 +17,6 @@ use App\Utils\Traits\MakesHash;
/**
* Class ContactTransformer.
*
- * @SWG\Definition(definition="ClientContact", @SWG\Xml(name="ClientContact"))
*/
class ClientContactTransformer extends EntityTransformer
{
diff --git a/app/Transformers/ClientTransformer.php b/app/Transformers/ClientTransformer.php
index 1a670d7c7f86..28b140ca1b7b 100644
--- a/app/Transformers/ClientTransformer.php
+++ b/app/Transformers/ClientTransformer.php
@@ -16,14 +16,12 @@ use App\Models\ClientContact;
use App\Utils\Traits\MakesHash;
/**
- * @SWG\Definition(definition="Client", @SWG\Xml(name="Client"))
+ * class ClientTransformer
*/
class ClientTransformer extends EntityTransformer
{
use MakesHash;
- /**
- * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
- */
+
protected $defaultIncludes = [
'contacts',
];
diff --git a/app/Transformers/CompanyTransformer.php b/app/Transformers/CompanyTransformer.php
index 7ecb61df80af..3b68a686b2ef 100644
--- a/app/Transformers/CompanyTransformer.php
+++ b/app/Transformers/CompanyTransformer.php
@@ -27,10 +27,6 @@ class CompanyTransformer extends EntityTransformer
{
use MakesHash;
- /**
- * @SWG\Property(property="account_key", type="string", example="123456")
- */
-
/**
* @var array
*/
@@ -77,8 +73,6 @@ class CompanyTransformer extends EntityTransformer
'work_phone' => $company->work_phone,
'work_email' => $company->work_email,
'country_id' => (int) $company->country_id,
- 'domain' => $company->domain,
- 'db' => $company->db,
'vat_number' => $company->vat_number,
'id_number' => $company->id_number,
'size_id' => (int) $company->size_id,
diff --git a/app/Transformers/CompanyUserTransformer.php b/app/Transformers/CompanyUserTransformer.php
index 0330c1c11692..015ee0ccea04 100644
--- a/app/Transformers/CompanyUserTransformer.php
+++ b/app/Transformers/CompanyUserTransformer.php
@@ -17,9 +17,6 @@ use App\Models\CompanyUser;
use App\Models\User;
use App\Transformers\CompanyTokenTransformer;
-/**
- * @SWG\Definition(definition="CompanyUser", @SWG\Xml(name="CompanyUser"))
- */
class CompanyUserTransformer extends EntityTransformer
{
diff --git a/app/Transformers/Contact/InvoiceTransformer.php b/app/Transformers/Contact/InvoiceTransformer.php
index 46231ca91d0b..67e63bd5f181 100644
--- a/app/Transformers/Contact/InvoiceTransformer.php
+++ b/app/Transformers/Contact/InvoiceTransformer.php
@@ -15,9 +15,6 @@ use App\Models\Invoice;
use App\Transformers\EntityTransformer;
use App\Utils\Traits\MakesHash;
-/**
- * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
- */
class InvoiceTransformer extends EntityTransformer
{
use MakesHash;
diff --git a/app/Transformers/InvoiceInvitationTransformer.php b/app/Transformers/InvoiceInvitationTransformer.php
index 5e228bda4d88..4f72e513deb1 100644
--- a/app/Transformers/InvoiceInvitationTransformer.php
+++ b/app/Transformers/InvoiceInvitationTransformer.php
@@ -15,9 +15,6 @@ use App\Models\Invoice;
use App\Models\InvoiceInvitation;
use App\Utils\Traits\MakesHash;
-/**
- * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
- */
class InvoiceInvitationTransformer extends EntityTransformer
{
use MakesHash;
diff --git a/app/Transformers/InvoiceItemTransformer.php b/app/Transformers/InvoiceItemTransformer.php
index d3571a94fec1..29e43f58593a 100644
--- a/app/Transformers/InvoiceItemTransformer.php
+++ b/app/Transformers/InvoiceItemTransformer.php
@@ -13,23 +13,7 @@ namespace App\Transformers;
class InvoiceItemTransformer extends EntityTransformer
{
- /**
- * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="product_key", type="string", example="Item")
- * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="notes", type="string", example="Notes")
- * @SWG\Property(property="cost", type="number", format="float", example=10.00)
- * @SWG\Property(property="qty", type="number", format="float", example=1)
- * @SWG\Property(property="tax_name1", type="string", example="VAT")
- * @SWG\Property(property="tax_name2", type="string", example="Upkeep")
- * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
- * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
- * @SWG\Property(property="invoice_item_type_id", type="integer", example=1)
- * @SWG\Property(property="custom_value1", type="string", example="Value")
- * @SWG\Property(property="custom_value2", type="string", example="Value")
- * @SWG\Property(property="discount", type="number", format="float", example=10)
- */
+
public function transform($item)
{
return [
diff --git a/app/Transformers/InvoiceTransformer.php b/app/Transformers/InvoiceTransformer.php
index 7a3030516687..3487b5b32802 100644
--- a/app/Transformers/InvoiceTransformer.php
+++ b/app/Transformers/InvoiceTransformer.php
@@ -14,58 +14,10 @@ namespace App\Transformers;
use App\Models\Invoice;
use App\Utils\Traits\MakesHash;
-/**
- * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
- */
class InvoiceTransformer extends EntityTransformer
{
use MakesHash;
- /**
- * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
- * @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true)
- * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="client_id", type="integer", example=1)
- * @SWG\Property(property="status_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="invoice_number", type="string", example="0001")
- * @SWG\Property(property="discount", type="number", format="float", example=10)
- * @SWG\Property(property="po_number", type="string", example="0001")
- * @SWG\Property(property="invoice_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="terms", type="string", example="sample")
- * @SWG\Property(property="private_notes", type="string", example="Notes")
- * @SWG\Property(property="public_notes", type="string", example="Notes")
- * @SWG\Property(property="invoice_type_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="is_recurring", type="boolean", example=false)
- * @SWG\Property(property="frequency_id", type="integer", example=1)
- * @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true)
- * @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="tax_name1", type="string", example="VAT")
- * @SWG\Property(property="tax_name2", type="string", example="Upkeep")
- * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
- * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
- * @SWG\Property(property="is_amount_discount", type="boolean", example=false)
- * @SWG\Property(property="invoice_footer", type="string", example="Footer")
- * @SWG\Property(property="partial", type="number",format="float", example=10)
- * @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="auto_bill", type="boolean", example=false)
- * @SWG\Property(property="custom_value1", type="number",format="float", example=10)
- * @SWG\Property(property="custom_value2", type="number",format="float", example=10)
- * @SWG\Property(property="custom_taxes1", type="boolean", example=false)
- * @SWG\Property(property="custom_taxes2", type="boolean", example=false)
- * @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="quote_invoice_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value")
- * @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value")
- * @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="is_public", type="boolean", example=false)
- * @SWG\Property(property="filename", type="string", example="Filename", readOnly=true)
- */
+
protected $defaultIncludes = [
// 'invoice_items',
];
diff --git a/app/Transformers/PaymentTransformer.php b/app/Transformers/PaymentTransformer.php
index 96ce0e54a54b..f2f244c621b7 100644
--- a/app/Transformers/PaymentTransformer.php
+++ b/app/Transformers/PaymentTransformer.php
@@ -17,27 +17,10 @@ use App\Models\Invoice;
use App\Models\Payment;
use App\Utils\Traits\MakesHash;
-/**
- * @SWG\Definition(definition="Payment", required={"invoice_id"}, @SWG\Xml(name="Payment"))
- */
class PaymentTransformer extends EntityTransformer
{
use MakesHash;
- /**
- * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
- * @SWG\Property(property="transaction_reference", type="string", example="Transaction Reference")
- * @SWG\Property(property="payment_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="invoice_id", type="integer", example=1)
- * @SWG\Property(property="invoice_number", type="string", example="Invoice Number")
- * @SWG\Property(property="private_notes", type="string", example="Notes")
- * @SWG\Property(property="exchange_rate", type="number", format="float", example=10)
- * @SWG\Property(property="exchange_currency_id", type="integer", example=1)
- */
-
+
protected $serializer;
protected $defaultIncludes = [];
diff --git a/app/Transformers/ProductTransformer.php b/app/Transformers/ProductTransformer.php
index b2e8a8efb96d..3b9c814c85e3 100644
--- a/app/Transformers/ProductTransformer.php
+++ b/app/Transformers/ProductTransformer.php
@@ -16,9 +16,6 @@ use App\Models\Product;
use App\Models\User;
use App\Utils\Traits\MakesHash;
-/**
- * @SWG\Definition(definition="Product", @SWG\Xml(name="Product"))
- */
class ProductTransformer extends EntityTransformer
{
use MakesHash;
diff --git a/app/Transformers/QuoteTransformer.php b/app/Transformers/QuoteTransformer.php
index e59bb4779082..93fb9efafb03 100644
--- a/app/Transformers/QuoteTransformer.php
+++ b/app/Transformers/QuoteTransformer.php
@@ -14,58 +14,10 @@ namespace App\Transformers;
use App\Models\Quote;
use App\Utils\Traits\MakesHash;
-/**
- * @SWG\Definition(definition="quote", required={"quote_number"}, @SWG\Xml(name="quote"))
- */
class QuoteTransformer extends EntityTransformer
{
use MakesHash;
- /**
- * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
- * @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true)
- * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="client_id", type="integer", example=1)
- * @SWG\Property(property="status_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="quote_number", type="string", example="0001")
- * @SWG\Property(property="discount", type="number", format="float", example=10)
- * @SWG\Property(property="po_number", type="string", example="0001")
- * @SWG\Property(property="quote_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="terms", type="string", example="sample")
- * @SWG\Property(property="private_notes", type="string", example="Notes")
- * @SWG\Property(property="public_notes", type="string", example="Notes")
- * @SWG\Property(property="quote_type_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="is_recurring", type="boolean", example=false)
- * @SWG\Property(property="frequency_id", type="integer", example=1)
- * @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true)
- * @SWG\Property(property="recurring_quote_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="tax_name1", type="string", example="VAT")
- * @SWG\Property(property="tax_name2", type="string", example="Upkeep")
- * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
- * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
- * @SWG\Property(property="is_amount_discount", type="boolean", example=false)
- * @SWG\Property(property="quote_footer", type="string", example="Footer")
- * @SWG\Property(property="partial", type="number",format="float", example=10)
- * @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="auto_bill", type="boolean", example=false)
- * @SWG\Property(property="custom_value1", type="number",format="float", example=10)
- * @SWG\Property(property="custom_value2", type="number",format="float", example=10)
- * @SWG\Property(property="custom_taxes1", type="boolean", example=false)
- * @SWG\Property(property="custom_taxes2", type="boolean", example=false)
- * @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="quote_quote_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value")
- * @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value")
- * @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="is_public", type="boolean", example=false)
- * @SWG\Property(property="filename", type="string", example="Filename", readOnly=true)
- */
+
protected $defaultIncludes = [
// 'quote_items',
];
diff --git a/app/Transformers/RecurringInvoiceTransformer.php b/app/Transformers/RecurringInvoiceTransformer.php
index 5d07d9d168e2..a45abe86b1d9 100644
--- a/app/Transformers/RecurringInvoiceTransformer.php
+++ b/app/Transformers/RecurringInvoiceTransformer.php
@@ -15,58 +15,10 @@ use App\Models\Invoice;
use App\Models\RecurringInvoice;
use App\Utils\Traits\MakesHash;
-/**
- * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
- */
class RecurringInvoiceTransformer extends EntityTransformer
{
use MakesHash;
- /**
- * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
- * @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true)
- * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="client_id", type="integer", example=1)
- * @SWG\Property(property="status_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="invoice_number", type="string", example="0001")
- * @SWG\Property(property="discount", type="number", format="float", example=10)
- * @SWG\Property(property="po_number", type="string", example="0001")
- * @SWG\Property(property="invoice_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="terms", type="string", example="sample")
- * @SWG\Property(property="private_notes", type="string", example="Notes")
- * @SWG\Property(property="public_notes", type="string", example="Notes")
- * @SWG\Property(property="invoice_type_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="is_recurring", type="boolean", example=false)
- * @SWG\Property(property="frequency_id", type="integer", example=1)
- * @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true)
- * @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="tax_name1", type="string", example="VAT")
- * @SWG\Property(property="tax_name2", type="string", example="Upkeep")
- * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
- * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
- * @SWG\Property(property="is_amount_discount", type="boolean", example=false)
- * @SWG\Property(property="invoice_footer", type="string", example="Footer")
- * @SWG\Property(property="partial", type="number",format="float", example=10)
- * @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="auto_bill", type="boolean", example=false)
- * @SWG\Property(property="custom_value1", type="number",format="float", example=10)
- * @SWG\Property(property="custom_value2", type="number",format="float", example=10)
- * @SWG\Property(property="custom_taxes1", type="boolean", example=false)
- * @SWG\Property(property="custom_taxes2", type="boolean", example=false)
- * @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="quote_invoice_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value")
- * @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value")
- * @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="is_public", type="boolean", example=false)
- * @SWG\Property(property="filename", type="string", example="Filename", readOnly=true)
- */
+
protected $defaultIncludes = [
// 'invoice_items',
];
diff --git a/app/Transformers/RecurringQuoteTransformer.php b/app/Transformers/RecurringQuoteTransformer.php
index e1dc21b21daf..5739146241cd 100644
--- a/app/Transformers/RecurringQuoteTransformer.php
+++ b/app/Transformers/RecurringQuoteTransformer.php
@@ -15,58 +15,10 @@ use App\Models\Quote;
use App\Models\RecurringQuote;
use App\Utils\Traits\MakesHash;
-/**
- * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
- */
class RecurringQuoteTransformer extends EntityTransformer
{
use MakesHash;
- /**
- * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
- * @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true)
- * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="client_id", type="integer", example=1)
- * @SWG\Property(property="status_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="invoice_number", type="string", example="0001")
- * @SWG\Property(property="discount", type="number", format="float", example=10)
- * @SWG\Property(property="po_number", type="string", example="0001")
- * @SWG\Property(property="invoice_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="terms", type="string", example="sample")
- * @SWG\Property(property="private_notes", type="string", example="Notes")
- * @SWG\Property(property="public_notes", type="string", example="Notes")
- * @SWG\Property(property="invoice_type_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="is_recurring", type="boolean", example=false)
- * @SWG\Property(property="frequency_id", type="integer", example=1)
- * @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true)
- * @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="tax_name1", type="string", example="VAT")
- * @SWG\Property(property="tax_name2", type="string", example="Upkeep")
- * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
- * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
- * @SWG\Property(property="is_amount_discount", type="boolean", example=false)
- * @SWG\Property(property="invoice_footer", type="string", example="Footer")
- * @SWG\Property(property="partial", type="number",format="float", example=10)
- * @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01")
- * @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="auto_bill", type="boolean", example=false)
- * @SWG\Property(property="custom_value1", type="number",format="float", example=10)
- * @SWG\Property(property="custom_value2", type="number",format="float", example=10)
- * @SWG\Property(property="custom_taxes1", type="boolean", example=false)
- * @SWG\Property(property="custom_taxes2", type="boolean", example=false)
- * @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="quote_invoice_id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value")
- * @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value")
- * @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true)
- * @SWG\Property(property="is_public", type="boolean", example=false)
- * @SWG\Property(property="filename", type="string", example="Filename", readOnly=true)
- */
+
protected $defaultIncludes = [
// 'invoice_items',
];
diff --git a/app/Transformers/UserTransformer.php b/app/Transformers/UserTransformer.php
index b4f7a50a13d0..79e9140a9bac 100644
--- a/app/Transformers/UserTransformer.php
+++ b/app/Transformers/UserTransformer.php
@@ -21,33 +21,10 @@ use App\Transformers\CompanyTransformer;
use App\Transformers\CompanyUserTransformer;
use App\Utils\Traits\MakesHash;
-/**
- * @SWG\Definition(definition="User", @SWG\Xml(name="User"))
- */
class UserTransformer extends EntityTransformer
{
use MakesHash;
- /**
- * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
- * @SWG\Property(property="first_name", type="string", example="John")
- * @SWG\Property(property="last_name", type="string", example="Doe")
- * @SWG\Property(property="email", type="string", example="johndoe@isp.com")
- * @SWG\Property(property="account_key", type="string", example="123456")
- * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="deleted_at", type="integer", example=1451160233, readOnly=true)
- * @SWG\Property(property="phone", type="string", example="(212) 555-1212")
- * @SWG\Property(property="registered", type="boolean", example=false)
- * @SWG\Property(property="confirmed", type="boolean", example=false)
- * @SWG\Property(property="oauth_user_id", type="integer", example=1)
- * @SWG\Property(property="oauth_provider_id", type="integer", example=1)
- * @SWG\Property(property="notify_sent", type="boolean", example=false)
- * @SWG\Property(property="notify_viewed", type="boolean", example=false)
- * @SWG\Property(property="notify_paid", type="boolean", example=false)
- * @SWG\Property(property="notify_approved", type="boolean", example=false)
- * @SWG\Property(property="is_admin", type="boolean", example=false)
- * @SWG\Property(property="permissions", type="integer", example=1)
- */
-
+
/**
* @var array
*/
diff --git a/database/migrations/2014_10_13_000000_create_users_table.php b/database/migrations/2014_10_13_000000_create_users_table.php
index 6cba4af54fc1..fb1e8f38db94 100644
--- a/database/migrations/2014_10_13_000000_create_users_table.php
+++ b/database/migrations/2014_10_13_000000_create_users_table.php
@@ -263,6 +263,7 @@ class CreateUsersTable extends Migration
$table->string('website')->nullable();
$table->text('private_notes')->nullable();
$table->text('client_hash')->nullable();
+ $table->string('logo', 255)->nullable();
$table->decimal('balance', 13, 2)->nullable();
$table->decimal('paid_to_date', 13, 2)->nullable();
diff --git a/phpunit.xml b/phpunit.xml
index 515b5981ef0d..e0efb4ff5a55 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -38,6 +38,14 @@