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 185-190 EDI accounts › Administration › Koha Link Here
185
     <label for="san">SAN: </label>
185
     <label for="san">SAN: </label>
186
     <input type="text" name="san" id="san" size="20" maxlength="20" value="[% account.san | html %]" />
186
     <input type="text" name="san" id="san" size="20" maxlength="20" value="[% account.san | html %]" />
187
  </li>
187
  </li>
188
  <li>
189
     <label for="standard">Standard:</label>
190
     <select name="standard" id="standard">
191
     [% FOREACH standard IN standards %]
192
        [% IF standard == 'BIC' %]
193
        [% SET description = 'BiC' %]
194
        [% ELSE %]
195
        [% SET description = 'EDItEUR' %]
196
        [% END %]
197
        [% IF standard == account.standard %]
198
           <option value="[% standard | html %]" selected="selected">
199
               [% description | html %]
200
           </option>
201
        [% ELSE %]
202
           <option value="[% standard | html %]">
203
              [% description | html %]
204
           </option>
205
        [% END %]
206
     [% END %]
207
   </select>
208
  </li>
188
  <li>
209
  <li>
189
     <label for="quotes_enabled">Quotes enabled: </label>
210
     <label for="quotes_enabled">Quotes enabled: </label>
190
      [% IF account.quotes_enabled %]
211
      [% IF account.quotes_enabled %]
Lines 284-289 EDI accounts &rsaquo; Administration &rsaquo; Koha Link Here
284
       <th>Upload directory</th>
305
       <th>Upload directory</th>
285
       <th>Qualifier</th>
306
       <th>Qualifier</th>
286
       <th>SAN</th>
307
       <th>SAN</th>
308
       <th>Standard</th>
287
       <th>Quotes</th>
309
       <th>Quotes</th>
288
       <th>Orders</th>
310
       <th>Orders</th>
289
       <th>Invoices</th>
311
       <th>Invoices</th>
Lines 311-316 EDI accounts &rsaquo; Administration &rsaquo; Koha Link Here
311
         ([% account.id_code_qualifier | html %])
333
         ([% account.id_code_qualifier | html %])
312
     </td>
334
     </td>
313
      <td>[% account.san | html %]</td>
335
      <td>[% account.san | html %]</td>
336
      <td>[% IF account.standard == 'BIC' %]BiC[% ELSE %]EDItEUR[% END %]</td>
314
      [% IF account.quotes_enabled %]
337
      [% IF account.quotes_enabled %]
315
         <td>Yes</td>
338
         <td>Yes</td>
316
      [% ELSE %]
339
      [% ELSE %]
317
- 

Return to bug 30130