From aa6b47e1fc6298b9cc01d4e5a5247b805c40c9fe 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: Sat, 17 Jul 2021 20:44:56 +0800 Subject: Programmatically set tracking_number Easier to do everything after the transaction is made. --- config/pikul_order.tag | 6 ++++-- 1 file 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 -- cgit v1.2.3