diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-17 20:44:56 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-17 20:44:56 +0800 |
commit | aa6b47e1fc6298b9cc01d4e5a5247b805c40c9fe (patch) | |
tree | 715c3938a7114fe95b20434bbfe01b4e22273a82 /config | |
parent | 19b166f0271900128bb19e588fb3e9928153d87f (diff) |
Programmatically set tracking_number
Easier to do everything after the transaction is made.
Diffstat (limited to 'config')
-rw-r--r-- | config/pikul_order.tag | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/pikul_order.tag b/config/pikul_order.tag index 181923e..29541a9 100644 --- a/config/pikul_order.tag +++ b/config/pikul_order.tag @@ -34,7 +34,7 @@ sub { } use Pikul; Pikul::init($company, \@provisions); - my $waybill = Pikul::order( + my $tracking_number = Pikul::order( $order_number, $service, "$::Variable->{COMPANY}", @@ -56,6 +56,8 @@ sub { $subtotal ); Pikul::cleanup(); - return $waybill; + $Tag->query({sql => "UPDATE transactions SET tracking_number='$tracking_number' WHERE \ + code='$order_number'"}); + return $tracking_number; } EOR |