mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 10:54:36 -04: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',
|
'invoice_task_project',
|
||||||
'report_include_deleted',
|
'report_include_deleted',
|
||||||
'invoice_task_lock',
|
'invoice_task_lock',
|
||||||
'use_vendor_currency',
|
|
||||||
'convert_payment_currency',
|
'convert_payment_currency',
|
||||||
'convert_expense_currency',
|
'convert_expense_currency',
|
||||||
];
|
];
|
||||||
|
@ -191,7 +191,6 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'invoice_task_project' => (bool) $company->invoice_task_project,
|
'invoice_task_project' => (bool) $company->invoice_task_project,
|
||||||
'report_include_deleted' => (bool) $company->report_include_deleted,
|
'report_include_deleted' => (bool) $company->report_include_deleted,
|
||||||
'invoice_task_lock' => (bool) $company->invoice_task_lock,
|
'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_payment_currency' => (bool) $company->convert_payment_currency,
|
||||||
'convert_expense_currency' => (bool) $company->convert_expense_currency,
|
'convert_expense_currency' => (bool) $company->convert_expense_currency,
|
||||||
];
|
];
|
||||||
|
@ -14,6 +14,12 @@ return new class extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
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::query()->whereNull('currency_id')->orWhere('currency_id', '')->cursor()->each(function ($vendor){
|
||||||
|
|
||||||
$vendor->currency_id = $vendor->company->settings->currency_id;
|
$vendor->currency_id = $vendor->company->settings->currency_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user