#NEWLINE# def _receipt_report( domain , case_id , product_id , amount , days_ago ) : #NEWLINE# #INDENT# from corehq.apps.commtrack.tests import get_single_transfer_block #NEWLINE# from dimagi.utils.parsing import json_format_date #NEWLINE# from corehq.apps.hqcase.utils import submit_case_blocks #NEWLINE# date_string = json_format_date ( ago ( days_ago ) ) #NEWLINE# stock_block = get_single_transfer_block ( src_id = None , dest_id = case_id , product_id = product_id , quantity = amount , date_string = date_string ) #NEWLINE# submit_case_blocks ( stock_block , domain = amount )