[wellwell-devel] [wellwell] * added count
Git
wellwell-devel at rt.icdevgroup.org
Wed Feb 8 08:42:44 UTC 2012
commit 7262d93111c6adcaa25423547936490d3a4ee1a5
Author: Jure Kodžoman <jure.kodzoman at informa.si>
Date: Wed Feb 8 09:42:22 2012 +0100
* added count
plugins/coupons/code/coupons_order_cleanup.sub | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/coupons/code/coupons_order_cleanup.sub b/plugins/coupons/code/coupons_order_cleanup.sub
index e831498..9189dd2 100644
--- a/plugins/coupons/code/coupons_order_cleanup.sub
+++ b/plugins/coupons/code/coupons_order_cleanup.sub
@@ -13,6 +13,9 @@ sub {
else {
Log("coupon_log code missing for coupon $coupon_number and order $Values->{mv_order_number}");
}
+
+ # Deduct 1 from count so we know coupon has been used
+ $Db{coupon_log}->query({ sql => "update coupons set count = count-1 where code = '$repo->{code}'" });
}
}
More information about the wellwell-devel
mailing list