mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Additional logic for task validation
This commit is contained in:
parent
ae09df0cfd
commit
3081907cad
@ -95,6 +95,14 @@ class StoreTaskRequest extends Request
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($input['project_id']) && isset($input['client_id'])) {
|
||||
$search_project_with_client = Project::withTrashed()->where('id', $input['project_id'])->where('client_id', $input['client_id'])->company()->doesntExist();
|
||||
|
||||
if ($search_project_with_client) {
|
||||
unset($input['project_id']);
|
||||
}
|
||||
}
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
}
|
||||
|
@ -104,6 +104,15 @@ class UpdateTaskRequest extends Request
|
||||
$input['color'] = '';
|
||||
}
|
||||
|
||||
if(isset($input['project_id']) && isset($input['client_id'])){
|
||||
$search_project_with_client = Project::withTrashed()->where('id', $input['project_id'])->where('client_id', $input['client_id'])->company()->doesntExist();
|
||||
|
||||
if($search_project_with_client){
|
||||
unset($input['project_id']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->replace($input);
|
||||
}
|
||||
|
||||
|
@ -356,6 +356,11 @@ class PaymentEmailEngine extends BaseEmailEngine
|
||||
|
||||
}
|
||||
|
||||
if(strlen($invoice_list) < 4){
|
||||
$invoice_list = Number::formatMoney($this->payment->amount, $this->client) ?: ' ';
|
||||
}
|
||||
|
||||
|
||||
return $invoice_list;
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user