diff --git a/Examples/ShowDocumentChanges.php b/Examples/ShowDocumentChanges.php new file mode 100644 index 00000000..6babbba7 --- /dev/null +++ b/Examples/ShowDocumentChanges.php @@ -0,0 +1,32 @@ +#!/usr/bin/php -f + + * @copyright (G) 2017 Vitex Software + */ + +namespace Example\AbraFlexi; + +include_once './config.php'; +include_once '../vendor/autoload.php'; + +include_once './common.php'; + +$invoiceID = askForFlexiBeeID(); + +/* + * AbraFlexi Classes accept this form of initial identifier: + * + * (int) 2588 + * (string) ext:ESHOP:oi1978 + * (array) ['varSym'=>'20080015'] + */ + +$invoice = new \AbraFlexi\FakturaVydana($invoiceID); +if ($invoice->getMyKey()) { + print_r($invoice->getChanges()); +} else { + $originalInvoice->addStatusMessage('Source Invoice does not exists'); +} diff --git a/src/AbraFlexi/Adresar.php b/src/AbraFlexi/Adresar.php index 6ef62709..24b0d9d0 100644 --- a/src/AbraFlexi/Adresar.php +++ b/src/AbraFlexi/Adresar.php @@ -21,6 +21,7 @@ class Adresar extends RW { use Stitky; use SubItems; use Firma; + use GetChanges; /** * Evidence užitá objektem. diff --git a/src/AbraFlexi/Banka.php b/src/AbraFlexi/Banka.php index 2c45bb11..db5494b3 100644 --- a/src/AbraFlexi/Banka.php +++ b/src/AbraFlexi/Banka.php @@ -28,6 +28,7 @@ class Banka extends RW { use Firma; use Email; use SubItems; + use GetChanges; /** * Evidence užitá objektem. diff --git a/src/AbraFlexi/Cenik.php b/src/AbraFlexi/Cenik.php index b2b58b49..5dd7d8eb 100644 --- a/src/AbraFlexi/Cenik.php +++ b/src/AbraFlexi/Cenik.php @@ -25,6 +25,7 @@ class Cenik extends RW { use Stitky; use SubItems; + use GetChanges; /** * Evidence užitá objektem. diff --git a/src/AbraFlexi/Exception.php b/src/AbraFlexi/Exception.php index 28f51358..1035e183 100644 --- a/src/AbraFlexi/Exception.php +++ b/src/AbraFlexi/Exception.php @@ -7,7 +7,7 @@ * From: https://vitexsoftware.abraflexi.eu:5434 * * @author Vítězslav Dvořák - * @copyright (C) 2021 Spoje.Net + * @copyright (C) 2021-2022 Spoje.Net */ namespace AbraFlexi; diff --git a/src/AbraFlexi/FakturaPrijata.php b/src/AbraFlexi/FakturaPrijata.php index c952d895..200b3817 100644 --- a/src/AbraFlexi/FakturaPrijata.php +++ b/src/AbraFlexi/FakturaPrijata.php @@ -22,6 +22,7 @@ class FakturaPrijata extends RW { use Firma; use Sum; use SubItems; + use GetChanges; /** * Evidence použitá třídou. diff --git a/src/AbraFlexi/FakturaVydana.php b/src/AbraFlexi/FakturaVydana.php index 4b75b2c4..5553c8e4 100644 --- a/src/AbraFlexi/FakturaVydana.php +++ b/src/AbraFlexi/FakturaVydana.php @@ -23,7 +23,8 @@ class FakturaVydana extends RW { use Sum; use SubItems; use Email; - + use GetChanges; + /** * Evidence užitá objektem. * diff --git a/src/AbraFlexi/InterniDoklad.php b/src/AbraFlexi/InterniDoklad.php index 73754ab6..5f084ddf 100644 --- a/src/AbraFlexi/InterniDoklad.php +++ b/src/AbraFlexi/InterniDoklad.php @@ -22,6 +22,7 @@ class InterniDoklad extends RW { use Firma; use Sum; use Email; + use GetChanges; /** * Evidence použitá třídou. diff --git a/src/AbraFlexi/ObjednavkaPrijata.php b/src/AbraFlexi/ObjednavkaPrijata.php index baa4024c..b8d1470d 100644 --- a/src/AbraFlexi/ObjednavkaPrijata.php +++ b/src/AbraFlexi/ObjednavkaPrijata.php @@ -15,6 +15,7 @@ class ObjednavkaPrijata extends RW { use Firma; use Sum; use Email; + use GetChanges; /** * Evidence použitá třídou. diff --git a/src/AbraFlexi/Pokladna.php b/src/AbraFlexi/Pokladna.php index 9cc82ab0..0aaad134 100644 --- a/src/AbraFlexi/Pokladna.php +++ b/src/AbraFlexi/Pokladna.php @@ -19,6 +19,7 @@ class Pokladna extends RW { use Stitky; + use GetChanges; /** * Evidence užitá objektem.