mirror of
https://github.com/Karaka-Management/oms-Accounting.git
synced 2026-02-15 12:08:40 +00:00
Docblock fixes + more tests
This commit is contained in:
parent
e31d7f7997
commit
d5b8b93769
|
|
@ -29,23 +29,4 @@ use phpOMS\Module\UninstallerAbstract;
|
||||||
*/
|
*/
|
||||||
class Uninstaller extends UninstallerAbstract
|
class Uninstaller extends UninstallerAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function uninstall(DatabasePool $dbPool, InfoManager $info) : void
|
|
||||||
{
|
|
||||||
parent::uninstall($dbPool, $info);
|
|
||||||
|
|
||||||
$query = new Builder($dbPool->get());
|
|
||||||
|
|
||||||
$query->prefix($dbPool->get()->getPrefix())->drop(
|
|
||||||
'accounting_posting_ele',
|
|
||||||
'accounting_posting',
|
|
||||||
'accounting_batch',
|
|
||||||
'accounting_account'
|
|
||||||
);
|
|
||||||
|
|
||||||
$dbPool->get()->con->prepare($query->toSql())->execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,22 +36,18 @@ abstract class AccountAbstract
|
||||||
/**
|
/**
|
||||||
* Type.
|
* Type.
|
||||||
*
|
*
|
||||||
* @var \Modules\Accounting\Models\AccountType
|
* @var AccountType
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $type = null;
|
protected $type = AccountType::IMPERSONAL;
|
||||||
|
|
||||||
protected $positiveParent = null;
|
|
||||||
|
|
||||||
protected $negativeParent = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entry list.
|
* Entry list.
|
||||||
*
|
*
|
||||||
* @var \Modules\Accounting\Models\EntryInterface[]
|
* @var EntryInterface[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected $entryList = [];
|
protected $entries = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
|
@ -65,6 +61,13 @@ abstract class AccountAbstract
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get account id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getId() : int
|
public function getId() : int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
|
|
@ -75,12 +78,13 @@ abstract class AccountAbstract
|
||||||
*
|
*
|
||||||
* @param int $id Entry ID
|
* @param int $id Entry ID
|
||||||
*
|
*
|
||||||
* @return void
|
* @return null|EntryInterface
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getEntryById($id)
|
public function getEntryById(int $id) : ?EntryInterface
|
||||||
{
|
{
|
||||||
|
return $this->entries[$id] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -90,31 +94,12 @@ abstract class AccountAbstract
|
||||||
* @param \DateTime $end Interval end
|
* @param \DateTime $end Interval end
|
||||||
* @param int $dateType
|
* @param int $dateType
|
||||||
*
|
*
|
||||||
* @internal \Modules\Accounting\Models\TimeRangeType $dateTime Time range type
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getEntriesByDate($start, $end, $dateType = TimeRangeType::RECEIPT_DATE)
|
public function getEntriesByDate(\DateTime $start, \DateTime $end, int $dateType = TimeRangeType::RECEIPT_DATE) : array
|
||||||
{
|
{
|
||||||
}
|
return [];
|
||||||
|
|
||||||
public function getPositiveParent()
|
|
||||||
{
|
|
||||||
return $this->positiveParent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setPositiveParent($parent)
|
|
||||||
{
|
|
||||||
$this->positiveParent = $parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getNegativeParent()
|
|
||||||
{
|
|
||||||
return $this->negativeParent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setNegativeParent($parent)
|
|
||||||
{
|
|
||||||
$this->negativeParent = $parent;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Accounting\Models;
|
namespace Modules\Accounting\Models;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Balance class.
|
* Balance class.
|
||||||
*
|
*
|
||||||
|
|
@ -43,21 +42,82 @@ class Balance
|
||||||
private $balance = [];
|
private $balance = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Balance name.
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
private $name = '';
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Balance description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $description = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get balance id
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getId()
|
public function getId() : int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*
|
||||||
|
* @param string $name Balance name
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setName(string $name) : void
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getName() : string
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set description
|
||||||
|
*
|
||||||
|
* @param string $description Balance description
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setDescription(string $description) : void
|
||||||
|
{
|
||||||
|
$this->description = $description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get description
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getDescription() : string
|
||||||
|
{
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class BatchPosting implements \Countable
|
||||||
/**
|
/**
|
||||||
* Postings.
|
* Postings.
|
||||||
*
|
*
|
||||||
* @var \Modules\Accounting\Models\PostingAbstract[]
|
* @var PostingAbstract[]
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $postings = [];
|
private $postings = [];
|
||||||
|
|
@ -82,7 +82,7 @@ class BatchPosting implements \Countable
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getId()
|
public function getId() : int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
@ -108,7 +108,7 @@ class BatchPosting implements \Countable
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setDescription(string $desc)
|
public function setDescription(string $desc) : void
|
||||||
{
|
{
|
||||||
$this->description = $desc;
|
$this->description = $desc;
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +146,7 @@ class BatchPosting implements \Countable
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setCreator($creator)
|
public function setCreator($creator) : void
|
||||||
{
|
{
|
||||||
$this->creator = $creator;
|
$this->creator = $creator;
|
||||||
}
|
}
|
||||||
|
|
@ -156,13 +156,13 @@ class BatchPosting implements \Countable
|
||||||
*
|
*
|
||||||
* @param int $id Posting ID
|
* @param int $id Posting ID
|
||||||
*
|
*
|
||||||
* @return \Modules\Accounting\Models\PostingAbstract
|
* @return null|PostingAbstract
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getPosting($id)
|
public function getPosting(int $id) : ?PostingAbstract
|
||||||
{
|
{
|
||||||
return $this->postings[$id];
|
return $this->postings[$id] ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -170,25 +170,31 @@ class BatchPosting implements \Countable
|
||||||
*
|
*
|
||||||
* @param int $id Posting ID
|
* @param int $id Posting ID
|
||||||
*
|
*
|
||||||
* @return void
|
* @return bool
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function removePosting($id)
|
public function removePosting($id) : bool
|
||||||
{
|
{
|
||||||
|
if (!isset($this->postings[$id])) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
unset($this->postings[$id]);
|
unset($this->postings[$id]);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add posting.
|
* Add posting.
|
||||||
*
|
*
|
||||||
* @param \Modules\Accounting\Models\PostingAbstract $posting Posting
|
* @param PostingAbstract $posting Posting
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function addPosting($posting)
|
public function addPosting(PostingAbstract $posting) : void
|
||||||
{
|
{
|
||||||
$this->postings[] = $posting;
|
$this->postings[] = $posting;
|
||||||
}
|
}
|
||||||
|
|
@ -196,7 +202,7 @@ class BatchPosting implements \Countable
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function count()
|
public function count() : int
|
||||||
{
|
{
|
||||||
return count($this->postings);
|
return count($this->postings);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,148 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package Modules\Accounting\Models
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Accounting\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BatchPosting class.
|
||||||
|
*
|
||||||
|
* @package Modules\Accounting\Models
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class CostCenter
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* ID.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $id = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Code.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $code = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $name = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $description = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get balance id
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getId() : int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set code
|
||||||
|
*
|
||||||
|
* @param string $code Balance code
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setCode(string $code) : void
|
||||||
|
{
|
||||||
|
$this->code = $code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get code
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getCode() : string
|
||||||
|
{
|
||||||
|
return $this->code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*
|
||||||
|
* @param string $name Balance name
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setName(string $name) : void
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getName() : string
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set description
|
||||||
|
*
|
||||||
|
* @param string $description Balance description
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setDescription(string $description) : void
|
||||||
|
{
|
||||||
|
$this->description = $description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get description
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getDescription() : string
|
||||||
|
{
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,148 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.2
|
||||||
|
*
|
||||||
|
* @package Modules\Accounting\Models
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\Accounting\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BatchPosting class.
|
||||||
|
*
|
||||||
|
* @package Modules\Accounting\Models
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://website.orange-management.de
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class CostObject
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* ID.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $id = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Code.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $code = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $name = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $description = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get balance id
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getId() : int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set code
|
||||||
|
*
|
||||||
|
* @param string $code Balance code
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setCode(string $code) : void
|
||||||
|
{
|
||||||
|
$this->code = $code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get code
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getCode() : string
|
||||||
|
{
|
||||||
|
return $this->code;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*
|
||||||
|
* @param string $name Balance name
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setName(string $name) : void
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getName() : string
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set description
|
||||||
|
*
|
||||||
|
* @param string $description Balance description
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setDescription(string $description) : void
|
||||||
|
{
|
||||||
|
$this->description = $description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get description
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getDescription() : string
|
||||||
|
{
|
||||||
|
return $this->description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -14,6 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Accounting\Models;
|
namespace Modules\Accounting\Models;
|
||||||
|
|
||||||
|
use Modules\Admin\Models\Account;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creditor class.
|
* Creditor class.
|
||||||
*
|
*
|
||||||
|
|
@ -26,11 +28,42 @@ class Creditor
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Creditor ID.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected $id = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Account.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected $account = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function getId() : int
|
||||||
{
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get account.
|
||||||
|
*
|
||||||
|
* @return null|int|Account
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getAccount()
|
||||||
|
{
|
||||||
|
return $this->account;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.2
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Modules\Accounting\Models;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creditor account class.
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
abstract class CreditorAccount extends PersonalAccountAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getPDO()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getDefault()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -14,6 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Accounting\Models;
|
namespace Modules\Accounting\Models;
|
||||||
|
|
||||||
|
use Modules\Admin\Models\Account;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Debitor class.
|
* Debitor class.
|
||||||
*
|
*
|
||||||
|
|
@ -26,11 +28,42 @@ class Debitor
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Debitor ID.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected $id = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Account.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected $account = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function getId() : int
|
||||||
{
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get account.
|
||||||
|
*
|
||||||
|
* @return null|int|Account
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getAccount()
|
||||||
|
{
|
||||||
|
return $this->account;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.2
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Modules\Accounting\Models;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DebitorAccount class.
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
abstract class DebitorAccount extends PersonalAccountAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getDSO()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getDefault()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getNetReceivable()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.2
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Modules\Accounting\Models;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ImpersonalAccount class.
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class ImpersonalAccount
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.2
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Modules\Accounting\Models;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Invoice posting simple class.
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
abstract class InvoicePostingSimple extends PostingAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.2
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
*/
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Modules\Accounting\Models;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ImpersonalAccount class.
|
|
||||||
*
|
|
||||||
* @package Modules\Accounting\Models
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://website.orange-management.de
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
abstract class PersonalAccountAbstract extends AccountAbstract
|
|
||||||
{
|
|
||||||
public function __construct(int $id)
|
|
||||||
{
|
|
||||||
parent::__construct($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getBalance()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getAccountsReceivable()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getAccountsPayable()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getAccountsHistory($start, $end)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user