[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: affiliate_invoice.php 14 2006-07-28 17:42:07Z user $ 4 5 OSC-Affiliate 6 7 Contribution based on: 8 9 osCMax Power E-Commerce 10 http://oscdox.com 11 12 Copyright 2006 osCMax 13 14 Released under the GNU General Public License 15 */ 16 17 require ('includes/application_top.php'); 18 19 require (DIR_WS_CLASSES . 'currencies.php'); 20 $currencies = new currencies(); 21 22 $payments_query = tep_db_query("select * from " . TABLE_AFFILIATE_PAYMENT . " where affiliate_payment_id = '" . $HTTP_GET_VARS['pID'] . "'"); 23 $payments = tep_db_fetch_array($payments_query); 24 25 $affiliate_address['firstname'] = $payments['affiliate_firstname']; 26 $affiliate_address['lastname'] = $payments['affiliate_lastname']; 27 $affiliate_address['street_address'] = $payments['affiliate_street_address']; 28 $affiliate_address['suburb'] = $payments['affiliate_suburb']; 29 $affiliate_address['city'] = $payments['affiliate_city']; 30 $affiliate_address['state'] = $payments['affiliate_state']; 31 $affiliate_address['country'] = $payments['affiliate_country']; 32 $affiliate_address['postcode'] = $payments['affiliate_postcode'] 33 ?> 34 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 35 <html <?php echo HTML_PARAMS; ?>> 36 <head> 37 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 38 <title><?php echo TITLE; ?></title> 39 <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> 40 </head> 41 <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> 42 43 <!-- body_text //--> 44 <table border="0" width="100%" cellspacing="0" cellpadding="2"> 45 <tr> 46 <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> 47 <tr> 48 <td class="pageHeading"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td> 49 <td class="pageHeading" align="center"><?php echo HEADING_TITLE; ?></td> 50 <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', '204', '50'); ?></td> 51 </tr> 52 </table></td> 53 </tr> 54 <tr> 55 <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> 56 <tr> 57 <td><?php echo tep_draw_separator(); ?></td> 58 </tr> 59 <tr> 60 <td valign="top"><table border="0" cellspacing="0" cellpadding="2"> 61 <tr> 62 <td class="main" valign="top"><b><?php echo TEXT_AFFILIATE; ?></b></td> 63 <td class="main"><?php echo tep_address_format($payments['affiliate_address_format_id'], $affiliate_address, 1, ' ', '<br>'); ?></td> 64 </tr> 65 <tr> 66 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> 67 </tr> 68 <tr> 69 <td class="main"><b><?php echo TEXT_AFFILIATE_PAYMENT; ?></b></td> 70 <td class="main"> <?php echo $currencies->format($payments['affiliate_payment_total']); ?></td> 71 </tr> 72 <tr> 73 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td> 74 </tr> 75 <tr> 76 <td class="main"><b><?php echo TEXT_AFFILIATE_BILLED; ?></b></td> 77 <td class="main"> <?php echo tep_date_short($payments['affiliate_payment_date']); ?></td> 78 </tr> 79 </table></td> 80 </tr> 81 </table></td> 82 </tr> 83 <tr> 84 <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '20'); ?></td> 85 </tr> 86 <tr> 87 <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> 88 <tr class="dataTableHeadingRow"> 89 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_ID; ?></td> 90 <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ORDER_DATE; ?></td> 91 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ORDER_VALUE; ?></td> 92 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_COMMISSION_RATE; ?></td> 93 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_COMMISSION_VALUE; ?></td> 94 </tr> 95 <?php 96 $affiliate_payment_query = tep_db_query("select * from " . TABLE_AFFILIATE_PAYMENT . " where affiliate_payment_id = '" . $HTTP_GET_VARS['pID'] . "'"); 97 $affiliate_payment = tep_db_fetch_array($affiliate_payment_query); 98 $affiliate_sales_query = tep_db_query("select * from " . TABLE_AFFILIATE_SALES . " where affiliate_payment_id = '" . $payments['affiliate_payment_id'] . "' order by affiliate_payment_date desc"); 99 while ($affiliate_sales = tep_db_fetch_array($affiliate_sales_query)) { 100 ?> 101 102 <tr class="dataTableRow"> 103 <td class="dataTableContent" align="right" valign="top"><?php echo $affiliate_sales['affiliate_orders_id']; ?></td> 104 <td class="dataTableContent" align="center" valign="top"><?php echo tep_date_short($affiliate_sales['affiliate_date']); ?></td> 105 <td class="dataTableContent" align="right" valign="top"><b><?php echo $currencies->display_price($affiliate_sales['affiliate_value'], ''); ?></b></td> 106 <td class="dataTableContent" align="right" valign="top"><?php echo $affiliate_sales['affiliate_percent']; ?><?php echo ENTRY_PERCENT; ?></td> 107 <td class="dataTableContent" align="right" valign="top"><b><?php echo $currencies->display_price($affiliate_sales['affiliate_payment'], ''); ?></b></td> 108 </tr> 109 <?php 110 } 111 ?> 112 </table></td> 113 </tr> 114 <tr> 115 <td align="right" colspan="5"><table border="0" cellspacing="0" cellpadding="2"> 116 <tr> 117 <td align="right" class="smallText"><?php echo TEXT_SUB_TOTAL; ?></td> 118 <td align="right" class="smallText"><?php echo $currencies->display_price($affiliate_payment['affiliate_payment'], ''); ?></td> 119 </tr> 120 <tr> 121 <td align="right" class="smallText"><?php echo TEXT_TAX; ?></td> 122 <td align="right" class="smallText"><?php echo $currencies->display_price($affiliate_payment['affiliate_payment_tax'], ''); ?></td> 123 </tr> 124 <tr> 125 <td align="right" class="smallText"><b><?php echo TEXT_TOTAL; ?></b></td> 126 <td align="right" class="smallText"><b><?php echo $currencies->display_price($affiliate_payment['affiliate_payment_total'], ''); ?></b></td> 127 </tr> 128 </table></td> 129 </tr> 130 </table> 131 <!-- body_text_eof //--> 132 </body> 133 </html> 134 <?php require (DIR_WS_INCLUDES . 'application_bottom.php');?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Jan 1 13:43:16 2010 | Cross-referenced by PHPXref 0.7 |