add balance report before withdrawal

master
Aaron Johnson 4 years ago
parent 672d89015c
commit 95f3f61cb0

@ -191,7 +191,7 @@ make_deposit() {
} }
make_withdrawal() { make_withdrawal() {
eval "$dbconnect -c \"SELECT id,name FROM account WHERE enabled = true ORDER BY name;\"" eval "$dbconnect -c \"SELECT account.id,account.name,gold FROM balance INNER JOIN account ON account.id = balance.id WHERE account.enabled = true ORDER BY name;\"" #Show balances first
read -p "Enter Account ID: " ID read -p "Enter Account ID: " ID
read -p "Enter amount of gp to withdraw: " amount read -p "Enter amount of gp to withdraw: " amount
tstamp=$(date +%Y-%m-%d\ %H:%M:%S) tstamp=$(date +%Y-%m-%d\ %H:%M:%S)
@ -215,7 +215,6 @@ make_withdrawal() {
bank_transfer() { bank_transfer() {
eval "$dbconnect -c \"SELECT account.id,account.name,gold FROM balance INNER JOIN account ON account.id = balance.id WHERE account.enabled = true ORDER BY name;\"" #Show balances first eval "$dbconnect -c \"SELECT account.id,account.name,gold FROM balance INNER JOIN account ON account.id = balance.id WHERE account.enabled = true ORDER BY name;\"" #Show balances first
read -p "Enter Account ID to transfer $(tput bold)FROM$(tput sgr0): " FROM read -p "Enter Account ID to transfer $(tput bold)FROM$(tput sgr0): " FROM
read -p "Enter Account ID to transfer $(tput bold)TO$(tput sgr0): " TO read -p "Enter Account ID to transfer $(tput bold)TO$(tput sgr0): " TO
read -p "Enter amount of gp to transfer: " amount read -p "Enter amount of gp to transfer: " amount

Loading…
Cancel
Save