Thêm phần shipping vào chỗ LỢI NHUẬN/CHI PHÍ HÔM NAY

Trong Reports_model : public function getShipping($date, $warehouse_id = NULL, $year = NULL, $month = NULL) { $sdate = $date.’ 00:00:00′; $edate = $date.’ 23:59:59′; $this->db->select(‘SUM( COALESCE( shipping, 0 ) ) AS shipping’, FALSE); if ($date) { $this->db->where(‘date >=’, $sdate)->where(‘date <=’, $edate); } elseif ($month) { $this->load->helper(‘date’); $last_day = days_in_month($month, $year); […]