aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dawn.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/dawn.sql')
-rw-r--r--sql/dawn.sql4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index a7e8e277..30a95e96 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -391,8 +391,8 @@ ELSE
SELECT indexfactor, cumulativeloss INTO factor, cum_loss
FROM index_version WHERE redindexcode=NEW.security_id;
UPDATE cds
- SET attach=100*LEAST(GREATEST((NEW.orig_attach - cum_loss)/factor, 0), 1),
- detach=100*LEAST(GREATEST((NEW.orig_detach - cum_loss)/factor, 0), 1)
+ SET attach=factor*LEAST(GREATEST((NEW.orig_attach - cum_loss)/factor, 0), 1),
+ detach=factor*LEAST(GREATEST((NEW.orig_detach - cum_loss)/factor, 0), 1)
WHERE id=NEW.id;
RETURN NEW;
END IF;