mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:34:30 -04:00
Add currency conversion column
This commit is contained in:
parent
e09f160877
commit
fd84e534d9
@ -97,6 +97,7 @@ class Company extends BaseModel
|
|||||||
'use_comma_as_decimal_place',
|
'use_comma_as_decimal_place',
|
||||||
'report_include_drafts',
|
'report_include_drafts',
|
||||||
'client_registration_fields',
|
'client_registration_fields',
|
||||||
|
'convert_rate_to_client',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
|
@ -90,6 +90,7 @@ class Invoice extends BaseModel
|
|||||||
'subscription_id',
|
'subscription_id',
|
||||||
'auto_bill_enabled',
|
'auto_bill_enabled',
|
||||||
'uses_inclusive_taxes',
|
'uses_inclusive_taxes',
|
||||||
|
'vendor_id',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
@ -166,6 +166,7 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'use_comma_as_decimal_place' => (bool) $company->use_comma_as_decimal_place,
|
'use_comma_as_decimal_place' => (bool) $company->use_comma_as_decimal_place,
|
||||||
'report_include_drafts' => (bool) $company->report_include_drafts,
|
'report_include_drafts' => (bool) $company->report_include_drafts,
|
||||||
'client_registration_fields' => (array) $company->client_registration_fields,
|
'client_registration_fields' => (array) $company->client_registration_fields,
|
||||||
|
'convert_rate_to_client' => (bool) $company->convert_rate_to_client,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddClientCurrencyConversionToCompaniesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('companies', function (Blueprint $table) {
|
||||||
|
$table->boolean('convert_rate_to_client')->default(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user