|
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 { |