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

(-)a/Koha/Edifact/Order.pm (-14 / +6 lines)
Lines 263-269 sub order_msg_header { Link Here
263
    push @header,
263
    push @header,
264
      beginning_of_message(
264
      beginning_of_message(
265
        $self->{basket}->basketno,
265
        $self->{basket}->basketno,
266
        $self->{recipient}->san,
266
        $self->{recipient}->standard,
267
        $self->{is_response}
267
        $self->{is_response}
268
      );
268
      );
269
269
Lines 297-325 sub order_msg_header { Link Here
297
297
298
sub beginning_of_message {
298
sub beginning_of_message {
299
    my $basketno            = shift;
299
    my $basketno            = shift;
300
    my $supplier_san        = shift;
300
    my $standard            = shift;
301
    my $response            = shift;
301
    my $response            = shift;
302
    my $document_message_no = sprintf '%011d', $basketno;
302
    my $document_message_no = sprintf '%011d', $basketno;
303
303
304
  # Peters & Bolinda use the BIC recommendation to use 22V a code not in Edifact
305
  # If the order is in response to a quote
306
    my %bic_sans = (
307
        '5013546025065' => 'Peters',
308
        '9377779308820' => 'Bolinda',
309
    );
310
311
    #    my $message_function = 9;    # original 7 = retransmission
304
    #    my $message_function = 9;    # original 7 = retransmission
312
    # message_code values
305
    # message_code values
313
    #      220 prder
306
    #      220 order
314
    #      224 rush order
307
    #      224 rush order
315
    #      228 sample order :: order for approval / inspection copies
308
    #      228 sample order :: order for approval / inspection copies
316
    #      22C continuation  order for volumes in a set etc.
309
    #      22C continuation  order for volumes in a set etc.
317
    #    my $message_code = '220';
310
    #    my $message_code = '220';
318
    if ( exists $bic_sans{$supplier_san} && $response ) {
319
        return "BGM+22V+$document_message_no+9$seg_terminator";
320
    }
321
311
322
    return "BGM+220+$document_message_no+9$seg_terminator";
312
    # If the order is in response to a quote and we're dealing with a BIC supplier
313
    my $code = ( $response && ( $standard eq 'BIC' ) ) ? '22V' : '220';
314
    return "BGM+$code+$document_message_no+9$seg_terminator";
323
}
315
}
324
316
325
sub name_and_address {
317
sub name_and_address {
(-)a/admin/edi_accounts.pl (-1 / +3 lines)
Lines 76-81 else { Link Here
76
            upload_directory   => scalar $input->param('upload_directory'),
76
            upload_directory   => scalar $input->param('upload_directory'),
77
            download_directory => scalar $input->param('download_directory'),
77
            download_directory => scalar $input->param('download_directory'),
78
            san                => scalar $input->param('san'),
78
            san                => scalar $input->param('san'),
79
            standard           => scalar $input->param('standard'),
79
            transport          => scalar $input->param('transport'),
80
            transport          => scalar $input->param('transport'),
80
            quotes_enabled     => $input->param('quotes_enabled') ? 1 : 0,
81
            quotes_enabled     => $input->param('quotes_enabled') ? 1 : 0,
81
            invoices_enabled   => $input->param('invoices_enabled') ? 1 : 0,
82
            invoices_enabled   => $input->param('invoices_enabled') ? 1 : 0,
Lines 133-139 $template->param( Link Here
133
            code        => '92',
134
            code        => '92',
134
            description => 'Assigned by buyer',
135
            description => 'Assigned by buyer',
135
        },
136
        },
136
    ]
137
    ],
138
    standards => [ 'BIC', 'EUR' ]
137
);
139
);
138
140
139
output_html_with_http_headers( $input, $cookie, $template->output );
141
output_html_with_http_headers( $input, $cookie, $template->output );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt (-1 / +23 lines)
Lines 193-198 EDI accounts › Administration › Koha Link Here
193
     <label for="san">SAN: </label>
193
     <label for="san">SAN: </label>
194
     <input type="text" name="san" id="san" size="20" maxlength="20" value="[% account.san | html %]" />
194
     <input type="text" name="san" id="san" size="20" maxlength="20" value="[% account.san | html %]" />
195
  </li>
195
  </li>
196
  <li>
197
     <label for="standard">Standard:</label>
198
     <select name="standard" id="standard">
199
     [% FOREACH standard IN standards %]
200
        [% IF standard == 'BIC' %]
201
        [% SET description = 'BiC' %]
202
        [% ELSE %]
203
        [% SET description = 'EDItEUR' %]
204
        [% END %]
205
        [% IF standard == account.standard %]
206
           <option value="[% standard | html %]" selected="selected">
207
               [% description | html %]
208
           </option>
209
        [% ELSE %]
210
           <option value="[% standard | html %]">
211
              [% description | html %]
212
           </option>
213
        [% END %]
214
     [% END %]
215
   </select>
216
  </li>
196
  <li>
217
  <li>
197
     <label for="quotes_enabled">Quotes enabled: </label>
218
     <label for="quotes_enabled">Quotes enabled: </label>
198
      [% IF account.quotes_enabled %]
219
      [% IF account.quotes_enabled %]
Lines 292-297 EDI accounts &rsaquo; Administration &rsaquo; Koha Link Here
292
       <th>Upload directory</th>
313
       <th>Upload directory</th>
293
       <th>Qualifier</th>
314
       <th>Qualifier</th>
294
       <th>SAN</th>
315
       <th>SAN</th>
316
       <th>Standard</th>
295
       <th>Quotes</th>
317
       <th>Quotes</th>
296
       <th>Orders</th>
318
       <th>Orders</th>
297
       <th>Invoices</th>
319
       <th>Invoices</th>
Lines 319-324 EDI accounts &rsaquo; Administration &rsaquo; Koha Link Here
319
         ([% account.id_code_qualifier | html %])
341
         ([% account.id_code_qualifier | html %])
320
     </td>
342
     </td>
321
      <td>[% account.san | html %]</td>
343
      <td>[% account.san | html %]</td>
344
      <td>[% IF account.standard == 'BIC' %]BiC[% ELSE %]EDItEUR[% END %]</td>
322
      [% IF account.quotes_enabled %]
345
      [% IF account.quotes_enabled %]
323
         <td>Yes</td>
346
         <td>Yes</td>
324
      [% ELSE %]
347
      [% ELSE %]
325
- 

Return to bug 30130