added sale and purchase orders, added checks