Simple excel invoice fix
This commit is contained in:
@@ -164,13 +164,13 @@
|
|||||||
(:db/id (d-vendors/account-for-client-id vendor client-id)))
|
(:db/id (d-vendors/account-for-client-id vendor client-id)))
|
||||||
:location default-location
|
:location default-location
|
||||||
:amount total}]}
|
:amount total}]}
|
||||||
(:vendor/terms vendor) (assoc :invoice/due (coerce/to-date
|
(:vendor/terms vendor) (assoc :invoice/due (coerce/to-date
|
||||||
(time/plus date (time/days (d-vendors/terms-for-client-id vendor client-id)))))
|
(time/plus date (time/days (d-vendors/terms-for-client-id vendor client-id)))))
|
||||||
automatically-paid-when-due (assoc :invoice/scheduled-payment (coerce/to-date
|
automatically-paid-when-due (assoc :invoice/scheduled-payment (coerce/to-date
|
||||||
(time/plus date (time/days (d-vendors/terms-for-client-id vendor client-id)))))
|
(time/plus date (time/days (d-vendors/terms-for-client-id vendor client-id)))))
|
||||||
schedule-payment-dom (assoc :invoice/scheduled-payment (coerce/to-date
|
schedule-payment-dom (assoc :invoice/scheduled-payment (coerce/to-date
|
||||||
(next-dom date schedule-payment-dom)
|
(next-dom date schedule-payment-dom)
|
||||||
)))
|
)))
|
||||||
payment (if (= :invoice-status/paid (:invoice/status invoice))
|
payment (if (= :invoice-status/paid (:invoice/status invoice))
|
||||||
#:invoice-payment {:invoice (:db/id invoice)
|
#:invoice-payment {:invoice (:db/id invoice)
|
||||||
:amount (:invoice/total invoice)
|
:amount (:invoice/total invoice)
|
||||||
@@ -182,10 +182,9 @@
|
|||||||
:status :payment-status/cleared
|
:status :payment-status/cleared
|
||||||
:date (:invoice/date invoice)})}
|
:date (:invoice/date invoice)})}
|
||||||
)]
|
)]
|
||||||
[[:propose-invoice invoice] payment])))
|
[[:propose-invoice (remove-nils invoice)]
|
||||||
(filter identity)
|
(some-> payment remove-nils)])))
|
||||||
(map remove-nils)
|
(filter identity)))
|
||||||
))
|
|
||||||
|
|
||||||
|
|
||||||
(defn match-vendor [vendor-code forced-vendor]
|
(defn match-vendor [vendor-code forced-vendor]
|
||||||
|
|||||||
Reference in New Issue
Block a user