 
 (defn pretty-print-invoice [invoice]
   {"ID" (get invoice "id")
-   "Client" (get invoice "client")
+   "From" (get invoice "from")
+   "To" (get invoice "to")
    "Issue date" (get invoice "issue-date")
    "Due date" (get invoice "due-date")
    "Amount" (format-amount (get invoice "amount") (get invoice "currency"))


(defn options-to-filter [options]
  (fn [invoice]
    (every? #(= (println %) (get options %) (get invoice (name %))) (keys options))))

(def cli-options
  ;; TODO: add clever currency default
  [["-c" "--currency CURRENCY" "Invoice currency"]
   ["-r" "--client CLIENT" "Client"]
   ["-f" "--filename FILENAME" "Attached file"]
   ["-i" "--issue-date ISSUE_DATE" "Issue date"]
   ["-p" "--paid-on PAID_ON" "Paid on"]

(defn create [options arguments]
  (cond
    (not (:currency options)) (exit 1 (error-msg ["-c CURRENCY is required"]))
    (not (:from options)) (exit 1 (error-msg ["--from FROM is required"]))
    (not (:to options)) (exit 1 (error-msg ["--to TO is required"]))
    (not (:amount options)) (exit 1 (error-msg ["-a AMOUNT is required"]))
    (not (:net options)) (exit 1 (error-msg ["-n NET is required"]))
    (not (get arguments 1)) (exit 1 (error-msg ["invoice id is required"])))
