Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Some questions about your solution and data. Some data from file2:
What do you want to do when there is not a second date? Also, is it possible to not have a first date? What would you do in that case? Because, your code is (date calculations flawed I think - see next question about the dates): Do you really want to assign $prev_mth_end to both if both are blank? It is August now and your date code is using Today(), but your file 2 data is all for the month of July. I think this might be a problem, as the dates won't pertain to July but instead August. I don't see where you are taking into account for the days from the previous month (June, file 1). For example, a record from file 1 shows 2 days: BIGCO-C MKT 575 L 6/30/13 2The corresponding record from file 2 shows: BIGCO-C MKT 575 L 2013,07,01 2013,07,02Subtracting 2013,07,01 from 2013,07,02 = 1 day? Then, total days be 2 + 1 = 3 in this case? From that, subtracting the 3 free days would give 0 billing days? Are you calculating Demurrage? In reply to Re: How to use 2 files for calculating charges
by Cristoforo
|
|