Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 272-282 (lines=11) @@
269
			$taxes = $this->db_model->getSelect("*","taxes_to_accounts",array("accountid"=> $result['accountid']));
270
  			$total_tax=0;
271
		$data['taxes_count']= $taxes->num_rows();
272
			if ($taxes ->num_rows() > 0) {
273
			   $taxes =  $taxes->result_array();
274
		   foreach($taxes as $tax_value){
275
					  $taxe_res = $this->db_model->getSelect("*","taxes",array("id"=> $tax_value['taxes_id']));
276
				  $taxe_res =  $taxe_res->result_array();
277
			  foreach($taxe_res as $taxe_res_val){
278
			  $data['taxes_to_accounts'][]= $taxe_res_val;
279
				 $total_tax +=$taxe_res_val['taxes_rate'];
280
			  }
281
		   }
282
			 }		
283
284
		$system_config = common_model::$global_config['system_config'];
285
		if($system_config["paypal_mode"]==0){
@@ 406-416 (lines=11) @@
403
			$taxes = $this->db_model->getSelect("*","taxes_to_accounts",array("accountid"=> $result['accountid']));
404
		$data['taxes_count']= $taxes->num_rows();
405
 			$total_tax=0;
406
			if ($taxes ->num_rows() > 0) {
407
			   $taxes =  $taxes->result_array();
408
		   foreach($taxes as $tax_value){
409
					  $taxe_res = $this->db_model->getSelect("*","taxes",array("id"=> $tax_value['taxes_id']));
410
				  $taxe_res =  $taxe_res->result_array();
411
			  foreach($taxe_res as $taxe_res_val){
412
			  $data['taxes_to_accounts'][]= $taxe_res_val;
413
				 $total_tax +=$taxe_res_val['taxes_rate'];
414
			  }
415
		   }
416
			 }		
417
418
		$system_config = common_model::$global_config['system_config'];
419
		if($system_config["paypal_mode"]==0){