mirror of
https://github.com/mruwnik/invoices.git
synced 2025-06-08 13:24:43 +02:00
Per invoice seller overrides
This commit is contained in:
parent
3c4974797e
commit
9fef8fa107
@ -53,6 +53,7 @@ Each invoice can have the following keys:
|
||||
* :items - a list of items to be paid for
|
||||
* :imap - (optional) email credentials. These are needed if a confirmation email is to be sent
|
||||
* :callbacks - (optional) a list of commands to be called with the resulting pdf file
|
||||
* :seller - (optional) invoice specific overrides for the seller object
|
||||
|
||||
### Buyer
|
||||
|
||||
|
@ -38,10 +38,11 @@
|
||||
|
||||
(defn prepare-invoice [{seller :seller font :font-path} month worklogs invoice]
|
||||
(-> invoice
|
||||
(assoc :seller seller)
|
||||
(update :seller (partial merge seller))
|
||||
(assoc :font-path font)
|
||||
(calc-prices worklogs)))
|
||||
|
||||
|
||||
(defn process-invoices [{invoices :invoices :as config} month worklogs]
|
||||
(let [invoices (map (partial prepare-invoice config month worklogs) invoices)]
|
||||
(doseq [[i invoice] (map-indexed vector invoices)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user