mirror of
https://github.com/Karaka-Management/oms-LoanManagement.git
synced 2026-02-13 08:08:41 +00:00
loan/investment/fleetmgmt fixes
This commit is contained in:
parent
213f7de83a
commit
db366dc7ce
|
|
@ -4,7 +4,7 @@
|
||||||
"pid": "/",
|
"pid": "/",
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Loan",
|
"name": "Loans",
|
||||||
"uri": "{/base}finance/loan/list?{?}",
|
"uri": "{/base}finance/loan/list?{?}",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
|
|
|
||||||
99
Models/Loan.php
Normal file
99
Models/Loan.php
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\LoanManagement\Models
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\LoanManagement\Models;
|
||||||
|
|
||||||
|
use Modules\Admin\Models\Account;
|
||||||
|
use Modules\Admin\Models\NullAccount;
|
||||||
|
use phpOMS\Business\Finance\DepreciationType;
|
||||||
|
use phpOMS\Localization\BaseStringL11nType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loan model.
|
||||||
|
*
|
||||||
|
* @package Modules\LoanManagement\Models
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Loan
|
||||||
|
{
|
||||||
|
public int $id = 0;
|
||||||
|
|
||||||
|
public string $name = '';
|
||||||
|
|
||||||
|
public string $description = '';
|
||||||
|
|
||||||
|
public int $status = LoanStatus::DRAFT;
|
||||||
|
|
||||||
|
public int $amount = 0;
|
||||||
|
|
||||||
|
public int $acquisitionFee = 0;
|
||||||
|
|
||||||
|
public int $disagio = 0;
|
||||||
|
|
||||||
|
public int $nominalBorrowingRate = 0;
|
||||||
|
|
||||||
|
public int $startingRepaymentRate = 0;
|
||||||
|
|
||||||
|
public int $startingRepayment = 0;
|
||||||
|
|
||||||
|
// 0 = end of month
|
||||||
|
public int $dayOfRepayment = 0;
|
||||||
|
|
||||||
|
// monthly, quarterly, annually, end of duration
|
||||||
|
public int $interestInterval = 0;
|
||||||
|
|
||||||
|
public int $interestTaxRate = 0;
|
||||||
|
|
||||||
|
// monthly, quarterly, annually, end of duration
|
||||||
|
public int $repaymentInterval = 0;
|
||||||
|
|
||||||
|
// months
|
||||||
|
public int $duration = 0;
|
||||||
|
|
||||||
|
public int $repaymentFreeTime = 0;
|
||||||
|
|
||||||
|
// Either separate (during the repayment free time) or during the repayment time
|
||||||
|
public int $repaymentFreeInterest = 1;
|
||||||
|
|
||||||
|
public int $residualAmountAfterDuration = 0;
|
||||||
|
|
||||||
|
public int $annualSpecialPayment = 0;
|
||||||
|
|
||||||
|
public bool $isSpecialPaymentAllowed = false;
|
||||||
|
|
||||||
|
public \DateTime $start;
|
||||||
|
|
||||||
|
public \DateTime $end;
|
||||||
|
|
||||||
|
public \DateTime $payout;
|
||||||
|
|
||||||
|
// 0 = not possible
|
||||||
|
public int $interestRateAfterDuration = 0;
|
||||||
|
|
||||||
|
// used to indicate if the interests/payments/taxes are manually adjusted
|
||||||
|
public bool $hasManualInterestAmounts = false;
|
||||||
|
|
||||||
|
public array $interests = [];
|
||||||
|
|
||||||
|
// in and out
|
||||||
|
public array $payments = [];
|
||||||
|
|
||||||
|
public bool $hasManualPaymentAmounts = false;
|
||||||
|
|
||||||
|
public array $taxes = [];
|
||||||
|
|
||||||
|
public bool $hasManualTaxAmounts = false;
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* PHP Version 8.1
|
* PHP Version 8.1
|
||||||
*
|
*
|
||||||
* @package Modules\LoanmentManagement\Models
|
* @package Modules\LoanManagement\Models
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
|
|
@ -12,14 +12,14 @@
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\LoanmentManagement\Models;
|
namespace Modules\LoanManagement\Models;
|
||||||
|
|
||||||
use phpOMS\Stdlib\Base\Enum;
|
use phpOMS\Stdlib\Base\Enum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loanment status enum.
|
* Loanment status enum.
|
||||||
*
|
*
|
||||||
* @package Modules\LoanmentManagement\Models
|
* @package Modules\LoanManagement\Models
|
||||||
* @license OMS License 2.0
|
* @license OMS License 2.0
|
||||||
* @link https://jingga.app
|
* @link https://jingga.app
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
|
@ -28,9 +28,7 @@ abstract class LoanStatus extends Enum
|
||||||
{
|
{
|
||||||
public const DRAFT = 1;
|
public const DRAFT = 1;
|
||||||
|
|
||||||
public const OPEN = 2;
|
public const ACTIVE = 2;
|
||||||
|
|
||||||
public const APPROVED = 3;
|
public const INACTIVE = 3;
|
||||||
|
|
||||||
public const DENIED = 4;
|
|
||||||
}
|
}
|
||||||
|
|
@ -14,5 +14,5 @@ declare(strict_types=1);
|
||||||
|
|
||||||
return ['Navigation' => [
|
return ['Navigation' => [
|
||||||
'List' => 'List',
|
'List' => 'List',
|
||||||
'Loan' => 'Loan',
|
'Loans' => 'Loans',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user