def map_exact2foreign_invoice_numbers(self, exact_invoice_numbers=None):
<EOL>if exact_invoice_numbers is None:<EOL><INDENT>ret = self.filter(select='<STR_LIT>')<EOL>return dict((i['<STR_LIT>'], i['<STR_LIT>']) for i in ret)<EOL><DEDENT>exact_to_foreign_map = {}<EOL>exact_invoice_numbers = list(set(exact_invoice_numbers))  <EOL>for offset in range(<NUM_LIT:0>, len(exact_invoice_numbers), <NUM_LIT>):<EOL><INDENT>batch = exact_invoice_numbers[offset:(offset + <NUM_LIT>)]<EOL>filter_ = '<STR_LIT>'.join(<EOL>'<STR_LIT>' % (i,) for i in batch)<EOL>assert filter_  <EOL>ret = self.filter(filter=filter_, select='<STR_LIT>')<EOL>exact_to_foreign_map.update(<EOL>dict((i['<STR_LIT>'], i['<STR_LIT>']) for i in ret))<EOL><DEDENT>for exact_invoice_number in exact_invoice_numbers:<EOL><INDENT>if exact_invoice_number not in exact_to_foreign_map:<EOL><INDENT>exact_to_foreign_map[exact_invoice_number] = None<EOL><DEDENT><DEDENT>return exact_to_foreign_map<EOL>
Optionally supply a list of ExactOnline invoice numbers.

Returns a dictionary of ExactOnline invoice numbers to foreign
(YourRef) invoice numbers.