ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPaymentBookings Class Reference
+ Collaboration diagram for ilPaymentBookings:

Public Member Functions

 ilPaymentBookings ($a_user_id= '', $a_admin_view=false)
 setBookingId ($a_booking_id)
 getBookingId ()
 setTransaction ($a_transaction)
 getTransaction ()
 setPobjectId ($a_pobject_id)
 getPobjectId ()
 setCustomerId ($a_customer_id)
 getCustomerId ()
 setVendorId ($a_vendor_id)
 getVendorId ()
 setPayMethod ($a_pay_method)
 getPayMethod ()
 setOrderDate ($a_order_date)
 getOrderDate ()
 setDuration ($a_duration)
 getDuration ()
 setUnlimitedDuration ($a_unlimited_duration)
 getUnlimitedDuration ()
 setPrice ($a_price)
 getPrice ()
 setDiscount ($a_discount)
 getDiscount ()
 setPayed ($a_payed)
 getPayedStatus ()
 setAccess ($a_access)
 getAccessStatus ()
 setVoucher ($a_voucher)
 getVoucher ()
 setTransactionExtern ($a_transaction_extern)
 getTransactionExtern ()
 getStreet ()
 setStreet ($a_street, $a_house_nr)
 getPoBox ()
 setPoBox ($a_po_box)
 getZipcode ()
 setZipcode ($a_zipcode)
 getCity ()
 setCity ($a_city)
 getCountry ()
 setCountry ($a_country)
 setVatUnit ($a_vat_unit)
 getVatUnit ()
 setVatRate ($a_vat_rate)
 getVatRate ()
 setObjectTitle ($a_object_title)
 getObjectTitle ()
 add ()
 update ()
 delete ()
 getBookingsOfCustomer ($a_usr_id)
 getBookings ()
 getBooking ($a_booking_id)
 _getCountBookingsByVendor ($a_vendor_id)
 _getCountBookingsByCustomer ($a_vendor_id)
 _getCountBookingsByObject ($a_pobject_id)
 _hasAccess ($a_pobject_id, $a_user_id=0)
 _getActivation ($a_pobject_id, $a_user_id=0)
 _getCountBookingsByPayMethod ($a_pm)
 __read ()
 __getVendorIds ()
 getDistinctTransactions ($a_usr_id)
 getBookingsByPaymethod ($pay_method)
 deleteAddressesByPaymethod ($pay_method)

Static Public Member Functions

static __readBillByTransaction ($a_user_id, $a_transaction_nr)

Data Fields

 $user_id = null
 $db = null
 $bookings = array()
 $booking_id = null
 $payed = null
 $access = null
 $voucher = null
 $street = null
 $house_nr = null
 $po_box = null
 $zipcode = null
 $city = null
 $country = null
 $admin_view = false

Detailed Description

Definition at line 34 of file class.ilPaymentBookings.php.

Member Function Documentation

ilPaymentBookings::__getVendorIds ( )

Definition at line 833 of file class.ilPaymentBookings.php.

References $user_id, ilPaymentTrustees\_getVendorsForObjects(), ilPaymentTrustees\_hasStatisticPermissionByVendor(), and ilPaymentVendors\_isVendor().

Referenced by __read().

{
if(ilPaymentVendors::_isVendor($this->user_id))
{
$vendors[] = $this->user_id;
}
if($vend = ilPaymentTrustees::_getVendorsForObjects($this->user_id))
{
foreach($vend as $v)
{
{
$vendors[] = $v;
}
}
}
return $vendors ? $vendors : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPaymentBookings::__read ( )

Definition at line 689 of file class.ilPaymentBookings.php.

References $_SESSION, $data, $query, $res, $row, and __getVendorIds().

Referenced by ilPaymentBookings().

{
$data = array();
$data_types = array();
$query = 'SELECT * FROM payment_statistic ps '
. 'INNER JOIN payment_objects po ON po.pobject_id = ps.pobject_id ';
if($_SESSION['pay_statistics']['customer'])
{
$query .= 'LEFT JOIN usr_data ud ON ud.usr_id = ps.customer_id ';
}
if($_SESSION['pay_statistics']['vendor'] && $this->admin_view)
{
$query .= 'LEFT JOIN usr_data udv ON udv.usr_id = ps.b_vendor_id ';
}
$query .= 'WHERE 1 = 1 ';
if ($_SESSION['pay_statistics']['transaction_value'] != '')
{
if ($_SESSION['pay_statistics']['transaction_type'] == 0)
{
$query .= "AND transaction_extern LIKE %s ";
array_push($data, $_SESSION['pay_statistics']['transaction_value'].'%');
array_push($data_types, 'text');
}
else if ($_SESSION['pay_statistics']['transaction_type'] == 1)
{
$query .= "AND transaction_extern LIKE %s ";
array_push($data, '%'.$_SESSION['pay_statistics']['transaction_value']);
array_push($data_types, 'text');
}
}
if ($_SESSION['pay_statistics']['customer'] != '')
{
$query .= "AND ud.login LIKE %s ";
array_push($data, '%'.$_SESSION['pay_statistics']['customer'].'%');
array_push($data_types, 'text');
}
if ($_SESSION['pay_statistics']['from']['day'] != '' &&
$_SESSION['pay_statistics']['from']['month'] != '' &&
$_SESSION['pay_statistics']['from']['year'] != '')
{
$from = mktime(0, 0, 0, $_SESSION['pay_statistics']['from']['month'],
$_SESSION['pay_statistics']['from']['day'], $_SESSION['pay_statistics']['from']['year']);
$query .= 'AND order_date >= %s ';
array_push($data, $from);
array_push($data_types, 'integer');
}
if ($_SESSION['pay_statistics']['til']['day'] != '' &&
$_SESSION['pay_statistics']['til']['month'] != '' &&
$_SESSION['pay_statistics']['til']['year'] != '')
{
$til = mktime(23, 59, 59, $_SESSION['pay_statistics']['til']['month'],
$_SESSION['pay_statistics']['til']['day'], $_SESSION['pay_statistics']['til']['year']);
$query .= 'AND order_date <= %s ';
array_push($data, $til);
array_push($data_types, 'integer');
}
if ($_SESSION['pay_statistics']['payed'] == '0' ||
$_SESSION['pay_statistics']['payed'] == '1')
{
$query .= 'AND payed = %s ';
array_push($data, $_SESSION['pay_statistics']['payed']);
array_push($data_types, 'integer');
}
if ($_SESSION['pay_statistics']['access'] == '0' ||
$_SESSION['pay_statistics']['access'] == '1')
{
$query .= 'AND access_granted = %s ';
array_push($data, $_SESSION['pay_statistics']['access']);
array_push($data_types, 'integer');
}
if ($_SESSION['pay_statistics']['pay_method'] == '1' ||
$_SESSION['pay_statistics']['pay_method'] == '2' ||
$_SESSION['pay_statistics']['pay_method'] == '3')
{
$query .= 'AND b_pay_method = %s ';
array_push($data, $_SESSION['pay_statistics']['pay_method']);
array_push($data_types, 'integer');
}
if(!$this->admin_view)
{
$vendors = $this->__getVendorIds();
if (is_array($vendors) &&
count($vendors) > 1)
{
$query .= ' AND '.$this->db->in('ps.b_vendor_id', $vendors, false, 'integer').' ';
}
}
else
{
if($_SESSION['pay_statistics']['vendor'])
{
$query .= 'AND udv.login LIKE %s ';
array_push($data, '%'.$_SESSION['pay_statistics']['vendor'].'%');
array_push($data_types, 'text');
}
}
$query .= 'ORDER BY order_date DESC';
$cnt_data = count($data);
$cnt_data_types = count($data_types);
if($cnt_data == 0 || $cnt_data_types == 0)
{
$res = $this->db->query($query);
}
else
{
$res= $this->db->queryf($query, $data_types, $data);
}
while($row = $this->db->fetchObject($res))
{
$this->bookings[$row->booking_id]['booking_id'] = $row->booking_id;
$this->bookings[$row->booking_id]['transaction'] = $row->transaction;
$this->bookings[$row->booking_id]['pobject_id'] = $row->pobject_id;
$this->bookings[$row->booking_id]['customer_id'] = $row->customer_id;
$this->bookings[$row->booking_id]['order_date'] = $row->order_date;
$this->bookings[$row->booking_id]['duration'] = $row->duration;
$this->bookings[$row->booking_id]['price'] = $row->price;
$this->bookings[$row->booking_id]['discount'] = $row->discount;
$this->bookings[$row->booking_id]['payed'] = $row->payed;
$this->bookings[$row->booking_id]['access'] = $row->access_granted;
$this->bookings[$row->booking_id]['ref_id'] = $row->ref_id;
$this->bookings[$row->booking_id]['status'] = $row->status;
$this->bookings[$row->booking_id]['pay_method'] = $row->pay_method;
$this->bookings[$row->booking_id]['vendor_id'] = $row->vendor_id;
$this->bookings[$row->booking_id]['b_vendor_id'] = $row->b_vendor_id;
$this->bookings[$row->booking_id]['b_pay_method'] = $row->b_pay_method;
$this->bookings[$row->booking_id]['voucher'] = $row->voucher;
$this->bookings[$row->booking_id]['transaction_extern'] = $row->transaction_extern;
$this->bookings[$row->booking_id]['street'] = $row->street;
$this->bookings[$row->booking_id]['po_box'] = $row->po_box;
$this->bookings[$row->booking_id]['zipcode'] = $row->zipcode;
$this->bookings[$row->booking_id]['city'] = $row->city;
$this->bookings[$row->booking_id]['country'] = $row->country;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilPaymentBookings::__readBillByTransaction (   $a_user_id,
  $a_transaction_nr 
)
static

Definition at line 853 of file class.ilPaymentBookings.php.

References $bookings, $ilDB, $query, $res, and $row.

{
global $ilDB;
$query = 'SELECT * FROM payment_statistic as ps, payment_objects as po
WHERE ps.pobject_id = po.pobject_id
AND customer_id = %s
AND transaction = %s';
$i = 0;
$res = $ilDB->queryF($query, array('integer','text'), array($a_user_id, $a_transaction_nr));
while($row = $ilDB->fetchObject($res))
{
$bookings[$i]['booking_id'] = $row->booking_id;
$bookings[$i]['transaction'] = $row->transaction;
$bookings[$i]['pobject_id'] = $row->pobject_id;
$bookings[$i]['customer_id'] = $row->customer_id;
$bookings[$i]['order_date'] = $row->order_date;
$bookings[$i]['duration'] = $row->duration;
$bookings[$i]['duration_from'] = $row->duration_from;
$bookings[$i]['duration_until'] = $row->duration_until;
$bookings[$i]['price'] = $row->price;
$bookings[$i]['discount'] = $row->discount;
$bookings[$i]['payed'] = $row->payed;
$bookings[$i]['access'] = $row->access;
$bookings[$i]['ref_id'] = $row->ref_id;
$bookings[$i]['status'] = $row->status;
$bookings[$i]['pay_method'] = $row->pay_method;
$bookings[$i]['vendor_id'] = $row->vendor_id;
$bookings[$i]['b_vendor_id'] = $row->b_vendor_id;
$bookings[$i]['b_pay_method'] = $row->b_pay_method;
$bookings[$i]['voucher'] = $row->voucher;
$bookings[$i]['transaction_extern'] = $row->transaction_extern;
$bookings[$i]['price_type'] = $row->price_type;
$bookings[$i]['street'] = $row->street;
$bookings[$i]['po_box'] = $row->po_box;
$bookings[$i]['zipcode'] = $row->zipcode;
$bookings[$i]['city'] = $row->city;
$bookings[$i]['country'] = $row->country;
$bookings[$i]['vat_rate'] = $row->vatrate;
$bookings[$i]['vat_unit'] = $row->vat_unit;
$bookings[$i]['object_title'] = $row->object_title;
$i++;
}
return $bookings;
}
ilPaymentBookings::_getActivation (   $a_pobject_id,
  $a_user_id = 0 
)

Definition at line 578 of file class.ilPaymentBookings.php.

References $ilDB, $res, $row, and $usr_id.

{
global $ilDB,$ilias;
$usr_id = $a_user_id ? $a_user_id : $ilias->account->getId();
$res = $this->db->queryf('
SELECT * FROM payment_statistic
WHERE pobject_id = %s
AND customer_id = %s
AND payed = %s
AND access_granted = %s',
array('integer', 'integer', 'integer', 'integer'),
array($a_pobject_id, $usr_id, '1', '1'));
while($row = $this->db->fetchObject($res))
{
$orderDateYear = date("Y", $row->order_date);
$orderDateMonth = date("m", $row->order_date);
$orderDateDay = date("d", $row->order_date);
$orderDateHour = date("H", $row->order_date);
$orderDateMinute = date("i", $row->order_date);
$orderDateSecond = date("s", $row->order_date);
if (($orderDateMonth + $row->duration) > 12)
{
$years = floor(($orderDateMonth + $row->duration) / 12);
$months = ($orderDateMonth + $row->duration) - (12 * $years);
$orderDateYear += $years;
$orderDateMonth = $months;
}
else
{
$orderDateMonth += $row->duration;
}
$startDate = date("Y-m-d H:i:s", $row->order_date);
$endDate = date("Y-m-d H:i:s", mktime($orderDateHour, $orderDateMinute, $orderDateSecond, $orderDateMonth, $orderDateDay, $orderDateYear));
if (date("Y-m-d H:i:s") >= $startDate &&
date("Y-m-d H:i:s") <= $endDate)
{
$activation = array(
"activation_start" => $row->order_date,
"activation_end" => mktime($orderDateHour, $orderDateMinute, $orderDateSecond, $orderDateMonth, $orderDateDay, $orderDateYear)
);
return $activation;
}
}
return false;
}
ilPaymentBookings::_getCountBookingsByCustomer (   $a_vendor_id)

Definition at line 494 of file class.ilPaymentBookings.php.

References $ilDB, $res, and $row.

{
global $ilDB;
$res = $ilDB->queryf('
SELECT COUNT(booking_id) bid FROM payment_statistic
WHERE customer_id = %s',
array('integer'),
array($a_vendor_id));
while($row = $ilDB->fetchObject($res))
{
return $row->bid;
}
return 0;
}
ilPaymentBookings::_getCountBookingsByObject (   $a_pobject_id)

Definition at line 511 of file class.ilPaymentBookings.php.

References $ilDB, $res, and $row.

Referenced by ilPaymentObjectGUI\deleteObject(), ilObjPaymentSettingsGUI\deleteObjectObject(), ilPaymentObjectGUI\editDetails(), ilObjPaymentSettingsGUI\editObjectObject(), ilObjPaymentSettingsGUI\objectsObject(), and ilPaymentObjectGUI\showObjects().

{
global $ilDB;
$res = $ilDB->queryf('
SELECT COUNT(booking_id) bid FROM payment_statistic
WHERE pobject_id = %s',
array('integer'),
array($a_pobject_id));
while($row = $ilDB->fetchObject($res))
{
return $row->bid;
}
return 0;
}

+ Here is the caller graph for this function:

ilPaymentBookings::_getCountBookingsByPayMethod (   $a_pm)

Definition at line 627 of file class.ilPaymentBookings.php.

References $res, and $row.

{
switch($a_pm)
{
case 'pm_bill':
$res = $this->db->queryf ('
SELECT COUNT(booking_id) bid FROM payment_statistc
WHERE pay_method = %s',
array('integer'),
array('1'));
while($row = $this->db->fetchObject($res))
{
return $row->bid;
}
return 0;
case 'pm_bmf':
$res = $this->db->queryf ('
SELECT COUNT(booking_id) bid FROM payment_statistc
WHERE pay_method = %s',
array('integer'),
array('2'));
while($row = $this->db->fetchObject($res))
{
return $row->bid;
}
return 0;
case 'pm_paypal':
$res = $this->db->queryf ('
SELECT COUNT(booking_id) bid FROM payment_statistc
WHERE pay_method = %s',
array('integer'),
array('3'));
while($row = $this->db->fetchObject($res))
{
return $row->bid;
}
return 0;
case 'pm_epay':
$res = $this->db->queryf ('
SELECT COUNT(booking_id) bid FROM payment_statistc
WHERE pay_method = %s',
array('integer'),
array('4'));
while($row = $this->db->fetchObject($res))
{
return $row->bid;
}
return 0;
default:
return 0;
}
}
ilPaymentBookings::_getCountBookingsByVendor (   $a_vendor_id)

Definition at line 477 of file class.ilPaymentBookings.php.

References $ilDB, $res, and $row.

Referenced by ilObjPaymentSettingsGUI\deleteVendors(), and ilObjPaymentSettingsGUI\vendorsObject().

{
global $ilDB;
$res = $ilDB->queryf(
'SELECT COUNT(booking_id) bid FROM payment_statistic
WHERE b_vendor_id = %s',
array('integer'),
array($a_vendor_id));
while($row = $ilDB->fetchAssoc($res))
{
return $row['bid'];
}
return 0;
}

+ Here is the caller graph for this function:

ilPaymentBookings::_hasAccess (   $a_pobject_id,
  $a_user_id = 0 
)

Definition at line 528 of file class.ilPaymentBookings.php.

References $ilDB, $res, $row, and $usr_id.

Referenced by ilPaymentObject\_hasAccess().

{
global $ilDB, $ilias;
$usr_id = $a_user_id ? $a_user_id : $ilias->account->getId();
$res = $ilDB->queryf('
SELECT * FROM payment_statistic
WHERE pobject_id = %s
AND customer_id = %s
AND payed = %s
AND access_granted = %s',
array('integer', 'integer', 'integer', 'integer'),
array($a_pobject_id, $usr_id, '1', '1'));
while($row = $ilDB->fetchObject($res))
{
$orderDateYear = date("Y", $row->order_date);
$orderDateMonth = date("m", $row->order_date);
$orderDateDay = date("d", $row->order_date);
$orderDateHour = date("H", $row->order_date);
$orderDateMinute = date("i", $row->order_date);
$orderDateSecond = date("s", $row->order_date);
if($row->duration != 0)
{
if (($orderDateMonth + $row->duration) > 12)
{
$years = floor(($orderDateMonth + $row->duration) / 12);
$months = ($orderDateMonth + $row->duration) - (12 * $years);
$orderDateYear += $years;
$orderDateMonth = $months;
}
else
{
$orderDateMonth += $row->duration;
}
$startDate = date("Y-m-d H:i:s", $row->order_date);
$endDate = date("Y-m-d H:i:s", mktime($orderDateHour, $orderDateMinute, $orderDateSecond, $orderDateMonth, $orderDateDay, $orderDateYear));
if (date("Y-m-d H:i:s") >= $startDate &&
date("Y-m-d H:i:s") <= $endDate)
{
return true;
}
}
else return true;
}
return false;
}

+ Here is the caller graph for this function:

ilPaymentBookings::add ( )

Definition at line 271 of file class.ilPaymentBookings.php.

References getAccessStatus(), getCity(), getCountry(), getCustomerId(), getDiscount(), getDuration(), getObjectTitle(), getOrderDate(), getPayedStatus(), getPayMethod(), getPobjectId(), getPoBox(), getPrice(), getStreet(), getTransaction(), getTransactionExtern(), getVatRate(), getVatUnit(), getVendorId(), getVoucher(), and getZipcode().

{
$next_id = $this->db->nextId('payment_statistic');
$statement = $this->db->manipulateF('
INSERT INTO payment_statistic
(
booking_id,
transaction,
pobject_id,
customer_id,
b_vendor_id,
b_pay_method,
order_date,
duration,
price,
discount,
payed,
access_granted,
voucher,
transaction_extern,
street,
po_box,
zipcode,
city,
country,
vat_rate,
vat_unit,
object_title
)
VALUES
( %s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)',
array( 'integer',
'text',
'integer',
'integer',
'integer',
'integer',
'integer',
'text',
'text',
'text',
'integer',
'integer',
'text',
'text',
'text',
'text',
'text',
'text',
'text',
'float',
'float',
'text'),
array( $next_id,
$this->getTransaction(),
$this->getPobjectId(),
$this->getCustomerId(),
$this->getVendorId(),
$this->getPayMethod(),
$this->getOrderDate(),
$this->getDuration(),
$this->getPrice(),
$this->getDiscount(),
$this->getPayedStatus(),
$this->getAccessStatus(),
$this->getVoucher(),
$this->getStreet(),
$this->getPoBox(),
$this->getZipcode(),
$this->getCity(),
$this->getCountry(),
$this->getVatRate(),
$this->getVatUnit(),
$this->getObjectTitle()
));
return $next_id;
}

+ Here is the call graph for this function:

ilPaymentBookings::delete ( )

Definition at line 369 of file class.ilPaymentBookings.php.

References getBookingId().

{
if($this->getBookingId())
{
$statement = $this->db->manipulateF('
DELETE FROM payment_statistic WHERE booking_id = %s',
array('integer'),
array((int)$this->getBookingId())
);
return true;
}
return false;
}

+ Here is the call graph for this function:

ilPaymentBookings::deleteAddressesByPaymethod (   $pay_method)

Definition at line 963 of file class.ilPaymentBookings.php.

References $ilDB, and $pay_method.

{
global $ilDB;
$ilDB->manipulateF('
UPDATE payment_statistic
SET street = null,
po_box = null,
city = null,
zipcode = null,
country = null
WHERE b_pay_method = %s',
array('integer'),
array($pay_method));
}
ilPaymentBookings::getAccessStatus ( )

Definition at line 180 of file class.ilPaymentBookings.php.

References $access.

Referenced by add(), and update().

{
return $this->access;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getBooking (   $a_booking_id)

Definition at line 434 of file class.ilPaymentBookings.php.

References $res, and $row.

{
$res = $this->db->queryf('
SELECT * FROM payment_statistic ps, payment_objects po
WHERE ps.pobject_id = po.pobject_id
AND booking_id = %s',
array('integer'),
array($a_booking_id));
while($row = $this->db->fetchObject($res))
{
$booking['booking_id'] = $row->booking_id;
$booking['transaction'] = $row->transaction;
$booking['pobject_id'] = $row->pobject_id;
$booking['customer_id'] = $row->customer_id;
$booking['order_date'] = $row->order_date;
$booking['duration'] = $row->duration;
$booking['vat_rate'] = $row->vat_rate;
$booking['vat_unit'] = $row->vat_unit;
$booking['object_title'] = $row->object_title;
$booking['price'] = $row->price;
$booking['discount'] = $row->discount;
$booking['payed'] = $row->payed;
$booking['access'] = $row->access_granted;
$booking['ref_id'] = $row->ref_id;
$booking['status'] = $row->status;
$booking['pay_method'] = $row->pay_method;
$booking['vendor_id'] = $row->vendor_id;
$booking['b_vendor_id'] = $row->b_vendor_id;
$booking['b_pay_method'] = $row->b_pay_method;
$booking['voucher'] = $row->voucher;
$booking['transaction_extern'] = $row->transaction_extern;
$booking['street'] = $row->street;
$booking['po_box'] = $row->po_box;
$booking['zipcode'] = $row->zipcode;
$booking['city'] = $row->city;
$booking['country'] = $row->country;
}
return $booking ? $booking : array();
}
ilPaymentBookings::getBookingId ( )

Definition at line 79 of file class.ilPaymentBookings.php.

References $booking_id.

Referenced by delete(), and update().

{
}

+ Here is the caller graph for this function:

ilPaymentBookings::getBookings ( )

Definition at line 429 of file class.ilPaymentBookings.php.

{
return $this->bookings ? $this->bookings : array();
}
ilPaymentBookings::getBookingsByPaymethod (   $pay_method)

Definition at line 946 of file class.ilPaymentBookings.php.

References $ilDB, $pay_method, $res, and $row.

{
global $ilDB;
$res = $ilDB->queryF('
SELECT * FROM payment_statistic WHERE b_pay_method = %s', array('integer'), array($pay_method));
$i = 0;
while($row = $ilDB->fetchObject($res))
{
$booking[$i]['booking_id'] = $row->booking_id;
$booking[$i]['pay_method'] = $row->b_pay_method;
$i++;
}
return $booking ? $booking : array();
}
ilPaymentBookings::getBookingsOfCustomer (   $a_usr_id)

Definition at line 384 of file class.ilPaymentBookings.php.

References $res, and $row.

{
$res = $this->db->queryf('
SELECT * from payment_statistic ps, payment_objects po
WHERE ps.pobject_id = po.pobject_id
AND customer_id = %s
ORDER BY order_date DESC',
array('integer'),
array($a_usr_id)
);
while($row = $this->db->fetchObject($res))
{
$booking[$row->booking_id]['booking_id'] = $row->booking_id;
$booking[$row->booking_id]['transaction'] = $row->transaction;
$booking[$row->booking_id]['pobject_id'] = $row->pobject_id;
$booking[$row->booking_id]['customer_id'] = $row->customer_id;
$booking[$row->booking_id]['order_date'] = $row->order_date;
$booking[$row->booking_id]['duration'] = $row->duration;
$booking[$row->booking_id]['price'] = $row->price;
$booking[$row->booking_id]['discount'] = $row->discount;
$booking[$row->booking_id]['payed'] = $row->payed;
$booking[$row->booking_id]['access'] = $row->access_granted;
$booking[$row->booking_id]['ref_id'] = $row->ref_id;
$booking[$row->booking_id]['status'] = $row->status;
$booking[$row->booking_id]['pay_method'] = $row->pay_method;
$booking[$row->booking_id]['vendor_id'] = $row->vendor_id;
$booking[$row->booking_id]['b_vendor_id'] = $row->b_vendor_id;
$booking[$row->booking_id]['b_pay_method'] = $row->b_pay_method;
$booking[$row->booking_id]['voucher'] = $row->voucher;
$booking[$row->booking_id]['transaction_extern'] = $row->transaction_extern;
$booking[$row->booking_id]['street'] = $row->street;
$booking[$row->booking_id]['po_box'] = $row->po_box;
$booking[$row->booking_id]['zipcode'] = $row->zipcode;
$booking[$row->booking_id]['city'] = $row->city;
$booking[$row->booking_id]['country'] = $row->country;
$booking[$row->booking_id]['vat_rate'] = $row->vat_rate;
$booking[$row->booking_id]['vat_unit'] = $row->vat_unit;
$booking[$row->booking_id]['object_title'] = $row->object_title;
}
return $booking ? $booking : array();
}
ilPaymentBookings::getCity ( )

Definition at line 227 of file class.ilPaymentBookings.php.

References $city.

Referenced by add().

{
return $this->city;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getCountry ( )

Definition at line 236 of file class.ilPaymentBookings.php.

References $country.

Referenced by add().

{
}

+ Here is the caller graph for this function:

ilPaymentBookings::getCustomerId ( )

Definition at line 103 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->customer_id;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getDiscount ( )

Definition at line 163 of file class.ilPaymentBookings.php.

Referenced by add().

{
if($this->discount == null) $this->discount = 0;
return $this->discount;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getDistinctTransactions (   $a_usr_id)

Definition at line 901 of file class.ilPaymentBookings.php.

References $ilDB, $query, $res, and $row.

{
global $ilDB;
$query = 'SELECT * FROM payment_statistic
WHERE customer_id = %s
GROUP BY transaction
ORDER BY order_date DESC';
$res = $ilDB->queryF($query, array('integer'), array($a_user_id));
while($row = $ilDB->fetchObject($res))
{
$booking[$row->booking_id]['booking_id'] = $row->booking_id;
$booking[$row->booking_id]['transaction'] = $row->transaction;
$booking[$row->booking_id]['pobject_id'] = $row->pobject_id;
$booking[$row->booking_id]['customer_id'] = $row->customer_id;
$booking[$row->booking_id]['order_date'] = $row->order_date;
$booking[$row->booking_id]['duration'] = $row->duration;
$booking[$row->booking_id]['duration_from'] = $row->duration_from;
$booking[$row->booking_id]['duration_until'] = $row->duration_until;
$booking[$row->booking_id]['price'] = $row->price;
$booking[$row->booking_id]['discount'] = $row->discount;
$booking[$row->booking_id]['payed'] = $row->payed;
$booking[$row->booking_id]['access'] = $row->access;
$booking[$row->booking_id]['ref_id'] = $row->ref_id;
$booking[$row->booking_id]['status'] = $row->status;
$booking[$row->booking_id]['pay_method'] = $row->pay_method;
$booking[$row->booking_id]['vendor_id'] = $row->vendor_id;
$booking[$row->booking_id]['b_vendor_id'] = $row->b_vendor_id;
$booking[$row->booking_id]['b_pay_method'] = $row->b_pay_method;
$booking[$row->booking_id]['voucher'] = $row->voucher;
$booking[$row->booking_id]['transaction_extern'] = $row->transaction_extern;
$booking[$row->booking_id]['price_type'] = $row->price_type;
$booking[$row->booking_id]['street'] = $row->street;
$booking[$row->booking_id]['po_box'] = $row->po_box;
$booking[$row->booking_id]['zipcode'] = $row->zipcode;
$booking[$row->booking_id]['city'] = $row->city;
$booking[$row->booking_id]['country'] = $row->country;
$booking[$row->booking_id]['vat_rate'] = $row->vat_rate;
$booking[$row->booking_id]['vat_unit'] = $row->vat_unit;
$booking[$row->booking_id]['object_title'] = $row->object_title;
}
return $booking ? $booking : array();
}
ilPaymentBookings::getDuration ( )

Definition at line 135 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->duration;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getObjectTitle ( )

Definition at line 266 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->object_title;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getOrderDate ( )

Definition at line 127 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->order_date;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getPayedStatus ( )

Definition at line 172 of file class.ilPaymentBookings.php.

References $payed.

Referenced by add(), and update().

{
return $this->payed;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getPayMethod ( )

Definition at line 119 of file class.ilPaymentBookings.php.

References $pay_method.

Referenced by add().

{
}

+ Here is the caller graph for this function:

ilPaymentBookings::getPobjectId ( )

Definition at line 95 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->pobject_id;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getPoBox ( )

Definition at line 210 of file class.ilPaymentBookings.php.

References $po_box.

Referenced by add().

{
return $this->po_box;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getPrice ( )

Definition at line 154 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->price;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getStreet ( )

Definition at line 201 of file class.ilPaymentBookings.php.

References $street.

Referenced by add().

{
return $this->street;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getTransaction ( )

Definition at line 87 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->transaction;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getTransactionExtern ( )

Definition at line 196 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->transaction_extern;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getUnlimitedDuration ( )

Definition at line 145 of file class.ilPaymentBookings.php.

{
return $this->unlimited_duration;
}
ilPaymentBookings::getVatRate ( )

Definition at line 258 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->vat_rate;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getVatUnit ( )

Definition at line 249 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->vat_unit;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getVendorId ( )

Definition at line 111 of file class.ilPaymentBookings.php.

Referenced by add().

{
return $this->vendor_id;
}

+ Here is the caller graph for this function:

ilPaymentBookings::getVoucher ( )

Definition at line 188 of file class.ilPaymentBookings.php.

References $voucher.

Referenced by add().

{
}

+ Here is the caller graph for this function:

ilPaymentBookings::getZipcode ( )

Definition at line 219 of file class.ilPaymentBookings.php.

References $zipcode.

Referenced by add().

{
}

+ Here is the caller graph for this function:

ilPaymentBookings::ilPaymentBookings (   $a_user_id = '',
  $a_admin_view = false 
)

Definition at line 60 of file class.ilPaymentBookings.php.

References $ilDB, and __read().

{
global $ilDB;
$this->admin_view = $a_admin_view;
$this->user_id = $a_user_id;
$this->db =& $ilDB;
if($a_user_id)
{
$this->__read();
}
}

+ Here is the call graph for this function:

ilPaymentBookings::setAccess (   $a_access)

Definition at line 176 of file class.ilPaymentBookings.php.

{
$this->access = $a_access;
}
ilPaymentBookings::setBookingId (   $a_booking_id)

Definition at line 75 of file class.ilPaymentBookings.php.

{
return $this->booking_id = $a_booking_id;
}
ilPaymentBookings::setCity (   $a_city)

Definition at line 231 of file class.ilPaymentBookings.php.

{
$this->city = $a_city;
}
ilPaymentBookings::setCountry (   $a_country)

Definition at line 240 of file class.ilPaymentBookings.php.

{
$this->country = $a_country;
}
ilPaymentBookings::setCustomerId (   $a_customer_id)

Definition at line 99 of file class.ilPaymentBookings.php.

{
$this->customer_id = $a_customer_id;
}
ilPaymentBookings::setDiscount (   $a_discount)

Definition at line 158 of file class.ilPaymentBookings.php.

{
if($a_discount == null) $a_discount = 0;
$this->discount = $a_discount;
}
ilPaymentBookings::setDuration (   $a_duration)

Definition at line 131 of file class.ilPaymentBookings.php.

{
$this->duration = $a_duration;
}
ilPaymentBookings::setObjectTitle (   $a_object_title)

Definition at line 262 of file class.ilPaymentBookings.php.

{
$this->object_title = $a_object_title;
}
ilPaymentBookings::setOrderDate (   $a_order_date)

Definition at line 123 of file class.ilPaymentBookings.php.

{
$this->order_date = $a_order_date;
}
ilPaymentBookings::setPayed (   $a_payed)

Definition at line 168 of file class.ilPaymentBookings.php.

{
$this->payed = $a_payed;
}
ilPaymentBookings::setPayMethod (   $a_pay_method)

Definition at line 115 of file class.ilPaymentBookings.php.

{
$this->pay_method = $a_pay_method;
}
ilPaymentBookings::setPobjectId (   $a_pobject_id)

Definition at line 91 of file class.ilPaymentBookings.php.

{
$this->pobject_id = $a_pobject_id;
}
ilPaymentBookings::setPoBox (   $a_po_box)

Definition at line 214 of file class.ilPaymentBookings.php.

{
$this->po_box = $a_po_box;
}
ilPaymentBookings::setPrice (   $a_price)

Definition at line 150 of file class.ilPaymentBookings.php.

{
$this->price = $a_price;
}
ilPaymentBookings::setStreet (   $a_street,
  $a_house_nr 
)

Definition at line 205 of file class.ilPaymentBookings.php.

References $street.

{
$street = $a_street.' '.$a_house_nr;
$this->street = $street;
}
ilPaymentBookings::setTransaction (   $a_transaction)

Definition at line 83 of file class.ilPaymentBookings.php.

Referenced by ilPurchase\purchase().

{
$this->transaction = $a_transaction;
}

+ Here is the caller graph for this function:

ilPaymentBookings::setTransactionExtern (   $a_transaction_extern)

Definition at line 192 of file class.ilPaymentBookings.php.

{
$this->transaction_extern = $a_transaction_extern;
}
ilPaymentBookings::setUnlimitedDuration (   $a_unlimited_duration)

Definition at line 139 of file class.ilPaymentBookings.php.

{
if($a_unlimited_duration == '' || null) $a_unlimited_duration = 0;
$this->unlimited_duration = $a_unlimited_duration;
}
ilPaymentBookings::setVatRate (   $a_vat_rate)

Definition at line 254 of file class.ilPaymentBookings.php.

{
$this->vat_rate = $a_vat_rate;
}
ilPaymentBookings::setVatUnit (   $a_vat_unit)

Definition at line 244 of file class.ilPaymentBookings.php.

{
$this->vat_unit = $a_vat_unit;
}
ilPaymentBookings::setVendorId (   $a_vendor_id)

Definition at line 107 of file class.ilPaymentBookings.php.

{
$this->vendor_id = $a_vendor_id;
}
ilPaymentBookings::setVoucher (   $a_voucher)

Definition at line 184 of file class.ilPaymentBookings.php.

{
$this->voucher = $a_voucher;
}
ilPaymentBookings::setZipcode (   $a_zipcode)

Definition at line 223 of file class.ilPaymentBookings.php.

{
$this->zipcode = $a_zipcode;
}
ilPaymentBookings::update ( )

Definition at line 352 of file class.ilPaymentBookings.php.

References getAccessStatus(), getBookingId(), and getPayedStatus().

{
if($this->getBookingId())
{
$statement = $this->db->manipulateF('
UPDATE payment_statistic
SET payed = %s,
access_granted = %s
WHERE booking_id = %s',
array('integer', 'integer', 'integer'),
array((int) $this->getPayedStatus(), (int) $this->getAccessStatus(), $this->getBookingId()));
return true;
}
return false;
}

+ Here is the call graph for this function:

Field Documentation

ilPaymentBookings::$access = null

Definition at line 46 of file class.ilPaymentBookings.php.

Referenced by getAccessStatus().

ilPaymentBookings::$admin_view = false

Definition at line 55 of file class.ilPaymentBookings.php.

ilPaymentBookings::$booking_id = null

Definition at line 44 of file class.ilPaymentBookings.php.

Referenced by getBookingId().

ilPaymentBookings::$bookings = array()

Definition at line 42 of file class.ilPaymentBookings.php.

Referenced by __readBillByTransaction().

ilPaymentBookings::$city = null

Definition at line 52 of file class.ilPaymentBookings.php.

Referenced by getCity().

ilPaymentBookings::$country = null

Definition at line 53 of file class.ilPaymentBookings.php.

Referenced by getCountry().

ilPaymentBookings::$db = null

Definition at line 40 of file class.ilPaymentBookings.php.

ilPaymentBookings::$house_nr = null

Definition at line 49 of file class.ilPaymentBookings.php.

ilPaymentBookings::$payed = null

Definition at line 45 of file class.ilPaymentBookings.php.

Referenced by getPayedStatus().

ilPaymentBookings::$po_box = null

Definition at line 50 of file class.ilPaymentBookings.php.

Referenced by getPoBox().

ilPaymentBookings::$street = null

Definition at line 48 of file class.ilPaymentBookings.php.

Referenced by getStreet(), and setStreet().

ilPaymentBookings::$user_id = null

Definition at line 39 of file class.ilPaymentBookings.php.

Referenced by __getVendorIds().

ilPaymentBookings::$voucher = null

Definition at line 47 of file class.ilPaymentBookings.php.

Referenced by getVoucher().

ilPaymentBookings::$zipcode = null

Definition at line 51 of file class.ilPaymentBookings.php.

Referenced by getZipcode().


The documentation for this class was generated from the following file: