mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Drop use_vendor_currency column from companies
This commit is contained in:
parent
d61620bcf6
commit
a25711b5eb
@ -127,7 +127,6 @@ class Company extends BaseModel
|
||||
'invoice_task_project',
|
||||
'report_include_deleted',
|
||||
'invoice_task_lock',
|
||||
'use_vendor_currency',
|
||||
'convert_payment_currency',
|
||||
'convert_expense_currency',
|
||||
];
|
||||
|
@ -191,7 +191,6 @@ class CompanyTransformer extends EntityTransformer
|
||||
'invoice_task_project' => (bool) $company->invoice_task_project,
|
||||
'report_include_deleted' => (bool) $company->report_include_deleted,
|
||||
'invoice_task_lock' => (bool) $company->invoice_task_lock,
|
||||
'use_vendor_currency' => (bool) $company->use_vendor_currency,
|
||||
'convert_payment_currency' => (bool) $company->convert_payment_currency,
|
||||
'convert_expense_currency' => (bool) $company->convert_expense_currency,
|
||||
];
|
||||
|
@ -14,6 +14,12 @@ return new class extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
|
||||
Schema::table('companies', function (Blueprint $table)
|
||||
{
|
||||
$table->dropColumn('use_vendor_currency');
|
||||
});
|
||||
|
||||
Vendor::query()->whereNull('currency_id')->orWhere('currency_id', '')->cursor()->each(function ($vendor){
|
||||
|
||||
$vendor->currency_id = $vendor->company->settings->currency_id;
|
||||
|
Loading…
Reference in New Issue
Block a user