@@ -96,10 +96,12 @@ public function setDTMMessageSendingTime($dtm)
96
96
* @param $sequence
97
97
* @return \EDI\Generator\Coparn
98
98
*/
99
- public function setBooking ($ booking , $ sequence )
99
+ public function setBooking ($ booking , $ sequence = null )
100
100
{
101
101
$ this ->booking = self ::rffSegment ('BN ' , $ booking );
102
- $ this ->bookingSequence = self ::rffSegment ('SQ ' , $ sequence );
102
+ if ($ sequence !== null ) {
103
+ $ this ->bookingSequence = self ::rffSegment ('SQ ' , $ sequence );
104
+ }
103
105
104
106
return $ this ;
105
107
}
@@ -196,11 +198,13 @@ public function setFND($loc)
196
198
* $size = 22G1, 42G1, etc
197
199
* @param $number
198
200
* @param $size
199
- * @return \EDI\Generator\Coparn
201
+ * @param $statusCode
202
+ * @param $fullEmptyIndicator
203
+ * @return \EDI\Generator\Codeco\Container
200
204
*/
201
- public function setContainer ($ number , $ size )
205
+ public function setContainer ($ number , $ size, $ statusCode = 2 , $ fullEmptyIndicator = 5 )
202
206
{
203
- $ this ->cntr = self ::eqdSegment ('CN ' , $ number , [$ size , '102 ' , '5 ' ], '' , 2 , 5 );
207
+ $ this ->cntr = self ::eqdSegment ('CN ' , $ number , [$ size , '102 ' , '5 ' ], '' , $ statusCode , $ fullEmptyIndicator );
204
208
205
209
return $ this ;
206
210
}
@@ -391,7 +395,9 @@ public function compose(?string $sMessageFunctionCode = "5", ?string $sDocumentN
391
395
$ this ->messageContent [] = $ this ->messageSender ;
392
396
$ this ->messageContent [] = $ this ->messageCF ;
393
397
$ this ->messageContent [] = $ this ->cntr ;
394
- $ this ->messageContent [] = $ this ->bookingSequence ;
398
+ if ($ this ->bookingSequence !== null ) {
399
+ $ this ->messageContent [] = $ this ->bookingSequence ;
400
+ }
395
401
396
402
if ($ this ->cntr === '' ) {
397
403
$ this ->messageContent [] = $ this ->cntrAmount ;
0 commit comments