TERMINAL COLLECTION
------------------------------
Dealer: $dealer.name
TIN: $dealer.inn
Address: $dealer.address
Point: $point.id, $point.address
------------------------------
##Multi collection
#if ($!mcl)
#set($first = $mcl.get(0))
#if ($first.type==0)
Operation type: COLLECTION
#else
Operation type: ENTERING
#end
#if ($!empty)
------------------------------
<center/><r>NO BILLS</r>
#else
#foreach($mc in $mcl)
------------------------------
Device: $mc.boxId.deviceClass|$mc.boxId.deviceNumber|$mc.boxId.boxNumber
#set($mcData = $mclData.get("mc$mc.id"))
##evaluate($mc.id).get("device")
##set($mcData = "#evaluate($mc.id)")
#if (!$mcData.get("empty"))
$mcData.get("device")
#end
------------------------------
Number: $mc.id
Date: $df.format($mc.date)
#if ($!mc.lastDate)
Previous operation: $df.format($mc.lastDate)
#end
#if (!$mcData.get("empty"))
#foreach($curr in $mcData.get("currencies"))
------------------------------
Currency: <b>$curr</b>
Bill       | Count | Sum
#foreach($line in $mcData.get("lines").get($curr))
$string.format("%12s %5s %12s",$line.nominalFmt,$line.count,$line.sumFmt)
#end
------------------------------
#set($tot = $mcData.get("totals").get($curr))
<b>TOTAL       $string.format("%7s %12s",$tot.count,$tot.sumFmt)</b>
#end
#else
------------------------------
<center/><r>NO BILLS</r>
#end
#end
#end
<left/>------------------------------
#else
##Usual collection
#if ($mc.type==0)
Operation type: COLLECTION
#else
Operation type: ENTERING
#end
Device: $mc.boxId.deviceClass|$mc.boxId.deviceNumber|$mc.boxId.boxNumber
$device
------------------------------
Number: $mc.id
Date: $df.format($mc.date)
#if ($!mc.lastDate)
Previous operation: $df.format($mc.lastDate)
#end
#if (!$empty)
#foreach($curr in $currencies)
------------------------------
Currency: <b>$curr</b>
Bill       | Count | Sum
#foreach($line in $lines.get($curr))
$string.format("%12s %5s %12s",$line.nominalFmt,$line.count,$line.sumFmt)
#end
------------------------------
#set($tot = $totals.get($curr))
<b>TOTAL       $string.format("%7s %12s",$tot.count,$tot.sumFmt)</b>
#end
#else
------------------------------
<center/><r>NO BILLS</r>
#end
<left/>------------------------------
#end
