From 82c3ca7271dfa3784b43ab7e6d99a23b6e467cc2 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Thu, 29 Dec 2011 13:51:42 +0100 Subject: [PATCH] add order that has been paid with voucher to audit data --- www/inc/wext/voucher.php | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/www/inc/wext/voucher.php b/www/inc/wext/voucher.php index 4e189f8..31c4639 100644 --- a/www/inc/wext/voucher.php +++ b/www/inc/wext/voucher.php @@ -9,11 +9,17 @@ class WOVoucher extends WOVoucherAbstract ///helper for audit table creation public static function getTransactionComment() { + //get the transaction $inst=WobTransaction::getInstance(); if($inst == null)return null; + //check whether it has a comment if(method_exists($inst,"getcomment")) return $inst->getcomment(); - else return null; + //for usevoucher return the order id + if(is_a($inst,"WTrUseVoucher")) + return "order: ".$inst->getorderid(); + //fall back + return null; } ///implements the GetVoucherAudit transaction -- 1.7.2.5