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的问题!