怎样获取Inventory 账目信息: DISTRIBUTION_ACCOUNT_ID

问题的起源:

一个客户在做Dropship Sales Order 的时候, 首先创建了PO, 然后进行PO receipt; 完成之后系统自动把item issue 出去了; 这时候在MMT 表中应该有两条记录:



但是客户的MMT 里面只有PO Receipt 一条, 缺少Sales order issue 这一条.
检查过客户的MTI , MMTT 和MMT , 确实缺少这条记录, 这时我们需要为客户补一条MTI 的记录.

模拟测试:

按照dropship sales order的步骤, 自己做一次这样的流程. 在PO receipt 的时候拿到INV log (包含 RCV log). 
我们可以发现给RTI MTI MMTT MMT MR 所加的trigger 记录下了这些表insert delete 的记录

Receiving Transaction Processor (RTP)
  1. YU_RTI_INSERT_DELETE:  ...........INSERTING..........
  2. YU_MMTT_INSERT_DELETE:  ...........INSERTING..........
  3. YU_MMT_INSERT_DELETE:  ...........INSERTING..........
  4. YU_MR_INSERT_DELETE:  ...........INSERTING..........
  5. YU_MTI_INSERT_DELETE:  ...........INSERTING..........
  6. YU_MMTT_INSERT_DELETE:  ...........DELETING..........
  7. YU_RTI_INSERT_DELETE:  ...........DELETING..........
INV transaction manager
  1. YU_MMTT_INSERT_DELETE:  ...........INSERTING..........
  2. YU_MR_INSERT_DELETE:  ...........DELETING..........
  3. YU_MMT_INSERT_DELETE:  ...........INSERTING..........
  4. YU_MMTT_INSERT_DELETE:  ...........DELETING..........
  5. YU_MTI_INSERT_DELETE:  ...........DELETING..........
在RTP 中首先插入了MMTT, 接着插入了MMT, 这是PO receipt 在给MMT 插入PO receipt 的记录. 
接着又插入了一条MTI 的记录, 这条记录就是Sales Order Issue的记录了. 
接下来INV transaction manager 就会去处理MTI 中的这条记录.

那么我们去看MTI 的这条记录里面所包含的内容, 除了包含常见的 item, transaction type 之类的, 还包含下面这样一个账目信息:

,DISTRIBUTION_ACCOUNT_ID = 12952
,DST_SEGMENT1 = 01
,DST_SEGMENT2 = 520
,DST_SEGMENT3 = 5110
,DST_SEGMENT4 = 0000
,DST_SEGMENT5 = 000

这个账目信息代表的是什么意思呢? 这个DISTRIBUTION_ACCOUNT_ID 又是怎么来的呢?

DISTRIBUTION_ACCOUNT_ID:

其实这个account id 是一个组合信息, 我们可以在Misc transaction form 看到这个组合信息的含义.



比如我在做sales order issue的时候, 账号信息是01-520-5110-0000-000, 我们就可以在这个form 上看到每一段所代表的含义.
这个账目是与OU, Org, Transaction Type 等等都有关系的.
而这5段信息就对应了插入MTI 里面的 DST_SEGMENT1 等等5个字段的数值.

在最后插入的MMT 中, 存储的是DISTRIBUTION_ACCOUNT_ID 这个字段, 而不是很长的一个字段组合. 那么DISTRIBUTION_ACCOUNT_ID 又是怎么得来的呢?
我们可以从form 上找出来: help -> Diagnostics -> Examine



这个value 的值代表的就是DISTRIBUTION_ACCOUNT_ID;

实际上, 这个DISTRIBUTION_ACCOUNT_ID = 12952 和Account = 01-520-5110-0000-000 是在一个view 里面定义的. 分别可以用下面的两条SQL 语句查出他们的关系:

SELECT  *  FROM  gl_code_combinations_kfv  WHERE  code_combination_id =  12952 ;
SELECT  *  FROM  gl_code_combinations_kfv  WHERE  concatenated_segments  LIKE  ( '01-520-7740%'  );

在给客户提供脚本插入MTI 的时候, DISTRIBUTION_ACCOUNT_ID 这个字段是必需的, 但是需要客户自己去填. 因为客户的账目信息和我们测试环境上的不一样.









  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/round_style" android:elevation="4dp" android:layout_margin="8dp" android:padding="10dp"> <com.xuexiang.xui.widget.textview.autofit.AutoFitTextView style="@style/item_show_title" android:id="@+id/spec" android:paddingTop="2dp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"/> <com.xuexiang.xui.widget.textview.autofit.AutoFitTextView style="@style/item_show_title" android:id="@+id/style" app:layout_constraintStart_toEndOf="@+id/spec" app:layout_constraintTop_toTopOf="parent"/> <com.xuexiang.xui.widget.textview.autofit.AutoFitTextView style="@style/item_show_title" android:id="@+id/name" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/spec"/> <com.xuexiang.xui.widget.textview.autofit.AutoFitTextView style="@style/item_show_title" android:id="@+id/real_inventory" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/name"/> <com.xuexiang.xui.widget.textview.autofit.AutoFitTextView style="@style/item_show_title" android:id="@+id/check_inventory" app:layout_constraintStart_toEndOf="@+id/real_inventory" app:layout_constraintTop_toBottomOf="@+id/name"/> <ImageView android:id="@+id/status" android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/name" app:layout_constraintTop_toTopOf="parent" /> <View style="@style/item_show" android:id="@+id/view_task_list" android:layout_width="match_parent" android:layout_height="1dp" android:background="#cccccc" android:layout_marginTop="3dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/real_inventory" app:layout_constraintStart_toStartOf="@+id/real_inventory"/> </androidx.constraintlayout.widget.ConstraintLayout>加入button功能,但并不影响源码
最新发布
06-03

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值