|
@@ 430-461 (lines=32) @@
|
| 427 |
|
} |
| 428 |
|
} |
| 429 |
|
|
| 430 |
|
function origination_rate_save() { |
| 431 |
|
$add_array = $this->input->post(); |
| 432 |
|
$data['form'] = $this->form->build_form($this->rates_form->get_origination_rate_form_fields(), $add_array); |
| 433 |
|
if ($add_array['id'] != '') { |
| 434 |
|
$data['page_title'] = 'Edit Origination Rate'; |
| 435 |
|
if ($this->form_validation->run() == FALSE) { |
| 436 |
|
$data['validation_errors'] = validation_errors(); |
| 437 |
|
echo $data['validation_errors']; |
| 438 |
|
exit; |
| 439 |
|
} else { |
| 440 |
|
$add_array['connectcost'] = $this->common_model->add_calculate_currency($add_array['connectcost'], '', '', false, false); |
| 441 |
|
$add_array['cost'] = $this->common_model->add_calculate_currency($add_array['cost'], '', '', false, false); |
| 442 |
|
$this->rates_model->edit_origination_rate($add_array, $add_array['id']); |
| 443 |
|
echo json_encode(array("SUCCESS"=> "Origination rate updated successfully!")); |
| 444 |
|
exit; |
| 445 |
|
} |
| 446 |
|
} else { |
| 447 |
|
$data['page_title'] = 'Add Origination Rate'; |
| 448 |
|
if ($this->form_validation->run() == FALSE) { |
| 449 |
|
$data['validation_errors'] = validation_errors(); |
| 450 |
|
echo $data['validation_errors']; |
| 451 |
|
exit; |
| 452 |
|
} else { |
| 453 |
|
|
| 454 |
|
$add_array['connectcost'] = $this->common_model->add_calculate_currency($add_array['connectcost'], '', '', false, false); |
| 455 |
|
$add_array['cost'] = $this->common_model->add_calculate_currency($add_array['cost'], '', '', false, false); |
| 456 |
|
$this->rates_model->add_origination_rate($add_array); |
| 457 |
|
echo json_encode(array("SUCCESS"=> "Origination rate added successfully!")); |
| 458 |
|
exit; |
| 459 |
|
} |
| 460 |
|
} |
| 461 |
|
} |
| 462 |
|
|
| 463 |
|
function origination_rates_list_search() { |
| 464 |
|
$ajax_search = $this->input->post('ajax_search', 0); |
|
@@ 562-594 (lines=33) @@
|
| 559 |
|
$this->load->view('view_termination_rate_add_edit', $data); |
| 560 |
|
} |
| 561 |
|
|
| 562 |
|
function termination_rate_save() { |
| 563 |
|
$add_array = $this->input->post(); |
| 564 |
|
$data['form'] = $this->form->build_form($this->rates_form->get_termination_rate_form_fields(), $add_array); |
| 565 |
|
if ($add_array['id'] != '') { |
| 566 |
|
$data['page_title'] = 'Edit Termination Rate'; |
| 567 |
|
if ($this->form_validation->run() == FALSE) { |
| 568 |
|
$data['validation_errors'] = validation_errors(); |
| 569 |
|
echo $data['validation_errors']; |
| 570 |
|
exit; |
| 571 |
|
} else { |
| 572 |
|
$add_array['connectcost'] = $this->common_model->add_calculate_currency($add_array['connectcost'], '', '', false, false); |
| 573 |
|
$add_array['cost'] = $this->common_model->add_calculate_currency($add_array['cost'], '', '', false, false); |
| 574 |
|
$this->rates_model->edit_termination_rate($add_array, $add_array['id']); |
| 575 |
|
echo json_encode(array("SUCCESS"=> "Termination updated successfully!")); |
| 576 |
|
exit; |
| 577 |
|
} |
| 578 |
|
} else { |
| 579 |
|
$data['page_title'] = 'Add Termination Rate'; |
| 580 |
|
if ($this->form_validation->run() == FALSE) { |
| 581 |
|
$data['validation_errors'] = validation_errors(); |
| 582 |
|
echo $data['validation_errors']; |
| 583 |
|
exit; |
| 584 |
|
} else { |
| 585 |
|
|
| 586 |
|
$add_array['connectcost'] = $this->common_model->add_calculate_currency($add_array['connectcost'], '', '', false, false); |
| 587 |
|
$add_array['cost'] = $this->common_model->add_calculate_currency($add_array['cost'], '', '', false, false); |
| 588 |
|
$this->rates_model->add_termination_rate($add_array); |
| 589 |
|
echo json_encode(array("SUCCESS"=> "Termination added successfully!")); |
| 590 |
|
exit; |
| 591 |
|
} |
| 592 |
|
} |
| 593 |
|
$this->load->view('view_termination_rate_add_edit', $data); |
| 594 |
|
} |
| 595 |
|
|
| 596 |
|
function termination_rates_list_search() { |
| 597 |
|
$ajax_search = $this->input->post('ajax_search', 0); |