make release 0.1
This commit is contained in:
parent
cd8bf76983
commit
3b073d8737
|
|
@ -8,7 +8,7 @@ bookkeeper <action> <accounts file> <transactions file>
|
||||||
action can be one of the following:
|
action can be one of the following:
|
||||||
- check : checks data
|
- check : checks data
|
||||||
- balance : creates a balance sheet on STDOUT (Format: PDF)
|
- balance : creates a balance sheet on STDOUT (Format: PDF)
|
||||||
- journal : creates a journal on STDOUT (Format: Markdown)
|
- journal : creates a journal on STDOUT (Format: Text)
|
||||||
- mwst1 : create VAT report (1st to 4th quarter)
|
- mwst1 : create VAT report (1st to 4th quarter)
|
||||||
mwst2 on STDOUT
|
mwst2 on STDOUT
|
||||||
mwst3
|
mwst3
|
||||||
|
|
|
||||||
|
|
@ -728,33 +728,40 @@ func usage() {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func readData(accountdatafile string, transactiondatafile string) {
|
||||||
|
readAccountData(accountdatafile)
|
||||||
|
readTransactionData(transactiondatafile)
|
||||||
|
profit = calculateProfit()
|
||||||
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if len(os.Args) != 4 {
|
if len(os.Args) != 4 {
|
||||||
usage()
|
usage()
|
||||||
}
|
}
|
||||||
|
|
||||||
readAccountData(os.Args[2])
|
|
||||||
readTransactionData(os.Args[3])
|
|
||||||
profit = calculateProfit()
|
|
||||||
|
|
||||||
//fmt.Fprintf(os.Stderr,"accounts: %#v\n", accounts)
|
//fmt.Fprintf(os.Stderr,"accounts: %#v\n", accounts)
|
||||||
//fmt.Fprintf(os.Stderr,"transactions: %#v\n", transactions)
|
//fmt.Fprintf(os.Stderr,"transactions: %#v\n", transactions)
|
||||||
//fmt.Fprintf(os.Stderr,"account_balance: %#v\n", account_balance)
|
//fmt.Fprintf(os.Stderr,"account_balance: %#v\n", account_balance)
|
||||||
|
|
||||||
switch action := os.Args[1]; action {
|
switch action := os.Args[1]; action {
|
||||||
case "check":
|
case "check":
|
||||||
fmt.Fprintln(os.Stderr, "Check Data")
|
fmt.Fprintln(os.Stderr, "INFO: Data is checked by reading it...")
|
||||||
|
readData(os.Args[2], os.Args[3])
|
||||||
case "balance":
|
case "balance":
|
||||||
fmt.Fprintln(os.Stderr, "INFO: Create Balance Sheet")
|
fmt.Fprintln(os.Stderr, "INFO: Create Balance Sheet")
|
||||||
|
readData(os.Args[2], os.Args[3])
|
||||||
createBalanceSheet()
|
createBalanceSheet()
|
||||||
case "journal":
|
case "journal":
|
||||||
fmt.Fprintln(os.Stderr, "INFO: Create Journal")
|
fmt.Fprintln(os.Stderr, "INFO: Create Journal")
|
||||||
|
readData(os.Args[2], os.Args[3])
|
||||||
outputJournal()
|
outputJournal()
|
||||||
case "mwst1", "mwst2", "mwst3", "mwst4":
|
case "mwst1", "mwst2", "mwst3", "mwst4":
|
||||||
fmt.Fprintln(os.Stderr, "INFO: Create Mwst Quarterly Report")
|
fmt.Fprintln(os.Stderr, "INFO: Create Mwst Quarterly Report")
|
||||||
|
readData(os.Args[2], os.Args[3])
|
||||||
outputMwst(action)
|
outputMwst(action)
|
||||||
case "new_year":
|
case "new_year":
|
||||||
fmt.Fprintln(os.Stderr, "INFO: Create New Year")
|
fmt.Fprintln(os.Stderr, "INFO: Create New Year")
|
||||||
|
readData(os.Args[2], os.Args[3])
|
||||||
outputNewYear()
|
outputNewYear()
|
||||||
default:
|
default:
|
||||||
usage()
|
usage()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue