mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fixes for demo
This commit is contained in:
parent
6bc2ca470c
commit
b54c3a5b22
@ -307,6 +307,14 @@ class DemoMode extends Command
|
||||
'client_id' => $client->id,
|
||||
'company_id' => $client->company_id,
|
||||
]);
|
||||
|
||||
Expense::all()->each(function ($expense){
|
||||
|
||||
$expense->number = $this->getNextExpenseNumber($expense);
|
||||
$expense->save();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private function createVendor($client, $assigned_user_id = null)
|
||||
@ -329,15 +337,23 @@ class DemoMode extends Command
|
||||
'company_id' => $client->company_id,
|
||||
'is_primary' => 0,
|
||||
]);
|
||||
|
||||
|
||||
$vendor->id_number = $this->getNextVendorNumber($vendor);
|
||||
$vendor->save();
|
||||
}
|
||||
|
||||
private function createTask($client, $assigned_user_id = null)
|
||||
{
|
||||
$vendor = Task::factory()->create([
|
||||
$task = Task::factory()->create([
|
||||
'user_id' => $client->user->id,
|
||||
'company_id' => $client->company_id,
|
||||
'client_id' => $client->id
|
||||
]);
|
||||
|
||||
$task->number = $this->getNextTaskNumber($task);
|
||||
$task->save();
|
||||
|
||||
}
|
||||
|
||||
private function createProject($client, $assigned_user_id = null)
|
||||
|
@ -98,12 +98,12 @@ class VendorTransformer extends EntityTransformer
|
||||
'custom_value3' => $vendor->custom_value3 ?: '',
|
||||
'custom_value4' => $vendor->custom_value4 ?: '',
|
||||
'is_deleted' => (bool) $vendor->is_deleted,
|
||||
'vat_number' => $vendor->vat_number ?: '',
|
||||
'id_number' => $vendor->id_number ?: '',
|
||||
'vat_number' => (string) $vendor->vat_number ?: '',
|
||||
'id_number' => (string) $vendor->id_number ?: '',
|
||||
'updated_at' => (int) $vendor->updated_at,
|
||||
'archived_at' => (int) $vendor->deleted_at,
|
||||
'created_at' => (int) $vendor->created_at,
|
||||
'number' => (string)$vendor->number ?: '',
|
||||
'number' => (string) $vendor->number ?: '',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user