Skip to content

Commit

Permalink
Merge pull request #736 from OP-TED/feature/Use_DispatcheDateeSender_…
Browse files Browse the repository at this point in the history
…TEDEFO-2783

Use of notice Dispatch Date eSender (BT-803) when specified
  • Loading branch information
YvesJo authored Nov 6, 2023
2 parents ad9c200 + 191ff99 commit 014f4c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions schematrons/dynamic/validation-stage-6b.sch
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<!-- This file contains schematron rules that use information outside of the notice being validated -->

<!-- Notice dispatch date -->
<rule context="/*/cbc:IssueDate">
<!-- BT-05(a)-notice Dispatch date is with one day of current date -->
<assert id="D-0001" role="ERROR" test="((current-date() - xs:date(text())) le xs:dayTimeDuration('P2D')) and ((current-date() - xs:date(text())) ge xs:dayTimeDuration('-P1D'))">
Notice Dispatch Date must be between 0 and 24 hours before the current date.
<rule context="/*">
<!-- BT-803(d)-notice Notice Dispatch Date eSender or BT-05(a)-notice Notice Dispatch Date is with one day of current date -->
<assert id="D-0001" role="ERROR" test="((ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:TransmissionDate) and ((current-date() - xs:date(ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:TransmissionDate/text())) le xs:dayTimeDuration('P2D')) and ((current-date() - xs:date(ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efbc:TransmissionDate/text())) ge xs:dayTimeDuration('-P1D'))) or (((current-date() - xs:date(cbc:IssueDate/text())) le xs:dayTimeDuration('P2D')) and ((current-date() - xs:date(cbc:IssueDate/text())) ge xs:dayTimeDuration('-P1D')))">
Notice Dispatch Date eSender (BT-803), or by default Notice Dispatch Date (BT-05), must be between 0 and 24 hours before the current date.
</assert>
</rule>

Expand Down

0 comments on commit 014f4c9

Please sign in to comment.