summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/pikul_codes.tag8
1 files changed, 6 insertions, 2 deletions
diff --git a/config/pikul_codes.tag b/config/pikul_codes.tag
index fb4a0e6..71fd5cc 100644
--- a/config/pikul_codes.tag
+++ b/config/pikul_codes.tag
@@ -1,7 +1,7 @@
-UserTag pikul-codes Order company district city province weight
+UserTag pikul-codes Order company district city province
UserTag pikul-codes Routine <<EOR
sub {
- my ($company, $district, $city, $province, $weight) = @_;
+ my ($company, $district, $city, $province) = @_;
my (@provisions, $origin, $table);
if ($company == $::Variable->{PIKUL_ANTERAJA}) {
@provisions = (
@@ -12,6 +12,10 @@ sub {
$origin = $::Variable->{ANTERAJA_ORIGIN};
$table = 'anteraja';
}
+ my $weight = 0.0;
+ for my $item (@{$Carts->{main}}) {
+ $weight += $Tag->data('products', 'weight', $item->{code}) * $item->{quantity};
+ }
use Pikul;
Pikul::init($company, \@provisions);
my @codes = @{Pikul::codes(