| @@ 546-577 (lines=32) @@ | ||
| 543 | } |
|
| 544 | } |
|
| 545 | ||
| 546 | function origination_rate_save() |
|
| 547 | { |
|
| 548 | $add_array = $this->input->post(); |
|
| 549 | $data['form'] = $this->form->build_form($this->rates_form->get_origination_rate_form_fields() , $add_array); |
|
| 550 | if ($add_array['id'] != '') |
|
| 551 | { |
|
| 552 | $data['page_title'] = 'Edit Origination Rate'; |
|
| 553 | if ($this->form_validation->run() == FALSE) |
|
| 554 | { |
|
| 555 | $data['validation_errors'] = validation_errors(); |
|
| 556 | echo $data['validation_errors']; |
|
| 557 | exit; |
|
| 558 | } |
|
| 559 | else |
|
| 560 | { |
|
| 561 | $add_array['connectcost'] = $this->common_model->add_calculate_currency($add_array['connectcost'], '', '', false, false); |
|
| 562 | $add_array['cost'] = $this->common_model->add_calculate_currency($add_array['cost'], '', '', false, false); |
|
| 563 | $this->rates_model->edit_origination_rate($add_array, $add_array['id']); |
|
| 564 | echo json_encode(array( |
|
| 565 | "SUCCESS" => "Origination rate updated successfully!" |
|
| 566 | )); |
|
| 567 | exit; |
|
| 568 | } |
|
| 569 | } |
|
| 570 | else |
|
| 571 | { |
|
| 572 | $data['page_title'] = 'Add Origination Rate'; |
|
| 573 | if ($this->form_validation->run() == FALSE) |
|
| 574 | { |
|
| 575 | $data['validation_errors'] = validation_errors(); |
|
| 576 | echo $data['validation_errors']; |
|
| 577 | exit; |
|
| 578 | } |
|
| 579 | else |
|
| 580 | { |
|
| @@ 706-738 (lines=33) @@ | ||
| 703 | $this->load->view('view_termination_rate_add_edit', $data); |
|
| 704 | } |
|
| 705 | ||
| 706 | function termination_rate_save() |
|
| 707 | { |
|
| 708 | $add_array = $this->input->post(); |
|
| 709 | $data['form'] = $this->form->build_form($this->rates_form->get_termination_rate_form_fields() , $add_array); |
|
| 710 | if ($add_array['id'] != '') |
|
| 711 | { |
|
| 712 | $data['page_title'] = 'Edit Termination Rate'; |
|
| 713 | if ($this->form_validation->run() == FALSE) |
|
| 714 | { |
|
| 715 | $data['validation_errors'] = validation_errors(); |
|
| 716 | echo $data['validation_errors']; |
|
| 717 | exit; |
|
| 718 | } |
|
| 719 | else |
|
| 720 | { |
|
| 721 | $add_array['connectcost'] = $this->common_model->add_calculate_currency($add_array['connectcost'], '', '', false, false); |
|
| 722 | $add_array['cost'] = $this->common_model->add_calculate_currency($add_array['cost'], '', '', false, false); |
|
| 723 | $this->rates_model->edit_termination_rate($add_array, $add_array['id']); |
|
| 724 | echo json_encode(array( |
|
| 725 | "SUCCESS" => "Termination updated successfully!" |
|
| 726 | )); |
|
| 727 | exit; |
|
| 728 | } |
|
| 729 | } |
|
| 730 | else |
|
| 731 | { |
|
| 732 | $data['page_title'] = 'Add Termination Rate'; |
|
| 733 | if ($this->form_validation->run() == FALSE) |
|
| 734 | { |
|
| 735 | $data['validation_errors'] = validation_errors(); |
|
| 736 | echo $data['validation_errors']; |
|
| 737 | exit; |
|
| 738 | } |
|
| 739 | else |
|
| 740 | { |
|
| 741 | $add_array['connectcost'] = $this->common_model->add_calculate_currency($add_array['connectcost'], '', '', false, false); |
|