Work

Attendance import and monthly scores

xls from the punch clock, rules the floor already knows, Excel the office can take.

A desk for a plant that already has a punch clock and still does the month in a spreadsheet. Staff upload the xls. The system applies the shift rules the floor already uses. Late, early leave, absence, leave, trip, and a monthly score come out. Python, Django, MySQL. Source delivered with the project.

The job

Punch data was sitting in the clock. HR was still typing it. Shifts were not one start and one end: some people punch three times, some rotate, some do not punch at all. A late of ten minutes is not the same as a late of forty-five. Power cuts and business trips were being marked by hand as full days. The client needed the file in, the rules applied, and a score they could stand behind at month end.

People and shifts

Departments, jobs, and staff numbers live in the admin. Each person has a time section — for example 8:00–12:00 — and a punch count. Shift workers and day workers are flagged. A starting score sits on the record (the plant used 100). Leave is recorded per month, up to five windows. Time sections can be changed in a batch when the factory changes hours.

Import and statistics

An xls from the clock is uploaded as an attendance file, then imported into raw punch records. From there the system builds a daily line per person and section: morning punch, optional mid punch, evening punch. Status is not a single “late” flag. It is the plant’s own buckets: on time; late under 10 / 30 / 45 minutes or more; early leave the same way; absence; short leave; full-day leave; full attendance on a power cut or a trip; two punches counted as a half day. Where the file is wrong, a clerk can enter a manual line. Both kinds stay visible.

HR can filter, preview, and export the month to Excel. Historical scores can be imported. Raw punches can be added or reset in a batch when a file has to be run again.

Monthly score

Attendance points come off the daily status. Rewards and deductions are posted on top — a bonus as a plus, a penalty as a minus. The month total is attendance plus rewards minus deductions. That is the number the office prints.

How it is put together

Django admin is the desk. MySQL holds staff, punches, daily statistics, and scores. The clock stays the clock; we only take its xls. Handover is the repo, the import format, and the rule list so a new time section does not mean a rewrite. If the plant later adds another punch window or another score rule, it is another status on the same daily line.

Get started

Discuss a similar project

Tell us what is in China, what is remote, and what done looks like. We reply by email or WhatsApp.

  • On-site anywhere in China
  • Remote everywhere else
  • 24/7 on-call for incidents