You are here: Re: work shift class « All PHP « IT news, forums, messages
Re: work shift class

Posted by steve on 09/17/05 08:05

one correction in the getAccounting function starting at:

while (!isset($this->_shiftByDays[$previousShift]))
{
$previousShift = ($previousShift = $dateProperties['wday'] - 1) < 0 ?
6 : $previousShift;
}

darn-it, that cut/copy/paste! that isn't noticed until a shift isn't set on
an entire day...i.e. mon has a shift(s) and wed has a shift(s) and where a
transaction date falls on wed but not w/n a defined shift...the above error
would not look earlier than tues in an endless loop.

it should read:

while (!isset($this->_shiftByDays[$previousShift]))
{
$previousShift = --$previousShift < 0 ? 6 : $previousShift;
}

but anyway...

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация