Closed mahsa92 closed 2 years ago
I think it should go between DTM and MEA, because in that position it would make required modeOfTransport and in your sample it isn't set... What do you think?
Yes. You are right. So it should be like this:
/**
* @return array
*/
public function compose()
{
$composed = [$this->cntr];
if ($this->bkg !== null) {
$composed[] = $this->bkg;
}
$composed[] = $this->effectiveDate;
if ($this->destination !== null) {
$composed[] = $this->destination;
}
if ($this->weight !== null) {
$composed[] = $this->weight;
}
if ($this->seal !== null) {
$composed[] = $this->seal;
}
if ($this->modeOfTransport !== null) {
$composed[] = $this->modeOfTransport;
}
return $composed;
}
I wrote a code like belows:
But it's not generating LOC segment in output, I noticed it hasn't been added to compose function.
https://github.com/php-edifact/edifact-generator/blob/9b422febe366ab5ff3d77be29374a8a43e2e18d4/src/Generator/Codeco/Container.php#L136
proposed function: