Ignore:
Timestamp:
2013/08/29 17:11:06 (11 years ago)
Author:
m_uehara
Message:

#2323
・税金設定の適用日の日付チェックを修正
・受注編集の税率に数値チェックを追加
・カートの税率取得処理を修正
・税規約IDのエラーメッセージ表示

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_13_0/data/class/helper/SC_Helper_TaxRule.php

    r23126 r23157  
    168168            $table = 'dtb_tax_rule'; 
    169169            $cols = '*'; 
    170             $where = '((product_id = 0 OR product_id = ?)' 
    171                         . ' OR (product_class_id = 0 OR product_class_id = ?))' 
    172                         . ' AND (pref_id = 0 OR pref_id = ?)' 
    173                         . ' AND (country_id = 0 OR country_id = ?)' 
    174                         . ' AND apply_date < CURRENT_TIMESTAMP' 
    175                         . ' AND del_flg = 0'; 
    176  
    177             $arrVal = array($product_id, $product_class_id, $pref_id, $country_id); 
     170             
     171            // 商品税率有無設定により分岐 
     172            if(OPTION_PRODUCT_TAX_RULE == 1) { 
     173                $where = '((product_id = 0 OR product_id = ?)' 
     174                            . ' OR (product_class_id = 0 OR product_class_id = ?))' 
     175                            . ' AND (pref_id = 0 OR pref_id = ?)' 
     176                            . ' AND (country_id = 0 OR country_id = ?)' 
     177                            . ' AND apply_date < CURRENT_TIMESTAMP' 
     178                            . ' AND del_flg = 0'; 
     179                $arrVal = array($product_id, $product_class_id, $pref_id, $country_id); 
     180            } else { 
     181                $where = '     product_id = 0 ' 
     182                       . ' AND product_class_id = 0 ' 
     183                       . ' AND (pref_id = 0 OR pref_id = ?)' 
     184                       . ' AND (country_id = 0 OR country_id = ?)' 
     185                       . ' AND apply_date < CURRENT_TIMESTAMP' 
     186                       . ' AND del_flg = 0'; 
     187                $arrVal = array($pref_id, $country_id); 
     188            } 
     189 
    178190            $order = 'apply_date DESC'; 
    179191            $objQuery->setOrder($order); 
Note: See TracChangeset for help on using the changeset viewer.