1 PACKAGE WSH_REPORT_QUANTITIES AUTHID CURRENT_USER AS
2 /* $Header: WSHUTRQS.pls 115.4 99/07/16 08:24:13 porting ship $ */
3
4 -- NAME: populate_temp_table
5 -- DESC: populated the temporary table with all the lines and their shipped
6 -- quantity this commits the records on creation
7 -- ARGS: report_id = must be a unique id, usual the request id of a conc prog.
8 -- p_mode = either PAK ir INV. calculates extra values if in one of
9 -- these.
10 -- p_departure_id
11 -- p_delivery_id
12 -- p_order_line
13 -- p_asn = will limit the Ship Qty to to this asn or greater
14 -- p_upd_ship = Update shipping flag: use this to reflect whether
15 -- you want the sq to be calculated only if update shipping
16 -- has run. Therefore if 'Y' then it will return zero if
17 -- update shipping has not run otherwise it return the
18 -- SC quantity.
19 -- p_debug = Flag to turn debugging information ON or OFF
20 --
21 PROCEDURE populate_temp_table (p_report_id in number,
22 p_mode in varchar2 default NULL,
23 p_departure_id in number default NULL,
24 p_delivery_id in number default NULL,
25 p_order_line in number default NULL,
26 p_asn in number default NULL,
27 p_upd_ship in varchar2 default 'N',
28 p_debug in varchar2 default 'OFF');
29 -- NAME: lines_shipped_quantity
30 -- DESC: returns the shipped quantity for a particular so_line in the
31 -- given asn and there after
32 -- this rollbacks all rows it created in the temp table at end.
33 -- ARGS: p_order_line = so_lines.line_id
34 -- p_item_id = item_id
35 -- p_asn = asn sequence number
36 -- p_upd_ship = Update shipping flag: use this to reflect whether
37 -- you want the sq to be calculated only if update shipping
38 -- has run. Therefore if 'Y' then it will return zero if
39 -- update shipping has not run otherwise it return the
40 -- SC quantity.
41 -- p_debug = Flag to turn debugging information ON or OFF
42 --
43 --
44 --
45 FUNCTION line_shipped_quantity (p_order_line in number,
46 p_item_id in number,
47 p_asn in number,
48 p_upd_ship in varchar2 default 'N',
49 p_debug in varchar2 default 'OFF') RETURN NUMBER;
50
51 -- NAME: delete_report
52 -- DESC: deletes records for this report from the temp table.
53 -- also deletes any older than 2 days that are still in the table.
54 Procedure delete_report (p_report_id in number);
55
56
57 -- INTERNAL PROCEDURES
58 --=====================
59 -- NAME: insert_order_line
60 -- DESC: inserts the order line into the temporary table.
61 procedure insert_order_line (p_report_id in number,
62 p_departure_id in number,
63 p_delivery_id in number,
64 p_line_id in number,
65 p_mode in varchar2 default NULL, -- BUG 787126
66 p_debug in varchar2 default 'OFF');
67
68 -- BUG : 787126 : Created a procedure to print the BOM for ATO MODELS
69 -- NAME: insert_ato_components
70 -- DESC: inserts the components for ATO Model.
71 procedure insert_ato_components (p_report_id in number,
72 p_departure_id in number,
73 p_delivery_id in number,
74 p_line_id in number,
75 p_mode in varchar2 default NULL,
76 p_debug in varchar2 default 'OFF');
77 -- BUG 787126 : End
78
79 -- NAME: add_non_ship_lines
80 -- DESC: adds non shippable lines to the temp table.
81 Procedure add_non_ship_lines (p_report_id in number,
82 p_debug in varchar2 default 'OFF');
83 Procedure set_shipped_quantity (p_report_id in number,
84 p_debug in varchar2 default 'OFF');
85 Procedure set_invoice_quantity (p_report_id in number,
86 p_debug in varchar2 default 'OFF');
87 end WSH_REPORT_QUANTITIES;