diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-24 18:14:10 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-24 18:14:10 +0800 |
commit | c6df3badb5865c6bc296d1addbcf67e6e8e4ff1b (patch) | |
tree | 2c4ef6583da746468a0bd87a30b1aff247e572d5 | |
parent | 1be1ed072cb8b0858b653c429a83d8347f8f3787 (diff) | |
parent | f6204deab03d98ff78a999463879a0f9063ff61d (diff) |
Merge branch 'master' into sicepat
-rw-r--r-- | config/pikul.tag | 6 | ||||
-rw-r--r-- | config/pikul_cost.tag | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/config/pikul.tag b/config/pikul.tag index 0164851..336d6ef 100644 --- a/config/pikul.tag +++ b/config/pikul.tag @@ -3,8 +3,6 @@ UserTag pikul Routine <<EOR sub { my ($widget, $extra) = @_; my $district = $Tag->value('address2'); - my $city = $Tag->value('city'); - my $province = $Tag->value('state'); my $weight = 0.0; for my $item (@{$Carts->{main}}) { $weight += $Tag->data('products', 'weight', $item->{code}) * $item->{quantity}; @@ -38,8 +36,8 @@ sub { ]); $origins[$company] = $::Variable->{ANTERAJA_ORIGIN} || $Global::Variable->{ANTERAJA_ORIGIN}; - $destinations[$company] = $Tag->query({sql => "SELECT code FROM anteraja WHERE \ - district='$district' AND city='$city' AND province='$province'", + $destinations[$company] = $Tag->query({sql => "SELECT code FROM anteraja WHERE\ + district LIKE '%$district%'", wantarray => 1})->[0]->[0] || ''; $code_prefixes[$company] = 'anteraja_'; $name_prefixes[$company] = 'Anteraja '; diff --git a/config/pikul_cost.tag b/config/pikul_cost.tag index 199e503..24dd9a1 100644 --- a/config/pikul_cost.tag +++ b/config/pikul_cost.tag @@ -25,8 +25,7 @@ sub { $service, $origin, $Tag->query({ - sql => "SELECT code FROM $table WHERE district='$district' AND \ - city='$city' AND province='$province'", + sql => "SELECT code FROM $table WHERE district LIKE '%$district%'", wantarray => 1 })->[0]->[0] || '', $weight); |