Code Duplication    Length = 7-10 lines in 2 locations

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

@@ 905-914 (lines=10) @@
902
       
903
			 $this->db->insert("invoice_details",$tax_array);
904
		 }
905
	 }else{
906
	  if($logintype = 0){
907
		  $this->session->set_flashdata('astpp_notification', 'Invoice payment amount should be higher then the invoice amount.');
908
		  redirect(base_url().'user/user_invoice_payment/'.$invoice_id);
909
		  }else{
910
		  $this->session->set_flashdata('astpp_notification', 'Invoice payment amount should be higher then the invoice amount.');
911
		  redirect(base_url().'invoices/invoice_summary/'.$invoice_id);
912
		  }
913
	 
914
	 }
915
        
916
		 $this->load->module('accounts/accounts');
917
		 $reseller_debit=0;
@@ 928-934 (lines=7) @@
925
	 }
926
	 $account_data['accountid']=$account_data['id'];
927
		 $this->email_lib->send_email('email_payment_notification',$account_data ,'','',0,0,0);
928
	 if($logintype = '1'){
929
		 $this->session->set_flashdata('astpp_errormsg', 'Invoice payment done successfully!');
930
	   redirect(base_url() . 'invoices/invoice_list/');
931
	   }else{
932
		$this->session->set_flashdata('astpp_errormsg', 'Invoice payment done successfully!');
933
	   redirect(base_url() . 'user/user_invoices_list/');
934
	   }
935
	}
936
	  }
937
	 function invoice_admin_payment(){