-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathObjectsCooperation.php
43 lines (34 loc) · 1.03 KB
/
ObjectsCooperation.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/php -f
<?php
declare(strict_types=1);
/**
* This file is part of the EaseCore package.
*
* (c) Vítězslav Dvořák <http://vitexsoftware.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Example\AbraFlexi;
include_once './config.php';
include_once '../vendor/autoload.php';
/**
* @var \AbraFlexi\FakturaVydana With initial type code:FAKTURA, connected to
* default constatnt('FLEXIBEE_URL')
*/
$originalInvoice = new \AbraFlexi\FakturaVydana(['typDokl' => \AbraFlexi\RO::code('FAKTURA')]);
/**
* @var \AbraFlexi\FakturaVydana
*/
$invoice = new \AbraFlexi\FakturaVydana(
$originalInvoice->getData(),
$originalInvoice->getConnectionOptions(),
);
/**
* Save to FlexiBee a obtain processed record record with its new CODE, Number etc.
*/
$invoice->sync();
/**
* Print Link to new record in FlexiBee web interface.
*/
echo '<a href="'.$invoice->getApiURL('html').'">'.$invoice.'</a>';