mirror of
https://github.com/ash-project/ash_double_entry.git
synced 2024-09-19 13:03:19 +12:00
fix: use a + -b
, instead of a - b
(which is not supported by our AshPostgresExtension)
This commit is contained in:
parent
926260e077
commit
ac8feda9ea
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ defmodule AshDoubleEntry.Balance.Changes.AdjustBalance do
|
|||
balance:
|
||||
expr(
|
||||
if account_id == ^changeset.arguments.from_account_id do
|
||||
^atomic_ref(:balance) - ^amount_delta
|
||||
^atomic_ref(:balance) + -(^amount_delta)
|
||||
else
|
||||
^atomic_ref(:balance) + ^amount_delta
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue