I used pay two rakat after Magrib (we call it NAFILA but I don't know if this it actual name in Arabic). However, yesterday I had the intention not to pray these two rakat if after magrib the restaurant is opened (mostly because after a few minutes the restaurant can be full). I had the intention to let these two rakat for eating. After the prayer is done, the restaurant was not open, so I stayed in the mosque and prayed the two rakats.
My Question is: Will my prayer be accepted??