<script type="text/javascript">
function viewInvoice(ID) {
    var wnd = window.open("index_popup.php?md=Affiliate_Merchants_Views_AffiliatePayments&action=view_invoice&ap_userid="+ID,"Invoice","scrollbars=1,menubar=1,resizable=1,toolbar=1, top=100, left=100, width=800, height=800, status=0");
    wnd.focus();
}
</script>

<table width="500" class="listing tb2" border=0 cellspacing=0 cellpadding=2>
<?php QUnit_Templates::printFilter(3, L_G_AFFILIATEPROFILE); ?>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_USERNAME;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['username']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_NAME;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['name']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_COMPANYNAME;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['company_name']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_WEBURL;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['weburl']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_STREET;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['street']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_CITY;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['city']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_STATE;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['state']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_COUNTRY;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['country']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_ZIPCODE;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['zipcode']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_PHONE;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['phone']?></td>
</tr>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_FAX;?></td><td width=10></td>
  <td><?php echo $this->a_payoutData['fax']?></td>
</tr>
</table>

<table width="500" class="listing tb2 mt10" border=0 cellspacing=0 cellpadding=2>
<?php QUnit_Templates::printFilter(3, L_G_PAYOUTMETHODS); ?>

<?php      while($data=$this->a_list_data1->getNextRecord())
    {
        if($this->a_payoutData['payoptid'] == $data['payoptid'])
        {
?>
    <tr>
      <td valign=top align=left colspan=3>
        <b><?php echo (defined($data['langid']) ? constant($data['langid']) : $data['name'])?></b>
      </td>
    </tr>
<?php              if(is_array($this->a_list_data2[$data['payoptid']]))
            {
                foreach($this->a_list_data2[$data['payoptid']] as $field)
                {
?>
          <tr>
            <td class=dir_form width="1%" nowrap><?php echo (defined($field['langid']) ? constant($field['langid']) : $field['name'])?></td>
            <td width=10></td>
            <td><?php echo $this->a_payoutData['field'.$field['payfieldid']]?></td>
          </tr>
<?php
                }
            }
        }
    }
?>

<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_PAYMENTTOBEPAID?></td><td width=10></td>
  <td><b><?php echo Affiliate_Merchants_Bl_Settings::showCurrency($this->a_payoutData['amount'])?></b></td>
</tr>
<?php if($this->a_Auth->getSetting('Aff_min_payout_options') != '') { ?>
<tr>
  <td class=dir_form width="1%" nowrap><?php echo L_G_MINPAYOUT;?></td><td width=10></td>
  <td><?php echo Affiliate_Merchants_Bl_Settings::showCurrency($this->a_payoutData['minpayout'])?></td>
</tr>
<?php } ?>
<tr>
  <td colspan="3" align="center" valign="middle">
  <?php echo $this->a_payoutData['paybuttonformat']?>
  </td>
</tr>
<tr>
  <td colspan="3" align="center" valign="center">
  <?php echo L_G_HLPAFTERMANUALPAYMENT; ?>
  </td>
</tr>
<tr>
  <td colspan="3" align="center" valign="top">
  <form name=ResultsForm id=ResultsForm action=index.php method=post>
  <input type="hidden" name=commited value=yes>
  <input type="hidden" name=md value='Affiliate_Merchants_Views_AffiliatePayments'>
  <input type="hidden" name=postaction id=postaction value=approvepayment>
  <input type="hidden" name=rtype value=trans>
  <input type="hidden" name=mp_date1 value="<?php echo $this->a_payoutData['seldate1']?>">
  <input type="hidden" name=mp_date2 value="<?php echo $this->a_payoutData['seldate2']?>">
  <input type="hidden" name="payout_type_<?php echo $this->a_payoutData['userid']?>" value="something">
  <input type="hidden" name="itemschecked[]" value="<?php echo $this->a_payoutData['userid']?>">
  <input class=formbutton type=submit value='<?php echo L_G_PAYDONE; ?>'>
  </form>
  </td>
</tr>
</table>

