From: Konrad Rosenbaum Date: Thu, 29 Dec 2011 12:51:42 +0000 (+0100) Subject: add order that has been paid with voucher to audit data X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=82c3ca7271dfa3784b43ab7e6d99a23b6e467cc2;p=web%2Fkonrad%2Fsmoke.git add order that has been paid with voucher to audit data --- 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