fix # #2 #3 #4 #6 #8 #9 #11 #12 and more imp for invoice payment