Báo cáo khi trạng thái đơn hàng hoàn thành mới được hiện trong báo cáo bán hàng hàng ngày

Vào reporstmodel function getDailySales

$myQuery = "SELECT DATE_FORMAT( date,  '%e' ) AS date, SUM( COALESCE( product_tax, 0 ) ) AS tax1, SUM( COALESCE( order_tax, 0 ) ) AS tax2, SUM( COALESCE( grand_total, 0 ) ) AS total, SUM( COALESCE( total_discount, 0 ) ) AS discount, SUM( COALESCE( shipping, 0 ) ) AS shipping
           FROM " . $this->db->dbprefix('sales') . " WHERE sale_status = 'completed' AND ";

Để sale_status = ‘completed’ thì sẽ hiện

Be the first to comment

Leave a Reply

Your email address will not be published.


*