Changeset 23477


Ignore:
Timestamp:
2014/05/30 18:14:20 (10 years ago)
Author:
pineray
Message:

#2448 typo修正・ソース整形・ソースコメントの改善 for 2.13.3

Location:
branches/version-2_13-dev/data/class
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13-dev/data/class/helper/SC_Helper_DB.php

    r23459 r23477  
    14611461     * SC_Utils_Ex::sfCalcIncTax とどちらか統一したほうが良い 
    14621462     * 
    1463      * @param  integer $price 計算対象の金額 
    1464      * @return integer 税金付与した金額 
    1465      */ 
    1466     public function sfCalcIncTax($price, $tax = null, $tax_rule = null) 
     1463     * @param  int $price 計算対象の金額 
     1464     * @param  int $tax 
     1465     * @param  int $tax_rule 
     1466     * @return int 税金付与した金額 
     1467     */ 
     1468    public static function sfCalcIncTax($price, $tax = null, $tax_rule = null) 
    14671469    { 
    14681470        // 店舗基本情報を取得 
  • branches/version-2_13-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php

    r23394 r23477  
    977977     * 
    978978     * @param  SC_FormParam                   $objFormParam SC_FormParam インスタンス 
    979      * @return アンカーキーの文字列 
     979     * @return string アンカーキーの文字列 
    980980     */ 
    981981    public function getAnchorKey(&$objFormParam) 
     
    10341034     * 
    10351035     * @param  SC_FormParam $objFormParam         SC_FormParam インスタンス 
    1036      * @param  integer      $add_product_class_id 変更商品規格ID 
     1036     * @param  integer      $edit_product_class_id 変更商品規格ID 
    10371037     * @param  integer      $change_no            変更対象 
    10381038     * @return void 
     
    11151115     * 変更対象のデータを上書きする 
    11161116     * 
    1117      * @param  array   $arrShipmentProducts 変更対象配列 
    1118      * @param  array   $arrProductInfo      上書きデータ 
    1119      * @param  integer $shipping_id         配送先ID 
    1120      * @param  array   $no                  変更対象 
     1117     * @param  array    $arrShipmentProducts 変更対象配列 
     1118     * @param  array    $arrProductInfo      上書きデータ 
     1119     * @param  int      $shipping_id         配送先ID 
     1120     * @param  int      $no                  変更対象 
    11211121     * @return void 
    11221122     */ 
     
    11441144        // 配送先が存在する時のみ、商品個数の再設定を行います 
    11451145        if(!SC_Utils_Ex::isBlank($arrShipmentsItems)) { 
     1146            $arrUpdateQuantity = array(); 
    11461147            foreach ($arrShipmentsItems as $arritems) { 
    11471148                foreach ($arritems['shipment_product_class_id'] as $relation_index => $shipment_product_class_id) { 
     
    11511152 
    11521153            $arrProductsClass = $objFormParam->getValue('product_class_id'); 
    1153             $arrProductsQuantity = $objFormParam->getValue('quantity'); 
     1154            $arrQuantity = array(); 
    11541155            foreach ($arrProductsClass as $relation_key => $product_class_id) { 
    1155                 $arrQuantity['quantity'][$relation_key] = $arrUpdateQuantity[$product_class_id]; 
    1156             } 
    1157             $objFormParam->setParam($arrQuantity); 
     1156                $arrQuantity[$relation_key] = isset($arrUpdateQuantity[$product_class_id]) ? $arrUpdateQuantity[$product_class_id] : 0; 
     1157            } 
     1158            $objFormParam->setParam(array('quantity' => $arrQuantity)); 
    11581159        } 
    11591160    } 
     
    11751176                foreach ($arrDeleteKeys as $delete_key) { 
    11761177                    $arrProducts = $objFormParam->getValue($delete_key); 
     1178                    $arrUpdateParams = array(); 
    11771179                    foreach ($arrProducts as $index => $product_info) { 
    11781180                        if ($index != $relation_index) { 
     
    11921194     * @param  SC_FormParam $objFormParam          SC_FormParam インスタンス 
    11931195     * @param  array        $arrShipmentDeleteKeys 削除項目 
    1194      * @param  integer      $delete_shipping_id  削除配送ID 
    1195      * @param  array        $delete_no             削除対象 
    1196      * @return void 
    1197      */ 
    1198     public function deleteShipment(&$objFormParam, $arrShipmentDeletKeys, $delete_shipping_id, $delete_no) 
    1199     { 
    1200             foreach ($arrShipmentDeletKeys as $delete_key) { 
    1201                 $arrShipments = $objFormParam->getValue($delete_key); 
    1202                 foreach ($arrShipments as $shipp_id => $arrKeyData) { 
    1203                     if (empty($arrKeyData)) continue; 
    1204                     foreach ($arrKeyData as $relation_index => $shipment_info) { 
    1205                         if ($relation_index != $delete_no || $shipp_id != $delete_shipping_id) { 
    1206                             $arrUpdateParams[$delete_key][$shipp_id][] = $shipment_info; 
    1207                         } 
     1196     * @param  int          $delete_shipping_id  削除配送ID 
     1197     * @param  int          $delete_no             削除対象 
     1198     * @return array 
     1199     */ 
     1200    public function deleteShipment(&$objFormParam, $arrShipmentDeleteKeys, $delete_shipping_id, $delete_no) 
     1201    { 
     1202        $arrUpdateParams = array(); 
     1203        foreach ($arrShipmentDeleteKeys as $delete_key) { 
     1204            $arrShipments = $objFormParam->getValue($delete_key); 
     1205            foreach ($arrShipments as $shipp_id => $arrKeyData) { 
     1206                if (empty($arrKeyData)) continue; 
     1207                foreach ($arrKeyData as $relation_index => $shipment_info) { 
     1208                    if ($relation_index != $delete_no || $shipp_id != $delete_shipping_id) { 
     1209                        $arrUpdateParams[$delete_key][$shipp_id][] = $shipment_info; 
    12081210                    } 
    12091211                } 
    12101212            } 
    1211             //$objFormParam->setParam($arrUpdateParams); 
    1212             return $arrUpdateParams; 
    1213         } 
     1213        } 
     1214        //$objFormParam->setParam($arrUpdateParams); 
     1215        return $arrUpdateParams; 
     1216    } 
    12141217 
    12151218    /** 
    12161219     * 受注商品一覧側に商品を追加 
    12171220     * 
    1218      * @param  SC_FormParam $objFormParam                    SC_FormParam インスタンス 
    1219      * @param  array        $arrProductClassIds            対象配列の商品規格ID 
    1220      * @param  integer      $indert_product_class_id 追?? 商品規格ID 
    1221      * @param  array        $arrAddProductInfo               追加データ 
    1222      * @return array        $arrAddProducts           更新データ 
     1221     * @param SC_FormParam  $objFormParam               SC_FormParam インスタンス 
     1222     * @param array         $arrProductClassIds        対象配列の商品規格ID 
     1223     * @param int           $insert_product_class_id    追加商品規格ID 
     1224     * @param array         $arrAddProductInfo          追加データ 
     1225     * @return array|null   $arrAddProducts             更新データ 
    12231226     */ 
    12241227    public function checkInsertOrderProducts(&$objFormParam, $arrProductClassIds, $insert_product_class_id, $arrAddProductInfo) 
  • branches/version-2_13-dev/data/class/util/GC_Utils.php

    r23415 r23477  
    254254     * [注釈] - 
    255255     *----------------------------------------------------------------------*/ 
    256     public function gfMakePassword($pwLength) 
     256    public static function gfMakePassword($pwLength) 
    257257    { 
    258258        // 乱数表のシードを決定 
  • branches/version-2_13-dev/data/class/util/SC_Utils.php

    r23463 r23477  
    693693     * @return integer 税金額 
    694694     */ 
    695     public function sfTax($price, $tax, $tax_rule) 
     695    public static function sfTax($price, $tax, $tax_rule) 
    696696    { 
    697697        $real_tax = $tax / 100; 
     
    713713     * @return integer 税金付与した金額 
    714714     */ 
    715     public function sfCalcIncTax($price, $tax, $tax_rule) 
     715    public static function sfCalcIncTax($price, $tax, $tax_rule) 
    716716    { 
    717717        return $price + SC_Utils_Ex::sfTax($price, $tax, $tax_rule); 
     
    723723        $adjust = pow(10 ,$pow-1); 
    724724 
    725         // 整数且つ0なければ桁数指定を行う 
     725        // 整数且つ0なければ桁数指定を行う 
    726726        if (SC_Utils_Ex::sfIsInt($adjust) and $pow > 1) { 
    727727            $ret = (round($value * $adjust)/$adjust); 
     
    741741     * @return int 
    742742     */ 
    743     public function sfPrePoint($price, $point_rate, $rule = POINT_RULE) 
     743    public static function sfPrePoint($price, $point_rate, $rule = POINT_RULE) 
    744744    { 
    745745        $real_point = $point_rate / 100; 
     
    813813    } 
    814814 
    815     /* 配列をキー名ごとの配列に変更する */ 
    816     public function sfSwapArray($array, $isColumnName = true) 
     815    /** 
     816     * 配列をキー名ごとの配列に変更する 
     817     * 
     818     * @param array $array 
     819     * @param bool $isColumnName 
     820     * @return array 
     821     */ 
     822    public static function sfSwapArray($array, $isColumnName = true) 
    817823    { 
    818824        $arrRet = array(); 
     
    837843     * $requires が指定された場合, $requires に含まれるキーの値のみを返す. 
    838844     * 
    839      * @param array 連想配列 
    840      * @param array 必須キーの配列 
     845     * @param array $hash 連想配列 
     846     * @param array $requires 必須キーの配列 
    841847     * @return array 連想配列の値のみの配列 
    842848     */ 
     
    899905    } 
    900906 
    901     // 二回以上繰り返されているスラッシュ[/]を一つに変換する。 
     907    /** 
     908     * 二回以上繰り返されているスラッシュ[/]を一つに変換する。 
     909     * 
     910     * @param string $istr 
     911     * @return string 
     912     */ 
    902913    public function sfRmDupSlash($istr) 
    903914    { 
     
    910921        } else { 
    911922            $str = $istr; 
     923            $head = ''; 
    912924        } 
    913925        $str = preg_replace('|[/]+|', '/', $str); 
Note: See TracChangeset for help on using the changeset viewer.