Thread: [Astpp-commit] SF.net SVN: astpp:[2200] trunk/astpp-common.pl
Brought to you by:
darrenkw
From: <dar...@us...> - 2008-10-10 04:25:14
|
Revision: 2200 http://astpp.svn.sourceforge.net/astpp/?rev=2200&view=rev Author: darrenkw Date: 2008-10-10 04:25:00 +0000 (Fri, 10 Oct 2008) Log Message: ----------- We now use the accountname instead of the CC code on asterisk-realtime users accountcodes. Modified Paths: -------------- trunk/astpp-common.pl Modified: trunk/astpp-common.pl =================================================================== --- trunk/astpp-common.pl 2008-10-02 03:59:39 UTC (rev 2199) +++ trunk/astpp-common.pl 2008-10-10 04:25:00 UTC (rev 2200) @@ -2455,7 +2455,7 @@ . "cancallforward) VALUES (" . $rt_dbh->quote($clid) . ", " . $rt_dbh->quote($name) . ", " - . $rt_dbh->quote($cc) . ", " + . $rt_dbh->quote($name) . ", " . $rt_dbh->quote( $config->{rt_sip_canreinvite} ) . ", " . $rt_dbh->quote($context) . ", " . $rt_dbh->quote( $config->{ipaddr} ) . ", " @@ -2539,7 +2539,7 @@ . ") VALUES (" . $rt_dbh->quote($clid) . ", " . $rt_dbh->quote($name) . ", " - . $rt_dbh->quote($cc) . ", " + . $rt_dbh->quote($name) . ", " . $rt_dbh->quote($context) . ", " . $rt_dbh->quote( $config->{ipaddr} ) . ", " . $rt_dbh->quote($mailbox) . ", " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dar...@us...> - 2008-11-25 05:24:19
|
Revision: 2211 http://astpp.svn.sourceforge.net/astpp/?rev=2211&view=rev Author: darrenkw Date: 2008-11-25 05:24:17 +0000 (Tue, 25 Nov 2008) Log Message: ----------- The "decimalpoints" variable is not being respected when posting to oscommerce. Fixed this. Modified Paths: -------------- trunk/astpp-common.pl Modified: trunk/astpp-common.pl =================================================================== --- trunk/astpp-common.pl 2008-11-25 05:12:49 UTC (rev 2210) +++ trunk/astpp-common.pl 2008-11-25 05:24:17 UTC (rev 2211) @@ -4641,6 +4641,7 @@ $desc = "$row->{callstart} SRC: $row->{callerid} DST: $row->{callednum} SEC:$row->{billseconds} $row->{notes}"; $price = $row->{debit} / 10000; if($config->{osc_post_nc} == 1 || $price != 0) { + $price = sprintf( "%." . $config->{decimalpoints} . "f", $price ); $tmp = "INSERT INTO `orders_products` (`orders_products_id`,`orders_id`,`products_id`,`products_name`,`products_price`," . "`final_price`,`products_tax`,`products_quantity`) VALUES (''," @@ -4747,6 +4748,7 @@ $tax_priority = $tax->{tax_priority}; $tax_amount = $subtotal * ( $tax->{tax_rate} / 100 ); $sort++; + $tax_amount = sprintf( "%." . $config->{decimalpoints} . "f", $tax_amount ); &osc_post_total( $osc_db, $config, $invoice_id, $tax->{tax_description}, "\$$tax_amount", $tax_amount, $sort, "ot_tax" ); $tax_count++; @@ -4758,12 +4760,14 @@ $tax_priority = $tax->{tax_priority}; $tax_amount = $subtotal * ( $tax->{tax_rate} / 100 ); $sort++; + $tax_amount = sprintf( "%." . $config->{decimalpoints} . "f", $tax_amount ); &osc_post_total($osc_db, $config, $invoice_id, $tax->{tax_description}, "\$$tax_amount", $tax_amount, $sort, "ot_tax" ); } } $total = &osc_order_total($osc_db, $config, $invoice_id); $sort++; + $total = sprintf( "%." . $config->{decimalpoints} . "f", $total ); &osc_post_total($osc_db, $config, $invoice_id, "Total:", "<b>\$$total</b>", $total, $sort, "ot_total" ); &email_new_invoice( $astpp_db, "", $config, $account, $invoice_id, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dar...@us...> - 2008-12-03 06:15:00
|
Revision: 2215 http://astpp.svn.sourceforge.net/astpp/?rev=2215&view=rev Author: darrenkw Date: 2008-12-03 06:14:49 +0000 (Wed, 03 Dec 2008) Log Message: ----------- Fixed Thirdlane DID billing code. Modified Paths: -------------- trunk/astpp-common.pl Modified: trunk/astpp-common.pl =================================================================== --- trunk/astpp-common.pl 2008-12-02 03:35:36 UTC (rev 2214) +++ trunk/astpp-common.pl 2008-12-03 06:14:49 UTC (rev 2215) @@ -4128,6 +4128,17 @@ # $cdrinfo->{'cost'} = 'rating'; # } if ( $cdrinfo->{accountcode} ) { + if ($config->{thirdlane_mods} == 1 && $cdrinfo->{accountcode} =~ m/.\d\d\d-IN/) { + print STDERR "Call belongs to a Thirdlane(tm) DID.\n"; + my ($did,$record); + ($did = $cdrinfo->{accountcode}) =~ s/-IN//g; + print STDERR "DID: $did \n"; + $record = &get_did($astpp_db,$did); + $cdrinfo->{userfield} = $cdrinfo->{accountcode}; + $cdrinfo->{accountcode} = $record->{account}; + $cdrinfo->{dst} = $did; + } + my $carddata = &get_account( $astpp_db, $cdrinfo->{accountcode} ); if ($carddata->{number}) { if ( $cdrinfo->{lastapp} eq "MeetMe" ) { # There is an issue with calls that come out of meetmee This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |