Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: Pallet collies #7

Merged
merged 4 commits into from
Jun 28, 2017
Merged

Fixed: Pallet collies #7

merged 4 commits into from
Jun 28, 2017

Conversation

JanGalek
Copy link
Contributor

@JanGalek JanGalek commented Jun 28, 2017

For repeat MyApiPackageInColli, we need only one and for it create array. So Fixed restart apache / connection.

přidán ještě jeden fix, u pickUpCargoTypeCode se validuje Číselník typů svozu (pouze PPLsprint), v dokumentaci mají chybu, již jsem ji nahlásil.

@Salamek
Copy link
Owner

Salamek commented Jun 28, 2017

@JanGalek

Looks good, maybe change:

                $collies = [];
                foreach ($package->getPalletInfo()->getCollies() AS $colli) {
                    $collies['MyApiPackageInColli'][] = [
                        'ColliNumber' => $colli->getColliNumber(),
                        'Height' => $colli->getHeight(),
                        'Length' => $colli->getLength(),
                        'Weight' => $colli->getWeight(),
                        'Width' => $colli->getWidth(),
                        'WrapCode' => $colli->getWrapCode()
                    ];
                }
                $palletInfo = [];
                $palletInfo['Collies'] = $collies;

to

                $collies = [];
                foreach ($package->getPalletInfo()->getCollies() AS $colli) {
                    $collies[] = [
                        'ColliNumber' => $colli->getColliNumber(),
                        'Height' => $colli->getHeight(),
                        'Length' => $colli->getLength(),
                        'Weight' => $colli->getWeight(),
                        'Width' => $colli->getWidth(),
                        'WrapCode' => $colli->getWrapCode()
                    ];
                }
                $palletInfo = [];
                $palletInfo['Collies']['MyApiPackageInColli'] = $collies;

So we dont unnecessarily overwrite MyApiPackageInColli key in each loop ?

@JanGalek
Copy link
Contributor Author

ok, it will be better, I will change it ;)

@Salamek Salamek merged commit b00f813 into Salamek:master Jun 28, 2017
This was referenced Sep 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants