Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 432-441 (lines=10) @@
429
		$data["paypal_tax"] = $system_config["paypal_tax"];
430
		$data["from_currency"] = $this->common->get_field_name('currency', 'currency', $account_data["currency_id"]);
431
		$data["to_currency"] = Common_model::$global_config['system_config']['base_currency'];
432
	if($account_data['type'] == -1){
433
	  $accountdata["currency_id"] = $this->common->get_field_name('currency', 'currency', $account_data["currency_id"]);
434
		  $data["to_currency"] = $accountdata["currency_id"];
435
	}elseif($account_data['type'] == 1){
436
		$accountdata["currency_id"] = $this->common->get_field_name('currency', 'currency', $account_data["currency_id"]);
437
		$data["to_currency"] = $accountdata["currency_id"];
438
	}else{
439
		$accountdata["currency_id"] = $this->common->get_field_name('currency', 'currency', $account_data["currency_id"]);
440
		$data["to_currency"] = $accountdata["currency_id"];
441
	} 
442
 	$data['from_date']=$result['from_date'];
443
	$data['to_date']=$result['to_date'];
444
 	$data['invoice_notes']=$result['notes'];
@@ 751-760 (lines=10) @@
748
		$data["paypal_tax"] = $system_config["paypal_tax"];
749
		$data["from_currency"] = $this->common->get_field_name('currency', 'currency', $account_data["currency_id"]);
750
		$data["to_currency"] = Common_model::$global_config['system_config']['base_currency'];
751
	  if($account_data['type'] == -1){
752
	  $accountdata["currency_id"] = $this->common->get_field_name('currency', 'currency', $account_data["currency_id"]);
753
		  $data["to_currency"] = $accountdata["currency_id"];
754
	  }elseif($account_data['type'] == 1){
755
	  $accountdata["currency_id"] = $this->common->get_field_name('currency', 'currency', $account_data["currency_id"]);
756
		  $data["to_currency"] = $accountdata["currency_id"];
757
	  }else{
758
	  $accountdata["currency_id"] = $this->common->get_field_name('currency', 'currency', $account_data["currency_id"]);
759
		  $data["to_currency"] = $accountdata["currency_id"];
760
	  }
761
	  $data["system_currency"] = Common_model::$global_config['system_config']['base_currency'];
762
		foreach($invoice_total_query as  $value){
763
		 	$data['from_date']=$result['from_date'];