| Author |
Date Determination Problem
|
|
| YukonMama 2004-04-15, 2:30 am |
| I've spent all day on this at work and am getting nowhere. I think I'm missing
something but dang if I can figure it out. Definately a blonde day (and me a
red head).
Here's the problem...
Our accounts receivable account periods are different than the G/L periods for
sales. (someone up in bean counter heaven thought this up) and I have a 2 - 4
day period after the journals are posted that have to go into the next month's
accounts receivable even though they fall into the current months receivable's
range.
Here's what I've got.
Posting date is 03/31/04 - receivables go from 02/29/04 to 04/03/04 so any
sales going into receivables between 04/01/04 and 04/03/04 must have a date
04/04/04 or greater.
Posting date is 04/28/04 - receivables go from 04/04/04 to 05/01/04 so any
sales dated between 04/29/04 and 05/01/04 must have a date of 05/02/04 or
greater.
The program that determines the date to put on the receivables looks for the
current posting date which right now is 04/28/04. Current logic says that if
the date of the sale is greater than the posting date (which on 04/29/04 will
be 04/28/04 because the month is used as a subscript) then automatically put
the 1st of the next month into the receivable date, which as you can see as
above puts it into the wrong receivable period.
So far I've gotten the first senario to work, the 2nd to work, but using the
current date fails, or I get the current date to work and the two above fail.
Logic I've used so far is something like
IF CURR-DATE > CUTOFF-DATE AND
CURR-DATE NOT > RECEIVE-END-DATE
PERFORM COMPUTE-NEW-DATE (which I won't show here as it's working just fine
- it's just that I go there when I don't want to)
ELSE
MOVE CURR-DATE TO RECEIVABLE-DATE
END-IF
I've tried so many convolutions of IF statements I can't remember them all.
Need a fresh pair of eyes and a new brain. Any suggestions?
PS: Moving say the 10th of the next month into the date as a default would
work except the receivable system would hold the data and not post it until
that date which would drive the world crazy.
| |
| Hugh Candlin 2004-04-15, 2:30 am |
|
YukonMama <yukonmama@aol.com> wrote in message news:20040415010225.17623.00000295@mb-m20.aol.com...
> I've spent all day on this at work and am getting nowhere. I think I'm missing
> something but dang if I can figure it out. Definately a blonde day (and me a
> red head).
>
> Here's the problem...
>
> Our accounts receivable account periods are different than the G/L periods for
> sales. (someone up in bean counter heaven thought this up) and I have a 2 - 4
> day period after the journals are posted that have to go into the next month's
> accounts receivable even though they fall into the current months receivable's
> range.
>
> Here's what I've got.
>
> Posting date is 03/31/04 - receivables go from 02/29/04 to 04/03/04 so any
> sales going into receivables between 04/01/04 and 04/03/04 must have a date
> 04/04/04 or greater.
>
> Posting date is 04/28/04 - receivables go from 04/04/04 to 05/01/04 so any
> sales dated between 04/29/04 and 05/01/04 must have a date of 05/02/04 or
> greater.
>
> The program that determines the date to put on the receivables looks for the
> current posting date which right now is 04/28/04. Current logic says that if
> the date of the sale is greater than the posting date (which on 04/29/04 will
> be 04/28/04 because the month is used as a subscript) then automatically put
> the 1st of the next month into the receivable date, which as you can see as
> above puts it into the wrong receivable period.
>
> So far I've gotten the first senario to work, the 2nd to work, but using the
> current date fails, or I get the current date to work and the two above fail.
>
> Logic I've used so far is something like
>
> IF CURR-DATE > CUTOFF-DATE AND
> CURR-DATE NOT > RECEIVE-END-DATE
> PERFORM COMPUTE-NEW-DATE (which I won't show here as it's working just fine
> - it's just that I go there when I don't want to)
> ELSE
> MOVE CURR-DATE TO RECEIVABLE-DATE
> END-IF
>
> I've tried so many convolutions of IF statements I can't remember them all.
>
> Need a fresh pair of eyes and a new brain. Any suggestions?
Would is be acceptable in COMPUTE-NEW-DATE to
COMPUTE RECEIVABLE-DATE = RECEIVE-END-DATE + 1 ??
>
> PS: Moving say the 10th of the next month into the date as a default would
> work except the receivable system would hold the data and not post it until
> that date which would drive the world crazy.
| |
| Robert Jones 2004-04-15, 1:30 pm |
| Top posting only
Are you comparing dates in the yyyymmdd format?
Robert
yukonmama@aol.com (YukonMama) wrote in message news:<20040415010225.17623.00000295@mb-m20.aol.com>...
> I've spent all day on this at work and am getting nowhere. I think I'm missing
> something but dang if I can figure it out. Definately a blonde day (and me a
> red head).
>
> Here's the problem...
>
> Our accounts receivable account periods are different than the G/L periods for
> sales. (someone up in bean counter heaven thought this up) and I have a 2 - 4
> day period after the journals are posted that have to go into the next month's
> accounts receivable even though they fall into the current months receivable's
> range.
>
> Here's what I've got.
>
> Posting date is 03/31/04 - receivables go from 02/29/04 to 04/03/04 so any
> sales going into receivables between 04/01/04 and 04/03/04 must have a date
> 04/04/04 or greater.
>
> Posting date is 04/28/04 - receivables go from 04/04/04 to 05/01/04 so any
> sales dated between 04/29/04 and 05/01/04 must have a date of 05/02/04 or
> greater.
>
> The program that determines the date to put on the receivables looks for the
> current posting date which right now is 04/28/04. Current logic says that if
> the date of the sale is greater than the posting date (which on 04/29/04 will
> be 04/28/04 because the month is used as a subscript) then automatically put
> the 1st of the next month into the receivable date, which as you can see as
> above puts it into the wrong receivable period.
>
> So far I've gotten the first senario to work, the 2nd to work, but using the
> current date fails, or I get the current date to work and the two above fail.
>
> Logic I've used so far is something like
>
> IF CURR-DATE > CUTOFF-DATE AND
> CURR-DATE NOT > RECEIVE-END-DATE
> PERFORM COMPUTE-NEW-DATE (which I won't show here as it's working just fine
> - it's just that I go there when I don't want to)
> ELSE
> MOVE CURR-DATE TO RECEIVABLE-DATE
> END-IF
>
> I've tried so many convolutions of IF statements I can't remember them all.
>
> Need a fresh pair of eyes and a new brain. Any suggestions?
>
> PS: Moving say the 10th of the next month into the date as a default would
> work except the receivable system would hold the data and not post it until
> that date which would drive the world crazy.
| |
| Peter Lacey 2004-04-15, 1:30 pm |
| YukonMama wrote:
> I've spent all day on this at work and am getting nowhere. I think I'm missing
> something but dang if I can figure it out. Definately a blonde day (and me a
> red head).
>
> Here's the problem...
>
> Our accounts receivable account periods are different than the G/L periods for
> sales. (someone up in bean counter heaven thought this up) and I have a 2 - 4
> day period after the journals are posted that have to go into the next month's
> accounts receivable even though they fall into the current months receivable's
> range.
>
It might be just as easy to set up a second calendar and use it. I had a similar
situation where the reporting period didn't match the calendar - in fact, one
month could sometimes be in three periods! - and that was the only permanent
solution.
Peter
| |
| YukonMama 2004-04-15, 9:30 pm |
| >From: rjones0@hotmail.com (Robert Jones)
>Date: 4/15/04 12:15 PM Eastern Daylight Time
>
>Are you comparing dates in the yyyymmdd format?
>
Eyup.
Peter - that 2nd calendar is on the list of things to do if nothing else can be
done. I hate to do it because it's the helpless desk that has to update the
parms that contain all these dang dates.
| |
| YukonMama 2004-04-15, 9:30 pm |
| >From: "Hugh Candlin" no@spam.com
>Date: 4/15/04 1:29 AM Eastern Daylight Time
[color=darkred]
>Would is be acceptable in COMPUTE-NEW-DATE to
>COMPUTE RECEIVABLE-DATE = RECEIVE-END-DATE + 1 ??
Yes - that's basically what the paragraph is doing. It's just that I don't
want to execute it unless I'm in that weird time between posting journals and
the next receivable period.
| |
| Ron S 2004-04-15, 11:30 pm |
| Can you say something like:
compute receive-end-date-plus-one = function date-of-integer
(function integer-of-date (receive-end-date) + 1)
.....
if sales-date > posting-date and
sales-date <= receive-end-date
move receive-end-date-plus-one to sales-date
end-if.
|
|
|
|