i have a stupid question but please if someone can help me
i am creating a sales and inventory management system in which i have 7 tables purchase, product, balance , sale,exchange, return to company, expense .The 6 tables are linked through their IDs with 1 main table "balance".
i have used portal tools on different layouts but all the data fields is in balance table i have because of that stock management is easily done but now i have some problems
first off all my system automatically calculate profit and subtract the expenses from it and show me the amount i have earned . first month it was working properly but when the next month started my system start adding the whole profit from start and calculating the final profit but i want only month wise profit what will be the solution.
the second issue is that i have used all the portal tools for sales ,purchase, exchange, expense.but if someone come to exchange a product and i change the product name and quantity in portal tool the whole bill amount is changed but i only want the difference amount b/w previous bill and new bill but when i edit the previous sale its amount became the amount of new bill and i cant get the difference amount
please help me in these 2 issues