mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
Fixes for client / vendor numbering
This commit is contained in:
parent
fc4cbf335a
commit
cde03d132b
@ -203,6 +203,16 @@ trait GenerateMigrationResources
|
|||||||
$clients = [];
|
$clients = [];
|
||||||
|
|
||||||
foreach ($this->account->clients()->withTrashed()->get() as $client) {
|
foreach ($this->account->clients()->withTrashed()->get() as $client) {
|
||||||
|
|
||||||
|
if($this->account->client_number_counter > 0){
|
||||||
|
$number = $client->id_number;
|
||||||
|
$id_number = '';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$id_number = $client->id_number;
|
||||||
|
$number = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
$clients[] = [
|
$clients[] = [
|
||||||
'id' => $client->id,
|
'id' => $client->id,
|
||||||
'company_id' => $client->account_id,
|
'company_id' => $client->account_id,
|
||||||
@ -223,7 +233,8 @@ trait GenerateMigrationResources
|
|||||||
'size_id' => $client->size_id,
|
'size_id' => $client->size_id,
|
||||||
'is_deleted' => $client->is_deleted,
|
'is_deleted' => $client->is_deleted,
|
||||||
'vat_number' => $client->vat_number,
|
'vat_number' => $client->vat_number,
|
||||||
'id_number' => $client->id_number,
|
'id_number' => $id_number,
|
||||||
|
'number' => $number,
|
||||||
'custom_value1' => $client->custom_value1,
|
'custom_value1' => $client->custom_value1,
|
||||||
'custom_value2' => $client->custom_value2,
|
'custom_value2' => $client->custom_value2,
|
||||||
'shipping_address1' => $client->shipping_address1,
|
'shipping_address1' => $client->shipping_address1,
|
||||||
@ -1613,6 +1624,7 @@ trait GenerateMigrationResources
|
|||||||
'is_deleted' => $vendor->is_deleted,
|
'is_deleted' => $vendor->is_deleted,
|
||||||
'vat_number' => $vendor->vat_number,
|
'vat_number' => $vendor->vat_number,
|
||||||
'id_number' => $vendor->id_number,
|
'id_number' => $vendor->id_number,
|
||||||
|
'number' => NULL,
|
||||||
'custom_value1' => $vendor->custom_value1,
|
'custom_value1' => $vendor->custom_value1,
|
||||||
'custom_value2' => $vendor->custom_value2,
|
'custom_value2' => $vendor->custom_value2,
|
||||||
'custom_value3' => '',
|
'custom_value3' => '',
|
||||||
|
Loading…
Reference in New Issue
Block a user