Click here to Skip to main content
15,911,848 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All There,

Can anyone help me in writing one method code of my project.

I am creating a POS system which runs 24 hours a day with 3 shifts(7AM-3PM,3PM-11PM,11PM-7AM). I want to handle all the sales of each POS operator daily.

I am confused on the sales of third shift. How i can manage third shift sales(coz it is coming in 2 days that is 1 hour of today and 7 hours of tomorrow).
All the POS operators are going to Finance Manager on the end of shift to hand over shift sale to him. Finance Manager has a module where he is receiving money and entering records in one table name Cash with Manager id, User id, date/time and money.

What are best steps to go through all this process. Either i have to make 2 queries to get today 's sales from sales table and today 's paid from Cash table to set balance amount of operator or anything else ???

Kindly help me in finding some easy way to get sale of third shift employees.

Best Wishes
Posted

1 solution

This isn't a question with a single answer, it's closely related to what the company actually does as part of its procedures. If it counts a "day" as Shift 1 start to Shift 1 start (and some do) then it's a different problem to if it counts a day as midnight to midnight, because the basis for all records changes.

I would probably record all information as "ItemID, StaffId, DateTimeSale, Value" and work on reporting as a separate issue: getting info for a shift is a case of checking for a shift start time, plus a shift length.
So if you were using SQL:
SQL
SELECT * FROM myTable WHERE StaffId=1234 AND DateTimeSale BETWEEN '2013-06-15 23:00:00' AND DATEADD(hh, 8, '2013-06-15 23:00:00')
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900