From 22dc7bbfd5247cfcc0a65f5bdb6245f2c378e9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Fri, 16 Jul 2021 11:50:29 +0800 Subject: When no destination yet, must give emptry string --- config/pikul_cost.tag | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/pikul_cost.tag b/config/pikul_cost.tag index ed96509..88f960e 100644 --- a/config/pikul_cost.tag +++ b/config/pikul_cost.tag @@ -13,9 +13,9 @@ sub { } use Pikul; Pikul::init($company, \@provisions); - my $cost = Pikul::cost($origin, $Tag->query({sql => "SELECT code FROM $table WHERE district='" - . $district . "' AND city='" . $city . "' AND province='" . $province . "'", - wantarray => 1})->[0]->[0], $weight, $service); + my $cost = Pikul::cost($origin, $Tag->query({sql => "SELECT code FROM $table WHERE \ + district='$district' AND city='$city' AND province='$province'", + wantarray => 1})->[0]->[0] || '', $weight, $service); Pikul::cleanup(); return $cost; } -- cgit v1.2.3