Skip to content

Multiple SG2 segments not allowed #130

Closed
@szocsbarni

Description

@szocsbarni

Given the below, short edi content, D01B version, pricat type:

UNA:+.?'
UNB+UNOC:3+0000000000000:14+0000000000000:14+231126:1830+502+0000++++PRICAT'
UNH+1+PRICAT:D:01B:UN:EAN009'
BGM+9:::PREISLISTE+11+4'
DTM+137:20231126:102'
NAD+BY+1111111111111::9'
NAD+SU+2222222222222::9'
UNT+0+1'
UNZ+1+502'

the current code version on the master (d4c8450) skips the 2nd NAD command with the below warning:

Array
(
    [0] => Array
        (
            [text] => The message has some additional segments beyond the maximum repetition allowed (skipped)
            [position] => 4
            [segmentId] => NAD
        )

)

while the release v1 (2949865), parses them, without any warnings. According to the PRICAT documentation, there can be multiple SG2 segments, each of them containing one NAD command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions