<function name="rpcf_get_discount_periods" id="0x2600"> <input/> <output> <integer name="discount_periods_count"/> <for name="i" from="0" count="discount_periods_count"> <integer name="static_id" array_index="i"/> <integer name="discount_period_id" array_index="i"/> <integer name="start_date" array_index="i"/> <integer name="end_date" array_index="i"/> <integer name="periodic_type" array_index="i"/> <integer name="custom_duration" array_index="i"/> <integer name="next_discount_period_id" array_index="i"/> <integer name="canonical_length" array_index="i"/> </for> </output> </function>
function rpcf_get_discount_periods() { //0x2600 $ret=array(); if (!$this->connection->urfa_call(0x2600)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $x = $this->connection->urfa_get_data();//Periods count $count = $x->DataGetInt(); $ret['count']= $count; for ($i=0;$i<$count;$i++) { // $x = $this->connection->urfa_get_data(); $period['static_id']=$x->DataGetInt(); $period['discount_period_id']=$x->DataGetInt(); $period['start_date']=$x->DataGetInt(); $period['end_date']=$x->DataGetInt(); $period['periodic_type']=$x->DataGetInt(); $period['custom_duration']=$x->DataGetInt(); $period['next_discount_period_id']=$x->DataGetInt(); $period['canonical_length']=$x->DataGetInt(); $ret['discount_periods'][]=$period; } // $this->connection->urfa_get_data(); return $ret; }