Skip to main content
Version: v0.0.2

Function: transactionCountMismatch()

transactionCountMismatch(position, declared, actual): X12ParseWarning

Build an X12_TRANSACTION_COUNT_MISMATCH warning. Emitted when GE-01 does not equal the actual number of ST..SE transaction sets present in the group. As with group counts, the parser surfaces both values verbatim and never silently corrects them.

Parameters

position

X12Position

declared

string

actual

number

Returns

X12ParseWarning

Example

import { transactionCountMismatch } from "@cosyte/x12";
const w = transactionCountMismatch(
{ segmentIndex: 4, interchangeIndex: 0, groupIndex: 0, elementIndex: 1 },
"3",
2,
);