From 0ed30bbcc3a2d133b38f7b2399f1630ae2692934 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 29 Dec 2019 14:18:46 +0100 Subject: [PATCH] datetime is jsonserializable, didn't know that :) --- Interfaces/GSD/Importer.php | 14 +++ Interfaces/GSD/Model/GSDCostCenter.php | 2 +- Interfaces/GSD/Model/GSDCostObject.php | 2 +- Interfaces/GSD/en.lang.php | 15 ++- Interfaces/GSD/import.tpl.php | 149 ++++++++++++++----------- 5 files changed, 108 insertions(+), 74 deletions(-) diff --git a/Interfaces/GSD/Importer.php b/Interfaces/GSD/Importer.php index e9f7d72..07dc289 100644 --- a/Interfaces/GSD/Importer.php +++ b/Interfaces/GSD/Importer.php @@ -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 * diff --git a/Interfaces/GSD/Model/GSDCostCenter.php b/Interfaces/GSD/Model/GSDCostCenter.php index b6a95f9..745cff2 100644 --- a/Interfaces/GSD/Model/GSDCostCenter.php +++ b/Interfaces/GSD/Model/GSDCostCenter.php @@ -182,7 +182,7 @@ final class GSDCostCenter implements \JsonSerializable return [ 'id' => $this->id, 'createdBy' => $this->createdBy, - 'createdAt' => $this->createdAt->format('Y-m-d H:i:s'), + 'createdAt' => $this->createdAt, 'description' => $this->description, 'costcenter' => $this->costCenter, ]; diff --git a/Interfaces/GSD/Model/GSDCostObject.php b/Interfaces/GSD/Model/GSDCostObject.php index c94e9fa..9e7bb6e 100644 --- a/Interfaces/GSD/Model/GSDCostObject.php +++ b/Interfaces/GSD/Model/GSDCostObject.php @@ -182,7 +182,7 @@ final class GSDCostObject implements \JsonSerializable return [ 'id' => $this->id, 'createdBy' => $this->createdBy, - 'createdAt' => $this->createdAt->format('Y-m-d H:i:s'), + 'createdAt' => $this->createdAt, 'description' => $this->description, 'costObject' => $this->costObject, ]; diff --git a/Interfaces/GSD/en.lang.php b/Interfaces/GSD/en.lang.php index 4c8b918..4393bc8 100644 --- a/Interfaces/GSD/en.lang.php +++ b/Interfaces/GSD/en.lang.php @@ -13,12 +13,15 @@ declare(strict_types=1); return [ - 'Accounts' => 'Accounts', - 'Articles' => 'Articles', + 'Assets' => 'Assets', + 'Accounts' => 'Accounts', + 'Articles' => 'Articles', 'CostCenters' => 'Cost Centers', 'CostObjects' => 'Cost Objects', - 'Customers' => 'Customers', - 'Invoices' => 'Invoices', - 'Options' => 'Options', - 'Suppliers' => 'Suppliers', + 'Customers' => 'Customers', + 'Invoices' => 'Invoices', + 'Options' => 'Options', + 'Postings' => 'Postings', + 'Stocks' => 'Stocks', + 'Suppliers' => 'Suppliers', ]; diff --git a/Interfaces/GSD/import.tpl.php b/Interfaces/GSD/import.tpl.php index c019983..6ba0cc2 100644 --- a/Interfaces/GSD/import.tpl.php +++ b/Interfaces/GSD/import.tpl.php @@ -1,67 +1,84 @@ -
-
-
-

getHtml('Import') ?> - GSD

- -
-
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
getHtml('Options') ?> -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- - - - -
- -
-
-
-
-
+
+
+
+

getHtml('Import') ?> - GSD

+ +
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
getHtml('Options') ?> +
+
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + +
+ + + + +
+ + + + +
+
+ +
+
+
+
+
\ No newline at end of file