"공장장 이경묵", "date" => $formattedDate),
// array("name" => "대표 소현철", "date" => $formattedDate),
// // 더 많은 결재권자가 있을 수 있음...
// );
// }
// if($al_part=='지원파트')
// {
// $approvals = array(
// array("name" => "이사 최장중", "date" => $formattedDate),
// array("name" => "대표 소현철", "date" => $formattedDate),
// // 더 많은 결재권자가 있을 수 있음...
// );
// }
// }
// else
// {
$approver_ids = explode('!', $e_confirm_id);
$approver_details = explode('!', $e_confirm);
$approvals = array();
foreach($approver_ids as $index => $id) {
if (isset($approver_details[$index])) {
// Use regex to match the pattern (name title date time)
// The pattern looks for any character until it hits a series of digits that resemble a date followed by a time
preg_match("/^(.+ \d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})$/", $approver_details[$index], $matches);
// Ensure that the full pattern and the two capturing groups are present
if (count($matches) === 3) {
$nameWithTitle = $matches[1]; // This is the name and title
$time = $matches[2]; // This is the time
$date = substr($nameWithTitle, -10); // Extract date from the end of the 'nameWithTitle' string
$nameWithTitle = trim(str_replace($date, '', $nameWithTitle)); // Remove the date from the 'nameWithTitle' to get just the name and title
$formattedDate = date("m/d H:i:s", strtotime("$date $time")); // Combining date and time
$approvals[] = array("name" => $nameWithTitle, "date" => $formattedDate);
}
}
}
// // Now $approvals contains the necessary details
// foreach ($approvals as $approval) {
// echo "Approver: " . $approval['name'] . ", Date: " . $approval['date'] . "
";
// }
// }
// 금액이 10만원 미만이고 신규작성이 아닐 경우 결재생략 표시
$suppliercost_numeric = str_replace(',', '', $suppliercost);
$show_skip_approval = ($mode != '' && $mode != 'copy' && $suppliercost_numeric < 100000);
if($status === 'end' and ($e_confirm !=='' && $e_confirm !== null) )
{
?>
}
else
{
?>
} ?>