Interesting - the primary key consists of [CostWorkOrder] plus another two columns, but [CostWorkOrder] is also defined separately as a unique key (the DML for this isn't in your script). That's a contradiction and suggests to me that one of these is a "band aid", perhaps for performance, but more likely to support the functionality of the application. IMHO you should set up a test environment and investigate what happens when you remove the constraint.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden