def updateEventRegistrations(request):
if not (request.method == '<STR_LIT:POST>' and request.POST.get('<STR_LIT>')):<EOL><INDENT>return JsonResponse({})<EOL><DEDENT>invoiceItems = InvoiceItem.objects.filter(**{'<STR_LIT>': request.POST.get('<STR_LIT>')})<EOL>outRegs = {}<EOL>for option in invoiceItems:<EOL><INDENT>outRegs[str(option.id)] = option.__str__()<EOL><DEDENT>return JsonResponse({<EOL>'<STR_LIT>': outRegs,<EOL>})<EOL>
This function handles the filtering of available eventregistration-related
invoice items and is used on the revenue reporting form.