我今天抓取库存移动记录,发现Mtl_material_Transaction表中,在作完了sales Order 的ship confirm动作后产生了两笔库存移动记录,第一笔是Sales Issue的出库,quantity为负数,还有另外一笔,transaction type是 COGS Recognition,数量和SalesIssue的数量相等,但是为正数, 在Form界面上查找见不到此记录,应该也不会影响库存量,但是后台查数据时怕会引起误会,请问各位高手这个 COGS Recognition的记录是干啥的?
脚本为:
select mmt.transaction_date "date",msi.segment1 item,mmt.transaction_quantity Txn_qty,mtt.TRANSACTION_TYPE_NAME Txn_type,
mts.TRANSACTION_SOURCE_TYPE_NAME source_type,mmt.SUBINVENTORY_CODE subinv
from mtl_material_transactions mmt
,mtl_system_items msi
,mtl_transaction_types mtt
,mtl_txn_source_types mts
,mtl_sales_orders mso
where mmt.ORGANIZATION_ID=137
and msi.organization_id=137
and mtt.transaction_type_id=mmt.TRANSACTION_TYPE_ID
and msi.inventory_item_id=mmt.inventory_item_id
and mmt.TRANSACTION_SOURCE_TYPE_ID=mts.TRANSACTION_SOURCE_TYPE_ID
and mts.TRANSACTION_SOURCE_TYPE_NAME='Sales order'
and mmt.TRANSACTION_SOURCE_ID=mso.SALES_ORDER_ID
and msi.segment1='2055-0006-003'
and mso.segment1='2004580' --sales order
结果为:
date ITEM TXN_QTY TXN_TYPE Source_type SUBINV
2009-4-29 20:21:57 2055-0006-003 -1 Sales Order Pick Sales order FGI
2009-4-29 20:21:57 2055-0006-003 1 Sales Order Pick Sales order STG
2009-4-29 22:59:23 2055-0006-003 -1 Sales order issue Sales order STG
2009-4-29 23:59:59 2055-0006-003 1 COGS Recognition Sales order
[本帖最后由 lihongwalilac 于 2009-9-1 19:08 编辑]