143: l_uom_code VARCHAR2(20);
144: l_usage_type VARCHAR2(20);
145: l_time_uom VARCHAR2(20);
146: l_primary_uom_code VARCHAR2(20);
147: l_billrep_tbl OKS_BILL_REC_PUB.bill_report_tbl_type;
148: l_billrep_tbl_idx NUMBER := 0;
149: l_billrep_err_tbl OKS_BILL_REC_PUB.billrep_error_tbl_type;
150: l_billrep_errtbl_idx NUMBER;
151:
145: l_time_uom VARCHAR2(20);
146: l_primary_uom_code VARCHAR2(20);
147: l_billrep_tbl OKS_BILL_REC_PUB.bill_report_tbl_type;
148: l_billrep_tbl_idx NUMBER := 0;
149: l_billrep_err_tbl OKS_BILL_REC_PUB.billrep_error_tbl_type;
150: l_billrep_errtbl_idx NUMBER;
151:
152:
153:
219: /* Check if the subline is fully billed */
220: OPEN bsl_billed(subline_Rec.id,l_period_start_date,l_period_end_date);
221: FETCH bsl_billed INTO l_id;
222: IF (bsl_billed%FOUND) THEN
223: OKS_BILL_REC_PUB.Counter_Values
224: (
225: --P_CALLEDFROM => 3,
226: P_CALLEDFROM => 4, --refers to Settlement Bug# 5235116
227: P_START_DATE => subline_rec.start_date, --l_period_start_date,
264: -------------------------------------------------------------------------
265: -- Begin partial period computation logic
266: -- Developer Mani Choudhary
267: -- Date 13-JUN-2005
268: -- call oks_bill_rec_pub.Get_prorated_Usage_Qty to get the prorated usage
269: -------------------------------------------------------------------------
270: IF l_period_type IS NOT NULL AND
271: l_period_start IS NOT NULL
272: THEN
269: -------------------------------------------------------------------------
270: IF l_period_type IS NOT NULL AND
271: l_period_start IS NOT NULL
272: THEN
273: l_temp := OKS_BILL_REC_PUB.Get_Prorated_Usage_Qty
274: (
275: p_start_date => bsl_rec.date_billed_from,
276: p_end_date => bsl_rec.date_billed_to,
277: p_qty => subline_Rec.minimum_quantity,
339: l_term_amount := l_credit_amount;
340: l_term_qty := l_credit_qty;
341: END IF;
342:
343: OKS_BILL_REC_PUB.Create_trx_records(
344: P_CALLED_FROM => 3 ,
345: P_TOP_LINE_ID => line_rec.id,
346: P_COV_LINE_ID => subline_Rec.id,
347: P_DATE_FROM => cur.date_billed_from ,
360:
361: ELSIF (l_qty > 0) THEN
362: /* If Quantity already billed is lesser than actual , then issue invoice */
363: --issue invoice
364: OKS_BILL_REC_PUB.Create_trx_records(
365: P_CALLED_FROM => 3,
366: P_TOP_LINE_ID => line_rec.id,
367: P_COV_LINE_ID => subline_Rec.id,
368: P_DATE_FROM => l_period_start_date ,