renwee510
25th June 2008, 12:12
Hi, I want to write a total function for delivery Qty at after.field. but i have a problem where

Order Delivery Qty Outstanding
--------------------------------------------
1000 100
200

Order is A table data and Delivery Qty is B table data, and Outstanding is Order - Delivery Qty.

Problem is delivery qty is present by total, but order not is total.

how i can write a script so Outstanding = Order - Delivery Qty. and finally get 1000 - 300 = 700.

Thanks. :)

bdittmar
25th June 2008, 14:45
Hi, I want to write a total function for delivery Qty at after.field. but i have a problem where

Order Delivery Qty Outstanding
--------------------------------------------
1000 100
200

Order is A table data and Delivery Qty is B table data, and Outstanding is Order - Delivery Qty.

Problem is delivery qty is present by total, but order not is total.

how i can write a script so Outstanding = Order - Delivery Qty. and finally get 1000 - 300 = 700.

Thanks. :)

Hello,


for example :


before.order:
before.layout:

reset variable order quantity
hold order quantity in variable oquan.orno


detail.x:
after.layout:
sum delivery in detail delivery = delivery + delivery quantity


after.order:
before.layout:
outstanding = oquan.orno - delivery


Regards

renwee510
26th June 2008, 05:16
thanks guru;)