ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPaymentBookings Class Reference
+ Collaboration diagram for ilPaymentBookings:

Public Member Functions

 __construct ($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 ()
 
 setPriceType ($a_price_type)
 
 getPriceType ()
 
 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 ()
 
 setEmailExtern ($a_email_extern)
 
 getEmailExtern ()
 
 setNameExtern ($a_name_extern)
 
 getNameExtern ()
 
 setCurrencyUnit ($a_currency_unit)
 
 getCurrencyUnit ()
 
 setAccessStartdate ($a_access_startdate)
 
 getAccessStartdate ()
 
 setAccessEnddate ($a_access_enddate)
 
 getAccessEnddate ()
 
 setAccessExtension ($a_access_extension)
 
 getAccessExtension ()
 
 add ()
 
 update ()
 
 delete ()
 
 getBookings ()
 
 getBooking ($a_booking_id)
 
 __read ()
 
 __getVendorIds ()
 
 getDistinctTransactions ($a_user_id)
 
 getBookingsByPaymethod ($pay_method)
 
 deleteAddressesByPaymethod ($pay_method)
 
 getUniqueTitles ()
 

Static Public Member Functions

static getBookingsOfCustomer ($a_usr_id)
 
static _getCountBookingsByVendor ($a_vendor_id)
 
static _getCountBookingsByCustomer ($a_vendor_id)
 
static _getCountBookingsByObject ($a_pobject_id)
 
static _hasAccess ($a_pobject_id, $a_user_id=0, $a_transaction=0)
 
static __readBillByTransaction ($a_user_id, $a_transaction_nr)
 
static _readBookingByTransaction ($a_transaction)
 
static _hasAccesstoExtensionPrice ($a_user_id, $a_pobject_id)
 
static _lookupOrder ($a_pobject_id)
 

Data Fields

 $user_id = null
 
 $db = null
 
 $bookings = array()
 
 $booking_id = null
 
 $transaction = null
 
 $pobject_id = null
 
 $customer_id = null
 
 $vendor_id = null
 
 $pay_method = null
 
 $order_date = null
 
 $duration = 0
 
 $unlimited_duration = 0
 
 $price = 0
 
 $discount = 0
 
 $transaction_extern = null
 
 $vat_unit = 0
 
 $object_title = null
 
 $payed = null
 
 $access = null
 
 $voucher = null
 
 $street = null
 
 $house_nr = null
 
 $po_box = null
 
 $zipcode = null
 
 $city = null
 
 $country = null
 
 $email_extern = null
 
 $name_extern = null
 
 $currency_unit = null
 
 $access_startdate = null
 
 $access_enddate = null
 
 $admin_view = false
 
 $access_extension = false
 

Private Member Functions

 __checkExtensionDependencies ()
 
 __calculateAccessEnddate ()
 

Private Attributes

 $price_type = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $ilDB, __read(), and ilPaymentSettings\_getInstance().

63  {
64  global $ilDB;
65 
66  $this->admin_view = $a_admin_view;
67  $this->user_id = $a_user_id;
68  $this->db = $ilDB;
69 
70  include_once './Services/Payment/classes/class.ilPaymentSettings.php';
72  $this->currency_unit = $genSet->get('currency_unit');
73 
74  if($a_user_id)
75  {
76  $this->__read();
77  }
78  }
global $ilDB
+ Here is the call graph for this function:

Member Function Documentation

◆ __calculateAccessEnddate()

ilPaymentBookings::__calculateAccessEnddate ( )
private

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

References $access_enddate, $duration, getAccessStartdate(), getDuration(), IL_CAL_DATETIME, and setAccessEnddate().

Referenced by __checkExtensionDependencies(), and add().

401  {
402  include_once('Services/Calendar/classes/class.ilDateTime.php');
403 
404  $tmp_ts = new ilDateTime($this->getAccessStartdate(),IL_CAL_DATETIME);
405  $start_date = $tmp_ts->getUnixTime();
406  $duration = $this->getDuration();
407 
408  $startDateYear = date("Y", $start_date);
409  $startDateMonth = date("m", $start_date);
410  $startDateDay = date("d", $start_date);
411  $startDateHour = date("H", $start_date);
412  $startDateMinute = date("i",$start_date);
413  $startDateSecond = date("s", $start_date);
414 
415  $access_enddate = date("Y-m-d H:i:s", mktime($startDateHour, $startDateMinute, $startDateSecond,
416  $startDateMonth + $duration, $startDateDay, $startDateYear));
417 
419  }
setAccessEnddate($a_access_enddate)
const IL_CAL_DATETIME
Date and time handling
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __checkExtensionDependencies()

ilPaymentBookings::__checkExtensionDependencies ( )
private

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

References $ilDB, __calculateAccessEnddate(), getCustomerId(), getDuration(), getOrderDate(), getPobjectId(), and setAccessStartdate().

Referenced by add().

340  {
341  global $ilDB;
342 
343  $ilDB->setLimit(1,0);
344 
345  // check unlimited_duration
346  $res_1 = $ilDB->queryF('SELECT * FROM payment_statistic
347  WHERE pobject_id = %s
348  AND customer_id = %s
349  AND duration = %s
350  AND access_enddate = %s',
351  array('integer','integer', 'integer', 'timestamp'),
352  array($this->getPobjectId(), $this->getCustomerId(), 0, NULL)
353  );
354 
355  $row_1 = $ilDB->fetchAssoc($res_1);
356  if(count($row_1) > 0 )
357  {
358  // error: user already has unlimited duration. not able to extend ...
359  return false;
360  }
361 
362  // get last access_enddate
363  $res_2 = $ilDB->queryF('SELECT * FROM payment_statistic
364  WHERE pobject_id = %s
365  AND customer_id = %s
366  ORDER BY access_enddate DESC',
367  array('integer','integer'),
368  array($this->getPobjectId(), $this->getCustomerId())
369  );
370 
371  $row_2 = $ilDB->fetchAssoc($res_2);
372  if(count($row_2) > 0)
373  {
374  //user has already bought this object
375  // use access_enddate as startdate
376  $old_enddate = $row_2['access_enddate']; # Y-m-d H:i:s
377  $current_date = date("Y-m-d H:i:s", $this->getOrderDate());
378 
379  if($old_enddate <= $current_date)
380  {
381  // Zugriff ist abgelaufen, nimm das aktuelle Datum als startdate
382  $this->setAccessStartdate($current_date);
383  }
384  else
385  {
386  // der Zugriff ist noch nicht abgelaufen, nimm enddate als startdate
387  $this->setAccessStartdate($old_enddate);
388  }
389 
390  if($this->getDuration() > 0)
391  {
392  $this->__calculateAccessEnddate();
393  }
394  }
395  return true;
396  }
setAccessStartdate($a_access_startdate)
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getVendorIds()

ilPaymentBookings::__getVendorIds ( )

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

References $user_id, ilPaymentTrustees\_getVendorsForStatisticsByTrusteeId(), and ilPaymentTrustees\_hasStatisticPermissionByVendor().

Referenced by __read(), and getUniqueTitles().

865  {
866  if(ilPaymentVendors::_isVendor($this->user_id))
867  {
868  $vendors[] = $this->user_id;
869  }
870 
872 
873  if(isset ($vend))
874  {
875  foreach($vend as $v)
876  {
878  {
879  $vendors[] = $v;
880  }
881  }
882  }
883  return $vendors ? $vendors : array();
884  }
static _hasStatisticPermissionByVendor($a_trustee, $a_vendor)
static _getVendorsForStatisticsByTrusteeId($a_trustee_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __read()

ilPaymentBookings::__read ( )

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

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

Referenced by __construct().

720  {
721  global $ilUser;
722 
723  if(ANONYMOUS_USER_ID == $ilUser->getId())
724  return false;
725 
726  $data = array();
727  $data_types = array();
728 
729  $query = 'SELECT * FROM payment_statistic ps '
730  . 'INNER JOIN payment_objects po ON po.pobject_id = ps.pobject_id ';
731  if($_SESSION['pay_statistics']['customer'])
732  {
733  $query .= 'LEFT JOIN usr_data ud ON ud.usr_id = ps.customer_id ';
734  }
735  if($_SESSION['pay_statistics']['vendor'] && $this->admin_view)
736  {
737  $query .= 'LEFT JOIN usr_data udv ON udv.usr_id = ps.b_vendor_id ';
738  }
739  $query .= 'WHERE 1 = 1 ';
740  if ($_SESSION['pay_statistics']['transaction_value'] != '')
741  {
742  if ($_SESSION['pay_statistics']['transaction_type'] == 0)
743  {
744  $query .= "AND transaction_extern LIKE %s ";
745  $data_types[] = 'text';
746  $data[] = $_SESSION['pay_statistics']['transaction_value'].'%';
747  }
748  else if ($_SESSION['pay_statistics']['transaction_type'] == 1)
749  {
750  $query .= "AND transaction_extern LIKE %s ";
751  $data_types[] = 'text';
752  $data[] = '%'.$_SESSION['pay_statistics']['transaction_value'];
753  }
754  }
755  if ($_SESSION['pay_statistics']['customer'] != '')
756  {
757  $query .= "AND ud.login LIKE %s ";
758  $data_types[] = 'text';
759  $data[] = '%'.$_SESSION['pay_statistics']['customer'].'%';
760  }
761 
762  if ($_SESSION['pay_statistics']['from']['date']['d'] != '' &&
763  $_SESSION['pay_statistics']['from']['date']['m'] != '' &&
764  $_SESSION['pay_statistics']['from']['date']['y'] != '')
765  {
766 
767  $from = mktime(0, 0, 0, $_SESSION['pay_statistics']['from']['date']['m'],
768  $_SESSION['pay_statistics']['from']['date']['d'],
769  $_SESSION['pay_statistics']['from']['date']['y']);
770  $query .= 'AND order_date >= %s ';
771  $data_types[] = 'integer';
772  $data[] = $from;
773  }
774  if ($_SESSION['pay_statistics']['til']['date']['d'] != '' &&
775  $_SESSION['pay_statistics']['til']['date']['m'] != '' &&
776  $_SESSION['pay_statistics']['til']['date']['y'] != '')
777  {
778  $til = mktime(23, 59, 59, $_SESSION['pay_statistics']['til']['date']['m'],
779  $_SESSION['pay_statistics']['til']['date']['d'],
780  $_SESSION['pay_statistics']['til']['date']['y']);
781  $query .= 'AND order_date <= %s ';
782  $data_types[] = 'integer';
783  $data[] = $til;
784  }
785  if ($_SESSION['pay_statistics']['payed'] == '0' ||
786  $_SESSION['pay_statistics']['payed'] == '1')
787  {
788  $query .= 'AND payed = %s ';
789  $data_types[] = 'integer';
790  $data[] = $_SESSION['pay_statistics']['payed'];
791  }
792  if ($_SESSION['pay_statistics']['access'] == '0' ||
793  $_SESSION['pay_statistics']['access'] == '1')
794  {
795  $query .= 'AND access_granted = %s ';
796  $data_types[] = 'integer';
797  $data[] = $_SESSION['pay_statistics']['access'];
798  }
799  if ($_SESSION['pay_statistics']['pay_method'] == '1' ||
800  $_SESSION['pay_statistics']['pay_method'] == '2' ||
801  $_SESSION['pay_statistics']['pay_method'] == '3')
802  {
803  $query .= 'AND b_pay_method = %s ';
804  $data_types[] = 'integer';
805  $data[] = $_SESSION['pay_statistics']['pay_method'];
806  }
807 
808  if(!$this->admin_view)
809  {
810  $vendors = $this->__getVendorIds();
811 
812  if (is_array($vendors) &&
813  count($vendors) > 1)
814  {
815  $query .= ' AND '.$this->db->in('ps.b_vendor_id', $vendors, false, 'integer').' ';
816  }
817  else if(is_array($vendors) && count($vendors) == 1)
818  {
819  $query .= 'AND ps.b_vendor_id = %s ';
820  $data[] = $vendors['0'];
821  $data_types[] = 'integer';
822  }
823  if((int)$_SESSION['pay_statistics']['filter_title_id'])
824  {
825  $query .= "AND po.ref_id = ".(int)$_SESSION['pay_statistics']['filter_title_id']." ";
826  }
827  }
828  else
829  {
830  if($_SESSION['pay_statistics']['vendor'])
831  {
832  $query .= 'AND udv.login LIKE %s ';
833 
834  $data[] = '%'.$_SESSION['pay_statistics']['vendor'].'%';
835  $data_types[] = 'text';
836  }
837 
838  if((int)$_SESSION['pay_statistics']['adm_filter_title_id'])
839  {
840  $query .= "AND po.ref_id = ".(int)$_SESSION['pay_statistics']['adm_filter_title_id']." ";
841  }
842  }
843  $query .= 'ORDER BY order_date DESC';
844 
845  $cnt_data = count($data);
846  $cnt_data_types = count($data_types);
847 
848  if($cnt_data == 0 || $cnt_data_types == 0)
849  {
850  $res = $this->db->query($query);
851  }
852  else
853  {
854  $res= $this->db->queryf($query, $data_types, $data);
855  }
856 
857  while($row = $this->db->fetchAssoc($res))
858  {
859  $this->bookings[$row['booking_id']] = $row;
860  }
861  return true;
862  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __readBillByTransaction()

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

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

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

Referenced by ilShopBoughtObjectsGUI\createBill().

888  {
889  global $ilDB;
890 
891  $query = 'SELECT * FROM payment_statistic as ps, payment_objects as po
892  WHERE ps.pobject_id = po.pobject_id
893  AND customer_id = %s
894  AND transaction = %s';
895 
896  $res = $ilDB->queryF($query, array('integer','text'), array($a_user_id, $a_transaction_nr));
897  while($row = $ilDB->fetchAssoc($res))
898  {
899  $bookings[] = $row;
900  }
901 
902  return $bookings;
903  }
global $ilDB
+ Here is the caller graph for this function:

◆ _getCountBookingsByCustomer()

static ilPaymentBookings::_getCountBookingsByCustomer (   $a_vendor_id)
static

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

References $ilDB, $res, and $row.

622  {
623  global $ilDB;
624 
625  if(ANONYMOUS_USER_ID == $a_vendor_id)
626  return 0;
627 
628  $res = $ilDB->queryf('
629  SELECT COUNT(booking_id) bid FROM payment_statistic
630  WHERE customer_id = %s',
631  array('integer'),
632  array($a_vendor_id));
633 
634  while($row = $ilDB->fetchObject($res))
635  {
636  return $row->bid;
637  }
638  return 0;
639  }
global $ilDB

◆ _getCountBookingsByObject()

static ilPaymentBookings::_getCountBookingsByObject (   $a_pobject_id)
static

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

References $ilDB, $res, and $row.

Referenced by ilPaymentObjectGUI\deleteObject(), ilObjPaymentSettingsGUI\deleteObjectObject(), ilObjPaymentSettingsGUI\editDetailsObject(), ilObjPaymentSettingsGUI\objectsObject(), and ilPaymentObjectGUI\resetObjectFilter().

642  {
643  global $ilDB;
644 
645  $res = $ilDB->queryf('
646  SELECT COUNT(booking_id) bid FROM payment_statistic
647  WHERE pobject_id = %s',
648  array('integer'),
649  array($a_pobject_id));
650 
651  while($row = $ilDB->fetchObject($res))
652  {
653  return $row->bid;
654  }
655  return 0;
656  }
global $ilDB
+ Here is the caller graph for this function:

◆ _getCountBookingsByVendor()

static ilPaymentBookings::_getCountBookingsByVendor (   $a_vendor_id)
static

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

References $ilDB, $res, and $row.

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

605  {
606  global $ilDB;
607 
608  $res = $ilDB->queryf(
609  'SELECT COUNT(booking_id) bid FROM payment_statistic
610  WHERE b_vendor_id = %s',
611  array('integer'),
612  array($a_vendor_id));
613 
614  while($row = $ilDB->fetchAssoc($res))
615  {
616  return $row['bid'];
617  }
618  return 0;
619  }
global $ilDB
+ Here is the caller graph for this function:

◆ _hasAccess()

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

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

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

Referenced by ilPaymentObject\_hasAccess(), and ilObjectListGUI\insertPayment().

659  {
660  global $ilDB, $ilUser;
661 
662  if(ANONYMOUS_USER_ID == $ilUser->getId() && !$a_transaction)
663  {
664  return false;
665  }
666  else
667  if($a_transaction)
668  {
669  $res = $ilDB->queryf('
670  SELECT * FROM payment_statistic
671  WHERE pobject_id = %s
672  AND transaction = %s
673  AND payed = %s
674  AND access_granted = %s',
675  array('integer','text', 'integer', 'integer'),
676  array($a_pobject_id, $a_transaction, '1', '1'));
677  }
678  else
679  {
680  $usr_id = $a_user_id ? $a_user_id : $ilUser->getId();
681 
682  $res = $ilDB->queryf('
683  SELECT order_date, duration, access_startdate, access_enddate
684  FROM payment_statistic
685  WHERE pobject_id = %s
686  AND customer_id = %s
687  AND payed = %s
688  AND access_granted = %s',
689  array('integer', 'integer', 'integer', 'integer'),
690  array($a_pobject_id, $usr_id, '1', '1'));
691  }
692 
693  while($row = $ilDB->fetchAssoc($res))
694  {
695  if($row['duration'] == 0 && $row['access_enddate'] == NULL)
696  {
697  return true;
698  }
699  else
700  if($row['access_startdate'] == NULL)
701  {
702  if(time() >= $row['order_date']
703  && date("Y-m-d H:i:s") <= $row['access_enddate'])
704  {
705  return true;
706  }
707  }
708  else
709  if (date("Y-m-d H:i:s") >= $row['access_startdate']
710  && date("Y-m-d H:i:s") <= $row['access_enddate'])
711  {
712  return true;
713  }
714  }
715  return false;
716  }
global $ilUser
Definition: imgupload.php:15
global $ilDB
+ Here is the caller graph for this function:

◆ _hasAccesstoExtensionPrice()

static ilPaymentBookings::_hasAccesstoExtensionPrice (   $a_user_id,
  $a_pobject_id 
)
static

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

References $ilDB, $res, and $row.

Referenced by ilShopPurchaseGUI\showDetails().

1019  {
1020  global $ilDB;
1021 
1022  $res = $ilDB->queryF('SELECT * FROM payment_statistic
1023  WHERE customer_id = %s AND pobject_id = %s
1024  AND duration > %s',
1025  array('integer','integer', 'integer'),
1026  array($a_user_id, $a_pobject_id, 0));
1027 
1028  if($row = $ilDB->numRows($res))
1029  {
1030  return true;
1031  }
1032  return false;
1033  }
global $ilDB
+ Here is the caller graph for this function:

◆ _lookupOrder()

static ilPaymentBookings::_lookupOrder (   $a_pobject_id)
static

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

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

Referenced by ilObjectListGUI\insertPayment().

1035  {
1036  global $ilUser, $ilDB;
1037 
1038  $booking = array();
1039  $res = $ilDB->queryF('
1040  SELECT order_date, duration
1041  FROM payment_statistic
1042  WHERE pobject_id = %s
1043  AND customer_id = %s
1044  ORDER BY order_date DESC',
1045  array('integer', 'integer'),
1046  array($a_pobject_id, $ilUser->getId()));
1047 
1048  while($row = $ilDB->fetchAssoc($res))
1049  {
1050  $booking = $row;
1051  break;
1052  }
1053 
1054  return $booking;
1055  }
global $ilUser
Definition: imgupload.php:15
global $ilDB
+ Here is the caller graph for this function:

◆ _readBookingByTransaction()

static ilPaymentBookings::_readBookingByTransaction (   $a_transaction)
static

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

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

Referenced by ilObjFileGUI\executeCommand().

953  {
954  global $ilDB;
955 
956  $trans_exp = explode('_', $a_transaction);
957  $user_id = $trans_exp[1];
958 
959  $res = $ilDB->queryF('SELECT * FROM payment_statistic
960  WHERE transaction = %s
961  AND payed = %s
962  AND access_granted = %s
963  AND customer_id = %s',
964  array('text', 'integer','integer','integer'),
965  array($a_transaction, 1,1, (int)$user_id));
966  if($row = $ilDB->numRows($res))
967  {
968  return true;
969  }
970  return false;
971  }
global $ilDB
+ Here is the caller graph for this function:

◆ add()

ilPaymentBookings::add ( )

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

References __calculateAccessEnddate(), __checkExtensionDependencies(), ilPayMethods\_EnabledSaveUserAddress(), getAccessEnddate(), getAccessExtension(), getAccessStartdate(), getAccessStatus(), getCity(), getCountry(), getCurrencyUnit(), getCustomerId(), getDiscount(), getDuration(), getEmailExtern(), getNameExtern(), getObjectTitle(), getOrderDate(), getPayedStatus(), getPayMethod(), getPobjectId(), getPoBox(), getPrice(), getPriceType(), getStreet(), getTransaction(), getTransactionExtern(), getVatRate(), getVatUnit(), getVendorId(), getVoucher(), getZipcode(), setAccessStartdate(), ilPaymentPrices\TYPE_DURATION_DATE, ilPaymentPrices\TYPE_DURATION_MONTH, and ilPaymentPrices\TYPE_UNLIMITED_DURATION.

422  {
423  include_once './Services/Payment/classes/class.ilPaymentPrices.php';
424  switch($this->getPriceType())
425  {
427  // do nothing. access_startdate, access_enddate is already set
428  break;
431  if($this->getAccessExtension() == 1)
432  {
434  }
435  else
436  {
437  $this->setAccessStartdate(date('Y-m-d H:i:s', $this->getOrderDate()));
438  if($this->getDuration() > 0)
439  {
440  $this->__calculateAccessEnddate();
441  }
442  }
443  break;
444  default:
445  return false; // price_type_not_set!!!
446  break;
447  }
448 
449  $next_id = $this->db->nextId('payment_statistic');
451  {
452  $this->db->insert('payment_statistic',
453  array(
454  'booking_id' => array('integer', $next_id),
455  'transaction' => array('text', $this->getTransaction()),
456  'pobject_id' => array('integer', $this->getPobjectId()),
457  'customer_id' => array('integer', $this->getCustomerId()),
458  'b_vendor_id' => array('integer', $this->getVendorId()),
459  'b_pay_method' => array('integer', $this->getPayMethod()),
460  'order_date' => array('integer', $this->getOrderDate()),
461  'duration' => array('text', $this->getDuration()),
462  'price' => array('float', $this->getPrice()),
463  'discount' => array('float', $this->getDiscount()),
464 
465  'payed' => array('integer', $this->getPayedStatus()),
466  'access_granted'=> array('integer', $this->getAccessStatus()),
467  'voucher' => array('text', $this->getVoucher()),
468  'transaction_extern'=> array('text',$this->getTransactionExtern()),
469  'street' => array('text', $this->getStreet()),
470  'po_box' => array('text', $this->getPoBox()),
471  'zipcode' => array('text', $this->getZipcode()),
472  'city' => array('text', $this->getCity()),
473  'country' => array('text', $this->getCountry()),
474  'vat_rate' => array('float', $this->getVatRate()),
475 
476  'vat_unit' => array('float', $this->getVatUnit()),
477  'object_title' => array('text', $this->getObjectTitle()),
478  'email_extern' => array('text', $this->getEmailExtern()),
479  'name_extern' => array('text', $this->getNameExtern()),
480  'currency_unit' => array('text', $this->getCurrencyUnit()),
481  'access_startdate'=> array('timestamp', $this->getAccessStartdate()),
482  'access_enddate'=> array('timestamp', $this->getAccessEnddate())
483  ));
484  }
485  else
486  {
487  $this->db->insert('payment_statistic',
488  array(
489  'booking_id' => array('integer', $next_id),
490  'transaction' => array('text', $this->getTransaction()),
491  'pobject_id' => array('integer', $this->getPobjectId()),
492  'customer_id' => array('integer', $this->getCustomerId()),
493  'b_vendor_id' => array('integer', $this->getVendorId()),
494  'b_pay_method' => array('integer', $this->getPayMethod()),
495  'order_date' => array('integer', $this->getOrderDate()),
496  'duration' => array('text', $this->getDuration()),
497  'price' => array('float', $this->getPrice()),
498  'discount' => array('float', $this->getDiscount()),
499 
500  'payed' => array('integer', $this->getPayedStatus()),
501  'access_granted'=> array('integer', $this->getAccessStatus()),
502  'voucher' => array('text', $this->getVoucher()),
503  'transaction_extern'=> array('text',$this->getTransactionExtern()),
504 # 'street' => array('text', $this->getStreet()),
505 # 'po_box' => array('text', $this->getPoBox()),
506 # 'zipcode' => array('text', $this->getZipcode()),
507 # 'city' => array('text', $this->getCity()),
508 # 'country' => array('text', $this->getCountry()),
509  'vat_rate' => array('float', $this->getVatRate()),
510 
511  'vat_unit' => array('float', $this->getVatUnit()),
512  'object_title' => array('text', $this->getObjectTitle()),
513  'email_extern' => array('text', $this->getEmailExtern()),
514  'name_extern' => array('text', $this->getNameExtern()),
515  'currency_unit' => array('text', $this->getCurrencyUnit()),
516  'access_startdate'=> array('timestamp', $this->getAccessStartdate()),
517  'access_enddate'=> array('timestamp', $this->getAccessEnddate())
518  ));
519  }
520 
521  return $next_id;
522  }
static _EnabledSaveUserAddress($a_id)
setAccessStartdate($a_access_startdate)
+ Here is the call graph for this function:

◆ delete()

ilPaymentBookings::delete ( )

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

References getBookingId().

542  {
543  if($this->getBookingId())
544  {
545  $this->db->manipulateF('
546  DELETE FROM payment_statistic WHERE booking_id = %s',
547  array('integer'),
548  array((int)$this->getBookingId())
549  );
550 
551  return true;
552  }
553  return false;
554  }
+ Here is the call graph for this function:

◆ deleteAddressesByPaymethod()

ilPaymentBookings::deleteAddressesByPaymethod (   $pay_method)

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

References $ilDB, and $pay_method.

937  {
938  global $ilDB;
939 
940  $ilDB->manipulateF('
941  UPDATE payment_statistic
942  SET street = null,
943  po_box = null,
944  city = null,
945  zipcode = null,
946  country = null
947  WHERE b_pay_method = %s',
948  array('integer'),
949  array($pay_method));
950  }
global $ilDB

◆ getAccessEnddate()

ilPaymentBookings::getAccessEnddate ( )

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

References $access_enddate.

Referenced by add().

326  {
327  return $this->access_enddate;
328  }
+ Here is the caller graph for this function:

◆ getAccessExtension()

ilPaymentBookings::getAccessExtension ( )

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

References $access_extension.

Referenced by add().

335  {
337  }
+ Here is the caller graph for this function:

◆ getAccessStartdate()

ilPaymentBookings::getAccessStartdate ( )

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

References $access_startdate.

Referenced by __calculateAccessEnddate(), and add().

317  {
319  }
+ Here is the caller graph for this function:

◆ getAccessStatus()

ilPaymentBookings::getAccessStatus ( )

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

References $access.

Referenced by add(), and update().

196  {
197  return $this->access;
198  }
+ Here is the caller graph for this function:

◆ getBooking()

ilPaymentBookings::getBooking (   $a_booking_id)

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

References $res, and $row.

587  {
588  $booking = array();
589  $res = $this->db->queryf('
590  SELECT * FROM payment_statistic ps, payment_objects po
591  WHERE ps.pobject_id = po.pobject_id
592  AND booking_id = %s',
593  array('integer'),
594  array($a_booking_id));
595 
596  while($row = $this->db->fetchObject($res))
597  {
598  $booking = $row;
599  }
600  return $booking ? $booking : array();
601  }

◆ getBookingId()

ilPaymentBookings::getBookingId ( )

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

References $booking_id.

Referenced by delete(), and update().

86  {
87  return $this->booking_id;
88  }
+ Here is the caller graph for this function:

◆ getBookings()

ilPaymentBookings::getBookings ( )

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

582  {
583  return $this->bookings ? $this->bookings : array();
584  }

◆ getBookingsByPaymethod()

ilPaymentBookings::getBookingsByPaymethod (   $pay_method)

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

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

923  {
924  global $ilDB;
925 
926  $res = $ilDB->queryF('
927  SELECT * FROM payment_statistic WHERE b_pay_method = %s', array('integer'), array($pay_method));
928 
929  while($row = $ilDB->fetchAssoc($res))
930  {
931  $booking[] = $row;
932  }
933  return $booking ? $booking : array();
934  }
global $ilDB

◆ getBookingsOfCustomer()

static ilPaymentBookings::getBookingsOfCustomer (   $a_usr_id)
static

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

References $ilDB, $res, and $row.

Referenced by ilShopBoughtObjectsGUI\showBillHistory(), and ilShopBoughtObjectsGUI\showItems().

557  {
558  global $ilDB;
559 
560  if(ANONYMOUS_USER_ID == $a_usr_id)
561  return array();
562 
563  $booking = array();
564  $res = $ilDB->queryf('
565  SELECT * from payment_statistic ps, payment_objects po
566  WHERE ps.pobject_id = po.pobject_id
567  AND customer_id = %s
568  ORDER BY order_date DESC',
569  array('integer'),
570  array($a_usr_id)
571  );
572 
573  while($row = $ilDB->fetchAssoc($res))
574  {
575  $booking[$row['booking_id']] = $row;
576  }
577 
578  return $booking;
579  }
global $ilDB
+ Here is the caller graph for this function:

◆ getCity()

ilPaymentBookings::getCity ( )

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

References $city.

Referenced by add().

243  {
244  return $this->city;
245  }
+ Here is the caller graph for this function:

◆ getCountry()

ilPaymentBookings::getCountry ( )

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

References $country.

Referenced by add().

252  {
253  return $this->country;
254  }
+ Here is the caller graph for this function:

◆ getCurrencyUnit()

ilPaymentBookings::getCurrencyUnit ( )

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

References $currency_unit.

Referenced by add().

308  {
309  return $this->currency_unit;
310  }
+ Here is the caller graph for this function:

◆ getCustomerId()

ilPaymentBookings::getCustomerId ( )

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

References $customer_id.

Referenced by __checkExtensionDependencies(), and add().

110  {
111  return $this->customer_id;
112  }
+ Here is the caller graph for this function:

◆ getDiscount()

ilPaymentBookings::getDiscount ( )

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

References $discount.

Referenced by add().

179  {
180  if($this->discount == null) $this->discount = 0;
181  return $this->discount;
182  }
+ Here is the caller graph for this function:

◆ getDistinctTransactions()

ilPaymentBookings::getDistinctTransactions (   $a_user_id)

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

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

906  {
907  global $ilDB;
908 
909  $query = 'SELECT * FROM payment_statistic
910  WHERE customer_id = %s
911  GROUP BY transaction
912  ORDER BY order_date DESC';
913 
914  $res = $ilDB->queryF($query, array('integer'), array($a_user_id));
915  while($row = $ilDB->fetchAssoc($res))
916  {
917  $booking[$row['booking_id']] = $row;
918  }
919  return $booking ? $booking : array();
920  }
global $ilDB

◆ getDuration()

ilPaymentBookings::getDuration ( )

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

References $duration.

Referenced by __calculateAccessEnddate(), __checkExtensionDependencies(), and add().

142  {
143  return $this->duration;
144  }
+ Here is the caller graph for this function:

◆ getEmailExtern()

ilPaymentBookings::getEmailExtern ( )

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

References $email_extern.

Referenced by add().

291  {
292  return $this->email_extern;
293  }
+ Here is the caller graph for this function:

◆ getNameExtern()

ilPaymentBookings::getNameExtern ( )

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

References $name_extern.

Referenced by add().

300  {
301  return $this->name_extern;
302  }
+ Here is the caller graph for this function:

◆ getObjectTitle()

ilPaymentBookings::getObjectTitle ( )

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

References $object_title.

Referenced by add().

282  {
283  return $this->object_title;
284  }
+ Here is the caller graph for this function:

◆ getOrderDate()

ilPaymentBookings::getOrderDate ( )

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

References $order_date.

Referenced by __checkExtensionDependencies(), and add().

134  {
135  return $this->order_date;
136  }
+ Here is the caller graph for this function:

◆ getPayedStatus()

ilPaymentBookings::getPayedStatus ( )

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

References $payed.

Referenced by add(), and update().

188  {
189  return $this->payed;
190  }
+ Here is the caller graph for this function:

◆ getPayMethod()

ilPaymentBookings::getPayMethod ( )

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

References $pay_method.

Referenced by add().

126  {
127  return $this->pay_method;
128  }
+ Here is the caller graph for this function:

◆ getPobjectId()

ilPaymentBookings::getPobjectId ( )

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

References $pobject_id.

Referenced by __checkExtensionDependencies(), and add().

102  {
103  return $this->pobject_id;
104  }
+ Here is the caller graph for this function:

◆ getPoBox()

ilPaymentBookings::getPoBox ( )

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

References $po_box.

Referenced by add().

226  {
227  return $this->po_box;
228  }
+ Here is the caller graph for this function:

◆ getPrice()

ilPaymentBookings::getPrice ( )

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

References $price.

Referenced by add().

170  {
171  return $this->price;
172  }
+ Here is the caller graph for this function:

◆ getPriceType()

ilPaymentBookings::getPriceType ( )

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

References $price_type.

Referenced by add().

161  {
162  return $this->price_type;
163  }
+ Here is the caller graph for this function:

◆ getStreet()

ilPaymentBookings::getStreet ( )

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

References $street.

Referenced by add().

217  {
218  return $this->street;
219  }
+ Here is the caller graph for this function:

◆ getTransaction()

ilPaymentBookings::getTransaction ( )

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

References $transaction.

Referenced by add().

94  {
95  return $this->transaction;
96  }
+ Here is the caller graph for this function:

◆ getTransactionExtern()

ilPaymentBookings::getTransactionExtern ( )

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

References $transaction_extern.

Referenced by add().

212  {
214  }
+ Here is the caller graph for this function:

◆ getUniqueTitles()

ilPaymentBookings::getUniqueTitles ( )

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

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

974  {
975  $query = 'SELECT DISTINCT(po.ref_id) ref_id FROM payment_statistic ps, payment_objects po';
976  $query .= " WHERE ps.pobject_id = po.pobject_id ";
977 
978  if(!$this->admin_view)
979  {
980  $vendors = $this->__getVendorIds();
981 
982  if (is_array($vendors) && count($vendors) > 1)
983  {
984  foreach($vendors as $vendor)
985  {
986  $arr_data[] = '%s';
987  $data[] = $vendor;
988  $data_types[] = 'integer';
989  }
990  $str_data = implode(',',$arr_data);
991 
992  $query .= 'AND ps.b_vendor_id IN ('.$str_data.') ';
993 
994  }
995  else if(is_array($vendors) && count($vendors) == 1)
996  {
997  $query .= 'AND ps.b_vendor_id = %s ';
998  $data[] = $vendors['0'];
999  $data_types[] = 'integer';
1000  }
1001  }
1002  $query .= "ORDER BY order_date DESC";
1003 
1004  if(!$data_types && !$data)
1005  {
1006  $res = $this->db->query($query);
1007  }
1008  else $res = $this->db->queryf($query, $data_types, $data);
1009 
1010  $rows = array();
1011  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
1012  {
1013  $rows[] = $row->ref_id;
1014  }
1015  return is_array($rows) ? $rows : array();
1016  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
+ Here is the call graph for this function:

◆ getUnlimitedDuration()

ilPaymentBookings::getUnlimitedDuration ( )

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

References $unlimited_duration.

152  {
154  }

◆ getVatRate()

ilPaymentBookings::getVatRate ( )

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

Referenced by add().

274  {
275  return $this->vat_rate;
276  }
+ Here is the caller graph for this function:

◆ getVatUnit()

ilPaymentBookings::getVatUnit ( )

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

References $vat_unit.

Referenced by add().

265  {
266 
267  return $this->vat_unit;
268  }
+ Here is the caller graph for this function:

◆ getVendorId()

ilPaymentBookings::getVendorId ( )

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

References $vendor_id.

Referenced by add().

118  {
119  return $this->vendor_id;
120  }
+ Here is the caller graph for this function:

◆ getVoucher()

ilPaymentBookings::getVoucher ( )

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

References $voucher.

Referenced by add().

204  {
205  return $this->voucher;
206  }
+ Here is the caller graph for this function:

◆ getZipcode()

ilPaymentBookings::getZipcode ( )

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

References $zipcode.

Referenced by add().

235  {
236  return $this->zipcode;
237  }
+ Here is the caller graph for this function:

◆ setAccess()

ilPaymentBookings::setAccess (   $a_access)

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

192  {
193  $this->access = $a_access;
194  }

◆ setAccessEnddate()

ilPaymentBookings::setAccessEnddate (   $a_access_enddate)

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

Referenced by __calculateAccessEnddate().

322  {
323  $this->access_enddate = $a_access_enddate;
324  }
+ Here is the caller graph for this function:

◆ setAccessExtension()

ilPaymentBookings::setAccessExtension (   $a_access_extension)

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

331  {
332  $this->access_extension = $a_access_extension;
333  }

◆ setAccessStartdate()

ilPaymentBookings::setAccessStartdate (   $a_access_startdate)

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

Referenced by __checkExtensionDependencies(), and add().

313  {
314  $this->access_startdate = $a_access_startdate;
315  }
+ Here is the caller graph for this function:

◆ setBookingId()

ilPaymentBookings::setBookingId (   $a_booking_id)

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

82  {
83  return $this->booking_id = $a_booking_id;
84  }

◆ setCity()

ilPaymentBookings::setCity (   $a_city)

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

247  {
248  $this->city = $a_city;
249  }

◆ setCountry()

ilPaymentBookings::setCountry (   $a_country)

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

256  {
257  $this->country = $a_country;
258  }

◆ setCurrencyUnit()

ilPaymentBookings::setCurrencyUnit (   $a_currency_unit)

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

304  {
305  $this->currency_unit = $a_currency_unit;
306  }

◆ setCustomerId()

ilPaymentBookings::setCustomerId (   $a_customer_id)

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

106  {
107  $this->customer_id = $a_customer_id;
108  }

◆ setDiscount()

ilPaymentBookings::setDiscount (   $a_discount)

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

174  {
175  if($a_discount == null) $a_discount = 0;
176  $this->discount = $a_discount;
177  }

◆ setDuration()

ilPaymentBookings::setDuration (   $a_duration)

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

138  {
139  $this->duration = $a_duration;
140  }

◆ setEmailExtern()

ilPaymentBookings::setEmailExtern (   $a_email_extern)

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

287  {
288  $this->email_extern = $a_email_extern;
289  }

◆ setNameExtern()

ilPaymentBookings::setNameExtern (   $a_name_extern)

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

296  {
297  $this->name_extern = $a_name_extern;
298  }

◆ setObjectTitle()

ilPaymentBookings::setObjectTitle (   $a_object_title)

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

278  {
279  $this->object_title = $a_object_title;
280  }

◆ setOrderDate()

ilPaymentBookings::setOrderDate (   $a_order_date)

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

130  {
131  $this->order_date = $a_order_date;
132  }

◆ setPayed()

ilPaymentBookings::setPayed (   $a_payed)

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

184  {
185  $this->payed = $a_payed;
186  }

◆ setPayMethod()

ilPaymentBookings::setPayMethod (   $a_pay_method)

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

122  {
123  $this->pay_method = $a_pay_method;
124  }

◆ setPobjectId()

ilPaymentBookings::setPobjectId (   $a_pobject_id)

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

98  {
99  $this->pobject_id = $a_pobject_id;
100  }

◆ setPoBox()

ilPaymentBookings::setPoBox (   $a_po_box)

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

230  {
231  $this->po_box = $a_po_box;
232  }

◆ setPrice()

ilPaymentBookings::setPrice (   $a_price)

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

166  {
167  $this->price = $a_price;
168  }

◆ setPriceType()

ilPaymentBookings::setPriceType (   $a_price_type)

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

157  {
158  $this->price_type = $a_price_type;
159  }

◆ setStreet()

ilPaymentBookings::setStreet (   $a_street,
  $a_house_nr 
)

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

References $street.

221  {
222  $street = $a_street.' '.$a_house_nr;
223  $this->street = $street;
224  }

◆ setTransaction()

ilPaymentBookings::setTransaction (   $a_transaction)

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

90  {
91  $this->transaction = $a_transaction;
92  }

◆ setTransactionExtern()

ilPaymentBookings::setTransactionExtern (   $a_transaction_extern)

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

208  {
209  $this->transaction_extern = $a_transaction_extern;
210  }

◆ setUnlimitedDuration()

ilPaymentBookings::setUnlimitedDuration (   $a_unlimited_duration)

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

146  {
147  if($a_unlimited_duration == '' || null) $a_unlimited_duration = 0;
148  $this->unlimited_duration = $a_unlimited_duration;
149  }

◆ setVatRate()

ilPaymentBookings::setVatRate (   $a_vat_rate)

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

270  {
271  $this->vat_rate = $a_vat_rate;
272  }

◆ setVatUnit()

ilPaymentBookings::setVatUnit (   $a_vat_unit)

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

260  {
261 
262  $this->vat_unit = $a_vat_unit;
263  }

◆ setVendorId()

ilPaymentBookings::setVendorId (   $a_vendor_id)

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

114  {
115  $this->vendor_id = $a_vendor_id;
116  }

◆ setVoucher()

ilPaymentBookings::setVoucher (   $a_voucher)

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

200  {
201  $this->voucher = $a_voucher;
202  }

◆ setZipcode()

ilPaymentBookings::setZipcode (   $a_zipcode)

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

239  {
240  $this->zipcode = $a_zipcode;
241  }

◆ update()

ilPaymentBookings::update ( )

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

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

525  {
526  if($this->getBookingId())
527  {
528  $this->db->manipulateF('
529  UPDATE payment_statistic
530  SET payed = %s,
531  access_granted = %s
532  WHERE booking_id = %s',
533  array('integer', 'integer', 'integer'),
534  array((int) $this->getPayedStatus(), (int) $this->getAccessStatus(), $this->getBookingId()));
535 
536  return true;
537  }
538  return false;
539  }
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilPaymentBookings::$access = null

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

Referenced by getAccessStatus().

◆ $access_enddate

ilPaymentBookings::$access_enddate = null

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

Referenced by __calculateAccessEnddate(), and getAccessEnddate().

◆ $access_extension

ilPaymentBookings::$access_extension = false

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

Referenced by getAccessExtension().

◆ $access_startdate

ilPaymentBookings::$access_startdate = null

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

Referenced by getAccessStartdate().

◆ $admin_view

ilPaymentBookings::$admin_view = false

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

◆ $booking_id

ilPaymentBookings::$booking_id = null

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

Referenced by getBookingId().

◆ $bookings

ilPaymentBookings::$bookings = array()

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

Referenced by __readBillByTransaction().

◆ $city

ilPaymentBookings::$city = null

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

Referenced by getCity().

◆ $country

ilPaymentBookings::$country = null

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

Referenced by getCountry().

◆ $currency_unit

ilPaymentBookings::$currency_unit = null

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

Referenced by getCurrencyUnit().

◆ $customer_id

ilPaymentBookings::$customer_id = null

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

Referenced by getCustomerId().

◆ $db

ilPaymentBookings::$db = null

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

◆ $discount

ilPaymentBookings::$discount = 0

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

Referenced by getDiscount().

◆ $duration

ilPaymentBookings::$duration = 0

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

Referenced by __calculateAccessEnddate(), and getDuration().

◆ $email_extern

ilPaymentBookings::$email_extern = null

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

Referenced by getEmailExtern().

◆ $house_nr

ilPaymentBookings::$house_nr = null

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

◆ $name_extern

ilPaymentBookings::$name_extern = null

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

Referenced by getNameExtern().

◆ $object_title

ilPaymentBookings::$object_title = null

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

Referenced by getObjectTitle().

◆ $order_date

ilPaymentBookings::$order_date = null

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

Referenced by getOrderDate().

◆ $pay_method

ilPaymentBookings::$pay_method = null

◆ $payed

ilPaymentBookings::$payed = null

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

Referenced by getPayedStatus().

◆ $po_box

ilPaymentBookings::$po_box = null

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

Referenced by getPoBox().

◆ $pobject_id

ilPaymentBookings::$pobject_id = null

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

Referenced by getPobjectId().

◆ $price

ilPaymentBookings::$price = 0

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

Referenced by getPrice().

◆ $price_type

ilPaymentBookings::$price_type = null
private

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

Referenced by getPriceType().

◆ $street

ilPaymentBookings::$street = null

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

Referenced by getStreet(), and setStreet().

◆ $transaction

ilPaymentBookings::$transaction = null

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

Referenced by getTransaction().

◆ $transaction_extern

ilPaymentBookings::$transaction_extern = null

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

Referenced by getTransactionExtern().

◆ $unlimited_duration

ilPaymentBookings::$unlimited_duration = 0

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

Referenced by getUnlimitedDuration().

◆ $user_id

ilPaymentBookings::$user_id = null

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

Referenced by __getVendorIds(), and _readBookingByTransaction().

◆ $vat_unit

ilPaymentBookings::$vat_unit = 0

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

Referenced by getVatUnit().

◆ $vendor_id

ilPaymentBookings::$vendor_id = null

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

Referenced by getVendorId().

◆ $voucher

ilPaymentBookings::$voucher = null

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

Referenced by getVoucher().

◆ $zipcode

ilPaymentBookings::$zipcode = null

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

Referenced by getZipcode().


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