switched from auto pay to scheduled payment
This commit is contained in:
@@ -161,7 +161,9 @@
|
||||
:location default-location
|
||||
:amount total}]}
|
||||
(: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
|
||||
(time/plus date (time/days (d-vendors/terms-for-client-id vendor client-id))))))
|
||||
payment (if (= :invoice-status/paid (:invoice/status invoice))
|
||||
#:invoice-payment {:invoice (:db/id invoice)
|
||||
:amount (:invoice/total invoice)
|
||||
@@ -272,7 +274,6 @@
|
||||
:invoice/client-identifier customer-identifier
|
||||
:invoice/vendor (:db/id matching-vendor)
|
||||
:invoice/invoice-number invoice-number
|
||||
:invoice/automatically-paid-when-due (boolean (automatically-paid-for (:db/id matching-client)))
|
||||
:invoice/total (Double/parseDouble total)
|
||||
:invoice/date (to-date date)
|
||||
:invoice/import-status :import-status/pending
|
||||
@@ -284,7 +285,9 @@
|
||||
:db/id existing-id
|
||||
})
|
||||
(:vendor/terms matching-vendor) (assoc :invoice/due (coerce/to-date
|
||||
(time/plus date (time/days (d-vendors/terms-for-client-id matching-vendor (:db/id matching-client)))))))))
|
||||
(time/plus date (time/days (d-vendors/terms-for-client-id matching-vendor (:db/id matching-client))))))
|
||||
(boolean (automatically-paid-for (:db/id matching-client))) (assoc :invoice/scheduled-payment (coerce/to-date
|
||||
(time/plus date (time/days (d-vendors/terms-for-client-id matching-vendor (:db/id matching-client)))))))))
|
||||
))
|
||||
[]
|
||||
imports)]
|
||||
|
||||
Reference in New Issue
Block a user