https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33863 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Talked to Jonathan about this and trying to summarize: * When we do a partial receive, the order lines are split into a parent and a child order line. The child is the one that is set to received, the parent remains. * But we do store some values in the parent order from the first receive: parent order has: unitprice: 0.000000 invoice_unitprice: 42.000000 invoice_currency: EUR Received child order line: unitprice: 36.710000 invoice_unitprice: 42.000000 invoice_currency: EUR * So we can check the checkbox and set the foreign currency and original price, but the actual cost remains empty that would be pulled from unitprice, if it was set. I think we could trigger the JS on opening the page if the actual cost was empty, filling in the actual cost with the calculated price in active currency. I am only worried about one use case: * Create a basket, create an order line, fill in "actual cost" on the order form * Receive the first item and set original price etc. * What happens to the actual cost in the parent? Does it remain the original value from ordering or is it updated? I assume it remains. * Receive the next item: original price would show as entered previously, but the actual cost would not be calculated from it, but be the one entered at order time. Could this be confusing? I can think of some ways to resolve: a) Store not only the original price (invoice_unitprice) in the parent, but also the unitprice. BUT: exchange rates might change between receives. So we'd still want to recalculate the unitprice on receive with the current exchange rate. Storing it doesn't seem to give us an advantage. b) When receiving, automatically calculate the actual cost (unitprice) from the invoice_unitprice with the current exchange rate (trigger JS). I'd do this independently if unitprice was set or not, so there is a relation between the original price (invoice_unitprice) we see and the actual cost (unitprice) c) Don't store the invoice_unitprice in the parent. People will need to enter it, calculation is triggered. An existing actual cost value might show before the value is entered. I think we can scratch a). b) or c)? -- You are receiving this mail because: You are watching all bug changes.