Bug 21425: Display basketno correctly in Order error msg

carp will display the hash value instead of the desired basketno
in the error message unless we change its behaviour

Use the simpler but effective option of concatenating
the errormessage with the basketno. Error is shown if no
sender or receipient ean is passed in instantiating
an Koha::Edifact::Order object

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e81756b317)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Colin Campbell 2018-09-27 12:25:28 +01:00 committed by Martin Renvoize
parent 721cefdb95
commit f7088ecf4b
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 4 additions and 4 deletions

View File

@ -60,13 +60,13 @@ sub new {
return;
}
if ( !$self->{recipient} ) {
carp
"No vendor passed to order creation: basket = $self->{basket}->basketno()";
carp 'No vendor passed to order creation: basket = '
. $self->{basket}->basketno;
return;
}
if ( !$self->{sender} ) {
carp
"No sender ean passed to order creation: basket = $self->{basket}->basketno()";
carp 'No sender ean passed to order creation: basket = '
. $self->{basket}->basketno;
return;
}