mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Handle restoring a deleted invoice
This commit is contained in:
parent
d3cdfd670f
commit
adab53ed97
@ -94,6 +94,9 @@ class HandleRestore extends AbstractService
|
||||
|
||||
$new_invoice_number = substr($this->invoice->number, 0, $pos);
|
||||
|
||||
if(strlen($new_invoice_number) == 0)
|
||||
$new_invoice_number = null;
|
||||
|
||||
try {
|
||||
$this->invoice->number = $new_invoice_number;
|
||||
$this->invoice->save();
|
||||
|
@ -48,7 +48,7 @@ class ProjectTransformer extends EntityTransformer
|
||||
'assigned_user_id' => (string) $this->encodePrimaryKey($project->assigned_user_id),
|
||||
'client_id' => (string) $this->encodePrimaryKey($project->client_id),
|
||||
'name' => $project->name ?: '',
|
||||
'number' => $project->number,
|
||||
'number' => $project->number ?: '',
|
||||
'created_at' => (int) $project->created_at,
|
||||
'updated_at' => (int) $project->updated_at,
|
||||
'archived_at' => (int) $project->deleted_at,
|
||||
|
Loading…
Reference in New Issue
Block a user