datetime is jsonserializable, didn't know that :)

This commit is contained in:
Dennis Eichhorn 2019-12-29 14:18:46 +01:00
parent 3fb7684a58
commit 0ed30bbcc3
5 changed files with 108 additions and 74 deletions

View File

@ -238,6 +238,20 @@ final class Importer extends ImporterAbstract
{ {
} }
/**
* Import articles
*
* @param \DateTime $start Start time (inclusive)
* @param \DateTime $end End time (inclusive)
*
* @return void
*
* @since 1.0.0
*/
public function importArticle(\DateTime $start, \DateTime $end) : void
{
}
/** /**
* Import invoices * Import invoices
* *

View File

@ -182,7 +182,7 @@ final class GSDCostCenter implements \JsonSerializable
return [ return [
'id' => $this->id, 'id' => $this->id,
'createdBy' => $this->createdBy, 'createdBy' => $this->createdBy,
'createdAt' => $this->createdAt->format('Y-m-d H:i:s'), 'createdAt' => $this->createdAt,
'description' => $this->description, 'description' => $this->description,
'costcenter' => $this->costCenter, 'costcenter' => $this->costCenter,
]; ];

View File

@ -182,7 +182,7 @@ final class GSDCostObject implements \JsonSerializable
return [ return [
'id' => $this->id, 'id' => $this->id,
'createdBy' => $this->createdBy, 'createdBy' => $this->createdBy,
'createdAt' => $this->createdAt->format('Y-m-d H:i:s'), 'createdAt' => $this->createdAt,
'description' => $this->description, 'description' => $this->description,
'costObject' => $this->costObject, 'costObject' => $this->costObject,
]; ];

View File

@ -13,12 +13,15 @@
declare(strict_types=1); declare(strict_types=1);
return [ return [
'Accounts' => 'Accounts', 'Assets' => 'Assets',
'Articles' => 'Articles', 'Accounts' => 'Accounts',
'Articles' => 'Articles',
'CostCenters' => 'Cost Centers', 'CostCenters' => 'Cost Centers',
'CostObjects' => 'Cost Objects', 'CostObjects' => 'Cost Objects',
'Customers' => 'Customers', 'Customers' => 'Customers',
'Invoices' => 'Invoices', 'Invoices' => 'Invoices',
'Options' => 'Options', 'Options' => 'Options',
'Suppliers' => 'Suppliers', 'Postings' => 'Postings',
'Stocks' => 'Stocks',
'Suppliers' => 'Suppliers',
]; ];

View File

@ -23,25 +23,46 @@
<tr><td><input type="datetime-local" id="iEnd" name="end" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>"> <tr><td><input type="datetime-local" id="iEnd" name="end" value="<?= $this->printHtml((new \DateTime('NOW'))->format('Y-m-d\TH:i:s')); ?>">
<tr><td><?= $this->getHtml('Options') ?> <tr><td><?= $this->getHtml('Options') ?>
<tr><td> <tr><td>
<table class="layout wf-100"><tr><td>
<span class="checkbox"> <span class="checkbox">
<input id="iCustomers" name="customers" type="checkbox" value="1"> <input id="iCustomers" name="customers" type="checkbox" value="1">
<label for="iCustomers"><?= $lang['Customers']; ?></label> <label for="iCustomers"><?= $lang['Customers']; ?></label>
</span> </span>
<td>
<span class="checkbox">
<input id="iInvoices" name="invoices" type="checkbox" value="1">
<label for="iInvoices"><?= $lang['Invoices']; ?></label>
</span>
<tr><td> <tr><td>
<span class="checkbox"> <span class="checkbox">
<input id="iSuppliers" name="suppliers" type="checkbox" value="1"> <input id="iSuppliers" name="suppliers" type="checkbox" value="1">
<label for="iSuppliers"><?= $lang['Suppliers']; ?></label> <label for="iSuppliers"><?= $lang['Suppliers']; ?></label>
</span> </span>
<td>
<span class="checkbox">
<input id="iStocks" name="stocks" type="checkbox" value="1">
<label for="iStocks"><?= $lang['Stocks']; ?></label>
</span>
<tr><td> <tr><td>
<span class="checkbox"> <span class="checkbox">
<input id="iAccounts" name="accounts" type="checkbox" value="1"> <input id="iAccounts" name="accounts" type="checkbox" value="1">
<label for="iAccounts"><?= $lang['Accounts']; ?></label> <label for="iAccounts"><?= $lang['Accounts']; ?></label>
</span> </span>
<td>
<span class="checkbox">
<input id="iAssets" name="assets" type="checkbox" value="1">
<label for="iAssets"><?= $lang['Assets']; ?></label>
</span>
<tr><td> <tr><td>
<span class="checkbox"> <span class="checkbox">
<input id="iCostCenters" name="costcenters" type="checkbox" value="1"> <input id="iCostCenters" name="costcenters" type="checkbox" value="1">
<label for="iCostCenters"><?= $lang['CostCenters']; ?></label> <label for="iCostCenters"><?= $lang['CostCenters']; ?></label>
</span> </span>
<td>
<span class="checkbox">
<input id="iPostings" name="postings" type="checkbox" value="1">
<label for="iPostings"><?= $lang['Postings']; ?></label>
</span>
<tr><td> <tr><td>
<span class="checkbox"> <span class="checkbox">
<input id="iCostObjects" name="costobjects" type="checkbox" value="1"> <input id="iCostObjects" name="costobjects" type="checkbox" value="1">
@ -52,11 +73,7 @@
<input id="iArticles" name="articles" type="checkbox" value="1"> <input id="iArticles" name="articles" type="checkbox" value="1">
<label for="iArticles"><?= $lang['Articles']; ?></label> <label for="iArticles"><?= $lang['Articles']; ?></label>
</span> </span>
<tr><td> </table>
<span class="checkbox">
<input id="iInvoices" name="invoices" type="checkbox" value="1">
<label for="iInvoices"><?= $lang['Invoices']; ?></label>
</span>
<tr><td> <tr><td>
<input type="submit" value="<?= $this->getHtml('Import'); ?>"> <input type="submit" value="<?= $this->getHtml('Import'); ?>">
</table> </table>