Ejemplo n.º 1
0
 * 
 * @copyright   Copyright (C) 2006 - 2014 Critter BVBA All rights reserved.
 * @license     GNU General Public License version 3 or later; see license.txt
 * 
 * showitem.transaction.php
 * 
 * showitem.transaction dialog
 * 
 */
// enable or disable logging
error_reporting(E_ALL);
ini_set('display_errors', '1');
// 0 - disabled; 1 - enabled
//
$o = new transaction($data->data->id);
$o->details();
$sql = "SELECT `id`,CONCAT(`name`, ' (',`uid`,')') `name` FROM `##_" . $_SESSION['space'] . "_entity` WHERE `deleted`=0 AND `id`>0 ORDER BY `name`;";
$DBO->query($sql);
$cust = $DBO->result("objectlist");
if ($o->get("id") == -1) {
    $entity_id = $cust[0]->id;
} else {
    $entity_id = $o->get("entity_id");
}
$sql = "SELECT `id`,`reference` FROM `##_" . $_SESSION['space'] . "_offer` WHERE `deleted`=0 AND `id`>0 AND `entity_id`='" . $entity_id . "' ORDER BY `reference`;";
$DBO->query($sql);
$offer = $DBO->result("objectlist");
if ($o->get("id") == -1) {
    $offer_id = $offer[0]->id;
    $OFFER = new offer($offer_id);
    $OFFER->details();
Ejemplo n.º 2
0
 */
// enable or disable logging
error_reporting(E_ALL);
ini_set('display_errors', '1');
// 0 - disabled; 1 - enabled
//
$sql = "SELECT `a`.`name`, `b`.`id`,`b`.`uid`,`b`.`reference`,DATE_FORMAT(`b`.`date`,'%Y-%m-%d') `date`, DATE_FORMAT(DATE_ADD(`b`.`date`,INTERVAL `b`.`deadline` DAY),'%Y-%m-%d') `duedate`, `b`.`id` `transaction_id`,`b`.`offer_id`\n            FROM `##_" . $_SESSION['space'] . "_entity` `a`\n            LEFT JOIN `##_" . $_SESSION['space'] . "_transaction` `b` ON (`a`.`id`=`b`.`entity_id`)\n            WHERE `b`.`satisfied`=0 AND `b`.`id`>-1\n            AND DATE_ADD(`b`.`date`,INTERVAL `b`.`deadline` DAY)<CURDATE()\n            ORDER BY `a`.`name` asc, `duedate` desc;";
$DBO->query($sql);
$customer = "";
$count = 0;
?>
<div class="dashboard">
<?php 
foreach ($DBO->result("objectlist") as $row) {
    $TRANSACTION = new transaction($row->transaction_id);
    $TRANSACTION->details();
    $OFFER = new offer($row->offer_id);
    $OFFER->details();
    if ($row->name != $customer) {
        $customer = $row->name;
        if ($count != 0) {
            echo "</div>";
        }
        ?>
<div class="customer"><?php 
        echo $row->name;
        ?>
</div>
<div class="itemlist">
<?php 
    }