Fixes for tax_amount when migrating

This commit is contained in:
David Bomba 2024-02-07 12:26:07 +11:00
parent f2b240cb1d
commit b4551a230b
3 changed files with 11 additions and 97 deletions

View File

@ -163,14 +163,14 @@ $x = $this->writer->collection('clients');
$x->addItems($this->export_data['clients']);
$this->export_data = null;
$this->export_data['company'] = $this->company->toArray();
$this->export_data['company']['company_key'] = $this->createHash();
// $this->export_data['company'] = $this->company->toArray();
// $this->export_data['company']['company_key'] = $this->createHash();
$x = $this->writer->collection('company');
$x->addItems($this->export_data['company']);
$this->export_data = null;
$this->writer->value('company', $this->company->toJson(), encode: false);
// $x = $this->writer->collection('company');
// $x->addItems($this->export_data['company']);
// $this->export_data = null;
$this->export_data['company_gateways'] = $this->company->company_gateways()->withTrashed()->cursor()->map(function ($company_gateway) {

View File

@ -1952,6 +1952,10 @@ class Import implements ShouldQueue
$modified['vendor_id'] = $this->transformId('vendors', $resource['vendor_id']);
}
$modified['tax_amount1'] = 0;
$modified['tax_amount2'] = 0;
$modified['tax_amount3'] = 0;
/** @var \App\Models\Expense $expense **/
$expense = Expense::create($modified);

View File

@ -1,90 +0,0 @@
<?xml version="1.0"?>
<psalm
errorLevel="4"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="app" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<issueHandlers>
<MissingPropertyType errorLevel="suppress" />
<TypeDoesNotContainNull errorLevel="suppress" />
<TypeDoesNotContainType errorLevel="suppress" />
<UndefinedFunction>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</UndefinedFunction>
<UndefinedMethod>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</UndefinedMethod>
<UndefinedClass>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</UndefinedClass>
<UndefinedThisPropertyFetch>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</UndefinedThisPropertyFetch>
<UndefinedThisPropertyAssignment>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</UndefinedThisPropertyAssignment>
<InvalidArgument>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</InvalidArgument>
<InvalidScalarArgument>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</InvalidScalarArgument>
<UndefinedMagicPropertyFetch>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</UndefinedMagicPropertyFetch>
<TooManyArguments>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</TooManyArguments>
<RedundantCast>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</RedundantCast>
<InvalidNullableReturnType>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</InvalidNullableReturnType>
<ImplementedReturnTypeMismatch>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</ImplementedReturnTypeMismatch>
<NoInterfaceProperties>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</NoInterfaceProperties>
</issueHandlers>
</psalm>