mirror of
https://github.com/Karaka-Management/oms-InvestmentManagement.git
synced 2026-02-05 07:18:40 +00:00
bug fixes and item management improvements
This commit is contained in:
parent
3dcb46138a
commit
04abf14714
|
|
@ -1,7 +1,7 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
use Modules\InvestmentManagement\Controller\BackendController;
|
||||
use Modules\InvestmentManagement\Models\PermissionState;
|
||||
use Modules\InvestmentManagement\Models\PermissionCategory;
|
||||
use phpOMS\Account\PermissionType;
|
||||
use phpOMS\Router\RouteVerb;
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ return [
|
|||
'permission' => [
|
||||
'module' => BackendController::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::INVESTMENT,
|
||||
'state' => PermissionCategory::INVESTMENT,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
|||
24
Models/Investment.php
Normal file
24
Models/Investment.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
use Modules\Admin\Models\Account;
|
||||
use phpOMS\Business\Finance\DepreciationType;
|
||||
|
||||
class Investment
|
||||
{
|
||||
public int $id = 0;
|
||||
|
||||
public string $name = '';
|
||||
|
||||
public int $depreciationType = DepreciationType::STAIGHT_LINE;
|
||||
|
||||
public array $objects = [];
|
||||
|
||||
/**
|
||||
* Income
|
||||
*/
|
||||
public array $ammortization = [];
|
||||
|
||||
public Account $createdBy;
|
||||
|
||||
public array $attributeTypes = [];
|
||||
}
|
||||
27
Models/InvestmentObject.php
Normal file
27
Models/InvestmentObject.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
use phpOMS\Business\Finance\DepreciationType;
|
||||
|
||||
class InvestmentObject
|
||||
{
|
||||
public int $id = 0;
|
||||
|
||||
public string $productName = '';
|
||||
|
||||
public string $description = '';
|
||||
|
||||
public int $supplier = 0;
|
||||
|
||||
public string $supplierName = '';
|
||||
|
||||
public string $productLink = '';
|
||||
|
||||
/**
|
||||
* Costs / Revenue
|
||||
*/
|
||||
public array $money = [];
|
||||
|
||||
public bool $approved = false;
|
||||
|
||||
public array $attributes = [];
|
||||
}
|
||||
36
Models/InvestmentStatus.php
Normal file
36
Models/InvestmentStatus.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* Karaka
|
||||
*
|
||||
* PHP Version 8.1
|
||||
*
|
||||
* @package Modules\InvestmentManagement\Models
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 2.0
|
||||
* @version 1.0.0
|
||||
* @link https://jingga.app
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\InvestmentManagement\Models;
|
||||
|
||||
use phpOMS\Stdlib\Base\Enum;
|
||||
|
||||
/**
|
||||
* Investment status enum.
|
||||
*
|
||||
* @package Modules\InvestmentManagement\Models
|
||||
* @license OMS License 2.0
|
||||
* @link https://jingga.app
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class InvestmentStatus extends Enum
|
||||
{
|
||||
public const DRAFT = 1;
|
||||
|
||||
public const OPEN = 2;
|
||||
|
||||
public const APPROVED = 3;
|
||||
|
||||
public const DENIED = 4;
|
||||
}
|
||||
22
Models/Money.php
Normal file
22
Models/Money.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
use phpOMS\Business\Finance\DepreciationType;
|
||||
use phpOMS\Stdlib\Base\FloatInt;
|
||||
|
||||
class Money {
|
||||
public int $id = 0;
|
||||
|
||||
public string $name = '';
|
||||
|
||||
public int $depreciationType = DepreciationType::STAIGHT_LINE;
|
||||
|
||||
public int $depreciationDuration = 0;
|
||||
|
||||
public FloatInt $amount;
|
||||
|
||||
public FloatInt $residualValue;
|
||||
|
||||
public MoneyType $moneyType;
|
||||
|
||||
public bool $recurring = false;
|
||||
}
|
||||
16
Models/MoneyType.php
Normal file
16
Models/MoneyType.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
use phpOMS\Localization\BaseStringL11n;
|
||||
|
||||
class MoneyType
|
||||
{
|
||||
public int $id = 0;
|
||||
|
||||
public string $name = '';
|
||||
|
||||
public BaseStringL11n $content;
|
||||
|
||||
public bool $cost = true;
|
||||
|
||||
public bool $recurring = false;
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class PermissionState extends Enum
|
||||
abstract class PermissionCategory extends Enum
|
||||
{
|
||||
public const INVESTMENT = 1;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user