Designing Billing Extensions in Oracle

Embed Size (px)

Citation preview

  • 8/9/2019 Designing Billing Extensions in Oracle

    1/24

    Designing Billing Extensions

    Before you begin designing billing extensions, you should familiarize yourself with the threeclasses of billing extensions to understand the complexity of the business problem you are tryingto solve.

    There are also specific questions of client extension design that are unique to determining therequirements and logic of your billing extensions. We list these questions in the pages thatfollow, and then address some of these issues in further detail in the Concepts of Billing

    xtension !efinitions section .

    Understanding Billing Extensions Classes

    There are three primary classes of billing extensions that you can write" the classes differ by howyou calculate the revenue and invoice amounts#

    Class 1 : Based on a function of the revenue and invoice amounts included on draft revenueand invoices

    $n example is a %urcharge billing extension, which is typically a percentage of the invoiceamount. This is the simplest class of billing extension to design and write.

    Class 2 : Based on values independent of the amounts included on draft revenue andinvoices.

    $n example is the percent complete revenue accrual method, which is based on the physical percent complete entered for the pro&ect multiplied by the budget revenue amount. Thecalculated amount is independent of other amounts included on the revenue and invoice. 'n manycases, this class of billing extensions may be the only method used to calculate revenue andinvoice amounts for the pro&ect, particularly if you are using vent based revenue accrual andinvoicing.

    Class 3: Based on the attributes of a group of transactions included on draft invoices for!hich the billing extension calculates the amount to bill for these transactions.

    (or example, you may wish to calculate the revenue and invoice amounts based on number ofdays wor)ed, rather than the actual hours wor)ed which are recorded on the timecard. $notherexample is volume discounts on an invoice, in which you provide discounts based on the volumeof transactions billed. *ou calculate the amount to bill for the group of transactions withoutspecifying a bill amount for each transaction.

    To properly trac) which individual transactions are billed using an automatic event, you must setup your pro&ects to include these transactions on an invoice, but without an invoice amount.These transactions must have a nonzero revenue amount and a invoice amount of zero. +racle

    ro&ects includes these transactions on the invoice on a net zero ad&ustment line which you

    Page 1 of 24

    http://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex04.htm#p_billexthttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex04.htm#p_billexthttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex04.htm#p_billexthttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex04.htm#p_billext
  • 8/9/2019 Designing Billing Extensions in Oracle

    2/24

    cannot review in the forms, but that you can read from the database in your billing extension.*ou can set up a pro&ect to process transactions in this way by using different revenue andinvoice burden schedules" the revenue schedule determines the appropriate revenue amounts andthe invoice schedule calculates a invoice amount equal to zero.

    +racle ro&ects lin)s the detail transactions to the invoice on a net zero ad&ustment invoice line,and you hold and account for the summary bill amount for these transactions using an automaticevent included on the invoice. *ou can then write custom reports to list the detail transactionsthat bac)up the summary event amount.

    *ou can only implement this class of billing extensions for invoicing amounts. *ou cannot usethis class for revenue amounts calculated during revenue generation.

    Designing Billing Extensions

    *ou should carefully design billing extensions before implementing them in +racle ro&ects.

    Careful planning of your billing extension helps to ensure that you are calculating andaccounting for revenue and invoice amounts according to your company-specific rules. %ee#!esigning Client xtensions .

    *ou should consider the additional design issues for billing extensions#

    o $re you calculating a revenue amount, an invoice amount, or both $re theamounts generated during revenue accrual, invoice generation, or both

    o /ow are the amounts calculated What are the inputs to the calculation

    o /ow are the inputs derived

    o /ow are the amounts processed# 012 for reporting purposes 032 for accounting purposes, 042 for invoicing

    o /ow are the attributes of the automatic event set# event type, event organization,event description, completion date

    o 5nder what conditions is this calculation used What types of pro&ects Whattypes of billing terms

    o /ow is the billing extension processed for ad&ustments $d&ustments are definedas revenue credits or invoice credit memos, based on other transactions.

    o Can this billing extension be called with other billing extensions on the same pro&ect6tas) 'f so, what is the dependency and order of your billing extensions

    o What is the exception handling if some input values cannot be found

    Page 2 of 24

    http://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/cxovie04.htm#e_descehttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/cxovie04.htm#e_descehttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/cxovie04.htm#e_desce
  • 8/9/2019 Designing Billing Extensions in Oracle

    3/24

    o /ow is the logic affected if the inputs change over time

    o 's there a limit on the amount calculated 'f so, what is the logic

    o $re there implications of the level at which the pro&ect is funded - either the

    pro&ect level or the top tas) level 'f so, what are they

    +nce you answer these questions, you should have the appropriate information to define a billingextension in +racle ro&ects and to document the functional specifications for your technicalresource to use in writing the 76%87 procedure.

    Concepts in Billing Extension Definitions

    When you enter billing extension definitions, you specify parameters that specify how your billing extension is processed in +racle ro&ects. This section explains some of these parameters.

    Calling "rocess

    *ou specify if the billing extension is called by the revenue generation program, the invoicegeneration program, or both programs.

    When you call billing extensions during revenue generation, you can create events with arevenue amount, or with a revenue amount and a bill amount, as long as the revenue amount isnonzero.

    When you call billing extensions during invoice generation, you can create events with a bill

    amount, or with a revenue amount and a bill amount, as long as the bill amount is nonzero.

    The following table provides examples of events with various revenue and bill amounts that youcan create in the two calling processes.

    BillingExtension Event

    #evenue$mount

    Bill$mount Comments

    Called in 9enerate !raft :evenue

    1 1 1;; 1;; Bill amount is not processed until revenue forthe event is distributed

    3 3 1;; - :evenue event only

    Called in 9enerate !raft 'nvoice

    4 1 1;; 1;; :evenue amount is not processed until theinvoice on which the event is billed is released

    < 3 - 1;; 'nvoice event only

    Page 3 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    4/24

    %able 1 & 111. Calling "rocess: Example Events '"age 2 of 2(

    'f you create an event with both revenue and bill amounts, the revenue amount and the billamount do not have to be the same. *ou can create positive or negative event amounts with

    billing extensions.

    *ou can create a billing extension that is called by both revenue generation and invoicegeneration. *ou would do this if your billing calculation is similar for both the revenue and billamounts, with the exception that the event revenue amount is based on the accrued revenue, andthe event bill amount is based on the amount invoiced. *ou can write your procedure to have thesame logic for the calculation but to use the appropriate input of either accrued revenue oramount invoiced into your calculation. With this approach of writing one procedure and one

    billing extension, you can avoid duplication of your logic. 'n addition, your pro&ect users onlyneed to assign one billing extension to their pro&ects, instead of two billing extensions - one forrevenue accrual and one for invoicing.

    Calling "lace

    There are several predefined places within the revenue generation and invoice generation programs where your billing extension can be called when processing a pro&ect#

    o re- rocessing

    o !elete rocessing

    o

    Cancel 'nvoice rocessingo Write-+ff 'nvoice rocessing

    o $d&ustment rocessing

    o :egular rocessing

    o ost-:egular rocessing

    o ost- rocessing

    The following figures illustrate the order in which these steps are executed after the pro&ect isselected for revenue accrual or invoice generation.

    )igure 1 & **.

    +hen #evenue "rocesses Call Billing Extensions

    Page 4 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    5/24

    )igure 1 & *,.

    +hen -nvoice "rocesses Call Billing Extensions

    Page 5 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    6/24

    "re&"rocessing

    Pre-processing billing extensions are called before any revenue accrual or invoice calculationsfor a pro&ect. The 9enerate !raft :evenue and 9enerate !raft 'nvoices processes do not allowyou to create automatic events in this calling place. $n example of a preprocessing billingextension is to place all unbilled, unpaid supplier invoice items on hold, so that they are not

    billed" and to release the billing hold on any unbilled, paid supplier invoice transactions that areon hold. *ou can then bill the paid supplier invoice items during standard invoice processing.

    Delete "rocessing

    Delete processing billing extensions are called after revenue is billed and before any revenueaccrual or invoice calculations for a pro&ect" this is only applicable to invoicing billing extensionsThe 9enerate !raft 'nvoices process does not allow you to create automatic events in this calling

    place.

    Page 6 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    7/24

    Cancel -nvoice "rocessing

    Cancel invoice processing billing extensions are called after the invoice cancellation for a pro&ect. This is only applicable to invoice billing extensions. The 9enerate !raft 'nvoices process does not allow you to create automatic events in this calling place.

    +rite& ff -nvoice "rocessing

    Write-off invoice processing billing extensions are called after the invoice write-off processingfor a pro&ect. This is only applicable to invoice billing extensions. The 9enerate !raft 'nvoices

    process does not allow you to create automatic events in this calling place.

    $d/ustment

    Adjustment processing creates crediting revenue and invoices that credit existing revenue orinvoices. +racle ro&ects creates crediting revenues and invoices due to changes in revenue or

    invoice amounts or in the revenue general ledger account. These credits are created for one ormore individual transactions which have previously been processed and included on a draftrevenue or invoice" these changes in amounts or accounts result from ad&ustment actions on theindividual transactions.

    *ou can create automatic events in this step. 'f you transfer these events to +racle :eceivablesfor autoinvoicing, lin) the automatic event invoice lines to their corresponding events in theoriginal invoice. %ee# 'nserting vents . +racle ro&ects calls a billing extension in this step afterall of the crediting revenue and invoices are created.

    #egular

    Regular processing creates non-crediting revenue and invoices. +racle ro&ects creates revenueand invoices based on individual transactions and events that have not previously been processedfor revenue accrual and invoicing.

    *ou can create automatic events in this step. +racle ro&ects calls a billing extension in this stepafter all non-crediting revenues and invoices are created.

    "ostegular

    Post-regular processing billing extensions create events based on all prior revenue generated in

    order to base the calculation on the total revenue accrued, including other automatic events. $nexample of a post-regular processing billing extension is cost accrual based on the revenuegenerated. %ee# :evenue-Based Cost $ccrual .

    "ost&"rocessing

    Post-processing billing extensions are called after all of the ad&ustment, regular, and post-regular processing is complete. The 9enerate !raft :evenue and 9enerate !raft 'nvoices processes do

    Page 7 of 24

    http://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex06.htm#p_iehttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/cstacc.htm#p_accruhttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex06.htm#p_iehttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/cstacc.htm#p_accru
  • 8/9/2019 Designing Billing Extensions in Oracle

    8/24

    not allow you to create automatic events in this calling place. $ll of the revenue and invoice processing is complete before this step is executed. $n example of a post-processing billingextension is to notify a pro&ect manager when an invoice greater than =3>,;;; is created.

    The following table shows an example of the different automatic events created by using

    different calling places for a billing extension based on a percentage of the amount invoiced.

    $utomatic Event $mount

    "eriod -nvoice0umber-nvoiceCredited

    -nvoice$mount

    #egular $d/ustment

    #egularnl

    1 1 1;;; 1;; 1;;

    3 3 1 ->;; ->;

    4 1>;; 1>; 1;;

    ummar : 3;;; 3;; 3;;%able 1 & 112. Calling "lace: Example Events '"age 1 of 1(

    The billing extension called only during regular processing accounted for the total amountinvoiced, including the credited amount during regular processing as illustrated by the eventcreated for invoice number three.

    %ransaction -ndependent

    +nce you determine the inputs to your calculations, you can determine if your billing extensioncalculation is solely dependent on other transactions being processed, or if your calculation can be executed without any other transactions being processed. Transactions refer to expenditureitems and events.

    %ransaction independent billing extensions are executed for each pro&ect with an active billingassignment, even if there are no transactions to process. This type of billing extension relies onan input other than billable transactions on a pro&ect. 'f this input changes, the calculated billingamount changes, which you want to record. (or example, the cost-to-cost revenue accrualmethod, which relies on the budgeted cost and revenue amounts. 'f the budgeted cost or

    budgeted revenue changes, the revenue amount changes. *ou want to record this revenue amount

    change even if no other transactions are processed in revenue generation. This category includesthe class of billing extensions that calculate revenue and invoice amounts based on valuesindependent of the amounts included on draft revenue and invoices.

    0ote: 'f you design a billing extension to be transaction independent, it will be executed in everyrun of the revenue or invoice processes.

    Page 8 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    9/24

    %ransaction dependent billing extensions are executed only if there are other transactions processed. $n example of this type of billing extension is surcharge in which you calculate a percentage of the amount billed. *ou do not want to bill surcharge if no other transactions are billed.

    Transaction dependent billing extensions are called only if billable expenditure items and eventsexist that need to be processed. (or example, there may be new transactions that are set to ?on-Billable, which are not going to generate any revenue or bill amount and will not cause the

    billing extension to be called. This category includes billing extensions that calculate revenueand invoice amounts based on 0i2 a function of the revenue and invoice amounts included ondraft revenue and invoices, or 0ii2 the attributes of a group of transactions included on draftinvoices.

    The following table shows an example of transaction dependent and transaction independent billing extensions. Billing extension 1, which is transaction dependent, calculates 1;@ of theinvoice amount. Billing extension 3, which is transaction independent, bills =1;; per period

    regardless of amount invoiced in that period.

    $utomatic Event $mount

    "eriod -nvoice0umber-nvoiceCredited

    -nvoice$mount

    %ransactionDependent

    %ransaction-ndependent

    1 1 1;;; 1;; 1;;

    3 3 1 ->;; ->;

    4 1>;; 1>; 1;;

    4 < - - 1;;

    ummar : 3;;; 3;; 4;;

    %able 1 & 113. %ransaction -ndependent Example: Example Events '"age 2 of 2(

    #elationship bet!een Calling "lace and %ransaction -ndependent

    The parameters for calling place and transaction independent are related.

    *ou should call any transaction dependent billing extension in both regular and ad&ustment processing. This will ensure that all ad&ustments, including those that do not result in a new non-crediting amount, are properly accounted for. (or example, you may have a non-billablead&ustment which reverses amounts, but does not process any new non-crediting amounts.

    Page 9 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    10/24

    *ou only need to call your transaction independent billing extension once during processing for a pro&ect, which can be done during regular processing. *ou typically do not call transactionindependent billing extensions during ad&ustment processing.

    The table below summarizes how you should set up the calling place and transaction independent

    parameters in your billing extension definition, based on the type of billing extension calculation.

    Billing Extension Calculation #egular $d/ustment %ransaction -ndependent

    Based solely on transactions

    Based on inputs other than transactions

    %able 1 & 114. Calling "lace and %ransaction -ndependent "arameters '"age 1 of 1(

    There are exceptions to the general rule described in Table 1 - 11< . *ou may define a billingextension as transaction dependent, but to be called only during regular processing. (or example,you want to charge interest on outstanding invoices, but only want to include the interest on aninvoice that has other transactions included on it. The interest calculation itself is a transactionindependent calculation, but you define it as transaction dependent so that it is calculated onlywhen other transactions are processed for an invoice. *ou do not want to create invoices withonly an interest amount.

    "ro/ect& pecific

    *ou need to determine if your billing extension implements a company policy across pro&ects orif it is applicable only to specific pro&ects for which it is negotiated.

    Project-specific billing extensions are those methods which are applicable only to specific pro&ects for which they are negotiated. ro&ect users assign these billing extensions to pro&ectsand top tas)s" you cannot assign these billing extensions to pro&ect types.

    Non-project-specific billing extensions are those methods which implement company policyacross pro&ects. *ou assign these billing extensions to pro&ect types" the billing extension appliesto all pro&ects of that pro&ect type. ro&ect users cannot assign these billing extensions to pro&ects.

    uggestion: *ou can include conditional logic in your procedure to allow exceptions to pro&ecttype rules.

    Event $ttributes

    When designing billing extensions, you can specify the attributes of automatic events that arecreated by billing extensions. *ou can use the following default values or override the defaultsfor any of these attributes.

    Event $ttribute Comments

    Page 10 of 24

    http://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex04.htm#t_calchttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex04.htm#t_calchttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex04.htm#t_calc
  • 8/9/2019 Designing Billing Extensions in Oracle

    11/24

    vent Type !efaults to event type on billing extension" event type must have an eventtype classification of $ utomatic .

    vent !escription !efaults to event description on billing extension.

    vent +rganization !efaults to managing organization of pro&ect or tas) to which the event isassigned.

    Completion !ate $ccrue through date for events created during revenue generation, billthrough date for events created during invoice generation.

    :evenue $mount (or billing extensions called in revenue generation, must specify revenueamount.(or billing extensions called in invoice generation, can optionally specifyrevenue amount" revenue amount is not processed until invoice on whichthe event is billed is released.

    Bill $mount (or billing extensions called in invoice generation, must specify bill

    amount.(or billing extensions called in revenue generation, can optionally specify bill amount" bill amount is not processed until revenue for the event isaccrued.

    !escriptive(lexfield %egments

    Can pass any value as long as the value is valid with the descriptiveflexfields you have defined for events.

    $udit Columns invents

    (or values used in billing extension calculations. ?+T # not displayed tothe user, but available in the table. %ee# 'nsert events .

    %able 1 & 115. '"age 2 of 2( $ttributes of $utomatic Events

    Budget $ttributes

    When designing billing extensions, you can specify the attributes of budgets that are used by billing extensions. *ou can use the following default values or override the defaults for any ofthese attributes.

    Budget $ttribute Comments

    Cost Budget Type Code !efaults to $pproved Cost Budget.

    :evenue Budget Type Code !efaults to $pproved :evenue Budget.

    %able 1 & 11*. '"age 1 of 1( $ttributes of Budgets

    Page 11 of 24

    http://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex06.htm#p_iehttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex06.htm#p_iehttp://docs.oracle.com/cd/A60725_05/html/comnls/us/pa/billex06.htm#p_ie
  • 8/9/2019 Designing Billing Extensions in Oracle

    12/24

    Writing Billing Extension Procedures

    Oracle Projects revenue and invoice generation programs call your billing extensionprocedures which de ne the logic to calculate and create automatic eventsaccording to your rules.

    *our procedure can call other procedures or views. *ou can use predefined procedures andviews, or you can write your own procedures. We discuss these predefined procedures and viewsin more detail in the pages that follow.

    Procedure emplate

    Oracle Projects provides a template pac!age and procedure that you use as thebasis of your billing extension procedures.

    rint out and review the following files before you begin writing billing extensions. The files are

    located in the +racle ro&ects admin6sql directory.

    PAXITMPS.pls

    Billing Extension P !" ge Spe!i#! tion Te$pl te. T%is #le!ont ins t%e p&o!e'(&e t% t )o( $o'i*) to i$ple$ent +illingextensions. ,o( ! n 'e#ne s $ n) p&o!e'(&es s )o( li"e-it%in t%is p !" ge o& -it%in t%e p&e'e#ne' p&o!e'(&e.

    PAXITMPB.pls

    Billing Extension P !" ge Bo') Te$pl te. I* )o( !&e tep&o!e'(&es -it%in t%e p !" ge o(tsi'e t%e p&e'e#ne'p&o!e'(&e )o( $(st lso $o'i*) t%is #le.

    The following table lists the parameters that +racle ro&ects provides for the billing extension procedure.

    P & $ete&/sge

    T)pe es!&iption

    "#project#id $% %&'BE( $denti er of the project of the billing assignment.

    "#top#tas!#id ) $% %&'BE( $denti er of the top tas! of the billing assign. his parameter has a value in the following

    cases* +, Billing extension assigned to top tas!-, Project for which a billing extension isapplicable is funded at the top tas! level. hebilling extension is executed once for eachauthori ed top tas! belonging to the project.

    "#calling#proces $% /0(120 3peci es whether the revenue or invoice

    Page 12 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    13/24

    s (- program is calling the billing extension. hepossible values of this parameter are Revenue orInvoice .

    "#calling#place $% /0(120(-

    3peci es where the billing extension is called inthe revenue or invoice program. Possible valuesare P(E4 PO3 4 (E54 or 067.

    "#amount $% %&'BE( he amount entered on the billing assignment.

    "#percentage $% %&'BE( he percentage entered on the billingassignment.

    "#rev#or#bill#date

    $% 60 E 3peci es the accrue through date if called byrevenue generation4 or the bill through date ifcalled by invoice generation.

    "#bill#extn#assignment#id

    $% %&'BE( $6 of the billing assignment being processed.&se this to select information 8such asdescriptive 9ex eld values, from the billingassignment.

    "#bill#extension #id

    $% %&'BE( $6 of the billing extension being processed. &sethis to select information 8such as descriptive9ex eld values, from the billing extension

    de nition.

    "#re:uest#id $% %&'BE( (e:uest $6 of the current run.

    ) ;ou cannot create project level events for projects using tas! level funding. ;oumust write your billing extensions so that they wor! if they are called with orwithout this parameter.

    T +le 1 117. P ge 2 o* 2 Billing Extension P & $ete&s

    Page 13 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    14/24

    /iews and Procedures ;ou 1an &se

    Oracle Projects provides public4 prede ned procedures and views that you can usewithin your billing extension procedures for the 5enerate 6raft (evenue and5enerate 6raft $nvoice processes to derive amounts and create events. hese

    procedures are created in a pac!age named p +illing p(+ .ote ;ou cannot use the public billing extension procedures or views by

    themselves or from any other client extension.

    'n the pages that follow, we provide you with a description of each procedure, information aboutthe parameters available for the procedure, and any additional information you need to use the

    procedure in your billing extension. 5se these procedures and views to#

    o 1alculate amounts

    o

    $dentify transactions processed in the current runo $nsert events

    o (etrieve budget amounts

    o 2andle error conditions

    1alculating 0mounts

    Oracle Projects provides two views that you can use to identify detail expenditureitems included on draft revenue and draft invoices processed in a given run. &sethese views in your calculations for transaction dependent billing extensions. heviews display the detail transactions processed for the context in which a billingextension is called4 which consists of a project4 a top tas! 8if tas! level assignment,4a calling place4 and a re:uest $6.

    o P0#B$

  • 8/9/2019 Designing Billing Extensions in Oracle

    15/24

    the billing extension called during the deletion processing of revenuegeneration.

    o P0#B$

  • 8/9/2019 Designing Billing Extensions in Oracle

    16/24

    "#organi ation#id

    $% %&'BE( $6 of event organi ation.

    "#completion#date

    $% 60 E 1ompletion date of event.

    "#event#description

    $% /0(120(-

    6escription of event. $f you do not specify adefault event description4 you must provide avalue here.

    "#event#num#reversed

    $% %&'BE( Original automatic event number.

    "#attribute#category

    $% /0(120(-

    6escriptive 9ex eld context.

    "#attribute+=+> $% /0(120(-

    6escriptive 9ex eld segments.

    "#audit#amounts+=+>

    $% %&'BE( 0udit amounts for events.

    "#cost#budget#type#code

    $% /0(120(-

    0udit cost budget type code.

    "#rev#budget#type#code

    $% /0(120(-

    0udit revenue budget type code.

    "#error#message

    O& /0(120(-

    Error message text.

    "#status O& %&'BE( 3tatus indicating whether an error occurred./alid values are* ?> 3uccessful validation @>Oracle error 8message will be written into a log

    le, A> 0pplication error

    T +le 1 118. P ge 2 o* 2 Inse&t E ent P & $ete&s

    ote $f the billing extension is called by revenue generation only4 you must set therevenue amount to a non ero number. ;ou can also set the bill amount. $f therevenue amount is positive4 the bill amount must also be positive.

    Page 16 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    17/24

    ote $f the billing extension is called by invoice generation4 you must set the billamount to a non ero number. ;ou can also set the revenue amount. $f the billamount is positive4 the revenue amount must also be positive.

    o $f the billing extension creates a new automatic event from a

    transaction adjustment4 the billing extension loo!s for the originalevent number 8"#event#num#reversed,. $f the billing extension nds novalue4 you will receive the error message ;ou must have speci edoriginal event number for 067 automatic event.

    ote Oracle Projects provides a view that you can use to identify to originalautomatic event information of the current project4 top tas!4 and the creditedinvoices of the current re:uest*

    P0#B$

  • 8/9/2019 Designing Billing Extensions in Oracle

    18/24

    tas!.

    p#cost#budget#type#code

    $% /0(120(-

    1ost budget type code to be used forcalculating cost budget amount. $f this value isnot speci ed4 the cost budget type in thebilling extension setup table is used.$f no value is entered in the billing extensionsetup table4 the 0pproved 1ost Budget is used.

    p#rev#budget#type#codeA

    $% /0(120(-

    (evenue budget type code to be used forcalculating revenue budget amount. $f thisvalue is not speci ed4 the revenue budget typein the billing extension setup table is used.$f no value is entered in the billing extensionsetup table4 the 0pproved (evenue Budget is

    used.

    "#cost#budget#type#code

    O& /0(120(-

    1ost budget type code that was used forcalculating the cost budget in this public 0P$.

    "#rev#budget#type#code

    O& /0(120(-

    (evenue budget type code that was used forcalculating the revenue budget in this public0P$.

    "#error#message O& /0(120

    (-

    Error message text.

    "#status O& %&'BE( 3tatus indicating whether an error occurred./alid values are* ?> 3uccessful validation @>Oracle error 8message will be written into a log

    le, A> 0pplication error

    T +le 1 119. P ge 3 o* 3 et B('get A$o(nt P & $ete&s

    Error 2andling

    &se the insert#message procedure to create debugging and error messages in theP0#B$

  • 8/9/2019 Designing Billing Extensions in Oracle

    19/24

    P !" ge.P&o!e'(&epa#billing#pub.insert#message

  • 8/9/2019 Designing Billing Extensions in Oracle

    20/24

    0dditional 1onsiderations for Writing Procedures

    ;ou should understand the following issues and determine how they a ect yourP

  • 8/9/2019 Designing Billing Extensions in Oracle

    21/24

    $t is possible for one or more billing extensions to create events in the same callingplace in the same run. 0ll billing extensions are executed in the calling place beforeany of the automatic events are included on the invoice or revenue. ;ou need toconsider the issues in the case in which one billing extension is dependent on theamount of other events processed in that calling place in the same run.

    (or example, assume you are processing a surcharge extension and a retention extension in theregular processing section of invoice generation. The surcharge is executed before the retention

    based on the processing order of the billing extension definition. The surcharge event is created but is not yet included on the invoice. The retention extension relies on the total invoice amount.To get the total invoice amount, the retention extension must account for the surcharge eventwhich is not yet included on the invoice.

    *ou must include logic in your billing extension to read any automatic event created for pro&ectsand tas)s in the same run and calling place.

    ips on Writing and 6ebugging Procedures

    Page 21 of 24

  • 8/9/2019 Designing Billing Extensions in Oracle

    22/24

    ;ou can ma!e testing and debugging your billing extension procedure much easierby writing your procedure in a very methodical4 structured approach as suggestedbelow. ;our functional and technical resources should wor! together to validate thebilling extension.

    3tep + 1reate own billing extension to create event of a given amountThe first step is to create a very simple billing extension using the template files. *ou performthese steps to create an automatic event using a billing extension.

    o 1opy the template les to your own les

    o 1hange the pac!age and procedure names

    o 0dd one call to the insert#event procedure to create an event of agiven amount

    o 3tore the procedure in the database

    o 6e ne a billing extension in Oracle Projects using this procedure

    o 0ssign the billing extension to a test project

    o Process the project through revenue and invoice generationC youshould run the process that is appropriate for the billing extension

    o /erify that an event is created for the given amount

    3tep - est each 3G< statement in 3G

  • 8/9/2019 Designing Billing Extensions in Oracle

    23/24

    he views use P

  • 8/9/2019 Designing Billing Extensions in Oracle

    24/24

    o Billable to non=billable reclassi cation

    Once you have veri ed all of the integrated test cases4 you have completed yourbilling extension implementation.

    :t%e& e+(gging Tips

    o 'a!e sure that the name seeded in pa#billing#extensions.procedure#name is exactly the same as thepac!age.procedure#name if your procedure is stored in the database

    o 'a!e sure that the pac!age.procedure#name does not exceed H>characters

    o 'a!e sure that your procedure is compiled and stored in the database

    o 'a!e sure that there is not another invalid or outdated procedureexecuting instead of the procedure you intend to execute. $nactivate allother extensions at the appropriate level to ensure that only theextension you expect to execute is executing.

    P g 24 f 24