fork download
  1. //Define what key & possible values
  2. def filterMap = [aggregationKey:['INV_GROUP_Meterreading','INV_GROUP_Power']]
  3. def xmlString = """<BillingInvoice>
  4. <aggregation>
  5. <aggregations>
  6. <aggregations>
  7. <key>INV_GROUP_Power</key>
  8. <showUnitPrice>true</showUnitPrice>
  9. <showVolume>true</showVolume>
  10. <volumeUoM>kW</volumeUoM>
  11. </aggregations>
  12. <aggregations>
  13. <key>INV_GROUP_Meterreading</key>
  14. <showUnitPrice>true</showUnitPrice>
  15. <showVolume>true</showVolume>
  16. <volumeUoM>days</volumeUoM>
  17. </aggregations>
  18. <key>DISTRIBUTION</key>
  19. <showUnitPrice>false</showUnitPrice>
  20. <showVolume>false</showVolume>
  21. </aggregations>
  22. </aggregation>
  23. <amount>153.6600000000</amount>
  24. <balance>153.6600000000</balance>
  25. <bundleId>000000~DEFAULT</bundleId>
  26. <consumptionEvolution>
  27. <consumption>
  28. <deliveryPointId>555555555555555</deliveryPointId>
  29. <endPeriod>2017-07-31T00:00:00+02:00</endPeriod>
  30. <startPeriod>2016-08-01T00:00:00+02:00</startPeriod>
  31. <timeFrame>TOTAL_HOUR</timeFrame>
  32. <value>74645.2300000000</value>
  33. <meteringContext>PERIODIC_METERING</meteringContext>
  34. </consumption>
  35. <consumption>
  36. <deliveryPointId>555555555555555</deliveryPointId>
  37. <endPeriod>2015-05-07T00:00:00+02:00</endPeriod>
  38. <startPeriod>2015-03-19T00:00:00+01:00</startPeriod>
  39. <timeFrame>TOTAL_HOUR</timeFrame>
  40. <value>471.8600000000</value>
  41. <meteringContext>GAIN</meteringContext>
  42. </consumption>
  43. <consumption>
  44. <deliveryPointId>555555555555555</deliveryPointId>
  45. <endPeriod>2015-03-19T00:00:00+01:00</endPeriod>
  46. <startPeriod>2014-11-01T00:00:00+01:00</startPeriod>
  47. <timeFrame>TOTAL_HOUR</timeFrame>
  48. <value>3860.2600000000</value>
  49. <meteringContext>GAIN</meteringContext>
  50. </consumption>
  51. </consumptionEvolution>
  52. <customer>
  53. <accountNr>999999999</accountNr>
  54. <billingId>444444444</billingId>
  55. </customer>
  56. <dueDate>2017-08-21T00:00:00+02:00</dueDate>
  57. <dunningBlockedByAgent>false</dunningBlockedByAgent>
  58. <dunningBlockedBySystem>false</dunningBlockedBySystem>
  59. <dunningStatus>NID</dunningStatus>
  60. <eanTotalEvolution>
  61. <totalEvolution>
  62. <connectionKey>555555555555555</connectionKey>
  63. <eanTotalConsumption/>
  64. </totalEvolution>
  65. </eanTotalEvolution>
  66. <invoiceDate>2017-08-07T00:00:00+02:00</invoiceDate>
  67. <invoiceNumber>GHJKJ111111</invoiceNumber>
  68. <invoiceType>SETTLEMENT</invoiceType>
  69. <invoicedOrders>
  70. <entry>
  71. <key>59412</key>
  72. <value>
  73. <address>
  74. <city>Stackoverflow</city>
  75. <country>US</country>
  76. <deliveryPointID>555555555555555</deliveryPointID>
  77. <gridcompany>4444444444444</gridcompany>
  78. <region>Cold</region>
  79. <streetName>Placeforeveryone</streetName>
  80. <streetNumber>420</streetNumber>
  81. <zipcode>xxxxxx</zipcode>
  82. </address>
  83. <billingEstimates>
  84. <billingEstimate>
  85. <fromDate>2015-11-01T00:00:00+01:00</fromDate>
  86. <logDate>2017-08-07T00:00:00+02:00</logDate>
  87. <meteringContext>GAIN</meteringContext>
  88. <source>MARKET</source>
  89. <timeframe>TOTAL_HOUR</timeframe>
  90. <validFrom>2015-11-01T00:00:00+01:00</validFrom>
  91. <validTo>2015-11-01T00:00:00+01:00</validTo>
  92. <value>46802.0000000000</value>
  93. </billingEstimate>
  94. <billingEstimate>
  95. <fromDate>2015-11-01T00:00:00+01:00</fromDate>
  96. <logDate>2017-08-07T00:00:00+02:00</logDate>
  97. <meteringContext>GAIN</meteringContext>
  98. <source>MARKET</source>
  99. <timeframe>TOTAL_HOUR</timeframe>
  100. <validFrom>2015-11-01T00:00:00+01:00</validFrom>
  101. <validTo>9999-12-31T00:00:00+01:00</validTo>
  102. <value>12409.0000000000</value>
  103. </billingEstimate>
  104. </billingEstimates>
  105. <contractLine>00000-0000-0000-57af-00000</contractLine>
  106. <contractNumber>00000-00000-00000-8cbe-00000</contractNumber>
  107. <contractedVolumes>
  108. <fromDate>2015-11-01T00:00:00+01:00</fromDate>
  109. <timeFrame>TOTAL_HOUR</timeFrame>
  110. <toDate>9999-12-31T00:00:00+01:00</toDate>
  111. <value>200000.0000000000</value>
  112. </contractedVolumes>
  113. <historicalConsumptions>
  114. <deliveryPointId>555555555555555</deliveryPointId>
  115. <endPeriod>2014-11-01T00:00:00+01:00</endPeriod>
  116. <startPeriod>2014-04-11T00:00:00+02:00</startPeriod>
  117. <timeFrame>TOTAL_HOUR</timeFrame>
  118. <value>1057.6900000000</value>
  119. </historicalConsumptions>
  120. <historicalConsumptions>
  121. <deliveryPointId>555555555555555</deliveryPointId>
  122. <endPeriod>2015-03-19T00:00:00+01:00</endPeriod>
  123. <startPeriod>2014-11-01T00:00:00+01:00</startPeriod>
  124. <timeFrame>TOTAL_HOUR</timeFrame>
  125. <value>3860.2600000000</value>
  126. </historicalConsumptions>
  127. <historicalConsumptions>
  128. <deliveryPointId>555555555555555</deliveryPointId>
  129. <endPeriod>2015-05-07T00:00:00+02:00</endPeriod>
  130. <startPeriod>2015-03-19T00:00:00+01:00</startPeriod>
  131. <timeFrame>TOTAL_HOUR</timeFrame>
  132. <value>471.8600000000</value>
  133. </historicalConsumptions>
  134. <lines>
  135. <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
  136. <amount>8.2400000000</amount>
  137. <billingType>settlement</billingType>
  138. <description>VAT 21% 2017-01-01/2017-07-31</description>
  139. <invoiceLineId>200196</invoiceLineId>
  140. <isPercentage>1</isPercentage>
  141. <isVatPercentage>true</isVatPercentage>
  142. <orderLineType>SETTLEMENT</orderLineType>
  143. <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
  144. <periodStart>2017-01-01T00:00:00+01:00</periodStart>
  145. <price>21.0000000000</price>
  146. <productCode>VAT_21%</productCode>
  147. <quantity>39.2500000000</quantity>
  148. <vatBaseAmount>39.2500000000</vatBaseAmount>
  149. <vatCode>VAT-OUT-21-S</vatCode>
  150. <vatPerc>21.0000000000</vatPerc>
  151. </lines>
  152. <lines>
  153. <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
  154. <amount>0.0000000000</amount>
  155. <billingType>settlement</billingType>
  156. <description>VAT 0% 2017-01-01/2017-07-31</description>
  157. <invoiceLineId>200195</invoiceLineId>
  158. <isPercentage>1</isPercentage>
  159. <isVatPercentage>true</isVatPercentage>
  160. <orderLineType>SETTLEMENT</orderLineType>
  161. <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
  162. <periodStart>2017-01-01T00:00:00+01:00</periodStart>
  163. <price>0.0000000000</price>
  164. <productCode>VAT_0%</productCode>
  165. <quantity>0.0000000000</quantity>
  166. <vatBaseAmount>0.0000000000</vatBaseAmount>
  167. <vatCode>VAT-OUT-00-S</vatCode>
  168. <vatPerc>0.0000000000</vatPerc>
  169. </lines>
  170. <lines>
  171. <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
  172. <amount>2.8000000000</amount>
  173. <billingType>settlement</billingType>
  174. <description>D Gas meterreading 2017-01-01/2017-07-31</description>
  175. <invoiceLineId>200194</invoiceLineId>
  176. <isPercentage>0</isPercentage>
  177. <isVatPercentage>false</isVatPercentage>
  178. <orderLineType>SETTLEMENT</orderLineType>
  179. <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
  180. <periodStart>2017-01-01T00:00:00+01:00</periodStart>
  181. <price>0.0132876700</price>
  182. <productCode>D_Gas_meterreading</productCode>
  183. <quantity>211.0000000000</quantity>
  184. <vatCode>VAT-OUT-21-S</vatCode>
  185. </lines>
  186. <lines>
  187. <aggregationKey>INV_GROUP_Power</aggregationKey>
  188. <amount>36.4500000000</amount>
  189. <billingType>settlement</billingType>
  190. <description>D Gas fixed term 2017-01-01/2017-07-31</description>
  191. <invoiceLineId>200193</invoiceLineId>
  192. <isPercentage>0</isPercentage>
  193. <isVatPercentage>false</isVatPercentage>
  194. <orderLineType>SETTLEMENT</orderLineType>
  195. <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
  196. <periodStart>2017-01-01T00:00:00+01:00</periodStart>
  197. <price>0.1727671200</price>
  198. <productCode>D_Gas_fixed_term</productCode>
  199. <quantity>211.0000000000</quantity>
  200. <vatCode>VAT-OUT-21-S</vatCode>
  201. </lines>
  202. <lines>
  203. <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
  204. <amount>0.0000000000</amount>
  205. <billingType>settlement</billingType>
  206. <description>VAT 0% 2016-03-01/2017-01-01</description>
  207. <invoiceLineId>200192</invoiceLineId>
  208. <isPercentage>1</isPercentage>
  209. <isVatPercentage>true</isVatPercentage>
  210. <orderLineType>SETTLEMENT</orderLineType>
  211. <periodEnd>2017-01-01T00:00:00+01:00</periodEnd>
  212. <periodStart>2016-03-01T00:00:00+01:00</periodStart>
  213. <price>0.0000000000</price>
  214. <productCode>VAT_0%</productCode>
  215. <quantity>0.0000000000</quantity>
  216. <vatBaseAmount>0.0000000000</vatBaseAmount>
  217. <vatCode>VAT-OUT-00-S</vatCode>
  218. <vatPerc>0.0000000000</vatPerc>
  219. </lines>
  220. <lines>
  221. <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
  222. <amount>13.0300000000</amount>
  223. <billingType>settlement</billingType>
  224. <description>VAT 21% 2016-03-01/2017-01-01</description>
  225. <invoiceLineId>200191</invoiceLineId>
  226. <isPercentage>1</isPercentage>
  227. <isVatPercentage>true</isVatPercentage>
  228. <orderLineType>SETTLEMENT</orderLineType>
  229. <periodEnd>2017-01-01T00:00:00+01:00</periodEnd>
  230. <periodStart>2016-03-01T00:00:00+01:00</periodStart>
  231. <price>21.0000000000</price>
  232. <productCode>VAT_21%</productCode>
  233. <quantity>62.0500000000</quantity>
  234. <vatBaseAmount>62.0500000000</vatBaseAmount>
  235. <vatCode>VAT-OUT-21-S</vatCode>
  236. <vatPerc>21.0000000000</vatPerc>
  237. </lines>
  238. <lines>
  239. <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
  240. <amount>6.7900000000</amount>
  241. <billingType>settlement</billingType>
  242. <description>D Gas meterreading 2016-03-01/2017-01-01</description>
  243. <invoiceLineId>200190</invoiceLineId>
  244. <isPercentage>0</isPercentage>
  245. <isVatPercentage>false</isVatPercentage>
  246. <orderLineType>SETTLEMENT</orderLineType>
  247. <periodEnd>2017-01-01T00:00:00+01:00</periodEnd>
  248. <periodStart>2016-03-01T00:00:00+01:00</periodStart>
  249. <price>0.0221857900</price>
  250. <productCode>D_Gas_meterreading</productCode>
  251. <quantity>306.0000000000</quantity>
  252. <vatCode>VAT-OUT-21-S</vatCode>
  253. </lines>
  254. <lines>
  255. <aggregationKey>INV_GROUP_Power</aggregationKey>
  256. <amount>55.2600000000</amount>
  257. <billingType>settlement</billingType>
  258. <description>D Gas fixed term 2016-03-01/2017-01-01</description>
  259. <invoiceLineId>200189</invoiceLineId>
  260. <isPercentage>0</isPercentage>
  261. <isVatPercentage>false</isVatPercentage>
  262. <orderLineType>SETTLEMENT</orderLineType>
  263. <periodEnd>2017-01-01T00:00:00+01:00</periodEnd>
  264. <periodStart>2016-03-01T00:00:00+01:00</periodStart>
  265. <price>0.1805737700</price>
  266. <productCode>D_Gas_fixed_term</productCode>
  267. <quantity>306.0000000000</quantity>
  268. <vatCode>VAT-OUT-21-S</vatCode>
  269. </lines>
  270. <lines>
  271. <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
  272. <amount>1.2300000000</amount>
  273. <billingType>settlement</billingType>
  274. <description>VAT 21% 2016-02-01/2016-03-01</description>
  275. <invoiceLineId>200188</invoiceLineId>
  276. <isPercentage>1</isPercentage>
  277. <isVatPercentage>true</isVatPercentage>
  278. <orderLineType>SETTLEMENT</orderLineType>
  279. <periodEnd>2016-03-01T00:00:00+01:00</periodEnd>
  280. <periodStart>2016-02-01T00:00:00+01:00</periodStart>
  281. <price>21.0000000000</price>
  282. <productCode>VAT_21%</productCode>
  283. <quantity>5.8800000000</quantity>
  284. <vatBaseAmount>5.8800000000</vatBaseAmount>
  285. <vatCode>VAT-OUT-21-S</vatCode>
  286. <vatPerc>21.0000000000</vatPerc>
  287. </lines>
  288. <lines>
  289. <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
  290. <amount>0.0000000000</amount>
  291. <billingType>settlement</billingType>
  292. <description>VAT 0% 2016-02-01/2016-03-01</description>
  293. <invoiceLineId>200187</invoiceLineId>
  294. <isPercentage>1</isPercentage>
  295. <isVatPercentage>true</isVatPercentage>
  296. <orderLineType>SETTLEMENT</orderLineType>
  297. <periodEnd>2016-03-01T00:00:00+01:00</periodEnd>
  298. <periodStart>2016-02-01T00:00:00+01:00</periodStart>
  299. <price>0.0000000000</price>
  300. <productCode>VAT_0%</productCode>
  301. <quantity>0.0000000000</quantity>
  302. <vatBaseAmount>0.0000000000</vatBaseAmount>
  303. <vatCode>VAT-OUT-00-S</vatCode>
  304. <vatPerc>0.0000000000</vatPerc>
  305. </lines>
  306. <lines>
  307. <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
  308. <amount>0.6400000000</amount>
  309. <billingType>settlement</billingType>
  310. <description>D Gas meterreading 2016-02-01/2016-03-01</description>
  311. <invoiceLineId>200186</invoiceLineId>
  312. <isPercentage>0</isPercentage>
  313. <isVatPercentage>false</isVatPercentage>
  314. <orderLineType>SETTLEMENT</orderLineType>
  315. <periodEnd>2016-03-01T00:00:00+01:00</periodEnd>
  316. <periodStart>2016-02-01T00:00:00+01:00</periodStart>
  317. <price>0.0221857900</price>
  318. <productCode>D_Gas_meterreading</productCode>
  319. <quantity>29.0000000000</quantity>
  320. <vatCode>VAT-OUT-21-S</vatCode>
  321. </lines>
  322. <lines>
  323. <aggregationKey>INV_GROUP_Power</aggregationKey>
  324. <amount>5.2400000000</amount>
  325. <billingType>settlement</billingType>
  326. <description>D Gas fixed term 2016-02-01/2016-03-01</description>
  327. <invoiceLineId>200185</invoiceLineId>
  328. <isPercentage>0</isPercentage>
  329. <isVatPercentage>false</isVatPercentage>
  330. <orderLineType>SETTLEMENT</orderLineType>
  331. <periodEnd>2016-03-01T00:00:00+01:00</periodEnd>
  332. <periodStart>2016-02-01T00:00:00+01:00</periodStart>
  333. <price>0.1805737700</price>
  334. <productCode>D_Gas_fixed_term</productCode>
  335. <quantity>29.0000000000</quantity>
  336. <vatCode>VAT-OUT-21-S</vatCode>
  337. </lines>
  338. <lines>
  339. <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
  340. <amount>1.3200000000</amount>
  341. <billingType>settlement</billingType>
  342. <description>VAT 21% 2016-01-01/2016-02-01</description>
  343. <invoiceLineId>200184</invoiceLineId>
  344. <isPercentage>1</isPercentage>
  345. <isVatPercentage>true</isVatPercentage>
  346. <orderLineType>SETTLEMENT</orderLineType>
  347. <periodEnd>2016-02-01T00:00:00+01:00</periodEnd>
  348. <periodStart>2016-01-01T00:00:00+01:00</periodStart>
  349. <price>21.0000000000</price>
  350. <productCode>VAT_21%</productCode>
  351. <quantity>6.2900000000</quantity>
  352. <vatBaseAmount>6.2900000000</vatBaseAmount>
  353. <vatCode>VAT-OUT-21-S</vatCode>
  354. <vatPerc>21.0000000000</vatPerc>
  355. </lines>
  356. <lines>
  357. <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
  358. <amount>0.0000000000</amount>
  359. <billingType>settlement</billingType>
  360. <description>VAT 0% 2016-01-01/2016-02-01</description>
  361. <invoiceLineId>200183</invoiceLineId>
  362. <isPercentage>1</isPercentage>
  363. <isVatPercentage>true</isVatPercentage>
  364. <orderLineType>SETTLEMENT</orderLineType>
  365. <periodEnd>2016-02-01T00:00:00+01:00</periodEnd>
  366. <periodStart>2016-01-01T00:00:00+01:00</periodStart>
  367. <price>0.0000000000</price>
  368. <productCode>VAT_0%</productCode>
  369. <quantity>0.0000000000</quantity>
  370. <vatBaseAmount>0.0000000000</vatBaseAmount>
  371. <vatCode>VAT-OUT-00-S</vatCode>
  372. <vatPerc>0.0000000000</vatPerc>
  373. </lines>
  374. <lines>
  375. <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
  376. <amount>0.6900000000</amount>
  377. <billingType>settlement</billingType>
  378. <description>D Gas meterreading 2016-01-01/2016-02-01</description>
  379. <invoiceLineId>200182</invoiceLineId>
  380. <isPercentage>0</isPercentage>
  381. <isVatPercentage>false</isVatPercentage>
  382. <orderLineType>SETTLEMENT</orderLineType>
  383. <periodEnd>2016-02-01T00:00:00+01:00</periodEnd>
  384. <periodStart>2016-01-01T00:00:00+01:00</periodStart>
  385. <price>0.0221857900</price>
  386. <productCode>D_Gas_meterreading</productCode>
  387. <quantity>31.0000000000</quantity>
  388. <vatCode>VAT-OUT-21-S</vatCode>
  389. </lines>
  390. <lines>
  391. <aggregationKey>INV_GROUP_Power</aggregationKey>
  392. <amount>5.6000000000</amount>
  393. <billingType>settlement</billingType>
  394. <description>D Gas fixed term 2016-01-01/2016-02-01</description>
  395. <invoiceLineId>200181</invoiceLineId>
  396. <isPercentage>0</isPercentage>
  397. <isVatPercentage>false</isVatPercentage>
  398. <orderLineType>SETTLEMENT</orderLineType>
  399. <periodEnd>2016-02-01T00:00:00+01:00</periodEnd>
  400. <periodStart>2016-01-01T00:00:00+01:00</periodStart>
  401. <price>0.1805737700</price>
  402. <productCode>D_Gas_fixed_term</productCode>
  403. <quantity>31.0000000000</quantity>
  404. <vatCode>VAT-OUT-21-S</vatCode>
  405. </lines>
  406. <lines>
  407. <aggregationKey>INV_GROUP_VAT_0%</aggregationKey>
  408. <amount>0.0000000000</amount>
  409. <billingType>settlement</billingType>
  410. <description>VAT 0% 2015-11-01/2016-01-01</description>
  411. <invoiceLineId>200180</invoiceLineId>
  412. <isPercentage>1</isPercentage>
  413. <isVatPercentage>true</isVatPercentage>
  414. <orderLineType>SETTLEMENT</orderLineType>
  415. <periodEnd>2016-01-01T00:00:00+01:00</periodEnd>
  416. <periodStart>2015-11-01T00:00:00+01:00</periodStart>
  417. <price>0.0000000000</price>
  418. <productCode>VAT_0%</productCode>
  419. <quantity>0.0000000000</quantity>
  420. <vatBaseAmount>0.0000000000</vatBaseAmount>
  421. <vatCode>VAT-OUT-00-S</vatCode>
  422. <vatPerc>0.0000000000</vatPerc>
  423. </lines>
  424. <lines>
  425. <aggregationKey>INV_GROUP_VAT_21%</aggregationKey>
  426. <amount>2.8400000000</amount>
  427. <billingType>settlement</billingType>
  428. <description>VAT 21% 2015-11-01/2016-01-01</description>
  429. <invoiceLineId>200179</invoiceLineId>
  430. <isPercentage>1</isPercentage>
  431. <isVatPercentage>true</isVatPercentage>
  432. <orderLineType>SETTLEMENT</orderLineType>
  433. <periodEnd>2016-01-01T00:00:00+01:00</periodEnd>
  434. <periodStart>2015-11-01T00:00:00+01:00</periodStart>
  435. <price>21.0000000000</price>
  436. <productCode>VAT_21%</productCode>
  437. <quantity>13.5300000000</quantity>
  438. <vatBaseAmount>13.5300000000</vatBaseAmount>
  439. <vatCode>VAT-OUT-21-S</vatCode>
  440. <vatPerc>21.0000000000</vatPerc>
  441. </lines>
  442. <lines>
  443. <aggregationKey>INV_GROUP_Meterreading</aggregationKey>
  444. <amount>1.6600000000</amount>
  445. <billingType>settlement</billingType>
  446. <description>D Gas meterreading 2015-11-01/2016-01-01</description>
  447. <invoiceLineId>200178</invoiceLineId>
  448. <isPercentage>0</isPercentage>
  449. <isVatPercentage>false</isVatPercentage>
  450. <orderLineType>SETTLEMENT</orderLineType>
  451. <periodEnd>2016-01-01T00:00:00+01:00</periodEnd>
  452. <periodStart>2015-11-01T00:00:00+01:00</periodStart>
  453. <price>0.0272602700</price>
  454. <productCode>D_Gas_meterreading</productCode>
  455. <quantity>61.0000000000</quantity>
  456. <vatCode>VAT-OUT-21-S</vatCode>
  457. </lines>
  458. <lines>
  459. <aggregationKey>INV_GROUP_Power</aggregationKey>
  460. <amount>11.8700000000</amount>
  461. <billingType>settlement</billingType>
  462. <description>D Gas fixed term 2015-11-01/2016-01-01</description>
  463. <invoiceLineId>200177</invoiceLineId>
  464. <isPercentage>0</isPercentage>
  465. <isVatPercentage>false</isVatPercentage>
  466. <orderLineType>SETTLEMENT</orderLineType>
  467. <periodEnd>2016-01-01T00:00:00+01:00</periodEnd>
  468. <periodStart>2015-11-01T00:00:00+01:00</periodStart>
  469. <price>0.1946575300</price>
  470. <productCode>D_Gas_fixed_term</productCode>
  471. <quantity>61.0000000000</quantity>
  472. <vatCode>VAT-OUT-21-S</vatCode>
  473. </lines>
  474. <meterType>YEAR</meterType>
  475. <newAdvanced>
  476. <recurringAmount>42.0000000000</recurringAmount>
  477. <recurringUnit>MONTH</recurringUnit>
  478. <recurringValue>1</recurringValue>
  479. </newAdvanced>
  480. <orderType>SETTLEMENT</orderType>
  481. <periodEnd>2017-07-31T00:00:00+02:00</periodEnd>
  482. <periodStart>2015-11-01T00:00:00+01:00</periodStart>
  483. <productType>NG</productType>
  484. <subAmount>153.6600000000</subAmount>
  485. </value>
  486. </entry>
  487. </invoicedOrders>
  488. <paymentReference>+++000/000000/00000000+++</paymentReference>
  489. <relationRef>88888888</relationRef>
  490. <status>2</status>
  491. <unsettledInvoices/>
  492. <withAttachment>false</withAttachment>
  493. <yearlyConsumptionEvolution>
  494. <yearlyConsumptionPerEan>
  495. <connectionKey>555555555555555</connectionKey>
  496. <yearlyConsumptions>
  497. <yearlyConsumption>
  498. <timeFrameConsumptions>
  499. <timeFrameConsumption>
  500. <consumption>44639.0266771523</consumption>
  501. <timeFrame>TOTAL_HOUR</timeFrame>
  502. </timeFrameConsumption>
  503. </timeFrameConsumptions>
  504. <year>2017</year>
  505. </yearlyConsumption>
  506. <yearlyConsumption>
  507. <timeFrameConsumptions>
  508. <timeFrameConsumption>
  509. <consumption>5257.2047645253</consumption>
  510. <timeFrame>TOTAL_HOUR</timeFrame>
  511. </timeFrameConsumption>
  512. </timeFrameConsumptions>
  513. <year>2015</year>
  514. </yearlyConsumption>
  515. <yearlyConsumption>
  516. <timeFrameConsumptions>
  517. <timeFrameConsumption>
  518. <consumption>4971.3241391945</consumption>
  519. <timeFrame>TOTAL_HOUR</timeFrame>
  520. </timeFrameConsumption>
  521. </timeFrameConsumptions>
  522. <year>2014</year>
  523. </yearlyConsumption>
  524. </yearlyConsumptions>
  525. </yearlyConsumptionPerEan>
  526. </yearlyConsumptionEvolution>
  527. </BillingInvoice>"""
  528. def xml = new XmlSlurper().parseText(xmlString)
  529. def result = filterMap.collect{ k,v -> xml.'**'.findAll{it.name() == k && it in v}*.parent()*.amount*.text()}.flatten().sum{it as Double}
  530. println result
Success #stdin #stdout 1.92s 2912256KB
stdin
Standard input is empty
stdout
126.99999999999999