-- If not null, validate destination_type_code based on item_status,
-- accrue_on_receipt_flag, transaction_flow_header_id;
--
-- Validation Business Rules
-- item status
-- 'O' = outside processing item
-- - destination type must be SHOP FLOOR
-- 'E' = item stockable in the org
-- - destination type cannot be SHOP FLOOR
-- 'D' = item defined but not stockable in org
-- - destination type must be EXPENSE
-- null = item not defined in org
--
-- accrue on receipt
-- 'N' - destination type must be expense
-- 'Y' - if expense_accrual = PERIOD END
-- then destination type code cannot be EXPENSE
-- Cannot be INVENTORY if item_id is null.
-- If SHIKYU item, then dest type code must be INVENTORY.
也就是说物料的目的地类型的值取决于物料的状态,接收应计标识,以及transaction_flow_header_id。
这些验证逻辑在新增采购订单时是有效的,但是从采购申请创建订单的时候这些限制有没有了。
目的地类型影响会计科目的生成。