autofixes

This commit is contained in:
Dennis Eichhorn 2020-08-30 20:13:10 +02:00
parent 59eae8f350
commit e091be6a3d
19 changed files with 90 additions and 75 deletions

View File

@ -27,7 +27,10 @@ use phpOMS\Stdlib\Base\Enum;
abstract class AccountType extends Enum
{
public const IMPERSONAL = 0;
public const PERSONAL = 1;
public const CREDITOR = 2;
public const DEBITOR = 4;
}

View File

@ -25,7 +25,7 @@ use phpOMS\Localization\ISO639x1Enum;
* @link https://orange-management.org
* @since 1.0.0
*/
class L11nCostCenter implements ArrayableInterface, \JsonSerializable
class L11nCostCenter implements \JsonSerializable, ArrayableInterface
{
/**
* Article ID.

View File

@ -25,7 +25,7 @@ use phpOMS\Localization\ISO639x1Enum;
* @link https://orange-management.org
* @since 1.0.0
*/
class L11nCostObject implements ArrayableInterface, \JsonSerializable
class L11nCostObject implements \JsonSerializable, ArrayableInterface
{
/**
* Article ID.

View File

@ -27,12 +27,20 @@ use phpOMS\Stdlib\Base\Enum;
abstract class PermissionState extends Enum
{
public const PERSONAL = 1;
public const IMPERSONAL = 2;
public const JOURNAL = 3;
public const STACK = 4;
public const GL = 5;
public const COST_CENTER = 6;
public const COST_OBJECT = 7;
public const ACCOUNT = 8;
public const ENTRY = 9;
}

View File

@ -27,7 +27,10 @@ use phpOMS\Stdlib\Base\Enum;
abstract class TimeRangeType extends Enum
{
public const ENTRY_DATE = 0; /* Date of when the entry happened */
public const DUE_DATE = 1; /* Date of when the entry is due (only for invoices) */
public const RECEIPT_DATE = 2; /* Date of the receipt */
public const ASSOCIATED_DATE = 3; /* Date of the association (e.g. when did the articles arrive) */
}

View File

@ -1,11 +1,11 @@
<template id="entry-list-tpl">
<div id="entry-list" class="box" style="z-index: 99; position: relative; top: 20px; display: block; margin: 0 auto; width: 20%;">
<table class="default">
<caption><?= $this->getHtml('Accounts') ?><i class="fa fa-download floatRight download btn"></i></caption>
<caption><?= $this->getHtml('Accounts'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td class="wf-100"><?= $this->getHtml('Account') ?>
<td class="wf-100"><?= $this->getHtml('Account'); ?>
<tbody>
</table>
</div>

View File

@ -27,18 +27,18 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('CostCenters') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('CostCenters'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<thead>
<tr>
<td><?= $this->getHtml('Code') ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Code'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<tbody>
<?php $count = 0; foreach ($costcenter as $key => $value) : ++$count;
$url = UriFactory::build('{/prefix}tag/single?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Code') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCode()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Code'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCode()); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -27,18 +27,18 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('CostObjects') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('CostObjects'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table class="default">
<thead>
<tr>
<td><?= $this->getHtml('Code') ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Code'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<tbody>
<?php $count = 0; foreach ($costobject as $key => $value) : ++$count;
$url = UriFactory::build('{/prefix}tag/single?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Code') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCode()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Code'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getCode()); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="3" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -29,10 +29,10 @@ $footerView->setResults(1);
<form>
<table class="layout wf-100">
<tr>
<td><label for="iAccountStart"><?= $this->getHtml('Account') ?></label>
<td><label for="iAccountStart"><?= $this->getHtml('CostCenter') ?>
<td><label for="iAccountStart"><?= $this->getHtml('CostObject') ?>
<td><label for="iAccountStart"><?= $this->getHtml('EntryDate') ?>
<td><label for="iAccountStart"><?= $this->getHtml('Account'); ?></label>
<td><label for="iAccountStart"><?= $this->getHtml('CostCenter'); ?>
<td><label for="iAccountStart"><?= $this->getHtml('CostObject'); ?>
<td><label for="iAccountStart"><?= $this->getHtml('EntryDate'); ?>
<tr>
<td><span class="input"><button type="button" id="account-start" formaction="" data-action='[{"type": "popup", "tpl": "entry-list-tpl", "aniIn": "fadeIn", "aniOut": "fadeOut", "stay": 1000}]'><i class="fa fa-book"></i>
</button><input type="number" id="iId" min="1" name="id" required></span>
@ -42,10 +42,10 @@ $footerView->setResults(1);
</button><input type="number" id="iId" min="1" name="id" required></span>
<td><input type="datetime-local" id="iId" min="1" name="id" required>
<tr>
<td><label for="iAccountStart"><?= $this->getHtml('To') ?></label>
<td><label for="iAccountStart"><?= $this->getHtml('To') ?>
<td><label for="iAccountStart"><?= $this->getHtml('To') ?>
<td><label for="iAccountStart"><?= $this->getHtml('To') ?>
<td><label for="iAccountStart"><?= $this->getHtml('To'); ?></label>
<td><label for="iAccountStart"><?= $this->getHtml('To'); ?>
<td><label for="iAccountStart"><?= $this->getHtml('To'); ?>
<td><label for="iAccountStart"><?= $this->getHtml('To'); ?>
<tr>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i>
</button><input type="number" id="iId" min="1" name="id" required></span>
@ -66,9 +66,9 @@ $footerView->setResults(1);
<div class="box w-100">
<div class="tabview tab-2">
<ul class="tab-links">
<li><label for="c-tab2-1"><?= $this->getHtml('List') ?></label></li>
<li><label for="c-tab2-2"><?= $this->getHtml('Evaluation') ?></label></li>
<li><label for="c-tab2-3"><?= $this->getHtml('Charts') ?></label></li>
<li><label for="c-tab2-1"><?= $this->getHtml('List'); ?></label></li>
<li><label for="c-tab2-2"><?= $this->getHtml('Evaluation'); ?></label></li>
<li><label for="c-tab2-3"><?= $this->getHtml('Charts'); ?></label></li>
</ul>
<div class="tab-content">
<input type="radio" id="c-tab2-1" name="tabular-2" checked>
@ -80,19 +80,19 @@ $footerView->setResults(1);
<caption><?= $this->getHtml('Entries'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('EntryDate') ?>
<td><?= $this->getHtml('Receipt') ?>
<td><?= $this->getHtml('Debit') ?>
<td><?= $this->getHtml('Credit') ?>
<td class="wf-100"><?= $this->getHtml('Text') ?>
<td><?= $this->getHtml('Account') ?>
<td><?= $this->getHtml('ContraAccount') ?>
<td><?= $this->getHtml('CostCenter') ?>
<td><?= $this->getHtml('CostObject') ?>
<td><?= $this->getHtml('ReceiptDate') ?>
<td><?= $this->getHtml('ExternalVoucher') ?>
<td><?= $this->getHtml('Creator') ?>
<td><?= $this->getHtml('Created') ?>
<td><?= $this->getHtml('EntryDate'); ?>
<td><?= $this->getHtml('Receipt'); ?>
<td><?= $this->getHtml('Debit'); ?>
<td><?= $this->getHtml('Credit'); ?>
<td class="wf-100"><?= $this->getHtml('Text'); ?>
<td><?= $this->getHtml('Account'); ?>
<td><?= $this->getHtml('ContraAccount'); ?>
<td><?= $this->getHtml('CostCenter'); ?>
<td><?= $this->getHtml('CostObject'); ?>
<td><?= $this->getHtml('ReceiptDate'); ?>
<td><?= $this->getHtml('ExternalVoucher'); ?>
<td><?= $this->getHtml('Creator'); ?>
<td><?= $this->getHtml('Created'); ?>
<tfoot>
<tr>
<td colspan="13">
@ -118,9 +118,9 @@ $footerView->setResults(1);
<caption><?= $this->getHtml('Accounts'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('Account') ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Total') ?>
<td><?= $this->getHtml('Account'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Total'); ?>
<tbody>
<?php $count = 0;
foreach ([] as $key => $value) : ++$count; ?>
@ -138,9 +138,9 @@ $footerView->setResults(1);
<caption><?= $this->getHtml('CostCenter'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('CostCenter') ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Total') ?>
<td><?= $this->getHtml('CostCenter'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Total'); ?>
<tbody>
<?php $count = 0;
foreach ([] as $key => $value) : ++$count; ?>
@ -158,9 +158,9 @@ $footerView->setResults(1);
<caption><?= $this->getHtml('CostObject'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('Account') ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Total') ?>
<td><?= $this->getHtml('Account'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Total'); ?>
<tbody>
<?php $count = 0;
foreach ([] as $key => $value) : ++$count; ?>

View File

@ -15,15 +15,15 @@ declare(strict_types=1);
echo $this->getData('nav')->render(); ?>
<section class="box w-50">
<header><h1><?= $this->getHtml('GL') ?></h1></header>
<header><h1><?= $this->getHtml('GL'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td><label for="iId"><?= $this->getHtml('ID', '0', '0'); ?></label>
<tr><td><input type="text" id="iId" name="id">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input type="text" id="iName" name="name">
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><label for="iParent"><?= $this->getHtml('Parent'); ?></label>
<tr><td><input type="text" id="iParent" name="parent">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</table>

View File

@ -29,11 +29,11 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12">
<div class="box wf-100">
<table class="default">
<caption><?= $this->getHtml('GL') ?><i class="fa fa-download floatRight download btn"></i></caption>
<caption><?= $this->getHtml('GL'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<tfoot>
<tr><td colspan="5">
<tbody>

View File

@ -27,11 +27,11 @@ echo $this->getData('nav')->render(); ?>
<div class="box w-100">
<table class="default">
<caption><?= $this->getHtml('Journal') ?><i class="fa fa-download floatRight download btn"></i></caption>
<caption><?= $this->getHtml('Journal'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<tfoot>
<tr><td colspan="5">
<tbody>

View File

@ -27,13 +27,13 @@ echo $this->getData('nav')->render(); ?>
<div class="box w-100">
<table class="default">
<caption><?= $this->getHtml('BatchPostings') ?><i class="fa fa-download floatRight download btn"></i></caption>
<caption><?= $this->getHtml('BatchPostings'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Creator') ?>
<td><?= $this->getHtml('Created') ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Creator'); ?>
<td><?= $this->getHtml('Created'); ?>
<tfoot>
<tr><td colspan="5">
<tbody>

View File

@ -18,17 +18,17 @@ declare(strict_types=1);
echo $this->getData('nav')->render(); ?>
<section class="box w-50">
<header><h1><?= $this->getHtml('Stack') ?></h1></header>
<header><h1><?= $this->getHtml('Stack'); ?></h1></header>
<div class="inner">
<form>
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input id="iName" name="name" type="text">
<tr><td><label for="iType"><?= $this->getHtml('Type') ?></label>
<tr><td><label for="iType"><?= $this->getHtml('Type'); ?></label>
<tr><td><select id="iType" name="type">
<option value=""><?= $this->getHtml('TAccount') ?>
<option value=""><?= $this->getHtml('Incoming') ?>
<option value=""><?= $this->getHtml('Outgoing') ?>
<option value=""><?= $this->getHtml('TAccount'); ?>
<option value=""><?= $this->getHtml('Incoming'); ?>
<option value=""><?= $this->getHtml('Outgoing'); ?>
</select>
<tr><td><input name="submit" type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
</table>

View File

@ -29,13 +29,13 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12">
<div class="box wf-100">
<table class="default">
<caption><?= $this->getHtml('BatchPostings') ?><i class="fa fa-download floatRight download btn"></i></caption>
<caption><?= $this->getHtml('BatchPostings'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Creator') ?>
<td><?= $this->getHtml('Created') ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Creator'); ?>
<td><?= $this->getHtml('Created'); ?>
<tfoot>
<tr><td colspan="5">
<tbody>

View File

@ -27,14 +27,14 @@ echo $this->getData('nav')->render(); ?>
<div class="box w-100">
<table class="default">
<caption><?= $this->getHtml('BatchPostings') ?><i class="fa fa-download floatRight download btn"></i></caption>
<caption><?= $this->getHtml('BatchPostings'); ?><i class="fa fa-download floatRight download btn"></i></caption>
<thead>
<tr>
<td><?= $this->getHtml('ID', '0', '0'); ?>
<td><?= $this->getHtml('Due') ?>
<td class="wf-100"><?= $this->getHtml('Name') ?>
<td><?= $this->getHtml('Creator') ?>
<td><?= $this->getHtml('Created') ?>
<td><?= $this->getHtml('Due'); ?>
<td class="wf-100"><?= $this->getHtml('Name'); ?>
<td><?= $this->getHtml('Creator'); ?>
<td><?= $this->getHtml('Created'); ?>
<tfoot>
<tr><td colspan="5">
<tbody>

View File

@ -20,6 +20,7 @@ namespace Modules\Accounting\tests\Admin;
class AccountingTest extends \PHPUnit\Framework\TestCase
{
protected const MODULE_NAME = 'Accounting';
protected const URI_LOAD = 'http://127.0.0.1/en/backend/accounting';
use \Modules\tests\ModuleTestTrait;

View File

@ -29,7 +29,7 @@ class CostCenterTest extends \PHPUnit\Framework\TestCase
self::assertEquals('', $cc->getName());
self::assertEquals('', $cc->getCode());
self::assertEquals('', $cc->getDescription());
self::assertEquals(null, $cc->getParent());
self::assertNull($cc->getParent());
}
public function testNameInputOutput() : void

View File

@ -29,7 +29,7 @@ class CostObjectTest extends \PHPUnit\Framework\TestCase
self::assertEquals('', $co->getName());
self::assertEquals('', $co->getCode());
self::assertEquals('', $co->getDescription());
self::assertEquals(null, $co->getParent());
self::assertNull($co->getParent());
}
public function testNameInputOutput() : void