Ryan在ubuntu+webERP+pdf+utf-8中文有回應這個問題,起初在檢查這個問題時,我發現升級到weberp 3.08少了很多的資料表沒有安裝,覺得很奇怪,然後我就只好重新安裝資料庫.
之後再回去試試他說的問題,真的是很奇怪,不過那個程式聽說是Jesse寫的,他在mail list中有回覆這一段程式碼的想法及操作:
『The code is indeed looking for existing Serialized items. Here’s how
I’ve been using it:
Each of my products has a ‘secret’ pin and a ControNo. When managing
inventory, workers solely deal with ControlNos b/c there is nothing they
can steal by having them. Either by receiving a PO or a StockAdjustment,
I will load a *file* full of ControlNos.
When the product is sold and needs to be shipped, typically a worker
will pick up a sequential stack of ControlNos (often they are bundled w/
the 1st & last printed on the outside). So, to fullfill, they can just
pop in the 1st and last ControlNo and be done with it. The alternative
is having to either manually enter them as Keyed or manually type them
into a text document to import.
Obviously there are control number situations where a Sequences just
make no sense also, though, so it’s kind of a tool you have to know when
to use.
Also, to make it clear, the “Add_SerialItems” script in no way should be
looked at as something that actually adds data to the Database. It is
simply part of the ‘serial item utility’ scripts that let us easily
include a configurable, familiar component for serial item input to all
scripts that need to support it. It’s end result is typically to have
simply added a SerialNo and Quantity to an array that can then be read
by the including script. That script then determines what sort of action
is taken in the database. For example:
* StockAdjustment->Add option : creates new records in the database
* StockAdjustment->Remove option : changes the quanity for each item in
the database
* PO->Receive option: creates new records in the database
* Invoice: changes the quanity for each item in the database
hope that helps,
jesse
』
我照著他的說明去看程式,一直不了解stockserialitems這個資料表的紀錄是怎麼新增的?如果無法新增紀錄就無法使用
$sql = "SELECT serialno FROM stockserialitems
WHERE serialno BETWEEN '". $BeginNo . "' AND '". $EndNo . "'
AND stockid = '". $StockID."' AND loccode='". $LocationOut . "'";
來查serialno了,查不到就有可能影響到這篇文章的問題以及Ryan的問題!