Incorrect invoice/agreements numbers are shown in COTI when deal is a trade in machine. Currently the logic for retrieving invoice numbers via transaction register is by serial number and if the contract type is sale/rental (LIBD09 / EMPTREG0 where TRXCD in ('S','R'). See ticket 37994. The logic is pulling the initial purchase invoice number via serial number and contract type vs the most current invoice number for the trade-in machine. We would like the logic to be changed to also to include retrieving the ID Number (LIBD09 / EMPTREG0-IDN01) so it would pull the correct invoice number.
___
This case is specifically references a library file name and field name to identify a sale condition that would then (if that condition were met), look for an invoice number from the other referenced library file name/field name.