sourcephile
/
git
/
comptalang.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
2826d87
)
Modif : Filter.Read : test_amount : pas d’unité accepte toutes les unités.
author
Julien Moutinho
<julm+hcompta@autogeree.net>
Sat, 20 Jun 2015 19:31:51 +0000
(21:31 +0200)
committer
Julien Moutinho
<julm+hcompta@autogeree.net>
Sat, 20 Jun 2015 21:16:48 +0000
(23:16 +0200)
lib/Hcompta/Filter/Read.hs
patch
|
blob
|
history
diff --git
a/lib/Hcompta/Filter/Read.hs
b/lib/Hcompta/Filter/Read.hs
index ad2738dc27376e2c595344e9dee33c79b0e93c2a..76e95a1b5443b1c6d482a2f942b98c2f2e75b8b5 100644
(file)
--- a/
lib/Hcompta/Filter/Read.hs
+++ b/
lib/Hcompta/Filter/Read.hs
@@
-315,8
+315,11
@@
test_amount = do
tst <- test_ord
amt <- Amount.Read.amount
return $ Test_Amount
- (tst $ Amount.quantity amt)
- (Test_Unit $ Test_Text_Exact $ Unit.text $ Amount.unit amt)
+ (tst $ Amount.quantity amt) $
+ (Test_Unit $
+ case Unit.text $ Amount.unit amt of
+ unit | Text.null unit -> Test_Text_Any
+ unit -> Test_Text_Exact unit)
test_amount_operator
:: Stream s m Char