Module:Store locations list: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
No edit summary
mNo edit summary
 
(12 intermediate revisions by the same user not shown)
Line 187: Line 187:
     local sellvalue = item['Store sell price'] or ''
     local sellvalue = item['Store sell price'] or ''
     local sellSortValue = 0
     local sellSortValue = 0
mw.log("sellvalue", sellvalue)
mw.log("sell is 1e10", tonumber(sellvalue) == 1e10)


     if not(sellvalue == 1e10) then
     if not(sellvalue =='N/A') and not(tonumber(sellvalue) == 1e10) then
         sellvalue = tonumber(sellvalue)
         sellvalue = tonumber(sellvalue)


Line 209: Line 212:
         sellvalue = 'N/A'
         sellvalue = 'N/A'
     end
     end
mw.log("sellvalue 2", sellvalue)
      
      
     local buyvalue = item['Store buy price'] or ''
     local buyvalue = item['Store buy price'] or ''
     local buySortValue = 0
     local buySortValue = 0
     if not(buyvalue == 'N/A') and not(buyvalue == 1e10) then
 
mw.log("buyvalue", buyvalue)
mw.log("buy is 1e10", tonumber(buyvalue) == 1e10)
 
 
     if not(buyvalue == 'N/A') and not(tonumber(buyvalue) == 1e10) then
         buyvalue = tonumber(buyvalue)
         buyvalue = tonumber(buyvalue)
mw.log("buyvalue 2", buyvalue)
         if buyvalue then
         if buyvalue then
             buySortValue = buyvalue
             buySortValue = buyvalue
Line 226: Line 240:
             --    buyvalue = currencyImg .. buyvalue
             --    buyvalue = currencyImg .. buyvalue
             -- end
             -- end
        else
else
buySortValue = buyvalue
buyvalue = editbtn -- If buyvalue can't be converted to a number it will default to the edit button
            buyvalue = 'N/A' -- If sellvalue can't be converted to a number it will default to the edit button
end
        end
else
    end
buySortValue = buyvalue
buyvalue = 'N/A'
end
      
      
     -- members only?
     -- members only?

Navigation menu