I'm guessing if will be better to setup a kind of api for this calls so no need to be repeating code as this is the same function that we use to open cashbox from not gui interface, and latter you have been repeated the print receipt function. 

What do you think about this?