Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Print Unused Voucher

    Scheduled Pinned Locked Moved Captive Portal
    1 Posts 1 Posters 781 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dpa
      last edited by

      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)

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.