Index: anches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php
===================================================================
--- /branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getDelivTimeTest.php	(revision 22206)
+++ 	(revision )
@@ -1,74 +1,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/*
- * This file is part of EC-CUBE
- *
- * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
- *
- * http://www.lockon.co.jp/
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-/**
- * SC_Helper_Purchase::getDelivTime()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getDelivTimeTest extends SC_Helper_Purchase_TestBase {
-
-
-  protected function setUp() {
-    parent::setUp();
-    $this->setUpDelivTime();
-  }
-
-  protected function tearDown() {
-    parent::tearDown();
-  }
-
-  /////////////////////////////////////////
-  public function testGetDelivTime_存在しない配送業者IDを指定した場合_結果が空になる() {
-    $deliv_id = '100'; // 存在しないID
-
-    $this->expected = array();
-    $helper = new SC_Helper_Purchase();
-    $this->actual = $helper->getDelivTime($deliv_id);
-
-    $this->verify('お届け時間');
-  }
-
-  public function testGetDelivTime_存在する配送業者IDを指定した場合_結果が正しい順序で取得できる() {
-    $deliv_id = '1001';
-  
-    $this->expected = array(
-      '1' => '午前',
-      '2' => '午後'
-    );
-
-    $helper = new SC_Helper_Purchase();
-    $this->actual = $helper->getDelivTime($deliv_id);
-    
-    $this->verify('お届け時間');
-  }
-
-  //////////////////////////////////////////
-
-}
-
Index: anches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php
===================================================================
--- /branches/version-2_12-dev/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_getPaymentsTest.php	(revision 22206)
+++ 	(revision )
@@ -1,71 +1,0 @@
-<?php
-
-$HOME = realpath(dirname(__FILE__)) . "/../../../..";
-require_once($HOME . "/tests/class/helper/SC_Helper_Purchase/SC_Helper_Purchase_TestBase.php");
-/*
- * This file is part of EC-CUBE
- *
- * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
- *
- * http://www.lockon.co.jp/
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-/**
- * SC_Helper_Purchase::getPayments()のテストクラス.
- *
- *
- * @author Hiroko Tamagawa
- * @version $Id$
- */
-class SC_Helper_Purchase_getPaymentsTest extends SC_Helper_Purchase_TestBase {
-
-
-  protected function setUp() {
-    parent::setUp();
-    $this->setUpPaymentOptions();
-  }
-
-  protected function tearDown() {
-    parent::tearDown();
-  }
-
-  /////////////////////////////////////////
-  public function testGetPayments_存在しない配送業者IDを指定した場合_結果が空になる() {
-    $deliv_id = '100'; // 存在しないID
-
-    $this->expected = array();
-    $helper = new SC_Helper_Purchase();
-    $this->actual = $helper->getPayments($deliv_id);
-
-    $this->verify('支払方法');
-  }
-
-  public function testGetPayments_存在する配送業者IDを指定した場合_結果が正しい順序で取得できる() {
-    $deliv_id = '1001';
-  
-    $this->expected = array('1002', '1001');
-
-    $helper = new SC_Helper_Purchase();
-    $this->actual = $helper->getPayments($deliv_id);
-    
-    $this->verify('支払方法');
-  }
-
-  //////////////////////////////////////////
-
-}
-
Index: /branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php
===================================================================
--- /branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php	(revision 22553)
+++ /branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php	(revision 22554)
@@ -532,5 +532,5 @@
     function getPaymentsByPrice($total, $deliv_id) {
 
-        $arrPaymentIds = $this->getPayments($deliv_id);
+        $arrPaymentIds = SC_Helper_Delivery_Ex::getPayments($deliv_id);
         if (SC_Utils_Ex::isBlank($arrPaymentIds)) {
             return array();
@@ -654,37 +654,4 @@
 
     /**
-     * 配送業者IDからお届け時間の配列を取得する.
-     *
-     * @param integer $deliv_id 配送業者ID
-     * @return array お届け時間の配列
-     */
-    function getDelivTime($deliv_id) {
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $objQuery->setOrder('time_id');
-        $results = $objQuery->select('time_id, deliv_time',
-                                     'dtb_delivtime',
-                                     'deliv_id = ?', array($deliv_id));
-        $arrDelivTime = array();
-        foreach ($results as $val) {
-            $arrDelivTime[$val['time_id']] = $val['deliv_time'];
-        }
-        return $arrDelivTime;
-    }
-
-    /**
-     * 配送業者ID から, 有効な支払方法IDを取得する.
-     *
-     * @param integer $deliv_id 配送業者ID
-     * @return array 有効な支払方法IDの配列
-     */
-    function getPayments($deliv_id) {
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $objQuery->setOrder('rank');
-        return $objQuery->getCol('payment_id', 'dtb_payment_options',
-                                 'deliv_id = ?',
-                                 array($deliv_id), MDB2_FETCHMODE_ORDERED);
-    }
-
-    /**
      * 配送情報の登録を行う.
      *
Index: /branches/version-2_12-dev/data/class/helper/SC_Helper_Delivery.php
===================================================================
--- /branches/version-2_12-dev/data/class/helper/SC_Helper_Delivery.php	(revision 22553)
+++ /branches/version-2_12-dev/data/class/helper/SC_Helper_Delivery.php	(revision 22554)
@@ -55,25 +55,11 @@
 
         // お届け時間の取得
-        $col = 'deliv_time';
-        $where = 'deliv_id = ? ORDER BY time_id';
-        $table = 'dtb_delivtime';
-        $arrDeliv['deliv_time'] = $objQuery->select($col, $table, $where, array($deliv_id));
+        $arrDeliv['deliv_time'] = $this->getDelivTime($deliv_id);
 
         // 配送料金の取得
-        $col = 'fee';
-        $where = 'deliv_id = ? ORDER BY pref';
-        $table = 'dtb_delivfee';
-        $arrDeliv['fee'] = $objQuery->select($col, $table, $where, array($deliv_id));
+        $arrDeliv['fee'] = $this->getDelivFeeList($deliv_id);
 
         // 支払方法
-        $col = 'payment_id';
-        $where = 'deliv_id = ? ORDER BY rank';
-        $table = 'dtb_payment_options';
-        $arrRet = $objQuery->select($col, $table, $where, array($deliv_id));
-        $arrPaymentIds = array();
-        foreach ($arrRet as $val) {
-            $arrPaymentIds[] = $val['payment_id'];
-        }
-        $arrDeliv['payment_ids'] = $arrPaymentIds;
+        $arrDeliv['payment_ids'] = $this->getPayments($deliv_id);
 
         return $arrDeliv;
@@ -271,3 +257,80 @@
         return SC_Helper_DB_Ex::sfGetIDValueList('dtb_deliv', 'deliv_id', $type);
     }
+
+    /**
+     * 配送業者IDからお届け時間の配列を取得する.
+     *
+     * @param integer $deliv_id 配送業者ID
+     * @return array お届け時間の配列
+     */
+    public static function getDelivTime($deliv_id) {
+        $objQuery =& SC_Query_Ex::getSingletonInstance();
+        $objQuery->setOrder('time_id');
+        $results = $objQuery->select('time_id, deliv_time',
+                                     'dtb_delivtime',
+                                     'deliv_id = ?', array($deliv_id));
+        $arrDelivTime = array();
+        foreach ($results as $val) {
+            $arrDelivTime[$val['time_id']] = $val['deliv_time'];
+        }
+        return $arrDelivTime;
+    }
+
+    /**
+     * 配送業者ID から, 有効な支払方法IDを取得する.
+     *
+     * @param integer $deliv_id 配送業者ID
+     * @return array 有効な支払方法IDの配列
+     */
+    public static function getPayments($deliv_id) {
+        $objQuery =& SC_Query_Ex::getSingletonInstance();
+        $objQuery->setOrder('rank');
+        return $objQuery->getCol('payment_id', 'dtb_payment_options',
+                                 'deliv_id = ?',
+                                 array($deliv_id), MDB2_FETCHMODE_ORDERED);
+    }
+
+    /**
+     * 都道府県から配送料金を取得する.
+     *
+     * @param integer|array $pref_id 都道府県ID 又は都道府県IDの配列
+     * @param integer $deliv_id 配送業者ID
+     * @return string 指定の都道府県, 配送業者の配送料金
+     */
+    public static function getDelivFee($pref_id, $deliv_id = 0) {
+        $objQuery =& SC_Query_Ex::getSingletonInstance();
+        if (!is_array($pref_id)) {
+            $pref_id = array($pref_id);
+        }
+        $sql = <<< __EOS__
+            SELECT T1.fee AS fee
+            FROM dtb_delivfee T1
+                JOIN dtb_deliv T2
+                    ON T1.deliv_id = T2.deliv_id
+            WHERE T1.pref = ?
+                AND T1.deliv_id = ?
+                AND T2.del_flg = 0
+__EOS__;
+        $result = 0;
+        foreach ($pref_id as $pref) {
+            $result += $objQuery->getOne($sql, array($pref, $deliv_id));
+        }
+        return $result;
+    }
+
+    /**
+     * 配送業者ID から, 配送料金の一覧を取得する.
+     *
+     * @param integer $deliv_id 配送業者ID
+     * @return array 配送料金の配列
+     */
+    public static function getDelivFeeList($deliv_id) {
+        $objQuery =& SC_Query_Ex::getSingletonInstance();
+        $objQuery->setOrder('pref');
+        $col = 'fee';
+        $where = 'deliv_id = ?';
+        $table = 'dtb_delivfee';
+        return $objQuery->getCol($col, $table, $where, array($deliv_id),
+                                 MDB2_FETCHMODE_ORDERED);
+    }
 }
Index: /branches/version-2_12-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php
===================================================================
--- /branches/version-2_12-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php	(revision 22553)
+++ /branches/version-2_12-dev/data/class/pages/shopping/LC_Page_Shopping_Payment.php	(revision 22554)
@@ -403,5 +403,5 @@
     function getSelectedDeliv(&$objPurchase, &$objCartSess, $deliv_id) {
         $arrResults = array();
-        $arrResults['arrDelivTime'] = $objPurchase->getDelivTime($deliv_id);
+        $arrResults['arrDelivTime'] = SC_Helper_Delivery_Ex::getDelivTime($deliv_id);
         $total = $objCartSess->getAllProductsTotal($objCartSess->getKey());
         $arrResults['arrPayment'] = $objPurchase->getPaymentsByPrice($total, $deliv_id);
Index: /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Disp.php
===================================================================
--- /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Disp.php	(revision 22543)
+++ /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Disp.php	(revision 22554)
@@ -126,5 +126,5 @@
         $this->arrForm = $objFormParam->getFormParamList();
         $this->arrAllShipping = $objFormParam->getSwapArray(array_merge($this->arrShippingKeys, $this->arrShipmentItemKeys));
-        $this->arrDelivTime = $objPurchase->getDelivTime($objFormParam->getValue('deliv_id'));
+        $this->arrDelivTime = SC_Helper_Delivery_Ex::getDelivTime($objFormParam->getValue('deliv_id'));
         $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
 
Index: /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
===================================================================
--- /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php	(revision 22543)
+++ /branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php	(revision 22554)
@@ -301,5 +301,5 @@
         $this->arrAllShipping = $objFormParam->getSwapArray(array_merge($this->arrShippingKeys, $this->arrShipmentItemKeys));
         $this->top_shipping_id      = array_shift((array_keys($this->arrAllShipping)));
-        $this->arrDelivTime   = $objPurchase->getDelivTime($objFormParam->getValue('deliv_id'));
+        $this->arrDelivTime   = SC_Helper_Delivery_Ex::getDelivTime($objFormParam->getValue('deliv_id'));
         $this->tpl_onload .= $this->getAnchorKey($objFormParam);
         if ($arrValuesBefore['payment_id'])
@@ -770,5 +770,5 @@
         $arrAllShipmentItem = $objFormParam->getSwapArray($this->arrShipmentItemKeys);
 
-        $arrDelivTime = $objPurchase->getDelivTime($objFormParam->getValue('deliv_id'));
+        $arrDelivTime = SC_Helper_Delivery_Ex::getDelivTime($objFormParam->getValue('deliv_id'));
         //商品単価を複数配送にも適応
         $arrShippingValues = array();
Index: /branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_DeliveryInput.php
===================================================================
--- /branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_DeliveryInput.php	(revision 22553)
+++ /branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_DeliveryInput.php	(revision 22554)
@@ -216,8 +216,16 @@
 
         // お届け時間
-        $objFormParam->setParamList($arrDeliv['deliv_time'], 'deliv_time');
+        $deliv_times = array();
+        foreach ($arrDeliv['deliv_time'] as $value) {
+            $deliv_times[]['deliv_time'] = $value;
+        }
+        $objFormParam->setParamList($deliv_times, 'deliv_time');
         unset($arrDeliv['deliv_time']);
         // 配送料金
-        $objFormParam->setParamList($arrDeliv['fee'], 'fee');
+        $deliv_fee = array();
+        foreach ($arrDeliv['fee'] as $value) {
+            $deliv_fee[]['fee'] = $value;
+        }
+        $objFormParam->setParamList($deliv_fee, 'fee');
         unset($arrDeliv['fee']);
         // 支払方法
Index: /branches/version-2_12-dev/data/class/SC_CartSession.php
===================================================================
--- /branches/version-2_12-dev/data/class/SC_CartSession.php	(revision 22553)
+++ /branches/version-2_12-dev/data/class/SC_CartSession.php	(revision 22554)
@@ -636,5 +636,5 @@
             && !SC_Utils_Ex::isBlank($deliv_pref)
             && !SC_Utils_Ex::isBlank($deliv_id)) {
-            $results['deliv_fee'] += $this->sfGetDelivFee($deliv_pref, $deliv_id);
+            $results['deliv_fee'] += SC_Helper_Delivery_Ex::getDelivFee($deliv_pref, $deliv_id);
         }
 
@@ -733,32 +733,3 @@
         return in_array($product_type_id, $this->getKeys());
     }
-
-    /**
-     * 都道府県から配送料金を取得する.
-     *
-     * @param integer|array $pref_id 都道府県ID 又は都道府県IDの配列
-     * @param integer $deliv_id 配送業者ID
-     * @return string 指定の都道府県, 配送業者の配送料金
-     */
-    function sfGetDelivFee($pref_id, $deliv_id = 0) {
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
-        if (!is_array($pref_id)) {
-            $pref_id = array($pref_id);
-        }
-        $sql = <<< __EOS__
-            SELECT T1.fee AS fee
-            FROM dtb_delivfee T1
-                JOIN dtb_deliv T2
-                    ON T1.deliv_id = T2.deliv_id
-            WHERE T1.pref = ?
-                AND T1.deliv_id = ?
-                AND T2.del_flg = 0
-__EOS__;
-        $result = 0;
-        foreach ($pref_id as $pref) {
-            $result += $objQuery->getOne($sql, array($pref, $deliv_id));
-        }
-        return $result;
-    }
-
 }
