summaryrefslogtreecommitdiff
path: root/server/xml/macros
diff options
context:
space:
mode:
Diffstat (limited to 'server/xml/macros')
-rw-r--r--server/xml/macros/B.0.xml20
1 files changed, 19 insertions, 1 deletions
diff --git a/server/xml/macros/B.0.xml b/server/xml/macros/B.0.xml
index f2b3e68..ad7bd5e 100644
--- a/server/xml/macros/B.0.xml
+++ b/server/xml/macros/B.0.xml
@@ -1,4 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ 20090420: Bent Bisballe Nyeng
+ Tilføjede '-' til cpr nummeret.
+ -->
<macro name="B.0" version="1.0">
<resume store_in_journal="false"/>
<queries>
@@ -6,6 +10,20 @@
<query service="pentominos" class="referral" ttl="1000000"/>
</queries>
<maps>
+ <map name="cpr_bindestreg">
+ value = 0
+ timestamp = 0
+ source = 'pentominos'
+
+ if(cpr and cpr.cpr and cpr.cpr.value and cpr.cpr.timestamp and cpr.cpr.source)
+ then
+ value = string.sub(cpr.cpr.value,1,6) .. '-' .. string.sub(cpr.cpr.value,7,11)
+ timestamp = cpr.cpr.timestamp
+ source = cpr.cpr.source
+ end
+
+ return value, timestamp, source
+ </map>
</maps>
<scripts>
</scripts>
@@ -20,7 +38,7 @@
</frame>
<frame layout="hbox">
<label caption="Cpr-nr:" width="50"/>
- <lineedit name="cpr" map="cpr.cpr" value="-" readonly="true"/>
+ <lineedit name="cpr" map="cpr_bindestreg" value="-" readonly="true"/>
</frame>
</frame>