diff --git a/Admin/Install/db.json b/Admin/Install/db.json index aceaa83..6bc02cc 100755 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -12,8 +12,7 @@ "accounting_account_code": { "name": "accounting_account_code", "type": "VARCHAR(50)", - "null": false, - "unique": true + "null": false }, "accounting_account_type": { "name": "accounting_account_type", diff --git a/Admin/Installer.php b/Admin/Installer.php index 66c4834..9d44c2b 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -148,13 +148,13 @@ final class Installer extends InstallerAbstract $response = new HttpResponse(); $request = new HttpRequest(); - // @todo define default account number format for clients, if number -> consider number as starting value - // @todo define default account number format for suppliers, if number -> consider number as starting value + // @feature Create a way to let admins create a default account format for clients/suppliers + // https://github.com/Karaka-Management/oms-Accounting/issues/8 $request->header->account = 1; $request->setData('code', $person->number); $request->setData('content', \rtrim($person->account->name1 . ' ' . $person->account->name2)); - $request->setData('language', ISO639x1Enum::_EN); // @todo personal accounts shouldn't have a translation?! + $request->setData('language', ISO639x1Enum::_EN); $request->setData('type', $accountType); $request->setData('account', $person->account->id); $module->apiAccountCreate($request, $response); diff --git a/Controller/ApiController.php b/Controller/ApiController.php index e29df4a..1449f1d 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -137,9 +137,11 @@ final class ApiController extends Controller $posting->elements[] = $firstElement; // Second side + // @todo Implement automatic posting of archived bill + // https://github.com/Karaka-Management/oms-Accounting/issues/10 foreach ($new->elements as $element) { - // @todo handle pl account from bill - // @todo handle taxes + // handle pl account from bill + // handle taxes $postingElement = new PostingElement(); $postingElement->createdBy = new NullAccount($account); $postingElement->unit = $posting->unit; @@ -152,10 +154,10 @@ final class ApiController extends Controller $posting->elements[] = $postingElement; } - // @todo check debit === credit - // @todo check bill tax = sum(element.tax) - // @todo check bill net = sum(element.net) - // @todo check bill gross = sum(element.gross) + // check debit === credit + // check bill tax = sum(element.tax) + // check bill net = sum(element.net) + // check bill gross = sum(element.gross) $this->createModel($account, $posting, PostingMapper::class, 'posting-bill', $ip); } @@ -183,8 +185,8 @@ final class ApiController extends Controller $response = new HttpResponse(); $request = new HttpRequest(); - // @todo define default account number format for clients, if number -> consider number as starting value - // @todo define default account number format for suppliers, if number -> consider number as starting value + // @feature Create a way to let admins create a default account format for clients/suppliers + // https://github.com/Karaka-Management/oms-Accounting/issues/8 $request->header->account = $account; $request->setData('code', $new->number); diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 98397a5..215430f 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -527,10 +527,8 @@ final class BackendController extends Controller $view->data['attributeTypes'] = $attributeTypes; // Get item profile image - // It might not be part of the 5 newest item files from above - // @todo It would be nice to have something like this as a default method in the model e.g. - // ItemManagement::getRelations()->with('types')->where(...); - // This should return the relations and NOT the model itself + // @feature Create a new read mapper function that returns relation models instead of its own model + // https://github.com/Karaka-Management/phpOMS/issues/320 $query = new Builder($this->app->dbPool->get()); $results = $query->selectAs(ClientMapper::HAS_MANY['files']['external'], 'file') ->from(ClientMapper::TABLE)