[ASTPPCOM-259] $cost always logged as 0 in astpp.cdr.php Created: 09/Nov/17  Updated: 14/Feb/18  Resolved: 14/Feb/18

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

Type: Task
Reporter: alexheylin Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Need to move logger line below assignment of $cost? As is $cost has the value of 0 that's assigned at the top of file.

// Calculate parent cost if customer have any parent
$parent_cost = ($parentid > 0) ? calc_cost ( $dataVariable, $origination_rate [$parentid], $logger, $decimal_points ) : $provider_cost;
$logger->log ( "Parent - Debit :" . $debit . " Cost : " . $cost . " Provider Cost : " . $parent_cost );

// Initialize final cost variable to use for billing
$cost = ($parent_cost > 0) ? $parent_cost : $provider_cost;

Thanks



 Comments   
Comment by alexheylin [ 09/Nov/17 ]

Should it also be below
// Outbound call entry for all type of calls
$logger->log ( "_********** OUTBOUND CALL ENTRY START _" );
?

Comment by Samir Doshi [ 15/Nov/17 ]

I don't understand what difference will it make if we will move longer to other line?

Are you getting $cost 0 in CDR or just in logger?

Comment by alexheylin [ 15/Nov/17 ]

I was getting zero cost in CDR (now fixed) but as it is now, the logger
reports zero all the time. I know it's minor but wouldn't it be better if
the logger was accurate?
Thanks Samir
Alex

On 15 Nov 2017 08:54, "Samir Doshi" <notifications@github.com> wrote:

I don't understand what difference will it make if we will move longer to
other line?

Are you getting $cost 0 in CDR or just in logger?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/iNextrix/ASTPP/issues/259#issuecomment-344526607>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAQifb4vw3jzG7IVyAYOA0GC7hmSUavKks5s2qbPgaJpZM4QXoIE>
.

Comment by Samir Doshi [ 15/Nov/17 ]

Ah ok. Got your point.
Will do needful.

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