Additional Business Rules |
Checking Length Short Project Code
Exact Online does not accept project codes (cost units) with more than 8 positions. The short code for a project is passed to Exact Online. Install the following additional business rule to make sure that the short code meets the requirements of Exact Online:
View |
bubs_projecten_v |
---|---|
Action |
Mutation |
Group |
Checks for Exact Online |
Expression |
-- -- $Header: http://svn.invantive.com/repos/p104/trunk/help/nl/manual/Topics/bubs-installatie-exact-online-aanvullende-bedrijfsregels.xml 19891 2012-10-09 13:23:03Z gle3 $ -- exactonline-check-1 -- if :action_moment = 'B' then if :last.pjt_code_kort is null and length(:last.pjt_code) <= 8 then :last.pjt_code_kort := :last.pjt_code; end if; -- if :last.pjt_code_kort is null then bubs_error_handler.handle_error ( '{res:bubs_eol_required_short_code?' || bubs#vertalingen.escape_parameter(:last.pjt_code) || '}' ); end if; -- if length(:last.pjt_code_kort) > 8 then bubs_error_handler.handle_error ( '{res:bubs_eol_project_short_code_too_long?' || bubs#vertalingen.escape_parameter(:last.pjt_code) || '}' ); end if; end if; |
Explanation |
Check if the short project code is filled and has a maximum of 8 positions. Exact Online does not accept project code longer than 8 positions. |
Checks Contacts
Every customer and supplier must have a contact person, that contact person must be linked to one organisation only, and a first and last name must be specified. Install the next additional business rule to check this:
View |
bubs_leveranciers_v |
---|---|
Action |
Mutation |
Group |
Checks for Exact Online |
Expression |
-- -- $Header: http://svn.invantive.com/repos/p104/trunk/help/nl/manual/Topics/bubs-installatie-exact-online-aanvullende-bedrijfsregels.xml 19891 2012-10-09 13:23:03Z gle3 $ -- exactonline-check-2 -- declare l_cnt_usages pls_integer; l_gbr_cp_achternaam bubs_gebruikers_v.gbr_achternaam%type; l_gbr_cp_voornaam bubs_gebruikers_v.gbr_voornaam%type; begin if :action_moment = 'B' and ( :new.lvr_klant_vlag = 'Y' or :new.lvr_opdrachtnemer_vlag = 'Y' ) then -- -- Check that a primary contactperson is available. -- if :last.gbr_cp_naam is null then bubs_error_handler.handle_error ( '{res:bubs_eol_prim_cp_required?' || bubs#vertalingen.escape_parameter(:last.lvr_code) || '&' || bubs#vertalingen.escape_parameter(:last.lvr_naam) || '}' ); else select gbr_cp.gbr_achternaam , gbr_cp.gbr_voornaam into l_gbr_cp_achternaam , l_gbr_cp_voornaam from bubs_gebruikers_v gbr_cp where 1=1 and gbr_cp.gbr_naam = :last.gbr_cp_naam ; if ( l_gbr_cp_achternaam is null and l_gbr_cp_voornaam is null ) then bubs_error_handler.handle_error ( '{res:bubs_eol_prim_cp_required_namepart?' || bubs#vertalingen.escape_parameter(:last.lvr_code) || '&' || bubs#vertalingen.escape_parameter(:last.lvr_naam) || '&' || bubs#vertalingen.escape_parameter(:last.gbr_cp_naam) || '}' ); else -- -- Check that a person is only available on at most one organisation. -- select coalesce(count(*), 0) cnt into l_cnt_usages from bubs_leveranciers_v lvr where 1=1 and lvr.gbr_cp_naam = :last.gbr_cp_naam and lvr.lvr_id <> :last.lvr_id ; if l_cnt_usages >= 1 then bubs_error_handler.handle_error ( '{res:bubs_eol_prim_cp_unique?' || bubs#vertalingen.escape_parameter(:last.gbr_cp_naam) || '}' ); end if; end if; end if; end if; end; |
Explanation |
Make sure that a contact is entered for clients and contractors and it is not used more than one time. |
Checks Persons
Each person which writes hours can lead to invoicing in Exact Online. The cost center is based on unique initials. Therefore the unique initials must always be filled in:
View |
bubs_gebruikers_v |
---|---|
Action |
Mutation |
Group |
Checks for Exact Online |
Expression |
-- -- $Header: http://svn.invantive.com/repos/p104/trunk/help/nl/manual/Topics/bubs-installatie-exact-online-aanvullende-bedrijfsregels.xml 19891 2012-10-09 13:23:03Z gle3 $ -- exactonline-check-3 -- if :action_moment = 'B' and :last.gbr_initialen is null and :last.gbr_tijdschrijver_vlag = 'Y' then bubs_error_handler.handle_error ( '{res:bubs_eol_initials_required?' || bubs#vertalingen.escape_parameter(:last.gbr_naam) || '}' ); end if; |
Explanation |
Make sure that a contact is entered for clients and contractors and it is not used more than one time. |