add get function in the receipt.sql