ledger-helpers/gentrans.sh
Christoffer Müller Madsen a6aa3755f9 I will make you pay!
2016-05-09 23:07:05 +02:00

49 lines
722 B
Bash
Executable File

#!/bin/bash
amount=0
date=`date +%Y-%m-%d`
account=""
case $1 in
"fransk" )
payee="Føtex Storcenter Nord Snacks"
amount="10,00"
to="Expenses:Snacks:Franske Hotdogs"
from="Assets:Checking"
;;
"nord" )
payee="${2} Storcenter Nord"
amount="${3}"
to="Expenses:Snacks"
from="Assets:Checking"
;;
"pay" )
payee="${2}"
amount="${3}"
to="Assets:Checking"
from="Assets:Reimbursements:${2}"
;;
"owe" )
payee="${2}"
amount="${3}"
to="Assets:Reimbursements:${2}"
from="Assets:Checking"
;;
"matk" )
payee="Matematisk Kantine"
amount="${2}"
to="Expenses:Snacks:MatKant"
from="Assets:Checking"
;;
esac
echo
echo $date $payee
echo " $to $amount kr"
echo " $from"