140: Cursor c_order_header (c_order_id NUMBER) IS
141: SELECT oh.ordered_date,
142: oh.order_number,
143: sold_to_party.party_name customer_name,
144: oe_totals_grp.Get_Order_Total(oh.header_id,null,'ALL')order_total,
145: oe_totals_grp.Get_Order_Total(oh.header_id,null,'CHARGES')charges_total,
146: oe_totals_grp.Get_Order_Total(oh.header_id,null,'TAXES')taxes_total,
147: oe_totals_grp.Get_Order_Total(oh.header_id,null,'LINES')lines_total,
148: sold_to_party.party_id,
141: SELECT oh.ordered_date,
142: oh.order_number,
143: sold_to_party.party_name customer_name,
144: oe_totals_grp.Get_Order_Total(oh.header_id,null,'ALL')order_total,
145: oe_totals_grp.Get_Order_Total(oh.header_id,null,'CHARGES')charges_total,
146: oe_totals_grp.Get_Order_Total(oh.header_id,null,'TAXES')taxes_total,
147: oe_totals_grp.Get_Order_Total(oh.header_id,null,'LINES')lines_total,
148: sold_to_party.party_id,
149: oh.payment_type_code,
142: oh.order_number,
143: sold_to_party.party_name customer_name,
144: oe_totals_grp.Get_Order_Total(oh.header_id,null,'ALL')order_total,
145: oe_totals_grp.Get_Order_Total(oh.header_id,null,'CHARGES')charges_total,
146: oe_totals_grp.Get_Order_Total(oh.header_id,null,'TAXES')taxes_total,
147: oe_totals_grp.Get_Order_Total(oh.header_id,null,'LINES')lines_total,
148: sold_to_party.party_id,
149: oh.payment_type_code,
150: oh.cust_po_number,
143: sold_to_party.party_name customer_name,
144: oe_totals_grp.Get_Order_Total(oh.header_id,null,'ALL')order_total,
145: oe_totals_grp.Get_Order_Total(oh.header_id,null,'CHARGES')charges_total,
146: oe_totals_grp.Get_Order_Total(oh.header_id,null,'TAXES')taxes_total,
147: oe_totals_grp.Get_Order_Total(oh.header_id,null,'LINES')lines_total,
148: sold_to_party.party_id,
149: oh.payment_type_code,
150: oh.cust_po_number,
151: substr(oh.credit_card_number,(length(oh.credit_card_number)-3),4)credit_card_number,
200: ol.top_model_line_id,
201: ol.link_to_line_id,
202: msi.description item_description,
203: ol.ordered_quantity,
204: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'LINES') lines_total,
205: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'TAXES') taxes_total,
206: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'CHARGES') charges_total,
207: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'ALL') extended_price
208: FROM oe_order_lines_all ol, mtl_system_items_tl msi
201: ol.link_to_line_id,
202: msi.description item_description,
203: ol.ordered_quantity,
204: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'LINES') lines_total,
205: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'TAXES') taxes_total,
206: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'CHARGES') charges_total,
207: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'ALL') extended_price
208: FROM oe_order_lines_all ol, mtl_system_items_tl msi
209: WHERE ol.header_id = p_order_id
202: msi.description item_description,
203: ol.ordered_quantity,
204: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'LINES') lines_total,
205: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'TAXES') taxes_total,
206: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'CHARGES') charges_total,
207: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'ALL') extended_price
208: FROM oe_order_lines_all ol, mtl_system_items_tl msi
209: WHERE ol.header_id = p_order_id
210: and ol.inventory_item_id = msi.inventory_item_id
203: ol.ordered_quantity,
204: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'LINES') lines_total,
205: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'TAXES') taxes_total,
206: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'CHARGES') charges_total,
207: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'ALL') extended_price
208: FROM oe_order_lines_all ol, mtl_system_items_tl msi
209: WHERE ol.header_id = p_order_id
210: and ol.inventory_item_id = msi.inventory_item_id
211: and msi.organization_id = oe_profile.value('OE_ORGANIZATION_ID', ol.org_id)
7289: linetyp.name action,
7290: ol.order_quantity_uom unit_of_measure,
7291: ol.ordered_quantity quantity,
7292: msit1.UNIT_OF_MEASURE charge_periodicity_desc,
7293: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'LINES') lines_total,
7294: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'TAXES') taxes_total,
7295: ol.shippable_flag,
7296: decode(msi.config_model_type,'N','Y','N') model_container_flag,
7297: cfgdtl.config_delta config_delta_flag
7290: ol.order_quantity_uom unit_of_measure,
7291: ol.ordered_quantity quantity,
7292: msit1.UNIT_OF_MEASURE charge_periodicity_desc,
7293: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'LINES') lines_total,
7294: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'TAXES') taxes_total,
7295: ol.shippable_flag,
7296: decode(msi.config_model_type,'N','Y','N') model_container_flag,
7297: cfgdtl.config_delta config_delta_flag
7298: FROM oe_order_lines_all ol,
7327: linetyp.name action,
7328: ol.order_quantity_uom unit_of_measure,
7329: ol.ordered_quantity quantity,
7330: msit1.UNIT_OF_MEASURE charge_periodicity_desc,
7331: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'LINES') lines_total,
7332: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'TAXES') taxes_total,
7333: ol.shippable_flag,
7334: decode(msi.config_model_type,'N','Y','N') model_container_flag,
7335: cfgdtl.config_delta config_delta_flag
7328: ol.order_quantity_uom unit_of_measure,
7329: ol.ordered_quantity quantity,
7330: msit1.UNIT_OF_MEASURE charge_periodicity_desc,
7331: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'LINES') lines_total,
7332: oe_totals_grp.Get_Order_Total(ol.header_id,ol.line_id,'TAXES') taxes_total,
7333: ol.shippable_flag,
7334: decode(msi.config_model_type,'N','Y','N') model_container_flag,
7335: cfgdtl.config_delta config_delta_flag
7336: FROM oe_order_lines_all ol,
8351: l_paynow varchar2(1);
8352: l_reccharge varchar2(1);
8353:
8354: Cursor c_macd_order_header (c_order_id NUMBER) IS
8355: Select oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'LINES') PayNow_lines_total,
8356: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'CHARGES') PayNow_charges_total,
8357: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'TAXES') PayNow_taxes_total,
8358: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'ALL') PayNow_order_total,
8359: oh.transactional_curr_code,
8352: l_reccharge varchar2(1);
8353:
8354: Cursor c_macd_order_header (c_order_id NUMBER) IS
8355: Select oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'LINES') PayNow_lines_total,
8356: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'CHARGES') PayNow_charges_total,
8357: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'TAXES') PayNow_taxes_total,
8358: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'ALL') PayNow_order_total,
8359: oh.transactional_curr_code,
8360: oe_totals_grp.Get_Order_Total(oh.header_id,null,'ALL') order_total,
8353:
8354: Cursor c_macd_order_header (c_order_id NUMBER) IS
8355: Select oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'LINES') PayNow_lines_total,
8356: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'CHARGES') PayNow_charges_total,
8357: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'TAXES') PayNow_taxes_total,
8358: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'ALL') PayNow_order_total,
8359: oh.transactional_curr_code,
8360: oe_totals_grp.Get_Order_Total(oh.header_id,null,'ALL') order_total,
8361: oh.order_number
8354: Cursor c_macd_order_header (c_order_id NUMBER) IS
8355: Select oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'LINES') PayNow_lines_total,
8356: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'CHARGES') PayNow_charges_total,
8357: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'TAXES') PayNow_taxes_total,
8358: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'ALL') PayNow_order_total,
8359: oh.transactional_curr_code,
8360: oe_totals_grp.Get_Order_Total(oh.header_id,null,'ALL') order_total,
8361: oh.order_number
8362: from oe_order_headers_all oh
8356: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'CHARGES') PayNow_charges_total,
8357: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'TAXES') PayNow_taxes_total,
8358: oe_totals_grp.Get_PayNow_Total(oh.header_id,null,'ALL') PayNow_order_total,
8359: oh.transactional_curr_code,
8360: oe_totals_grp.Get_Order_Total(oh.header_id,null,'ALL') order_total,
8361: oh.order_number
8362: from oe_order_headers_all oh
8363: where oh.header_id = c_order_id;
8364: g_macd_ord_rec c_macd_order_header%ROWTYPE;
8445: l_can_amt := ibe_util.nls_number_format(p_number_in => to_char(g_macd_ord_rec.order_total));
8446: l_document := l_document|| lpad(l_temp_str,51,' ')|| ' '|| lpad(l_curr_sym||to_char(to_number(l_can_amt), l_amt_format), 20, ' ')||NEWLINE;
8447:
8448: --Call OM to find the recurring totals
8449: OE_Totals_GRP.GET_RECURRING_TOTALS
8450: (
8451: p_header_id => l_order_id,
8452: x_rec_charges_tbl => l_rec_charge_tbl
8453: );