fixing a couple of bugs.
This commit is contained in:
@@ -205,5 +205,10 @@
|
|||||||
{:db/ident :transaction/expected-deposit
|
{:db/ident :transaction/expected-deposit
|
||||||
:db/doc "If this transaction is a deposit, the deposit that we anticipated"
|
:db/doc "If this transaction is a deposit, the deposit that we anticipated"
|
||||||
:db/valueType :db.type/ref
|
:db/valueType :db.type/ref
|
||||||
:db/cardinality :db.cardinality/one}]]}})
|
:db/cardinality :db.cardinality/one}]]}
|
||||||
|
:add-refund-type {:txes [[{:db/ident :sales-refund/type
|
||||||
|
:db/doc "The type of refund"
|
||||||
|
:db/valueType :db.type/string
|
||||||
|
:db/cardinality :db.cardinality/one}]]
|
||||||
|
:requires [:add-refunds]}})
|
||||||
|
|
||||||
|
|||||||
@@ -45,10 +45,12 @@
|
|||||||
:invoice/status '[:db/ident]
|
:invoice/status '[:db/ident]
|
||||||
:invoice/import-status '[:db/ident]}] id)
|
:invoice/import-status '[:db/ident]}] id)
|
||||||
credit-invoice? (< (:invoice/total entity) 0.0)]
|
credit-invoice? (< (:invoice/total entity) 0.0)]
|
||||||
(when-not (or (= true (:invoice/exclude-from-ledger entity))
|
(when-not (or
|
||||||
(= :import-status/pending (:db/ident (:invoice/import-status entity)))
|
(not (:invoice/total entity))
|
||||||
(= :invoice-status/voided (:db/ident (:invoice/status entity)))
|
(= true (:invoice/exclude-from-ledger entity))
|
||||||
(dollars-0? (:invoice/total entity)))
|
(= :import-status/pending (:db/ident (:invoice/import-status entity)))
|
||||||
|
(= :invoice-status/voided (:db/ident (:invoice/status entity)))
|
||||||
|
(dollars-0? (:invoice/total entity)))
|
||||||
(remove-nils
|
(remove-nils
|
||||||
{:journal-entry/source "invoice"
|
{:journal-entry/source "invoice"
|
||||||
:journal-entry/client (:db/id (:invoice/client entity))
|
:journal-entry/client (:db/id (:invoice/client entity))
|
||||||
|
|||||||
Reference in New Issue
Block a user