| | |
| | | convert(p.pw_count, " . $fmt . ") as pw_count, |
| | | convert(p.left_count, " . $fmt . ") as left_count, p.memo, |
| | | p.tax_rate, p.tax, p.money_with_tax, u.name as unit_name, |
| | | p.goods_price_with_tax |
| | | p.goods_price_with_tax, convert(p.real_count, " . $fmt . ") as real_count, |
| | | convert(p.rej_count, " . $fmt . ") as rej_count |
| | | from t_po_bill_detail p, t_goods g, t_goods_unit u |
| | | where p.pobill_id = '%s' and p.goods_id = g.id and g.unit_id = u.id |
| | | order by p.show_order"; |
| | |
| | | "unitName" => $v["unit_name"], |
| | | "pwCount" => $v["pw_count"], |
| | | "leftCount" => $v["left_count"], |
| | | "realCount" => $v["real_count"], |
| | | "rejCount" => $v["rej_count"], |
| | | "memo" => $v["memo"], |
| | | "goodsPriceWithTax" => $goodsPriceWithTax |
| | | ]; |
| | |
| | | |
| | | $sql = "insert into t_po_bill_detail(id, date_created, goods_id, goods_count, goods_money, |
| | | goods_price, pobill_id, tax_rate, tax, money_with_tax, pw_count, left_count, |
| | | show_order, data_org, company_id, memo, goods_price_with_tax) |
| | | show_order, data_org, company_id, memo, goods_price_with_tax, |
| | | real_count, rej_count) |
| | | values ('%s', now(), '%s', convert(%f, $fmt), %f, |
| | | %f, '%s', %d, %f, %f, 0, convert(%f, $fmt), %d, '%s', '%s', '%s', %f)"; |
| | | %f, '%s', %d, %f, %f, 0, convert(%f, $fmt), %d, '%s', '%s', '%s', %f, |
| | | 0, 0)"; |
| | | $rc = $db->execute( |
| | | $sql, |
| | | $this->newId(), |
| | |
| | | |
| | | $sql = "insert into t_po_bill_detail(id, date_created, goods_id, goods_count, goods_money, |
| | | goods_price, pobill_id, tax_rate, tax, money_with_tax, pw_count, left_count, |
| | | show_order, data_org, company_id, memo, goods_price_with_tax) |
| | | show_order, data_org, company_id, memo, goods_price_with_tax, |
| | | real_count, rej_count) |
| | | values ('%s', now(), '%s', convert(%f, $fmt), %f, |
| | | %f, '%s', %d, %f, %f, 0, convert(%f, $fmt), %d, '%s', '%s', '%s', %f)"; |
| | | %f, '%s', %d, %f, %f, 0, convert(%f, $fmt), %d, '%s', '%s', '%s', %f, |
| | | 0, 0)"; |
| | | $rc = $db->execute( |
| | | $sql, |
| | | $this->newId(), |
| | |
| | | } else if ($billStatus == 1000) { |
| | | $bs = "已入库"; |
| | | } else if ($billStatus == 2000) { |
| | | $bs = "已退货"; |
| | | $bs = "部分退货"; |
| | | } else if ($billStatus == 3000) { |
| | | $bs = "全部退货"; |
| | | } else if ($billStatus == 9000) { |
| | | // TODO 9000这个状态似乎并没有使用??? |
| | | $bs = "作废"; |