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

(-)a/admin/edi_accounts.pl (-21 / +21 lines)
Lines 51-77 if ( $op eq 'acct_form' ) { Link Here
51
        }
51
        }
52
    );
52
    );
53
    $template->param( vendors => \@vendors );
53
    $template->param( vendors => \@vendors );
54
    $template->param(
55
        code_qualifiers => [
56
            {
57
                code        => '14',
58
                description => 'EAN International',
59
            },
60
            {
61
                code        => '31B',
62
                description => 'US SAN Agency',
63
            },
64
            {
65
                code        => '91',
66
                description => 'Assigned by supplier',
67
            },
68
            {
69
                code        => '92',
70
                description => 'Assigned by buyer',
71
            },
72
        ]
73
    );
74
75
}
54
}
76
elsif ( $op eq 'delete_confirm' ) {
55
elsif ( $op eq 'delete_confirm' ) {
77
    show_account();
56
    show_account();
Lines 129-134 else { Link Here
129
    $template->param( ediaccounts => \@ediaccounts );
108
    $template->param( ediaccounts => \@ediaccounts );
130
}
109
}
131
110
111
$template->param(
112
    code_qualifiers => [
113
        {
114
            code        => '14',
115
            description => 'EAN International',
116
        },
117
        {
118
            code        => '31B',
119
            description => 'US SAN Agency',
120
        },
121
        {
122
            code        => '91',
123
            description => 'Assigned by supplier',
124
        },
125
        {
126
            code        => '92',
127
            description => 'Assigned by buyer',
128
        },
129
    ]
130
);
131
132
output_html_with_http_headers( $input, $cookie, $template->output );
132
output_html_with_http_headers( $input, $cookie, $template->output );
133
133
134
sub get_account {
134
sub get_account {
(-)a/admin/edi_ean_accounts.pl (-21 / +21 lines)
Lines 51-77 if ( $op eq 'ean_form' ) { Link Here
51
        }
51
        }
52
    );
52
    );
53
    $template->param( branches => \@branches );
53
    $template->param( branches => \@branches );
54
    $template->param(
55
        code_qualifiers => [
56
            {
57
                code        => '14',
58
                description => 'EAN International',
59
            },
60
            {
61
                code        => '31B',
62
                description => 'US SAN Agency',
63
            },
64
            {
65
                code        => '91',
66
                description => 'Assigned by supplier',
67
            },
68
            {
69
                code        => '92',
70
                description => 'Assigned by buyer',
71
            },
72
        ]
73
    );
74
75
}
54
}
76
elsif ( $op eq 'delete_confirm' ) {
55
elsif ( $op eq 'delete_confirm' ) {
77
    show_ean();
56
    show_ean();
Lines 100-105 else { Link Here
100
    $template->param( eans    => \@eans );
79
    $template->param( eans    => \@eans );
101
}
80
}
102
81
82
$template->param(
83
    code_qualifiers => [
84
        {
85
            code        => '14',
86
            description => 'EAN International',
87
        },
88
        {
89
            code        => '31B',
90
            description => 'US SAN Agency',
91
        },
92
        {
93
            code        => '91',
94
            description => 'Assigned by supplier',
95
        },
96
        {
97
            code        => '92',
98
            description => 'Assigned by buyer',
99
        },
100
    ]
101
);
102
103
output_html_with_http_headers( $input, $cookie, $template->output );
103
output_html_with_http_headers( $input, $cookie, $template->output );
104
104
105
sub delsubmit {
105
sub delsubmit {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt (-1 / +1 lines)
Lines 101-107 Link Here
101
                        <dt><a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI Accounts</a></dt>
101
                        <dt><a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI Accounts</a></dt>
102
                        <dd>Manage vendor EDI accounts for import/export</dd>
102
                        <dd>Manage vendor EDI accounts for import/export</dd>
103
                        <dt><a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">EDI EANs</a></dt>
103
                        <dt><a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">EDI EANs</a></dt>
104
                        <dd>Manage Branch EDI EANs</dd>
104
                        <dd>Manage library EDI EANs</dd>
105
                </dl>
105
                </dl>
106
106
107
                <h3>Additional parameters</h3>
107
                <h3>Additional parameters</h3>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt (-7 / +14 lines)
Lines 127-137 Link Here
127
     [% FOREACH qualifier IN code_qualifiers %]
127
     [% FOREACH qualifier IN code_qualifiers %]
128
        [% IF qualifier.code == account.id_code_qualifier %]
128
        [% IF qualifier.code == account.id_code_qualifier %]
129
           <option value="[% qualifier.code %]" selected="selected">
129
           <option value="[% qualifier.code %]" selected="selected">
130
               [% qualifier.description %]
130
               [% qualifier.description %] ([% qualifier.code %])
131
           </option>
131
           </option>
132
        [% ELSE %]
132
        [% ELSE %]
133
           <option value="[% qualifier.code %]">
133
           <option value="[% qualifier.code %]">
134
              [% qualifier.description %]
134
              [% qualifier.description %] ([% qualifier.code %])
135
           </option>
135
           </option>
136
        [% END %]
136
        [% END %]
137
     [% END %]
137
     [% END %]
Lines 174-180 Link Here
174
[% END %]
174
[% END %]
175
  </li>
175
  </li>
176
  <li>
176
  <li>
177
     <label for="auto_orders">Automatic ordring (Quotes generate orders without staff intervention): </label>
177
     <label for="auto_orders">Automatic ordering (Quotes generate orders without staff intervention): </label>
178
[% IF account.auto_orders %]
178
[% IF account.auto_orders %]
179
     <input type="checkbox" name="auto_orders" id="auto_orders" value="[% account.auto_orders %]" checked />
179
     <input type="checkbox" name="auto_orders" id="auto_orders" value="[% account.auto_orders %]" checked />
180
[% ELSE %]
180
[% ELSE %]
Lines 233-240 Link Here
233
       <th>Password</th>
233
       <th>Password</th>
234
       <th>Download Directory</th>
234
       <th>Download Directory</th>
235
       <th>Upload Directory</th>
235
       <th>Upload Directory</th>
236
       <th>id_code_type</th>
236
       <th>Qualifier</th>
237
       <th>id_code</th>
237
       <th>SAN</th>
238
       <th>Quotes</th>
238
       <th>Quotes</th>
239
       <th>Orders</th>
239
       <th>Orders</th>
240
       <th>Invoices</th>
240
       <th>Invoices</th>
Lines 252-261 Link Here
252
      <td>[% account.transport %]</td>
252
      <td>[% account.transport %]</td>
253
      <td>[% account.host %]</td>
253
      <td>[% account.host %]</td>
254
      <td>[% account.username %]</td>
254
      <td>[% account.username %]</td>
255
      <td>[% IF account.password %]xxxxx[% END %]</td>
255
      <td>[% IF account.password %]*****[% END %]</td>
256
      <td>[% account.download_directory %]</td>
256
      <td>[% account.download_directory %]</td>
257
      <td>[% account.upload_directory %]</td>
257
      <td>[% account.upload_directory %]</td>
258
      <td>[% account.id_code_qualifier %]</td>
258
      <td>
259
         [% FOREACH qualifier IN code_qualifiers %]
260
            [% IF qualifier.code == account.id_code_qualifier %]
261
                   [% qualifier.description %]
262
            [% END %]
263
         [% END %]
264
         ([% account.id_code_qualifier %])
265
     </td>
259
      <td>[% account.san %]</td>
266
      <td>[% account.san %]</td>
260
      [% IF account.quotes_enabled %]
267
      [% IF account.quotes_enabled %]
261
         <td>Y</td>
268
         <td>Y</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_ean_accounts.tt (-70 / +78 lines)
Lines 2-10 Link Here
2
<title>Koha &rsaquo; Administration &rsaquo; EDI EANs</title>
2
<title>Koha &rsaquo; Administration &rsaquo; EDI EANs</title>
3
[% IF ean_form %]
3
[% IF ean_form %]
4
  [% IF ean %]
4
  [% IF ean %]
5
     &rsquo; Modify branch EAN
5
     &rsquo; Modify library EAN
6
  [% ELSE %]
6
  [% ELSE %]
7
     &rsquo; Add new branch EAN
7
     &rsquo; Add new library EAN
8
  [% END %]
8
  [% END %]
9
[% END %]
9
[% END %]
10
[% IF delete_confirm %]
10
[% IF delete_confirm %]
Lines 23-36 Link Here
23
 &rsaquo; <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">EDI EANs</a>
23
 &rsaquo; <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">EDI EANs</a>
24
[% IF ean_form %]
24
[% IF ean_form %]
25
  [% IF ean %]
25
  [% IF ean %]
26
     &rsaquo; Modify branch EAN
26
     &rsaquo; Modify library EAN
27
  [% ELSE %]
27
  [% ELSE %]
28
     &rsaquo; Add new branch EAN
28
     &rsaquo; Add new library EAN
29
  [% END %]
29
  [% END %]
30
[% ELSIF delete_confirm %]
30
[% ELSIF delete_confirm %]
31
     &rsaquo; Confirm deletion of Ean
31
     &rsaquo; Confirm deletion of Ean
32
[% ELSE %]
32
[% ELSE %]
33
     &rsaquo; Branch EANs
33
     &rsaquo; Library EANs
34
[% END %]
34
[% END %]
35
</div>
35
</div>
36
36
Lines 52-103 Link Here
52
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" name="Eanform" method="post">
52
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" name="Eanform" method="post">
53
  <input type="hidden" name="op" value="save" />
53
  <input type="hidden" name="op" value="save" />
54
  [% IF ean %]
54
  [% IF ean %]
55
  <input type="hidden" name="oldbranchcode" value="[% branchcode %]" />
55
      <input type="hidden" name="oldbranchcode" value="[% branchcode %]" />
56
  <input type="hidden" name="oldean" value="[% ean %]" />
56
      <input type="hidden" name="oldean" value="[% ean %]" />
57
  [% END %]
57
  [% END %]
58
  <fieldset class="rows">
59
  <legend>
60
  [% IF ean %]
61
     Modify EAN
62
  [% ELSE %]
63
    New EAN
64
  [% END %]
65
  </legend>
66
58
67
  <ol>
59
  <fieldset class="rows">
68
  <li>
60
      <legend>
69
     <label for="branchcode">Branchcode: </label>
61
          [% IF ean %]
70
     <select name="branchcode" id="branchcode">
62
             Modify EAN
71
        [% FOREACH branch IN branches %]
63
          [% ELSE %]
72
            [% IF branch.branchcode == ean.branch.branchcode %]
64
            New EAN
73
               <option value="[% branch.branchcode %]" selected="selected">[% branch.branchname %]</option>
65
          [% END %]
74
            [% ELSE %]
66
      </legend>
75
               <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
76
            [% END %]
77
        [% END %]
78
      </select>
79
  </li>
80
  <li>
81
     <label for="ean">EAN: </label>
82
     <input type="text" name="ean" id="ean`" size="20" maxlength="90" value="[% ean.ean %]" />
83
  </li>
84
  <li>
85
     <label for="id_code_qualifier">
86
     <select name="id_code_qualifier" id="id_code_qualifier">
87
     [% FOREACH qualifier IN code_qualifiers %]
88
        [% IF qualifier.code == ean.id_code_qualifier %]
89
           <option value="[% qualifier.code %]" selected="selected">
90
               [% qualifier.description %]
91
           </option>
92
        [% ELSE %]
93
           <option value="[% qualifier.code %]">
94
              [% qualifier.description %]
95
           </option>
96
        [% END %]
97
     [% END %]
98
  </li>
99
67
100
  </ol>
68
      <ol>
69
          <li>
70
             <label for="branchcode">Library: </label>
71
             <select name="branchcode" id="branchcode">
72
                [% FOREACH branch IN branches %]
73
                    [% IF branch.branchcode == ean.branch.branchcode %]
74
                       <option value="[% branch.branchcode %]" selected="selected">[% branch.branchname %]</option>
75
                    [% ELSE %]
76
                       <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
77
                    [% END %]
78
                [% END %]
79
              </select>
80
          </li>
81
          <li>
82
             <label for="ean">EAN: </label>
83
             <input type="text" name="ean" id="ean`" size="20" maxlength="90" value="[% ean.ean %]" />
84
          </li>
85
          <li>
86
             <label for="id_code_qualifier">Qualifier: </label>
87
             <select name="id_code_qualifier" id="id_code_qualifier">
88
                 [% FOREACH qualifier IN code_qualifiers %]
89
                    [% IF qualifier.code == ean.id_code_qualifier %]
90
                       <option value="[% qualifier.code %]" selected="selected">
91
                           [% qualifier.description %] ([% qualifier.code %])
92
                       </option>
93
                    [% ELSE %]
94
                       <option value="[% qualifier.code %]">
95
                          [% qualifier.description %] ([% qualifier.code %])
96
                       </option>
97
                    [% END %]
98
                 [% END %]
99
             </select>
100
          </li>
101
      </ol>
101
  </fieldset>
102
  </fieldset>
102
103
103
  <fieldset class="action">
104
  <fieldset class="action">
Lines 105-115 Link Here
105
    <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl" class="cancel">Cancel</a>
106
    <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl" class="cancel">Cancel</a>
106
  </fieldset>
107
  </fieldset>
107
</form>
108
</form>
108
109
[% END %]
109
[% END %]
110
110
[% IF delete_confirm %]
111
[% IF delete_confirm %]
111
<div class="dialog alert">
112
<div class="dialog alert">
112
<h3>Delete EAN [% ean.ean %] for branch [% ean.branch.branchname %]?</h3>
113
<h3>Delete EAN [% ean.ean %] for [% ean.branch.branchname %]?</h3>
113
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post">
114
<form action="/cgi-bin/koha/admin/edi_ean_accounts.pl" method="post">
114
    <input type="hidden" name="op" value="delete_confirmed" />
115
    <input type="hidden" name="op" value="delete_confirmed" />
115
    <input type="hidden" name="branchcode" value="[% ean.branch.branchcode %]" />
116
    <input type="hidden" name="branchcode" value="[% ean.branch.branchcode %]" />
Lines 121-146 Link Here
121
</form>
122
</form>
122
</div>
123
</div>
123
[% END %]
124
[% END %]
125
124
[% IF display %]
126
[% IF display %]
125
<h2>Branch EANs</h2>
127
    <h2>Library EANs</h2>
126
   <table>
128
    <table>
127
   <tr>
129
        <tr>
128
      <th>Branch</th>
130
            <th>Library</th>
129
      <th>EAN</th>
131
            <th>EAN</th>
130
      <th>Code Type</th>
132
            <th>Qualifier</th>
131
      <th>Actions</th>
133
            <th>Actions</th>
132
   </tr>
134
        </tr>
133
   [% FOREACH ean IN eans %]
135
        [% FOREACH ean IN eans %]
134
   [% IF loop.even %]<tr>
136
            [% IF loop.even %]<tr>[% ELSE %]<tr class="highlight">[% END %]
135
   [% ELSE %]<tr class="highlight">
137
                <td>[% ean.branch.branchname %]</td>
136
   [% END %]
138
                <td>[% ean.ean %]</td>
137
      <td>[% ean.branch.branchname %]</td>
139
                <td>
138
      <td>[% ean.ean %]</td>
140
                 [% FOREACH qualifier IN code_qualifiers %]
139
      <td>[% ean.id_code_qualifier %]</td>
141
                    [% IF qualifier.code == ean.id_code_qualifier %]
140
      <td align="center">
142
                        [% qualifier.description %] ([% qualifier.code %])
141
           <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]">Edit</a> | <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]">Delete</a></td>
143
                    [% END %]
142
   </tr>
144
                 [% END %]
143
   [% END %]
145
                </td>
146
                <td align="center">
147
                    <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=ean_form&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]">Edit</a>
148
                    |
149
                    <a href="/cgi-bin/koha/admin/edi_ean_accounts.pl?op=delete_confirm&branchcode=[% ean.branch.branchcode %]&ean=[% ean.ean %]">Delete</a>
150
                </td>
151
            </tr>
152
        [% END %]
144
    </table>
153
    </table>
145
[% END %]
154
[% END %]
146
155
147
- 

Return to bug 7736