Add price conversion
This commit is contained in:
@@ -27,4 +27,6 @@ module RibicaConfig
|
|||||||
# larry-price.com/blog/2014/03/18/connecting-to-the-trello-api/
|
# larry-price.com/blog/2014/03/18/connecting-to-the-trello-api/
|
||||||
TRELLO_MEMBER_TOKEN = "(enter token here)"
|
TRELLO_MEMBER_TOKEN = "(enter token here)"
|
||||||
TRELLO_BOARD_NAME = "FqDO1eFL"
|
TRELLO_BOARD_NAME = "FqDO1eFL"
|
||||||
|
|
||||||
|
BAM_TO_EURO_CONVERSION_RATE = 0.51
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,4 +2,12 @@ class Helper
|
|||||||
def self.money(amount)
|
def self.money(amount)
|
||||||
sprintf('%.2f KM', amount.to_f)
|
sprintf('%.2f KM', amount.to_f)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.get_bam_to_euro_conversion_rate
|
||||||
|
RibicaConfig.BAM_TO_EURO_CONVERSION_RATE
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.bam_to_euro(amount)
|
||||||
|
self.get_bam_to_euro_conversion_rate * amount
|
||||||
|
end
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user