Commit 76c8de37 authored by Frank Bergmann's avatar Frank Bergmann

- Currency Update:

  Now generates missing currencies on the fly
parent 1ec819f4
......@@ -158,6 +158,12 @@ ad_proc im_security_update_update_currencies {
# Insert values into the Exchange Rates table
if {"" != $currency_code && "" != $currency_day} {
set currency_exists_p [util_memoize [list db_string currecy_exists "select count(*) from currency_codes where iso = '$currency_code'"]]
if {!$currency_exists_p} {
db_dml new_currency_code "insert into currency_codes (iso, currency_name) values (:currency_code, :currency_code)"
im_permission_flush
}
db_dml delete_entry "
delete from im_exchange_rates
where day = :currency_day::date and
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment