That must be happening because on manually entering invoice will trigger your event on which you are verifying for existing invoice, whereas in your automated solution there is no such check added by you, so you need to ass piece of code as mentioned by James.
↧