summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-20 18:51:09 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-20 18:51:09 +0800
commite6854c2c645e8602f988fa4dd305cca610310e2d (patch)
tree6e497e02587b2ac8b4e0a7e3ab12dc364fabc1c8 /config
parent0253ac37312fc76d2cbea0ad1eb10aed066cea9b (diff)
district, city, & province in tag
Diffstat (limited to 'config')
-rw-r--r--config/pikul.tag14
1 files changed, 7 insertions, 7 deletions
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 <<EOR
sub {
- my ($company, $district, $city, $province) = @_;
+ my ($company) = @_;
my (@provisions, $origin, $table);
if ($company == $::Variable->{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 = '<select name="mv_shipmode" id="ship_widget" class="form-control" onchange="this.form.submit()">';