How do I make a discount code that takes off the grand total using a procedure and a parameter?

Hey, I'm back! I need some help trying to create discount codes that take 15% off of the grand total. The catch is that I must use a procedure and a parameter which I am bad at using. Help would be appreciated, and visual representations help a lot! Here is what I have currently:

First of all you have to choice the procedure , do or result (here the docs) . One calls a sequence to run the other returns also a result.

In your procedure you want to send a discount price but you select a list of codes.
Think about what you want to do.
If you work with text don't use math equal but the text block for comparison .
You get a value from tinyDb, it's a good think to save it inside a variable to manage all the operations

If you searched the community you would have found

1 Like

Here are two very nice blocks for you

blocks (1)

A little math for you.
You can take 15% off a number by multiplying it by 0.85, which is (1 - 0.15).

A cherry on the pie for you.
In case you have trouble building the procedure, here is a speed run video for you:
speed run

This one you have to do yourself.

1 Like