Ejemplo n.º 1
0
<?php

/** 
 * Copyright: dtbaker 2012
 * Licence: Please check CodeCanyon.net for licence details. 
 * More licence clarification available here:  http://codecanyon.net/wiki/support/legal-terms/licensing-terms/ 
 * Deploy: 9809 f200f46c2a19bb98d112f2d32a8de0c4
 * Envato: 4ffca17e-861e-4921-86c3-8931978c40ca
 * Package Date: 2015-11-25 02:55:20 
 * IP Address: 67.79.165.254
 */
$page_title = _l('Tax Report');
$search = isset($_REQUEST['search']) ? $_REQUEST['search'] : array('type' => 'ie', 'date_from' => print_date(date('Y-m-d', strtotime('-1 month'))), 'date_to' => print_date(date('Y-m-d')));
$tax_reports = module_statistic::get_statistics_tax($search);
if (!module_statistic::can_i('view', 'Tax Report')) {
    redirect_browser(_BASE_HREF);
}
$currencies = array();
$available_credit_taxes = array();
$available_debit_taxes = array();
foreach ($tax_reports as $id => $finance) {
    if (isset($finance['payment_type'])) {
        if ($finance['payment_type'] == _INVOICE_PAYMENT_TYPE_OVERPAYMENT_CREDIT || $finance['payment_type'] == _INVOICE_PAYMENT_TYPE_CREDIT) {
            // ADD THIS CODE TO get_finance_summary() in finance.php too!
            // ADD THIS CODE TO finance_list.php too!
            // dont add these ones to the totals at thebottom, mark then with asterix so people know.
            unset($tax_reports[$id]);
            continue;
        }
    }
    if (!isset($currencies[$finance['currency_id']])) {