Israel and the Palestinian Authority (PA) have reached an agreement to end a five-month long trade dispute, officials said on Thursday.