puchase loss or gain for invoice