Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on creating my report
Message
De
18/08/2003 05:05:24
 
 
À
18/08/2003 04:35:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00820946
Message ID:
00820952
Vues:
20
>i'm creating a report that displays time in and out of all employee. i would like to put a remarks column where it would tell if the employee is tardy or halfday for that day.
>
>if the employee's time in is past 9AM, he is considered late.. and if he comes to the office after lunch, he is considered halfday. however these conditions may change in a year or so.
>
>what should i do to make my program as flexible as possible so that if rules have changed, i do not have to recompile my program again?

Evelyn,

You may want to create a table with 4 fields

DateFrom, DateTo, Hour1, Hour2

DateFrom is eg {{^1900/01/01}
DateTo is originally set to date(9999,12,31)
Hour1 is 09:00
Hour2 is 13:00

Should the rules change this year at say Christmas, then replace {^9999/12/31} with {^2003/12/25}, and add a record with eg ( {^2003/12/26}, {^9999/12/31}, 08:15, 09:15)

For each employee record you have to find which rule applies ( between(date, DateFrom, DateTo) ). This can easily be done with a select sql

Originally you will have one record only
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform