Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

The issue related to rules #45

Closed
Yerevanski opened this issue Feb 5, 2020 · 2 comments
Closed

The issue related to rules #45

Yerevanski opened this issue Feb 5, 2020 · 2 comments
Labels

Comments

@Yerevanski
Copy link

Hello,

First of all thank you for the great work.

I want to use it, but when checking, the dan1, dan2, dan3 was sending NULL if not defined. In the rules, I see that dan shouldn't be sent, if it not defined. Do you have plan to fix this?
FYI:
IMG-f03a6b879080c315b8e39c44a5afc12b-V
the dan3 is for hair salons, babysitters, etc..

@filipsedivy
Copy link
Owner

Hello,

I checked your problem, and everything is fine. I have version 4.1.
Null values or blank values are not sent.

For testing I used the code:

use FilipSedivy\EET;

$receipt = new EET\Receipt;
$receipt->uuid_zpravy = \Ramsey\Uuid\Uuid::uuid4()->toString();
$receipt->id_provoz = '11';
$receipt->id_pokl = 'IP105';
$receipt->dic_popl = 'CZ00000019';
$receipt->porad_cis = '1';
$receipt->dat_trzby = new \DateTime;
$receipt->celk_trzba = 500;

$path = __DIR__ . '/vendor/filipsedivy/php-eet/tests/data/EET_CA1_Playground-CZ00000019.p12';
$certificate = new EET\Certificate($path, 'eet');
$dispatcher = new EET\Dispatcher($certificate, EET\Dispatcher::PLAYGROUND_SERVICE);

$dispatcher->test($receipt);

The assembled XML then looks like this:

<SOAP-ENV:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="pfx255be850-8b54-aec0-63de-0d623ba01540">

    <ns1:Trzba>

      <ns1:Hlavicka uuid_zpravy="281dcfb6-74c0-4e9d-ac46-3c38c62ddbfe" dat_odesl="2020-02-06T22:27:58+01:00" prvni_zaslani="true" overeni="true"/>

      <ns1:Data dic_popl="CZ00000019" id_provoz="11" id_pokl="IP105" porad_cis="1" dat_trzby="2020-02-06T21:27:58+00:00" celk_trzba="500.00" rezim="0"/>
    </ns1:Trzba>

  </SOAP-ENV:Body>

@Yerevanski
Copy link
Author

Thank you, I will test too in 4.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants