Master reconciliation and statement import ama

heu there is some duplicated code in that function... it's doubtful