fix billing process

This commit is contained in:
Dennis Eichhorn 2023-04-08 04:36:25 +02:00
parent 6a1693debf
commit 6922d3c5d3
3 changed files with 18 additions and 12 deletions

View File

@ -8,9 +8,11 @@ assignees: ''
---
# Bug Description
A clear and concise description of what the bug is.
# How to Reproduce
Steps to reproduce the behavior:
1. Go to '...'
@ -19,16 +21,20 @@ Steps to reproduce the behavior:
4. See error
# Expected Behavior
A clear and concise description of what you expected to happen.
# Screenshots
If applicable, add screenshots to help explain your problem.
# System Information
- System: [e.g. PC or iPhone11, ...]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- KarakaVersion [e.g. 22]
- System: [e.g. PC or iPhone11, ...]
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- KarakaVersion [e.g. 22]
# Additional Information
Add any other context about the problem here.

View File

@ -81,10 +81,10 @@ final class ApiController extends Controller
private function validateContractCreate(RequestAbstract $request) : array
{
$val = [];
if (($val['title'] = empty($request->getData('title')))
|| ($val['start'] = empty($request->getData('start')))
|| ($val['duration'] = empty($request->getData('duration')))
|| ($val['type'] = empty($request->getData('type')))
if (($val['title'] = !$request->hasData('title'))
|| ($val['start'] = !$request->hasData('start'))
|| ($val['duration'] = !$request->hasData('duration'))
|| ($val['type'] = !$request->hasData('type'))
) {
return $val;
}
@ -232,7 +232,7 @@ final class ApiController extends Controller
private function validateContractTypeCreate(RequestAbstract $request) : array
{
$val = [];
if (($val['title'] = empty($request->getData('title')))
if (($val['title'] = !$request->hasData('title'))
) {
return $val;
}
@ -299,8 +299,8 @@ final class ApiController extends Controller
private function validateContractTypeL11nCreate(RequestAbstract $request) : array
{
$val = [];
if (($val['title'] = empty($request->getData('title')))
|| ($val['type'] = empty($request->getData('type')))
if (($val['title'] = !$request->hasData('title'))
|| ($val['type'] = !$request->hasData('type'))
) {
return $val;
}

View File

@ -72,7 +72,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
$permission = new AccountPermission();
$permission->setUnit(1);
$permission->setApp('backend');
$permission->setApp(2);
$permission->setPermission(
PermissionType::READ
| PermissionType::CREATE