stock_in_no_BeforeShow
global $no;
$no++;
$stock_in->no->setvalue($no);
在 Grid 前加入序號
方式2 結合序號與總計
stock_in_BeforeShowRow
global $showrow;
$showrow["no"]++;
$stock_in->no->setvalue($showrow["no"]);
$showrow["total"] += $stock_in->total->getvalue();
Label1_BeforeShow
global $showrow;
$Label1->setvalue($showrow[total]);
global $showrow;
$showrow["no"]++;
$stock_in->no->setvalue($showrow["no"]);
$showrow["total"] += $stock_in->total->getvalue();
Label1_BeforeShow
global $showrow;
$Label1->setvalue($showrow[total]);
總計的做法
計算 Before Show Row Event
global $grid_total;
$grid_total["amount"] += $xxx->yyy->GetValue();
顯示 Label1 Before Event
global $grid_total;
$str = "數量合計:".$grid_total["amount"];
$str .= "含稅合計:".number_format($grid_total["price"]);
$str .= "成本合計:".number_format($grid_total["price_in"]);
$Label1->SetValue($str);
global $grid_total;
$grid_total["amount"] += $xxx->yyy->GetValue();
顯示 Label1 Before Event
global $grid_total;
$str = "數量合計:".$grid_total["amount"];
$str .= "含稅合計:".number_format($grid_total["price"]);
$str .= "成本合計:".number_format($grid_total["price_in"]);
$Label1->SetValue($str);