Both if Preview and submit in sales invoice call make_entry method what is the diff between them



If I click “Preview” button the “accounting ledger” button appears when I click it the make entry method fire
and when I click “actions” button the “approve” button (submit the sales invoice) appears when I click it the make entry method fire what is the diff between them
I want to know how the insert in the second button and does not insert in the first button to gl entry
is there a condition in the code that controls the insert??!