Hi Husein,
Each invoice should be a document number.
The system clears vendor/customer position in the document and there should be at least 1 (could be more). Suppose you have payment term to pay 50% now, 50 % in 30 days, so there will be 2 vendor positions in the invoice. If you have to pay the invoice in full you will have 1 vendor position
There is a control in the Vendor Master Data of duplicate invoice, so you will be warned (or rejected) if you try to enter the same invoice twice, this validates vendor/customer, Document Date, Reference.
Hope this helps.
Kind Regards