<?php
include("../../classes/manager.class.php");
$m = new Manager();
$id = $_REQUEST['id'];
if ($id) {
    $filter = " WHERE customer_id = '$id'";
    $qry = Invoice::GetInvoiceList($filter);
    if($qry)
    {
        echo '<option>All</option>';
        foreach($qry AS $row){
            if($row->status != 'Draft'){
                echo '<option value="'.$row->code.'">'.$row->code.'</option>';
            }
        }
    }else{
        echo '<option>All</option>';
    }
}
?>