mine problem is: i have customer table tblPurchaseDetails while inserting data in this table same time i need to update in store table i.e tblMasterDetails from from same place also its should check store if it is empty it should just insert item else if it should update value to store by summing store value to current customer value...for example
customer item=100kg rice
store item =50kg
finally store=150kg
if store is empty
then store =100kg