Sfoglia il codice sorgente

fix: ticketvalidation by OBU

szollosil 1 anno fa
parent
commit
82dc3a99e0

+ 34 - 0
custom/bbus/class/api_bbus.class.php

@@ -394,6 +394,40 @@ class BBus extends DolibarrApi
 		return 'OK';
 	}
 
+	/**
+	 * curlGetFilsArray
+	 *
+	 * Return an array with success information.
+	 *
+	 * @param  string $ref
+	 * 
+	 * @return array|mixed Data without useless information
+	 *
+	 * @url POST curlGetFilsArray
+	 *
+	 * @throws RestException 401
+	 * @throws RestException 403
+	 * @throws RestException 404
+	 */
+	public function curlGetFilsArray($ref)
+	{
+		$fils = [];
+		$sqlFAC = "SELECT rowid FROM llx_facture WHERE ref = '{$ref}'";
+		$resultFAC = $this->db->query($sqlFAC);
+		if ($this->db->num_rows($resultFAC)) {
+			while($facture = $this->db->fetch_object($resultFAC)){
+				$sql = "SELECT fdet.fk_product FROM llx_facture AS f
+			INNER JOIN llx_facturedet as fdet ON fdet.fk_facture = f.rowid
+			WHERE f.rowid = {$facture->rowid}";
+				$result = $this->db->query($sql);
+				while ($sqlDataResult = pg_fetch_assoc($result)) {
+					$fils[] = $sqlDataResult['fk_product'];
+				}
+			}
+		}
+		return $fils;
+	}
+
 	/**
 	 * Post invoice ref and creation date for data recording
 	 *

+ 2 - 2
custom/eventwizard/class/eventdetails.class.php

@@ -131,8 +131,8 @@ class EventDetails extends CommonObject
 		'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
 		'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Piszkozat', '1'=>'Hitelesítve', '9'=>'Cancelled'), 'validate'=>'1',),
 		'type' => array('type'=>'integer:BasicServices:custom/bbus/class/basicservices.class.php', 'label'=>'Type', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>-1,),
-		'fk_elventlocation_departure' => array('type'=>'integer:EventLocation:custom/eventwizard/class/eventlocation.class.php:1:(t.status:=:1) AND (t.entity:in:__SHARED_ENTITIES__)', 'label'=>'Departure point', 'enabled'=>'1', 'position'=>51, 'notnull'=>0, 'visible'=>-1, 'default'=>'null',),
-		'fk_elventlocation_arrival' => array('type'=>'integer:EventLocation:custom/eventwizard/class/eventlocation.class.php:1:(t.status:=:1) AND (t.entity:in:__SHARED_ENTITIES__)', 'label'=>'Arrival point', 'enabled'=>'1', 'position'=>52, 'notnull'=>0, 'visible'=>-1, 'default'=>'null',),
+		'fk_elventlocation_departure' => array('type'=>'integer:EventLocation:custom/eventwizard/class/eventlocation.class.php:1:(t.status:=:1) AND (t.entity:in:__SHARED_ENTITIES__)', 'label'=>'DeparturePoint', 'enabled'=>'1', 'position'=>51, 'notnull'=>0, 'visible'=>-1, 'default'=>'null',),
+		'fk_elventlocation_arrival' => array('type'=>'integer:EventLocation:custom/eventwizard/class/eventlocation.class.php:1:(t.status:=:1) AND (t.entity:in:__SHARED_ENTITIES__)', 'label'=>'ArrivalPoint', 'enabled'=>'1', 'position'=>52, 'notnull'=>0, 'visible'=>-1, 'default'=>'null',),
 	);
 	public $rowid;
 	public $entity;

+ 3 - 1
custom/eventwizard/langs/en_US/eventwizard.lang

@@ -59,4 +59,6 @@ EventProduct = Event Product
 ListEventProduct = List of event products
 ListEventLocation = List of event locations
 NewEventDetails = New Event detail
-ListEventDetails = List of event details
+ListEventDetails = List of event details
+DeparturePoint = Departure point
+ArrivalPoint = Arrival point

+ 3 - 1
custom/eventwizard/langs/hu_HU/eventwizard.lang

@@ -59,4 +59,6 @@ EventProduct = Eseményszolgáltatás
 ListEventProduct = Eseményszolgáltatások listája
 ListEventLocation = Eseményhelyszínek listája
 NewEventDetails = Új esemény
-ListEventDetails = Események listája
+ListEventDetails = Események listája
+DeparturePoint = Indulás helyszíne
+ArrivalPoint = Érkezés helyszíne