[Home] [Help]
574: -- from the RO currency.
575: CURSOR c_multi_currency_check IS
576: SELECT count(distinct CEST.currency_code)
577: FROM CS_ESTIMATE_DETAILS CEST,
578: CSD_REPAIRS RO
579: WHERE RO.repair_line_id = p_repair_line_id
580: AND CEST.original_source_code = 'DR'
581: AND CEST.original_source_id = RO.repair_line_id
582: AND CEST.source_code = 'SD'
1186: /*Fixed for bug#5846031
1187: po number from RO should be defaulted on actual lines
1188: created from WIP.
1189: */
1190: l_default_po_number csd_repairs.default_po_num%type;
1191:
1192: -- swai: bug 7119691
1193: l_bill_to_account_id NUMBER;
1194: l_bill_to_party_id NUMBER;
1974: */
1975: begin
1976: select default_po_num
1977: into l_default_po_number
1978: from csd_repairs
1979: where repair_line_id = p_repair_line_id;
1980: exception
1981: when no_data_found then
1982: l_default_po_number := Null;
2480: ESTL.attribute14,
2481: ESTL.attribute15,
2482: ESTL.override_charge_flag
2483: FROM CSD_REPAIR_ESTIMATE ESTH,
2484: CSD_REPAIRS CR, -- swai: bug 4618500 (FP of 4580845)
2485: CSD_REPAIR_ESTIMATE_LINES ESTL
2486: -- swai: bug 4618500 (FP of 4580845)
2487: -- Join with table CSD_REPAIRS added
2488: -- We should not import the line from estimate to Actuals until the lines are accepted (i.e. approved)
2483: FROM CSD_REPAIR_ESTIMATE ESTH,
2484: CSD_REPAIRS CR, -- swai: bug 4618500 (FP of 4580845)
2485: CSD_REPAIR_ESTIMATE_LINES ESTL
2486: -- swai: bug 4618500 (FP of 4580845)
2487: -- Join with table CSD_REPAIRS added
2488: -- We should not import the line from estimate to Actuals until the lines are accepted (i.e. approved)
2489: -- if the flag Estimate Approval Required flag is checked. (This would make the behavior consistent with 1159)
2490: -- Modified the query to achieve following:
2491: -- (1)If Estimate Approval Required flag is checked and status of the estimate is accepted then only
3161: act.bill_to_party_id,
3162: act.bill_to_party_site_id,
3163: csd.incident_id
3164: from csd_repair_actuals act,
3165: csd_repairs csd
3166: where csd.repair_line_id = p_repair_line_id
3167: and act.repair_line_id = csd.repair_line_id;
3168:
3169: CURSOR c_sr_bill_to_ship_to(p_repair_line_id NUMBER)
3171: select cs.account_id,
3172: cs.bill_to_party_id,
3173: cs.bill_to_site_id,
3174: cs.ship_to_site_id
3175: from csd_repairs csd,
3176: cs_incidents_all_b cs
3177: where csd.repair_line_id = p_repair_line_id
3178: and csd.incident_id = cs.incident_id;
3179: