5/29/2019

Axapta :: Error Post PO Invoice

Axapta :: Error Post PO Invoice
Error in unit of amount in currency 'US2'. Must be rounded to ' '.
Unit of 1,289.79 1,289.79 being posted to account '1110600' is too little.

เกิดจาก
- ค่าใน LineAmount มีทศนิยมมากเกินไป ต้องใส่แค่ 2 ตำแหน่ง

ค่าที่เห็นใน Line แสดง 2 ตำแหน่อง แต่ค่าจริง ๆ ใน Table มีทศนิยมมากกว่า 2 ตำแหน่งทำให้ Post Invoice ไม่ผ่านและ Error
แก้โดย Copy ค่าที่เป็น ใส่แทนค่าเดิม ทศนิยมก็จะหายไป

แก้โปรแกรม SetCourier ให้ปัดทศนิยมเป็น 2 ตำแหน่ง
แก้โปรแกรม
- ก่อนใส่ค่าลงใน Line Amount ให้ปัดทศนิยมให้เหลือ 2 ตำแหน่งก่อน
Code
  1. purchLineUpdate.LineAmount = DecRound(LineAmountSet, 2);

ค่าที่แสดงใน Line จะเห็นทศนิยมแค่ 2 ตำแหน่งแต่ค่าจริง ๆ ใน table ผ่าน MS SQL จะมีทศนิยมเยอะทำให้ Error

No comments:

Post a Comment