4.1.6.26: Payment Types

#set($preport = $report.getPaymentTypesReport()) #set($D = "$amps;")
#foreach($group in $preport.getReportGroups()) #if($group.getCount() > 0) #foreach($hit in $group.getHitTracker()) #set($order = $group.load($hit)) #set($cartitem = $order.getItems().get(0)) #set($classlist = $cartitem.getProduct().get("classlist")) #set($classdata = $preport.loadObjectByField("learningGroup","id",$classlist)) #set($product = $cartitem.getProduct()) #set($method = "") #set($vouchernumber = "N/A") #set($vouchervalue = "N/A") #if($order.getPaymentMethod().getType() == "prepaidcode") #set($method = "Voucher") #set($vouchernumber = $order.get("prepaid")) #set($vouchervalue = $order.getSubTotal()) #elseif($order.getPaymentMethod().getType() == "creditcard") #set($method = $order.getPaymentMethod().getCreditCardType()) #end #set($price = "N/A") #if($product.getPriceSupport().getRetailPrice()) #set($price = $product.getPriceSupport().getRetailPrice()) $group.addMoney("price",$price) #end #set($studentid = $preport.getDisplayValue("userprofile","id",$order.getCustomer().getId(), "studentid","N/A")) $group.incrementUniqueCount("studentid",$studentid) $group.incrementUniqueCount("classid",$cartitem.getSku()) $group.addMoney("tax",$order.getTax()) $group.addMoney("total",$order.getTotalPrice()) #if($vouchervalue != "N/A") $group.addMoney("voucher",$vouchervalue) #end $group.addMoneyAsString("discount","0") #if($velocityCount == 1) #else #end #end #end #end $preport.generateSummary()
Student ID Last Name First Name Class ID Class Name Start Date End Date Class Value Payment Date Payment Method Payment Amount HST Owing Discount Amount Discount Issuer Voucher Number Voucher Amount
$studentid $order.getCustomer().getLastName() $order.getCustomer().getFirstName() $cartitem.getSku() $cartitem.getName() $!context.getDate($classdata.startdate) $!context.getDate($classdata.enddate) $price $context.getDate($order.getDate()) $method $order.getTotalPrice() $order.getTax() ${D}0.00 ${D}0.00 N/A $vouchernumber $vouchervalue
$group.getMoney("price","0") $group.getMoney("total","0") $group.getMoney("tax","0") $group.getMoney("owing","0") $group.getMoney("discount","0") $group.getMoney("voucher","0")
$preport.getMoney("price","0") $preport.getMoney("total","0") $preport.getMoney("tax","0") $preport.getMoney("owing","0") $preport.getMoney("discount","0") $preport.getMoney("voucher","0")