I was hired last month with major retail company as stocker. During my struggle with using their machine, I bumped on the glass door. The damage was minor, and I didn't feel to report the incidence. Yesterday, they terminated my employement saying that I am not honest person. They also told me that I was not productive enough to stay with company. I requested second chance, but they made me write resignation letter so that I can be eligible to seek employement within the same company in the future. Do you think what they did to me was right? Is this legal procedure?

Please advise..