Not easily as a non-MD. As a MD, you could use a class override to do this. Otherwise, you have to intercept the print/preview buttons during the SO Journal, basically tacking on your logic followed by the button's original logic. Then figure out if batches are enabled, if yes, figure out which batches have been selected, then loop through SO_InvoiceHeader and the related SO_InvoiceDetail records. At the very least, this requires either DFDM'ing the panel so you can customize it or add a UI Post Load event to any panel to create the record in CM_UIScriptSettings and then modify the library and panel (both MUST be uppercase) to match the library and panel used during journals, which is used by all the journals so you also have to check the StartProgram to make sure you are only doing this during the SO Journal.
I recommend getting an MD to do this.
However, i do have to ask, why not set the UnitPrice to the UnitCost during the pre-write on SO_InvoiceDetail or is the cost fluctuating so much that between the last edit and the journal update, the cost is being recalculated to something else? If this is the case, then maybe another approach is to use a button script in SO Invoice Data Entry that a user would click once ready to update and have it recalculate the unit cost and then set the unit price.
------------------------------
David Speck II
Tennessee Software Solutions
------------------------------