diff --git a/bank b/bank index 0479703..17d6439 100755 --- a/bank +++ b/bank @@ -28,9 +28,10 @@ show_menu() { 1. Create Account 2. Deposit 3. Withdrawal -4. Show All Balances -5. Show All Transactions -6. Show Transactions for Account +4. Transfer +5. Show All Balances +6. Show All Transactions +7. Show Transactions for Account 9. Delete Account (!) 0. Quit @@ -52,14 +53,18 @@ show_menu() { make_withdrawal ;; 4) + echo " Transfer Funds" + bank_transfer + ;; + 5) echo " Show All Balances" show_balance ;; - 5) + 6) echo " Show All Transactions" show_transactions_all ;; - 6) + 7) echo " Show Transactions for Account" show_transactions ;; @@ -106,7 +111,7 @@ delete_account() { # DELETE FROM balance WHERE id = (SELECT id FROM account WHERE name = ${name}); # DELETE FROM transaction WHERE account = (SELECT id FROM account WHERE name = ${name}); # DELETE FROM account WHERE name = ${name}; - show_menu + hold_menu } make_deposit() { @@ -161,6 +166,11 @@ make_withdrawal() { # UPDATE balance SET gold = gold - 12.34 WHERE id = (SELECT id FROM account WHERE name = ${name}); } +bank_transfer() { + printf "\n$(tput bold)$(tput setaf 3)This action is not yet supported!\n\n$(tput sgr0)" + hold_menu +} + show_balance() { eval "$dbconnect -c \"SELECT account.id,account.name,gold FROM balance INNER JOIN account ON account.id = balance.id ORDER BY name;\"" hold_menu