@@ -96,10 +96,12 @@ public function setDTMMessageSendingTime($dtm)
9696 * @param $sequence
9797 * @return \EDI\Generator\Coparn
9898 */
99- public function setBooking ($ booking , $ sequence )
99+ public function setBooking ($ booking , $ sequence = null )
100100 {
101101 $ 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+ }
103105
104106 return $ this ;
105107 }
@@ -196,11 +198,13 @@ public function setFND($loc)
196198 * $size = 22G1, 42G1, etc
197199 * @param $number
198200 * @param $size
199- * @return \EDI\Generator\Coparn
201+ * @param $statusCode
202+ * @param $fullEmptyIndicator
203+ * @return \EDI\Generator\Codeco\Container
200204 */
201- public function setContainer ($ number , $ size )
205+ public function setContainer ($ number , $ size, $ statusCode = 2 , $ fullEmptyIndicator = 5 )
202206 {
203- $ this ->cntr = self ::eqdSegment ('CN ' , $ number , [$ size , '102 ' , '5 ' ], '' , 2 , 5 );
207+ $ this ->cntr = self ::eqdSegment ('CN ' , $ number , [$ size , '102 ' , '5 ' ], '' , $ statusCode , $ fullEmptyIndicator );
204208
205209 return $ this ;
206210 }
@@ -391,7 +395,9 @@ public function compose(?string $sMessageFunctionCode = "5", ?string $sDocumentN
391395 $ this ->messageContent [] = $ this ->messageSender ;
392396 $ this ->messageContent [] = $ this ->messageCF ;
393397 $ this ->messageContent [] = $ this ->cntr ;
394- $ this ->messageContent [] = $ this ->bookingSequence ;
398+ if ($ this ->bookingSequence !== null ) {
399+ $ this ->messageContent [] = $ this ->bookingSequence ;
400+ }
395401
396402 if ($ this ->cntr === '' ) {
397403 $ this ->messageContent [] = $ this ->cntrAmount ;
0 commit comments