v1.3.9
- [CUSTOMER] accout no rtrim 적용. ERP 에서 Customer 링크에 account no 로 접속 가능하도록 수정.
This commit is contained in:
parent
0bc18c4e13
commit
73567a32d2
|
|
@ -31,6 +31,19 @@ else if ($mode == "update") {
|
|||
|
||||
// User data query
|
||||
if ($mode == "update") {
|
||||
|
||||
// [추가] 포털(ERP)에서 c_uid 없이 c_accountno(= crm.customer.cus_no)로 들어온 경우 c_uid 해석
|
||||
if (trim($c_uid) == "" && isset($c_accountno) && trim($c_accountno) != "") {
|
||||
$accNo = preg_replace('/[^A-Za-z0-9\-]/', '', trim($c_accountno)); // 화이트리스트 sanitize
|
||||
$rowAcc = $jdb->fQuery(
|
||||
"SELECT c_uid FROM tbl_customer WHERE c_accountno = '".addslashes($accNo)."' LIMIT 1",
|
||||
"account lookup error"
|
||||
);
|
||||
if (!empty($rowAcc['c_uid'])) {
|
||||
$c_uid = $rowAcc['c_uid'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($c_uid == "") {
|
||||
$msg = "Invalid data. Please try again.";
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ class erpCustomerMapper
|
|||
return self::datetime($value);
|
||||
|
||||
default:
|
||||
return $value;
|
||||
return ($value === null) ? null : rtrim((string)$value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class erpDailyOrderMapper
|
|||
"cdoExternalDriverId" => $after['d_druid'] ?? null,
|
||||
"cdoExternalCreatedBy" => $after['d_createruid'] ?? null,
|
||||
"cdoExternalUpdatedBy" => $after['d_driveruid'] ?? null,
|
||||
"cdoCustomerNo" => $after['d_accountno'] ?? null,
|
||||
"cdoCustomerNo" => isset($after['d_accountno']) ? rtrim($after['d_accountno']) : null,
|
||||
"cdoPaymentType" => $after['d_paymenttype'] ?? null,
|
||||
"cdoCycle" => $after['d_cycle'] ?? null,
|
||||
"cdoRate" => isset($after['d_rate']) ? (float)$after['d_rate'] : null,
|
||||
|
|
|
|||
Loading…
Reference in New Issue