From e6854c2c645e8602f988fa4dd305cca610310e2d 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: Tue, 20 Jul 2021 18:51:09 +0800 Subject: district, city, & province in tag --- config/pikul.tag | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'config') diff --git a/config/pikul.tag b/config/pikul.tag index 17030a7..ea279c2 100644 --- a/config/pikul.tag +++ b/config/pikul.tag @@ -1,7 +1,7 @@ -UserTag pikul Order company district city province +UserTag pikul Order company UserTag pikul Routine <{PIKUL_ANTERAJA}) { @provisions = ( @@ -18,13 +18,13 @@ sub { } use Pikul; Pikul::init($company, \@provisions); + my $district = $Tag->value('address2'); + my $city = $Tag->value('city'); + my $province = $Tag->value('state'); my @codes = @{Pikul::codes( $origin, - $Tag->query({ - sql => "SELECT code FROM $table WHERE district='$district' AND \ - city='$city' AND province='$province'", - wantarray => 1 - })->[0]->[0] || '', + $Tag->query({ sql => "SELECT code FROM $table WHERE district='$district' AND city='$city' \ + AND province='$province'", wantarray => 1})->[0]->[0] || '', $weight)}; Pikul::cleanup(); my $elements = '