diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-16 11:50:29 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-16 11:50:29 +0800 |
commit | 22dc7bbfd5247cfcc0a65f5bdb6245f2c378e9d5 (patch) | |
tree | 95c4e1e4d72924c05496be2d192a2fac526640f4 | |
parent | dd7f8b6d03a88f24e0b44ad7e1f06674e0b99822 (diff) |
When no destination yet, must give emptry string
-rw-r--r-- | config/pikul_cost.tag | 6 |
1 files 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; } |