Merge branch 'ZUGFeRD-master' into java17-base
This commit is contained in:
33
History.md
33
History.md
@@ -1,5 +1,30 @@
|
||||
#1049
|
||||
#1044
|
||||
2.23.0 "Bonne Journées de la Facture Électronique"
|
||||
=======
|
||||
2026-04-23
|
||||
|
||||
improved subitem support, support french validation
|
||||
|
||||
- #993 Cash discount not parsed
|
||||
- #1029 Added a breaking change notice regarding the removal of hardcoded values in #729
|
||||
- #1037 Compress attachments
|
||||
- #1038 Header allowances are aggregated incorrectly for non-XRechnung profiles
|
||||
- #1044 Correct version of org.apache.pdfbox:fontbox from 3.0.3 to 3.0.6.
|
||||
- #1046 Add configurable BT-23 business process ID for CII export
|
||||
- #1049 Prevent exceptions in validation
|
||||
- #1050 Add validator information to PDF report (name and version)
|
||||
- #1052 Remove parsing OriginatorDocumentReference.ID as date
|
||||
- #1055 Correct order of ApplicableTradeTax sub-elements.
|
||||
- #1061 Add ability to mark an Invoice as a test invoice.
|
||||
- #1072 Correct XPath-expressions for GrandTotal and TaxBasisTotalAmount.
|
||||
- #1073 add hierarchical invoice positions in CII XML export for EXTENDED profile
|
||||
- #1075 Vulnerability in dependency PDFBox version 3.0.6
|
||||
- #1076 XMP error during validation based on mustang version 2.22. (XMP Metadata: Could not parse XMP metadata (XML invalid))
|
||||
- #1082 Centralize and secure DocumentBuilder creation.
|
||||
- #1083 PDF Visualizations in English and French
|
||||
- #1084 Fix xml description
|
||||
- #1089 Add France schematron ruleset
|
||||
- reduce possible exceptions in metrics action
|
||||
- added Extended-CTC-FR profile to selection for command line
|
||||
|
||||
2.22.0
|
||||
=======
|
||||
@@ -98,7 +123,7 @@ corrections
|
||||
- support parsing of BT-90 CreditorReferenceID
|
||||
- #871 schema validation does not ignore external entities
|
||||
- #868 Fix wrong version in History.md
|
||||
- #729 Updates about SpecifiedTradeSettlementHeaderMonetarySummation and SpecifiedTradeSettlementPaymentMeans
|
||||
- #729 Updates about SpecifiedTradeSettlementHeaderMonetarySummation and SpecifiedTradeSettlementPaymentMeans. **Breaking Change:** The hardcoded values of ram:TypeCode (58) and ram:Information ("SEPA credit transfer") in the getSettlementXML() method of the IZUGFeRDTradeSettlementPayment interface have been removed. Starting with this version, any code utilizing this interface must explicitly set the corresponding attributes.
|
||||
- #863 LineCalculator throws NPE if product is null (since 2.17.0)
|
||||
- #731 Got a broken translation key when visualizing XML into PDF (xr:Business_process_type)
|
||||
- #865 Add sevdesk signature to PDF creators
|
||||
@@ -199,7 +224,7 @@ corrections
|
||||
- #679 validation of a XR does not ignore whitespace
|
||||
- #681 IBAN assigned to invoice sender not recipient on direct debit
|
||||
- #689 incorrect element order when both charge reason and reasoncode are specified
|
||||
- be able to set detailedDeliveryPeriodFrom, detailedDeliveryPeriodTo MS188
|
||||
- be able to set detailedDeliveryPeriodFrom, detailedDeliverDeliveryPeriodTo MS188
|
||||
- updated verapdf from 1.26.1 to 1.26.2
|
||||
- cashDiscount JSON now corrently ignores values for cii and xr methods
|
||||
|
||||
|
||||
@@ -44,74 +44,73 @@ public class Main {
|
||||
|
||||
private static String getUsage() {
|
||||
return "Usage: --action metrics|combine|extract|a3only|ubl|validate|validateExpectInvalid|validateExpectValid|visualize [-d,--directory] [-l,--listfromstdin] [-i,--ignore fileextension, PDF/A errors] [--disable-file-logging] | [-h,--help] \r\n"
|
||||
+ " --action license display open source license and notice\n"
|
||||
+ " --action metrics\n"
|
||||
+ " -d, --directory count ZUGFeRD files in directory to be scanned\n"
|
||||
+ " If it is a directory, it will recurse.\n"
|
||||
+ " -l, --listfromstdin count ZUGFeRD files from a list of linefeed separated files on runtime.\n"
|
||||
+ " It will start once a blank line has been entered.\n" + "\n"
|
||||
+ " Additional parameter for both count operations\n"
|
||||
+ " [-i, --ignorefileextension] Check for all files (*.*) instead of PDF files only (*.pdf) in metrics, ignore PDF/A input file errors in combine\n"
|
||||
+ " [--disable-file-logging] disable logging to file.\n"
|
||||
+ " --action extract extract Factur-X PDF to XML file\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: set input PDF file\n"
|
||||
+ " [--out <filename>]: set output XML file\n"
|
||||
+ " --action a3only upgrade from PDF/A1 to A3 only (no ZUGFeRD data attached)\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: set input PDF file\n"
|
||||
+ " [--out <filename>]: set output PDF file\n"
|
||||
+ " --action combine combine XML and PDF file to Factur-X PDF file\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: set input PDF file\n"
|
||||
+ " [--source-xml <filename>]: set input XML file\n"
|
||||
+ " [--out <filename>]: set output PDF file\n"
|
||||
+ " [--format <fx|zf|ox|da>]: set Factur-X, ZUGFeRD, Order-X or Cross Industry Despatch Advice\n"
|
||||
+ " [--version <1|2>]: set ZUGFeRD version\n"
|
||||
+ " [--profile <...>]: set ZUGFeRD profile\n"
|
||||
+ " For ZUGFeRD v1 or Order-X: <B>ASIC, <C>OMFORT or EX<T>ENDED\n"
|
||||
+ " For ZUGFeRD v2: <M>INIMUM, BASIC <W>L, <B>ASIC, <C>IUS, <E>N16931, <X>Rechnung, EX<T>ENDED\n"
|
||||
+ " [--attachments <filenames>]: list of file attachments (passing a single empty file name prevents prompting)\n"
|
||||
+ " [--no-additional-attachments]: prevent prompting for attachments\n"
|
||||
+ " --action ubl convert UN/CEFACT 2016b CII XML to UBL XML\n"
|
||||
+ " [--source <filename>]: set input XML file\n"
|
||||
+ " [--out <filename>]: set output XML file\n"
|
||||
+ " --action upgrade upgrade ZUGFeRD XML to ZUGFeRD 2 XML\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: set input XML ZUGFeRD 1 file\n"
|
||||
+ " [--out <filename>]: set output XML ZUGFeRD 2 file\n"
|
||||
+ " --action validate validate XML or PDF file \n"
|
||||
+ " [--no-notices]: refrain from reporting notices\n"
|
||||
+ " [--logAppend <text>]: text to be added to log line\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: input PDF or XML file\n"
|
||||
+ " [--log-as-pdf]: save log output as pdf\n"
|
||||
+ " --action validateExpectInvalid validate directory recursively expecting negative results \n"
|
||||
+ " [--no-notices]: refrain from reporting notices\n"
|
||||
+ " Additional parameters (user will be prompted if not defined)\n"
|
||||
+ " -d, --directory to check recursively\n"
|
||||
+ " Additional parameters (optional)\n"
|
||||
+ " --exclude: comma-separated list of filenames to ignore\n"
|
||||
+ " --action validateExpectValid validate directory recursively expecting positive results \n"
|
||||
+ " [--no-notices]: refrain from reporting notices\n"
|
||||
+ " Additional parameters (user will be prompted if not defined)\n"
|
||||
+ " -d, --directory to check recursively \n"
|
||||
+ " Additional parameters (user will be prompted if not defined)\n"
|
||||
+ " --exclude: comma-separated list of filenames to ignore\n"
|
||||
+ " --action visualize convert XML to HTML \n"
|
||||
+ " [--language <lang>]: set output lang (en, fr or de)\n"
|
||||
+ " [--source <filename>]: set input XML file\n"
|
||||
+ " [--out <filename>]: set output HTML file\n"
|
||||
+ " --action pdf convert XML to PDF \n"
|
||||
+ " [--source <filename>]: set input XML file\n"
|
||||
+ " [--out <filename>]: set output PDF file\n"
|
||||
;
|
||||
+ " --action license display open source license and notice\n"
|
||||
+ " --action metrics\n"
|
||||
+ " -d, --directory count ZUGFeRD files in directory to be scanned\n"
|
||||
+ " If it is a directory, it will recurse.\n"
|
||||
+ " -l, --listfromstdin count ZUGFeRD files from a list of linefeed separated files on runtime.\n"
|
||||
+ " It will start once a blank line has been entered.\n" + "\n"
|
||||
+ " Additional parameter for both count operations\n"
|
||||
+ " [-i, --ignorefileextension] Check for all files (*.*) instead of PDF files only (*.pdf) in metrics, ignore PDF/A input file errors in combine\n"
|
||||
+ " [--disable-file-logging] disable logging to file.\n"
|
||||
+ " --action extract extract Factur-X PDF to XML file\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: set input PDF file\n"
|
||||
+ " [--out <filename>]: set output XML file\n"
|
||||
+ " --action a3only upgrade from PDF/A1 to A3 only (no ZUGFeRD data attached)\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: set input PDF file\n"
|
||||
+ " [--out <filename>]: set output PDF file\n"
|
||||
+ " --action combine combine XML and PDF file to Factur-X PDF file\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: set input PDF file\n"
|
||||
+ " [--source-xml <filename>]: set input XML file\n"
|
||||
+ " [--out <filename>]: set output PDF file\n"
|
||||
+ " [--format <fx|zf|ox|da>]: set Factur-X, ZUGFeRD, Order-X or Cross Industry Despatch Advice\n"
|
||||
+ " [--version <1|2>]: set ZUGFeRD version\n"
|
||||
+ " [--profile <...>]: set ZUGFeRD profile\n"
|
||||
+ " For ZUGFeRD v1 or Order-X: <B>ASIC, <C>OMFORT or EX<T>ENDED\n"
|
||||
+ " For ZUGFeRD v2: <M>INIMUM, BASIC <W>L, <B>ASIC, <C>IUS, <E>N16931, <X>Rechnung, EXTENDED-CTC-[F]R, EX<T>ENDED\n"
|
||||
+ " [--attachments <filenames>]: list of file attachments (passing a single empty file name prevents prompting)\n"
|
||||
+ " [--no-additional-attachments]: prevent prompting for attachments\n"
|
||||
+ " --action ubl convert UN/CEFACT 2016b CII XML to UBL XML\n"
|
||||
+ " [--source <filename>]: set input XML file\n"
|
||||
+ " [--out <filename>]: set output XML file\n"
|
||||
+ " --action upgrade upgrade ZUGFeRD XML to ZUGFeRD 2 XML\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: set input XML ZUGFeRD 1 file\n"
|
||||
+ " [--out <filename>]: set output XML ZUGFeRD 2 file\n"
|
||||
+ " --action validate validate XML or PDF file \n"
|
||||
+ " [--no-notices]: refrain from reporting notices\n"
|
||||
+ " [--logAppend <text>]: text to be added to log line\n"
|
||||
+ " Additional parameters (optional - user will be prompted if not defined)\n"
|
||||
+ " [--source <filename>]: input PDF or XML file\n"
|
||||
+ " [--log-as-pdf]: save log output as pdf\n"
|
||||
+ " --action validateExpectInvalid validate directory recursively expecting negative results \n"
|
||||
+ " [--no-notices]: refrain from reporting notices\n"
|
||||
+ " Additional parameters (user will be prompted if not defined)\n"
|
||||
+ " -d, --directory to check recursively\n"
|
||||
+ " Additional parameters (optional)\n"
|
||||
+ " --exclude: comma-separated list of filenames to ignore\n"
|
||||
+ " --action validateExpectValid validate directory recursively expecting positive results \n"
|
||||
+ " [--no-notices]: refrain from reporting notices\n"
|
||||
+ " Additional parameters (user will be prompted if not defined)\n"
|
||||
+ " -d, --directory to check recursively \n"
|
||||
+ " Additional parameters (user will be prompted if not defined)\n"
|
||||
+ " --exclude: comma-separated list of filenames to ignore\n"
|
||||
+ " --action visualize convert XML to HTML \n"
|
||||
+ " [--language <lang>]: set output lang (en, fr or de)\n"
|
||||
+ " [--source <filename>]: set input XML file\n"
|
||||
+ " [--out <filename>]: set output HTML file\n"
|
||||
+ " --action pdf convert XML to PDF \n"
|
||||
+ " [--source <filename>]: set input XML file\n"
|
||||
+ " [--out <filename>]: set output PDF file\n";
|
||||
}
|
||||
|
||||
private static void printHelp() {
|
||||
System.out.println("Mustangproject.org " + org.mustangproject.ZUGFeRD.Version.VERSION + " \r\n"
|
||||
+ "A Apache Public License tool for e-invoices with\r\n"
|
||||
+ "ZUGFeRD Metadata (http://www.zugferd.org)\r\n" + "\r\n" + getUsage() + "\r\n");
|
||||
+ "A Apache Public License tool for e-invoices with\r\n"
|
||||
+ "ZUGFeRD Metadata (http://www.zugferd.org)\r\n" + "\r\n" + getUsage() + "\r\n");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,14 +161,16 @@ public class Main {
|
||||
* Prompts the user for a input or output filename
|
||||
*
|
||||
* @param prompt the text the user is asked
|
||||
* @param defaultFilename a default Filename. Passing an empty string indicates that specifying a file is optional
|
||||
* @param expectedExtension will warn if filename does not match expected file extension, "or" possible with e.g. pdf|xml
|
||||
* @param defaultFilename a default Filename. Passing an empty string
|
||||
* indicates that specifying a file is optional
|
||||
* @param expectedExtension will warn if filename does not match expected file
|
||||
* extension, "or" possible with e.g. pdf|xml
|
||||
* @param ensureFileExists will warn if file does NOT exist (for input files)
|
||||
* @param ensureFileNotExists will warn if file DOES exist (for output files)
|
||||
* @return String
|
||||
*/
|
||||
protected static String getFilenameFromUser(String prompt, String defaultFilename, String expectedExtension,
|
||||
boolean ensureFileExists, boolean ensureFileNotExists) {
|
||||
boolean ensureFileExists, boolean ensureFileNotExists) {
|
||||
boolean fileExistenceOK = false;
|
||||
String selectedName = "";
|
||||
do {
|
||||
@@ -187,7 +188,7 @@ public class Main {
|
||||
if (selectedName.isEmpty()) {
|
||||
// pressed return without entering anything
|
||||
if (defaultFilename.isEmpty()) {
|
||||
return ""; //no default -> this is an optional filename
|
||||
return ""; // no default -> this is an optional filename
|
||||
}
|
||||
selectedName = defaultFilename;
|
||||
}
|
||||
@@ -211,7 +212,7 @@ public class Main {
|
||||
}
|
||||
} else if (!hasCorrectExtension) {
|
||||
System.err.println("Expected " + expectedExtension
|
||||
+ " extension, this may corrupt your file. Do you still want to continue?(Y|N)");
|
||||
+ " extension, this may corrupt your file. Do you still want to continue?(Y|N)");
|
||||
String selectedAnswer = "";
|
||||
try {
|
||||
selectedAnswer = buffer.readLine();
|
||||
@@ -270,6 +271,7 @@ public class Main {
|
||||
|
||||
/***
|
||||
* converts from CII to UBL
|
||||
*
|
||||
* @param xmlName the name of the xml file
|
||||
* @param outName the name of the output file
|
||||
* @throws IOException
|
||||
@@ -309,7 +311,8 @@ public class Main {
|
||||
}
|
||||
|
||||
// Plain Java
|
||||
// based on https://mkyong.com/java/how-to-convert-inputstream-to-string-in-java/
|
||||
// based on
|
||||
// https://mkyong.com/java/how-to-convert-inputstream-to-string-in-java/
|
||||
private static String convertInputStreamToString(InputStream is) {
|
||||
try (InputStream inputStream = is) {
|
||||
int DEFAULT_BUFFER_SIZE = 8192;
|
||||
@@ -333,7 +336,9 @@ public class Main {
|
||||
|
||||
/***
|
||||
* the main function of the commandline tool...
|
||||
* @param args the commandline args, see also https://www.mustangproject.org/commandline/#verbose
|
||||
*
|
||||
* @param args the commandline args, see also
|
||||
* https://www.mustangproject.org/commandline/#verbose
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
@@ -347,12 +352,14 @@ public class Main {
|
||||
options.addOption(new Option("f", "format", true, "which format to output"));
|
||||
options.addOption(new Option("version", "version", true, "which version of the standard to use"));
|
||||
options.addOption(new Option("profile", "profile", true, "which profile of the standard to use"));
|
||||
options.addOption(new Option("no-additional-attachments", "no-additional-attachments", false, "prevent prompting for attachments"));
|
||||
options.addOption(new Option("no-additional-attachments", "no-additional-attachments", false,
|
||||
"prevent prompting for attachments"));
|
||||
Option attachmentOpt = new Option("attachments", "attachments", true, "File attachments");
|
||||
attachmentOpt.setValueSeparator(',');
|
||||
attachmentOpt.setArgs(Option.UNLIMITED_VALUES);
|
||||
options.addOption(attachmentOpt);
|
||||
Option excludeOpt = new Option("exclude", "exclude", true, "Files to exclude from recursive directory traversal");
|
||||
Option excludeOpt = new Option("exclude", "exclude", true,
|
||||
"Files to exclude from recursive directory traversal");
|
||||
excludeOpt.setValueSeparator(',');
|
||||
excludeOpt.setArgs(Option.UNLIMITED_VALUES);
|
||||
options.addOption(excludeOpt);
|
||||
@@ -361,8 +368,10 @@ public class Main {
|
||||
options.addOption(new Option("language", "language", true, "output language (en, de or fr)"));
|
||||
options.addOption(new Option("out", "out", true, "which output file to write to"));
|
||||
options.addOption(new Option("no-notices", "no-notices", false, "suppress non-fatal errors"));
|
||||
options.addOption(new Option("logAppend", "logAppend", true, "freeform text to be appended to log messages"));
|
||||
options.addOption(new Option("disable-file-logging", "disable-file-logging", false, "suppress logging to file"));
|
||||
options.addOption(
|
||||
new Option("logAppend", "logAppend", true, "freeform text to be appended to log messages"));
|
||||
options.addOption(
|
||||
new Option("disable-file-logging", "disable-file-logging", false, "suppress logging to file"));
|
||||
options.addOption(new Option("d", "directory", true, "which directory to operate on"));
|
||||
options.addOption(new Option("i", "ignorefileextension", false, "ignore non-matching file extensions"));
|
||||
options.addOption(new Option("l", "listfromstdin", false, "take list of files from commandline"));
|
||||
@@ -378,7 +387,7 @@ public class Main {
|
||||
// Retrieve all options
|
||||
action = cmd.getOptionValue("action");
|
||||
String directoryName = cmd.getOptionValue("directory");
|
||||
boolean filesFromStdIn = cmd.hasOption("listfromstdin");//((Number)cmdLine.getParsedOptionValue("integer-option")).intValue();
|
||||
boolean filesFromStdIn = cmd.hasOption("listfromstdin");// ((Number)cmdLine.getParsedOptionValue("integer-option")).intValue();
|
||||
boolean ignoreFileExt = cmd.hasOption("ignorefileextension");
|
||||
boolean noAttachments = cmd.hasOption("no-additional-attachments");
|
||||
boolean helpRequested = cmd.hasOption("help") || ((action != null) && (action.equals("help")));
|
||||
@@ -398,11 +407,10 @@ public class Main {
|
||||
String[] attachmentFilenames = cmd.hasOption("attachments") ? cmd.getOptionValues("attachments") : null;
|
||||
String[] excludedFilenames = cmd.hasOption("exclude") ? cmd.getOptionValues("exclude") : null;
|
||||
|
||||
|
||||
ArrayList<FileAttachment> attachments = new ArrayList<>();
|
||||
/*
|
||||
setting system property to disable FILE appender and
|
||||
suppress creation of files and folders.
|
||||
* setting system property to disable FILE appender and
|
||||
* suppress creation of files and folders.
|
||||
*/
|
||||
System.setProperty("FILE_APPENDER_ENABLED", ((Boolean) (disableFileLogging == false)).toString());
|
||||
|
||||
@@ -411,14 +419,17 @@ public class Main {
|
||||
if (helpRequested) {
|
||||
printHelp();
|
||||
optionsRecognized = true;
|
||||
} /* else if ((action!=null)&&(action.equals("license"))) {
|
||||
printLicense();
|
||||
optionsRecognized=true;
|
||||
} */ else if ((action != null) && (action.equals("metrics"))) {
|
||||
} /*
|
||||
* else if ((action!=null)&&(action.equals("license"))) {
|
||||
* printLicense();
|
||||
* optionsRecognized=true;
|
||||
* }
|
||||
*/ else if ((action != null) && (action.equals("metrics"))) {
|
||||
performMetrics(directoryName, filesFromStdIn, ignoreFileExt);
|
||||
optionsRecognized = true;
|
||||
} else if ((action != null) && (action.equals("combine"))) {
|
||||
performCombine(sourceName, sourceXMLName, outName, format, zugferdVersion, zugferdProfile, ignoreFileExt, attachmentFilenames, attachments, noAttachments);
|
||||
performCombine(sourceName, sourceXMLName, outName, format, zugferdVersion, zugferdProfile,
|
||||
ignoreFileExt, attachmentFilenames, attachments, noAttachments);
|
||||
optionsRecognized = true;
|
||||
} else if ((action != null) && (action.equals("extract"))) {
|
||||
performExtract(sourceName, outName);
|
||||
@@ -439,7 +450,8 @@ public class Main {
|
||||
performUBL(sourceName, outName);
|
||||
optionsRecognized = true;
|
||||
} else if ((action != null) && (action.equals("validate"))) {
|
||||
optionsRecognized = performValidate(sourceName, noNotices, cmd.getOptionValue("logAppend"), LogAsPDF);
|
||||
optionsRecognized = performValidate(sourceName, noNotices, cmd.getOptionValue("logAppend"),
|
||||
LogAsPDF);
|
||||
} else if ((action != null) && (action.equals("validateExpectValid"))) {
|
||||
optionsRecognized = performValidateExpect(true, directoryName, excludedFilenames);
|
||||
} else if ((action != null) && (action.equals("validateExpectInvalid"))) {
|
||||
@@ -466,7 +478,8 @@ public class Main {
|
||||
|
||||
}
|
||||
|
||||
private static boolean performValidate(String sourceName, boolean noNotices, String logAppend, boolean createLogAsPDF) {
|
||||
private static boolean performValidate(String sourceName, boolean noNotices, String logAppend,
|
||||
boolean createLogAsPDF) {
|
||||
boolean optionsRecognized;
|
||||
if (sourceName == null) {
|
||||
sourceName = getFilenameFromUser("Source PDF or XML", "invoice.pdf", "pdf|xml", true, false);
|
||||
@@ -482,7 +495,7 @@ public class Main {
|
||||
String validationResultXML = zfv.validate(sourceName);
|
||||
System.out.println(validationResultXML);
|
||||
|
||||
if( createLogAsPDF) {
|
||||
if (createLogAsPDF) {
|
||||
ValidationLogVisualizer vlvi = new ValidationLogVisualizer();
|
||||
String fileBasename = FilenameUtils.getBaseName(sourceName);
|
||||
|
||||
@@ -516,7 +529,6 @@ public class Main {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private static void performConvert(String pdfName, String outName) throws IOException {
|
||||
/*
|
||||
* ZUGFeRDExporter ze= new ZUGFeRDExporterFromA1Factory()
|
||||
@@ -541,9 +553,9 @@ public class Main {
|
||||
|
||||
// All params are good! continue...
|
||||
try (ZUGFeRDExporterFromA1 ze = new ZUGFeRDExporterFromA1()) {
|
||||
ze.convertOnly().load(pdfName);
|
||||
ze.export(outName);
|
||||
System.out.println("Written to " + outName);
|
||||
ze.convertOnly().load(pdfName);
|
||||
ze.export(outName);
|
||||
System.out.println("Written to " + outName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -579,7 +591,8 @@ public class Main {
|
||||
}
|
||||
|
||||
private static void performCombine(String pdfName, String xmlName, String outName, String format, String zfVersion,
|
||||
String zfProfile, Boolean ignoreInputErrors, String[] attachmentFilenames, ArrayList<FileAttachment> attachments, Boolean noAttachments) throws Exception {
|
||||
String zfProfile, Boolean ignoreInputErrors, String[] attachmentFilenames,
|
||||
ArrayList<FileAttachment> attachments, Boolean noAttachments) throws Exception {
|
||||
/*
|
||||
* ZUGFeRDExporter ze= new ZUGFeRDExporterFromA1Factory()
|
||||
* .setProducer("toecount") .setCreator(System.getProperty("user.name"))
|
||||
@@ -611,11 +624,13 @@ public class Main {
|
||||
byte attachmentContents[] = null;
|
||||
String attachmentFilename, attachmentMime;
|
||||
if (!noAttachments) {
|
||||
attachmentFilename = getFilenameFromUser("Additional file attachments filename (empty for none)", "", "pdf", true, false);
|
||||
attachmentFilename = getFilenameFromUser("Additional file attachments filename (empty for none)",
|
||||
"", "pdf", true, false);
|
||||
if (attachmentFilename.length() != 0) {
|
||||
attachmentContents = Files.readAllBytes(Paths.get(attachmentFilename));
|
||||
attachmentMime = Files.probeContentType(Paths.get(attachmentFilename));
|
||||
attachments.add(new FileAttachment(attachmentFilename, attachmentMime, "Data", attachmentContents));
|
||||
attachments.add(
|
||||
new FileAttachment(attachmentFilename, attachmentMime, "Data", attachmentContents));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -624,15 +639,17 @@ public class Main {
|
||||
if (!attachmentFilename.isEmpty()) {
|
||||
byte[] attachmentContents = Files.readAllBytes(Paths.get(attachmentFilename));
|
||||
String attachmentMime = Files.probeContentType(Paths.get(attachmentFilename));
|
||||
attachments.add(new FileAttachment(attachmentFilename, attachmentMime, "Data", attachmentContents));
|
||||
attachments.add(
|
||||
new FileAttachment(attachmentFilename, attachmentMime, "Data", attachmentContents));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (format == null) {
|
||||
try {
|
||||
format = getStringFromUser("Format (fx=Factur-X, zf=ZUGFeRD, ox=Order-X, da=Cross Industry Despatch Advice)", "fx", "fx|zf|ox|da");
|
||||
format = getStringFromUser(
|
||||
"Format (fx=Factur-X, zf=ZUGFeRD, ox=Order-X, da=Cross Industry Despatch Advice)", "fx",
|
||||
"fx|zf|ox|da");
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
@@ -642,7 +659,7 @@ public class Main {
|
||||
|
||||
if (zfVersion == null) {
|
||||
try {
|
||||
zfVersion = getStringFromUser("Version (1 or 2)", "1", "1|2");//fx default version is 1
|
||||
zfVersion = getStringFromUser("Version (1 or 2)", "1", "1|2");// fx default version is 1
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
@@ -659,8 +676,10 @@ public class Main {
|
||||
zfProfile = getStringFromUser("Profile (p)ilot", "p", "P|p");
|
||||
} else {
|
||||
zfProfile = getStringFromUser(
|
||||
"Profile [M]INIMUM, BASIC [W]L, [B]ASIC,\n" + "[C]IUS, [E]N16931, EX[T]ENDED or [X]RECHNUNG", "E",
|
||||
"M|m|W|w|B|b|C|c|E|e|T|t|X|x|");
|
||||
"Profile [M]INIMUM, BASIC [W]L, [B]ASIC,\n"
|
||||
+ "[C]IUS, [E]N16931, EX[T]ENDED or [X]RECHNUNG",
|
||||
"E",
|
||||
"M|m|W|w|B|b|C|c|E|e|T|t|X|x|");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
@@ -670,7 +689,6 @@ public class Main {
|
||||
}
|
||||
zfProfile = zfProfile.toLowerCase();
|
||||
|
||||
|
||||
// Verify params
|
||||
ensureFileExists(pdfName);
|
||||
ensureFileExists(xmlName);
|
||||
@@ -712,6 +730,8 @@ public class Main {
|
||||
zfConformanceLevelProfile = Profiles.getByName(standard, "CIUS", zfIntVersion);
|
||||
} else if (zfProfile.equals("e")) {
|
||||
zfConformanceLevelProfile = Profiles.getByName(standard, "EN16931", zfIntVersion);
|
||||
} else if (zfProfile.equals("f")) {
|
||||
zfConformanceLevelProfile = Profiles.getByName(standard, "EXTENDED-CTC-FR", zfIntVersion);
|
||||
} else if (zfProfile.equals("t")) {
|
||||
zfConformanceLevelProfile = Profiles.getByName(standard, "EXTENDED", zfIntVersion);
|
||||
} else if (zfProfile.equals("x")) {
|
||||
@@ -738,7 +758,8 @@ public class Main {
|
||||
} else {
|
||||
if (format.equals("fx")) {
|
||||
zfIntVersion = 2;// actually we are talking of generation, not version
|
||||
// so even if someone correctly requested factur-x 1 internally we call it zugferd 2 :-(
|
||||
// so even if someone correctly requested factur-x 1 internally we call it
|
||||
// zugferd 2 :-(
|
||||
}
|
||||
ze = new ZUGFeRDExporterFromPDFA();
|
||||
if (ignoreInputErrors) {
|
||||
@@ -748,16 +769,16 @@ public class Main {
|
||||
|
||||
ze.load(pdfName);
|
||||
ze.setProducer("Mustang-cli")
|
||||
.setZUGFeRDVersion(zfIntVersion)
|
||||
.setCreator(System.getProperty("user.name")).setProfile(zfConformanceLevelProfile);
|
||||
.setZUGFeRDVersion(zfIntVersion)
|
||||
.setCreator(System.getProperty("user.name")).setProfile(zfConformanceLevelProfile);
|
||||
|
||||
if (format.equals("zf")) {
|
||||
ze.disableFacturX();
|
||||
}
|
||||
|
||||
|
||||
for (FileAttachment attachment : attachments) {
|
||||
ze.attachFile(attachment.getFilename(), attachment.getData(), attachment.getMimetype(), attachment.getRelation());
|
||||
ze.attachFile(attachment.getFilename(), attachment.getData(), attachment.getMimetype(),
|
||||
attachment.getRelation());
|
||||
}
|
||||
|
||||
ze.setXML(Files.readAllBytes(Paths.get(xmlName)));
|
||||
@@ -774,7 +795,7 @@ public class Main {
|
||||
}
|
||||
|
||||
private static void performMetrics(String directoryName, Boolean filesFromStdIn, Boolean ignoreFileExt)
|
||||
throws IOException {
|
||||
throws IOException {
|
||||
|
||||
StatRun sr = new StatRun();
|
||||
if (ignoreFileExt) {
|
||||
@@ -818,16 +839,14 @@ public class Main {
|
||||
} else {
|
||||
System.out.println("ZUGFeRD XML source set to " + sourceName);
|
||||
}
|
||||
if (!intoPDF) {
|
||||
if (lang == null) {
|
||||
try {
|
||||
lang = getStringFromUser("Output language", "en", "en|de|fr");
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
} else {
|
||||
System.out.println("Output language set to " + lang);
|
||||
if (lang == null) {
|
||||
try {
|
||||
lang = getStringFromUser("Output language", "en", "en|de|fr");
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
} else {
|
||||
System.out.println("Output language set to " + lang);
|
||||
}
|
||||
|
||||
if (outName == null) {
|
||||
@@ -855,18 +874,18 @@ public class Main {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
String xml = null;
|
||||
try {
|
||||
ZUGFeRDVisualizer.Language langCode = ZUGFeRDVisualizer.Language.EN;
|
||||
if (lang.equalsIgnoreCase("de")) {
|
||||
langCode = ZUGFeRDVisualizer.Language.DE;
|
||||
}
|
||||
if (lang.equalsIgnoreCase("fr")) {
|
||||
langCode = ZUGFeRDVisualizer.Language.FR;
|
||||
}
|
||||
if (!intoPDF) {
|
||||
ZUGFeRDVisualizer.Language langCode = ZUGFeRDVisualizer.Language.EN;
|
||||
if (lang.equalsIgnoreCase("de")) {
|
||||
langCode = ZUGFeRDVisualizer.Language.DE;
|
||||
}
|
||||
if (lang.equalsIgnoreCase("fr")) {
|
||||
langCode = ZUGFeRDVisualizer.Language.FR;
|
||||
}
|
||||
xml = zvi.visualize(sourceName, langCode);
|
||||
Files.write(Paths.get(outName), xml.getBytes());
|
||||
} else {
|
||||
zvi.toPDF(sourceName, outName);
|
||||
zvi.toPDF(sourceName, outName, langCode);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
@@ -880,13 +899,13 @@ public class Main {
|
||||
ExportResource("/xrechnung-viewer.css");
|
||||
ExportResource("/xrechnung-viewer.js");
|
||||
|
||||
System.out.println("xrechnung-viewer.css and xrechnung-viewer.js written as well (to local working dir)");
|
||||
System.out
|
||||
.println("xrechnung-viewer.css and xrechnung-viewer.js written as well (to local working dir)");
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -894,11 +913,14 @@ public class Main {
|
||||
*
|
||||
* @param resourceName ie.: "/SmartLibrary.dll"
|
||||
* @return The path to the exported resource
|
||||
* @throws Exception e.g. if the specified resource does not exist at the specified location
|
||||
* @throws Exception e.g. if the specified resource does not exist at the
|
||||
* specified location
|
||||
*/
|
||||
static public String ExportResource(String resourceName) throws Exception {
|
||||
String jarFolder;
|
||||
try (InputStream stream = Main.class.getResourceAsStream(resourceName)) {//note that each / is a directory down in the "jar tree" been the jar the root of the tree
|
||||
try (InputStream stream = Main.class.getResourceAsStream(resourceName)) {// note that each / is a directory down
|
||||
// in the "jar tree" been the jar
|
||||
// the root of the tree
|
||||
if (stream == null) {
|
||||
throw new Exception("Cannot get resource \"" + resourceName + "\" from Jar file.");
|
||||
}
|
||||
@@ -907,9 +929,9 @@ public class Main {
|
||||
byte[] buffer = new byte[4096];
|
||||
jarFolder = System.getProperty("user.dir");
|
||||
try (FileOutputStream resStreamOut = new FileOutputStream(jarFolder + resourceName)) {
|
||||
while ((readBytes = stream.read(buffer)) > 0) {
|
||||
resStreamOut.write(buffer, 0, readBytes);
|
||||
}
|
||||
while ((readBytes = stream.read(buffer)) > 0) {
|
||||
resStreamOut.write(buffer, 0, readBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,9 @@ public class CashDiscount implements IZUGFeRDCashDiscount {
|
||||
/***
|
||||
* the period (usually days) count how long the percent apply
|
||||
*/
|
||||
protected Integer days=null;
|
||||
protected Integer days;
|
||||
|
||||
protected BigDecimal basisAmount;
|
||||
|
||||
/***
|
||||
* Create a cash discount (skonto) with the specified height in the specified period.
|
||||
@@ -61,18 +63,31 @@ public class CashDiscount implements IZUGFeRDCashDiscount {
|
||||
return this;
|
||||
}
|
||||
|
||||
public BigDecimal getBasisAmount() {
|
||||
return basisAmount;
|
||||
}
|
||||
|
||||
public CashDiscount setBasisAmount(BigDecimal basisAmount) {
|
||||
this.basisAmount = basisAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
/***
|
||||
* @return this particular cash discount as cross industry invoice XML
|
||||
*/
|
||||
@JsonIgnore
|
||||
public String getAsCII() {
|
||||
return "<ram:SpecifiedTradePaymentTerms>"+
|
||||
"<ram:Description>Cash Discount</ram:Description>"+
|
||||
" <ram:ApplicableTradePaymentDiscountTerms>"+
|
||||
" <ram:BasisPeriodMeasure unitCode=\"DAY\">"+days+"</ram:BasisPeriodMeasure>"+
|
||||
" <ram:CalculationPercent>"+XMLTools.nDigitFormat(percent,3)+"</ram:CalculationPercent>"+
|
||||
" </ram:ApplicableTradePaymentDiscountTerms>"+
|
||||
"</ram:SpecifiedTradePaymentTerms>";
|
||||
String s = "<ram:SpecifiedTradePaymentTerms>"
|
||||
+ " <ram:Description>Cash Discount</ram:Description>"
|
||||
+ " <ram:ApplicableTradePaymentDiscountTerms>"
|
||||
+ " <ram:BasisPeriodMeasure unitCode=\"DAY\">" + days + "</ram:BasisPeriodMeasure>";
|
||||
if (basisAmount != null) {
|
||||
s += " <ram:BasisAmount>" + XMLTools.nDigitFormat(basisAmount, 2) + "</ram:BasisAmount>";
|
||||
}
|
||||
s += " <ram:CalculationPercent>"+XMLTools.nDigitFormat(percent,3)+"</ram:CalculationPercent>"+
|
||||
" </ram:ApplicableTradePaymentDiscountTerms>"+
|
||||
"</ram:SpecifiedTradePaymentTerms>";
|
||||
return s;
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -84,8 +99,4 @@ public class CashDiscount implements IZUGFeRDCashDiscount {
|
||||
public String getAsXRechnung() {
|
||||
return "#SKONTO#TAGE="+days+"#PROZENT="+XMLTools.nDigitFormat(percent,2)+"#\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
public class Invoice implements IExportableTransaction {
|
||||
|
||||
protected boolean testIndicator;
|
||||
protected String documentName = null, documentCode = null, number = null, ownOrganisationFullPlaintextInfo = null, referenceNumber = null, shipToOrganisationID = null, shipToOrganisationName = null, shipToStreet = null, shipToZIP = null, shipToLocation = null, shipToCountry = null, buyerOrderReferencedDocumentID = null, buyerOrderReferencedDocumentIssueDateTime = null, ownForeignOrganisationID = null, ownOrganisationName = null, currency = null, paymentTermDescription = null;
|
||||
protected Date issueDate = null, dueDate = null, deliveryDate = null;
|
||||
protected TradeParty sender = null, recipient = null, deliveryAddress = null, payee = null, invoicer = null, invoicee = null;
|
||||
@@ -75,13 +76,23 @@ public class Invoice implements IExportableTransaction {
|
||||
protected String creditorReferenceID; // required when direct debit is used.
|
||||
private BigDecimal roundingAmount=null;
|
||||
private String paymentReference; // Remittance information / Verwendungszweck, BT-83
|
||||
|
||||
private String businessProcessId;
|
||||
public Invoice() {
|
||||
ZFItems = new ArrayList<>();
|
||||
cashDiscounts = new ArrayList<>();
|
||||
setCurrency("EUR");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getTestIndicator() {
|
||||
return testIndicator;
|
||||
}
|
||||
|
||||
public Invoice setTestIndicator() {
|
||||
this.testIndicator = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDocumentName() {
|
||||
return documentName;
|
||||
@@ -197,7 +208,18 @@ public class Invoice implements IExportableTransaction {
|
||||
setObjectIdentifierReferencedDocument(dr);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Invoice setObjectIdentifierReferencedDocument(String id, String referenceTypeCode) {
|
||||
ReferencedDocument dr = new ReferencedDocument(id);
|
||||
dr.setReferenceTypeCode(referenceTypeCode);
|
||||
return setObjectIdentifierReferencedDocument(dr);
|
||||
}
|
||||
|
||||
public Invoice setObjectIdentifierReferencedDocument(String id, String referenceTypeCode, Date issueDate) {
|
||||
ReferencedDocument dr = new ReferencedDocument(id);
|
||||
dr.setReferenceTypeCode(referenceTypeCode);
|
||||
dr.setFormattedIssueDateTime(issueDate);
|
||||
return setObjectIdentifierReferencedDocument(dr);
|
||||
}
|
||||
|
||||
public Invoice setNumber(String number) {
|
||||
this.number = number;
|
||||
@@ -1156,4 +1178,14 @@ public class Invoice implements IExportableTransaction {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Invoice setBusinessProcessId(String id) {
|
||||
this.businessProcessId = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBusinessProcessId() {
|
||||
return businessProcessId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.net.URL;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -11,6 +12,19 @@ import org.apache.commons.io.IOUtils;
|
||||
import org.dom4j.io.XMLWriter;
|
||||
import org.mustangproject.ZUGFeRD.ZUGFeRDDateFormat;
|
||||
import org.w3c.dom.Node;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.SAXNotRecognizedException;
|
||||
import org.xml.sax.SAXNotSupportedException;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.transform.TransformerConfigurationException;
|
||||
import javax.xml.transform.TransformerFactory;
|
||||
import javax.xml.validation.Schema;
|
||||
import javax.xml.validation.SchemaFactory;
|
||||
import javax.xml.validation.Validator;
|
||||
|
||||
public class XMLTools extends XMLWriter {
|
||||
@Override
|
||||
@@ -23,6 +37,86 @@ public class XMLTools extends XMLWriter {
|
||||
return super.escapeElementEntities(s);
|
||||
}
|
||||
|
||||
public static DocumentBuilder getDocumentBuilder(boolean namespaceAware) throws ParserConfigurationException {
|
||||
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
//REDHAT
|
||||
//https://www.blackhat.com/docs/us-15/materials/us-15-Wang-FileCry-The-New-Age-Of-XXE-java-wp.pdf
|
||||
try {
|
||||
dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
} catch (ParserConfigurationException e) {
|
||||
// ignore
|
||||
}
|
||||
try {
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
|
||||
} catch (IllegalArgumentException e) {
|
||||
// ignore
|
||||
}
|
||||
try {
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
|
||||
} catch (IllegalArgumentException e) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
//OWASP
|
||||
//https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
|
||||
try {
|
||||
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
|
||||
} catch (ParserConfigurationException e) {
|
||||
// ignore
|
||||
}
|
||||
try {
|
||||
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
|
||||
} catch (ParserConfigurationException e) {
|
||||
// ignore
|
||||
}
|
||||
try {
|
||||
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
|
||||
} catch (ParserConfigurationException e) {
|
||||
// ignore
|
||||
}
|
||||
try {
|
||||
// Disable external DTDs as well
|
||||
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
|
||||
} catch (ParserConfigurationException e) {
|
||||
// ignore
|
||||
}
|
||||
// and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
|
||||
dbf.setXIncludeAware(false);
|
||||
dbf.setExpandEntityReferences(false);
|
||||
dbf.setNamespaceAware(namespaceAware);
|
||||
return dbf.newDocumentBuilder();
|
||||
}
|
||||
|
||||
public static Validator getValidator(URL schemaFile) throws SAXException
|
||||
{
|
||||
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
|
||||
try {
|
||||
schemaFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
|
||||
} catch (SAXNotSupportedException | SAXNotRecognizedException e) {
|
||||
// ignore
|
||||
}
|
||||
Schema schema = schemaFactory.newSchema(schemaFile);
|
||||
|
||||
Validator validator = schema.newValidator();
|
||||
try {
|
||||
validator.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
} catch (SAXNotSupportedException | SAXNotRecognizedException e) {
|
||||
// ignore
|
||||
}
|
||||
return validator;
|
||||
}
|
||||
|
||||
public static TransformerFactory getTransformerFactory()
|
||||
{
|
||||
TransformerFactory factory = new net.sf.saxon.TransformerFactoryImpl();
|
||||
try {
|
||||
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
} catch (TransformerConfigurationException e) {
|
||||
// ignore
|
||||
}
|
||||
return factory;
|
||||
}
|
||||
|
||||
public static String nDigitFormat(BigDecimal value, int scale) {
|
||||
/*
|
||||
* I needed 123.45, locale independent.I tried
|
||||
|
||||
@@ -49,12 +49,6 @@ public class CustomXMLProvider implements IXMLProvider {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTest() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Profile getProfile() {
|
||||
return profile;
|
||||
|
||||
@@ -41,28 +41,6 @@ public class DXExporterFromA1 extends DXExporterFromA3 {
|
||||
private static boolean isValidA1(DataSource dataSource) throws IOException {
|
||||
return getPDFAParserValidationResult(PreflightParserHelper.createPreflightParser (dataSource));
|
||||
}
|
||||
/***
|
||||
* internal helper function: get namespace for order-x
|
||||
* @param ver the delivery-x version
|
||||
* @return the URN of the namespace
|
||||
*/
|
||||
@Override
|
||||
public String getNamespaceForVersion(int ver) {
|
||||
// As of late 2022 the Delivery-X standard is not yet published. See specification:
|
||||
// Die digitale Ablösung des Papier-Lieferscheins, Version 1.1, April 2022
|
||||
// Chapter 7.1 XMP-Erweiterungsschema für PDF/A-3
|
||||
// http://docplayer.org/230301085-Der-digitale-lieferschein-dls.html
|
||||
return "urn:factur-x:pdfa:CrossIndustryDocument:despatchadvice:1p0#";
|
||||
}
|
||||
/***
|
||||
* internal helper: returns the namespace prefix for the given order-x version number
|
||||
* @param ver the ox version
|
||||
* @return the namespace prefix as string, without colon
|
||||
*/
|
||||
@Override
|
||||
public String getPrefixForVersion(int ver) {
|
||||
return "fx";
|
||||
}
|
||||
|
||||
private static boolean getPDFAParserValidationResult(PreflightParser parser) throws IOException {
|
||||
/*
|
||||
@@ -136,6 +114,7 @@ public class DXExporterFromA1 extends DXExporterFromA3 {
|
||||
public DXExporterFromA1 setConformanceLevel(PDFAConformanceLevel newLevel) {
|
||||
return (DXExporterFromA1) super.setConformanceLevel(newLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DXExporterFromA1 setProducer(String producer){
|
||||
return (DXExporterFromA1) super.setProducer(producer);
|
||||
|
||||
@@ -71,6 +71,7 @@ import jakarta.activation.FileDataSource;
|
||||
public class DXExporterFromA3 extends ZUGFeRDExporterFromA3 {
|
||||
|
||||
protected PDFAConformanceLevel conformanceLevel = PDFAConformanceLevel.UNICODE;
|
||||
protected boolean compressionEnabled = false;
|
||||
protected ArrayList<FileAttachment> fileAttachments = new ArrayList<>();
|
||||
|
||||
/**
|
||||
@@ -129,6 +130,29 @@ public class DXExporterFromA3 extends ZUGFeRDExporterFromA3 {
|
||||
|
||||
private boolean attachZUGFeRDHeaders = true;
|
||||
|
||||
/***
|
||||
* internal helper function: get namespace for order-x
|
||||
* @param ver the delivery-x version
|
||||
* @return the URN of the namespace
|
||||
*/
|
||||
@Override
|
||||
public String getNamespaceForVersion(int ver) {
|
||||
// As of late 2022 the Delivery-X standard is not yet published. See specification:
|
||||
// Die digitale Ablösung des Papier-Lieferscheins, Version 1.1, April 2022
|
||||
// Chapter 7.1 XMP-Erweiterungsschema für PDF/A-3
|
||||
// http://docplayer.org/230301085-Der-digitale-lieferschein-dls.html
|
||||
return "urn:factur-x:pdfa:CrossIndustryDocument:despatchadvice:1p0#";
|
||||
}
|
||||
/***
|
||||
* internal helper: returns the namespace prefix for the given order-x version number
|
||||
* @param ver the ox version
|
||||
* @return the namespace prefix as string, without colon
|
||||
*/
|
||||
@Override
|
||||
public String getPrefixForVersion(int ver) {
|
||||
return "fx";
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the
|
||||
* metadata level, this will not e.g. convert graphics to JPG-2000)
|
||||
@@ -296,8 +320,8 @@ public class DXExporterFromA3 extends ZUGFeRDExporterFromA3 {
|
||||
dict.setString("Desc", description);
|
||||
|
||||
ByteArrayInputStream fakeFile = new ByteArrayInputStream(data);
|
||||
PDEmbeddedFile ef = new PDEmbeddedFile(doc, fakeFile);
|
||||
// ef.addCompression();
|
||||
COSName filter = compressionEnabled ? COSName.FLATE_DECODE : null;
|
||||
PDEmbeddedFile ef = new PDEmbeddedFile(doc, fakeFile, filter);
|
||||
ef.setSubtype(subType);
|
||||
ef.setSize(data.length);
|
||||
ef.setCreationDate(new GregorianCalendar());
|
||||
@@ -417,7 +441,6 @@ public class DXExporterFromA3 extends ZUGFeRDExporterFromA3 {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public DXExporterFromA3 setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
|
||||
@@ -38,7 +38,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import org.mustangproject.FileAttachment;
|
||||
import org.mustangproject.IncludedNote;
|
||||
import org.mustangproject.ReferencedDocument;
|
||||
import org.mustangproject.TradeParty;
|
||||
import org.mustangproject.ZUGFeRD.model.DocumentCodeTypeConstants;
|
||||
|
||||
/***
|
||||
@@ -49,6 +48,11 @@ import org.mustangproject.ZUGFeRD.model.DocumentCodeTypeConstants;
|
||||
*/
|
||||
public interface IExportableTransaction {
|
||||
|
||||
@JsonIgnore
|
||||
default boolean getTestIndicator() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* appears in /rsm:CrossIndustryDocument/rsm:HeaderExchangedDocument/ram:Name
|
||||
*
|
||||
@@ -626,4 +630,16 @@ public interface IExportableTransaction {
|
||||
default String getCreditorReferenceID() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* BT-23 Business process identifier
|
||||
* /rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/
|
||||
* ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID
|
||||
*
|
||||
* @return business process ID (e.g. "B1" or a URN) or null if not provided
|
||||
*/
|
||||
default String getBusinessProcessId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,13 +22,9 @@ public interface IXMLProvider {
|
||||
|
||||
public byte[] getXML();
|
||||
|
||||
public void setTest();
|
||||
|
||||
public void generateXML(IExportableTransaction trans);
|
||||
|
||||
public void setProfile(Profile p);
|
||||
|
||||
public Profile getProfile();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ public interface IZUGFeRDExporter extends Closeable, IExporter {
|
||||
public IZUGFeRDExporter load(InputStream pdfSource) throws IOException;
|
||||
public IZUGFeRDExporter setCreator(String creator);
|
||||
public IZUGFeRDExporter setConformanceLevel(PDFAConformanceLevel newLevel);
|
||||
public IZUGFeRDExporter setEnablePDFAttachmentCompression(boolean enablePDFAttachmentCompression);
|
||||
public IZUGFeRDExporter setProducer(String producer);
|
||||
public IZUGFeRDExporter setZUGFeRDVersion(int version);
|
||||
public boolean ensurePDFIsValid(final DataSource dataSource) throws IOException;
|
||||
|
||||
@@ -41,24 +41,6 @@ public class OXExporterFromA1 extends OXExporterFromA3 {
|
||||
private static boolean isValidA1(DataSource dataSource) throws IOException {
|
||||
return getPDFAParserValidationResult(PreflightParserHelper.createPreflightParser(dataSource));
|
||||
}
|
||||
/***
|
||||
* internal helper function: get namespace for order-x
|
||||
* @param ver the order-x version
|
||||
* @return the URN of the namespace
|
||||
*/
|
||||
@Override
|
||||
public String getNamespaceForVersion(int ver) {
|
||||
return "urn:factur-x:pdfa:CrossIndustryDocument:1p0#";
|
||||
}
|
||||
/***
|
||||
* internal helper: returns the namespace prefix for the given order-x version number
|
||||
* @param ver the ox version
|
||||
* @return the namespace prefix as string, without colon
|
||||
*/
|
||||
@Override
|
||||
public String getPrefixForVersion(int ver) {
|
||||
return "fx";
|
||||
}
|
||||
|
||||
private static boolean getPDFAParserValidationResult(PreflightParser parser) throws IOException {
|
||||
/*
|
||||
|
||||
@@ -126,9 +126,30 @@ public class OXExporterFromA3 extends ZUGFeRDExporterFromA3 {
|
||||
*/
|
||||
protected String orderXDocumentType = "ORDER";
|
||||
|
||||
|
||||
private boolean attachZUGFeRDHeaders = true;
|
||||
|
||||
/***
|
||||
* internal helper function: get namespace for order-x
|
||||
* @param ver the order-x version
|
||||
* @return the URN of the namespace
|
||||
*/
|
||||
@Override
|
||||
public String getNamespaceForVersion(int ver) {
|
||||
return "urn:factur-x:pdfa:CrossIndustryDocument:1p0#";
|
||||
}
|
||||
/***
|
||||
* internal helper: returns the namespace prefix for the given order-x version number
|
||||
* @param ver the ox version
|
||||
* @return the namespace prefix as string, without colon
|
||||
*/
|
||||
@Override
|
||||
public String getPrefixForVersion(int ver) {
|
||||
return "fx";
|
||||
}
|
||||
|
||||
/** Defines whether attachments to the PDF should be using FLATE compression */
|
||||
private boolean compressionEnabled = false;
|
||||
|
||||
/**
|
||||
* Makes A PDF/A3a-compliant document from a PDF-A1 compliant document (on the
|
||||
* metadata level, this will not e.g. convert graphics to JPG-2000)
|
||||
@@ -296,8 +317,8 @@ public class OXExporterFromA3 extends ZUGFeRDExporterFromA3 {
|
||||
dict.setString("Desc", description);
|
||||
|
||||
ByteArrayInputStream fakeFile = new ByteArrayInputStream(data);
|
||||
PDEmbeddedFile ef = new PDEmbeddedFile(doc, fakeFile);
|
||||
// ef.addCompression();
|
||||
COSName filter = compressionEnabled ? COSName.FLATE_DECODE : null;
|
||||
PDEmbeddedFile ef = new PDEmbeddedFile(doc, fakeFile, filter);
|
||||
ef.setSubtype(subType);
|
||||
ef.setSize(data.length);
|
||||
ef.setCreationDate(new GregorianCalendar());
|
||||
|
||||
@@ -32,6 +32,7 @@ public class Profiles {
|
||||
{"BASICWL", new Profile("BASICWL", "urn:factur-x.eu:1p0:basicwl")},
|
||||
{"BASIC", new Profile("BASIC", "urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic")},
|
||||
{"EN16931", new Profile("EN16931", "urn:cen.eu:en16931:2017")},
|
||||
{"EXTENDED-CTC-FR", new Profile("EXTENDED-CTC-FR", "urn:cen.eu:en16931:2017#conformant#urn.cpro.gouv.fr:1p0:extended-ctc-fr")},
|
||||
{"EXTENDED", new Profile("EXTENDED", "urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended")},
|
||||
{"XRECHNUNG", new Profile("XRECHNUNG", "urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0")} // up next: urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0
|
||||
|
||||
|
||||
@@ -136,11 +136,6 @@ public class UBLDAPullProvider implements IXMLProvider {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTest() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProfile(Profile p) {
|
||||
profile = p;
|
||||
@@ -150,5 +145,4 @@ public class UBLDAPullProvider implements IXMLProvider {
|
||||
public Profile getProfile() {
|
||||
return profile;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.apache.fop.configuration.ConfigurationException;
|
||||
import org.apache.fop.configuration.DefaultConfigurationBuilder;
|
||||
import org.apache.xmlgraphics.util.MimeConstants;
|
||||
import org.mustangproject.ClasspathResolverURIAdapter;
|
||||
import org.mustangproject.XMLTools;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -42,8 +43,7 @@ public class ValidationLogVisualizer {
|
||||
|
||||
|
||||
public ValidationLogVisualizer() {
|
||||
mFactory = new net.sf.saxon.TransformerFactoryImpl();
|
||||
// fact = TransformerFactory.newInstance();
|
||||
mFactory = XMLTools.getTransformerFactory();
|
||||
mFactory.setURIResolver(new ValidationLogVisualizer.ClasspathResourceURIResolver());
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ import javax.xml.transform.URIResolver;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
|
||||
import org.mustangproject.XMLTools;
|
||||
|
||||
|
||||
/***
|
||||
* Uses a XSLT transformation to upgrade
|
||||
@@ -31,8 +33,7 @@ public class XMLUpgrader {
|
||||
private Templates mXsltTemplate = null;
|
||||
|
||||
public XMLUpgrader() {
|
||||
mFactory = new net.sf.saxon.TransformerFactoryImpl();
|
||||
//fact = TransformerFactory.newInstance();
|
||||
mFactory = XMLTools.getTransformerFactory();
|
||||
mFactory.setURIResolver(new ClasspathResourceURIResolver());
|
||||
}
|
||||
|
||||
|
||||
@@ -49,14 +49,6 @@ public class ZUGFeRD1PullProvider extends ZUGFeRD2PullProvider {
|
||||
private String paymentTermsDescription;
|
||||
protected Profile profile = Profiles.getByName("COMFORT", 1);
|
||||
|
||||
|
||||
/**
|
||||
* enables the flag to indicate a test invoice in the XML structure
|
||||
*/
|
||||
@Override
|
||||
public void setTest() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String vatFormat(BigDecimal value) {
|
||||
return XMLTools.nDigitFormat(value, 2);
|
||||
|
||||
@@ -35,7 +35,6 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.dom4j.Document;
|
||||
@@ -61,14 +60,6 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
private String paymentTermsDescription;
|
||||
protected Profile profile = Profiles.getByName("EN16931");
|
||||
|
||||
|
||||
/**
|
||||
* enables the flag to indicate a test invoice in the XML structure
|
||||
*/
|
||||
@Override
|
||||
public void setTest() {
|
||||
}
|
||||
|
||||
protected String vatFormat(BigDecimal value) {
|
||||
return XMLTools.nDigitFormat(value, 2);
|
||||
}
|
||||
@@ -384,11 +375,17 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
+ " xmlns:qdt=\"urn:un:unece:uncefact:data:standard:QualifiedDataType:100\">"
|
||||
+ "<!-- generated by: mustangproject.org v" + ZUGFeRD2PullProvider.class.getPackage().getImplementationVersion() + "-->"
|
||||
+ "<rsm:ExchangedDocumentContext>\n";
|
||||
// + "
|
||||
// <ram:TestIndicator><udt:Indicator>"+testBooleanStr+"</udt:Indicator></ram:TestIndicator>"
|
||||
//
|
||||
|
||||
if (getProfile() == Profiles.getByName("XRechnung")) {
|
||||
if (trans.getTestIndicator() && profile == Profiles.getByName("Extended")) {
|
||||
xml += "<ram:TestIndicator><udt:Indicator>" + trans.getTestIndicator() + "</udt:Indicator></ram:TestIndicator>";
|
||||
}
|
||||
|
||||
String businessProcessId = trans.getBusinessProcessId();
|
||||
if (businessProcessId != null && !businessProcessId.isBlank()) {
|
||||
xml += "<ram:BusinessProcessSpecifiedDocumentContextParameter>\n"
|
||||
+ "<ram:ID>" + XMLTools.encodeXML(businessProcessId) + "</ram:ID>\n"
|
||||
+ "</ram:BusinessProcessSpecifiedDocumentContextParameter>\n";
|
||||
}else if (getProfile() == Profiles.getByName("XRechnung")) {
|
||||
xml += "<ram:BusinessProcessSpecifiedDocumentContextParameter>\n"
|
||||
+ "<ram:ID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</ram:ID>\n"
|
||||
+ "</ram:BusinessProcessSpecifiedDocumentContextParameter>\n";
|
||||
@@ -419,8 +416,16 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
if ((getProfile() != Profiles.getByName("Minimum")) && (getProfile() != Profiles.getByName("BasicWL"))) {
|
||||
xml += "<ram:IncludedSupplyChainTradeLineItem>" +
|
||||
"<ram:AssociatedDocumentLineDocument>"
|
||||
+ "<ram:LineID>" + lineIDStr + "</ram:LineID>"
|
||||
+ buildItemNotes(currentItem)
|
||||
+ "<ram:LineID>" + lineIDStr + "</ram:LineID>";
|
||||
if (getProfile() == Profiles.getByName("Extended")) {
|
||||
if (currentItem.getParentLineID() != null) {
|
||||
xml += "<ram:ParentLineID>" + XMLTools.encodeXML(currentItem.getParentLineID()) + "</ram:ParentLineID>";
|
||||
}
|
||||
if (currentItem.getLineStatusReasonCode() != null) {
|
||||
xml += "<ram:LineStatusReasonCode>" + XMLTools.encodeXML(currentItem.getLineStatusReasonCode()) + "</ram:LineStatusReasonCode>";
|
||||
}
|
||||
}
|
||||
xml += buildItemNotes(currentItem)
|
||||
+ "</ram:AssociatedDocumentLineDocument>"
|
||||
|
||||
+ "<ram:SpecifiedTradeProduct>";
|
||||
@@ -550,15 +555,16 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
|
||||
xml += "</ram:SpecifiedLineTradeDelivery>"
|
||||
+ "<ram:SpecifiedLineTradeSettlement>"
|
||||
+ "<ram:ApplicableTradeTax>"
|
||||
+ "<ram:TypeCode>VAT</ram:TypeCode>";
|
||||
+ "<ram:ApplicableTradeTax>";
|
||||
// <CalculatedAmount/>
|
||||
xml += "<ram:TypeCode>VAT</ram:TypeCode>";
|
||||
if (currentItem.getProduct().getTaxExemptionReason() != null) {
|
||||
xml += "<ram:ExemptionReason>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + "</ram:ExemptionReason>";
|
||||
}
|
||||
xml += "<ram:CategoryCode>" + currentItem.getProduct().getTaxCategoryCode() + "</ram:CategoryCode>";
|
||||
if (currentItem.getProduct().getTaxExemptionReasonCode() != null) {
|
||||
xml += "<ram:ExemptionReasonCode>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReasonCode()) + "</ram:ExemptionReasonCode>";
|
||||
}
|
||||
xml += "<ram:CategoryCode>" + currentItem.getProduct().getTaxCategoryCode() + "</ram:CategoryCode>";
|
||||
BigDecimal vatValue=BigDecimal.ZERO;
|
||||
if (currentItem.getProduct().getTaxCategoryCode().equals(TaxCategoryCodeTypeConstants.ZEROTAXPRODUCTS)) {
|
||||
vatValue=BigDecimal.ZERO;
|
||||
@@ -662,6 +668,11 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
xml += "<ram:AdditionalReferencedDocument>"
|
||||
+ "<ram:IssuerAssignedID>" + XMLTools.encodeXML(trans.getObjectIdentifierReferencedDocument().getIssuerAssignedID()) + "</ram:IssuerAssignedID>"
|
||||
+ "<ram:TypeCode>130</ram:TypeCode>";
|
||||
// NEW: BT-18-1 scheme identifier
|
||||
String rtc = trans.getObjectIdentifierReferencedDocument().getReferenceTypeCode();
|
||||
if (rtc != null && !rtc.isEmpty()) {
|
||||
xml += "<ram:ReferenceTypeCode>" + XMLTools.encodeXML(rtc) + "</ram:ReferenceTypeCode>";
|
||||
}
|
||||
if (trans.getObjectIdentifierReferencedDocument().getFormattedIssueDateTime()!=null) {
|
||||
xml += "<ram:FormattedIssueDateTime>" + DATE.qdtFormat(trans.getObjectIdentifierReferencedDocument().getFormattedIssueDateTime()) + "</ram:FormattedIssueDateTime>";
|
||||
}
|
||||
@@ -700,6 +711,12 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
+ "</ram:ActualDeliverySupplyChainEvent>";
|
||||
}
|
||||
|
||||
if (trans.getDespatchAdviceReferencedDocumentID() != null && !trans.getDespatchAdviceReferencedDocumentID().trim().isEmpty()) {
|
||||
xml += "<ram:DespatchAdviceReferencedDocument>";
|
||||
xml += "<ram:IssuerAssignedID>" + XMLTools.encodeXML(trans.getDespatchAdviceReferencedDocumentID()) + "</ram:IssuerAssignedID>";
|
||||
xml += "</ram:DespatchAdviceReferencedDocument>";
|
||||
}
|
||||
|
||||
if (trans.getDeliveryNoteReferencedDocumentID() != null && !trans.getDeliveryNoteReferencedDocumentID().trim().isEmpty()) {
|
||||
xml += "<ram:DeliveryNoteReferencedDocument>";
|
||||
xml += "<ram:IssuerAssignedID>" + XMLTools.encodeXML(trans.getDeliveryNoteReferencedDocumentID()) + "</ram:IssuerAssignedID>";
|
||||
@@ -708,14 +725,6 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
xml += "<ram:FormattedIssueDateTime><qdt:DateTimeString format=\"102\">"+XMLTools.encodeXML(dateFormat102.format(trans.getDeliveryNoteReferencedDocumentDate()))+"</qdt:DateTimeString></ram:FormattedIssueDateTime>";
|
||||
}
|
||||
xml += "</ram:DeliveryNoteReferencedDocument>";
|
||||
|
||||
}
|
||||
|
||||
if (trans.getDespatchAdviceReferencedDocumentID() != null && !trans.getDespatchAdviceReferencedDocumentID().trim().isEmpty()) {
|
||||
xml += "<ram:DespatchAdviceReferencedDocument>";
|
||||
xml += "<ram:IssuerAssignedID>" + XMLTools.encodeXML(trans.getDespatchAdviceReferencedDocumentID()) + "</ram:IssuerAssignedID>";
|
||||
xml += "</ram:DespatchAdviceReferencedDocument>";
|
||||
|
||||
}
|
||||
|
||||
xml += "</ram:ApplicableHeaderTradeDelivery>";
|
||||
@@ -811,8 +820,14 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
xml += "<ram:SpecifiedTradeAllowanceCharge>" +
|
||||
"<ram:ChargeIndicator>" +
|
||||
"<udt:Indicator>true</udt:Indicator>" +
|
||||
"</ram:ChargeIndicator>" +
|
||||
"<ram:ActualAmount>" + currencyFormat(charge.getTotalAmount(calc)) + "</ram:ActualAmount>";
|
||||
"</ram:ChargeIndicator>";
|
||||
if (charge.getPercent() != null && (profile == Profiles.getByName("EN16931") || (profile == Profiles.getByName("EXTENDED")))) {
|
||||
xml += "<ram:CalculationPercent>" + vatFormat(charge.getPercent()) + "</ram:CalculationPercent>";
|
||||
}
|
||||
if (charge.getBasisAmount() != null && (profile == Profiles.getByName("EN16931") || (profile == Profiles.getByName("EXTENDED")))) {
|
||||
xml += "<ram:BasisAmount>" + currencyFormat(charge.getBasisAmount()) + "</ram:BasisAmount>";
|
||||
}
|
||||
xml += "<ram:ActualAmount>" + currencyFormat(charge.getTotalAmount(calc)) + "</ram:ActualAmount>";
|
||||
if (charge.getReasonCode() != null) {
|
||||
xml += "<ram:ReasonCode>" + charge.getReasonCode() + "</ram:ReasonCode>";
|
||||
}
|
||||
@@ -850,19 +865,25 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
||||
}
|
||||
|
||||
if ((trans.getZFAllowances() != null) && (trans.getZFAllowances().length > 0)) {
|
||||
if (profile == Profiles.getByName("XRechnung")) {
|
||||
if ((profile == Profiles.getByName("XRechnung")) || (profile == Profiles.getByName("EN16931")) || (profile == Profiles.getByName("EXTENDED"))) {
|
||||
for (IZUGFeRDAllowanceCharge allowance : trans.getZFAllowances()) {
|
||||
xml += "<ram:SpecifiedTradeAllowanceCharge>" +
|
||||
"<ram:ChargeIndicator>" +
|
||||
"<udt:Indicator>false</udt:Indicator>" +
|
||||
"</ram:ChargeIndicator>" +
|
||||
"<ram:ActualAmount>" + currencyFormat(allowance.getTotalAmount(calc)) + "</ram:ActualAmount>";
|
||||
if (allowance.getReason() != null) {
|
||||
xml += "<ram:Reason>" + XMLTools.encodeXML(allowance.getReason()) + "</ram:Reason>";
|
||||
"</ram:ChargeIndicator>";
|
||||
if (allowance.getPercent() != null) {
|
||||
xml += "<ram:CalculationPercent>" + vatFormat(allowance.getPercent()) + "</ram:CalculationPercent>";
|
||||
}
|
||||
if (allowance.getBasisAmount() != null) {
|
||||
xml += "<ram:BasisAmount>" + currencyFormat(allowance.getBasisAmount()) + "</ram:BasisAmount>";
|
||||
}
|
||||
xml += "<ram:ActualAmount>" + currencyFormat(allowance.getTotalAmount(calc)) + "</ram:ActualAmount>";
|
||||
if (allowance.getReasonCode() != null) {
|
||||
xml += "<ram:ReasonCode>" + allowance.getReasonCode() + "</ram:ReasonCode>";
|
||||
}
|
||||
if (allowance.getReason() != null) {
|
||||
xml += "<ram:Reason>" + XMLTools.encodeXML(allowance.getReason()) + "</ram:Reason>";
|
||||
}
|
||||
xml += "<ram:CategoryTradeTax>" +
|
||||
"<ram:TypeCode>VAT</ram:TypeCode>" +
|
||||
"<ram:CategoryCode>" + allowance.getCategoryCode() + "</ram:CategoryCode>";
|
||||
|
||||
@@ -77,8 +77,9 @@ import jakarta.activation.DataSource;
|
||||
import jakarta.activation.FileDataSource;
|
||||
|
||||
public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporter {
|
||||
private boolean isFacturX = true;
|
||||
|
||||
private boolean isFacturX = true;
|
||||
|
||||
public static final int DefaultZUGFeRDVersion = 2;
|
||||
protected boolean ignorePDFAErrors = false;
|
||||
|
||||
@@ -101,6 +102,9 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
|
||||
private Profile profile = null;
|
||||
protected boolean documentPrepared = false;
|
||||
|
||||
/** Defines whether attachments to the PDF should be using FLATE compression */
|
||||
private boolean compressionEnabled = false;
|
||||
|
||||
/**
|
||||
* Data (XML invoice) to be added to the ZUGFeRD PDF. It may be externally set,
|
||||
* in which case passing a IZUGFeRDExportableTransaction is not necessary. By
|
||||
@@ -392,7 +396,8 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
|
||||
dict.setString("Desc", description);
|
||||
|
||||
ByteArrayInputStream fakeFile = new ByteArrayInputStream(data);
|
||||
PDEmbeddedFile ef = new PDEmbeddedFile(doc, fakeFile);
|
||||
COSName filter = compressionEnabled ? COSName.FLATE_DECODE : null;
|
||||
PDEmbeddedFile ef = new PDEmbeddedFile(doc, fakeFile, filter);
|
||||
// ef.addCompression();
|
||||
ef.setSubtype(subType);
|
||||
ef.setSize(data.length);
|
||||
@@ -503,6 +508,12 @@ public class ZUGFeRDExporterFromA3 extends XRExporter implements IZUGFeRDExporte
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IZUGFeRDExporter setEnablePDFAttachmentCompression(boolean compressionEnabled) {
|
||||
this.compressionEnabled = compressionEnabled;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public ZUGFeRDExporterFromA3 setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
|
||||
@@ -188,6 +188,10 @@ public class ZUGFeRDExporterFromPDFA implements IZUGFeRDExporter {
|
||||
return getExporter().setConformanceLevel(newLevel);
|
||||
}
|
||||
|
||||
public IZUGFeRDExporter setEnablePDFAttachmentCompression(boolean compressionEnabled) {
|
||||
return getExporter().setEnablePDFAttachmentCompression(compressionEnabled);
|
||||
}
|
||||
|
||||
public IZUGFeRDExporter setProducer(String producer) {
|
||||
|
||||
return getExporter().setProducer(producer);
|
||||
|
||||
@@ -19,6 +19,8 @@ import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.xpath.XPath;
|
||||
import javax.xml.xpath.XPathConstants;
|
||||
import javax.xml.xpath.XPathExpression;
|
||||
@@ -29,6 +31,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ZUGFeRDImporter.class);
|
||||
@@ -472,17 +475,6 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return raw XML of the invoice
|
||||
*/
|
||||
public String getMeta() {
|
||||
if (rawXML == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new String(rawXML, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
|
||||
public int getVersion() throws Exception {
|
||||
if (!containsMeta) {
|
||||
@@ -517,20 +509,6 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* will return true if the metadata (just extract-ed or set with setMeta) contains ZUGFeRD XML
|
||||
*
|
||||
* @return true if the invoice contains ZUGFeRD XML
|
||||
*/
|
||||
public boolean canParse() {
|
||||
|
||||
// SpecifiedExchangedDocumentContext is in the schema, so a relatively good
|
||||
// indication if zugferd is present - better than just invoice
|
||||
final String meta = getMeta();
|
||||
return (meta != null) && (meta.length() > 0) && ((meta.contains("SpecifiedExchangedDocumentContext")
|
||||
/* ZF1 */ || meta.contains("ExchangedDocumentContext") /* ZF2 */));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns an instance of PostalTradeAddress for SellerTradeParty section
|
||||
|
||||
@@ -18,9 +18,7 @@ import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.xpath.XPath;
|
||||
import javax.xml.xpath.XPathConstants;
|
||||
@@ -48,6 +46,7 @@ import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -311,36 +310,62 @@ public class ZUGFeRDInvoiceImporter {
|
||||
setRawXML(rawXML, true);
|
||||
}
|
||||
|
||||
private void setDocument() throws ParserConfigurationException, IOException, SAXException, ParseException {
|
||||
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
//REDHAT
|
||||
//https://www.blackhat.com/docs/us-15/materials/us-15-Wang-FileCry-The-New-Age-Of-XXE-java-wp.pdf
|
||||
dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
|
||||
|
||||
//OWASP
|
||||
//https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
|
||||
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
|
||||
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
|
||||
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
|
||||
// Disable external DTDs as well
|
||||
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
|
||||
// and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
|
||||
dbf.setXIncludeAware(false);
|
||||
dbf.setExpandEntityReferences(false);
|
||||
dbf.setNamespaceAware(true);
|
||||
final DocumentBuilder builder = dbf.newDocumentBuilder();
|
||||
/**
|
||||
* @return raw XML of the invoice
|
||||
*/
|
||||
public String getMeta() {
|
||||
if (rawXML == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new String(rawXML, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* will return true if the metadata (just extract-ed or set with setMeta) contains ZUGFeRD XML
|
||||
*
|
||||
* @return true if the invoice contains ZUGFeRD XML
|
||||
*/
|
||||
public boolean canParse() {
|
||||
|
||||
// SpecifiedExchangedDocumentContext is in the schema, so a relatively good
|
||||
// indication if zugferd is present - better than just invoice
|
||||
final String meta = getMeta();
|
||||
if ((meta == null) || (meta.length() == 0)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ByteArrayInputStream is = new ByteArrayInputStream(rawXML);
|
||||
/// is.skip(guessBOMSize(is));
|
||||
document = builder.parse(is);
|
||||
if (parseAutomatically) {
|
||||
try {
|
||||
importedInvoice = new CalculatedInvoice();
|
||||
extractInto(importedInvoice);
|
||||
} catch (XPathExpressionException e) {
|
||||
throw new RuntimeException(e);
|
||||
try {
|
||||
DocumentBuilder builder = XMLTools.getDocumentBuilder(true);
|
||||
document = builder.parse(is);
|
||||
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
return ((meta.contains("SpecifiedExchangedDocumentContext")
|
||||
/* ZF1 */ || meta.contains("ExchangedDocumentContext") /* ZF2 */));
|
||||
}
|
||||
|
||||
private void setDocument() throws ParserConfigurationException, IOException, SAXException, ParseException {
|
||||
|
||||
|
||||
final ByteArrayInputStream is = new ByteArrayInputStream(rawXML);
|
||||
/// is.skip(guessBOMSize(is));
|
||||
DocumentBuilder builder = XMLTools.getDocumentBuilder(true);
|
||||
if (canParse()) {
|
||||
document = builder.parse(is);
|
||||
if (parseAutomatically) {
|
||||
try {
|
||||
importedInvoice = new CalculatedInvoice();
|
||||
extractInto(importedInvoice);
|
||||
} catch (XPathExpressionException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,7 +497,7 @@ public class ZUGFeRDInvoiceImporter {
|
||||
xpr = xpath.compile("//*[local-name()=\"ExchangedDocument\"]|//*[local-name()=\"HeaderExchangedDocument\"]");
|
||||
NodeList ExchangedDocumentNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||
|
||||
xpr = xpath.compile("//*[local-name()=\"GrandTotalAmount\"]|//*[local-name()=\"TaxInclusiveAmount\"]");
|
||||
xpr = xpath.compile("//*[local-name()=\"SpecifiedTradeSettlementMonetarySummation\"]/*[local-name()=\"GrandTotalAmount\"]|//*[local-name()=\"SpecifiedTradeSettlementHeaderMonetarySummation\"]/*[local-name()=\"GrandTotalAmount\"]|//*[local-name()=\"LegalMonetaryTotal\"]/*[local-name()=\"TaxInclusiveAmount\"]");
|
||||
BigDecimal expectedGrandTotal = null;
|
||||
NodeList totalNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||
if (totalNodes.getLength() > 0) {
|
||||
@@ -485,7 +510,7 @@ public class ZUGFeRDInvoiceImporter {
|
||||
}
|
||||
}
|
||||
|
||||
xpr = xpath.compile("//*[local-name()=\"TaxBasisTotalAmount\"]|//*[local-name()=\"TaxExclusiveAmount\"]");
|
||||
xpr = xpath.compile("//*[local-name()=\"SpecifiedTradeSettlementMonetarySummation\"]/*[local-name()=\"TaxBasisTotalAmount\"]|//*[local-name()=\"SpecifiedTradeSettlementHeaderMonetarySummation\"]/*[local-name()=\"TaxBasisTotalAmount\"]|//*[local-name()=\"LegalMonetaryTotal\"]/*[local-name()=\"TaxExclusiveAmount\"]");
|
||||
BigDecimal expectedTaxBasis = null;
|
||||
NodeList basisNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||
if (basisNodes.getLength() > 0) {
|
||||
@@ -628,14 +653,8 @@ public class ZUGFeRDInvoiceImporter {
|
||||
}
|
||||
|
||||
String tenderReference = extractString("/*[local-name()=\"Invoice\" or local-name()=\"CreditNote\"]/*[local-name()=\"OriginatorDocumentReference\"]/*[local-name()=\"ID\"]").trim();
|
||||
String tenderReferenceDate = extractString("/*[local-name()=\"Invoice\" or local-name()=\"CreditNote\"]/*[local-name()=\"OriginatorDocumentReference\"]/*[local-name()=\"ID\"]").trim();
|
||||
if((tenderReference != null)&&(!tenderReference.isEmpty())){
|
||||
if((tenderReferenceDate != null)&&(!tenderReferenceDate.isEmpty())){
|
||||
zpp.setTenderReferencedDocument(new ReferencedDocument(tenderReference, parseDate(tenderReferenceDate, "yyyy-MM-dd")));
|
||||
} else {
|
||||
zpp.setTenderReferencedDocument(tenderReference);
|
||||
}
|
||||
|
||||
zpp.setTenderReferencedDocument(tenderReference);
|
||||
}
|
||||
|
||||
String dueDt = extractString("/*[local-name()=\"Invoice\" or local-name()=\"CreditNote\"]/*[local-name()=\"DueDate\"] | /*[local-name()=\"CreditNote\"]/*[local-name()=\"PaymentMeans\"]/*[local-name()=\"PaymentDueDate\"]").trim();
|
||||
@@ -1275,6 +1294,25 @@ public class ZUGFeRDInvoiceImporter {
|
||||
//appliedAmount
|
||||
//AppliedTradeTax
|
||||
}
|
||||
|
||||
if (cd.getDays() == null) {
|
||||
NodeList siblingNodes = cashdiscountNodes.item(i).getParentNode().getChildNodes();
|
||||
for (int siblingIndex = 0; siblingIndex < siblingNodes.getLength(); siblingIndex++) {
|
||||
if (siblingNodes.item(siblingIndex).getLocalName() != null && siblingNodes.item(siblingIndex).getLocalName().equals("DueDateDateTime")) {
|
||||
NodeList dueDateChilds = siblingNodes.item(siblingIndex).getChildNodes();
|
||||
for (int dueDateChildIndex = 0; dueDateChildIndex < dueDateChilds.getLength(); dueDateChildIndex++) {
|
||||
if ((dueDateChilds.item(dueDateChildIndex).getLocalName() != null) && (dueDateChilds.item(dueDateChildIndex).getLocalName().equals("DateTimeString"))) {
|
||||
String dueDateString = XMLTools.trimOrNull(dueDateChilds.item(dueDateChildIndex));
|
||||
dueDate = parseDate(dueDateString, "yyyyMMdd");
|
||||
long diffInMillies = Math.abs(dueDate.getTime() - zpp.getIssueDate().getTime());
|
||||
long diffInDays = TimeUnit.DAYS.convert(diffInMillies, TimeUnit.MILLISECONDS);
|
||||
cd.setDays((int) diffInDays);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((cd.getPercent() != null)&&(cd.getDays() != null)) {
|
||||
zpp.addCashDiscount(cd);
|
||||
}
|
||||
@@ -1331,6 +1369,9 @@ public class ZUGFeRDInvoiceImporter {
|
||||
+ Stream.of(tc.trans.getZFItems())
|
||||
.map(item -> item.getCalculation().getItemTotalNetAmount().toPlainString())
|
||||
.collect(Collectors.joining(" + "));
|
||||
if (tc.trans.getRoundingAmount()!=null) {
|
||||
moreDetails += " and rounding amount "+tc.trans.getRoundingAmount().toPlainString();
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
throw new ArithmeticException("Payable total in XML is " + payableTotalFromXml + ", but calculated total is " + calculatedPayableTotal + moreDetails);
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.apache.fop.configuration.DefaultConfigurationBuilder;
|
||||
import org.apache.xmlgraphics.util.MimeConstants;
|
||||
import org.mustangproject.ClasspathResolverURIAdapter;
|
||||
import org.mustangproject.EStandard;
|
||||
import org.mustangproject.XMLTools;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.w3c.dom.Document;
|
||||
@@ -39,7 +40,6 @@ import org.w3c.dom.Element;
|
||||
import org.xml.sax.InputSource;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.transform.*;
|
||||
import javax.xml.transform.sax.SAXResult;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
@@ -47,8 +47,6 @@ import javax.xml.transform.stream.StreamSource;
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Consumer;
|
||||
@@ -85,8 +83,7 @@ public class ZUGFeRDVisualizer {
|
||||
private Templates mXsltZF1HTMLTemplate = null;
|
||||
|
||||
public ZUGFeRDVisualizer() {
|
||||
mFactory = new net.sf.saxon.TransformerFactoryImpl();
|
||||
// fact = TransformerFactory.newInstance();
|
||||
mFactory = XMLTools.getTransformerFactory();
|
||||
mFactory.setURIResolver(new ClasspathResourceURIResolver());
|
||||
}
|
||||
|
||||
@@ -104,40 +101,8 @@ public class ZUGFeRDVisualizer {
|
||||
String ublCreditNoteSignature = "CreditNote";
|
||||
String cioSignature = "SCRDMCCBDACIOMessageStructure";
|
||||
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
//REDHAT
|
||||
//https://www.blackhat.com/docs/us-15/materials/us-15-Wang-FileCry-The-New-Age-Of-XXE-java-wp.pdf
|
||||
dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
try
|
||||
{
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
LOGGER.warn("Property: \"Access external DTD\" not supported.");
|
||||
}
|
||||
try
|
||||
{
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
LOGGER.warn("Property: \"Access external schema\" not supported.");
|
||||
}
|
||||
|
||||
//OWASP
|
||||
//https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
|
||||
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
|
||||
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
|
||||
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
|
||||
// Disable external DTDs as well
|
||||
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
|
||||
// and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
|
||||
dbf.setXIncludeAware(false);
|
||||
dbf.setExpandEntityReferences(false);
|
||||
dbf.setNamespaceAware(true);
|
||||
try {
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
DocumentBuilder db = XMLTools.getDocumentBuilder(true);
|
||||
Document doc = db.parse(new InputSource(fis));
|
||||
Element root = doc.getDocumentElement();
|
||||
if (root.getLocalName().equals(zf1Signature)) {
|
||||
@@ -252,7 +217,7 @@ public class ZUGFeRDVisualizer {
|
||||
}
|
||||
}
|
||||
|
||||
protected String toFOP(String xmlFilename)
|
||||
protected String toFOP(String xmlFilename, Language lang)
|
||||
throws IOException, TransformerException, ParserConfigurationException {
|
||||
EStandard theStandard;
|
||||
try (FileInputStream fis = new FileInputStream(xmlFilename)) {
|
||||
@@ -260,11 +225,11 @@ public class ZUGFeRDVisualizer {
|
||||
}
|
||||
|
||||
try (FileInputStream fis = new FileInputStream(xmlFilename)) {
|
||||
return toFOP(fis, theStandard);
|
||||
return toFOP(fis, theStandard, lang);
|
||||
}
|
||||
}
|
||||
|
||||
protected String toFOP(InputStream is, EStandard theStandard)
|
||||
protected String toFOP(InputStream is, EStandard theStandard, Language lang)
|
||||
throws TransformerException, IOException {
|
||||
|
||||
try {
|
||||
@@ -291,12 +256,16 @@ public class ZUGFeRDVisualizer {
|
||||
Optional<InputStream> in = copyStream(iaos);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
if (in.isPresent()) {
|
||||
applyXSLTToPDF(in.get(), baos);
|
||||
applyXSLTToPDF(in.get(), baos, lang);
|
||||
}
|
||||
return baos.toString(StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
public void toPDF(String xmlFilename, String pdfFilename) {
|
||||
toPDF(xmlFilename, pdfFilename, Language.DE);
|
||||
}
|
||||
|
||||
public void toPDF(String xmlFilename, String pdfFilename, Language lang) {
|
||||
|
||||
// the writing part
|
||||
File XMLinputFile = new File(xmlFilename);
|
||||
@@ -307,7 +276,7 @@ public class ZUGFeRDVisualizer {
|
||||
out from git with arbitrary options (which may include CSRF changes)
|
||||
*/
|
||||
try {
|
||||
fopInput = this.toFOP(XMLinputFile.getAbsolutePath());
|
||||
fopInput = this.toFOP(XMLinputFile.getAbsolutePath(), lang);
|
||||
} catch (TransformerException | IOException | ParserConfigurationException e) {
|
||||
LOGGER.error("Failed to apply FOP", e);
|
||||
}
|
||||
@@ -321,8 +290,12 @@ public class ZUGFeRDVisualizer {
|
||||
return null;
|
||||
}, (OutputStream out) -> {});
|
||||
}
|
||||
|
||||
|
||||
public byte[] toPDF(String xmlContent) {
|
||||
return toPDF(xmlContent, Language.DE);
|
||||
}
|
||||
|
||||
public byte[] toPDF(String xmlContent, Language lang) {
|
||||
|
||||
String fopInput = null;
|
||||
|
||||
@@ -334,7 +307,7 @@ public class ZUGFeRDVisualizer {
|
||||
EStandard theStandard = findOutStandardFromRootNode(fis);
|
||||
fis = new ByteArrayInputStream(xmlContent.getBytes(StandardCharsets.UTF_8));//rewind :-(
|
||||
|
||||
fopInput = toFOP(fis, theStandard);
|
||||
fopInput = toFOP(fis, theStandard, lang);
|
||||
} catch (TransformerException | IOException | ParserConfigurationException e) {
|
||||
LOGGER.error("Failed to apply FOP", e);
|
||||
}
|
||||
@@ -470,9 +443,10 @@ public class ZUGFeRDVisualizer {
|
||||
xmlFile.close();
|
||||
}
|
||||
|
||||
protected void applyXSLTToPDF(final InputStream xmlFile, final OutputStream PDFOutstream)
|
||||
protected void applyXSLTToPDF(final InputStream xmlFile, final OutputStream PDFOutstream, Language lang)
|
||||
throws TransformerException, IOException {
|
||||
Transformer transformer = mXsltPDFTemplate.newTransformer();
|
||||
transformer.setParameter("lang", lang.name().toLowerCase());
|
||||
|
||||
transformer.transform(new StreamSource(xmlFile), new StreamResult(PDFOutstream));
|
||||
xmlFile.close();
|
||||
|
||||
254
library/src/main/resources/stylesheets/l10n/fr.xml
Normal file
254
library/src/main/resources/stylesheets/l10n/fr.xml
Normal file
@@ -0,0 +1,254 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<properties>
|
||||
<entry key="xr:Buyer_reference" id="BT-10">Référence acheteur</entry>
|
||||
<entry key="xr:Buyer_name" id="BT-44">Nom</entry>
|
||||
<entry key="xr:Buyer_address_line_1" id="BT-50">Adresse ligne 1</entry>
|
||||
<entry key="xr:Buyer_address_line_2" id="BT-51">Adresse ligne 2</entry>
|
||||
<entry key="xr:Buyer_address_line_3" id="BT-163">Adresse ligne 3</entry>
|
||||
<entry key="xr:Buyer_post_code" id="BT-53">Code postal</entry>
|
||||
<entry key="xr:Buyer_city" id="BT-52">Ville</entry>
|
||||
<entry key="xr:Buyer_country_code" id="BT-55">Code pays</entry>
|
||||
<entry key="xr:Buyer_identifier" id="BT-46">Identifiant</entry>
|
||||
<entry key="xr:Buyer_identifier/@scheme_identifier" id="BT-46_scheme">Schéma de l'identifiant</entry>
|
||||
<entry key="xr:Buyer_contact_point" id="BT-56">Nom</entry>
|
||||
<entry key="xr:Buyer_contact_telephone_number" id="BT-57">Téléphone</entry>
|
||||
<entry key="xr:Buyer_contact_email_address" id="BT-58">Adresse e-mail</entry>
|
||||
<entry key="xr:Seller_name" id="BT-27">Raison sociale</entry>
|
||||
<entry key="xr:Seller_address_line_1" id="BT-35">Adresse ligne 1</entry>
|
||||
<entry key="xr:Seller_address_line_2" id="BT-36">Adresse ligne 2</entry>
|
||||
<entry key="xr:Seller_address_line_3" id="BT-162">Adresse ligne 3</entry>
|
||||
<entry key="xr:Seller_post_code" id="BT-38">Code postal</entry>
|
||||
<entry key="xr:Seller_city" id="BT-37">Ville</entry>
|
||||
<entry key="xr:Seller_country_subdivision" id="BT-39">Région</entry>
|
||||
<entry key="xr:Seller_country_code" id="BT-40">Code pays</entry>
|
||||
<entry key="xr:Seller_identifier" id="BT-29">Identifiant</entry>
|
||||
<entry key="xr:Seller_identifier/@scheme_identifier" id="BT-29_scheme">Schéma de l'identifiant</entry>
|
||||
<entry key="xr:Seller_contact_point" id="BT-41">Nom</entry>
|
||||
<entry key="xr:Seller_contact_telephone_number" id="BT-42">Téléphone</entry>
|
||||
<entry key="xr:Seller_contact_email_address" id="BT-43">Adresse e-mail</entry>
|
||||
<entry key="xr:Invoice_number" id="BT-1">Numéro de facture</entry>
|
||||
<entry key="xr:Invoice_issue_date" id="BT-2">Date de facture</entry>
|
||||
<entry key="xr:Invoice_type_code" id="BT-3">Type de facture</entry>
|
||||
<entry key="xr:Invoice_currency_code" id="BT-5">Devise</entry>
|
||||
<entry key="xr:Project_reference" id="BT-11">Numéro de projet</entry>
|
||||
<entry key="xr:Contract_reference" id="BT-12">Numéro de contrat</entry>
|
||||
<entry key="xr:Purchase_order_reference" id="BT-13">Numéro de commande</entry>
|
||||
<entry key="xr:Sales_order_reference" id="BT-14">Référence de commande client</entry>
|
||||
<!-- Be aware that these are for the whole invoice -->
|
||||
<entry key="xr:Invoicing_period_start_date" id="BT-73">Du</entry>
|
||||
<entry key="xr:Invoicing_period_end_date" id="BT-74">Au</entry>
|
||||
<entry key="xr:Preceding_Invoice_reference" id="BT-25">Numéro de facture</entry>
|
||||
<entry key="xr:Preceding_Invoice_issue_date" id="BT-26">Date de facture</entry>
|
||||
<entry key="xr:Sum_of_Invoice_line_net_amount" id="BT-106">Total des lignes</entry>
|
||||
<entry key="xr:Sum_of_allowances_on_document_level" id="BT-107">Total des remises</entry>
|
||||
<entry key="xr:Sum_of_charges_on_document_level" id="BT-108">Total des frais</entry>
|
||||
<entry key="xr:Invoice_total_amount_without_VAT" id="BT-109">Total HT</entry>
|
||||
<entry key="xr:Invoice_total_VAT_amount" id="BT-110">Total TVA</entry>
|
||||
<entry key="xr:Invoice_total_VAT_amount_in_accounting_currency" id="BT-111">Total TVA en devise comptable</entry>
|
||||
<entry key="xr:Invoice_total_amount_with_VAT" id="BT-112">Total TTC</entry>
|
||||
<entry key="xr:Paid_amount" id="BT-113">Montant payé</entry>
|
||||
<entry key="xr:Rounding_amount" id="BT-114">Montant d'arrondi</entry>
|
||||
<entry key="xr:Amount_due_for_payment" id="BT-115">Montant dû</entry>
|
||||
<entry key="xr:VAT_category_code" id="BT-118">Catégorie de TVA</entry>
|
||||
<entry key="xr:VAT_category_taxable_amount" id="BT-116">Total</entry>
|
||||
<entry key="xr:VAT_category_rate" id="BT-119">Taux de TVA</entry>
|
||||
<entry key="xr:VAT_category_tax_amount" id="BT-117">Montant de TVA</entry>
|
||||
<entry key="xr:VAT_exemption_reason_text" id="BT-120">Motif d'exonération</entry>
|
||||
<entry key="xr:VAT_exemption_reason_code" id="BT-121">Code du motif d'exonération</entry>
|
||||
<!-- Remises -->
|
||||
<entry key="xr:Document_level_allowance_VAT_category_code" id="BT-95">Catégorie de TVA de la remise</entry>
|
||||
<entry key="xr:Document_level_allowance_base_amount" id="BT-93">Montant de base</entry>
|
||||
<entry key="xr:Document_level_allowance_percentage" id="BT-94">Pourcentage</entry>
|
||||
<entry key="xr:Document_level_allowance_amount" id="BT-92">Remise</entry>
|
||||
<entry key="xr:Document_level_allowance_VAT_rate" id="BT-96">Taux de TVA de la remise</entry>
|
||||
<entry key="xr:Document_level_allowance_reason" id="BT-97">Motif de la remise</entry>
|
||||
<entry key="xr:Document_level_allowance_reason_code" id="BT-98">Code du motif de la remise</entry>
|
||||
<!-- Frais -->
|
||||
<entry key="xr:Document_level_charge_VAT_category_code" id="BT-102">Catégorie de TVA des frais</entry>
|
||||
<entry key="xr:Document_level_charge_base_amount" id="BT-100">Montant de base</entry>
|
||||
<entry key="xr:Document_level_charge_percentage" id="BT-101">Pourcentage</entry>
|
||||
<entry key="xr:Document_level_charge_amount" id="BT-99">Frais</entry>
|
||||
<entry key="xr:Document_level_charge_VAT_rate" id="BT-103">Taux de TVA des frais</entry>
|
||||
<entry key="xr:Document_level_charge_reason" id="BT-104">Motif des frais</entry>
|
||||
<entry key="xr:Document_level_charge_reason_code" id="BT-105">Code du motif des frais</entry>
|
||||
<entry key="xr:Payment_terms" id="BT-20">Escompte ; autres conditions de paiement</entry>
|
||||
<entry key="xr:Payment_due_date" id="BT-9">Date d'échéance</entry>
|
||||
<entry key="xr:Payment_means_type_code" id="BT-81">Code du moyen de paiement</entry>
|
||||
<entry key="xr:Payment_means_text" id="BT-82">Moyen de paiement</entry>
|
||||
<entry key="xr:Remittance_information" id="BT-83">Référence de paiement</entry>
|
||||
<entry key="xr:Payment_card_primary_account_number" id="BT-87">Numéro de carte</entry>
|
||||
<entry key="xr:Payment_card_holder_name" id="BT-88">Titulaire de la carte</entry>
|
||||
<!-- BG-19 Direct Debit -->
|
||||
<entry key="xr:Mandate_reference_identifier" id="BT-89">Référence du mandat</entry>
|
||||
<entry key="xr:Debited_account_identifier" id="BT-91">IBAN</entry>
|
||||
<entry key="xr:Bank_assigned_creditor_identifier" id="BT-90">Identifiant créancier</entry>
|
||||
<!-- BG-17 Credit Transfer-->
|
||||
<entry key="xr:Payment_account_name" id="BT-85">Titulaire du compte</entry>
|
||||
<entry key="xr:Payment_account_identifier" id="BT-84">IBAN</entry>
|
||||
<entry key="xr:Payment_service_provider_identifier" id="BT-86">BIC</entry>
|
||||
<entry key="xr:Invoice_note_subject_code" id="BT-21">Objet</entry>
|
||||
<entry key="xr:Invoice_note" id="BT-22">Remarque</entry>
|
||||
<!-- BG-4 Seller and others -->
|
||||
<entry key="xr:Seller_trading_name" id="BT-28">Nom commercial</entry>
|
||||
<entry key="xr:Seller_electronic_address" id="BT-34">Adresse électronique</entry>
|
||||
<entry key="xr:Seller_electronic_address/@scheme_identifier" id="BT-34_scheme">Schéma de l'adresse électronique</entry>
|
||||
<entry key="xr:Seller_legal_registration_identifier" id="BT-30">Numéro SIRET/SIREN</entry>
|
||||
<entry key="xr:Seller_legal_registration_identifier/@scheme_identifier" id="BT-30_scheme">Schéma du numéro d'enregistrement</entry>
|
||||
<entry key="xr:Seller_VAT_identifier" id="BT-31">Numéro de TVA intracommunautaire</entry>
|
||||
<entry key="xr:Seller_tax_registration_identifier" id="BT-32">Numéro fiscal</entry>
|
||||
<entry key="xr:Seller_additional_legal_information" id="BT-33">Informations juridiques complémentaires</entry>
|
||||
<entry key="xr:VAT_accounting_currency_code" id="BT-6">Code devise de la TVA</entry>
|
||||
<!-- BG 12 and 11 Tax Representative party -->
|
||||
<entry key="xr:Seller_tax_representative_name" id="BT-62">Nom</entry>
|
||||
<entry key="xr:Tax_representative_address_line_1" id="BT-64">Adresse ligne 1</entry>
|
||||
<entry key="xr:Tax_representative_address_line_2" id="BT-65">Adresse ligne 2</entry>
|
||||
<entry key="xr:Tax_representative_address_line_3" id="BT-164">Adresse ligne 3</entry>
|
||||
<entry key="xr:Tax_representative_post_code" id="BT-67">Code postal</entry>
|
||||
<entry key="xr:Tax_representative_city" id="BT-66">Ville</entry>
|
||||
<entry key="xr:Tax_representative_country_subdivision" id="BT-68">Région</entry>
|
||||
<entry key="xr:Tax_representative_country_code" id="BT-69">Code pays</entry>
|
||||
<entry key="xr:Seller_tax_representative_VAT_identifier" id="BT-63">Numéro de TVA intracommunautaire</entry>
|
||||
<!-- Additional buyer information from different bgs -->
|
||||
<entry key="xr:Buyer_trading_name" id="BT-45">Nom commercial</entry>
|
||||
<entry key="xr:Buyer_country_subdivision" id="BT-54">Région</entry>
|
||||
<entry key="xr:Buyer_electronic_address" id="BT-49">Adresse électronique</entry>
|
||||
<entry key="xr:Buyer_electronic_address/@scheme_identifier" id="BT-49_scheme">Schéma de l'adresse électronique</entry>
|
||||
<entry key="xr:Buyer_legal_registration_identifier" id="BT-47">Numéro SIRET/SIREN</entry>
|
||||
<entry key="xr:Buyer_legal_registration_identifier/@scheme_identifier" id="BT-47_scheme">Schéma du numéro d'enregistrement</entry>
|
||||
<entry key="xr:Buyer_VAT_identifier" id="BT-48">Numéro de TVA intracommunautaire</entry>
|
||||
<entry key="xr:Value_added_tax_point_date" id="BT-7">Date d'exigibilité de la TVA</entry>
|
||||
<entry key="xr:Value_added_tax_point_date_code" id="BT-8">Code de la date d'exigibilité de la TVA</entry>
|
||||
<entry key="xr:Buyer_accounting_reference" id="BT-19">Référence comptable</entry>
|
||||
<entry key="xr:Deliver_to_location_identifier" id="BT-71">Identifiant du lieu de livraison</entry>
|
||||
<entry key="xr:Deliver_to_location_identifier/@scheme_identifier" id="BT-71_scheme">Schéma de l'identifiant</entry>
|
||||
<entry key="xr:Actual_delivery_date" id="BT-72">Date de livraison</entry>
|
||||
<entry key="xr:Deliver_to_party_name" id="BT-70">Nom du destinataire</entry>
|
||||
<entry key="xr:Deliver_to_address_line_1" id="BT-75">Adresse ligne 1</entry>
|
||||
<entry key="xr:Deliver_to_address_line_2" id="BT-76">Adresse ligne 2</entry>
|
||||
<entry key="xr:Deliver_to_address_line_3" id="BT-165">Adresse ligne 3</entry>
|
||||
<entry key="xr:Deliver_to_post_code" id="BT-78">Code postal</entry>
|
||||
<entry key="xr:Deliver_to_city" id="BT-77">Ville</entry>
|
||||
<entry key="xr:Deliver_to_country_subdivision" id="BT-79">Région</entry>
|
||||
<entry key="xr:Deliver_to_country_code" id="BT-80">Code pays</entry>
|
||||
<entry key="xr:Tender_or_lot_reference" id="BT-17">Numéro d'appel d'offres</entry>
|
||||
<entry key="xr:Receiving_advice_reference" id="BT-15">Référence de l'avis de réception</entry>
|
||||
<entry key="xr:Despatch_advice_reference" id="BT-16">Référence de l'avis d'expédition</entry>
|
||||
<entry key="xr:Business_process_type" id="BT-23">Identifiant du processus</entry>
|
||||
<entry key="xr:Specification_identifier" id="BT-24">Identifiant de spécification</entry>
|
||||
<entry key="xr:Invoiced_object_identifier" id="BT-18">Identifiant de l'objet</entry>
|
||||
<entry key="xr:Invoiced_object_identifier/@scheme_identifier" id="BT-18_scheme">Schéma de l'identifiant de l'objet</entry>
|
||||
<!-- BG 10 -->
|
||||
<entry key="xr:Payee_name" id="BT-59">Nom</entry>
|
||||
<entry key="xr:Payee_identifier" id="BT-60">Identifiant</entry>
|
||||
<entry key="xr:Payee_identifier/@scheme_identifier" id="BT-60_scheme">Schéma de l'identifiant</entry>
|
||||
<entry key="xr:Payee_legal_registration_identifier" id="BT-61">Numéro SIRET/SIREN</entry>
|
||||
<entry key="xr:Payee_legal_registration_identifier/@scheme_identifier" id="BT-61_scheme">Schéma du numéro d'enregistrement</entry>
|
||||
<!-- BG 24 Additonal supporting Documents -->
|
||||
<entry key="xr:Supporting_document_reference" id="BT-122">Identifiant</entry>
|
||||
<entry key="xr:Supporting_document_description" id="BT-123">Description</entry>
|
||||
<entry key="xr:External_document_location" id="BT-124">Référence (ex. adresse Internet)</entry>
|
||||
<entry key="xr:Attached_document" id="BT-125">Document joint</entry>
|
||||
<entry key="xr:Attached_document/@mime_code" id="BT-125_mime_code">Format du document joint</entry>
|
||||
<entry key="xr:Attached_document/@filename" id="BT-125_filename">Nom du document joint</entry>
|
||||
<entry key="xrv:zeitstempel">Date/Heure</entry>
|
||||
<entry key="xrv:betreff">Objet</entry>
|
||||
<entry key="xrv:text">Texte</entry>
|
||||
<entry key="xrv:details">Détails</entry>
|
||||
<entry key="xr:Invoice_line_identifier" id="BT-126">Position</entry>
|
||||
<entry key="xr:Invoice_line_note" id="BT-127">Texte libre</entry>
|
||||
<entry key="xr:Invoice_line_object_identifier" id="BT-128_identifier">Identifiant de l'objet</entry>
|
||||
<entry key="xr:Invoice_line_object_identifier/@scheme_identifier" id="BT-128_scheme">Schéma de l'identifiant de l'objet</entry>
|
||||
<entry key="xr:Referenced_purchase_order_line_reference" id="BT-132">Numéro de ligne de commande</entry>
|
||||
<entry key="xr:Invoice_line_Buyer_accounting_reference" id="BT-133">Référence comptable</entry>
|
||||
<entry key="xr:Invoice_line_period_start_date" id="BT-134">Du</entry>
|
||||
<entry key="xr:Invoice_line_period_end_date" id="BT-135">Au</entry>
|
||||
<entry key="xr:Invoiced_quantity" id="BT-129">Quantité</entry>
|
||||
<entry key="xr:Invoiced_quantity_unit_of_measure_code" id="BT-130">Unité</entry>
|
||||
<entry key="xr:Item_net_price" id="BT-146">Prix unitaire (HT)</entry>
|
||||
<entry key="xr:Invoice_line_net_amount" id="BT-131">Prix total (HT)</entry>
|
||||
<entry key="xr:Item_price_discount" id="BT-147">Remise (HT)</entry>
|
||||
<entry key="xr:Item_gross_price" id="BT-148">Prix catalogue (HT)</entry>
|
||||
<entry key="xr:Item_price_base_quantity" id="BT-149">Quantité de base</entry>
|
||||
<entry key="xr:Item_price_base_quantity_unit_of_measure" id="BT-150">Code de l'unité de mesure</entry>
|
||||
<entry key="xr:Invoiced_item_VAT_category_code" id="BT-151">TVA</entry>
|
||||
<entry key="xr:Invoiced_item_VAT_rate" id="BT-152">Taux de TVA</entry>
|
||||
<entry key="xr:Item_name" id="BT-153">Désignation</entry>
|
||||
<entry key="xr:Item_description" id="BT-154">Description</entry>
|
||||
<entry key="xr:Item_Sellers_identifier" id="BT-155">Référence article</entry>
|
||||
<entry key="xr:Item_Buyers_identifier" id="BT-156">Référence article acheteur</entry>
|
||||
<entry key="xr:Item_standard_identifier" id="BT-157">Identifiant article</entry>
|
||||
<entry key="xr:Item_standard_identifier/@scheme_identifier" class="BT-157_scheme">Schéma de l'identifiant article</entry>
|
||||
<entry key="xr:Item_classification_identifier" id="BT-158">Code de classification article</entry>
|
||||
<entry key="xr:Item_classification_identifier/@scheme_identifier" id="BT-158_scheme">Identifiant du schéma</entry>
|
||||
<entry key="xr:Item_classification_identifier/@scheme_version_identifier" id="BT-158_scheme_version">Version du schéma</entry>
|
||||
<entry key="xr:Item_country_of_origin" id="BT-159">Code du pays d'origine</entry>
|
||||
<entry key="xr:Invoice_line_allowance_base_amount" id="BT-137">Montant de base (HT)</entry>
|
||||
<entry key="xr:Invoice_line_allowance_percentage" id="BT-138">Pourcentage</entry>
|
||||
<entry key="xr:Invoice_line_allowance_amount" id="BT-136">Remise (HT)</entry>
|
||||
<entry key="xr:Invoice_line_allowance_reason" id="BT-139">Motif de la remise</entry>
|
||||
<entry key="xr:Invoice_line_allowance_reason_code" id="BT-140">Code du motif de la remise</entry>
|
||||
<entry key="xr:Invoice_line_charge_base_amount" id="BT-142">Montant de base (HT)</entry>
|
||||
<entry key="xr:Invoice_line_charge_percentage" id="BT-143">Pourcentage</entry>
|
||||
<entry key="xr:Invoice_line_charge_amount" id="BT-141">Frais (HT)</entry>
|
||||
<entry key="xr:Invoice_line_charge_reason" id="BT-144">Motif des frais</entry>
|
||||
<entry key="xr:Invoice_line_charge_reason_code" id="BT-145">Code du motif des frais</entry>
|
||||
<entry key="xr:Third_party_payment_type" id="BT-DEX-001">Type de créance tierce</entry>
|
||||
<entry key="xr:Third_party_payment_amount" id="BT-DEX-002">Montant de la créance tierce</entry>
|
||||
<entry key="xr:Third_party_payment_description" id="BT-DEX-003">Description de la créance tierce</entry>
|
||||
<entry key="uebersicht">Données de la facture électronique</entry>
|
||||
<entry key="uebersichtKaeufer" id="BG-7">Informations sur l'acheteur</entry>
|
||||
<entry key="uebersichtVerkaeufer" id="BG-4">Informations sur le vendeur</entry>
|
||||
<entry key="uebersichtRechnungsInfo" id="invoice-data">Données de facturation</entry>
|
||||
<entry key="uebersichtRechnungsuebersicht" id="BG-22">Totaux de la facture</entry>
|
||||
<entry key="uebersichtFremdleistungen" id="BG-DEX-09">Créance tierce</entry>
|
||||
<entry key="uebersichtUmsatzsteuer" id="BG-23">Ventilation de la TVA au niveau de la facture</entry>
|
||||
<entry key="uebersichtNachlass" id="BG-20">Remise au niveau de la facture</entry>
|
||||
<entry key="uebersichtZuschlaege" id="BG-21">Frais au niveau de la facture</entry>
|
||||
<entry key="uebersichtRechnungAbrechnungszeitraum">Période de facturation</entry>
|
||||
<entry key="uebersichtRechnungVorausgegangeneRechnungen" id="BG-3">Factures précédentes</entry>
|
||||
<entry key="uebersichtZahlungInfo" id="BG-4">Informations de paiement</entry>
|
||||
<entry key="uebersichtZahlungKarte" id="BG-18">Informations carte</entry>
|
||||
<entry key="uebersichtZahlungLastschrift" id="BG-19">Prélèvement</entry>
|
||||
<entry key="uebersichtZahlungUeberweisung" id="BG-17">Virement</entry>
|
||||
<entry key="uebersichtBemerkungen" id="BG-1">Remarques sur la facture</entry>
|
||||
<entry key="details">Lignes de facture</entry>
|
||||
<entry key="detailsPositionAbrechnungszeitraum" id="BG-26">Période de facturation</entry>
|
||||
<entry key="detailsPositionPreiseinzelheiten" id="BG-29">Détails du prix</entry>
|
||||
<entry key="detailsPositionNachlaesse" id="BG-27">Remises au niveau de la ligne de facture</entry>
|
||||
<entry key="detailsPositionZuschlaege" id="BG-28">Frais au niveau de la ligne de facture</entry>
|
||||
<entry key="detailsPositionArtikelinformationen" id="BG-31">Informations sur l'article</entry>
|
||||
<entry key="detailsPositionArtikeleigenschaften" id="BG-32">Caractéristiques de l'article</entry>
|
||||
<entry key="zusaetze">Compléments</entry>
|
||||
<entry key="zusaetzeVerkaeufer" id="BG-4">Informations sur le vendeur</entry>
|
||||
<entry key="zusaetzeSteuervertreter" id="BG-11">Représentant fiscal du vendeur</entry>
|
||||
<entry key="zusaetzeKaeufer" id="BG-7">Informations sur l'acheteur</entry>
|
||||
<entry key="zusaetzeLieferung" id="BG-13">Informations de livraison</entry>
|
||||
<entry key="zusaetzeVertrag">Informations contractuelles</entry>
|
||||
<entry key="zusaetzeZahlungsempfaenger" id="BG-10">Bénéficiaire différent du vendeur</entry>
|
||||
<entry key="laufzettel">Fiche de suivi</entry>
|
||||
<entry key="laufzettelHistorie">Historique de traitement</entry>
|
||||
<entry key="anlagen">Pièces jointes</entry>
|
||||
<entry key="anlagenListe">Documents justificatifs</entry>
|
||||
<entry key="date-format">[D]/[M]/[Y]</entry>
|
||||
<entry key="datetime-format">[D]/[M]/[Y] [H]:[m]:[s]</entry>
|
||||
<entry key="amount-format">###.##0,00</entry>
|
||||
<entry key="percentage-format">##0,00</entry>
|
||||
<entry key="at-least-two-format">###.##0,#################</entry>
|
||||
|
||||
<entry key="sum-of-third-party-payment-amounts" id="BT-DEX-002_sum">Total des créances tierces</entry>
|
||||
|
||||
<entry key="_disclaimer">Nous déclinons toute responsabilité quant à l'exactitude des données.</entry>
|
||||
<entry key="_invoice-note-group">Remarques sur la facture</entry>
|
||||
<entry key="_open">Ouvrir</entry>
|
||||
<entry key="no-data">Aucune donnée disponible</entry>
|
||||
<entry key="_net">HT</entry>
|
||||
<entry key="_gross">TTC</entry>
|
||||
<entry key="_no-content">Les sections sans contenu ne sont pas affichées !</entry>
|
||||
<entry key="_description">Description</entry>
|
||||
<entry key="_price">Prix</entry>
|
||||
<entry key="_price-unit">Unité de prix</entry>
|
||||
<entry key="_vat">Taux TVA</entry>
|
||||
<entry key="_tax-code">Code taxe</entry>
|
||||
<entry key="_total">Total</entry>
|
||||
<entry key="_page">Page</entry>
|
||||
</properties>
|
||||
@@ -85,6 +85,37 @@
|
||||
font-weight="bold">
|
||||
<xsl:text>Prüfbericht</xsl:text>
|
||||
</fo:block>
|
||||
<xsl:call-template name="SubHeader">
|
||||
<xsl:with-param name="text"
|
||||
select="'Angaben zur Prüfanwendung'"/>
|
||||
<xsl:with-param name="color"
|
||||
select="'black'"/>
|
||||
</xsl:call-template>
|
||||
<fo:table>
|
||||
<fo:table-column border-style="none"/>
|
||||
<fo:table-column column-width="70%"
|
||||
border-style="none"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block text-align="left">Name:</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block text-align="right">mustangproject.org</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell>
|
||||
<fo:block text-align="left">Version:</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell>
|
||||
<fo:block text-align="right">
|
||||
<xsl:value-of select="./xml/info/validator/@version"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
<xsl:call-template name="SubHeader">
|
||||
<xsl:with-param name="text"
|
||||
select="'Angaben zum geprüften Dokument'"/>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:xrf="https://projekte.kosit.org/xrechnung/xrechnung-visualization/functions">
|
||||
|
||||
<xsl:decimal-format name="de" decimal-separator="," grouping-separator="." NaN="" />
|
||||
<xsl:decimal-format name="fr" decimal-separator="," grouping-separator="." NaN="" />
|
||||
<xsl:decimal-format name="en" decimal-separator="." grouping-separator="," NaN="" />
|
||||
|
||||
<xsl:template name="uebersicht">
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.mustangproject.Invoice;
|
||||
import org.mustangproject.Item;
|
||||
import org.mustangproject.Product;
|
||||
import org.mustangproject.ReferencedDocument;
|
||||
import org.mustangproject.TradeParty;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Date;
|
||||
|
||||
import static org.xmlunit.assertj.XmlAssert.assertThat;
|
||||
|
||||
public class BT18ReferenceTypeCodeTest extends TestCase {
|
||||
|
||||
/**
|
||||
* Ensures BT-18-1 (scheme identifier) is serialized as ram:ReferenceTypeCode
|
||||
* inside ram:AdditionalReferencedDocument (TypeCode=130).
|
||||
*/
|
||||
public void testBT18ReferenceTypeCodeIsWrittenWhenSet() {
|
||||
// Minimal invoice (XRechnung profile => CII output)
|
||||
Invoice i = new Invoice()
|
||||
.setIssueDate(new Date())
|
||||
.setDueDate(new Date())
|
||||
.setDeliveryDate(new Date())
|
||||
.setSender(new TradeParty("Test company", "teststr", "55232", "teststadt", "DE"))
|
||||
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE"))
|
||||
.setNumber("INV-123")
|
||||
.addItem(new Item(
|
||||
new Product("Testprodukt", "", "C62", BigDecimal.ZERO),
|
||||
new BigDecimal("1.00"),
|
||||
BigDecimal.ONE
|
||||
));
|
||||
|
||||
// BT-18: Invoiced Object Identifier (AdditionalReferencedDocument / TypeCode 130)
|
||||
ReferencedDocument rd = new ReferencedDocument("ID unique");
|
||||
rd.setReferenceTypeCode("AJW"); // BT-18-1
|
||||
i.setObjectIdentifierReferencedDocument(rd);
|
||||
|
||||
ZUGFeRD2PullProvider zf2p = new ZUGFeRD2PullProvider();
|
||||
zf2p.setProfile(Profiles.getByName("XRechnung"));
|
||||
zf2p.generateXML(i);
|
||||
|
||||
String xml = new String(zf2p.getXML(), StandardCharsets.UTF_8);
|
||||
|
||||
// Assert: we still have a CII invoice
|
||||
assertTrue(xml.contains("<rsm:CrossIndustryInvoice"));
|
||||
|
||||
// Assert: BT-18 block contains ID, TypeCode=130 and ReferenceTypeCode=AJW
|
||||
assertThat(xml)
|
||||
.valueByXPath("string(//*[local-name()='AdditionalReferencedDocument']/*[local-name()='TypeCode'])")
|
||||
.isEqualTo("130");
|
||||
|
||||
assertThat(xml)
|
||||
.valueByXPath("string(//*[local-name()='AdditionalReferencedDocument']/*[local-name()='IssuerAssignedID'])")
|
||||
.isEqualTo("ID unique");
|
||||
|
||||
assertThat(xml)
|
||||
.valueByXPath("string(//*[local-name()='AdditionalReferencedDocument']/*[local-name()='ReferenceTypeCode'])")
|
||||
.isEqualTo("AJW");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mustangproject.ZUGFeRD.Profiles;
|
||||
import org.mustangproject.ZUGFeRD.ZUGFeRD2PullProvider;
|
||||
|
||||
import org.mustangproject.Invoice;
|
||||
import org.mustangproject.Item;
|
||||
import org.mustangproject.Product;
|
||||
import org.mustangproject.TradeParty;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Date;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
/**
|
||||
* Unit tests for BT-23 (BusinessProcessSpecifiedDocumentContextParameter/ID) emission in CII output.
|
||||
*
|
||||
* Assumptions / prerequisites for the proposed fix:
|
||||
* - IExportableTransaction#getBusinessProcessId() exists (as a default method returning null)
|
||||
* - Invoice#setBusinessProcessId(String) exists and Invoice overrides getBusinessProcessId()
|
||||
* - ZUGFeRD2PullProvider writes BT-23 if a custom businessProcessId is provided,
|
||||
* otherwise keeps the current XRechnung default behavior.
|
||||
*/
|
||||
public class BusinessProcessIdCiiTest {
|
||||
|
||||
@Test
|
||||
void xrechnung_nonRegression_defaultBusinessProcessId_isStillEmitted() throws Exception {
|
||||
// ===== GIVEN: A minimal invoice (as provided) WITHOUT setting businessProcessId =====
|
||||
|
||||
TradeParty buyer = new TradeParty("Client X", "3 rue C", "33000", "Bordeaux", "FR");
|
||||
TradeParty seller = new TradeParty("Mairie A", "1 rue A", "75001", "Paris", "FR");
|
||||
|
||||
Invoice invoice = new Invoice()
|
||||
.setNumber("INV-CALC-001") // BT-1: Invoice number -> /.../ExchangedDocument/ram:ID
|
||||
.setIssueDate(new Date()) // BT-2: Issue date
|
||||
.setDeliveryDate(new Date()) // Delivery date (depending on profile/exporter mapping)
|
||||
.setDueDate(new Date()) // BT-9: Payment due date
|
||||
.setCurrency("EUR") // BT-5: Invoice currency code
|
||||
.setSender(buyer)
|
||||
.setRecipient(seller);
|
||||
|
||||
Product service = new Product("Prestation", "Service intercommunal", "C62", new BigDecimal("20.00"));
|
||||
invoice.addItem(new Item(service, BigDecimal.ONE, BigDecimal.TEN).setTax(BigDecimal.valueOf(20)));
|
||||
|
||||
// ===== WHEN: Generating CII XML using the XRechnung profile =====
|
||||
|
||||
ZUGFeRD2PullProvider provider = new ZUGFeRD2PullProvider();
|
||||
provider.setProfile(Profiles.getByName("XRechnung"));
|
||||
provider.generateXML(invoice);
|
||||
|
||||
String xml = new String(provider.getXML(), StandardCharsets.UTF_8);
|
||||
|
||||
// ===== THEN: Non-regression check =====
|
||||
// XRechnung currently emits BT-23 with a default fixed URN.
|
||||
// This behavior must remain unchanged when businessProcessId is NOT explicitly provided by the user.
|
||||
|
||||
assertTrue(
|
||||
xml.contains("<ram:BusinessProcessSpecifiedDocumentContextParameter>"),
|
||||
"XRechnung should still emit BusinessProcessSpecifiedDocumentContextParameter (BT-23)."
|
||||
);
|
||||
|
||||
assertTrue(
|
||||
xml.contains("<ram:ID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</ram:ID>"),
|
||||
"XRechnung default BT-23 URN must remain unchanged when businessProcessId is not set."
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenBusinessProcessIdIsSet_itIsEmitted_inExtendedProfile() throws Exception {
|
||||
// ===== GIVEN: The same minimal invoice, but WITH an explicit businessProcessId =====
|
||||
|
||||
TradeParty buyer = new TradeParty("Client X", "3 rue C", "33000", "Bordeaux", "FR");
|
||||
TradeParty seller = new TradeParty("Mairie A", "1 rue A", "75001", "Paris", "FR");
|
||||
|
||||
Invoice invoice = new Invoice()
|
||||
.setNumber("INV-CALC-001")
|
||||
.setIssueDate(new Date())
|
||||
.setDeliveryDate(new Date())
|
||||
.setDueDate(new Date())
|
||||
.setCurrency("EUR")
|
||||
.setSender(buyer)
|
||||
.setRecipient(seller);
|
||||
|
||||
Product service = new Product("Prestation", "Service intercommunal", "C62", new BigDecimal("20.00"));
|
||||
invoice.addItem(new Item(service, BigDecimal.ONE, BigDecimal.TEN).setTax(BigDecimal.valueOf(20)));
|
||||
|
||||
// Proposed new API: user-provided BT-23 value
|
||||
invoice.setBusinessProcessId("B1");
|
||||
// BT-23 path:
|
||||
// /rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/
|
||||
// ram:BusinessProcessSpecifiedDocumentContextParameter/ram:ID
|
||||
|
||||
// ===== WHEN: Generating CII XML using the EXTENDED profile =====
|
||||
|
||||
ZUGFeRD2PullProvider provider = new ZUGFeRD2PullProvider();
|
||||
provider.setProfile(Profiles.getByName("EXTENDED"));
|
||||
provider.generateXML(invoice);
|
||||
|
||||
String xml = new String(provider.getXML(), StandardCharsets.UTF_8);
|
||||
|
||||
// ===== THEN: BT-23 must be emitted with the user-provided value =====
|
||||
|
||||
assertTrue(
|
||||
xml.contains("<ram:BusinessProcessSpecifiedDocumentContextParameter>"),
|
||||
"When businessProcessId is set, BT-23 must be emitted even for EXTENDED."
|
||||
);
|
||||
|
||||
assertTrue(
|
||||
xml.contains("<ram:ID>B1</ram:ID>"),
|
||||
"BT-23 must contain the user-provided businessProcessId."
|
||||
);
|
||||
|
||||
// Extra sanity check: the guideline/specification identifier (BT-24) should still be present
|
||||
assertTrue(
|
||||
xml.contains("<ram:GuidelineSpecifiedDocumentContextParameter>"),
|
||||
"BT-24 (GuidelineSpecifiedDocumentContextParameter) must be present."
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.mustangproject.Invoice;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import javax.xml.xpath.XPathExpressionException;
|
||||
|
||||
/* https://github.com/ZUGFeRD/mustangproject/issues/993 */
|
||||
public class CashDiscountFacturXTest extends TestCase {
|
||||
String XMLString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
|
||||
" <rsm:CrossIndustryInvoice xmlns:rsm=\"urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:ram=\"urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100\" xmlns:udt=\"urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100\" xmlns:qdt=\"urn:un:unece:uncefact:data:standard:QualifiedDataType:100\">\n" +
|
||||
" <!-- generated by: mustangproject.org v2.15.1-SNAPSHOT-->\n" +
|
||||
" <rsm:ExchangedDocumentContext>\n" +
|
||||
" <ram:GuidelineSpecifiedDocumentContextParameter>\n" +
|
||||
" <ram:ID>urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended</ram:ID>\n" +
|
||||
" </ram:GuidelineSpecifiedDocumentContextParameter>\n" +
|
||||
" </rsm:ExchangedDocumentContext>\n" +
|
||||
" <rsm:ExchangedDocument>\n" +
|
||||
" <ram:ID>471102</ram:ID>\n" +
|
||||
" <ram:TypeCode>380</ram:TypeCode>\n" +
|
||||
" <ram:IssueDateTime>\n" +
|
||||
" <udt:DateTimeString format=\"102\">20260201</udt:DateTimeString>\n" +
|
||||
" </ram:IssueDateTime>\n" +
|
||||
" </rsm:ExchangedDocument>\n" +
|
||||
" <rsm:SupplyChainTradeTransaction>\n" +
|
||||
" <ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:LineID>1</ram:LineID>\n" +
|
||||
" </ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:Name>Trennblätter A4</ram:Name>\n" +
|
||||
" </ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:NetPriceProductTradePrice>\n" +
|
||||
" <ram:ChargeAmount>9.9000</ram:ChargeAmount>\n" +
|
||||
" <ram:BasisQuantity unitCode=\"H87\">1.0000</ram:BasisQuantity>\n" +
|
||||
" </ram:NetPriceProductTradePrice>\n" +
|
||||
" </ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:BilledQuantity unitCode=\"H87\">20.0000</ram:BilledQuantity>\n" +
|
||||
" </ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" <ram:ApplicableTradeTax>\n" +
|
||||
" <ram:TypeCode>VAT</ram:TypeCode>\n" +
|
||||
" <ram:CategoryCode>S</ram:CategoryCode>\n" +
|
||||
" <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>\n" +
|
||||
" </ram:ApplicableTradeTax>\n" +
|
||||
" <ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" <ram:LineTotalAmount>198.00</ram:LineTotalAmount>\n" +
|
||||
" </ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" </ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" </ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:LineID>2</ram:LineID>\n" +
|
||||
" </ram:AssociatedDocumentLineDocument>\n" +
|
||||
" <ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:Name>Joghurt Banane</ram:Name>\n" +
|
||||
" </ram:SpecifiedTradeProduct>\n" +
|
||||
" <ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:NetPriceProductTradePrice>\n" +
|
||||
" <ram:ChargeAmount>5.5000</ram:ChargeAmount>\n" +
|
||||
" <ram:BasisQuantity unitCode=\"H87\">1.0000</ram:BasisQuantity>\n" +
|
||||
" </ram:NetPriceProductTradePrice>\n" +
|
||||
" </ram:SpecifiedLineTradeAgreement>\n" +
|
||||
" <ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:BilledQuantity unitCode=\"H87\">50.0000</ram:BilledQuantity>\n" +
|
||||
" </ram:SpecifiedLineTradeDelivery>\n" +
|
||||
" <ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" <ram:ApplicableTradeTax>\n" +
|
||||
" <ram:TypeCode>VAT</ram:TypeCode>\n" +
|
||||
" <ram:CategoryCode>S</ram:CategoryCode>\n" +
|
||||
" <ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>\n" +
|
||||
" </ram:ApplicableTradeTax>\n" +
|
||||
" <ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" <ram:LineTotalAmount>275.00</ram:LineTotalAmount>\n" +
|
||||
" </ram:SpecifiedTradeSettlementLineMonetarySummation>\n" +
|
||||
" </ram:SpecifiedLineTradeSettlement>\n" +
|
||||
" </ram:IncludedSupplyChainTradeLineItem>\n" +
|
||||
" <ram:ApplicableHeaderTradeAgreement>\n" +
|
||||
" <ram:SellerTradeParty>\n" +
|
||||
" <ram:Name>Lieferant GmbH</ram:Name>\n" +
|
||||
" <ram:PostalTradeAddress>\n" +
|
||||
" <ram:PostcodeCode>80333</ram:PostcodeCode>\n" +
|
||||
" <ram:LineOne>Lieferantenstraße 20</ram:LineOne>\n" +
|
||||
" <ram:CityName>München</ram:CityName>\n" +
|
||||
" <ram:CountryID>DE</ram:CountryID>\n" +
|
||||
" </ram:PostalTradeAddress>\n" +
|
||||
" <ram:SpecifiedTaxRegistration>\n" +
|
||||
" <ram:ID schemeID=\"VA\">DE123456789</ram:ID>\n" +
|
||||
" </ram:SpecifiedTaxRegistration>\n" +
|
||||
" <ram:SpecifiedTaxRegistration>\n" +
|
||||
" <ram:ID schemeID=\"FC\">201/113/40209</ram:ID>\n" +
|
||||
" </ram:SpecifiedTaxRegistration>\n" +
|
||||
" </ram:SellerTradeParty>\n" +
|
||||
" <ram:BuyerTradeParty>\n" +
|
||||
" <ram:Name>Kunden AG Mitte</ram:Name>\n" +
|
||||
" <ram:PostalTradeAddress>\n" +
|
||||
" <ram:PostcodeCode>69876</ram:PostcodeCode>\n" +
|
||||
" <ram:LineOne>Kundenstraße 15</ram:LineOne>\n" +
|
||||
" <ram:CityName>Frankfurt</ram:CityName>\n" +
|
||||
" <ram:CountryID>DE</ram:CountryID>\n" +
|
||||
" </ram:PostalTradeAddress>\n" +
|
||||
" </ram:BuyerTradeParty>\n" +
|
||||
" </ram:ApplicableHeaderTradeAgreement>\n" +
|
||||
" <ram:ApplicableHeaderTradeDelivery>\n" +
|
||||
" <ram:ActualDeliverySupplyChainEvent>\n" +
|
||||
" <ram:OccurrenceDateTime>\n" +
|
||||
" <udt:DateTimeString format=\"102\">20180304</udt:DateTimeString>\n" +
|
||||
" </ram:OccurrenceDateTime>\n" +
|
||||
" </ram:ActualDeliverySupplyChainEvent>\n" +
|
||||
" </ram:ApplicableHeaderTradeDelivery>\n" +
|
||||
" <ram:ApplicableHeaderTradeSettlement>\n" +
|
||||
" <ram:PaymentReference>471102</ram:PaymentReference>\n" +
|
||||
" <ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>\n" +
|
||||
" <ram:ApplicableTradeTax>\n" +
|
||||
" <ram:CalculatedAmount>19.25</ram:CalculatedAmount>\n" +
|
||||
" <ram:TypeCode>VAT</ram:TypeCode>\n" +
|
||||
" <ram:BasisAmount>275.00</ram:BasisAmount>\n" +
|
||||
" <ram:CategoryCode>S</ram:CategoryCode>\n" +
|
||||
" <ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>\n" +
|
||||
" </ram:ApplicableTradeTax>\n" +
|
||||
" <ram:ApplicableTradeTax>\n" +
|
||||
" <ram:CalculatedAmount>37.62</ram:CalculatedAmount>\n" +
|
||||
" <ram:TypeCode>VAT</ram:TypeCode>\n" +
|
||||
" <ram:BasisAmount>198.00</ram:BasisAmount>\n" +
|
||||
" <ram:CategoryCode>S</ram:CategoryCode>\n" +
|
||||
" <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>\n" +
|
||||
" </ram:ApplicableTradeTax>\n" +
|
||||
" <ram:SpecifiedTradePaymentTerms>\n" +
|
||||
" <ram:Description>Please remit until 04.03.2018</ram:Description>\n" +
|
||||
" <ram:DueDateDateTime>\n" +
|
||||
" <udt:DateTimeString format=\"102\">20180304</udt:DateTimeString>\n" +
|
||||
" </ram:DueDateDateTime>\n" +
|
||||
" </ram:SpecifiedTradePaymentTerms>\n" +
|
||||
" <ram:SpecifiedTradePaymentTerms>\n" +
|
||||
" <ram:Description>Bis zum 15.02.2026 erhalten Sie 4,000 % Skonto, 21.19 EUR</ram:Description>\n" +
|
||||
" <ram:DueDateDateTime>\n" +
|
||||
" <udt:DateTimeString format=\"102\">20260215</udt:DateTimeString>\n" +
|
||||
" </ram:DueDateDateTime>\n" +
|
||||
" <ram:ApplicableTradePaymentDiscountTerms>\n" +
|
||||
" <ram:BasisAmount>529.8700</ram:BasisAmount>\n" +
|
||||
" <ram:CalculationPercent>4.00</ram:CalculationPercent>\n" +
|
||||
" <ram:ActualDiscountAmount>21.19</ram:ActualDiscountAmount>\n" +
|
||||
" </ram:ApplicableTradePaymentDiscountTerms>\n" +
|
||||
" </ram:SpecifiedTradePaymentTerms>\n" +
|
||||
" <ram:SpecifiedTradePaymentTerms>\n" +
|
||||
" <ram:Description>Bis zum 16.02.2026 ohne Abzug</ram:Description>\n" +
|
||||
" <ram:DueDateDateTime>\n" +
|
||||
" <udt:DateTimeString format=\"102\">20260216</udt:DateTimeString>\n" +
|
||||
" </ram:DueDateDateTime>\n" +
|
||||
" </ram:SpecifiedTradePaymentTerms>\n" +
|
||||
" <ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n" +
|
||||
" <ram:LineTotalAmount>473.00</ram:LineTotalAmount>\n" +
|
||||
" <ram:ChargeTotalAmount>0.00</ram:ChargeTotalAmount>\n" +
|
||||
" <ram:AllowanceTotalAmount>0.00</ram:AllowanceTotalAmount>\n" +
|
||||
" <ram:TaxBasisTotalAmount>473.00</ram:TaxBasisTotalAmount>\n" +
|
||||
" <ram:TaxTotalAmount currencyID=\"EUR\">56.87</ram:TaxTotalAmount>\n" +
|
||||
" <ram:GrandTotalAmount>529.87</ram:GrandTotalAmount>\n" +
|
||||
" <ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>\n" +
|
||||
" <ram:DuePayableAmount>529.87</ram:DuePayableAmount>\n" +
|
||||
" </ram:SpecifiedTradeSettlementHeaderMonetarySummation>\n" +
|
||||
" </ram:ApplicableHeaderTradeSettlement>\n" +
|
||||
" </rsm:SupplyChainTradeTransaction>\n" +
|
||||
" </rsm:CrossIndustryInvoice>";
|
||||
|
||||
public void testCashDiscount() throws XPathExpressionException, ParseException {
|
||||
InputStream inputStream = new ByteArrayInputStream(XMLString.getBytes(StandardCharsets.UTF_8));
|
||||
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(inputStream);
|
||||
Invoice invoice = zii.extractInvoice();
|
||||
assertEquals(new BigDecimal("4.00"), invoice.getCashDiscounts()[0].getPercent());
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,11 @@ import junit.framework.TestSuite;
|
||||
|
||||
import org.apache.pdfbox.Loader;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.pdmodel.PDDocumentNameDictionary;
|
||||
import org.apache.pdfbox.pdmodel.PDEmbeddedFilesNameTreeNode;
|
||||
import org.apache.pdfbox.pdmodel.common.PDMetadata;
|
||||
import org.apache.pdfbox.pdmodel.common.filespecification.PDComplexFileSpecification;
|
||||
import org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile;
|
||||
import org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException;
|
||||
import org.apache.xmpbox.XMPMetadata;
|
||||
import org.apache.xmpbox.schema.PDFAIdentificationSchema;
|
||||
@@ -218,8 +222,6 @@ public class MustangReaderWriterTest extends MustangReaderTestCase {
|
||||
zi.doRecalculateItemPricesFromLineTotals();
|
||||
zi.doIgnoreCalculationErrors();
|
||||
zi.setInputStream(inputStream);
|
||||
// Reading ZUGFeRD
|
||||
String amount = zi.getAmount();
|
||||
|
||||
assertEquals("<?xpacket begin=\"\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n" +
|
||||
" <x:xmpmeta xmlns:x=\"adobe:ns:meta/\">\n" +
|
||||
@@ -297,8 +299,8 @@ public class MustangReaderWriterTest extends MustangReaderTestCase {
|
||||
" </x:xmpmeta>\n" +
|
||||
"<?xpacket end=\"r\"?>", zi.getXMP());
|
||||
// this resembles the data written in MustangReaderWriterCustomXMLTest
|
||||
assertEquals(amount, "1005.55");
|
||||
|
||||
assertEquals("845.00", zi.getTaxBasisTotalAmount());
|
||||
assertEquals("1005.55", zi.getAmount());
|
||||
}
|
||||
|
||||
|
||||
@@ -415,17 +417,18 @@ public class MustangReaderWriterTest extends MustangReaderTestCase {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ze.export(baos);
|
||||
ze.close();
|
||||
String pdfContent = baos.toString(StandardCharsets.UTF_8);
|
||||
assertFalse(pdfContent.indexOf(DocumentContextParameterTypeConstants.BASIC) >= 0);
|
||||
assertFalse(pdfContent.indexOf(DocumentContextParameterTypeConstants.EXTENDED) >= 0);
|
||||
assertTrue(pdfContent.indexOf(DocumentContextParameterTypeConstants.COMFORT) >= 0);
|
||||
byte[] targetBytes = baos.toByteArray();
|
||||
String xmlContent = readEmbeddedXmlFromPdf(targetBytes, "ZUGFeRD-invoice.xml");
|
||||
assertFalse(xmlContent.contains(DocumentContextParameterTypeConstants.BASIC));
|
||||
assertFalse(xmlContent.contains(DocumentContextParameterTypeConstants.EXTENDED));
|
||||
assertTrue(xmlContent.contains(DocumentContextParameterTypeConstants.COMFORT));
|
||||
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not happen in testZExport");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void testFXExport() throws Exception {
|
||||
|
||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20171118_506fx.pdf";
|
||||
@@ -442,7 +445,8 @@ public class MustangReaderWriterTest extends MustangReaderTestCase {
|
||||
result.write(buffer, 0, length);
|
||||
}
|
||||
|
||||
ze.addAdditionalFile("test.pdf", result.toByteArray());
|
||||
var bytes = result.toByteArray();
|
||||
ze.addAdditionalFile("test.pdf", bytes);
|
||||
|
||||
ze.setTransaction(this);
|
||||
ze.disableAutoClose(true);
|
||||
@@ -451,12 +455,14 @@ public class MustangReaderWriterTest extends MustangReaderTestCase {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ze.export(baos);
|
||||
ze.close();
|
||||
String pdfContent = baos.toString(StandardCharsets.UTF_8);
|
||||
assertFalse(pdfContent.indexOf("(via mustangproject.org") == -1);
|
||||
byte[] targetBytes = baos.toByteArray();
|
||||
String pdfContent = new String(targetBytes, StandardCharsets.UTF_8);
|
||||
String xmlContent = readEmbeddedXmlFromPdf(targetBytes, "factur-x.xml");
|
||||
assertTrue(pdfContent.contains("(via mustangproject.org"));
|
||||
// check for pdf-a schema extension
|
||||
assertFalse(pdfContent.indexOf("<fx:ConformanceLevel>EN 16931</fx:ConformanceLevel>") == -1);
|
||||
assertFalse(pdfContent.indexOf("<pdfaSchema:prefix>fx</pdfaSchema:prefix>") == -1);
|
||||
assertFalse(pdfContent.indexOf("urn:cen.eu:en16931:2017") == -1);
|
||||
assertTrue(pdfContent.contains("<fx:ConformanceLevel>EN 16931</fx:ConformanceLevel>"));
|
||||
assertTrue(pdfContent.contains("<pdfaSchema:prefix>fx</pdfaSchema:prefix>"));
|
||||
assertTrue(xmlContent.contains("urn:cen.eu:en16931:2017"));
|
||||
}
|
||||
|
||||
// now check the contents (like MustangReaderTest)
|
||||
@@ -470,6 +476,26 @@ public class MustangReaderWriterTest extends MustangReaderTestCase {
|
||||
assertEquals(getNumber(), zi.getForeignReference());
|
||||
}
|
||||
|
||||
private static String readEmbeddedXmlFromPdf(byte[] targetBytes, String xmlFilename) throws IOException {
|
||||
// Read attached (compressed) XML file
|
||||
try (PDDocument pdDocument = Loader.loadPDF(targetBytes)) {
|
||||
PDDocumentNameDictionary names = new PDDocumentNameDictionary(pdDocument.getDocumentCatalog());
|
||||
|
||||
PDEmbeddedFilesNameTreeNode embeddedFiles = names.getEmbeddedFiles();
|
||||
Map<String, PDComplexFileSpecification> fileMap = embeddedFiles.getNames();
|
||||
|
||||
|
||||
PDComplexFileSpecification fileSpec = fileMap.get(xmlFilename);
|
||||
if (fileSpec == null) {
|
||||
fail("Files does not contain a file named " + xmlFilename);
|
||||
return null;
|
||||
}
|
||||
PDEmbeddedFile embeddedFile = fileSpec.getEmbeddedFile();
|
||||
String xmlContent = new String(embeddedFile.toByteArray(), StandardCharsets.UTF_8);
|
||||
return xmlContent;
|
||||
}
|
||||
}
|
||||
|
||||
public void testExceptionOnPDF14() {
|
||||
|
||||
final String TARGET_PDF = "./target/testout-MustangGnuaccountingBeispielRE-20170509_505new.pdf";
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mustangproject.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Date;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
public class SubInvoiceLineExportTest {
|
||||
|
||||
private static final String TARGET_PDF = "./target/testout-SubInvoiceLines.pdf";
|
||||
|
||||
@Test
|
||||
public void testSubInvoiceLineExportRoundTrip() throws Exception {
|
||||
|
||||
// -- Build invoice with hierarchical positions --
|
||||
TradeParty sender = new TradeParty("Test Seller", "Test Street 1", "12345", "Test City", "DE")
|
||||
.addTaxID("DE123456789")
|
||||
.addVATID("DE123456789");
|
||||
Contact senderContact = new Contact("Max Mustermann", "012345", "max@test.de");
|
||||
sender.setContact(senderContact);
|
||||
|
||||
TradeParty recipient = new TradeParty("Test Buyer", "Buyer Street 1", "54321", "Buyer City", "DE")
|
||||
.addVATID("DE987654321");
|
||||
|
||||
// DETAIL line 0101: child of group 01
|
||||
Item detail0101 = new Item(
|
||||
new Product("Laser printer", "", "H87", new BigDecimal("19")),
|
||||
new BigDecimal("300.00"),
|
||||
new BigDecimal("2.0000")
|
||||
);
|
||||
detail0101.setId("0101");
|
||||
detail0101.setParentLineID("01");
|
||||
detail0101.setLineStatusReasonCode("DETAIL");
|
||||
|
||||
// DETAIL line 0102: child of group 01
|
||||
Item detail0102 = new Item(
|
||||
new Product("Ink printer", "", "H87", new BigDecimal("19")),
|
||||
new BigDecimal("150.00"),
|
||||
new BigDecimal("3.0000")
|
||||
);
|
||||
detail0102.setId("0102");
|
||||
detail0102.setParentLineID("01");
|
||||
detail0102.setLineStatusReasonCode("DETAIL");
|
||||
|
||||
// INFORMATION line 0103: child of group 01, non-calculation-relevant
|
||||
Item info0103 = new Item(
|
||||
new Product("Setup instructions", "", "H87", new BigDecimal("19")),
|
||||
new BigDecimal("0.00"),
|
||||
new BigDecimal("1.0000")
|
||||
);
|
||||
info0103.setId("0103");
|
||||
info0103.setParentLineID("01");
|
||||
info0103.setLineStatusReasonCode("INFORMATION");
|
||||
|
||||
// GROUP line 01: parent, LineTotalAmount = sum of DETAIL children = 1050
|
||||
Item group01 = new Item(
|
||||
new Product("Hardware bundle", "", "H87", new BigDecimal("19")),
|
||||
new BigDecimal("1050.00"),
|
||||
new BigDecimal("1.0000")
|
||||
);
|
||||
group01.setId("01");
|
||||
group01.setLineStatusReasonCode("GROUP");
|
||||
|
||||
Invoice invoice = new Invoice()
|
||||
.setNumber("SUB-INV-001")
|
||||
.setIssueDate(new Date())
|
||||
.setDeliveryDate(new Date())
|
||||
.setDueDate(new Date())
|
||||
.setSender(sender)
|
||||
.setRecipient(recipient)
|
||||
.setCurrency("EUR")
|
||||
.setPaymentTermDescription("Net 30")
|
||||
.addItem(detail0101)
|
||||
.addItem(detail0102)
|
||||
.addItem(info0103)
|
||||
.addItem(group01);
|
||||
|
||||
// -- Export to PDF with EXTENDED profile --
|
||||
try (InputStream sourcePDF = this.getClass()
|
||||
.getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505PDFA3.pdf");
|
||||
ZUGFeRDExporterFromA3 exporter = new ZUGFeRDExporterFromA3()
|
||||
.setProducer("Mustang SubInvoiceLine Test")
|
||||
.setCreator("Test")
|
||||
.setZUGFeRDVersion(2)
|
||||
.setProfile("EXTENDED")
|
||||
.load(sourcePDF)) {
|
||||
|
||||
exporter.setTransaction(invoice);
|
||||
|
||||
// Verify XML contains the hierarchical elements
|
||||
String xml = new String(exporter.getProvider().getXML(), StandardCharsets.UTF_8);
|
||||
assertTrue(xml.contains("<ram:ParentLineID>01</ram:ParentLineID>"),
|
||||
"XML must contain ParentLineID element");
|
||||
assertTrue(xml.contains("<ram:LineStatusReasonCode>DETAIL</ram:LineStatusReasonCode>"),
|
||||
"XML must contain DETAIL LineStatusReasonCode");
|
||||
assertTrue(xml.contains("<ram:LineStatusReasonCode>GROUP</ram:LineStatusReasonCode>"),
|
||||
"XML must contain GROUP LineStatusReasonCode");
|
||||
assertTrue(xml.contains("<ram:LineStatusReasonCode>INFORMATION</ram:LineStatusReasonCode>"),
|
||||
"XML must contain INFORMATION LineStatusReasonCode");
|
||||
|
||||
exporter.export(TARGET_PDF);
|
||||
}
|
||||
|
||||
// -- Re-import and verify round-trip --
|
||||
ZUGFeRDImporter importer = new ZUGFeRDImporter(TARGET_PDF);
|
||||
Invoice reimported = new Invoice();
|
||||
importer.extractInto(reimported);
|
||||
|
||||
// Find items by ID
|
||||
Item rDetail0101 = findItemById(reimported, "0101");
|
||||
assertNotNull(rDetail0101, "DETAIL item 0101 must be reimported");
|
||||
assertEquals("01", rDetail0101.getParentLineID());
|
||||
assertEquals("DETAIL", rDetail0101.getLineStatusReasonCode());
|
||||
assertTrue(rDetail0101.isCalculationRelevant());
|
||||
|
||||
Item rDetail0102 = findItemById(reimported, "0102");
|
||||
assertNotNull(rDetail0102, "DETAIL item 0102 must be reimported");
|
||||
assertEquals("01", rDetail0102.getParentLineID());
|
||||
assertEquals("DETAIL", rDetail0102.getLineStatusReasonCode());
|
||||
assertTrue(rDetail0102.isCalculationRelevant());
|
||||
|
||||
Item rInfo0103 = findItemById(reimported, "0103");
|
||||
assertNotNull(rInfo0103, "INFORMATION item 0103 must be reimported");
|
||||
assertEquals("01", rInfo0103.getParentLineID());
|
||||
assertEquals("INFORMATION", rInfo0103.getLineStatusReasonCode());
|
||||
assertFalse(rInfo0103.isCalculationRelevant());
|
||||
|
||||
Item rGroup01 = findItemById(reimported, "01");
|
||||
assertNotNull(rGroup01, "GROUP item 01 must be reimported");
|
||||
assertNull(rGroup01.getParentLineID());
|
||||
assertEquals("GROUP", rGroup01.getLineStatusReasonCode());
|
||||
assertFalse(rGroup01.isCalculationRelevant());
|
||||
|
||||
// Verify only DETAIL lines contribute to totals
|
||||
// DETAIL: 0101=600, 0102=450 = 1050
|
||||
TransactionCalculator tc = new TransactionCalculator(reimported);
|
||||
assertEquals(new BigDecimal("1050.00"), tc.getTotal().setScale(2));
|
||||
}
|
||||
|
||||
private Item findItemById(Invoice invoice, String id) {
|
||||
for (IZUGFeRDExportableItem item : invoice.getZFItems()) {
|
||||
if (item instanceof Item && id.equals(((Item) item).getId())) {
|
||||
return (Item) item;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,176 +1,210 @@
|
||||
/**
|
||||
* *********************************************************************
|
||||
* <p>
|
||||
* Copyright 2019 Jochen Staerk
|
||||
* <p>
|
||||
* Use is subject to license terms.
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy
|
||||
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* <p>
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* <p>
|
||||
* **********************************************************************
|
||||
*/
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
import org.mustangproject.ZUGFeRD.ZUGFeRDVisualizer.Language;
|
||||
import org.mustangproject.util.ByteArraySearcher;
|
||||
|
||||
import javax.xml.transform.TransformerException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class VisualizationTest extends ResourceCase {
|
||||
|
||||
final String TARGET_PDF_CII = "./target/testout-Visualization-cii.pdf";
|
||||
final String TARGET_PDF_UBL = "./target/testout-Visualization-cii.pdf";
|
||||
|
||||
public void testCIIVisualizationBasic() {
|
||||
this.runZUGFeRDVisualization("factur-x.xml", "factur-x-vis.fr.html", Language.FR);
|
||||
}
|
||||
|
||||
public void testCIIVisualizationExtended() {
|
||||
this.runZUGFeRDVisualization("factur-x-extended.xml", "factur-x-vis-extended.de.html", Language.DE);
|
||||
}
|
||||
|
||||
public void testUBLCreditNoteVisualizationBasic() {
|
||||
this.runZUGFeRDVisualization("ubl-creditnote.xml", "factur-x-vis-ubl-creditnote.en.html", Language.EN);
|
||||
}
|
||||
|
||||
public void testUBLVisualizationBasic() {
|
||||
this.runZUGFeRDVisualization("ubl/01.01a-INVOICE.ubl.xml", "factur-x-vis-ubl.en.html", Language.EN);
|
||||
}
|
||||
|
||||
private void runZUGFeRDVisualization(String inputFilename, String resultFileName, Language lang) {
|
||||
File CIIinputFile = getResourceAsFile(inputFilename);
|
||||
|
||||
String expected = null;
|
||||
String result = null;
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
result = zvi.visualize(CIIinputFile.getAbsolutePath(), lang);
|
||||
Files.write(Paths.get("./target/testout-" + resultFileName), result.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
File expectedResult = getResourceAsFile(resultFileName);
|
||||
expected = new String(Files.readAllBytes(expectedResult.toPath()), StandardCharsets.UTF_8)
|
||||
;
|
||||
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
} catch (TransformerException e) {
|
||||
fail("TransformerException should not happen: " + e.getMessage());
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not happen: " + e.getMessage());
|
||||
} catch (ParserConfigurationException e) {
|
||||
fail("ParserConfigurationException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
assertNotNull(result);
|
||||
/* remove file endings so that tests can also pass after checking
|
||||
out from git with arbitrary options (which may include CSRF changes)
|
||||
*/
|
||||
assertEquals(expected.replace("\r", "")
|
||||
.replace("\n", "")
|
||||
.replace("\t", "")
|
||||
.replace(" ", ""), result.replace("\r", "")
|
||||
.replace("\n", "")
|
||||
.replace("\t", "")
|
||||
.replace(" ", ""));
|
||||
}
|
||||
|
||||
|
||||
public void testPDFVisualizationCII() {
|
||||
|
||||
File CIIinputFile = getResourceAsFile("cii/01.01a-INVOICE.cii.xml");
|
||||
|
||||
// the writing part
|
||||
|
||||
String expected = null;
|
||||
String result = null;
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
zvi.toPDF(CIIinputFile.getAbsolutePath(), TARGET_PDF_CII);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
assertTrue(ByteArraySearcher.startsWith(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), new byte[]{'%', 'P', 'D', 'F'}));
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not occur");
|
||||
}
|
||||
}
|
||||
|
||||
public void testPDFVisualizationUBL() {
|
||||
|
||||
File UBLinputFile = getResourceAsFile("ubl/01.01a-INVOICE.ubl.xml");
|
||||
|
||||
// the writing part
|
||||
String sourceFilename = "factur-x.xml";
|
||||
|
||||
String expected = null;
|
||||
String result = null;
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
zvi.toPDF(UBLinputFile.getAbsolutePath(), TARGET_PDF_UBL);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
assertTrue(ByteArraySearcher.startsWith(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), new byte[]{'%', 'P', 'D', 'F'}));
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not occur");
|
||||
}
|
||||
}
|
||||
|
||||
public void testPDFVisualizationUBLCreditNote() {
|
||||
|
||||
File UBLinputFile = getResourceAsFile("ubl/UBL-CreditNote-2.1-Example.ubl.xml");
|
||||
|
||||
// the writing part
|
||||
String sourceFilename = "factur-x.xml";
|
||||
|
||||
String expected = null;
|
||||
String result = null;
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
zvi.toPDF(UBLinputFile.getAbsolutePath(), TARGET_PDF_UBL);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
assertTrue(ByteArraySearcher.startsWith(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), new byte[]{'%', 'P', 'D', 'F'}));
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not occur");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* *********************************************************************
|
||||
* <p>
|
||||
* Copyright 2019 Jochen Staerk
|
||||
* <p>
|
||||
* Use is subject to license terms.
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy
|
||||
* of the License at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* <p>
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* <p>
|
||||
* **********************************************************************
|
||||
*/
|
||||
package org.mustangproject.ZUGFeRD;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.runners.MethodSorters;
|
||||
import org.mustangproject.ZUGFeRD.ZUGFeRDVisualizer.Language;
|
||||
import org.mustangproject.util.ByteArraySearcher;
|
||||
|
||||
import javax.xml.transform.TransformerException;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class VisualizationTest extends ResourceCase {
|
||||
|
||||
final String TARGET_PDF_CII = "./target/testout-Visualization-cii.pdf";
|
||||
final String TARGET_PDF_UBL = "./target/testout-Visualization-cii.pdf";
|
||||
|
||||
public void testCIIVisualizationBasic() {
|
||||
this.runZUGFeRDVisualization("factur-x.xml", "factur-x-vis.fr.html", Language.FR);
|
||||
}
|
||||
|
||||
public void testCIIVisualizationExtended() {
|
||||
this.runZUGFeRDVisualization("factur-x-extended.xml", "factur-x-vis-extended.de.html", Language.DE);
|
||||
}
|
||||
|
||||
public void testUBLCreditNoteVisualizationBasic() {
|
||||
this.runZUGFeRDVisualization("ubl-creditnote.xml", "factur-x-vis-ubl-creditnote.en.html", Language.EN);
|
||||
}
|
||||
|
||||
public void testUBLVisualizationBasic() {
|
||||
this.runZUGFeRDVisualization("ubl/01.01a-INVOICE.ubl.xml", "factur-x-vis-ubl.en.html", Language.EN);
|
||||
}
|
||||
|
||||
private void runZUGFeRDVisualization(String inputFilename, String resultFileName, Language lang) {
|
||||
File CIIinputFile = getResourceAsFile(inputFilename);
|
||||
|
||||
String expected = null;
|
||||
String result = null;
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
result = zvi.visualize(CIIinputFile.getAbsolutePath(), lang);
|
||||
Files.write(Paths.get("./target/testout-" + resultFileName), result.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
File expectedResult = getResourceAsFile(resultFileName);
|
||||
expected = new String(Files.readAllBytes(expectedResult.toPath()), StandardCharsets.UTF_8)
|
||||
;
|
||||
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
} catch (TransformerException e) {
|
||||
fail("TransformerException should not happen: " + e.getMessage());
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not happen: " + e.getMessage());
|
||||
} catch (ParserConfigurationException e) {
|
||||
fail("ParserConfigurationException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
assertNotNull(result);
|
||||
/* remove file endings so that tests can also pass after checking
|
||||
out from git with arbitrary options (which may include CSRF changes)
|
||||
*/
|
||||
assertEquals(expected.replace("\r", "")
|
||||
.replace("\n", "")
|
||||
.replace("\t", "")
|
||||
.replace(" ", ""), result.replace("\r", "")
|
||||
.replace("\n", "")
|
||||
.replace("\t", "")
|
||||
.replace(" ", ""));
|
||||
}
|
||||
|
||||
|
||||
public void testPDFVisualizationCII() {
|
||||
File CIIinputFile = getResourceAsFile("cii/01.01a-INVOICE.cii.xml");
|
||||
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
zvi.toPDF(CIIinputFile.getAbsolutePath(), TARGET_PDF_CII);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
assertTrue(ByteArraySearcher.startsWith(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), new byte[]{'%', 'P', 'D', 'F'}));
|
||||
assertTrue(ByteArraySearcher.contains(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), "<rdf:li>de</rdf:li>".getBytes()));
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not occur");
|
||||
}
|
||||
}
|
||||
|
||||
public void testPDFVisualizationCIIEnglish() {
|
||||
File CIIinputFile = getResourceAsFile("cii/01.01a-INVOICE.cii.xml");
|
||||
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
zvi.toPDF(CIIinputFile.getAbsolutePath(), TARGET_PDF_CII, Language.EN);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
assertTrue(ByteArraySearcher.startsWith(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), new byte[]{'%', 'P', 'D', 'F'}));
|
||||
assertTrue(ByteArraySearcher.contains(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), "<rdf:li>en</rdf:li>".getBytes()));
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not occur");
|
||||
}
|
||||
}
|
||||
|
||||
public void testPDFVisualizationCIIFrench() {
|
||||
File CIIinputFile = getResourceAsFile("cii/01.01a-INVOICE.cii.xml");
|
||||
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
zvi.toPDF(CIIinputFile.getAbsolutePath(), TARGET_PDF_CII, Language.FR);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
assertTrue(ByteArraySearcher.startsWith(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), new byte[]{'%', 'P', 'D', 'F'}));
|
||||
assertTrue(ByteArraySearcher.contains(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), "<rdf:li>fr</rdf:li>".getBytes()));
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not occur");
|
||||
}
|
||||
}
|
||||
|
||||
public void testPDFVisualizationUBL() {
|
||||
|
||||
File UBLinputFile = getResourceAsFile("ubl/01.01a-INVOICE.ubl.xml");
|
||||
|
||||
// the writing part
|
||||
String sourceFilename = "factur-x.xml";
|
||||
|
||||
String expected = null;
|
||||
String result = null;
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
zvi.toPDF(UBLinputFile.getAbsolutePath(), TARGET_PDF_UBL);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
assertTrue(ByteArraySearcher.startsWith(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), new byte[]{'%', 'P', 'D', 'F'}));
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not occur");
|
||||
}
|
||||
}
|
||||
|
||||
public void testPDFVisualizationUBLCreditNote() {
|
||||
|
||||
File UBLinputFile = getResourceAsFile("ubl/UBL-CreditNote-2.1-Example.ubl.xml");
|
||||
|
||||
// the writing part
|
||||
String sourceFilename = "factur-x.xml";
|
||||
|
||||
String expected = null;
|
||||
String result = null;
|
||||
try {
|
||||
ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
|
||||
zvi.toPDF(UBLinputFile.getAbsolutePath(), TARGET_PDF_UBL);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
fail("UnsupportedOperationException should not happen: " + e.getMessage());
|
||||
} catch (IllegalArgumentException e) {
|
||||
fail("IllegalArgumentException should not happen: " + e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
assertTrue(ByteArraySearcher.startsWith(Files.readAllBytes(Paths.get(TARGET_PDF_CII)), new byte[]{'%', 'P', 'D', 'F'}));
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not occur");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ public class ZF2PushTest extends TestCase {
|
||||
.addItem(new Item(new Product("Testprodukt", "", "H87", new BigDecimal(19)), price, new BigDecimal(1.0)))
|
||||
.addItem(new Item(new Product("Testprodukt", "", "H87", new BigDecimal(19)), price, new BigDecimal(1.0)))
|
||||
.addCharge(new Charge(new BigDecimal(0.5)).setTaxPercent(new BigDecimal(19)).setReasonCode("ABK"))
|
||||
.addAllowance(new Allowance(new BigDecimal(0.2)).setTaxPercent(new BigDecimal(19)).setReasonCode("ABK"))
|
||||
.addAllowance(new Allowance(new BigDecimal(0.2)).setTaxPercent(new BigDecimal(19)).setReasonCode("95"))
|
||||
);
|
||||
String theXML = new String(ze.getProvider().getXML(), StandardCharsets.UTF_8);
|
||||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
||||
@@ -598,7 +598,7 @@ public class ZF2PushTest extends TestCase {
|
||||
ReferencedDocument dr1=new ReferencedDocument("90-kl-98798-C", sdf.parse("2025-10-12"));
|
||||
ReferencedDocument dr2=new ReferencedDocument("90-kl-98798-C1", sdf.parse("2025-10-13"));
|
||||
dr2.setReferenceTypeCode("AAG");
|
||||
ze.setTransaction(new Invoice().setCurrency("CHF").addNote("document level 1/2").addNote("document level 2/2").setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date()).setPaymentReference("Verwendungszweck").setDocumentName("Rechnung")
|
||||
ze.setTransaction(new Invoice().setTestIndicator().setCurrency("CHF").addNote("document level 1/2").addNote("document level 2/2").setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date()).setPaymentReference("Verwendungszweck").setDocumentName("Rechnung")
|
||||
.setSellerOrderReferencedDocumentID("9384").setBuyerOrderReferencedDocumentID("28934")
|
||||
.setDetailedDeliveryPeriod(new SimpleDateFormat("yyyyMMdd").parse(occurrenceFrom), new SimpleDateFormat("yyyyMMdd").parse(occurrenceTo))
|
||||
.setSender(new TradeParty(orgname, "teststr", "55232", "teststadt", "DE").addTaxID(taxID).setEmail("sender@test.org").setID(orgID).addVATID("DE0815"))
|
||||
@@ -628,6 +628,7 @@ public class ZF2PushTest extends TestCase {
|
||||
|
||||
String theXML = new String(ze.getProvider().getXML(), StandardCharsets.UTF_8);
|
||||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
||||
assertTrue(theXML.contains("<ram:TestIndicator"));
|
||||
ze.export(TARGET_PUSHEDGE);
|
||||
} catch (IOException e) {
|
||||
fail("IOException should not be raised");
|
||||
@@ -761,8 +762,9 @@ public class ZF2PushTest extends TestCase {
|
||||
.setNumber(number)
|
||||
.addItem(new Item(new Product("Testprodukt", "", "H87", new BigDecimal(19)), price, new BigDecimal(1.0)))
|
||||
.addItem(new Item(new Product("Testprodukt", "", "H87", new BigDecimal(19)), price, new BigDecimal(1.0)))
|
||||
.addItem(new Item(new Product("Testprodukt", "", "H87", new BigDecimal(19)), price, new BigDecimal(1.0))).addCharge(new Charge().setPercent(new BigDecimal(50)).setTaxPercent(new BigDecimal(19)).setReasonCode("ABK"))
|
||||
.addAllowance(new Allowance().setPercent(new BigDecimal(50)).setTaxPercent(new BigDecimal(19)).setReason("Mengenrabatt"))
|
||||
.addItem(new Item(new Product("Testprodukt", "", "H87", new BigDecimal(19)), price, new BigDecimal(1.0)))
|
||||
.addCharge(new Charge().setPercent(new BigDecimal(50)).setBasisAmount(price).setTaxPercent(new BigDecimal(19)).setReasonCode("ABK").setReason("Verschiedenes"))
|
||||
.addAllowance(new Allowance().setPercent(new BigDecimal(50)).setTaxPercent(new BigDecimal(19)).setReasonCode("95").setReason("Mengenrabatt"))
|
||||
);
|
||||
String theXML = new String(ze.getProvider().getXML(), StandardCharsets.UTF_8);
|
||||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
||||
|
||||
@@ -14,7 +14,6 @@ import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.xpath.XPath;
|
||||
import javax.xml.xpath.XPathConstants;
|
||||
@@ -23,6 +22,7 @@ import javax.xml.xpath.XPathExpressionException;
|
||||
import javax.xml.xpath.XPathFactory;
|
||||
|
||||
import org.mustangproject.util.ByteArraySearcher;
|
||||
import org.mustangproject.XMLTools;
|
||||
import org.mustangproject.ZUGFeRD.ZUGFeRDImporter;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -127,7 +127,7 @@ public class PDFValidator extends Validator {
|
||||
final ZUGFeRDImporter zi = new ZUGFeRDImporter();
|
||||
zi.doIgnoreCalculationErrors();//of course the calculation will still be schematron checked
|
||||
zi.setInputStream(inputStream);
|
||||
final String xmp = zi.getXMP();
|
||||
final String xmp = zi.getXMP().substring(zi.getXMP().indexOf('<'));
|
||||
|
||||
final Document docXMP;
|
||||
|
||||
@@ -142,12 +142,7 @@ public class PDFValidator extends Validator {
|
||||
* <zf:Version>1.0</zf:Version>
|
||||
*/
|
||||
try {
|
||||
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
|
||||
// and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
|
||||
factory.setXIncludeAware(false);
|
||||
|
||||
final DocumentBuilder builder = factory.newDocumentBuilder();
|
||||
final DocumentBuilder builder = XMLTools.getDocumentBuilder(false);
|
||||
final InputSource is = new InputSource(new StringReader(xmp));
|
||||
docXMP = builder.parse(is);
|
||||
|
||||
|
||||
@@ -7,9 +7,8 @@ import java.net.URL;
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.transform.Source;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import javax.xml.validation.Schema;
|
||||
import javax.xml.validation.SchemaFactory;
|
||||
|
||||
import org.mustangproject.XMLTools;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.xml.sax.SAXException;
|
||||
@@ -59,11 +58,8 @@ public abstract class Validator {
|
||||
protected void validateSchema(byte[] xmlRawData, String schemaPath, int section, EPart part) throws IrrecoverableValidationError {
|
||||
URL schemaFile = Thread.currentThread().getContextClassLoader().getResource("schema/" + schemaPath);
|
||||
Source xmlData = new StreamSource(new ByteArrayInputStream(xmlRawData));
|
||||
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
|
||||
try {
|
||||
schemaFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
|
||||
Schema schema = schemaFactory.newSchema(schemaFile);
|
||||
javax.xml.validation.Validator validator = schema.newValidator();
|
||||
javax.xml.validation.Validator validator = XMLTools.getValidator(schemaFile);
|
||||
validator.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
validator.validate(xmlData);
|
||||
} catch (SAXException e) {
|
||||
|
||||
@@ -13,9 +13,7 @@ import java.text.ParseException;
|
||||
import java.util.Calendar;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.transform.stream.StreamSource;
|
||||
import javax.xml.xpath.XPath;
|
||||
import javax.xml.xpath.XPathConstants;
|
||||
@@ -156,26 +154,7 @@ public class XMLValidator extends Validator {
|
||||
*
|
||||
*/
|
||||
|
||||
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
//REDHAT
|
||||
//https://www.blackhat.com/docs/us-15/materials/us-15-Wang-FileCry-The-New-Age-Of-XXE-java-wp.pdf
|
||||
dbf.setAttribute(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
|
||||
|
||||
//OWASP
|
||||
//https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
|
||||
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
|
||||
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
|
||||
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
|
||||
// Disable external DTDs as well
|
||||
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
|
||||
// and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
|
||||
dbf.setXIncludeAware(false);
|
||||
dbf.setExpandEntityReferences(false);
|
||||
dbf.setNamespaceAware(true);
|
||||
|
||||
final DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
final DocumentBuilder db = XMLTools.getDocumentBuilder(true);
|
||||
final InputSource is = new InputSource(new StringReader(zfXML));
|
||||
final Document doc = db.parse(is);
|
||||
|
||||
@@ -213,8 +192,10 @@ public class XMLValidator extends Validator {
|
||||
boolean isExtended = false;
|
||||
boolean isXRechnung = false;
|
||||
String currentZFVersionDir = "ZF_240";
|
||||
String currentXPZ12VersionDir ="XP_Z12_012";
|
||||
int mainSchematronSectionErrorTypeCode = 4;
|
||||
String xsltFilename = null;
|
||||
boolean runFrenchCiiSchematron = false;
|
||||
// urn:ferd:CrossIndustryDocument:invoice:1p0:extended,
|
||||
// urn:ferd:CrossIndustryDocument:invoice:1p0:comfort,
|
||||
// urn:ferd:CrossIndustryDocument:invoice:1p0:basic,
|
||||
@@ -234,6 +215,11 @@ public class XMLValidator extends Validator {
|
||||
|
||||
} else if (root.getLocalName().equalsIgnoreCase("CrossIndustryInvoice")) { // ZUGFeRD 2.0 or Factur-X
|
||||
context.setGeneration("2");
|
||||
final String sellerCountry = getXPathString(doc,
|
||||
"//*[local-name() = 'CrossIndustryInvoice']//*[local-name() = 'SupplyChainTradeTransaction']//*[local-name() = 'ApplicableHeaderTradeAgreement']//*[local-name() = 'SellerTradeParty']//*[local-name() = 'PostalTradeAddress']/*[local-name() = 'CountryID']/text()");
|
||||
final String buyerCountry = getXPathString(doc,
|
||||
"//*[local-name() = 'CrossIndustryInvoice']//*[local-name() = 'SupplyChainTradeTransaction']//*[local-name() = 'ApplicableHeaderTradeAgreement']//*[local-name() = 'BuyerTradeParty']//*[local-name() = 'PostalTradeAddress']/*[local-name() = 'CountryID']/text()");
|
||||
runFrenchCiiSchematron = "FR".equalsIgnoreCase(sellerCountry) && "FR".equalsIgnoreCase(buyerCountry);
|
||||
|
||||
isMiniumum = contextProfile.contains("minimum");
|
||||
isBasic = contextProfile.contains("basic");
|
||||
@@ -391,6 +377,11 @@ public class XMLValidator extends Validator {
|
||||
// main schematron validation
|
||||
validateSchematron(zfXML, xsltFilename, mainSchematronSectionErrorTypeCode, ESeverity.error);
|
||||
|
||||
if (runFrenchCiiSchematron) {
|
||||
String xsltFRFilename = "/xslt/" + currentXPZ12VersionDir + "/20260216_BR-FR-Flux2-Schematron-CII_V1.3.0.xsl";
|
||||
validateSchematron(zfXML, xsltFRFilename, mainSchematronSectionErrorTypeCode, ESeverity.error);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ("CII".equals(context.getFormat()) && ("2".equals(context.getGeneration()))) {
|
||||
@@ -546,6 +537,16 @@ public class XMLValidator extends Validator {
|
||||
}
|
||||
}
|
||||
|
||||
private String getXPathString(Document doc, String expression) throws IrrecoverableValidationError {
|
||||
try {
|
||||
XPath xpath = XPathFactory.newInstance().newXPath();
|
||||
String value = (String) xpath.compile(expression).evaluate(doc, XPathConstants.STRING);
|
||||
return value == null ? "" : value.trim();
|
||||
} catch (XPathExpressionException e) {
|
||||
throw new IrrecoverableValidationError(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void validateXR(String xml, ESeverity errorImpact) throws IrrecoverableValidationError {
|
||||
|
||||
//Guideline ID=urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_1.2 or
|
||||
|
||||
@@ -17,9 +17,7 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.xml.XMLConstants;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.dom4j.DocumentException;
|
||||
@@ -143,24 +141,7 @@ public class ZUGFeRDValidator {
|
||||
boolean isXML = false;
|
||||
String xmlAsString = null;
|
||||
try {
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
//REDHAT
|
||||
//https://www.blackhat.com/docs/us-15/materials/us-15-Wang-FileCry-The-New-Age-Of-XXE-java-wp.pdf
|
||||
dbf.setAttribute(XMLConstants.FEATURE_SECURE_PROCESSING, true);
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
|
||||
dbf.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
|
||||
|
||||
//OWASP
|
||||
//https://cheatsheetseries.owasp.org/cheatsheets/XML_External_Entity_Prevention_Cheat_Sheet.html
|
||||
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
|
||||
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
|
||||
// Disable external DTDs as well
|
||||
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
|
||||
// and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
|
||||
dbf.setXIncludeAware(false);
|
||||
dbf.setExpandEntityReferences(false);
|
||||
dbf.setNamespaceAware(true);
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
DocumentBuilder db = XMLTools.getDocumentBuilder(true);
|
||||
|
||||
content = XMLTools.removeBOM(content);
|
||||
xmlAsString = new String(content, StandardCharsets.UTF_8);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2025,9 +2025,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100)" />
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100)">
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100)">
|
||||
<xsl:attribute name="id">FX-SCH-A-000118</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
@@ -2040,9 +2040,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= 
round(((round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 10 * 10 ) div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100))*10*10) div 100" />
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= 
round(((round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100) + (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount return xs:decimal($a))* 10 * 10 ) div 100))*10*10) div 100" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= round(((round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 10 * 10 ) div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100))*10*10) div 100">
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= round(((round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100) + (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount return xs:decimal($a))* 10 * 10 ) div 100))*10*10) div 100">
|
||||
<xsl:attribute name="id">FX-SCH-A-000119</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
|
||||
@@ -2633,9 +2633,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)) * xs:decimal(100)) div xs:decimal(100)" />
|
||||
<xsl:when test="xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(for $a in ../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount return xs:decimal($a))) * xs:decimal(100)) div xs:decimal(100)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)) * xs:decimal(100)) div xs:decimal(100)">
|
||||
<svrl:failed-assert test="xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(for $a in ../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount return xs:decimal($a))) * xs:decimal(100)) div xs:decimal(100)">
|
||||
<xsl:attribute name="id">FX-SCH-A-000226</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
@@ -2708,9 +2708,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100)" />
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100)">
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100)">
|
||||
<xsl:attribute name="id">FX-SCH-A-000118</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
@@ -2723,9 +2723,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= 
round(((round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 10 * 10 ) div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100))*10*10) div 100" />
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= 
round(((round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100) + (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount return xs:decimal($a))* 10 * 10 ) div 100))*10*10) div 100" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= round(((round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 10 * 10 ) div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100))*10*10) div 100">
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= round(((round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100) + (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount return xs:decimal($a))* 10 * 10 ) div 100))*10*10) div 100">
|
||||
<xsl:attribute name="id">FX-SCH-A-000119</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
|
||||
@@ -2703,9 +2703,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)) * xs:decimal(100)) div xs:decimal(100)" />
|
||||
<xsl:when test="xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(for $a in ../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount return xs:decimal($a))) * xs:decimal(100)) div xs:decimal(100)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)) * xs:decimal(100)) div xs:decimal(100)">
|
||||
<svrl:failed-assert test="xs:decimal(ram:LineTotalAmount) = round(xs:decimal(sum(for $a in ../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount return xs:decimal($a))) * xs:decimal(100)) div xs:decimal(100)">
|
||||
<xsl:attribute name="id">FX-SCH-A-000226</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
@@ -2778,9 +2778,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100)" />
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100)">
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])and not (ram:AllowanceTotalAmount)) or ram:AllowanceTotalAmount = (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100)">
|
||||
<xsl:attribute name="id">FX-SCH-A-000118</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
@@ -2793,9 +2793,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= 
round(((round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 10 * 10 ) div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100))*10*10) div 100" />
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= 
round(((round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100) + (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount return xs:decimal($a))* 10 * 10 ) div 100))*10*10) div 100" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= round(((round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 10 * 10 ) div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100))*10*10) div 100">
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (round (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:ChargeTotalAmount * 10 * 10) div 100)= round(((round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount return xs:decimal($a))* 10 * 10 ) div 100) + (round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount return xs:decimal($a))* 10 * 10 ) div 100))*10*10) div 100">
|
||||
<xsl:attribute name="id">FX-SCH-A-000119</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
|
||||
@@ -2903,9 +2903,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="for $calculatedAmount in xs:decimal(round(sum(../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode)
 or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL']/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount) * xs:decimal(100)) div xs:decimal(100)),
 $totalAmount in xs:decimal(ram:LineTotalAmount),
 $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem)),
 $tolerance in xs:decimal(0.01),
 $maxTolerance in $nbLineItems * $tolerance,
 $diff in xs:decimal($totalAmount - $calculatedAmount),
 $abs in xs:decimal(abs($diff))
 return
 $abs le $maxTolerance" />
|
||||
<xsl:when test="for $calculatedAmount in xs:decimal(round(sum(for $a in ../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode)
 or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL']/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount return xs:decimal($a)) * xs:decimal(100)) div xs:decimal(100)),
 $totalAmount in xs:decimal(ram:LineTotalAmount),
 $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem)),
 $tolerance in xs:decimal(0.01),
 $maxTolerance in $nbLineItems * $tolerance,
 $diff in xs:decimal($totalAmount - $calculatedAmount),
 $abs in xs:decimal(abs($diff))
 return
 $abs le $maxTolerance" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="for $calculatedAmount in xs:decimal(round(sum(../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL']/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount) * xs:decimal(100)) div xs:decimal(100)), $totalAmount in xs:decimal(ram:LineTotalAmount), $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem)), $tolerance in xs:decimal(0.01), $maxTolerance in $nbLineItems * $tolerance, $diff in xs:decimal($totalAmount - $calculatedAmount), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance">
|
||||
<svrl:failed-assert test="for $calculatedAmount in xs:decimal(round(sum(for $a in ../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL']/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount return xs:decimal($a)) * xs:decimal(100)) div xs:decimal(100)), $totalAmount in xs:decimal(ram:LineTotalAmount), $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem)), $tolerance in xs:decimal(0.01), $maxTolerance in $nbLineItems * $tolerance, $diff in xs:decimal($totalAmount - $calculatedAmount), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance">
|
||||
<xsl:attribute name="id">FX-SCH-A-000365</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
@@ -3008,9 +3008,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="for $BT109 in xs:decimal(ram:TaxBasisTotalAmount),
 $BT131Sum in xs:decimal(round(sum(../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode)
 or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL']/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount) * xs:decimal(100)) div xs:decimal(100)),
 $BT92Sum in xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100),
 $BT99Sum in xs:decimal(xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 100 ) div 100)+ xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100)),
 $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode)
 or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL'])),
 $nbAllowanceItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])),
 $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)),
 $tolerance in xs:decimal(0.01),
 $maxTolerance in $tolerance * ($nbLineItems + $nbAllowanceItems + $nbChargeItems),
 $diff in xs:decimal($BT109 - $BT131Sum + $BT92Sum - $BT99Sum),
 $abs in xs:decimal(abs($diff))
 return
 $abs le $maxTolerance" />
|
||||
<xsl:when test="for $BT109 in xs:decimal(ram:TaxBasisTotalAmount),
 $BT131Sum in xs:decimal(round(sum(for $a in ../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode)
 or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL']/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount return xs:decimal($a)) * xs:decimal(100)) div xs:decimal(100)),
 $BT92Sum in xs:decimal(round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount return xs:decimal($a)) * 10 * 10 ) div 100),
 $BT99Sum in xs:decimal(xs:decimal(round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount return xs:decimal($a)) * 100 ) div 100)+ xs:decimal(round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount return xs:decimal($a)) * 10 * 10 ) div 100)),
 $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode)
 or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL'])),
 $nbAllowanceItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])),
 $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)),
 $tolerance in xs:decimal(0.01),
 $maxTolerance in $tolerance * ($nbLineItems + $nbAllowanceItems + $nbChargeItems),
 $diff in xs:decimal($BT109 - $BT131Sum + $BT92Sum - $BT99Sum),
 $abs in xs:decimal(abs($diff))
 return
 $abs le $maxTolerance" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="for $BT109 in xs:decimal(ram:TaxBasisTotalAmount), $BT131Sum in xs:decimal(round(sum(../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL']/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount) * xs:decimal(100)) div xs:decimal(100)), $BT92Sum in xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100), $BT99Sum in xs:decimal(xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 100 ) div 100)+ xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100)), $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL'])), $nbAllowanceItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])), $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)), $tolerance in xs:decimal(0.01), $maxTolerance in $tolerance * ($nbLineItems + $nbAllowanceItems + $nbChargeItems), $diff in xs:decimal($BT109 - $BT131Sum + $BT92Sum - $BT99Sum), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance">
|
||||
<svrl:failed-assert test="for $BT109 in xs:decimal(ram:TaxBasisTotalAmount), $BT131Sum in xs:decimal(round(sum(for $a in ../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL']/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount return xs:decimal($a)) * xs:decimal(100)) div xs:decimal(100)), $BT92Sum in xs:decimal(round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount return xs:decimal($a)) * 10 * 10 ) div 100), $BT99Sum in xs:decimal(xs:decimal(round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount return xs:decimal($a)) * 100 ) div 100)+ xs:decimal(round(sum(for $a in /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount return xs:decimal($a)) * 10 * 10 ) div 100)), $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem[not(ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode) or ram:AssociatedDocumentLineDocument/ram:LineStatusReasonCode = 'DETAIL'])), $nbAllowanceItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])), $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)), $tolerance in xs:decimal(0.01), $maxTolerance in $tolerance * ($nbLineItems + $nbAllowanceItems + $nbChargeItems), $diff in xs:decimal($BT109 - $BT131Sum + $BT92Sum - $BT99Sum), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance">
|
||||
<xsl:attribute name="id">FX-SCH-A-000366</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Licensed under European Union Public Licence (EUPL) version 1.2.
|
||||
|
||||
-->
|
||||
<!--Schematron version 1.3.12 - Last update: 2024-04-06--><xsl:stylesheet xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:ccts="urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:saxon="http://saxon.sf.net/" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
|
||||
<!--Schematron version 1.3.14.2 - Last update: 2025-06-15--><xsl:stylesheet xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:ccts="urn:un:unece:uncefact:documentation:standard:CoreComponentsTechnicalSpecification:2" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:saxon="http://saxon.sf.net/" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
|
||||
<!--Implementers: please note that overriding process-prolog or process-root is
|
||||
the preferred method for meta-stylesheets to use where possible. -->
|
||||
|
||||
@@ -175,6 +175,9 @@
|
||||
<xsl:attribute name="document">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="documents">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="id">EN16931-CII-Model</xsl:attribute>
|
||||
<xsl:attribute name="name">EN16931-CII-Model</xsl:attribute>
|
||||
<xsl:apply-templates />
|
||||
@@ -184,6 +187,9 @@
|
||||
<xsl:attribute name="document">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="documents">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="id">EN16931-CII-Syntax</xsl:attribute>
|
||||
<xsl:attribute name="name">EN16931-CII-Syntax</xsl:attribute>
|
||||
<xsl:apply-templates />
|
||||
@@ -193,6 +199,9 @@
|
||||
<xsl:attribute name="document">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="documents">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="id">EN16931-Codes</xsl:attribute>
|
||||
<xsl:attribute name="name">EN16931-Codes</xsl:attribute>
|
||||
<xsl:apply-templates />
|
||||
@@ -208,28 +217,7 @@
|
||||
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:SpecifiedTradeAllowanceCharge" mode="M10" priority="1059">
|
||||
<svrl:fired-rule context="//ram:SpecifiedTradeAllowanceCharge" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(ram:ChargeIndicator)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(ram:ChargeIndicator)">
|
||||
<xsl:attribute name="id">BR-66</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-66]-Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a Charge Indicator.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M10" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:DesignatedProductClassification" mode="M10" priority="1058">
|
||||
<xsl:template match="//ram:DesignatedProductClassification" mode="M10" priority="1059">
|
||||
<svrl:fired-rule context="//ram:DesignatedProductClassification" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -250,7 +238,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:AdditionalReferencedDocument" mode="M10" priority="1057">
|
||||
<xsl:template match="//ram:AdditionalReferencedDocument" mode="M10" priority="1058">
|
||||
<svrl:fired-rule context="//ram:AdditionalReferencedDocument" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -271,7 +259,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:ApplicableTradeSettlementFinancialCard" mode="M10" priority="1056">
|
||||
<xsl:template match="//ram:ApplicableTradeSettlementFinancialCard" mode="M10" priority="1057">
|
||||
<svrl:fired-rule context="//ram:ApplicableTradeSettlementFinancialCard" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -292,8 +280,8 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount" mode="M10" priority="1055">
|
||||
<svrl:fired-rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount" />
|
||||
<xsl:template match="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayeePartyCreditorFinancialAccount" mode="M10" priority="1056">
|
||||
<svrl:fired-rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayeePartyCreditorFinancialAccount" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
@@ -328,7 +316,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery" mode="M10" priority="1054">
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery" mode="M10" priority="1055">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -349,7 +337,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='false']" mode="M10" priority="1053">
|
||||
<xsl:template match="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='false']" mode="M10" priority="1054">
|
||||
<svrl:fired-rule context="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='false']" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -460,7 +448,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='true']" mode="M10" priority="1052">
|
||||
<xsl:template match="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='true']" mode="M10" priority="1053">
|
||||
<svrl:fired-rule context="//ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator='true']" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -571,7 +559,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:SpecifiedTradeSettlementHeaderMonetarySummation" mode="M10" priority="1051">
|
||||
<xsl:template match="//ram:SpecifiedTradeSettlementHeaderMonetarySummation" mode="M10" priority="1052">
|
||||
<svrl:fired-rule context="//ram:SpecifiedTradeSettlementHeaderMonetarySummation" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -681,7 +669,7 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()])and not (ram:ChargeTotalAmount)) or ram:ChargeTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount)* 10 * 10 ) div 100) " />
|
||||
<xsl:when test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()])and not (ram:ChargeTotalAmount)) or ram:ChargeTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount)* 10 * 10 ) div 100)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()])and not (ram:ChargeTotalAmount)) or ram:ChargeTotalAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true()]/ram:ActualAmount)* 10 * 10 ) div 100)">
|
||||
<xsl:attribute name="id">BR-CO-12</xsl:attribute>
|
||||
@@ -877,7 +865,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice" mode="M10" priority="1050">
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice" mode="M10" priority="1051">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -1288,7 +1276,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:IncludedSupplyChainTradeLineItem" mode="M10" priority="1049">
|
||||
<xsl:template match="//ram:IncludedSupplyChainTradeLineItem" mode="M10" priority="1050">
|
||||
<svrl:fired-rule context="//ram:IncludedSupplyChainTradeLineItem" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -1458,9 +1446,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(substring-after(ram:SpecifiedTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2" />
|
||||
<xsl:when test="string-length(substring-after(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="string-length(substring-after(ram:SpecifiedTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2">
|
||||
<svrl:failed-assert test="string-length(substring-after(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2">
|
||||
<xsl:attribute name="id">BR-DEC-23</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -1474,7 +1462,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator = 'false']" mode="M10" priority="1048">
|
||||
<xsl:template match="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator = 'false']" mode="M10" priority="1049">
|
||||
<svrl:fired-rule context="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator = 'false']" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -1570,7 +1558,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator = 'true']" mode="M10" priority="1047">
|
||||
<xsl:template match="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator = 'true']" mode="M10" priority="1048">
|
||||
<svrl:fired-rule context="//ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge/ram:ChargeIndicator[udt:Indicator = 'true']" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -1666,7 +1654,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod" mode="M10" priority="1046">
|
||||
<xsl:template match="//ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod" mode="M10" priority="1047">
|
||||
<svrl:fired-rule context="//ram:SpecifiedLineTradeSettlement/ram:BillingSpecifiedPeriod" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -1702,7 +1690,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod" mode="M10" priority="1045">
|
||||
<xsl:template match="//ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod" mode="M10" priority="1046">
|
||||
<svrl:fired-rule context="//ram:ApplicableHeaderTradeSettlement/ram:BillingSpecifiedPeriod" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -1738,7 +1726,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:ApplicableProductCharacteristic" mode="M10" priority="1044">
|
||||
<xsl:template match="//ram:ApplicableProductCharacteristic" mode="M10" priority="1045">
|
||||
<svrl:fired-rule context="//ram:ApplicableProductCharacteristic" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -1759,7 +1747,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:PayeeTradeParty" mode="M10" priority="1043">
|
||||
<xsl:template match="//ram:PayeeTradeParty" mode="M10" priority="1044">
|
||||
<svrl:fired-rule context="//ram:PayeeTradeParty" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -1780,7 +1768,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:SpecifiedTradeSettlementPaymentMeans" mode="M10" priority="1042">
|
||||
<xsl:template match="//ram:SpecifiedTradeSettlementPaymentMeans" mode="M10" priority="1043">
|
||||
<svrl:fired-rule context="//ram:SpecifiedTradeSettlementPaymentMeans" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -1797,12 +1785,18 @@
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M10" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:SpecifiedTradeSettlementPaymentMeans[some $code in tokenize('49 59', '\s') satisfies normalize-space(ram:TypeCode) = $code]" mode="M10" priority="1042">
|
||||
<svrl:fired-rule context="//ram:SpecifiedTradeSettlementPaymentMeans[some $code in tokenize('49 59', '\s') satisfies normalize-space(ram:TypeCode) = $code]" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(ram:PayeePartyCreditorFinancialAccount/ram:IBANID) or (ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID) or (not(ram:PayeePartyCreditorFinancialAccount/ram:IBANID) and not(ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID))" />
|
||||
<xsl:when test="(ram:PayeePartyCreditorFinancialAccount/ram:IBANID or ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID) and not(ram:PayeePartyCreditorFinancialAccount/ram:IBANID and ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(ram:PayeePartyCreditorFinancialAccount/ram:IBANID) or (ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID) or (not(ram:PayeePartyCreditorFinancialAccount/ram:IBANID) and not(ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID))">
|
||||
<svrl:failed-assert test="(ram:PayeePartyCreditorFinancialAccount/ram:IBANID or ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID) and not(ram:PayeePartyCreditorFinancialAccount/ram:IBANID and ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID)">
|
||||
<xsl:attribute name="id">BR-CO-27</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -1929,7 +1923,7 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test=". = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount)*10*10)div 100) " />
|
||||
<xsl:when test=". = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount)*10*10)div 100)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test=". = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:CalculatedAmount)*10*10)div 100)">
|
||||
<xsl:attribute name="id">BR-CO-14</xsl:attribute>
|
||||
@@ -1971,9 +1965,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(../ram:BasisAmount -1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'AE']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='AE']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='AE']/ram:ActualAmount)*10*10)div 100)) and (../ram:BasisAmount +1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'AE']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='AE']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='AE']/ram:ActualAmount)*10*10)div 100))" />
|
||||
<xsl:when test="(../ram:BasisAmount -1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'AE']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='AE']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='AE']/xs:decimal(ram:ActualAmount))*10*10)div 100)) and (../ram:BasisAmount +1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'AE']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='AE']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='AE']/xs:decimal(ram:ActualAmount))*10*10)div 100))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(../ram:BasisAmount -1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'AE']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='AE']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='AE']/ram:ActualAmount)*10*10)div 100)) and (../ram:BasisAmount +1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'AE']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='AE']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='AE']/ram:ActualAmount)*10*10)div 100))">
|
||||
<svrl:failed-assert test="(../ram:BasisAmount -1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'AE']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='AE']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='AE']/xs:decimal(ram:ActualAmount))*10*10)div 100)) and (../ram:BasisAmount +1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'AE']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='AE']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='AE']/xs:decimal(ram:ActualAmount))*10*10)div 100))">
|
||||
<xsl:attribute name="id">BR-AE-08</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -2355,9 +2349,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="ram:RateApplicablePercent > 0" />
|
||||
<xsl:when test="ram:RateApplicablePercent >= 0" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="ram:RateApplicablePercent > 0">
|
||||
<svrl:failed-assert test="ram:RateApplicablePercent >= 0">
|
||||
<xsl:attribute name="id">BR-AG-05</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -2391,9 +2385,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="ram:RateApplicablePercent > 0" />
|
||||
<xsl:when test="ram:RateApplicablePercent >= 0" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="ram:RateApplicablePercent > 0">
|
||||
<svrl:failed-assert test="ram:RateApplicablePercent >= 0">
|
||||
<xsl:attribute name="id">BR-AG-06</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -2427,9 +2421,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="ram:RateApplicablePercent > 0" />
|
||||
<xsl:when test="ram:RateApplicablePercent >= 0" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="ram:RateApplicablePercent > 0">
|
||||
<svrl:failed-assert test="ram:RateApplicablePercent >= 0">
|
||||
<xsl:attribute name="id">BR-AG-07</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -2448,9 +2442,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(../ram:BasisAmount - 1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'E']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='E']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='E']/ram:ActualAmount)*10*10)div 100)) and (../ram:BasisAmount + 1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'E']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='E']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='E']/ram:ActualAmount)*10*10)div 100))" />
|
||||
<xsl:when test="(../ram:BasisAmount - 1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'E']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='E']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='E']/xs:decimal(ram:ActualAmount))*10*10)div 100)) and (../ram:BasisAmount + 1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'E']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='E']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='E']/xs:decimal(ram:ActualAmount))*10*10)div 100))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(../ram:BasisAmount - 1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'E']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='E']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='E']/ram:ActualAmount)*10*10)div 100)) and (../ram:BasisAmount + 1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'E']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='E']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='E']/ram:ActualAmount)*10*10)div 100))">
|
||||
<svrl:failed-assert test="(../ram:BasisAmount - 1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'E']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='E']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='E']/xs:decimal(ram:ActualAmount))*10*10)div 100)) and (../ram:BasisAmount + 1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'E']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='E']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='E']/xs:decimal(ram:ActualAmount))*10*10)div 100))">
|
||||
<xsl:attribute name="id">BR-E-08</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -2607,9 +2601,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(../ram:BasisAmount -1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'G']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='G']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='G']/ram:ActualAmount)*10*10)div 100)) and (../ram:BasisAmount +1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'G']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='G']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='G']/ram:ActualAmount)*10*10)div 100))" />
|
||||
<xsl:when test="(../ram:BasisAmount -1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'G']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='G']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='G']/xs:decimal(ram:ActualAmount))*10*10)div 100)) and (../ram:BasisAmount +1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'G']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='G']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='G']/xs:decimal(ram:ActualAmount))*10*10)div 100))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(../ram:BasisAmount -1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'G']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='G']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='G']/ram:ActualAmount)*10*10)div 100)) and (../ram:BasisAmount +1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'G']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='G']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='G']/ram:ActualAmount)*10*10)div 100))">
|
||||
<svrl:failed-assert test="(../ram:BasisAmount -1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'G']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='G']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='G']/xs:decimal(ram:ActualAmount))*10*10)div 100)) and (../ram:BasisAmount +1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'G']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='G']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='G']/xs:decimal(ram:ActualAmount))*10*10)div 100))">
|
||||
<xsl:attribute name="id">BR-G-08</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -2766,9 +2760,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(../ram:BasisAmount - 1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100)) and (../ram:BasisAmount + 1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100))" />
|
||||
<xsl:when test="(../ram:BasisAmount - 1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/xs:decimal(ram:ActualAmount))*10*10)div 100)) and (../ram:BasisAmount + 1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/xs:decimal(ram:ActualAmount))*10*10)div 100))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(../ram:BasisAmount - 1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100)) and (../ram:BasisAmount + 1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100))">
|
||||
<svrl:failed-assert test="(../ram:BasisAmount - 1 < (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/xs:decimal(ram:ActualAmount))*10*10)div 100)) and (../ram:BasisAmount + 1 > (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount))*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/xs:decimal(ram:ActualAmount))*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/xs:decimal(ram:ActualAmount))*10*10)div 100))">
|
||||
<xsl:attribute name="id">BR-IC-08</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -3066,9 +3060,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])" />
|
||||
<xsl:when test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])">
|
||||
<svrl:failed-assert test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])">
|
||||
<xsl:attribute name="id">BR-O-03</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -3102,9 +3096,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])" />
|
||||
<xsl:when test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])">
|
||||
<svrl:failed-assert test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])">
|
||||
<xsl:attribute name="id">BR-O-04</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -3138,9 +3132,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])" />
|
||||
<xsl:when test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])">
|
||||
<svrl:failed-assert test="not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']) and not (//ram:BuyerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA'])">
|
||||
<xsl:attribute name="id">BR-O-02</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -3620,7 +3614,28 @@
|
||||
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext" mode="M11" priority="1027">
|
||||
<xsl:template match="//ram:SpecifiedTradeSettlementPaymentMeans" mode="M11" priority="1030">
|
||||
<svrl:fired-rule context="//ram:SpecifiedTradeSettlementPaymentMeans" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(ram:PayeeSpecifiedCreditorFinancialInstitution or ram:PayerSpecifiedDebtorFinancialInstitution) or (not(ram:PayeeSpecifiedCreditorFinancialInstitution) and not(ram:PayerSpecifiedDebtorFinancialInstitution))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(ram:PayeeSpecifiedCreditorFinancialInstitution or ram:PayerSpecifiedDebtorFinancialInstitution) or (not(ram:PayeeSpecifiedCreditorFinancialInstitution) and not(ram:PayerSpecifiedDebtorFinancialInstitution))">
|
||||
<xsl:attribute name="id">CII-SR-464</xsl:attribute>
|
||||
<xsl:attribute name="flag">warning</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-SR-464] - Only one BT-86 element is allowed on an invoice.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M11" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext" mode="M11" priority="1029">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -3776,7 +3791,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument" mode="M11" priority="1026">
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument" mode="M11" priority="1028">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -4067,7 +4082,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote" mode="M11" priority="1025">
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote" mode="M11" priority="1027">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:IncludedNote" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -4088,7 +4103,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem" mode="M11" priority="1024">
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem" mode="M11" priority="1026">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -4169,7 +4184,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument" mode="M11" priority="1023">
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument" mode="M11" priority="1025">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -4265,7 +4280,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct" mode="M11" priority="1022">
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct" mode="M11" priority="1024">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -5111,7 +5126,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic" mode="M11" priority="1021">
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic" mode="M11" priority="1023">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -5147,7 +5162,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement" mode="M11" priority="1020">
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement" mode="M11" priority="1022">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -5587,21 +5602,6 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualAmount) <= 1" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="count(ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualAmount) <= 1">
|
||||
<xsl:attribute name="id">CII-SR-440</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-SR-440] - ActualAmount should exist maximum once</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(ram:GrossPriceProductTradePrice/ram:IncludedTradeTax)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(ram:GrossPriceProductTradePrice/ram:IncludedTradeTax)">
|
||||
@@ -5932,6 +5932,48 @@
|
||||
<xsl:apply-templates mode="M11" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:SpecifiedTradeAllowanceCharge" mode="M11" priority="1021">
|
||||
<svrl:fired-rule context="//ram:SpecifiedTradeAllowanceCharge" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(ram:ChargeIndicator)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(ram:ChargeIndicator)">
|
||||
<xsl:attribute name="id">CII-SR-463</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-SR-463]-Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a Charge Indicator.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M11" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge" mode="M11" priority="1020">
|
||||
<svrl:fired-rule context="//ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(ram:ActualAmount) <= 1" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="count(ram:ActualAmount) <= 1">
|
||||
<xsl:attribute name="id">CII-SR-440</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-SR-440] - ActualAmount should exist maximum once</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M11" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery" mode="M11" priority="1019">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery" />
|
||||
@@ -6995,8 +7037,8 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement " mode="M11" priority="1017">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement " />
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement" mode="M11" priority="1017">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
@@ -7900,9 +7942,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(ram:BuyerTaxRepresentativeTradeParty)" />
|
||||
<xsl:when test="not(ram:SellerTaxRepresentativeTradeParty/ram:ID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(ram:BuyerTaxRepresentativeTradeParty)">
|
||||
<svrl:failed-assert test="not(ram:SellerTaxRepresentativeTradeParty/ram:ID)">
|
||||
<xsl:attribute name="id">CII-SR-282</xsl:attribute>
|
||||
<xsl:attribute name="flag">warning</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -8384,7 +8426,7 @@
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="count(ram:SellerTradeParty/ram:URIUniversalCommunication) <= 1">
|
||||
<xsl:attribute name="id">CII-SR-459</xsl:attribute>
|
||||
<xsl:attribute name="flag">warning</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
@@ -8399,7 +8441,7 @@
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="count(ram:BuyerTradeParty/ram:URIUniversalCommunication) <= 1">
|
||||
<xsl:attribute name="id">CII-SR-460</xsl:attribute>
|
||||
<xsl:attribute name="flag">warning</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
@@ -8407,6 +8449,36 @@
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(ram:SellerTradeParty/ram:DefinedTradeContact/ram:PersonName and ram:SellerTradeParty/ram:DefinedTradeContact/ram:DepartmentName)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(ram:SellerTradeParty/ram:DefinedTradeContact/ram:PersonName and ram:SellerTradeParty/ram:DefinedTradeContact/ram:DepartmentName)">
|
||||
<xsl:attribute name="id">CII-SR-465</xsl:attribute>
|
||||
<xsl:attribute name="flag">warning</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-SR-465] - Only one BT-41 element is allowed on an invoice.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(ram:BuyerTradeParty/ram:DefinedTradeContact/ram:PersonName and ram:BuyerTradeParty/ram:DefinedTradeContact/ram:DepartmentName)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(ram:BuyerTradeParty/ram:DefinedTradeContact/ram:PersonName and ram:BuyerTradeParty/ram:DefinedTradeContact/ram:DepartmentName)">
|
||||
<xsl:attribute name="id">CII-SR-466</xsl:attribute>
|
||||
<xsl:attribute name="flag">warning</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-SR-466] - Only one BT-56 element is allowed on an invoice.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M11" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
@@ -10237,9 +10309,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(ram:ApplicableTradeTax/ram:DueDateTypeCode) <= 1" />
|
||||
<xsl:when test="count(//ram:ApplicableTradeTax/ram:DueDateTypeCode) = 0 or count(distinct-values(//ram:ApplicableTradeTax/ram:DueDateTypeCode)) = 1" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="count(ram:ApplicableTradeTax/ram:DueDateTypeCode) <= 1">
|
||||
<svrl:failed-assert test="count(//ram:ApplicableTradeTax/ram:DueDateTypeCode) = 0 or count(distinct-values(//ram:ApplicableTradeTax/ram:DueDateTypeCode)) = 1">
|
||||
<xsl:attribute name="id">CII-SR-462</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -10496,59 +10568,8 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/*[self::rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID or self::rsm:ExchangedDocument/ram:ID or self::rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:LineID or self::rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:SellerAssignedID]" mode="M11" priority="1011">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/*[self::rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID or self::rsm:ExchangedDocument/ram:ID or self::rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:LineID or self::rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:SellerAssignedID]" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeID)">
|
||||
<xsl:attribute name="id">CII-DT-005</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-005] - schemeID should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeAgencyID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeAgencyID)">
|
||||
<xsl:attribute name="id">CII-DT-006</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-006] - schemeAgencyID should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeVersionID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeVersionID)">
|
||||
<xsl:attribute name="id">CII-DT-007</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-007] - schemeVersionID should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M11" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:*[ends-with(name(), 'ID')]" mode="M11" priority="1010">
|
||||
<svrl:fired-rule context="//ram:*[ends-with(name(), 'ID')]" />
|
||||
<xsl:template match="/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID | /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID | /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:LineID | /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:SellerAssignedID" mode="M11" priority="1011">
|
||||
<svrl:fired-rule context="/rsm:CrossIndustryInvoice/rsm:ExchangedDocumentContext/ram:GuidelineSpecifiedDocumentContextParameter/ram:ID | /rsm:CrossIndustryInvoice/rsm:ExchangedDocument/ram:ID | /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:AssociatedDocumentLineDocument/ram:LineID | /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:SellerAssignedID" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
@@ -10609,6 +10630,117 @@
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeID)">
|
||||
<xsl:attribute name="id">CII-DT-005</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-005] - schemeID should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeAgencyID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeAgencyID)">
|
||||
<xsl:attribute name="id">CII-DT-006</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-006] - schemeAgencyID should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeVersionID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeVersionID)">
|
||||
<xsl:attribute name="id">CII-DT-007</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-007] - schemeVersionID should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M11" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//ram:*[ends-with(name(), 'ID')]" mode="M11" priority="1010">
|
||||
<svrl:fired-rule context="//ram:*[ends-with(name(), 'ID')]" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeName)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeName)">
|
||||
<xsl:attribute name="id">CII-DT-101</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-101] - schemeName should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeAgencyName)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeAgencyName)">
|
||||
<xsl:attribute name="id">CII-DT-102</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-102] - schemeAgencyName should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeDataURI)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeDataURI)">
|
||||
<xsl:attribute name="id">CII-DT-103</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-103] - schemeDataURI should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(@schemeURI)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(@schemeURI)">
|
||||
<xsl:attribute name="id">CII-DT-104</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[CII-DT-104] - schemeURI should not be present</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M11" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
@@ -10771,7 +10903,7 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not(ram:URIID) or (self::ram:AdditionalReferencedDocument and ram:TypeCode='916') " />
|
||||
<xsl:when test="not(ram:URIID) or (self::ram:AdditionalReferencedDocument and ram:TypeCode='916')" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(ram:URIID) or (self::ram:AdditionalReferencedDocument and ram:TypeCode='916')">
|
||||
<xsl:attribute name="id">CII-DT-015</xsl:attribute>
|
||||
@@ -12005,9 +12137,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 83 84 102 130 202 203 204 211 218 219 261 262 295 296 308 325 326 331 380 381 382 383 384 385 386 387 388 389 390 393 394 395 396 420 456 457 458 527 532 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 83 84 102 130 202 203 204 211 218 219 261 262 295 296 308 325 326 331 380 381 382 383 384 385 386 387 388 389 390 393 394 395 396 420 456 457 458 471 472 473 500 501 502 503 527 532 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 83 84 102 130 202 203 204 211 218 219 261 262 295 296 308 325 326 331 380 381 382 383 384 385 386 387 388 389 390 393 394 395 396 420 456 457 458 527 532 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 83 84 102 130 202 203 204 211 218 219 261 262 295 296 308 325 326 331 380 381 382 383 384 385 386 387 388 389 390 393 394 395 396 420 456 457 458 471 472 473 500 501 502 503 527 532 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-01</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12026,9 +12158,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(@currencyID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(@currencyID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(@currencyID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(@currencyID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-03</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12047,9 +12179,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-04</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12068,9 +12200,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-05</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12110,9 +12242,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS AXU BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(.), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS AXU BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(.), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-07</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12152,9 +12284,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-10</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12173,9 +12305,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-11</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12194,9 +12326,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PPI PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PPI PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-13</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12362,9 +12494,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-21</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12384,9 +12516,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT ', concat(' ', normalize-space(upper-case(.)), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-135-1 VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-144 VATEX-EU-146-1E VATEX-EU-159 VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT VATEX-EU-153 VATEX-FR-CGI261-1 VATEX-FR-CGI261-2 VATEX-FR-CGI261-3 VATEX-FR-CGI261-4 VATEX-FR-CGI261-5 VATEX-FR-CGI261-7 VATEX-FR-CGI261-8 VATEX-FR-CGI261A VATEX-FR-CGI261B VATEX-FR-CGI261C-1 VATEX-FR-CGI261C-2 VATEX-FR-CGI261C-3 VATEX-FR-CGI261D-1 VATEX-FR-CGI261D-1BIS VATEX-FR-CGI261D-2 VATEX-FR-CGI261D-3 VATEX-FR-CGI261D-4 VATEX-FR-CGI261E-1 VATEX-FR-CGI261E-2 VATEX-FR-CGI277A VATEX-FR-CGI275 VATEX-FR-298SEXDECIESA VATEX-FR-CGI295 VATEX-FR-AE ', concat(' ', normalize-space(upper-case(.)), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT ', concat(' ', normalize-space(upper-case(.)), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-135-1 VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-144 VATEX-EU-146-1E VATEX-EU-159 VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT VATEX-EU-153 VATEX-FR-CGI261-1 VATEX-FR-CGI261-2 VATEX-FR-CGI261-3 VATEX-FR-CGI261-4 VATEX-FR-CGI261-5 VATEX-FR-CGI261-7 VATEX-FR-CGI261-8 VATEX-FR-CGI261A VATEX-FR-CGI261B VATEX-FR-CGI261C-1 VATEX-FR-CGI261C-2 VATEX-FR-CGI261C-3 VATEX-FR-CGI261D-1 VATEX-FR-CGI261D-1BIS VATEX-FR-CGI261D-2 VATEX-FR-CGI261D-3 VATEX-FR-CGI261D-4 VATEX-FR-CGI261E-1 VATEX-FR-CGI261E-2 VATEX-FR-CGI277A VATEX-FR-CGI275 VATEX-FR-298SEXDECIESA VATEX-FR-CGI295 VATEX-FR-AE ', concat(' ', normalize-space(upper-case(.)), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-22</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12447,9 +12579,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0170 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 9901 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0154 0158 0170 0177 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 0235 0240 0244 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0170 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 9901 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0154 0158 0170 0177 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 0235 0240 0244 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-25</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -12468,9 +12600,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-26</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Licensed under European Union Public Licence (EUPL) version 1.2.
|
||||
|
||||
-->
|
||||
<!--Schematron version 1.3.12 - Last update: 2024-04-06--><xsl:stylesheet xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cn="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2" xmlns:saxon="http://saxon.sf.net/" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
|
||||
<!--Schematron version 1.3.14.2 - Last update: 2025-06-15--><xsl:stylesheet xmlns:svrl="http://purl.oclc.org/dsdl/svrl" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cn="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:iso="http://purl.oclc.org/dsdl/schematron" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2" xmlns:saxon="http://saxon.sf.net/" xmlns:schold="http://www.ascc.net/xml/schematron" xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
|
||||
<!--Implementers: please note that overriding process-prolog or process-root is
|
||||
the preferred method for meta-stylesheets to use where possible. -->
|
||||
|
||||
@@ -177,6 +177,9 @@
|
||||
<xsl:attribute name="document">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="documents">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="id">UBL-model</xsl:attribute>
|
||||
<xsl:attribute name="name">UBL-model</xsl:attribute>
|
||||
<xsl:apply-templates />
|
||||
@@ -186,6 +189,9 @@
|
||||
<xsl:attribute name="document">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="documents">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="id">UBL-syntax</xsl:attribute>
|
||||
<xsl:attribute name="name">UBL-syntax</xsl:attribute>
|
||||
<xsl:apply-templates />
|
||||
@@ -195,6 +201,9 @@
|
||||
<xsl:attribute name="document">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="documents">
|
||||
<xsl:value-of select="document-uri(/)" />
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="id">Codesmodel</xsl:attribute>
|
||||
<xsl:attribute name="name">Codesmodel</xsl:attribute>
|
||||
<xsl:apply-templates />
|
||||
@@ -231,8 +240,8 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount " mode="M11" priority="1065">
|
||||
<svrl:fired-rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount " />
|
||||
<xsl:template match="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount" mode="M11" priority="1065">
|
||||
<svrl:fired-rule context="/ubl:Invoice/cac:LegalMonetaryTotal/cbc:PayableAmount" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
@@ -341,7 +350,7 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="exists(cbc:Amount) " />
|
||||
<xsl:when test="exists(cbc:Amount)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="exists(cbc:Amount)">
|
||||
<xsl:attribute name="id">BR-31</xsl:attribute>
|
||||
@@ -989,36 +998,6 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(cac:PaymentMeans/cac:CardAccount) <= 1" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="count(cac:PaymentMeans/cac:CardAccount) <= 1">
|
||||
<xsl:attribute name="id">BR-66</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-66]-An Invoice shall contain maximum one Payment Card account (BG-18).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(cac:PaymentMeans/cac:PaymentMandate) <= 1" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="count(cac:PaymentMeans/cac:PaymentMandate) <= 1">
|
||||
<xsl:attribute name="id">BR-67</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-67]-An Invoice shall contain maximum one Payment Mandate (BG-19).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((exists(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']) or exists(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE'])) and (count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']) = 1)) or (not(//cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']) and not(//cac:ClassifiedTaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:ID[normalize-space(.) = 'AE']))">
|
||||
@@ -1367,12 +1346,12 @@
|
||||
<xsl:when test="((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'L']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'L']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0)">
|
||||
<xsl:attribute name="id">BR-IG-01</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-01</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC".</svrl:text>
|
||||
<svrl:text>[BR-AF-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC".</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -1382,12 +1361,12 @@
|
||||
<xsl:when test="(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))">
|
||||
<xsl:attribute name="id">BR-IG-02</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-02</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
<svrl:text>[BR-AF-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -1397,12 +1376,12 @@
|
||||
<xsl:when test="(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))">
|
||||
<xsl:attribute name="id">BR-IG-03</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-03</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
<svrl:text>[BR-AF-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -1412,12 +1391,12 @@
|
||||
<xsl:when test="(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[cbc:ID='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[cbc:ID='L'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))">
|
||||
<xsl:attribute name="id">BR-IG-04</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-04</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
<svrl:text>[BR-AF-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -1427,12 +1406,12 @@
|
||||
<xsl:when test="((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[cbc:ID = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) = 0)">
|
||||
<xsl:attribute name="id">BR-IP-01</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-01</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IPSI" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IPSI".</svrl:text>
|
||||
<svrl:text>[BR-AG-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "IPSI" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IPSI".</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -1442,12 +1421,12 @@
|
||||
<xsl:when test="(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))">
|
||||
<xsl:attribute name="id">BR-IP-02</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-02</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
<svrl:text>[BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -1457,12 +1436,12 @@
|
||||
<xsl:when test="(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=false()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))">
|
||||
<xsl:attribute name="id">BR-IP-03</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-03</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
<svrl:text>[BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -1472,12 +1451,12 @@
|
||||
<xsl:when test="(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']) and (exists(//cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) or exists(//cac:TaxRepresentativeParty/cac:PartyTaxScheme[cac:TaxScheme/(normalize-space(upper-case(cbc:ID)) = 'VAT')]/cbc:CompanyID))) or not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator=true()]/cac:TaxCategory[normalize-space(cbc:ID)='M'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']))">
|
||||
<xsl:attribute name="id">BR-IP-04</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-04</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
<svrl:text>[BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -2196,8 +2175,8 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode " mode="M11" priority="1050">
|
||||
<svrl:fired-rule context="cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode " />
|
||||
<xsl:template match="cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode" mode="M11" priority="1050">
|
||||
<svrl:fired-rule context="cac:InvoiceLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode | cac:CreditNoteLine/cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
@@ -3110,12 +3089,12 @@
|
||||
<xsl:when test="every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='L'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='L'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))))">
|
||||
<xsl:attribute name="id">BR-IG-08</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-08</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IGIC", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IGIC" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).</svrl:text>
|
||||
<svrl:text>[BR-AF-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IGIC", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IGIC" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3125,12 +3104,12 @@
|
||||
<xsl:when test="(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )">
|
||||
<xsl:attribute name="id">BR-IG-09</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-09</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IGIC" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).</svrl:text>
|
||||
<svrl:text>[BR-AF-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IGIC" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3140,12 +3119,12 @@
|
||||
<xsl:when test="not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode)">
|
||||
<xsl:attribute name="id">BR-IG-10</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-10</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IGIC" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).</svrl:text>
|
||||
<svrl:text>[BR-AF-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IGIC" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3161,12 +3140,12 @@
|
||||
<xsl:when test="(cbc:Percent) >= 0" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(cbc:Percent) >= 0">
|
||||
<xsl:attribute name="id">BR-IG-06</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-06</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
<svrl:text>[BR-AF-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IGIC" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3182,12 +3161,12 @@
|
||||
<xsl:when test="(cbc:Percent) >= 0" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(cbc:Percent) >= 0">
|
||||
<xsl:attribute name="id">BR-IG-07</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-07</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
<svrl:text>[BR-AF-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IGIC" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3203,12 +3182,12 @@
|
||||
<xsl:when test="(cbc:Percent) >= 0" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(cbc:Percent) >= 0">
|
||||
<xsl:attribute name="id">BR-IG-05</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AF-05</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" the invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
<svrl:text>[BR-AF-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IGIC" the invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3224,12 +3203,12 @@
|
||||
<xsl:when test="every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="every $rate in xs:decimal(cbc:Percent) satisfies ((exists(//cac:InvoiceLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:InvoiceLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))) or (exists(//cac:CreditNoteLine) and ((../xs:decimal(cbc:TaxableAmount - 1) < (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))) and (../xs:decimal(cbc:TaxableAmount + 1) > (sum(../../../cac:CreditNoteLine[cac:Item/cac:ClassifiedTaxCategory/normalize-space(cbc:ID)='M'][cac:Item/cac:ClassifiedTaxCategory/xs:decimal(cbc:Percent) =$rate]/xs:decimal(cbc:LineExtensionAmount)) + sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=true()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)) - sum(../../../cac:AllowanceCharge[cbc:ChargeIndicator=false()][cac:TaxCategory/normalize-space(cbc:ID)='M'][cac:TaxCategory/xs:decimal(cbc:Percent) = $rate]/xs:decimal(cbc:Amount)))))))">
|
||||
<xsl:attribute name="id">BR-IP-08</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-08</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IPSI", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IPSI" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).</svrl:text>
|
||||
<svrl:text>[BR-AG-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IPSI", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IPSI" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3239,12 +3218,12 @@
|
||||
<xsl:when test="(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(abs(xs:decimal(../cbc:TaxAmount)) - 1 < round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 ) and (abs(xs:decimal(../cbc:TaxAmount)) + 1 > round((abs(xs:decimal(../cbc:TaxableAmount)) * (xs:decimal(cbc:Percent) div 100)) * 10 * 10) div 100 )">
|
||||
<xsl:attribute name="id">BR-IP-09</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-09</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IPSI" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).</svrl:text>
|
||||
<svrl:text>[BR-AG-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IPSI" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3254,12 +3233,12 @@
|
||||
<xsl:when test="not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not(cbc:TaxExemptionReason) and not(cbc:TaxExemptionReasonCode)">
|
||||
<xsl:attribute name="id">BR-IP-10</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-10</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IPSI" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).</svrl:text>
|
||||
<svrl:text>[BR-AG-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118) "IPSI" shall not have a VAT exemption reason code (BT-121) or VAT exemption reason text (BT-120).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3275,12 +3254,12 @@
|
||||
<xsl:when test="(cbc:Percent) >= 0" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(cbc:Percent) >= 0">
|
||||
<xsl:attribute name="id">BR-IP-06</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-06</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
<svrl:text>[BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3296,12 +3275,12 @@
|
||||
<xsl:when test="(cbc:Percent) >= 0" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(cbc:Percent) >= 0">
|
||||
<xsl:attribute name="id">BR-IP-07</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-07</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
<svrl:text>[BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3317,12 +3296,12 @@
|
||||
<xsl:when test="(cbc:Percent) >= 0" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(cbc:Percent) >= 0">
|
||||
<xsl:attribute name="id">BR-IP-05</xsl:attribute>
|
||||
<xsl:attribute name="id">BR-AG-05</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[BR-IP-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
<svrl:text>[BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -3679,8 +3658,8 @@
|
||||
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//cac:PostalAddress | //cac:Address " mode="M12" priority="1014">
|
||||
<svrl:fired-rule context="//cac:PostalAddress | //cac:Address " />
|
||||
<xsl:template match="//cac:PostalAddress | //cac:Address" mode="M12" priority="1015">
|
||||
<svrl:fired-rule context="//cac:PostalAddress | //cac:Address" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
@@ -3700,7 +3679,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="cac:AccountingSupplierParty/cac:Party" mode="M12" priority="1013">
|
||||
<xsl:template match="cac:AccountingSupplierParty/cac:Party" mode="M12" priority="1014">
|
||||
<svrl:fired-rule context="cac:AccountingSupplierParty/cac:Party" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -3721,7 +3700,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="cac:AdditionalDocumentReference" mode="M12" priority="1012">
|
||||
<xsl:template match="cac:AdditionalDocumentReference" mode="M12" priority="1013">
|
||||
<svrl:fired-rule context="cac:AdditionalDocumentReference" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -3757,7 +3736,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//*[ends-with(name(), 'Amount') and not(ends-with(name(),'PriceAmount')) and not(ancestor::cac:Price/cac:AllowanceCharge)]" mode="M12" priority="1011">
|
||||
<xsl:template match="//*[ends-with(name(), 'Amount') and not(ends-with(name(),'PriceAmount')) and not(ancestor::cac:Price/cac:AllowanceCharge)]" mode="M12" priority="1012">
|
||||
<svrl:fired-rule context="//*[ends-with(name(), 'Amount') and not(ends-with(name(),'PriceAmount')) and not(ancestor::cac:Price/cac:AllowanceCharge)]" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -3778,7 +3757,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="//*[ends-with(name(), 'BinaryObject')]" mode="M12" priority="1010">
|
||||
<xsl:template match="//*[ends-with(name(), 'BinaryObject')]" mode="M12" priority="1011">
|
||||
<svrl:fired-rule context="//*[ends-with(name(), 'BinaryObject')]" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -3814,7 +3793,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="cac:Delivery" mode="M12" priority="1009">
|
||||
<xsl:template match="cac:Delivery" mode="M12" priority="1010">
|
||||
<svrl:fired-rule context="cac:Delivery" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -3835,7 +3814,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="cac:AllowanceCharge[cbc:ChargeIndicator = false()]" mode="M12" priority="1008">
|
||||
<xsl:template match="cac:AllowanceCharge[cbc:ChargeIndicator = false()]" mode="M12" priority="1009">
|
||||
<svrl:fired-rule context="cac:AllowanceCharge[cbc:ChargeIndicator = false()]" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -3856,7 +3835,7 @@
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="cac:AllowanceCharge[cbc:ChargeIndicator = true()]" mode="M12" priority="1007">
|
||||
<xsl:template match="cac:AllowanceCharge[cbc:ChargeIndicator = true()]" mode="M12" priority="1008">
|
||||
<svrl:fired-rule context="cac:AllowanceCharge[cbc:ChargeIndicator = true()]" />
|
||||
|
||||
<!--ASSERT -->
|
||||
@@ -3876,6 +3855,27 @@
|
||||
<xsl:apply-templates mode="M12" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="cac:PartyTaxScheme" mode="M12" priority="1007">
|
||||
<svrl:fired-rule context="cac:PartyTaxScheme" />
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="exists(cac:TaxScheme/cbc:ID) and exists(cbc:CompanyID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="exists(cac:TaxScheme/cbc:ID) and exists(cbc:CompanyID)">
|
||||
<xsl:attribute name="id">UBL-SR-53</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[UBL-SR-53]- CompanyID (VAT Identifier) must be stated when providing the PartyTaxScheme/TaxScheme/ID.</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M12" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
<!--RULE -->
|
||||
<xsl:template match="/ubl:Invoice | /cn:CreditNote" mode="M12" priority="1006">
|
||||
<svrl:fired-rule context="/ubl:Invoice | /cn:CreditNote" />
|
||||
@@ -12410,7 +12410,7 @@
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[UBL-CR-572]-A UBL invoice should not include the InvoiceLine Item BuyersItemIdentification BarecodeSymbologyID</svrl:text>
|
||||
<svrl:text>[UBL-CR-572]-A UBL invoice should not include the InvoiceLine Item BuyersItemIdentification BarcodeSymbologyID</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -12485,7 +12485,7 @@
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[UBL-CR-577]-A UBL invoice should not include the InvoiceLine Item SellersItemIdentification BarecodeSymbologyID</svrl:text>
|
||||
<svrl:text>[UBL-CR-577]-A UBL invoice should not include the InvoiceLine Item SellersItemIdentification BarcodeSymbologyID</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -12575,7 +12575,7 @@
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[UBL-CR-583]-A UBL invoice should not include the InvoiceLine Item StandardItemIdentification BarecodeSymbologyID</svrl:text>
|
||||
<svrl:text>[UBL-CR-583]-A UBL invoice should not include the InvoiceLine Item StandardItemIdentification BarcodeSymbologyID</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -13287,21 +13287,6 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cbc:OrderableUnitFactorRate)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cbc:OrderableUnitFactorRate)">
|
||||
<xsl:attribute name="id">UBL-CR-631</xsl:attribute>
|
||||
<xsl:attribute name="flag">warning</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[UBL-CR-631]-A UBL invoice should not include the InvoiceLine Item Price OrderableUnitFactorRate</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:ID)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Price/cac:AllowanceCharge/cbc:ID)">
|
||||
@@ -14754,6 +14739,36 @@
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(cac:PaymentMeans/cac:CardAccount) <= 1" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="count(cac:PaymentMeans/cac:CardAccount) <= 1">
|
||||
<xsl:attribute name="id">UBL-SR-54</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[UBL-SR-54]-An Invoice shall contain maximum one Payment Card account (BG-18).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(cac:PaymentMeans/cac:PaymentMandate) <= 1" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="count(cac:PaymentMeans/cac:PaymentMandate) <= 1">
|
||||
<xsl:attribute name="id">UBL-SR-55</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
<xsl:apply-templates mode="schematron-select-full-path" select="." />
|
||||
</xsl:attribute>
|
||||
<svrl:text>[UBL-SR-55]-An Invoice shall contain maximum one Payment Mandate (BG-19).</svrl:text>
|
||||
</svrl:failed-assert>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:apply-templates mode="M12" select="@*|*" />
|
||||
</xsl:template>
|
||||
|
||||
@@ -15012,9 +15027,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(count(cac:Party/cac:PartyName/cbc:Name) <= 1)" />
|
||||
<xsl:when test="(count(cac:PartyName/cbc:Name) <= 1)" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(count(cac:Party/cac:PartyName/cbc:Name) <= 1)">
|
||||
<svrl:failed-assert test="(count(cac:PartyName/cbc:Name) <= 1)">
|
||||
<xsl:attribute name="id">UBL-SR-22</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15076,9 +15091,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="(self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 84 102 130 202 203 204 211 218 219 295 325 326 331 380 382 383 384 385 386 387 388 389 390 393 394 395 456 457 527 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 381 396 420 458 532 ', concat(' ', normalize-space(.), ' ')))))" />
|
||||
<xsl:when test="(self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 84 102 130 202 203 204 211 218 219 295 325 326 331 380 382 383 384 385 386 387 388 389 390 393 394 395 456 457 471 472 473 500 501 502 503 527 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 381 396 420 458 532 ', concat(' ', normalize-space(.), ' ')))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="(self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 84 102 130 202 203 204 211 218 219 295 325 326 331 380 382 383 384 385 386 387 388 389 390 393 394 395 456 457 527 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 381 396 420 458 532 ', concat(' ', normalize-space(.), ' ')))))">
|
||||
<svrl:failed-assert test="(self::cbc:InvoiceTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 71 80 81 82 84 102 130 202 203 204 211 218 219 295 325 326 331 380 382 383 384 385 386 387 388 389 390 393 394 395 456 457 471 472 473 500 501 502 503 527 553 575 623 633 751 780 817 870 875 876 877 935 ', concat(' ', normalize-space(.), ' '))))) or (self::cbc:CreditNoteTypeCode and ((not(contains(normalize-space(.), ' ')) and contains(' 81 83 261 262 296 308 381 396 420 458 532 ', concat(' ', normalize-space(.), ' ')))))">
|
||||
<xsl:attribute name="id">BR-CL-01</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15097,9 +15112,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(@currencyID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(@currencyID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(@currencyID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@currencyID), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(@currencyID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-03</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15118,9 +15133,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-04</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15139,9 +15154,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRO MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UZS VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWL ', concat(' ', normalize-space(.), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNH CNY COP COU CRC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SOS SRD SSP STD SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VES VED VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD XPF XPT XSU XTS XUA XXX YER ZAR ZMW ZWG ', concat(' ', normalize-space(.), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-05</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15181,9 +15196,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS AXU BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' AAA AAB AAC AAD AAE AAF AAG AAH AAI AAJ AAK AAL AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABQ ABR ABS ABT ABU ABV ABW ABX ABY ABZ AC ACA ACB ACC ACD ACE ACF ACG ACH ACI ACJ ACK ACL ACN ACO ACP ACQ ACR ACT ACU ACV ACW ACX ACY ACZ ADA ADB ADC ADD ADE ADF ADG ADI ADJ ADK ADL ADM ADN ADO ADP ADQ ADT ADU ADV ADW ADX ADY ADZ AE AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX AFY AFZ AGA AGB AGC AGD AGE AGF AGG AGH AGI AGJ AGK AGL AGM AGN AGO AGP AGQ AGR AGS AGT AGU AGV AGW AGX AGY AGZ AHA AHB AHC AHD AHE AHF AHG AHH AHI AHJ AHK AHL AHM AHN AHO AHP AHQ AHR AHS AHT AHU AHV AHX AHY AHZ AIA AIB AIC AID AIE AIF AIG AIH AII AIJ AIK AIL AIM AIN AIO AIP AIQ AIR AIS AIT AIU AIV AIW AIX AIY AIZ AJA AJB AJC AJD AJE AJF AJG AJH AJI AJJ AJK AJL AJM AJN AJO AJP AJQ AJR AJS AJT AJU AJV AJW AJX AJY AJZ AKA AKB AKC AKD AKE AKF AKG AKH AKI AKJ AKK AKL AKM AKN AKO AKP AKQ AKR AKS AKT AKU AKV AKW AKX AKY AKZ ALA ALB ALC ALD ALE ALF ALG ALH ALI ALJ ALK ALL ALM ALN ALO ALP ALQ ALR ALS ALT ALU ALV ALW ALX ALY ALZ AMA AMB AMC AMD AME AMF AMG AMH AMI AMJ AMK AML AMM AMN AMO AMP AMQ AMR AMS AMT AMU AMV AMW AMX AMY AMZ ANA ANB ANC AND ANE ANF ANG ANH ANI ANJ ANK ANL ANM ANN ANO ANP ANQ ANR ANS ANT ANU ANV ANW ANX ANY AOA AOD AOE AOF AOG AOH AOI AOJ AOK AOL AOM AON AOO AOP AOQ AOR AOS AOT AOU AOV AOW AOX AOY AOZ AP APA APB APC APD APE APF APG APH API APJ APK APL APM APN APO APP APQ APR APS APT APU APV APW APX APY APZ AQA AQB AQC AQD AQE AQF AQG AQH AQI AQJ AQK AQL AQM AQN AQO AQP AQQ AQR AQS AQT AQU AQV AQW AQX AQY AQZ ARA ARB ARC ARD ARE ARF ARG ARH ARI ARJ ARK ARL ARM ARN ARO ARP ARQ ARR ARS ART ARU ARV ARW ARX ARY ARZ ASA ASB ASC ASD ASE ASF ASG ASH ASI ASJ ASK ASL ASM ASN ASO ASP ASQ ASR ASS AST ASU ASV ASW ASX ASY ASZ ATA ATB ATC ATD ATE ATF ATG ATH ATI ATJ ATK ATL ATM ATN ATO ATP ATQ ATR ATS ATT ATU ATV ATW ATX ATY ATZ AU AUA AUB AUC AUD AUE AUF AUG AUH AUI AUJ AUK AUL AUM AUN AUO AUP AUQ AUR AUS AUT AUU AUV AUW AUX AUY AUZ AV AVA AVB AVC AVD AVE AVF AVG AVH AVI AVJ AVK AVL AVM AVN AVO AVP AVQ AVR AVS AVT AVU AVV AVW AVX AVY AVZ AWA AWB AWC AWD AWE AWF AWG AWH AWI AWJ AWK AWL AWM AWN AWO AWP AWQ AWR AWS AWT AWU AWV AWW AWX AWY AWZ AXA AXB AXC AXD AXE AXF AXG AXH AXI AXJ AXK AXL AXM AXN AXO AXP AXQ AXR AXS AXU BA BC BD BE BH BM BN BO BR BT BTP BW CAS CAT CAU CAV CAW CAX CAY CAZ CBA CBB CD CEC CED CFE CFF CFO CG CH CK CKN CM CMR CN CNO COF CP CR CRN CS CST CT CU CV CW CZ DA DAN DB DI DL DM DQ DR EA EB ED EE EEP EI EN EQ ER ERN ET EX FC FF FI FLW FN FO FS FT FV FX GA GC GD GDN GN HS HWB IA IB ICA ICE ICO II IL INB INN INO IP IS IT IV JB JE LA LAN LAR LB LC LI LO LRC LS MA MB MF MG MH MR MRN MS MSS MWB NA NF OH OI ON OP OR PB PC PD PE PF PI PK PL POR PP PQ PR PS PW PY RA RC RCN RE REN RF RR RT SA SB SD SE SEA SF SH SI SM SN SP SQ SRN SS STA SW SZ TB TCR TE TF TI TIN TL TN TP UAR UC UCN UN UO URI VA VC VGR VM VN VON VOR VP VR VS VT VV WE WM WN WR WS WY XA XC XP ZZZ ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-07</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15202,9 +15217,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' ')))) or ((not(contains(normalize-space(@schemeID), ' ')) and contains(' SEPA ', concat(' ', normalize-space(@schemeID), ' '))) and ((ancestor::cac:AccountingSupplierParty) or (ancestor::cac:PayeeParty)))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' ')))) or ((not(contains(normalize-space(@schemeID), ' ')) and contains(' SEPA ', concat(' ', normalize-space(@schemeID), ' '))) and ((ancestor::cac:AccountingSupplierParty) or (ancestor::cac:PayeeParty)))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' ')))) or ((not(contains(normalize-space(@schemeID), ' ')) and contains(' SEPA ', concat(' ', normalize-space(@schemeID), ' '))) and ((ancestor::cac:AccountingSupplierParty) or (ancestor::cac:PayeeParty)))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' ')))) or ((not(contains(normalize-space(@schemeID), ' ')) and contains(' SEPA ', concat(' ', normalize-space(@schemeID), ' '))) and ((ancestor::cac:AccountingSupplierParty) or (ancestor::cac:PayeeParty)))">
|
||||
<xsl:attribute name="id">BR-CL-10</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15223,9 +15238,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-11</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15244,9 +15259,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PPI PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@listID), ' ')) and contains(' AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ CC CG CL CR CV DR DW EC EF EMD EN FS GB GN GMN GS HS IB IN IS IT IZ MA MF MN MP NB ON PD PL PO PPI PV QS RC RN RU RY SA SG SK SN SRS SRT SRU SRV SRW SRX SRY SRZ SS SSA SSB SSC SSD SSE SSF SSG SSH SSI SSJ SSK SSL SSM SSN SSO SSP SSQ SSR SSS SST SSU SSV SSW SSX SSY SSZ ST STA STB STC STD STE STF STG STH STI STJ STK STL STM STN STO STP STQ STR STS STT STU STV STW STX STY STZ SUA SUB SUC SUD SUE SUF SUG SUH SUI SUJ SUK SUL SUM TG TSN TSO TSP TSQ TSR TSS TST TSU UA UP VN VP VS VX ZZZ ', concat(' ', normalize-space(@listID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-13</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15413,9 +15428,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-21</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15434,9 +15449,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT ', concat(' ', normalize-space(upper-case(.)), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-135-1 VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-144 VATEX-EU-146-1E VATEX-EU-159 VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT VATEX-EU-153 VATEX-FR-CGI261-1 VATEX-FR-CGI261-2 VATEX-FR-CGI261-3 VATEX-FR-CGI261-4 VATEX-FR-CGI261-5 VATEX-FR-CGI261-7 VATEX-FR-CGI261-8 VATEX-FR-CGI261A VATEX-FR-CGI261B VATEX-FR-CGI261C-1 VATEX-FR-CGI261C-2 VATEX-FR-CGI261C-3 VATEX-FR-CGI261D-1 VATEX-FR-CGI261D-1BIS VATEX-FR-CGI261D-2 VATEX-FR-CGI261D-3 VATEX-FR-CGI261D-4 VATEX-FR-CGI261E-1 VATEX-FR-CGI261E-2 VATEX-FR-CGI277A VATEX-FR-CGI275 VATEX-FR-298SEXDECIESA VATEX-FR-CGI295 VATEX-FR-AE ', concat(' ', normalize-space(upper-case(.)), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT ', concat(' ', normalize-space(upper-case(.)), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(.), ' ')) and contains(' VATEX-EU-79-C VATEX-EU-132 VATEX-EU-132-1A VATEX-EU-132-1B VATEX-EU-132-1C VATEX-EU-132-1D VATEX-EU-132-1E VATEX-EU-132-1F VATEX-EU-132-1G VATEX-EU-132-1H VATEX-EU-132-1I VATEX-EU-132-1J VATEX-EU-132-1K VATEX-EU-132-1L VATEX-EU-132-1M VATEX-EU-132-1N VATEX-EU-132-1O VATEX-EU-132-1P VATEX-EU-132-1Q VATEX-EU-135-1 VATEX-EU-143 VATEX-EU-143-1A VATEX-EU-143-1B VATEX-EU-143-1C VATEX-EU-143-1D VATEX-EU-143-1E VATEX-EU-143-1F VATEX-EU-143-1FA VATEX-EU-143-1G VATEX-EU-143-1H VATEX-EU-143-1I VATEX-EU-143-1J VATEX-EU-143-1K VATEX-EU-143-1L VATEX-EU-144 VATEX-EU-146-1E VATEX-EU-159 VATEX-EU-309 VATEX-EU-148 VATEX-EU-148-A VATEX-EU-148-B VATEX-EU-148-C VATEX-EU-148-D VATEX-EU-148-E VATEX-EU-148-F VATEX-EU-148-G VATEX-EU-151 VATEX-EU-151-1A VATEX-EU-151-1AA VATEX-EU-151-1B VATEX-EU-151-1C VATEX-EU-151-1D VATEX-EU-151-1E VATEX-EU-G VATEX-EU-O VATEX-EU-IC VATEX-EU-AE VATEX-EU-D VATEX-EU-F VATEX-EU-I VATEX-EU-J VATEX-FR-FRANCHISE VATEX-FR-CNWVAT VATEX-EU-153 VATEX-FR-CGI261-1 VATEX-FR-CGI261-2 VATEX-FR-CGI261-3 VATEX-FR-CGI261-4 VATEX-FR-CGI261-5 VATEX-FR-CGI261-7 VATEX-FR-CGI261-8 VATEX-FR-CGI261A VATEX-FR-CGI261B VATEX-FR-CGI261C-1 VATEX-FR-CGI261C-2 VATEX-FR-CGI261C-3 VATEX-FR-CGI261D-1 VATEX-FR-CGI261D-1BIS VATEX-FR-CGI261D-2 VATEX-FR-CGI261D-3 VATEX-FR-CGI261D-4 VATEX-FR-CGI261E-1 VATEX-FR-CGI261E-2 VATEX-FR-CGI277A VATEX-FR-CGI275 VATEX-FR-298SEXDECIESA VATEX-FR-CGI295 VATEX-FR-AE ', concat(' ', normalize-space(upper-case(.)), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-22</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15498,9 +15513,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0170 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 9901 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0154 0158 0170 0177 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 0235 0240 0244 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0170 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 9901 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0147 0151 0154 0158 0170 0177 0183 0184 0188 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0205 0208 0209 0210 0211 0212 0213 0215 0216 0217 0218 0219 0220 0221 0225 0230 0235 0240 0244 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9957 9959 AN AQ AS AU EM ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-25</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
@@ -15519,9 +15534,9 @@
|
||||
|
||||
<!--ASSERT -->
|
||||
<xsl:choose>
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:when test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))" />
|
||||
<xsl:otherwise>
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 ', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<svrl:failed-assert test="((not(contains(normalize-space(@schemeID), ' ')) and contains(' 0002 0003 0004 0005 0006 0007 0008 0009 0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 0080 0081 0082 0083 0084 0085 0086 0087 0088 0089 0090 0091 0093 0094 0095 0096 0097 0098 0099 0100 0101 0102 0104 0105 0106 0107 0108 0109 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 0120 0121 0122 0123 0124 0125 0126 0127 0128 0129 0130 0131 0132 0133 0134 0135 0136 0137 0138 0139 0140 0141 0142 0143 0144 0145 0146 0147 0148 0149 0150 0151 0152 0153 0154 0155 0156 0157 0158 0159 0160 0161 0162 0163 0164 0165 0166 0167 0168 0169 0170 0171 0172 0173 0174 0175 0176 0177 0178 0179 0180 0183 0184 0185 0186 0187 0188 0189 0190 0191 0192 0193 0194 0195 0196 0197 0198 0199 0200 0201 0202 0203 0204 0205 0206 0207 0208 0209 0210 0211 0212 0213 0214 0215 0216 0217 0218 0219 0220 0221 0222 0223 0224 0225 0226 0227 0228 0229 0230 0231 0232 0233 0234 0235 0236 0237 0238 0239 0240 0241 0242 0243 0244', concat(' ', normalize-space(@schemeID), ' '))))">
|
||||
<xsl:attribute name="id">BR-CL-26</xsl:attribute>
|
||||
<xsl:attribute name="flag">fatal</xsl:attribute>
|
||||
<xsl:attribute name="location">
|
||||
|
||||
@@ -331,4 +331,29 @@ public class LibraryTest extends ResourceCase {
|
||||
.isEqualTo(0);
|
||||
}
|
||||
|
||||
public void testSubInvoiceLineExportValidity() {
|
||||
File tempFile = new File("../library/target/testout-SubInvoiceLines.pdf");
|
||||
assertTrue(tempFile.exists());
|
||||
ZUGFeRDValidator zfv = new ZUGFeRDValidator();
|
||||
|
||||
String res = zfv.validate(tempFile.getAbsolutePath());
|
||||
|
||||
assertThat(res).valueByXPath("/validation/pdf/summary/@status")
|
||||
.isEqualTo("valid");
|
||||
|
||||
assertThat(res).valueByXPath("/validation/xml/summary/@status")
|
||||
.isEqualTo("valid");
|
||||
|
||||
assertThat(res).valueByXPath("/validation/summary/@status")
|
||||
.isEqualTo("valid");
|
||||
|
||||
assertThat(res).valueByXPath("count(//error)")
|
||||
.asInt()
|
||||
.isEqualTo(0);
|
||||
|
||||
assertThat(res).valueByXPath("count(//warning)")
|
||||
.asInt()
|
||||
.isEqualTo(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -179,6 +179,15 @@ public class PDFValidatorTest extends ResourceCase {
|
||||
|
||||
assertEquals(true, actual
|
||||
.contains("<error type=\"28\">XMP Metadata: Could not parse XMP metadata (XML invalid)</error>"));
|
||||
|
||||
contents = getResourceAsByteArray("103767-Invoice-2026-03-24-1.pdf");
|
||||
|
||||
pv.setFilenameAndContents("103767-Invoice-2026-03-24-1.pdf", contents);
|
||||
vc.clear();
|
||||
pv.validate();
|
||||
actual = pv.getXMLResult();
|
||||
|
||||
assertEquals(false, actual.contains("<error"));
|
||||
} catch (final IrrecoverableValidationError e) {
|
||||
// ignore, will be in XML output anyway
|
||||
}
|
||||
|
||||
@@ -337,6 +337,33 @@ public class XMLValidatorTest extends ResourceCase {
|
||||
|
||||
}
|
||||
|
||||
public void testFrenchSchematronValidation() {
|
||||
final ValidationContext ctx = new ValidationContext(null);
|
||||
final XMLValidator xv = new XMLValidator(ctx);
|
||||
|
||||
File tempFile = getResourceAsFile("validV2FR.xml");
|
||||
try {
|
||||
xv.setFilename(tempFile.getAbsolutePath());
|
||||
xv.validate();
|
||||
|
||||
String s = "<validation>" + xv.getXMLResult() + "</validation>";
|
||||
assertThat(s).valueByXPath("count(//error)")
|
||||
.asInt()
|
||||
.isEqualTo(0);
|
||||
assertThat(s).valueByXPath("count(//warning)")
|
||||
.asInt()
|
||||
.isEqualTo(12);
|
||||
assertThat(s).valueByXPath("count(//warning[contains(text(),'XP_Z12_012')])")
|
||||
.asInt()
|
||||
.isEqualTo(9);
|
||||
assertThat(s).valueByXPath("/validation/summary/@status")
|
||||
.asString()
|
||||
.isEqualTo("valid");
|
||||
} catch (final IrrecoverableValidationError e) {
|
||||
fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void testUBLValidation() {
|
||||
ValidationContext ctx = new ValidationContext(null);
|
||||
@@ -378,6 +405,38 @@ public class XMLValidatorTest extends ResourceCase {
|
||||
|
||||
}
|
||||
|
||||
public void testBRDEC23Regression() {
|
||||
// Regression test: BR-DEC-23 must fire for XRechnung CII invoices whose
|
||||
// LineTotalAmount (BT-131) has more than 2 decimal places.
|
||||
// The bug existed in CEN Schematron <=1.3.12 due to a wrong XPath context
|
||||
// (SpecifiedTradeSettlement instead of SpecifiedLineTradeSettlement).
|
||||
final ValidationContext ctx = new ValidationContext(null);
|
||||
final XMLValidator xv = new XMLValidator(ctx);
|
||||
final XPathEngine xpath = new JAXPXPathEngine();
|
||||
|
||||
File tempFile = getResourceAsFile("invalidXRV30_BR-DEC-23.xml");
|
||||
boolean noExceptions = true;
|
||||
try {
|
||||
xv.setFilename(tempFile.getAbsolutePath());
|
||||
xv.validate();
|
||||
|
||||
String s = "<validation>" + xv.getXMLResult() + "</validation>";
|
||||
Source source = Input.fromString(s).build();
|
||||
|
||||
// must be invalid overall
|
||||
String status = xpath.evaluate("/validation/summary/@status", source);
|
||||
assertEquals("invalid", status);
|
||||
|
||||
// must contain the BR-DEC-23 rule ID in at least one error
|
||||
assertThat(s).valueByXPath("count(//error[contains(text(),'BR-DEC-23')])")
|
||||
.asInt()
|
||||
.isGreaterThanOrEqualTo(1);
|
||||
} catch (IrrecoverableValidationError e) {
|
||||
noExceptions = false;
|
||||
}
|
||||
assertTrue(noExceptions);
|
||||
}
|
||||
|
||||
public void testSubInvoiceLineHierarchy() {
|
||||
final ValidationContext ctx = new ValidationContext(null);
|
||||
final XMLValidator xv = new XMLValidator(ctx);
|
||||
|
||||
@@ -261,4 +261,27 @@ public class ZUGFeRDValidatorTest extends ResourceCase {
|
||||
.isEqualTo("valid");
|
||||
|
||||
}
|
||||
public void testXMLFRValidation() {
|
||||
File tempFile = getResourceAsFile("validV2FR.xml");
|
||||
ZUGFeRDValidator zfv = new ZUGFeRDValidator();
|
||||
|
||||
String res = zfv.validate(tempFile.getAbsolutePath());
|
||||
|
||||
assertThat(res).valueByXPath("count(//error)")
|
||||
.asInt()
|
||||
.isEqualTo(0);
|
||||
assertThat(res).valueByXPath("count(//warning)")
|
||||
.asInt()
|
||||
.isEqualTo(12); // 3 empty-element warnings plus 9 French schematron warnings
|
||||
assertThat(res).valueByXPath("count(//notice)")
|
||||
.asInt()
|
||||
.isEqualTo(9); // 9 notices RE XRechnung 3.0
|
||||
assertThat(res).valueByXPath("/validation/summary/@status")
|
||||
.asString()
|
||||
.isEqualTo("valid");// expect to be valid because XR notices are, well, only notices
|
||||
assertThat(res).valueByXPath("/validation/xml/summary/@status")
|
||||
.asString()
|
||||
.isEqualTo("valid");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
BIN
validator/src/test/resources/103767-Invoice-2026-03-24-1.pdf
Normal file
BIN
validator/src/test/resources/103767-Invoice-2026-03-24-1.pdf
Normal file
Binary file not shown.
114
validator/src/test/resources/invalidXRV30_BR-DEC-23.xml
Normal file
114
validator/src/test/resources/invalidXRV30_BR-DEC-23.xml
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Regression test fixture for BR-DEC-23.
|
||||
LineTotalAmount on line item 1 intentionally has 4 decimal places (288.7934)
|
||||
to trigger: [BR-DEC-23] The allowed maximum number of decimals for the Invoice
|
||||
line net amount (BT-131) is 2.
|
||||
Based on validXRV30.xml (XRechnung 3.0 / CII profile).
|
||||
-->
|
||||
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
|
||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"
|
||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
|
||||
<rsm:ExchangedDocumentContext>
|
||||
<ram:BusinessProcessSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</ram:ID>
|
||||
</ram:BusinessProcessSpecifiedDocumentContextParameter>
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:ExchangedDocumentContext>
|
||||
<rsm:ExchangedDocument>
|
||||
<ram:ID>BR-DEC-23-REGRESSION</ram:ID>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime>
|
||||
<udt:DateTimeString format="102">20240101</udt:DateTimeString>
|
||||
</ram:IssueDateTime>
|
||||
</rsm:ExchangedDocument>
|
||||
<rsm:SupplyChainTradeTransaction>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>1</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Test product</ram:Name>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount>288.79</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="XPP">1</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<!-- 4 decimal places: intentionally violates BR-DEC-23 -->
|
||||
<ram:LineTotalAmount>288.7934</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:BuyerReference>04011000-12345-03</ram:BuyerReference>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:Name>Test Seller GmbH</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>12345</ram:PostcodeCode>
|
||||
<ram:LineOne>Seller Street 1</ram:LineOne>
|
||||
<ram:CityName>Berlin</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:URIUniversalCommunication>
|
||||
<ram:URIID schemeID="EM">seller@test.de</ram:URIID>
|
||||
</ram:URIUniversalCommunication>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">DE123456789</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:Name>Test Buyer AG</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>10115</ram:PostcodeCode>
|
||||
<ram:LineOne>Buyer Street 2</ram:LineOne>
|
||||
<ram:CityName>Berlin</ram:CityName>
|
||||
<ram:CountryID>DE</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:URIUniversalCommunication>
|
||||
<ram:URIID schemeID="EM">buyer@test.de</ram:URIID>
|
||||
</ram:URIUniversalCommunication>
|
||||
</ram:BuyerTradeParty>
|
||||
</ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:ApplicableHeaderTradeDelivery/>
|
||||
<ram:ApplicableHeaderTradeSettlement>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:TypeCode>58</ram:TypeCode>
|
||||
<ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:IBANID>DE75512108001245126199</ram:IBANID>
|
||||
</ram:PayeePartyCreditorFinancialAccount>
|
||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount>54.87</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount>288.79</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Zahlbar sofort ohne Abzug.</ram:Description>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
<ram:LineTotalAmount>288.79</ram:LineTotalAmount>
|
||||
<ram:TaxBasisTotalAmount>288.79</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">54.87</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount>343.66</ram:GrandTotalAmount>
|
||||
<ram:DuePayableAmount>343.66</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
</ram:ApplicableHeaderTradeSettlement>
|
||||
</rsm:SupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryInvoice>
|
||||
186
validator/src/test/resources/validV2FR.xml
Normal file
186
validator/src/test/resources/validV2FR.xml
Normal file
@@ -0,0 +1,186 @@
|
||||
<?xml version='1.0' encoding="UTF-8" standalone="yes"?>
|
||||
<rsm:CrossIndustryInvoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
|
||||
<rsm:ExchangedDocumentContext>
|
||||
<ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
<ram:ID>urn:cen.eu:en16931:2017</ram:ID>
|
||||
</ram:GuidelineSpecifiedDocumentContextParameter>
|
||||
</rsm:ExchangedDocumentContext>
|
||||
<rsm:ExchangedDocument>
|
||||
<ram:ID>FAC-20171118-506</ram:ID>
|
||||
<ram:TypeCode>380</ram:TypeCode>
|
||||
<ram:IssueDateTime><udt:DateTimeString format="102">20171118</udt:DateTimeString></ram:IssueDateTime>
|
||||
</rsm:ExchangedDocument>
|
||||
<rsm:SupplyChainTradeTransaction>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>1</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Prestation graphique</ram:Name>
|
||||
<ram:Description></ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount>160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount>160.0000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="HUR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="HUR">1.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount>160.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>2</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Ballon decoratif 500 ml</ram:Name>
|
||||
<ram:Description></ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount>0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount>0.7900</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="C62">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="C62">400.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount>316.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:AssociatedDocumentLineDocument>
|
||||
<ram:LineID>3</ram:LineID>
|
||||
</ram:AssociatedDocumentLineDocument>
|
||||
<ram:SpecifiedTradeProduct>
|
||||
<ram:Name>Helium par litre</ram:Name>
|
||||
<ram:Description></ram:Description>
|
||||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:GrossPriceProductTradePrice>
|
||||
<ram:ChargeAmount>0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:GrossPriceProductTradePrice>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount>0.1000</ram:ChargeAmount>
|
||||
<ram:BasisQuantity unitCode="LTR">1.0000</ram:BasisQuantity>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
<ram:BilledQuantity unitCode="LTR">200.0000</ram:BilledQuantity>
|
||||
</ram:SpecifiedLineTradeDelivery>
|
||||
<ram:SpecifiedLineTradeSettlement>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
<ram:LineTotalAmount>20.00</ram:LineTotalAmount>
|
||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||
</ram:SpecifiedLineTradeSettlement>
|
||||
</ram:IncludedSupplyChainTradeLineItem>
|
||||
<ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:SellerTradeParty>
|
||||
<ram:Name>Atelier du Ballon SARL</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>75001</ram:PostcodeCode>
|
||||
<ram:LineOne>1 rue du Louvre</ram:LineOne>
|
||||
<ram:CityName>Paris</ram:CityName>
|
||||
<ram:CountryID>FR</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="FC">552081317</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">FR44552081317</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:SellerTradeParty>
|
||||
<ram:BuyerTradeParty>
|
||||
<ram:Name>Maison de Evenements SAS</ram:Name>
|
||||
<ram:PostalTradeAddress>
|
||||
<ram:PostcodeCode>69002</ram:PostcodeCode>
|
||||
<ram:LineOne>18 rue de Brest</ram:LineOne>
|
||||
<ram:CityName>Lyon</ram:CityName>
|
||||
<ram:CountryID>FR</ram:CountryID>
|
||||
</ram:PostalTradeAddress>
|
||||
<ram:SpecifiedTaxRegistration>
|
||||
<ram:ID schemeID="VA">FR19787878784</ram:ID>
|
||||
</ram:SpecifiedTaxRegistration>
|
||||
</ram:BuyerTradeParty>
|
||||
</ram:ApplicableHeaderTradeAgreement>
|
||||
<ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ActualDeliverySupplyChainEvent>
|
||||
<ram:OccurrenceDateTime><udt:DateTimeString format="102">20171117</udt:DateTimeString></ram:OccurrenceDateTime>
|
||||
</ram:ActualDeliverySupplyChainEvent>
|
||||
</ram:ApplicableHeaderTradeDelivery>
|
||||
<ram:ApplicableHeaderTradeSettlement>
|
||||
<ram:PaymentReference>FAC-20171118-506</ram:PaymentReference>
|
||||
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
|
||||
<ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:TypeCode>42</ram:TypeCode>
|
||||
<ram:Information>Virement bancaire</ram:Information>
|
||||
<ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:IBANID>FR76 3000 6000 0112 3456 7890 189</ram:IBANID>
|
||||
</ram:PayeePartyCreditorFinancialAccount>
|
||||
<ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
<ram:BICID>AGRIFRPPXXX</ram:BICID>
|
||||
</ram:PayeeSpecifiedCreditorFinancialInstitution>
|
||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount>11.20</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount>160.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>7.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:ApplicableTradeTax>
|
||||
<ram:CalculatedAmount>63.84</ram:CalculatedAmount>
|
||||
<ram:TypeCode>VAT</ram:TypeCode>
|
||||
<ram:BasisAmount>336.00</ram:BasisAmount>
|
||||
<ram:CategoryCode>S</ram:CategoryCode>
|
||||
<ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
|
||||
</ram:ApplicableTradeTax>
|
||||
<ram:SpecifiedTradePaymentTerms>
|
||||
<ram:Description>Paiement sans escompte avant le 09.12.2017</ram:Description>
|
||||
<ram:DueDateDateTime><udt:DateTimeString format="102">20171209</udt:DateTimeString></ram:DueDateDateTime>
|
||||
</ram:SpecifiedTradePaymentTerms>
|
||||
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
<ram:LineTotalAmount>496.00</ram:LineTotalAmount>
|
||||
<ram:ChargeTotalAmount>0.00</ram:ChargeTotalAmount>
|
||||
<ram:AllowanceTotalAmount>0.00</ram:AllowanceTotalAmount>
|
||||
<ram:TaxBasisTotalAmount>496.00</ram:TaxBasisTotalAmount>
|
||||
<ram:TaxTotalAmount currencyID="EUR">75.04</ram:TaxTotalAmount>
|
||||
<ram:GrandTotalAmount>571.04</ram:GrandTotalAmount>
|
||||
<ram:DuePayableAmount>571.04</ram:DuePayableAmount>
|
||||
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||
</ram:ApplicableHeaderTradeSettlement>
|
||||
</rsm:SupplyChainTradeTransaction>
|
||||
</rsm:CrossIndustryInvoice>
|
||||
Reference in New Issue
Block a user