modify receipt merge func