Thanks, ldate was missing in the index.
The different commission formulae are for different calculations. 1) is the conversion of percentage to amount and 2) the commission of a trade. And I think indeed that LotAmount does not belong in 2) because it's already contained in the pip cost. So it should cancel out. I'll check that and make it more clear in the manual.