<function name="rpcf_get_discount_period" id="0x2602"> <input> <integer name="discount_period_id"/> </input> <output> <integer name="start_date"/> <integer name="end_date"/> <integer name="periodic_type"/> <integer name="custom_duration"/> <integer name="discounts_per_week"/> <integer name="next_discount_period_id"/> </output> </function>
function rpcf_get_discount_period($period_id) { //0x2602 $ret=array(); if (!$this->connection->urfa_call(0x2602)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet = $this->connection->getPacket(); $packet->DataSetInt($period_id); $this->connection->urfa_send_param($packet); if ($x = $this->connection->urfa_get_data()) { $ret['start_date'] = $x->DataGetInt(); $ret['end_date'] = $x->DataGetInt(); $ret['periodic_type'] = $x->DataGetInt(); $ret['custom_duration'] = $x->DataGetInt(); $ret['discounts_per_week'] = $x->DataGetInt(); $ret['next_discount_period_id'] = $x->DataGetInt(); // $this->connection->urfa_get_data(); } return $ret; }