Refactored EU tax plugin code to reduce code duplication and added tests.
This commit is contained in:
parent
6bdf5f42ed
commit
2e5250afe1
3 changed files with 326 additions and 223 deletions
|
|
@ -31,18 +31,29 @@ my $quiet; # this line required
|
|||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
addEuTaxRecheckWorkflow( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
#sub exampleFunction {
|
||||
# my $session = shift;
|
||||
# print "\tWe're doing some stuff here that you should know about... " unless $quiet;
|
||||
# # and here's our code
|
||||
# print "DONE!\n" unless $quiet;
|
||||
#}
|
||||
sub addEuTaxRecheckWorkflow {
|
||||
my $session = shift;
|
||||
|
||||
print "\tAdding EU Tax plugin VAT number recheck workflow..." unless $quiet;
|
||||
|
||||
my $workflow = WebGUI::Workflow->create( $session, {
|
||||
title => 'Recheck unverified EU VAT numbers',
|
||||
description =>
|
||||
'Utility workflow that automatically rechecks VAT numbers that could not be checked when they were submitted',
|
||||
enabled => 1,
|
||||
type => 'None',
|
||||
mode => 'parallel',
|
||||
}, 'taxeurecheckworkflow01' );
|
||||
$workflow->addActivity( 'WebGUI::Workflow::Activity::RecheckVATNumber', 'taxeurecheckactivity01' );
|
||||
|
||||
print "Done\n" unless $quiet;
|
||||
}
|
||||
|
||||
|
||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue