Bug 27793: Store FTX free text in vendor note

This is important for proquest ordering to distinguish types of
material.

FTX segment from quote is stored as vendor note.
Contents of vendornote are included in the order FTX segment.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 33c8d6f175)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
This commit is contained in:
Colin Campbell 2021-02-25 10:59:24 +00:00 committed by Victor Grousset/tuxayo
parent f05f65ba18
commit 7e8e040c64
2 changed files with 14 additions and 8 deletions

View File

@ -685,7 +685,7 @@ sub quote_item {
quantity => $order_quantity,
quantityreceived => 0,
order_vendornote => q{},
order_internalnote => $order_note,
order_internalnote => q{},
replacementprice => $price,
rrp_tax_included => $price,
rrp_tax_excluded => $price,
@ -724,7 +724,9 @@ sub quote_item {
$txt .= $si;
++$occ;
}
$order_hash->{order_vendornote} = $txt;
}
if ($order_note) {
$order_hash->{order_vendornote} = $order_note;
}
if ( $item->internal_notes() ) {

View File

@ -413,10 +413,6 @@ sub order_line {
}
my $budget = GetBudget( $orderline->budget_id );
my $ol_fields = { budget_code => $budget->{budget_code}, };
if ( $orderline->order_vendornote ) {
$ol_fields->{servicing_instruction} = $orderline->order_vendornote;
chomp $ol_fields->{servicing_instruction};
}
my $item_fields = [];
for my $item (@items) {
@ -439,8 +435,16 @@ sub order_line {
# TBD what if #items exceeds quantity
# FTX free text for current orderline TBD
# dont really have a special instructions field to encode here
# FTX free text for current orderline
# Pass vendor note in FTX free text segment
if ( $orderline->order_vendornote ) {
my $vendornote = $orderline->order_vendornote;
chomp $vendornote;
my $ftx = 'FTX+LIN+++';
$ftx .= $vendornote;
$ftx .= $seg_terminator;
$self->add_seg($ftx);
}
# Encode notes here
# PRI-CUX-DTM unit price on which order is placed : optional
# Coutts read this as 0.00 if not present