View | Details | Raw Unified | Return to bug 18002
Collapse All | Expand All

(-)a/C4/Budgets.pm (-1 / +9 lines)
Lines 148-156 sub GetPeriodsCount { Link Here
148
148
149
# -------------------------------------------------------------------
149
# -------------------------------------------------------------------
150
150
151
=head2 GetHighestBudgetPeriod
152
153
    &my $budgetid = C4::Budgets->GetHighestBudgetPeriod();
154
155
Retrieve the highest budget
156
157
=cut
158
151
sub GetHighestBudgetPeriod{
159
sub GetHighestBudgetPeriod{
152
    my $dbh = C4::Context->dbh;
160
    my $dbh = C4::Context->dbh;
153
    warn my $data = $dbh->selectrow_array("SELECT MAX(budget_period_id) FROM aqbudgetperiods");
161
    my $data = $dbh->selectrow_array("SELECT MAX(budget_period_id) FROM aqbudgetperiods");
154
    return $data;
162
    return $data;
155
}
163
}
156
# -------------------------------------------------------------------
164
# -------------------------------------------------------------------
(-)a/acqui/acqui-home.pl (-17 / +19 lines)
Lines 53-58 my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( Link Here
53
53
54
my $status           = $query->param('status') || "ASKED";
54
my $status           = $query->param('status') || "ASKED";
55
my $suggestions_count       = CountSuggestion($status);
55
my $suggestions_count       = CountSuggestion($status);
56
my $userid = $query->param('userid');
56
57
57
my $budget_arr = GetBudgetHierarchy;
58
my $budget_arr = GetBudgetHierarchy;
58
59
Lines 124-134 $template->param( Link Here
124
    suggestions_count   => $suggestions_count,
125
    suggestions_count   => $suggestions_count,
125
);
126
);
126
127
127
128
129
130
131
132
my $aqstep;
128
my $aqstep;
133
my $cur = Koha::Acquisition::Currencies->get_active;
129
my $cur = Koha::Acquisition::Currencies->get_active;
134
130
Lines 141-158 if ( $cur ) { Link Here
141
my $budget = GetPeriodsCount();
137
my $budget = GetPeriodsCount();
142
my $budgetid = C4::Budgets->GetHighestBudgetPeriod();
138
my $budgetid = C4::Budgets->GetHighestBudgetPeriod();
143
if (!@budget_loop){
139
if (!@budget_loop){
144
if (!$cur) {
140
    if (!$cur) {
145
    $aqstep = 1;
141
        $aqstep = 1;
146
    $template->param( step => $aqstep );
142
        $template->param( step => $aqstep );
147
} elsif ($budget && $budgetid == 1){
143
    } elsif ($budget && $budgetid == 1){
148
    $aqstep = 3;
144
        $aqstep = 3;
149
    $template->param( step => $aqstep );
145
        $template->param( step => $aqstep );
150
} elsif ($budgetid > 1) {
146
    } elsif ($budgetid > 1) {
151
    print $query->redirect("/cgi-bin/koha/admin/aqbudgetperiods.pl");
147
        print $query->redirect("/cgi-bin/koha/admin/aqbudgetperiods.pl");
152
    exit;
148
        exit;
153
} else  {
149
    } else  {
154
    $aqstep = 2;
150
        $aqstep = 2;
155
    $template->param( step => $aqstep );
151
        $template->param( step => $aqstep );
152
    }
156
}
153
}
154
155
if ( C4::Context->IsSuperLibrarian() ) {
156
    my $displayonboard = 1;
157
    $template->param( displayonboard => $displayonboard );
157
}
158
}
159
158
output_html_with_http_headers $query, $cookie, $template->output;
160
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css (+34 lines)
Lines 3034-3036 div#aqhelp{ Link Here
3034
    padding:20px;
3034
    padding:20px;
3035
    width:50%;
3035
    width:50%;
3036
}
3036
}
3037
3038
#onboardingModal{
3039
    z-index:1;
3040
    background-color:#EDF4F6;
3041
    padding: .2em 0;
3042
    width: 32%;
3043
    float:right;
3044
    position:relative;
3045
    top: 10px;
3046
    padding-left:10px;
3047
    padding-right:10px;
3048
    border-radius:10px;
3049
}
3050
3051
#acqui-onboard{
3052
    text-align: center;
3053
    padding-bottom:15px;
3054
}
3055
3056
#currency_code_onboard{
3057
    width:40%;
3058
}
3059
3060
#budget_period_description_onboard{
3061
    width:55%;
3062
}
3063
3064
#budget_name_onboard{
3065
    width:55%;
3066
}
3067
3068
#budget_code_onboard{
3069
    width:55%;
3070
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude1.inc (-17 / +4 lines)
Lines 1-21 Link Here
1
<style type="text/css">
2
    #onboardingModal{
3
        z-index:1;
4
        background-color:#EDF4F6;
5
        padding:20px;
6
        width:70%;
7
        position:absolute;
8
        left:auto;
9
        top:auto;
10
        right:auto;
11
        bottom:auto;
12
}
13
</style>
14
15
<div id="onboardingModal">
1
<div id="onboardingModal">
16
        <h2> Acquisition onboarding wizard</h2>
2
        <h1 id="acqui-onboard"> Acquisition onboarding wizard</h1>
3
17
        <h3> This onboarding wizard will take you through the process of setting up Acquistions </h3>
4
        <h3> This onboarding wizard will take you through the process of setting up Acquistions </h3>
18
        <p>Start by completing this form to create a currency which you will be used to create your first budget and fund.<br>
5
        <p>Start by completing this form to create a currency which you will use to create your first budget and fund.<br>
19
        A fund is the accounting value you use to create orders</p>
6
        A fund is the accounting value you use to create orders</p>
20
         <form action="/cgi-bin/koha/admin/currency.pl" name="Aform" method="post" class="validated">
7
         <form action="/cgi-bin/koha/admin/currency.pl" name="Aform" method="post" class="validated">
21
           <input type="hidden" name="op" value="add_validate" />
8
           <input type="hidden" name="op" value="add_validate" />
Lines 33-39 Link Here
33
                          <input type="hidden" name="currency_code" id="currency" value="[% currency.currency %]" />[% currency.currency %]
20
                          <input type="hidden" name="currency_code" id="currency" value="[% currency.currency %]" />[% currency.currency %]
34
                      [% ELSE %]
21
                      [% ELSE %]
35
                          <label for="currency_code" class="required">Currency: </label>
22
                          <label for="currency_code" class="required">Currency: </label>
36
                          <input type="text" name="currency_code" id="currency_code" size="50" maxlength="50" required="required" class="required" /> <span class="required">Required</span>
23
                          <input type="text" name="currency_code" id="currency_code_onboard" size="50" maxlength="50" required="required" class="required" /> <span class="required">Required</span>
37
                      [% END %]
24
                      [% END %]
38
                </li>
25
                </li>
39
                      <input type="hidden" name="rate" id="rate" size="10" maxlength="10" value=1 />
26
                      <input type="hidden" name="rate" id="rate" size="10" maxlength="10" value=1 />
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc (-16 / +3 lines)
Lines 1-23 Link Here
1
<style type="text/css">
2
 #onboardingModal{
3
     z-index:1;
4
     background-color:#EDF4F6;
5
     padding:20px;
6
     width:70%;
7
     position:absolute;
8
     left:auto;
9
     top:auto;
10
     right:auto;
11
     bottom:auto;
12
}
13
</style>
14
    <div id="onboardingModal">
1
    <div id="onboardingModal">
15
    [% IF  displayonboardscreen == "acquisitions" %]
2
    [% IF  displayonboardscreen == "acquisitions" %]
16
        <h2> Acquisition onboarding wizard</h2>
3
        <h1 id="acqui-onboard"> Acquisition onboarding wizard</h1>
17
        <p> Create a budget which is the highest level value in acquisitions accountancy. <br>
4
        <p> Create a budget which is the highest level value in acquisitions accountancy. <br>
18
        After creating this budget you will be prompted to create a fund which is what you will use to set up orders.
5
        After creating this budget you will be prompted to create a fund which is what you will use to set up orders.
19
        </p>
6
        </p>
20
        <b>If you have previously created a budget (which was subsequently deleted) then you will be redirected to the Budget Administration page after creating a budget using this form. On the Budget Administration page click Actions->Add fund to create a fund</b>
7
        <b>If you have previously created a budget (which was subsequently deleted) then you will be redirected to the budget administration page after creating a budget using this form. On the budget administration page click Actions->Add fund to create a fund</b>
21
        <h3> Create a budget</h3>
8
        <h3> Create a budget</h3>
22
        <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
9
        <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
23
            <fieldset class="rows">
10
            <fieldset class="rows">
Lines 39-45 Link Here
39
26
40
                    <li>
27
                    <li>
41
                        <label class="required" for="budget_period_description">Description: </label>
28
                        <label class="required" for="budget_period_description">Description: </label>
42
                        <input type="text" id="budget_period_description" name="budget_period_description" size="48" maxlength="80" value="[% budget_period_description %]" />
29
                        <input type="text" id="budget_period_description_onboard" name="budget_period_description" size="48" maxlength="80" value="[% budget_period_description %]" />
43
                    </li>
30
                    </li>
44
31
45
                    <li>
32
                    <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude3.inc (-18 / +3 lines)
Lines 1-21 Link Here
1
[% USE Price %]
1
[% USE Price %]
2
3
<style type="text/css">
4
  #onboardingModal{
5
       z-index:1;
6
       background-color:#EDF4F6;
7
       padding:20px;
8
       width:70%;
9
       position:absolute;
10
       left:auto;
11
       top:auto;
12
       right:auto;
13
       bottom:auto;
14
}
15
</style>
16
17
<div id="onboardingModal">
2
<div id="onboardingModal">
18
    <h2> Acquisition onboarding wizard</h2>
3
    <h1 id="acqui-onboard"> Acquisition onboarding wizard</h1>
19
    <p> Fill out this form to create a fund which will be assigned to the budget you just created. <br>
4
    <p> Fill out this form to create a fund which will be assigned to the budget you just created. <br>
20
    A fund is an accounting value you will use to set up orders</p>
5
    A fund is an accounting value you will use to set up orders</p>
21
    <br>
6
    <br>
Lines 46-57 Link Here
46
                </li>
31
                </li>
47
                <li>
32
                <li>
48
                    <label class="required"  for="budget_code">Fund code: </label>
33
                    <label class="required"  for="budget_code">Fund code: </label>
49
                    <input type="text" name="budget_code" id="budget_code" value="[% budget_code %]" size="30" />
34
                    <input type="text" name="budget_code" id="budget_code_onboard" value="[% budget_code %]" size="30" />
50
                </li>
35
                </li>
51
36
52
                <li>
37
                <li>
53
                    <label class="required" for="budget_name">Fund name: </label>
38
                    <label class="required" for="budget_name">Fund name: </label>
54
                    <input type="text" name="budget_name" id="budget_name" value="[% budget_name %]" size="60" />
39
                    <input type="text" name="budget_name" id="budget_name_onboard" value="[% budget_name %]" size="60" />
55
                </li>
40
                </li>
56
41
57
                <li>
42
                <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-23 / +1 lines)
Lines 111-117 $(document).ready(function() { Link Here
111
111
112
[% INCLUDE 'acquisitions-toolbar.inc' %]
112
[% INCLUDE 'acquisitions-toolbar.inc' %]
113
    [% UNLESS ( loop_budget ) %]
113
    [% UNLESS ( loop_budget ) %]
114
        [% IF ( CAN_user_acquisition_period_manage ) %]
114
        [% IF ( CAN_user_acquisition_period_manage ) && displayonboard %]
115
            [% displayonboardscreen = "acquisitions" %]
115
            [% displayonboardscreen = "acquisitions" %]
116
            [% IF step == 1 %]
116
            [% IF step == 1 %]
117
                [% INCLUDE onboardinginclude1.inc %]
117
                [% INCLUDE onboardinginclude1.inc %]
Lines 254-281 $(document).ready(function() { Link Here
254
    </table>
254
    </table>
255
    </div>
255
    </div>
256
    [% END %]
256
    [% END %]
257
258
  <button type="button" id="show" onclick"unhide(aqhelp)">Show the next steps to set up Acquisitions</button>
259
    <br><br>
260
    <div id="aqhelp">
261
        <h1> Next steps</h1>
262
        <h2> 1. Create your first vendor</h2>
263
        <p> A vendor is the organisation your institution purchases items from i.e. suppliers<br>
264
        You must create a vendor before you can create any orders</p>
265
        <b>Click <a href="/cgi-bin/koha/acqui/supplier.pl?op=enter">here</a> to create a vendor.</b>
266
        <br><br>
267
        <h2> 2. Create your first basket</h2>
268
        <p> A basket is the conceptual container that holds orders. Each basket is assigned to a single vendor so you can perform multiple separate orders from a single vendor simultaneously. Because of its reliance on vendor the basket must be created after the vendor</p>
269
        <b> To create a basket, click the 'New basket' button on the Vendor Information page which is displayed after you create a vendor</b>
270
        <br><br>
271
        <h2> 3. Create an order</h2>
272
        <p> An order is a assignment of items purchased from a single vendor at a single time</p>
273
        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.
274
        </p>
275
        <br><br>
276
        For further information about creating a vendor, basket and order go to the Koha manual:
277
        <a href="http://translate.koha-community.org/manual/master/en/html/09_acquisitions.html"> Koha manual Acquisitions section</a>
278
    </div>
279
</div>
257
</div>
280
</div>
258
</div>
281
<div class="yui-b">
259
<div class="yui-b">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt (-2 / +1 lines)
Lines 340-346 Link Here
340
    <li>
340
    <li>
341
    <label class="required" for="from">Start date: </label>
341
    <label class="required" for="from">Start date: </label>
342
    <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
342
    <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate | $KohaDates %]" class="datepickerfrom" />
343
<!--<div class="hint">[% INCLUDE 'date-format.inc' %]</div>-->
343
    <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
344
    </li>
344
    </li>
345
    <li>
345
    <li>
346
346
347
- 

Return to bug 18002