When making pos inv or invoice it must group the products

hi just a request
or maybe it can be done that i am unaware off… i am a newbie
when making esp a pos invoice it must group the products
for instance if i scan an item say coke and scan other items and down the line scan coke again it must actually make the qty of coke 2 … this must be done for inv sales orders quotations aswell

this mustnt be two lines it must be one line with qty 2
i know you can add 2 in qty but if you have a long inv the capturer captures as the goods come to him
this save time and paper basically