mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Minor fixes for imports
This commit is contained in:
parent
f05fb9938e
commit
121c9d2cfd
@ -887,6 +887,7 @@ class CompanyImport implements ShouldQueue
|
|||||||
[
|
[
|
||||||
'hashed_id',
|
'hashed_id',
|
||||||
'company_id',
|
'company_id',
|
||||||
|
'backup',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
['users' => 'user_id'],
|
['users' => 'user_id'],
|
||||||
@ -1192,6 +1193,10 @@ class CompanyImport implements ShouldQueue
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(array_key_exists('deleted_at', $obj_array) && $obj_array['deleted_at'] > 1){
|
||||||
|
$obj_array['deleted_at'] = now();
|
||||||
|
}
|
||||||
|
|
||||||
$activity_invitation_key = false;
|
$activity_invitation_key = false;
|
||||||
|
|
||||||
if($class == 'App\Models\Activity'){
|
if($class == 'App\Models\Activity'){
|
||||||
@ -1270,6 +1275,10 @@ class CompanyImport implements ShouldQueue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(array_key_exists('deleted_at', $obj_array) && $obj_array['deleted_at'] > 1){
|
||||||
|
$obj_array['deleted_at'] = now();
|
||||||
|
}
|
||||||
|
|
||||||
/* New to convert product ids from old hashes to new hashes*/
|
/* New to convert product ids from old hashes to new hashes*/
|
||||||
if($class == 'App\Models\Subscription'){
|
if($class == 'App\Models\Subscription'){
|
||||||
$obj_array['product_ids'] = $this->recordProductIds($obj_array['product_ids']);
|
$obj_array['product_ids'] = $this->recordProductIds($obj_array['product_ids']);
|
||||||
@ -1320,6 +1329,10 @@ class CompanyImport implements ShouldQueue
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(array_key_exists('deleted_at', $obj_array) && $obj_array['deleted_at'] > 1){
|
||||||
|
$obj_array['deleted_at'] = now();
|
||||||
|
}
|
||||||
|
|
||||||
/* New to convert product ids from old hashes to new hashes*/
|
/* New to convert product ids from old hashes to new hashes*/
|
||||||
if($class == 'App\Models\Subscription'){
|
if($class == 'App\Models\Subscription'){
|
||||||
//$obj_array['product_ids'] = $this->recordProductIds($obj_array['product_ids']);
|
//$obj_array['product_ids'] = $this->recordProductIds($obj_array['product_ids']);
|
||||||
|
@ -82,6 +82,9 @@ class MarkPaid extends AbstractService
|
|||||||
->updateBalance($payment->amount * -1)
|
->updateBalance($payment->amount * -1)
|
||||||
->updatePaidToDate($payment->amount)
|
->updatePaidToDate($payment->amount)
|
||||||
->setStatus(Invoice::STATUS_PAID)
|
->setStatus(Invoice::STATUS_PAID)
|
||||||
|
->save();
|
||||||
|
|
||||||
|
$this->invoice->service()
|
||||||
->applyNumber()
|
->applyNumber()
|
||||||
->deletePdf()
|
->deletePdf()
|
||||||
->save();
|
->save();
|
||||||
@ -103,7 +106,10 @@ class MarkPaid extends AbstractService
|
|||||||
->updatePaidToDate($payment->amount)
|
->updatePaidToDate($payment->amount)
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
$this->invoice->service()->workFlow()->save();
|
$this->invoice
|
||||||
|
->service()
|
||||||
|
->workFlow()
|
||||||
|
->save();
|
||||||
|
|
||||||
return $this->invoice;
|
return $this->invoice;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user