Re: Process of creating invoices requiring human thought!
| From: | Jon Anderson | Date: | Tue, 28 Nov 2006 20:21:32 +0000 |
| Subject: | Re: Process of creating invoices requiring human thought! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245246@lists.php.net to get a copy of this message | ||
James Nunnerley wrote:
Can anyone see an easy way of putting that sort of “human thinking” into a script? Any guidance would be gratefully received… You could include a "fuzz" factor that is acceptable to your application. You could also provide a "nicer" fuzz factor to people who don't use up all the hours in other time periods.E.g. (pseudo-code, time represented in seconds) $fuzz = 1800; if ($client['end']-$fuzz < $timePeriod['start']) // freebie or for the unused time thing: if ($client['end']-($fuzz+$unused) < $timePeriod['start']) // freebie Of course you can probably think of dozens of variations on that theme, but you get the idea. jon