| BillID |
状态 |
收货人 |
货币 |
应收金额 |
实收金额 |
已找赎 |
下单日期 |
操作 |
$bgcolor = "#ffffff";
$i = 0;
while(($rows=$db_fetch_array($result)) && $i ++ < $lineperpage){
$billid = intval($rows['billid']);
$userid = $rows['userid'];
$status = $rows['status'];
$directoryid = $rows['directoryid'];
$paymentid = $rows['paymentid'];
$shipmentid = $rows['shipmentid'];
$currencyid = $rows['currencyid'];
$dateorder = substr($rows['dateorder'],0,10);
$total = sprintf("%.2f",$rows['total']);
$amount = sprintf("%.2f",$rows['amount']);
$income = sprintf("%.2f",$rows['income']);
$change = sprintf("%.2f",$rows['change']);
$qry_string = "SELECT realname FROM billcontact WHERE billid=$billid AND directoryid=$directoryid";
$result1 = $db_query($qry_string, $mySQL_ID) or mysql_die();
$row1 = $db_fetch_array($result1);
$realname = $row1[0];
if($bgcolor == "#ffffff")
$bgcolor = "#eeeeee";
else
$bgcolor = "#ffffff";
$sta_str = billstatus($status);
$payment = $array_payment["$paymentid"];
$currency = $array_currency["$currencyid"][1];
$shipment = $array_shipment["$shipmentid"];
if($status == 0) $actstr = "取消订单打回购物车";
else if(($status & 0xF800) == 0x0800) $actstr = "到货确认";
else $actstr = "";
echo "
| $billid |
$sta_str |
$realname |
$currency |
$total |
$income |
$change |
$dateorder |
察看 $actstr |
";
}
?>
$qry_string = "SELECT COUNT(*) FROM bill WHERE userid=$ss_userid";
$result = $db_query($qry_string, $mySQL_ID) or mysql_die();
$row=$db_fetch_array($result);
$billsum = $row[0];
$qry_string = "SELECT COUNT(*),SUM(income - `change`) FROM bill WHERE userid=$ss_userid AND (status & 0xE000) = 0x2000";
$result = $db_query($qry_string, $mySQL_ID) or mysql_die();
$row=$db_fetch_array($result);
$billoksum = $row[0];
$consumption = sprintf("%.2f",$row[1]);
if($billsum <= 0)
$portion = "0.00%";
else
$portion = sprintf("%.2f",$billoksum / $billsum * 100);
?>
|