Changeset 19864
- Timestamp:
- 2011/01/11 16:06:42 (13 years ago)
- Location:
- branches/version-2_5-dev/data
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/SC_Fpdf.php
r19807 r19864 311 311 $arrRet = $objQuery->select("*", "dtb_order", $where, array($order_id)); 312 312 $this->arrDisp = $arrRet[0]; 313 list($point) = SC_Helper_ DB_Ex::sfGetCustomerPoint($order_id, $arrRet[0]['use_point'], $arrRet[0]['add_point']);313 list($point) = SC_Helper_Customer_Ex::sfGetCustomerPoint($order_id, $arrRet[0]['use_point'], $arrRet[0]['add_point']); 314 314 $this->arrDisp['point'] = $point; 315 315 … … 318 318 $arrRet = SC_Utils_Ex::sfSwapArray($arrRet); 319 319 $this->arrDisp = array_merge($this->arrDisp, $arrRet); 320 #$objFormParam->setParam($arrRet);321 320 322 321 // その他支払い情報を表示 -
branches/version-2_5-dev/data/class/helper/SC_Helper_DB.php
r19860 r19864 434 434 435 435 /** 436 * 会員編集登録処理を行う.437 *438 * @param array $array パラメータの配列439 * @param array $arrRegistColumn 登録するカラムの配列440 * @return void441 */442 function sfEditCustomerData($array, $arrRegistColumn) {443 $objQuery =& SC_Query::getSingletonInstance();444 445 foreach ($arrRegistColumn as $data) {446 if ($data["column"] != "password") {447 if($array[ $data['column'] ] != "") {448 $arrRegist[ $data["column"] ] = $array[ $data["column"] ];449 } else {450 $arrRegist[ $data['column'] ] = NULL;451 }452 }453 }454 if (strlen($array["year"]) > 0 && strlen($array["month"]) > 0 && strlen($array["day"]) > 0) {455 $arrRegist["birth"] = $array["year"] ."/". $array["month"] ."/". $array["day"] ." 00:00:00";456 } else {457 $arrRegist["birth"] = NULL;458 }459 460 //-- パスワードの更新がある場合は暗号化。(更新がない場合はUPDATE文を構成しない)461 if ($array["password"] != DEFAULT_PASSWORD) $arrRegist["password"] = sha1($array["password"] . ":" . AUTH_MAGIC);462 $arrRegist["update_date"] = "NOW()";463 464 //-- 編集登録実行465 $objQuery->update("dtb_customer", $arrRegist, "customer_id = ? ", array($array['customer_id']));466 }467 468 /**469 436 * 受注番号、最終ポイント、加算ポイント、利用ポイントから「オーダー前ポイント」を取得する 470 437 * … … 489 456 } 490 457 491 /** 492 * 注文番号、利用ポイント、加算ポイントから最終ポイントを取得する. 493 * 494 * @param integer $order_id 注文番号 495 * @param integer $use_point 利用ポイント 496 * @param integer $add_point 加算ポイント 497 * @return array 最終ポイントの配列 498 */ 499 function sfGetCustomerPoint($order_id, $use_point, $add_point) { 500 $objQuery =& SC_Query::getSingletonInstance(); 501 $arrRet = $objQuery->select("customer_id", "dtb_order", "order_id = ?", array($order_id)); 502 $customer_id = $arrRet[0]['customer_id']; 503 if ($customer_id != "" && $customer_id >= 1) { 504 if (USE_POINT !== false) { 505 $arrRet = $objQuery->select("point", "dtb_customer", "customer_id = ?", array($customer_id)); 506 $point = $arrRet[0]['point']; 507 $total_point = $arrRet[0]['point'] - $use_point + $add_point; 508 } else { 509 $total_point = 0; 510 $point = 0; 511 } 512 } else { 513 $total_point = ""; 514 $point = ""; 515 } 516 return array($point, $total_point); 517 } 518 519 /** 520 * 顧客番号、利用ポイント、加算ポイントから最終ポイントを取得する. 521 * 522 * @param integer $customer_id 顧客番号 523 * @param integer $use_point 利用ポイント 524 * @param integer $add_point 加算ポイント 525 * @return array 最終ポイントの配列 526 */ 527 function sfGetCustomerPointFromCid($customer_id, $use_point, $add_point) { 528 $objQuery =& SC_Query::getSingletonInstance(); 529 if (USE_POINT !== false) { 530 $arrRet = $objQuery->select("point", "dtb_customer", "customer_id = ?", array($customer_id)); 531 $point = $arrRet[0]['point']; 532 $total_point = $arrRet[0]['point'] - $use_point + $add_point; 533 } else { 534 $total_point = 0; 535 $point = 0; 536 } 537 return array($point, $total_point); 538 } 458 459 539 460 /** 540 461 * カテゴリツリーの取得を行う. -
branches/version-2_5-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php
r19828 r19864 81 81 $objDb = new SC_Helper_DB_Ex(); 82 82 $objDate = new SC_Date(1901); 83 $objCustomerHelper = new SC_Helper_Customer_Ex(); 83 84 $this->arrYear = $objDate->getYear(); // 日付プルダウン設定 84 85 $this->arrMonth = $objDate->getMonth(); … … 201 202 } 202 203 //-- 編集登録 203 $obj Db->sfEditCustomerData($this->arrForm, $arrRegistColumn);204 $objCustomerHelper->sfEditCustomerData($this->arrForm, $arrRegistColumn); 204 205 } 205 206 } -
branches/version-2_5-dev/data/require_classes.php
r19814 r19864 59 59 require_once(CLASS_EX_REALDIR . "helper_extends/SC_Helper_Purchase_Ex.php"); 60 60 require_once(CLASS_EX_REALDIR . "helper_extends/SC_Helper_Plugin_Ex.php"); 61 require_once(CLASS_EX_REALDIR . "helper_extends/SC_Helper_Customer_Ex.php"); 61 62 ?>
Note: See TracChangeset
for help on using the changeset viewer.