Code Duplication    Length = 10-11 lines in 2 locations

web_interface/astpp/application/modules/rates/controllers/rates.php 2 locations

@@ 660-669 (lines=10) @@
657
658
		$query = $this->rates_model->get_origination_rate_list_for_user(true, $paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
659
		$grid_fields = json_decode($this->rates_form->build_origination_rate_list_for_user());
660
		foreach ($query->result_array() as $key => $value) {
661
			$json_data['rows'][] = array('cell' => array(
662
					$this->common->get_only_numeric_val("","",$value["pattern"]),
663
					$value['comment'],
664
					$value['inc'],
665
					$this->common_model->calculate_currency(($value['cost'] + ($value['cost']*$markup)/100),'','','',true),
666
					$this->common_model->calculate_currency($value['connectcost'],'','','',true),
667
					$value['includedseconds']                    
668
			));
669
		}
670
//        $json_data['rows'] = $this->form->build_grid($query, $grid_fields);
671
		echo json_encode($json_data);
672
	}
@@ 954-964 (lines=11) @@
951
		$json_data = $paging_data["json_paging"];
952
		$query = $this->rates_model->getreseller_rates_list(true, $paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
953
		$grid_fields = json_decode($this->rates_form->build_rates_list_for_reseller());
954
		foreach ($query->result_array() as $key => $value) {
955
			$json_data['rows'][] = array('cell' => array(
956
					$this->common->get_only_numeric_val("","",$value["pattern"]),
957
					$value['comment'],
958
					$this->common_model->calculate_currency($value['connectcost'],'','','true',true),
959
					$value['includedseconds'],
960
					$this->common_model->calculate_currency(($value['cost'] + ($value['cost']*$markup)/100),'','','true',true),
961
					$value['inc'],
962
					$value['precedence'],
963
			));
964
		}
965
//        $json_data['rows'] = $this->form->build_grid($query, $grid_fields);
966
		echo json_encode($json_data);
967
	}