fix tests

This commit is contained in:
Dennis Eichhorn 2022-10-08 21:34:58 +02:00
parent 1843b7fe65
commit 74cf7522b5
8 changed files with 97 additions and 95 deletions

View File

@ -1,4 +1,5 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
use Mpdf\Mpdf;

View File

@ -65,7 +65,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td><select id="iTermsOfDelivery" name="termsofdelivery">
<option>
</select>
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-invoice">
</table>
</form>
</div>
@ -202,7 +202,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td><input type="datetime-local" id="iDue" name="due">
<tr><td><label for="iCashBack2"><?= $this->getHtml('Cashback'); ?> 2</label>
<tr><td><input type="number" id="iCashBack2" name="cashback2">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-invoice">
</table>
</form>
</div>

View File

@ -84,7 +84,7 @@ echo $this->getData('nav')->render(); ?>
</select>
</table>
</div>
<div class="portlet-foot"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>"></div>
<div class="portlet-foot"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-bill"></div>
</form>
</section>
</div>
@ -166,26 +166,26 @@ echo $this->getData('nav')->render(); ?>
<?php foreach ($elements as $element) : ?>
<tr>
<td><i class="fa fa-plus add"></i> <i class="fa fa-chevron-up order-up"></i> <i class="fa fa-chevron-down order-down"></i>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" value="<?= $element->itemNumber; ?>" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input name="" type="text" value="<?= $element->itemNumber; ?>" required></span>
<td><textarea required><?= $element->itemName; ?></textarea>
<td><input type="number" min="0" value="<?= $element->quantity; ?>" required>
<td><input type="text" value="<?= $element->singleSalesPriceNet->getCurrency(); ?>">
<td><input type="number" min="0">
<td><input type="number" min="0" max="100" step="any">
<td><input type="number" min="0" step="any">
<td><input type="number" min="0" step="any">
<td><input name="" type="number" min="0" value="<?= $element->quantity; ?>" required>
<td><input name="" type="text" value="<?= $element->singleSalesPriceNet->getCurrency(); ?>">
<td><input name="" type="number" min="0">
<td><input name="" type="number" min="0" max="100" step="any">
<td><input name="" type="number" min="0" step="any">
<td><input name="" type="number" min="0" step="any">
<td><?= $element->totalSalesPriceNet->getCurrency(); ?>
<?php endforeach; ?>
<tr>
<td><i class="fa fa-plus"></i> <i class="fa fa-chevron-up order-up"></i> <i class="fa fa-chevron-down order-down"></i>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input name="" type="text" required></span>
<td><textarea required></textarea>
<td><input type="number" min="0" value="0" required>
<td><input type="text">
<td><input type="number" min="0">
<td><input type="number" min="0" max="100" step="any">
<td><input type="number" min="0" step="any">
<td><input type="number" min="0" step="any">
<td><input name="" type="number" min="0" value="0" required>
<td><input name="" type="text">
<td><input name="" type="number" min="0">
<td><input name="" type="number" min="0" max="100" step="any">
<td><input name="" type="number" min="0" step="any">
<td><input name="" type="number" min="0" step="any">
<td>
</table>
</div>
@ -258,7 +258,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td><input type="datetime-local" id="iDue" name="due">
<tr><td><label for="iCashBack2"><?= $this->getHtml('Cashback'); ?> 2</label>
<tr><td><input type="number" id="iCashBack2" name="cashback2">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-bill">
</table>
</form>
</div>

View File

@ -136,7 +136,7 @@ echo $this->getData('nav')->render();
}'></canvas>
<div class="more-container">
<input id="more-customer-region" type="checkbox">
<input id="more-customer-region" type="checkbox" name="more-container">
<label for="more-customer-region">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
@ -325,7 +325,7 @@ echo $this->getData('nav')->render();
}'></canvas>
<div class="more-container">
<input id="more-customer-region-annual" type="checkbox">
<input id="more-customer-region-annual" type="checkbox" name="more-container">
<label for="more-customer-region-annual">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
@ -406,7 +406,7 @@ echo $this->getData('nav')->render();
}'></canvas>
<div class="more-container">
<input id="more-customer-region" type="checkbox">
<input id="more-customer-region" type="checkbox" name="more-container">
<label for="more-customer-region">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
@ -595,7 +595,7 @@ echo $this->getData('nav')->render();
}'></canvas>
<div class="more-container">
<input id="more-customer-region-annual" type="checkbox">
<input id="more-customer-region-annual" type="checkbox" name="more-container">
<label for="more-customer-region-annual">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
@ -682,7 +682,7 @@ echo $this->getData('nav')->render();
Sales / Profit - Monthly
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
</div>
<?php $salesCustomer = $this->getData('monthlySalesCustomer'); ?>
<?php $saleCustomer = $this->getData('monthlySaleCustomer'); ?>
<div class="portlet-body">
<canvas id="sales-region" data-chart='{
"type": "bar",
@ -690,7 +690,7 @@ echo $this->getData('nav')->render();
"labels": [
<?php
$temp = [];
foreach ($salesCustomer as $monthly) {
foreach ($saleCustomer as $monthly) {
$temp[] = $monthly['month'] . '/' . \substr((string) $monthly['year'], -2);
}
?>
@ -703,7 +703,7 @@ echo $this->getData('nav')->render();
"data": [
<?php
$temp = [];
foreach ($salesCustomer as $monthly) {
foreach ($saleCustomer as $monthly) {
$temp[] = ((int) $monthly['customers']);
}
?>
@ -721,7 +721,7 @@ echo $this->getData('nav')->render();
"data": [
<?php
$temp = [];
foreach ($salesCustomer as $monthly) {
foreach ($saleCustomer as $monthly) {
$temp[] = ((int) $monthly['net_sales']) / 1000;
}
?>
@ -764,8 +764,8 @@ echo $this->getData('nav')->render();
}
}'></canvas>
<div class="more-container">
<input id="more-scustomer-sales" type="checkbox">
<label for="more-scustomer-sales">
<input id="more-customer-sales" type="checkbox" name="more-container">
<label for="more-customer-sales">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
</label>
@ -781,7 +781,7 @@ echo $this->getData('nav')->render();
<?php
$sum1 = 0;
$sum2 = 0;
foreach ($salesCustomer as $values) :
foreach ($saleCustomer as $values) :
$sum1 += ((int) $values['net_sales']) / 1000;
$sum2 += ((int) $values['customers']);
?>
@ -809,7 +809,7 @@ echo $this->getData('nav')->render();
Sales / Profit - Annual
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
</div>
<?php $salesCustomer = $this->getData('annualSalesCustomer'); ?>
<?php $saleCustomer = $this->getData('annualSaleCustomer'); ?>
<div class="portlet-body">
<canvas id="sales-customer-annual" data-chart='{
"type": "bar",
@ -817,7 +817,7 @@ echo $this->getData('nav')->render();
"labels": [
<?php
$temp = [];
foreach ($salesCustomer as $annual) {
foreach ($saleCustomer as $annual) {
$temp[] = $annual['year'];
}
?>
@ -830,7 +830,7 @@ echo $this->getData('nav')->render();
"data": [
<?php
$temp = [];
foreach ($salesCustomer as $annual) {
foreach ($saleCustomer as $annual) {
$temp[] = ((int) $annual['customers']);
}
?>
@ -848,7 +848,7 @@ echo $this->getData('nav')->render();
"data": [
<?php
$temp = [];
foreach ($salesCustomer as $annual) {
foreach ($saleCustomer as $annual) {
$temp[] = ((int) $annual['net_sales']) / 1000;
}
?>
@ -891,8 +891,8 @@ echo $this->getData('nav')->render();
}
}'></canvas>
<div class="more-container">
<input id="more-scustomer-sales-annual" type="checkbox">
<label for="more-scustomer-sales-annual">
<input id="more-customer-sales-annual" type="checkbox" name="more-container">
<label for="more-customer-sales-annual">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
</label>
@ -906,7 +906,7 @@ echo $this->getData('nav')->render();
<td>Profit %
<tbody>
<?php
foreach ($salesCustomer as $values) :
foreach ($saleCustomer as $values) :
?>
<tr>
<td><?= (string) $values['year']; ?>
@ -979,7 +979,7 @@ echo $this->getData('nav')->render();
</div>
<div class="more-container">
<input id="more-customer-attribute-current" type="checkbox">
<input id="more-customer-attribute-current" type="checkbox" name="more-container">
<label for="more-customer-attribute-current">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
@ -1177,7 +1177,7 @@ echo $this->getData('nav')->render();
</div>
<div class="more-container">
<input id="more-customer-attribute-annual" type="checkbox">
<input id="more-customer-attribute-annual" type="checkbox" name="more-container">
<label for="more-customer-attribute-annual">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
@ -1272,7 +1272,7 @@ echo $this->getData('nav')->render();
</div>
<div class="more-container">
<input id="more-customer-attribute-current" type="checkbox">
<input id="more-customer-attribute-current" type="checkbox" name="more-container">
<label for="more-customer-attribute-current">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
@ -1470,7 +1470,7 @@ echo $this->getData('nav')->render();
</div>
<div class="more-container">
<input id="more-customer-attribute-annual" type="checkbox">
<input id="more-customer-attribute-annual" type="checkbox" name="more-container">
<label for="more-customer-attribute-annual">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
@ -1513,7 +1513,7 @@ echo $this->getData('nav')->render();
Invoices / Articles - Monthly
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
</div>
<?php $salesCustomer = $this->getData('monthlySalesCustomer'); ?>
<?php $saleCustomer = $this->getData('monthlySaleCustomer'); ?>
<div class="portlet-body">
<canvas id="sales-region" data-chart='{
"type": "bar",
@ -1521,7 +1521,7 @@ echo $this->getData('nav')->render();
"labels": [
<?php
$temp = [];
foreach ($salesCustomer as $monthly) {
foreach ($saleCustomer as $monthly) {
$temp[] = $monthly['month'] . '/' . \substr((string) $monthly['year'], -2);
}
?>
@ -1534,7 +1534,7 @@ echo $this->getData('nav')->render();
"data": [
<?php
$temp = [];
foreach ($salesCustomer as $monthly) {
foreach ($saleCustomer as $monthly) {
$temp[] = ((int) $monthly['customers']);
}
?>
@ -1552,7 +1552,7 @@ echo $this->getData('nav')->render();
"data": [
<?php
$temp = [];
foreach ($salesCustomer as $monthly) {
foreach ($saleCustomer as $monthly) {
$temp[] = ((int) $monthly['net_sales']) / 1000;
}
?>
@ -1595,8 +1595,8 @@ echo $this->getData('nav')->render();
}
}'></canvas>
<div class="more-container">
<input id="more-scustomer-sales" type="checkbox">
<label for="more-scustomer-sales">
<input id="more-customer-sales" type="checkbox" name="more-container">
<label for="more-customer-sales">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
</label>
@ -1611,7 +1611,7 @@ echo $this->getData('nav')->render();
<?php
$sum1 = 0;
$sum2 = 0;
foreach ($salesCustomer as $values) :
foreach ($saleCustomer as $values) :
$sum1 += ((int) $values['net_sales']) / 1000;
$sum2 += ((int) $values['customers']);
?>
@ -1639,7 +1639,7 @@ echo $this->getData('nav')->render();
Invoices / Articles - Annual
<?php include __DIR__ . '/../../../../Web/Backend/Themes/popup-export-data.tpl.php'; ?>
</div>
<?php $salesCustomer = $this->getData('annualSalesCustomer'); ?>
<?php $saleCustomer = $this->getData('annualSaleCustomer'); ?>
<div class="portlet-body">
<canvas id="sales-customer-annual" data-chart='{
"type": "bar",
@ -1647,7 +1647,7 @@ echo $this->getData('nav')->render();
"labels": [
<?php
$temp = [];
foreach ($salesCustomer as $annual) {
foreach ($saleCustomer as $annual) {
$temp[] = $annual['year'];
}
?>
@ -1660,7 +1660,7 @@ echo $this->getData('nav')->render();
"data": [
<?php
$temp = [];
foreach ($salesCustomer as $annual) {
foreach ($saleCustomer as $annual) {
$temp[] = ((int) $annual['customers']);
}
?>
@ -1678,7 +1678,7 @@ echo $this->getData('nav')->render();
"data": [
<?php
$temp = [];
foreach ($salesCustomer as $annual) {
foreach ($saleCustomer as $annual) {
$temp[] = ((int) $annual['net_sales']) / 1000;
}
?>
@ -1721,8 +1721,8 @@ echo $this->getData('nav')->render();
}
}'></canvas>
<div class="more-container">
<input id="more-scustomer-sales-annual" type="checkbox">
<label for="more-scustomer-sales-annual">
<input id="more-customer-sales-annual" type="checkbox" name="more-container">
<label for="more-customer-sales-annual">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
</label>
@ -1735,7 +1735,7 @@ echo $this->getData('nav')->render();
<td>Articles
<tbody>
<?php
foreach ($salesCustomer as $values) :
foreach ($saleCustomer as $values) :
?>
<tr>
<td><?= (string) $values['year']; ?>

View File

@ -140,7 +140,7 @@ echo $this->getData('nav')->render();
}'></canvas>
<div class="more-container">
<input id="more-customer-rep-current" type="checkbox">
<input id="more-customer-rep-current" type="checkbox" name="more-container">
<label for="more-customer-rep-current">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>
@ -254,7 +254,7 @@ echo $this->getData('nav')->render();
}'></canvas>
<div class="more-container">
<input id="more-customer-rep-current" type="checkbox">
<input id="more-customer-rep-current" type="checkbox" name="more-container">
<label for="more-customer-rep-current">
<span>Data</span>
<i class="fa fa-chevron-right expand"></i>

View File

@ -80,7 +80,7 @@ echo $this->getData('nav')->render(); ?>
</select>
</table>
</div>
<div class="portlet-foot"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>"></div>
<div class="portlet-foot"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-bill"></div>
</form>
</section>
</div>
@ -122,15 +122,15 @@ echo $this->getData('nav')->render(); ?>
<option>
</select>
<tr><td><label for="iDRecipient"><?= $this->getHtml('Recipient'); ?></label>
<tr><td><input type="text" id="iDRecipient" name="drecipient">
<tr><td><input name="" type="text" id="iDRecipient" name="drecipient">
<tr><td><label for="iAddress"><?= $this->getHtml('Address'); ?></label>
<tr><td><input type="text" id="iAddress" name="address">
<tr><td><input name="" type="text" id="iAddress" name="address">
<tr><td><label for="iZip"><?= $this->getHtml('Zip'); ?></label>
<tr><td><input type="text" id="iZip" name="zip">
<tr><td><input name="" type="text" id="iZip" name="zip">
<tr><td><label for="iCity"><?= $this->getHtml('City'); ?></label>
<tr><td><input type="text" id="iCity" name="city">
<tr><td><input name="" type="text" id="iCity" name="city">
<tr><td><label for="iCountry"><?= $this->getHtml('Country'); ?></label>
<tr><td><input type="text" id="iCountry" name="country">
<tr><td><input name="" type="text" id="iCountry" name="country">
</table>
</form>
</div>
@ -162,26 +162,26 @@ echo $this->getData('nav')->render(); ?>
<?php foreach ($elements as $element) : ?>
<tr>
<td><i class="fa fa-plus add"></i> <i class="fa fa-chevron-up order-up"></i> <i class="fa fa-chevron-down order-down"></i>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" value="<?= $element->itemNumber; ?>" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input name="" type="text" value="<?= $element->itemNumber; ?>" required></span>
<td><textarea required><?= $element->itemName; ?></textarea>
<td><input type="number" min="0" value="<?= $element->quantity; ?>" required>
<td><input type="text" value="<?= $element->singleSalesPriceNet->getCurrency(); ?>">
<td><input type="number" min="0">
<td><input type="number" min="0" max="100" step="any">
<td><input type="number" min="0" step="any">
<td><input type="number" min="0" step="any">
<td><input name="" type="number" min="0" value="<?= $element->quantity; ?>" required>
<td><input name="" type="text" value="<?= $element->singleSalesPriceNet->getCurrency(); ?>">
<td><input name="" type="number" min="0">
<td><input name="" type="number" min="0" max="100" step="any">
<td><input name="" type="number" min="0" step="any">
<td><input name="" type="number" min="0" step="any">
<td><?= $element->totalSalesPriceNet->getCurrency(); ?>
<?php endforeach; ?>
<tr>
<td><i class="fa fa-plus"></i> <i class="fa fa-chevron-up order-up"></i> <i class="fa fa-chevron-down order-down"></i>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input name="" type="text" required></span>
<td><textarea required></textarea>
<td><input type="number" min="0" value="0" required>
<td><input type="text">
<td><input type="number" min="0">
<td><input type="number" min="0" max="100" step="any">
<td><input type="number" min="0" step="any">
<td><input type="number" min="0" step="any">
<td><input name="" type="number" min="0" value="0" required>
<td><input name="" type="text">
<td><input name="" type="number" min="0">
<td><input name="" type="number" min="0" max="100" step="any">
<td><input name="" type="number" min="0" step="any">
<td><input name="" type="number" min="0" step="any">
<td>
</table>
</div>
@ -238,7 +238,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td><input type="datetime-local" id="iDue" name="due">
<tr><td><label for="iCashBack2"><?= $this->getHtml('Cashback'); ?> 2</label>
<tr><td><input type="number" id="iCashBack2" name="cashback2">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-bill">
</table>
</form>
</div>

View File

@ -84,7 +84,7 @@ echo $this->getData('nav')->render(); ?>
</select>
</table>
</div>
<div class="portlet-foot"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>"></div>
<div class="portlet-foot"><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-bill"></div>
</form>
</section>
</div>
@ -165,26 +165,26 @@ echo $this->getData('nav')->render(); ?>
<?php foreach ($elements as $element) : ?>
<tr>
<td><i class="fa fa-plus add"></i> <i class="fa fa-chevron-up order-up"></i> <i class="fa fa-chevron-down order-down"></i>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" value="<?= $element->itemNumber; ?>" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input name="" type="text" value="<?= $element->itemNumber; ?>" required></span>
<td><textarea required><?= $element->itemName; ?></textarea>
<td><input type="number" min="0" value="<?= $element->quantity; ?>" required>
<td><input type="text" value="<?= $element->singleSalesPriceNet->getCurrency(); ?>">
<td><input type="number" min="0">
<td><input type="number" min="0" max="100" step="any">
<td><input type="number" min="0" step="any">
<td><input type="number" min="0" step="any">
<td><input name="" type="number" min="0" value="<?= $element->quantity; ?>" required>
<td><input name="" type="text" value="<?= $element->singleSalesPriceNet->getCurrency(); ?>">
<td><input name="" type="number" min="0">
<td><input name="" type="number" min="0" max="100" step="any">
<td><input name="" type="number" min="0" step="any">
<td><input name="" type="number" min="0" step="any">
<td><?= $element->totalSalesPriceNet->getCurrency(); ?>
<?php endforeach; ?>
<tr>
<td><i class="fa fa-plus"></i> <i class="fa fa-chevron-up order-up"></i> <i class="fa fa-chevron-down order-down"></i>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" required></span>
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input name="" type="text" required></span>
<td><textarea required></textarea>
<td><input type="number" min="0" value="0" required>
<td><input type="text">
<td><input type="number" min="0">
<td><input type="number" min="0" max="100" step="any">
<td><input type="number" min="0" step="any">
<td><input type="number" min="0" step="any">
<td><input name="" type="number" min="0" value="0" required>
<td><input name="" type="text">
<td><input name="" type="number" min="0">
<td><input name="" type="number" min="0" max="100" step="any">
<td><input name="" type="number" min="0" step="any">
<td><input name="" type="number" min="0" step="any">
<td>
</table>
<div class="portlet-foot">
@ -256,7 +256,7 @@ echo $this->getData('nav')->render(); ?>
<tr><td><input type="datetime-local" id="iDue" name="due">
<tr><td><label for="iCashBack2"><?= $this->getHtml('Cashback'); ?> 2</label>
<tr><td><input type="number" id="iCashBack2" name="cashback2">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>">
<tr><td><input type="submit" value="<?= $this->getHtml('Create', '0', '0'); ?>" name="create-bill">
</table>
</form>
</div>

View File

@ -1,4 +1,5 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
// Modules/tests