[ASTPPCOM-244] Rate Import with Mapper. (Updated Fix Supplied) Created: 10/Oct/17  Updated: 01/Apr/21  Resolved: 01/Apr/21

Status: Done
Project: ASTPP Community
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature
Reporter: countrdd Assignee: Samir Doshi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

It is saying the records are processed, but nothing is actually inserted into the outbound routes table.



 Comments   
Comment by countrdd [ 10/Oct/17 ]

When I print the Result from the bulk insert this is what is coming back.

A PHP Error was encountered
Severity: Warning
Message: Missing argument 2 for rates_model::bulk_insert_termination_rate(), called in /var/www/html/astpp/application/modules/rates/controllers/rates.php on line 1331 and defined
Filename: models/rates_model.php
Line Number: 312
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: count
Filename: models/rates_model.php
Line Number: 331

    • Found problem and fixed, also noticed init_inc was not being uploaded after fix was applied.

Fix:

Add Line Number 1304: $csv_data ['init_inc'] = ($this->input->post ( "init_inc-select" )) ? $csv_data [$this->input->post ( "init_inc-select" )] : "0";
Add Line Number 1305: $csv_data ['init_inc'] = ($this->input->post ( "init_inc-prefix" )) ? $this->input->post ( "init_inc-prefix" ) . $csv_data ['init_inc'] : $csv_data ['init_inc'];
Add Line Number 1326: $new_final_arr [$i] ['init_inc'] = isset ( $csv_data ['init_inc'] ) ? $csv_data ['init_inc'] : 0;

at Line number 1287 Add: $row_count = 0;
at Line number 1327 Add: $row_count ++;
at line number 1335 add second argument $row_count
$result = $this->rates_model->bulk_insert_termination_rate ( $new_final_arr,$row_count );

Comment by countrdd [ 10/Oct/17 ]

Also, Found another bug....
Lines 1299, 1301, 1303, 1306 and 1309
"0" should be replaced with "".

If not the logic is setting the value to 0, and then adding then concatenating the default/prefix value to 0. Making a default value of 6 into 60.

Comment by countrdd [ 11/Oct/17 ]

ASTPP35.patch.txt

Comment by (Community) DN (Inactive) [ 03/Jan/18 ]

Thanks [~countrdd]
Is that possible for you to send PR for this modification so that we can verify and merge it with source?

Comment by countrdd [ 05/Jan/18 ]

I have not masters pR's yet.

Generated at Sat Feb 10 07:15:26 CET 2024 using Jira 8.13.3#813003-sha1:22ebedbb75c99b147c66f14e031dd8a2d214753a.