Ignore:
Timestamp:
2011/11/16 09:49:02 (12 years ago)
Author:
eoogle
Message:

#1451 (new バグ指摘)
dtb_orderの削除フラグが考慮されていなかったのを、
del_flgを見るように追加。
本来は受注削除時にdtb_customerのbuy_times,buy_total,first_buy_date,last_buy_date
なども変更すべき可能性もあるが、ここでは修正対象外としています。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_11-dev/data/class/SC_CustomerList.php

    r21317 r21339  
    289289        if (!isset($this->arrSql['search_buy_product_code'])) $this->arrSql['search_buy_product_code'] = ""; 
    290290        if ( strlen($this->arrSql['search_buy_product_code']) > 0 ) { 
    291             $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_code LIKE ? ))"); 
     291            $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_code LIKE ? ) AND del_flg = 0)"); 
    292292            $search_buyproduct_code = $this->addSearchStr($this->arrSql['search_buy_product_code']); 
    293293            $this->arrVal[] = $search_buyproduct_code; 
     
    297297        if (!isset($this->arrSql['search_buy_product_name'])) $this->arrSql['search_buy_product_name'] = ""; 
    298298        if ( strlen($this->arrSql['search_buy_product_name']) > 0 ) { 
    299             $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_name LIKE ? ))"); 
     299            $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_name LIKE ? ) AND del_flg = 0)"); 
    300300            $search_buyproduct_name = $this->addSearchStr($this->arrSql['search_buy_product_name']); 
    301301            $this->arrVal[] = $search_buyproduct_name; 
     
    310310            // カテゴリで絞込みが可能の場合 
    311311            if($tmp_where != "") { 
    312                 $this->setWhere( " customer_id IN (SELECT distinct customer_id FROM dtb_order WHERE order_id IN (SELECT distinct order_id FROM dtb_order_detail WHERE product_id IN (SELECT product_id FROM dtb_product_categories WHERE ".$tmp_where." ))) "); 
     312                $this->setWhere( " customer_id IN (SELECT distinct customer_id FROM dtb_order WHERE order_id IN (SELECT distinct order_id FROM dtb_order_detail WHERE product_id IN (SELECT product_id FROM dtb_product_categories WHERE ".$tmp_where." ) AND del_flg = 0)) "); 
    313313                $this->arrVal = array_merge((array)$this->arrVal, (array)$tmp_arrval); 
    314314            } 
Note: See TracChangeset for help on using the changeset viewer.