Пример #1
0
    }
    return $result;
}
$sth = sql('', $dir, $sort, $rp, $page);
$sth_count_rows = sql('count', $dir, $sort, $rp, $page);
$customers = $sth->fetchAll(PDO::FETCH_ASSOC);
$count = $sth_count_rows->rowCount();
//echo sql2xml($customers, $count);
$xml .= "<rows>";
$xml .= "<page>{$page}</page>";
$xml .= "<total>{$count}</total>";
foreach ($customers as $row) {
    $status_wording = $row['status'] == 1 ? $LANG['paid'] : $LANG['not_paid'];
    $xml .= "<row id='" . $row['iso'] . "'>";
    $xml .= "<cell><![CDATA[\n\t\t\t<a class='index_table' title='{$LANG['view']} " . $row['description'] . "' href='index.php?module=expense&view=details&id=" . $row['id'] . "&action=view'><img src='images/common/view.png' height='16' border='-5px' padding='-4px' valign='bottom' /></a>\n\t\t\t<a class='index_table' title='{$LANG['edit']} " . $row['description'] . "' href='index.php?module=expense&view=details&id=" . $row['id'] . "&action=edit'><img src='images/common/edit.png' height='16' border='-5px' padding='-4px' valign='bottom' /></a>\n\t\t]]></cell>";
    $xml .= "<cell><![CDATA[" . siLocal::date($row['date']) . "]]></cell>";
    $xml .= "<cell><![CDATA[" . siLocal::number_trim($row['amount']) . "]]></cell>";
    $xml .= "<cell><![CDATA[" . siLocal::number_trim($row['tax']) . "]]></cell>";
    $xml .= "<cell><![CDATA[" . siLocal::number_trim($row['amount'] + $row['tax']) . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $row['expense_account'] . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $row['biller'] . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $row['customer'] . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $row['invoice'] . "]]></cell>";
    $xml .= "<cell><![CDATA[" . $status_wording . "]]></cell>";
    $xml .= "</row>";
}
$xml .= "</rows>";
echo $xml;
?>
 
Пример #2
0
			  <a title='".$LANG['export_tooltip']." ".$row['preference']." ".$row['index_id']."' class='invoice_export_dialog' href='#' rel='".$row['id']."'>
				  <img src='" . $baseUrl . "images/common/page_white_acrobat.png' class='action' />
			  </a>

		  <!--3 EXPORT DIALOG  onclick='export_invoice(".$row['id'].", \"".$config->export->spreadsheet."\", \"".$config->export->wordprocessor."\");'> -->
		  <!--3 EXPORT TO PDF <a title='".$LANG['export_tooltip']." ".$row['preference']." ".$row['index_id']."' class='index_table' href='pdfmaker.php?id=".$row['id']."'><img src='" . $baseUrl . "images/common/page_white_acrobat.png' class='action' /></a> -->
		  <!--4 XLS <a title='".$LANG['export_tooltip']." ".$row['preference']." ".$row['index_id']." ".$LANG['export_xls_tooltip'].$config->export->spreadsheet." ".$LANG['format_tooltip']."' class='index_table' href='index.php?module=invoices&view=templates/template&invoice='".$row['id']."&action=view&location=print&export=".$config->export->spreadsheet."'><img src='" . $baseUrl . "images/common/page_white_excel.png' class='action' /></a> -->

		  <!--6 Payment --><a title='".$LANG['process_payment_for']." ".$row['preference']." ".$row['index_id']."' class='index_table' href='index.php?module=payments&view=process&id=".$row['id']."&op=pay_selected_invoice'><img src='" . $baseUrl . "images/common/money_dollar.png' class='action' /></a>
		  <!--7 Email --><a title='".$LANG['email']." ".$row['preference']." ".$row['index_id']."' class='index_table' href='index.php?module=invoices&view=email&stage=1&id=".$row['id']."'><img src='" . $baseUrl . "images/common/mail-message-new.png' class='action' /></a>
					  ]]>
				  </cell>";
         }
		$xml .= "<cell><![CDATA[".$row['index_name']."]]></cell>";
		$xml .= "<cell><![CDATA[".$row['biller']. "]]></cell>";
		if (empty($row['customer_attention'])) {
            $xml .= "<cell><![CDATA[".$row['customer']. "]]></cell>";
        } else {
            $xml .= "<cell><![CDATA[".$row['customer']. ' / ' .$row['customer_attention']. "]]></cell>";    
        }
		$xml .= "<cell><![CDATA[".siLocal::date($row['date'])."]]></cell>";
		$xml .= "<cell><![CDATA[".siLocal::number_trim($row['invoice_total'])."]]></cell>";
		$xml .= "<cell><![CDATA[".siLocal::number_trim($row['owing'])."]]></cell>";
		$xml .= "<cell><![CDATA[".$row['aging']."]]></cell>";
		$xml .= "<cell><![CDATA[".$row['preference']."]]></cell>";
		$xml .= "</row>";
	}
	$xml .= "</rows>";

echo $xml;
Пример #3
0
$defaults = getSystemDefaults();
$smarty->assign("defaults", $defaults);
$products = new product();
$sth = $products->select_all('', $dir, $sort, $rp, $page);
$sth_count_rows = $products->select_all('count', $dir, $sort, $rp, $page);
$products_all = $sth->fetchAll(PDO::FETCH_ASSOC);
$count = $sth_count_rows->rowCount();
//echo sql2xml($customers, $count);
$xml .= "<rows>";
$xml .= "<page>{$page}</page>";
$xml .= "<total>{$count}</total>";
foreach ($products_all as $row) {
    $xml .= "<row id='" . $row['iso'] . "'>";
    $xml .= "<cell><![CDATA[\r\n\t\t\t<a class='index_table' title='{$LANG['view']} " . $row['description'] . "' href='index.php?module=products&view=details&id=" . $row['id'] . "&action=view'><img src='images/common/view.png' height='16' border='-5px' padding='-4px' valign='bottom' /></a>\r\n\t\t\t<a class='index_table' title='{$LANG['edit']} " . $row['description'] . "' href='index.php?module=products&view=details&id=" . $row['id'] . "&action=edit'><img src='images/common/edit.png' height='16' border='-5px' padding='-4px' valign='bottom' /></a>\r\n\t\t]]></cell>";
    $xml .= "<cell><![CDATA[" . $row['description'] . "]]></cell>";
    $xml .= "<cell><![CDATA[" . siLocal::number_clean($row['unit_price']) . "]]></cell>";
    if ($defaults['inventory'] == '1') {
        $xml .= "<cell><![CDATA[" . siLocal::number_trim($row['quantity']) . "]]></cell>";
    }
    if ($row['enabled'] == $LANG['enabled']) {
        $xml .= "<cell><![CDATA[<img src='images/common/tick.png' alt='" . $row['enabled'] . "' title='" . $row['enabled'] . "' />]]></cell>";
    } else {
        $xml .= "<cell><![CDATA[<img src='images/common/cross.png' alt='" . $row['enabled'] . "' title='" . $row['enabled'] . "' />]]></cell>";
    }
    $xml .= "</row>";
}
$xml .= "</rows>";
echo $xml;
?>