mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 20:52:56 +01:00
Add tax calculations for quotes
This commit is contained in:
parent
5ad1b2f19f
commit
b6d429e336
@ -132,6 +132,8 @@ class CreditTransformer extends EntityTransformer
|
||||
'paid_to_date' => (float) $credit->paid_to_date,
|
||||
'subscription_id' => $this->encodePrimaryKey($credit->subscription_id),
|
||||
'invoice_id' => $credit->invoice_id ? $this->encodePrimaryKey($credit->invoice_id) : '',
|
||||
'tax_info' => $credit->tax_data ?: new \stdClass(),
|
||||
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -149,6 +149,7 @@ class PurchaseOrderTransformer extends EntityTransformer
|
||||
'subscription_id' => $this->encodePrimaryKey($purchase_order->subscription_id),
|
||||
'expense_id' => $this->encodePrimaryKey($purchase_order->expense_id),
|
||||
'currency_id' => $purchase_order->currency_id ? (string) $purchase_order->currency_id : '',
|
||||
'tax_info' => $purchase_order->tax_data ?: new \stdClass(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ class QuoteTransformer extends EntityTransformer
|
||||
'paid_to_date' => (float) $quote->paid_to_date,
|
||||
'project_id' => $this->encodePrimaryKey($quote->project_id),
|
||||
'subscription_id' => $this->encodePrimaryKey($quote->subscription_id),
|
||||
|
||||
'tax_info' => $quote->tax_data ?: new \stdClass(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
|
||||
Schema::table('quotes', function (Blueprint $table) {
|
||||
$table->mediumText('tax_data')->nullable(); //json object
|
||||
});
|
||||
|
||||
Schema::table('credits', function (Blueprint $table) {
|
||||
$table->mediumText('tax_data')->nullable(); //json object
|
||||
});
|
||||
|
||||
Schema::table('purchase_orders', function (Blueprint $table) {
|
||||
$table->mediumText('tax_data')->nullable(); //json object
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
|
||||
}
|
||||
};
|
12976
openapi/api-docs.yaml
12976
openapi/api-docs.yaml
File diff suppressed because it is too large
Load Diff
@ -16,10 +16,6 @@
|
||||
description: 'The associated project_id'
|
||||
type: string
|
||||
example: 'Opnel5aKBz'
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: 'Opnel5aKBz'
|
||||
client_id:
|
||||
description: 'The client hashed id'
|
||||
type: string
|
||||
|
@ -14,11 +14,6 @@
|
||||
description: 'The assigned user hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
readOnly: true
|
||||
client_id:
|
||||
description: 'The client hashed id'
|
||||
type: string
|
||||
|
@ -15,11 +15,6 @@
|
||||
description: 'The assigned user hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
readOnly: true
|
||||
client_id:
|
||||
description: 'The client hashed id'
|
||||
type: string
|
||||
|
@ -6,11 +6,6 @@
|
||||
description: 'The hashed product ID.'
|
||||
example: eP01N
|
||||
readOnly: true
|
||||
company_id:
|
||||
type: string
|
||||
description: 'The hashed ID of the company that owns this product.'
|
||||
example: eP01N
|
||||
readOnly: true
|
||||
user_id:
|
||||
type: string
|
||||
description: 'The hashed ID of the user that created this product.'
|
||||
|
@ -12,10 +12,6 @@
|
||||
description: 'The unique hashed identifier for the user assigned to the purchase order'
|
||||
type: string
|
||||
example: ''
|
||||
company_id:
|
||||
description: 'The unique hashed identifier for the company associated with the purchase order'
|
||||
type: string
|
||||
example: ''
|
||||
vendor_id:
|
||||
description: 'The unique hashed identifier for the vendor associated with the purchase order'
|
||||
type: string
|
||||
|
@ -12,10 +12,6 @@
|
||||
description: 'The unique hashed identifier for the user assigned to the quote'
|
||||
type: string
|
||||
example: ''
|
||||
company_id:
|
||||
description: 'The unique hashed identifier for the company associated with the quote'
|
||||
type: string
|
||||
example: ''
|
||||
client_id:
|
||||
description: 'The unique hashed identifier for the client associated with the quote'
|
||||
type: string
|
||||
|
@ -12,10 +12,6 @@
|
||||
description: 'The hashed id of the user assigned to this recurring expense'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
company_id:
|
||||
description: 'The hashed id of the company'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
client_id:
|
||||
description: 'The hashed id of the client'
|
||||
type: string
|
||||
|
@ -12,10 +12,6 @@
|
||||
description: 'The assigned user hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
client_id:
|
||||
description: 'The client hashed id'
|
||||
type: string
|
||||
|
@ -12,10 +12,6 @@
|
||||
description: 'The assigned user hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
client_id:
|
||||
description: 'The client hashed id'
|
||||
type: string
|
||||
|
@ -12,10 +12,6 @@
|
||||
description: Unique identifier for the product associated with the subscription
|
||||
type: string
|
||||
example: Pr5Ft7yBmC
|
||||
company_id:
|
||||
description: Unique identifier for the company associated with the subscription
|
||||
type: string
|
||||
example: Co7Vn3yLmW
|
||||
recurring_invoice_id:
|
||||
description: Unique identifier for the recurring invoice associated with the subscription
|
||||
type: string
|
||||
|
@ -4,10 +4,6 @@
|
||||
description: 'The account hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
company_id:
|
||||
description: 'The company hashed id'
|
||||
type: string
|
||||
example: AS3df3A
|
||||
user_id:
|
||||
description: 'The user_id hashed id'
|
||||
type: string
|
||||
|
@ -12,10 +12,6 @@
|
||||
description: 'The assigned user of the task'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
company_id:
|
||||
description: 'The hashed id of the company'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
client_id:
|
||||
description: 'The hashed if of the client'
|
||||
type: string
|
||||
|
@ -13,10 +13,6 @@
|
||||
description: 'The hashed id of the assigned user to this vendor. This is a unique identifier for the user.'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
company_id:
|
||||
description: 'The hashed id of the company. This is a unique identifier for the company.'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
contacts:
|
||||
type: array
|
||||
items:
|
||||
|
@ -10,11 +10,6 @@
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
readOnly: true
|
||||
company_id:
|
||||
description: 'The hashed id of the company'
|
||||
type: string
|
||||
example: Opnel5aKBz
|
||||
readOnly: true
|
||||
vendor_id:
|
||||
description: 'The hashed id of the vendor'
|
||||
type: string
|
||||
|
Loading…
Reference in New Issue
Block a user