Sale Summary By Days
"; switch($zone){ case "ALL";{ $SqlView = "ts.zone=tg.zone"; $SqlView3 = "ts.zone"; break; } default:{ $SqlView = "ts.area = tg.area"; $SqlView2 = "and ts.zone='$zone'"; $SqlView3 = "ts.area"; break; } } switch($view){ case "Qty";{ $Sview = "qty_ctn"; $Tview = "TTG"; $tbl = "transale"; //$ni = "and channel in('CA','CR','MT')"; $ni = "and channel in($list_channel)"; $aView = "ts.channel"; break; } case "Amount";{ if($vat=="on"){ $Sview = "(orderamount*100/107)"; $Tview = "(SP01*100/107)"; }else{ $Sview = "orderamount"; $Tview = "SP01"; } $tbl = "tranhead"; //$ni = "and ordertype in('CA','CR','MT')"; $ni = "and ordertype in($list_channel)"; $aView = "ts.ordertype"; break; } } switch($zone){ case "ALL";{ $ct=0; $list_area = array('B','C','E','N','N/E','S','IDS','MT'); $list_s = "'B','C','E','N','N/E','S','IDS','MT'"; for($i==0;$i".$row[$b]."
Total
Percent To Target (View : $view)
"; echo "จำนวนวันทำงานไปแล้ว [$cDay] วัน
"; $lineHead2 = "".$row2[$b2]."
Total