@@ -, +, @@ --- C4/Budgets.pm | 7 +++ acqui/acqui-home.pl | 24 +++++++ admin/aqbudgetperiods.pl | 8 ++- admin/aqbudgets.pl | 12 +++- admin/currency.pl | 9 +++ koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 6 ++ .../prog/en/includes/budgets-active-currency.inc | 16 ++++- .../prog/en/includes/onboardinginclude1.inc | 70 +++++++++++++++++++++ .../prog/en/includes/onboardinginclude2.inc | 65 +++++++++++++++++++ .../prog/en/includes/onboardinginclude3.inc | 73 ++++++++++++++++++++++ .../prog/en/modules/acqui/acqui-home.tt | 48 ++++++++++++-- .../prog/en/modules/admin/aqbudgetperiods.tt | 2 +- .../prog/en/modules/admin/aqbudgets.tt | 3 +- .../prog/en/modules/labels/label-home.tt | 5 +- labels/label-home.pl | 12 ++++ 15 files changed, 347 insertions(+), 13 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude1.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude3.inc --- a/C4/Budgets.pm +++ a/C4/Budgets.pm @@ -146,6 +146,13 @@ sub GetPeriodsCount { } # ------------------------------------------------------------------- + +sub GetHighestBudgetPeriod{ + my $dbh = C4::Context->dbh; + warn my $data = $dbh->selectrow_array("SELECT MAX(budget_period_id) FROM aqbudgetperiods"); + return $data; +} +# ------------------------------------------------------------------- sub CheckBudgetParent { my ( $new_parent, $budget ) = @_; my $new_parent_id = $new_parent->{'budget_id'}; --- a/acqui/acqui-home.pl +++ a/acqui/acqui-home.pl @@ -122,11 +122,35 @@ $template->param( suggestions_count => $suggestions_count, ); + + + + + +my $aqstep; my $cur = Koha::Acquisition::Currencies->get_active; + if ( $cur ) { $template->param( currency => $cur->currency, ); } +my $budget = GetPeriodsCount(); +my $budgetid = C4::Budgets->GetHighestBudgetPeriod(); +if (!@budget_loop){ +if (!$cur) { + $aqstep = 1; + $template->param( step => $aqstep ); +} elsif ($budget && $budgetid == 1){ + $aqstep = 3; + $template->param( step => $aqstep ); +} elsif ($budgetid > 1) { + print $query->redirect("/cgi-bin/koha/admin/aqbudgetperiods.pl"); + exit; +} else { + $aqstep = 2; + $template->param( step => $aqstep ); +} +} output_html_with_http_headers $query, $cookie, $template->output; --- a/admin/aqbudgetperiods.pl +++ a/admin/aqbudgetperiods.pl @@ -113,14 +113,18 @@ if ( $op eq 'add_form' ) { elsif ( $op eq 'add_validate' ) { ## add or modify a budget period (confirmation) - ## update budget period data +## update budget period data if ( $budget_period_id ne '' ) { $$budget_period_hashref{$_}||=0 for qw(budget_period_active budget_period_locked); my $status=ModBudgetPeriod($budget_period_hashref); } else { # ELSE ITS AN ADD my $budget_period_id=AddBudgetPeriod($budget_period_hashref); - } + my $stepfund = $input->param( 'step' ); + $template->param( stepfund => $stepfund ); + print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl"); + exit; +} $op='else'; } --- a/admin/aqbudgets.pl +++ a/admin/aqbudgets.pl @@ -76,8 +76,6 @@ my $budget_permission = $input->param('budget_permission'); my $budget_users_ids = $input->param('budget_users_ids'); my $filter_budgetbranch = $input->param('filter_budgetbranch') // ''; my $filter_budgetname = $input->param('filter_budgetname'); - - # ' ------- get periods stuff ------------------' # IF PERIODID IS DEFINED, GET THE PERIOD - ELSE JUST GET THE ACTIVE PERIOD BY DEFAULT my $period; @@ -180,6 +178,7 @@ if ($op eq 'add_form') { # END $OP eq ADD_FORM #---------------------- DEFAULT DISPLAY BELOW --------------------- + # called by default form, used to confirm deletion of data in DB } elsif ($op eq 'delete_confirm') { @@ -221,6 +220,15 @@ if ($op eq 'add_form') { $budget_hash->{budget_id} = AddBudget( $budget_hash ); ModBudgetUsers($budget_hash->{budget_id}, @budgetusersid); $budget_modified = 1; + + my $fundcreation = $input->param('fundcreation'); + + if ($fundcreation eq "onboarding"){ + my $step = $input->param('step'); + $template->param('step' => $step); + print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl"); + exit; + } } my $set_owner_to_children = $input->param('set_owner_to_children'); --- a/admin/currency.pl +++ a/admin/currency.pl @@ -89,6 +89,15 @@ if ( $op eq 'add_form' ) { } $searchfield = q||; $op = 'list'; + + my $aqcurrency = $input->param('aqcurrency'); + if ($aqcurrency == 1) { + my $step = $input->param( 'step' ); + $template->param( step => $step ); + print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl"); + exit; + } + } elsif ( $op eq 'delete_confirm' ) { my $currency = Koha::Acquisition::Currencies->find($currency_code); --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -2995,3 +2995,9 @@ fieldset.rows + fieldset.action { .yui-u .rows li p label.widelabel { width: auto; } + +div#aqhelp{ + background-color:#EDF4F6; + padding:20px; + width:50%; +} --- a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-active-currency.inc @@ -1,14 +1,26 @@ + + [% IF ( currency ) %] [% IF ( not hide ) %]
Currency = [% currency %]
[% END %] [% ELSE %] -Please specify an active currency.
[% ELSE %]Your administrator must specify an active currency.
[% END %] -Start by completing this form to create a currency which you will be used to create your first budget and fund.
+ A fund is the accounting value you use to create orders
Create a budget which is the highest level value in acquisitions accountancy.
+ After creating this budget you will be prompted to create a fund which is what you will use to set up orders.
+
Fill out this form to create a fund which will be assigned to the budget you just created.
+ A fund is an accounting value you will use to set up orders
A vendor is the organisation your institution purchases items from i.e. suppliers
+ You must create a vendor before you can create any orders
A basket is the conceptual container that holds orders. Each basket is assigned to a single vendor so you can perform multiple seperate orders from a single vendor simultaneously. Because of its reliance on vendor the basket must be created after the vendor
+ To create a basket, click the 'New basket' button on the Vendor Information page which is displayed after you create a vendor +An order is a assignment of items purchased from a single vendor at a single time
+ You create an order by clicking "Add to basket" in the Basket page. From here you can choose the item(s) you want to purchase from existing MARC records in your Koha catalogue, subscription, new item record, external source, staged file (bibliographic file in the process of being uploaded), or from popularly held items. + +