Problems with firebase stores

hello everything, this may be a long text, I experienced obstacles where I made an absentee application where when the absence has been closed the user will get a sanction or a fine, I tried to make it but I did not succeed because when the absence was closed the user had already received a fine but when the user re-opened the application he again got a fine, I want this to only happen once, I display my block, say If you want another block

send all blocks

do you think this can be done?, if yes I will send the block immediately