This code in getVersion() throws an exception for a french Invoice I recently stumbled across:
if (head.contains("<rsm:CrossIndustryDocument") //
|| head.contains("<CrossIndustryDocument") //
|| head.contains("<SCRDMCCBDACIDAMessageStructure") //
|| head.contains("<rsm:SCRDMCCBDACIOMessageStructure")) { //
version = 1;
} else if (head.contains("<rsm:CrossIndustryInvoice")) {
version = 2;
} else {
throw new Exception("ZUGFeRD version could not be determined");
}
This code in
getVersion()
throws an exception for a french Invoice I recently stumbled across:because the head for the Invoice contains this:
As far as I can tell, this should be a valid Zugferd 2 but the version detection code doesn't recognize it because of the namespace prefixes.