- [FORECAST] 2주 이상 주기 표시 적용에서 시작날짭보다 과거는 제외.
This commit is contained in:
Hyojin Ahn 2026-05-21 09:32:10 -04:00
parent 9e2339e55e
commit 7fc1d826f2
2 changed files with 22 additions and 12 deletions

View File

@ -788,11 +788,15 @@ if ($actionStr == "CUSTOMER") {
$baseDate = strtotime($c_schedulebasic);
$targetDate = strtotime($orderdate);
$diffDays = floor(($targetDate - $baseDate) / 86400);
// 과거 제외
if ($diffDays >= 0) {
$diffWeeks = floor($diffDays / 7);
// n주 간격 체크
if (($diffWeeks % $weekNum) == 0) {
$isScheduleMatch = true;
}
}
}
if (!$isScheduleMatch) {
continue;

View File

@ -268,6 +268,8 @@ if ($c_type_p == 'P') {
$targetDate = strtotime($orderdate);
// 날짜 차이
$diffDays = floor(($targetDate - $baseDate) / 86400);
// 과거 제외
if ($diffDays >= 0) {
$diffWeeks = floor($diffDays / 7);
// n주 간격 체크
if (($diffWeeks % $weekNum) == 0) {
@ -275,6 +277,7 @@ if ($c_type_p == 'P') {
}
}
}
}
if ($isScheduleMatch) {
$qryS_dupQRY = $qryS_dupQRY . $c_uid . ',';
@ -743,6 +746,8 @@ if ($c_type_p == 'P') {
$targetDate = strtotime($orderdate);
// 날짜 차이
$diffDays = floor(($targetDate - $baseDate) / 86400);
// 과거 제외
if ($diffDays >= 0) {
$diffWeeks = floor($diffDays / 7);
// n주 간격 체크
if (($diffWeeks % $weekNum) == 0) {
@ -750,6 +755,7 @@ if ($c_type_p == 'P') {
}
}
}
}
if (!$isScheduleMatch) continue;