Editing the printReceipt function