cancel
Showing results for 
Search instead for 
Did you mean: 

There is a difference between the document total and its components

Former Member
0 Kudos

i got one scenario .. for example i got 5 line item in purchase order, however, there will be only 4 line item in GRPO Draft there

due to some validation or rules. The freight charges is working fine as the calculation was based on the line items instead take directly from POR3.

There is an error when i want add into GRPO which stated " There is a difference between the document total and its components.

[Goods Receipt PO - Freight - Vat Applied][line: 0] [Message 439-138] "

got any ideas or solution to solve it ?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If you only GRPO 4 items out of 5 from PO, you need to use a factor for the freight. Such as 80% of the amount.

Thanks,

Gordon

Former Member
0 Kudos

hi,

i calculated each line total and set it back as below. But, of course the freight amt was less than the actual which shown in OPOR there.

(tis is bcoz POR got 5 line item but GRPO only got 4 line item)

LineTotal = LineTotal * qty

finalFreightCharges += (CDbl(LineTotal) * special rate)

oGRPO.Expenses.LineTotal = finalFreightCharges

so, is it this consider as the factor for the freight ? is there anything nid to check in order to make sure that there is no diff

bet the doc total and its components ?

Thanks

Former Member
0 Kudos

You are right. That is what I refer to as factor. However, have you tried to let system calculate DocTotal for you so that the total will always agree with its components?

Former Member
0 Kudos

hi gordon,

if u said let the docTotal or Expenses.LineTotal to calculate automatically, then it won;t meet the task objective as i need to recalculate the

Expenses.LineTotal based on how many line item exist in PDN1 multiply special rate charges.

e.g. got 5 line items in POR1 but there will be only 4 line items in PDN1 based on some validation (the 5th line item haven't received yet)

so, the freight in PDN3 should less than the frieght in POR3. For ur opinion, wat should i do ? this is because i got the above error every timei clicked add button in GRPO Draft there.

ssFreightTbl.DoQuery("select ObjType,DocEntry,LineNum,ExpnsCode,LineTotal,TotalFrgn from POR3 where DocEntry= " & oPORDocEntry & "")

If ssFreightTbl.RecordCount > 0 Then

Do Until ssFreightTbl.EoF

oGRPO.Expenses.BaseDocType = CInt(ssFreightTbl.Fields.Item(0).Value)

oGRPO.Expenses.BaseDocEntry = CInt(ssFreightTbl.Fields.Item(1).Value)

oGRPO.Expenses.BaseDocLine = CInt(ssFreightTbl.Fields.Item(2).Value)

oGRPO.Expenses.ExpenseCode = CInt(ssFreightTbl.Fields.Item(3).Value)

oGRPO.Expenses.LineTotal = finalFreightCharges

oGRPO.Expenses.Add()

ssFreightTbl.MoveNext()

Loop

End If

Former Member
0 Kudos

What if you just let system calculate the LineTotal and DocTotal? Have you tried?

Former Member
0 Kudos

hi gordon,

You are right. i just set the doctype,docentry and doclinenum. And, the line total in expenses object will auto calculated by the system.

Thanks

elson

Answers (0)