11907: /*
11908: * Fix for bug 5928084:
11909: *
11910: * Derive address of employee type payees using
11911: * PER_ADDRESSES or HR_LOCATIONS.
11912: *
11913: * The select statement below dynamically creates the payee
11914: * address table. The dynamically created table is named
11915: * as payee_add. Columns from this table are referenced in the
11931: * remit to location id column on the payment.
11932: *
11933: * Employee addresses can be in either
11934: * - PER_ADDRESSES (home addresses)
11935: * - HR_LOCATIONS (office addresses)
11936: * We use the 'employee address code' field on the payment to
11937: * decide which table to use.
11938: *
11939: * The select below uses decode clause to perform the
11959: * AP's expense report import program.
11960: * }
11961: * else
11962: * {
11963: * -- get the address field from HR_LOCATIONS --
11964: *
11965: * The select logic for this has been lifted from
11966: *
11967: * }
12573: FROM
12574: IBY_PAYMENTS_ALL pmt,
12575:
12576: /* Employee address related */
12577: HR_LOCATIONS per_loc,
12578: PER_ADDRESSES per_addr,
12579: PER_ALL_ASSIGNMENTS_F per_assgn,
12580: PER_ADDRESSES per_addr_prov,
12581:
13052: /*
13053: * Fix for bug 5928084:
13054: *
13055: * Derive address of employee type payees using
13056: * PER_ADDRESSES or HR_LOCATIONS.
13057: *
13058: * The select statement below dynamically creates the payee
13059: * address table. The dynamically created table is named
13060: * as payee_add. Columns from this table are referenced in the
13076: * remit to location id column on the payment.
13077: *
13078: * Employee addresses can be in either
13079: * - PER_ADDRESSES (home addresses)
13080: * - HR_LOCATIONS (office addresses)
13081: * We use the 'employee address code' field on the payment to
13082: * decide which table to use.
13083: *
13084: * The select below uses decode clause to perform the
13104: * AP's expense report import program.
13105: * }
13106: * else
13107: * {
13108: * -- get the address field from HR_LOCATIONS --
13109: *
13110: * The select logic for this has been lifted from
13111: *
13112: * }
13718: FROM
13719: IBY_PAYMENTS_ALL pmt,
13720:
13721: /* Employee address related */
13722: HR_LOCATIONS per_loc,
13723: PER_ADDRESSES per_addr,
13724: PER_ALL_ASSIGNMENTS_F per_assgn,
13725: PER_ADDRESSES per_addr_prov,
13726: