summaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/config.go b/config.go
index 5f84da1..db947de 100644
--- a/config.go
+++ b/config.go
@@ -31,6 +31,7 @@ type Config struct {
Bankname string //`toml:"bankname"`
Iban string //`toml:"iban"`
Bic string //`toml:"bic"`
+ CSign string //`toml:"csign"`
Ust float64 //`toml:"ust"`
}
@@ -89,7 +90,7 @@ func makeNewTOML(gibts bool) {
n := ""
file, err := homedir.Expand("~/.mywork.db")
checkErr(err)
- config = Config{file, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n,0.0}
+ config = Config{file, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n, n,0.0}
}
//fmt.Println("Whats Your Namecount\n")
database := getNewInterInput("DB File Path: ", config.Database, nli)
@@ -104,6 +105,7 @@ func makeNewTOML(gibts bool) {
mobile := getNewInterInput("Mobile number: ", config.Mobile, nli)
mail := getNewInterInput("Email: ", config.Mail, nli)
url := getNewInterInput("URL: ", config.Url, nli)
+ curr := getNewInterInput("CurrencySymbol: ", config.CSign, nli)
taxid := getNewInterInput("Tax ID: ", config.Taxid, nli)
uid := getNewInterInput("UID: ", config.Uid, nli)
var ust float64
@@ -111,8 +113,8 @@ func makeNewTOML(gibts bool) {
uststr := getNewInterInput("USt %: ", fmt.Sprint(config.Ust), nli)
ust, err = strconv.ParseFloat(uststr, 64)
if err != nil {
- //fmt.Println(nli,uststr, boldRed("can not be Parsed as a Float."), "Try a sh ape of X.X")
- fmt.Println(nli,uststr, "can not be Parsed as a Float.", "Try a sh ape of X.X")
+ //fmt.Println(nli,uststr, boldRed("can not be Parsed as a Float."), "Try a shape of X.X")
+ fmt.Println(nli,uststr, "can not be Parsed as a Float.", "Try a shape of X.X")
} else {
break
}
@@ -123,7 +125,7 @@ func makeNewTOML(gibts bool) {
iban := getNewInterInput("IBAN: ", config.Iban, nli)
bic := getNewInterInput("BIC: ", config.Bic, nli)
- conf := Config{database, folder, prefix, name, street, zip, city, country, telefon, mobile, mail, url, taxid, uid, bankacc, banklz, bankname, iban, bic, ust}
+ conf := Config{database, folder, prefix, name, street, zip, city, country, telefon, mobile, mail, url, taxid, uid, bankacc, banklz, bankname, iban, bic, curr, ust}
buf := new(bytes.Buffer)
err = toml.NewEncoder(buf).Encode(conf)