Skip to content

Commit

Permalink
fields: Allow BT-1451 to be equal to other dates (TEDEFO-2933)
Browse files Browse the repository at this point in the history
Winner Decision (BT-1451) can be on the same day the notice is submitted
(BT-05) and the contract is signed (BT-145).

Also update corresponding Schematron rules.
  • Loading branch information
bertrand-lorentz committed Jan 5, 2024
1 parent 7bf3fcb commit d851252
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions fields/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -5434,12 +5434,12 @@
"severity" : "ERROR",
"constraints" : [ {
"condition" : "{ND-SettledContract} ${(BT-1451-Contract is present) and (BT-145-Contract is present)}",
"value" : "{ND-SettledContract} ${BT-1451-Contract < BT-145-Contract}",
"value" : "{ND-SettledContract} ${BT-1451-Contract <= BT-145-Contract}",
"severity" : "ERROR",
"message" : "rule|text|BR-BT-01451-0100"
}, {
"condition" : "{ND-SettledContract} ${(BT-1451-Contract is present) and (BT-05(a)-notice is present)}",
"value" : "{ND-SettledContract} ${BT-1451-Contract < BT-05(a)-notice}",
"value" : "{ND-SettledContract} ${BT-1451-Contract <= BT-05(a)-notice}",
"severity" : "ERROR",
"message" : "rule|text|BR-BT-01451-0101"
} ]
Expand Down
4 changes: 2 additions & 2 deletions schematrons/dynamic/validation-stage-5.sch
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:SettledContract">
<assert id="BR-BT-00145-0100" role="ERROR" diagnostics="BT-145-Contract" test="(cbc:IssueDate/xs:date(text()) &lt;= ../../../../../../cbc:IssueDate/xs:date(text())) or not((cbc:IssueDate) and (../../../../../../cbc:IssueDate) and (../../efac:NoticeSubType/cbc:SubTypeCode/normalize-space(text()) = ('29','30','31','32','E4','T02','33','34','35','36','37','38','39','40','E5')))">rule|text|BR-BT-00145-0100</assert>
<assert id="BR-BT-01451-0100" role="ERROR" diagnostics="BT-1451-Contract" test="(cbc:AwardDate/xs:date(text()) &lt; cbc:IssueDate/xs:date(text())) or not((cbc:AwardDate) and (cbc:IssueDate))">rule|text|BR-BT-01451-0100</assert>
<assert id="BR-BT-01451-0101" role="ERROR" diagnostics="BT-1451-Contract" test="(cbc:AwardDate/xs:date(text()) &lt; ../../../../../../cbc:IssueDate/xs:date(text())) or not((cbc:AwardDate) and (../../../../../../cbc:IssueDate))">rule|text|BR-BT-01451-0101</assert>
<assert id="BR-BT-01451-0100" role="ERROR" diagnostics="BT-1451-Contract" test="(cbc:AwardDate/xs:date(text()) &lt;= cbc:IssueDate/xs:date(text())) or not((cbc:AwardDate) and (cbc:IssueDate))">rule|text|BR-BT-01451-0100</assert>
<assert id="BR-BT-01451-0101" role="ERROR" diagnostics="BT-1451-Contract" test="(cbc:AwardDate/xs:date(text()) &lt;= ../../../../../../cbc:IssueDate/xs:date(text())) or not((cbc:AwardDate) and (../../../../../../cbc:IssueDate))">rule|text|BR-BT-01451-0101</assert>
<assert id="BR-BT-03202-0100" role="ERROR" diagnostics="ND-SettledContract_BT-3202-Contract" test="(every $tender in efac:LotTender/cbc:ID/normalize-space(text()) satisfies ($tender = /*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotTender/cbc:ID/normalize-space(text()))) or not(efac:LotTender/cbc:ID)">rule|text|BR-BT-03202-0100</assert>
<assert id="BR-OPT-00300-0252" role="ERROR" diagnostics="ND-SettledContract_OPT-300-Contract-Signatory" test="(every $signatory in cac:SignatoryParty/cac:PartyIdentification/cbc:ID/normalize-space(text()) satisfies ($signatory = /*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:Organizations/efac:Organization/efac:Company/cac:PartyIdentification/cbc:ID/normalize-space(text()))) or not(cac:SignatoryParty/cac:PartyIdentification/cbc:ID)">rule|text|BR-OPT-00300-0252</assert>
<assert id="BR-OPT-00316-0100" role="ERROR" diagnostics="OPT-316-Contract" test="count(for $x in cbc:ID, $y in /*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:SettledContract/cbc:ID[. = $x] return $y) = 1">rule|text|BR-OPT-00316-0100</assert>
Expand Down
4 changes: 2 additions & 2 deletions schematrons/static/validation-stage-5.sch
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@
</rule>
<rule context="/*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:SettledContract">
<assert id="BR-BT-00145-0100" role="ERROR" diagnostics="BT-145-Contract" test="(cbc:IssueDate/xs:date(text()) &lt;= ../../../../../../cbc:IssueDate/xs:date(text())) or not((cbc:IssueDate) and (../../../../../../cbc:IssueDate) and (../../efac:NoticeSubType/cbc:SubTypeCode/normalize-space(text()) = ('29','30','31','32','E4','T02','33','34','35','36','37','38','39','40','E5')))">rule|text|BR-BT-00145-0100</assert>
<assert id="BR-BT-01451-0100" role="ERROR" diagnostics="BT-1451-Contract" test="(cbc:AwardDate/xs:date(text()) &lt; cbc:IssueDate/xs:date(text())) or not((cbc:AwardDate) and (cbc:IssueDate))">rule|text|BR-BT-01451-0100</assert>
<assert id="BR-BT-01451-0101" role="ERROR" diagnostics="BT-1451-Contract" test="(cbc:AwardDate/xs:date(text()) &lt; ../../../../../../cbc:IssueDate/xs:date(text())) or not((cbc:AwardDate) and (../../../../../../cbc:IssueDate))">rule|text|BR-BT-01451-0101</assert>
<assert id="BR-BT-01451-0100" role="ERROR" diagnostics="BT-1451-Contract" test="(cbc:AwardDate/xs:date(text()) &lt;= cbc:IssueDate/xs:date(text())) or not((cbc:AwardDate) and (cbc:IssueDate))">rule|text|BR-BT-01451-0100</assert>
<assert id="BR-BT-01451-0101" role="ERROR" diagnostics="BT-1451-Contract" test="(cbc:AwardDate/xs:date(text()) &lt;= ../../../../../../cbc:IssueDate/xs:date(text())) or not((cbc:AwardDate) and (../../../../../../cbc:IssueDate))">rule|text|BR-BT-01451-0101</assert>
<assert id="BR-BT-03202-0100" role="ERROR" diagnostics="ND-SettledContract_BT-3202-Contract" test="(every $tender in efac:LotTender/cbc:ID/normalize-space(text()) satisfies ($tender = /*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:LotTender/cbc:ID/normalize-space(text()))) or not(efac:LotTender/cbc:ID)">rule|text|BR-BT-03202-0100</assert>
<assert id="BR-OPT-00300-0252" role="ERROR" diagnostics="ND-SettledContract_OPT-300-Contract-Signatory" test="(every $signatory in cac:SignatoryParty/cac:PartyIdentification/cbc:ID/normalize-space(text()) satisfies ($signatory = /*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:Organizations/efac:Organization/efac:Company/cac:PartyIdentification/cbc:ID/normalize-space(text()))) or not(cac:SignatoryParty/cac:PartyIdentification/cbc:ID)">rule|text|BR-OPT-00300-0252</assert>
<assert id="BR-OPT-00316-0100" role="ERROR" diagnostics="OPT-316-Contract" test="count(for $x in cbc:ID, $y in /*/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeResult/efac:SettledContract/cbc:ID[. = $x] return $y) = 1">rule|text|BR-OPT-00316-0100</assert>
Expand Down

0 comments on commit d851252

Please sign in to comment.