mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-01-28 12:38:40 +00:00
fix client generation
This commit is contained in:
parent
ceafc1ee5f
commit
e26f774052
|
|
@ -1938,7 +1938,7 @@ final class ApiController extends Controller
|
|||
|
||||
// Create client
|
||||
if ($request->hasData('client')) {
|
||||
$client = $this->app->moduleManager->get('ClientManagement')
|
||||
$client = $this->app->moduleManager->get('ClientManagement', 'Api')
|
||||
->findClientForAccount($account->id, $request->getDataInt('unit'));
|
||||
|
||||
if ($client === null) {
|
||||
|
|
@ -1956,7 +1956,7 @@ final class ApiController extends Controller
|
|||
$internalRequest->setData('vat_id', $request->getDataString('vat_id') ?? '');
|
||||
$internalRequest->setData('unit', $request->getDataInt('unit'));
|
||||
|
||||
$this->app->moduleManager->get('ClientManagement')->apiClientCreate($internalRequest, $internalResponse);
|
||||
$this->app->moduleManager->get('ClientManagement', 'Api')->apiClientCreate($internalRequest, $internalResponse);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\Admin\Models;
|
||||
|
||||
use phpOMS\Stdlib\Base\Location;
|
||||
|
||||
/**
|
||||
* Account class.
|
||||
*
|
||||
|
|
@ -61,7 +59,7 @@ class Account extends \phpOMS\Account\Account
|
|||
/**
|
||||
* Location data.
|
||||
*
|
||||
* @var Location[]
|
||||
* @var Address[]
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public array $locations = [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user