You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The finance update command allows you to amend existing finance rows for cost recovery.
The command line allows you to specify only the fields that have changed, leaving the others intact. In order to check whether a value has been passed, the current logic is used:
new_finance["amount"] = amount if amount else old_finance["amount"]
So when no amount value is passed, amount will be set to None and so this will just end up as:
new_finance["amount"] = old_finance["amount"]
In other words: no change.
Unfortunately the condition also fails if you set amount to be zero. This means it's currently impossible to run a finance update command that sets the amount to zero, for example like this:
rctab sub finance update --finance-id <FIN_ID> --subscription-id <SUB_ID> --amount 0
Occasionally it's useful to set the amount of a finance row to zero, so it'd be useful if this was possible.
The text was updated successfully, but these errors were encountered:
Good catch. Out of curiosity / for the docs, when is it useful to set the finance row to 0? I'd have thought that it would usually be easier to use the finance delete command but I can imagine that there are edge cases.
That's a good question. This arose from a request to move funding that distributed across multiple subscriptions to a single subscription. For the subscriptions where the funding was moved from, my instinct was to set the row to zero... I guess this maintains a clearer audit trail (so the ticket ID is visible in RCTab), but in truth it didn't occur to me to just delete the entire row.
The
finance update
command allows you to amend existing finance rows for cost recovery.The command line allows you to specify only the fields that have changed, leaving the others intact. In order to check whether a value has been passed, the current logic is used:
So when no
amount
value is passed,amount
will be set toNone
and so this will just end up as:In other words: no change.
Unfortunately the condition also fails if you set
amount
to be zero. This means it's currently impossible to run afinance update
command that sets theamount
to zero, for example like this:Occasionally it's useful to set the amount of a finance row to zero, so it'd be useful if this was possible.
The text was updated successfully, but these errors were encountered: