From b8b830f154bf38e32ac8e1fd84bfb2f2d3233035 Mon Sep 17 00:00:00 2001 From: Joe Tretter Date: Fri, 24 Apr 2020 16:27:06 -0500 Subject: [PATCH] FOrmatting and bugfix in loader script --- js/optiTrainer.js | 3 ++- server/quoteDBs/fillBigDB_update.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/optiTrainer.js b/js/optiTrainer.js index 7dc397d..b0ac4f1 100644 --- a/js/optiTrainer.js +++ b/js/optiTrainer.js @@ -42,10 +42,11 @@ let addToOrder=(openType,optionData)=>{ console.log("AddToOrder",openType,optionData); let price=(openType.substr(0,1)==="b")?optionData.ask:optionData.bid; + price=Number(price*100).toLocaleString('en',{minimumFractionDigits: 2, maximumFractionDigits: 2}) costAmount+=(price*100) * ((openType.substr(0,1)==="b")?-1:1); showCostAmount(); - $("#listOrderItems").append(`
  • ${openType} | ${optionData.symbol} | ${price*100}
  • `); + $("#listOrderItems").append(`
  • [X] ${openType} | ${optionData.symbol} | ${price*100}
  • `); } let showCostAmount=_=>{ diff --git a/server/quoteDBs/fillBigDB_update.sh b/server/quoteDBs/fillBigDB_update.sh index 5089812..84e596e 100644 --- a/server/quoteDBs/fillBigDB_update.sh +++ b/server/quoteDBs/fillBigDB_update.sh @@ -9,7 +9,7 @@ while getopts "d" opt; do esac done -find . -name 'quoteStore_202*.sqlite3.gz' | while read db; do +find . -maxdepth 1 -name 'quoteStore_202*.sqlite3.gz' | while read db; do echo unpacking $db gzip -dc $db >/tmp/xx.sqlite3 echo processing...