Delete account transaction using automation command

Hello :slight_smile:

I found this Good tutorial about discounting any item you want:

the only problem is I want to keep track of that discount
so this is what I did.

but the problem is how about if he/she put 0 on it how can I remove the created account?

Think you need to elaborate.
The tutorial you link to is using order tags not account transactions.
Why are you using account transactions? Can you explain fully the flow and what you want?
You know you can report order tags to track/report the discount given. Not just order tags but almost everything can be reported with custom report templates…

Hello sir I want my discount to be include in my account transactions because I also have a refund so if this happen I can keep track of this easily

every order that I created I wan it to be included in my transaction account name discount

just like this but the problem is if I untagged it the record will remain…

Thank you for the reports suggestion I am also working on it