Physical Inventory data

doing automatic calculation of inventory deficit (in terms of money, ex. “deficit is 100$”)
after physical inventory create a transaction document
amount:
{REPORT CONSUMPTION DETAILS:=(([C.Prediction]-[C.PhysicalInventory])*[C.Cost]).Sum:I.GroupCode="bar" AND C.PhysicalInventory>0}

but the problem is that C.PhysicalInventory only displayed when WP closed.

and when I try make a rule
event Work Period Started - not work because rule triggers after opening WP

event Automation Command Executed and Automation Command Name Equals Workperiods - not work, I don’t know why.

any solutions to the problem still exist?