Print Unused Voucher



  • Under Status: Captive portal: Voucher Rolls: Zone there's a lot of unused vouchers although actual inventory says there's already none left. We could create a function to expire them all, or just print these unused vouchers again.

    We can add a column like this:

    
          [![](voucherfiles/printer-icon-small.gif "<?=gettext(")" width="17" height="17" border="0" alt="" />](services_captiveportal_vouchers_print.php?zone=<?=$cpzone;?>&id=<?=$i; ?>&stats=true)
    
    

    And something like this added to services_captiveportal_vouchers_print.php:

    
    if ($unused == 'true') {
      foreach ($sizes as $k => $v) {
        if (getvalidity($v) <> 'Expired'){
          echo "{$v} 
     ".getvalidity($v).""; $i++;
    
    

    See attachment image, or visit this blog
    ![CP print unused.jpg](/public/imported_attachments/1/CP print unused.jpg)
    ![CP print unused.jpg_thumb](/public/imported_attachments/1/CP print unused.jpg_thumb)


Log in to reply