Code Duplication    Length = 3-3 lines in 2 locations

web_interface/astpp/application/modules/accounts/models/accounts_model.php 2 locations

@@ 148-150 (lines=3) @@
145
				$account_data = $this->session->userdata("accountinfo");
146
				if ($account_data['type'] == 1) {
147
					$where = array('type' => 1, "balance" => $update_array['balance']['balance'], "reseller_id" => $account_data['id'], 'deleted' => '0', 'status' => '0');
148
				} else {
149
					$where = array('type' => 1, "balance" => $update_array['balance']['balance'], 'deleted' => '0', 'status' => '0');
150
				}
151
152
				$this->db_model->build_search('reseller_list_search');
153
				$query_pricelist = $this->db_model->getSelect("id,reseller_id,balance", "accounts", $where);
@@ 212-214 (lines=3) @@
209
210
			if ($account_data['type'] == 1) {
211
				$where = array('type' => 1, "reseller_id" => $account_data['id'], 'deleted' => '0', 'status' => '0');
212
			} else {
213
				$where = array('type !=' => '-1', "balance" => $update_array['balance']['balance'], 'deleted' => '0', 'status' => '0');
214
			}
215
216
			$this->db_model->build_search('customer_list_search');
217
			$query_pricelist = $this->db_model->getSelect("id,reseller_id,balance", "accounts", $where);