| | |
| | | return $this->emptyResult(); |
| | | } |
| | | |
| | | $warehouseId = $params["warehouseId"]; |
| | | $customerId = $params["customerId"]; |
| | | $psId = $this->getPsIdForCustomer($customerId); |
| | | |
| | | $bcDAO = new BizConfigDAO($db); |
| | | $taxRate = $bcDAO->getTaxRate($companyId); |
| | | $dataScale = $bcDAO->getGoodsCountDecNumber($companyId); |
| | | $fmt = "decimal(19, " . $dataScale . ")"; |
| | | |
| | | |
| | | if ($queryKey == null) { |
| | | $queryKey = ""; |
| | |
| | | } |
| | | } |
| | | |
| | | $cnt = ""; |
| | | if ($warehouseId) { |
| | | // 查询当前库存 |
| | | $sql = "select convert(balance_count, $fmt) as balance_count |
| | | from t_inventory |
| | | where warehouse_id = '%s' and goods_id = '%s' "; |
| | | $d = $db->query($sql, $warehouseId, $goodsId); |
| | | if ($d) { |
| | | $cnt = $d[0]["balance_count"]; |
| | | } |
| | | } |
| | | |
| | | $result[] = [ |
| | | "id" => $v["id"], |
| | | "code" => $v["code"], |
| | |
| | | "priceSystem" => $priceSystem, |
| | | "memo" => $v["memo"], |
| | | "taxRate" => $taxRate, |
| | | "taxRateType" => $taxRateType |
| | | "taxRateType" => $taxRateType, |
| | | "invCnt" => $cnt, |
| | | ]; |
| | | } |
| | | |