From 9e1956b7de95179d6b488d6a01fcb8046a821ef2 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 00:15:43 +0800 Subject: Tag to show service codes already wrapped in select option HTML elements. --- config/pikul_codes.tag | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 config/pikul_codes.tag (limited to 'config') diff --git a/config/pikul_codes.tag b/config/pikul_codes.tag new file mode 100644 index 0000000..f8c99cb --- /dev/null +++ b/config/pikul_codes.tag @@ -0,0 +1,36 @@ +UserTag pikul-codes Order company district city province weight +UserTag pikul-codes Routine <{PIKUL_ANTERAJA}) { + @provisions = ( + $Global::Variable->{ANTERAJA_ACCESS_KEY_ID}, + $Global::Variable->{ANTERAJA_SECRET_ACCESS_KEY}, + $Global::Variable->{ANTERAJA_BASE_PATH} + ); + $origin = $::Variable->{ANTERAJA_ORIGIN}; + $table = 'anteraja'; + } + use Pikul; + Pikul::init($company, \@provisions); + 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] || '', + $weight)}; + Pikul::cleanup(); + my $elements = ''; + return $elements; +} +EOR -- cgit v1.2.3