ILIAS  release_4-4 Revision
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 __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  }
+ 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 
403  include_once('Services/Calendar/classes/class.ilDateTime.php');
404 
405  $tmp_ts = new ilDateTime($this->getAccessStartdate(),IL_CAL_DATETIME);
406  $start_date = $tmp_ts->getUnixTime();
407  $duration = $this->getDuration();
408 
409  $startDateYear = date("Y", $start_date);
410  $startDateMonth = date("m", $start_date);
411  $startDateDay = date("d", $start_date);
412  $startDateHour = date("H", $start_date);
413  $startDateMinute = date("i",$start_date);
414  $startDateSecond = date("s", $start_date);
415 
416  $access_enddate = date("Y-m-d H:i:s", mktime($startDateHour, $startDateMinute, $startDateSecond,
417  $startDateMonth + $duration, $startDateDay, $startDateYear));
418 
420  }
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 __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)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getVendorIds()

ilPaymentBookings::__getVendorIds ( )

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

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

Referenced by __read(), and getUniqueTitles().

866  {
867  if(ilPaymentVendors::_isVendor($this->user_id))
868  {
869  $vendors[] = $this->user_id;
870  }
871 
873 
874  if(isset ($vend))
875  {
876  foreach($vend as $v)
877  {
879  {
880  $vendors[] = $v;
881  }
882  }
883  }
884  return $vendors ? $vendors : array();
885  }
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 720 of file class.ilPaymentBookings.php.

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

Referenced by __construct().

721  {
722  global $ilUser;
723 
724  if(ANONYMOUS_USER_ID == $ilUser->getId())
725  return false;
726 
727  $data = array();
728  $data_types = array();
729 
730  $query = 'SELECT * FROM payment_statistic ps '
731  . 'INNER JOIN payment_objects po ON po.pobject_id = ps.pobject_id ';
732  if($_SESSION['pay_statistics']['customer'])
733  {
734  $query .= 'LEFT JOIN usr_data ud ON ud.usr_id = ps.customer_id ';
735  }
736  if($_SESSION['pay_statistics']['vendor'] && $this->admin_view)
737  {
738  $query .= 'LEFT JOIN usr_data udv ON udv.usr_id = ps.b_vendor_id ';
739  }
740  $query .= 'WHERE 1 = 1 ';
741  if ($_SESSION['pay_statistics']['transaction_value'] != '')
742  {
743  if ($_SESSION['pay_statistics']['transaction_type'] == 0)
744  {
745  $query .= "AND transaction_extern LIKE %s ";
746  $data_types[] = 'text';
747  $data[] = $_SESSION['pay_statistics']['transaction_value'].'%';
748  }
749  else if ($_SESSION['pay_statistics']['transaction_type'] == 1)
750  {
751  $query .= "AND transaction_extern LIKE %s ";
752  $data_types[] = 'text';
753  $data[] = '%'.$_SESSION['pay_statistics']['transaction_value'];
754  }
755  }
756  if ($_SESSION['pay_statistics']['customer'] != '')
757  {
758  $query .= "AND ud.login LIKE %s ";
759  $data_types[] = 'text';
760  $data[] = '%'.$_SESSION['pay_statistics']['customer'].'%';
761  }
762 
763  if ($_SESSION['pay_statistics']['from']['date']['d'] != '' &&
764  $_SESSION['pay_statistics']['from']['date']['m'] != '' &&
765  $_SESSION['pay_statistics']['from']['date']['y'] != '')
766  {
767 
768  $from = mktime(0, 0, 0, $_SESSION['pay_statistics']['from']['date']['m'],
769  $_SESSION['pay_statistics']['from']['date']['d'],
770  $_SESSION['pay_statistics']['from']['date']['y']);
771  $query .= 'AND order_date >= %s ';
772  $data_types[] = 'integer';
773  $data[] = $from;
774  }
775  if ($_SESSION['pay_statistics']['til']['date']['d'] != '' &&
776  $_SESSION['pay_statistics']['til']['date']['m'] != '' &&
777  $_SESSION['pay_statistics']['til']['date']['y'] != '')
778  {
779  $til = mktime(23, 59, 59, $_SESSION['pay_statistics']['til']['date']['m'],
780  $_SESSION['pay_statistics']['til']['date']['d'],
781  $_SESSION['pay_statistics']['til']['date']['y']);
782  $query .= 'AND order_date <= %s ';
783  $data_types[] = 'integer';
784  $data[] = $til;
785  }
786  if ($_SESSION['pay_statistics']['payed'] == '0' ||
787  $_SESSION['pay_statistics']['payed'] == '1')
788  {
789  $query .= 'AND payed = %s ';
790  $data_types[] = 'integer';
791  $data[] = $_SESSION['pay_statistics']['payed'];
792  }
793  if ($_SESSION['pay_statistics']['access'] == '0' ||
794  $_SESSION['pay_statistics']['access'] == '1')
795  {
796  $query .= 'AND access_granted = %s ';
797  $data_types[] = 'integer';
798  $data[] = $_SESSION['pay_statistics']['access'];
799  }
800  if ($_SESSION['pay_statistics']['pay_method'] == '1' ||
801  $_SESSION['pay_statistics']['pay_method'] == '2' ||
802  $_SESSION['pay_statistics']['pay_method'] == '3')
803  {
804  $query .= 'AND b_pay_method = %s ';
805  $data_types[] = 'integer';
806  $data[] = $_SESSION['pay_statistics']['pay_method'];
807  }
808 
809  if(!$this->admin_view)
810  {
811  $vendors = $this->__getVendorIds();
812 
813  if (is_array($vendors) &&
814  count($vendors) > 1)
815  {
816  $query .= ' AND '.$this->db->in('ps.b_vendor_id', $vendors, false, 'integer').' ';
817  }
818  else if(is_array($vendors) && count($vendors) == 1)
819  {
820  $query .= 'AND ps.b_vendor_id = %s ';
821  $data[] = $vendors['0'];
822  $data_types[] = 'integer';
823  }
824  if((int)$_SESSION['pay_statistics']['filter_title_id'])
825  {
826  $query .= "AND po.ref_id = ".(int)$_SESSION['pay_statistics']['filter_title_id']." ";
827  }
828  }
829  else
830  {
831  if($_SESSION['pay_statistics']['vendor'])
832  {
833  $query .= 'AND udv.login LIKE %s ';
834 
835  $data[] = '%'.$_SESSION['pay_statistics']['vendor'].'%';
836  $data_types[] = 'text';
837  }
838 
839  if((int)$_SESSION['pay_statistics']['adm_filter_title_id'])
840  {
841  $query .= "AND po.ref_id = ".(int)$_SESSION['pay_statistics']['adm_filter_title_id']." ";
842  }
843  }
844  $query .= 'ORDER BY order_date DESC';
845 
846  $cnt_data = count($data);
847  $cnt_data_types = count($data_types);
848 
849  if($cnt_data == 0 || $cnt_data_types == 0)
850  {
851  $res = $this->db->query($query);
852  }
853  else
854  {
855  $res= $this->db->queryf($query, $data_types, $data);
856  }
857 
858  while($row = $this->db->fetchAssoc($res))
859  {
860  $this->bookings[$row['booking_id']] = $row;
861  }
862  return true;
863  }
< 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']
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
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 888 of file class.ilPaymentBookings.php.

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

Referenced by ilShopBoughtObjectsGUI\createBill().

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

◆ _getCountBookingsByCustomer()

static ilPaymentBookings::_getCountBookingsByCustomer (   $a_vendor_id)
static

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

References $res, and $row.

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

◆ _getCountBookingsByObject()

static ilPaymentBookings::_getCountBookingsByObject (   $a_pobject_id)
static

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

References $res, and $row.

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

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

◆ _getCountBookingsByVendor()

static ilPaymentBookings::_getCountBookingsByVendor (   $a_vendor_id)
static

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

References $res, and $row.

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

606  {
607  global $ilDB;
608 
609  $res = $ilDB->queryf(
610  'SELECT COUNT(booking_id) bid FROM payment_statistic
611  WHERE b_vendor_id = %s',
612  array('integer'),
613  array($a_vendor_id));
614 
615  while($row = $ilDB->fetchAssoc($res))
616  {
617  return $row['bid'];
618  }
619  return 0;
620  }
+ 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 659 of file class.ilPaymentBookings.php.

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

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

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

◆ _hasAccesstoExtensionPrice()

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

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

References $res, and $row.

Referenced by ilShopPurchaseGUI\showDetails().

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

◆ _lookupOrder()

static ilPaymentBookings::_lookupOrder (   $a_pobject_id)
static

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

References $ilUser, $res, and $row.

Referenced by ilObjectListGUI\insertPayment().

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

◆ _readBookingByTransaction()

static ilPaymentBookings::_readBookingByTransaction (   $a_transaction)
static

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

References $res, $row, and $user_id.

Referenced by ilObjFileGUI\executeCommand().

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

◆ add()

ilPaymentBookings::add ( )

Definition at line 422 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.

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

◆ delete()

ilPaymentBookings::delete ( )

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

References getBookingId().

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

◆ deleteAddressesByPaymethod()

ilPaymentBookings::deleteAddressesByPaymethod (   $pay_method)

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

References $pay_method.

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

◆ 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 587 of file class.ilPaymentBookings.php.

References $res, and $row.

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

◆ 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 582 of file class.ilPaymentBookings.php.

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

◆ getBookingsByPaymethod()

ilPaymentBookings::getBookingsByPaymethod (   $pay_method)

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

References $pay_method, $res, and $row.

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

◆ getBookingsOfCustomer()

static ilPaymentBookings::getBookingsOfCustomer (   $a_usr_id)
static

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

References $res, and $row.

Referenced by ilShopBoughtObjectsGUI\showItems().

558  {
559  global $ilDB;
560 
561  if(ANONYMOUS_USER_ID == $a_usr_id)
562  return array();
563 
564  $booking = array();
565  $res = $ilDB->queryf('
566  SELECT * from payment_statistic ps, payment_objects po
567  WHERE ps.pobject_id = po.pobject_id
568  AND customer_id = %s
569  ORDER BY order_date DESC',
570  array('integer'),
571  array($a_usr_id)
572  );
573 
574  while($row = $ilDB->fetchAssoc($res))
575  {
576  $booking[$row['booking_id']] = $row;
577  }
578 
579  return $booking;
580  }
+ 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 906 of file class.ilPaymentBookings.php.

References $query, $res, and $row.

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

◆ 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 974 of file class.ilPaymentBookings.php.

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

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

Referenced by ilPurchase\purchase().

90  {
91  $this->transaction = $a_transaction;
92  }
+ Here is the caller graph for this function:

◆ 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 525 of file class.ilPaymentBookings.php.

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

526  {
527  if($this->getBookingId())
528  {
529  $statement = $this->db->manipulateF('
530  UPDATE payment_statistic
531  SET payed = %s,
532  access_granted = %s
533  WHERE booking_id = %s',
534  array('integer', 'integer', 'integer'),
535  array((int) $this->getPayedStatus(), (int) $this->getAccessStatus(), $this->getBookingId()));
536 
537  return true;
538  }
539  return false;
540  }
+ 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: