Changeset 859
- Timestamp:
- 06/26/08 12:55:08 (2 months ago)
- Files:
-
- trunk/common/lib/Class.A2Billing.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/common/lib/Class.A2Billing.php
r848 r859 146 146 147 147 var $languageselected; 148 var $current_language; 148 149 149 150 … … 624 625 } 625 626 627 $this ->current_language = $language; 626 628 if($this->agiconfig['asterisk_version'] == "1_2") { 627 629 $lg_var_set = 'LANGUAGE()'; … … 638 640 $this->languageselected = 1; 639 641 $language = strtolower($this->agiconfig['force_language']); 642 $this ->current_language = $language; 640 643 if($this->agiconfig['asterisk_version'] == "1_2") { 641 644 $lg_var_set = 'LANGUAGE()'; … … 1335 1338 $agi->say_number($units); 1336 1339 1337 if(( strtolower($this->currency)=='usd')&& ( ( $units%10==2) || ($units%10==3 )|| ($units%10==4)) ){1340 if(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ( ( $units%10==2) || ($units%10==3 )|| ($units%10==4)) ){ 1338 1341 // test for the specific grammatical rules in RUssian 1339 1342 $agi-> stream_file('dollar2', '#'); 1343 }elseif(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ( $units%10==1)) { 1344 // test for the specific grammatical rules in RUssian 1345 $agi-> stream_file($unit_audio, '#'); 1340 1346 }else{ 1341 1347 $agi-> stream_file($units_audio, '#'); … … 1344 1350 }else{ 1345 1351 $agi->say_number($units); 1352 1353 if(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ($units == 0)){ 1354 $agi-> stream_file($units_audio, '#'); 1355 }else{ 1346 1356 $agi-> stream_file($unit_audio, '#'); 1357 } 1347 1358 } 1348 1359 … … 1353 1364 $agi->say_number($cents); 1354 1365 if($cents>1){ 1355 if((strtolower($this-> agiconfig['force_language'])=='ru')&& ( ( $cents%10==2) || ($cents%10==3 )|| ($cents%10==4)) ){1366 if((strtolower($this->currency)=='usd')&&($this ->current_language=='ru')&& ( ( $cents%10==2) || ($cents%10==3 )|| ($cents%10==4)) ){ 1356 1367 // test for the specific grammatical rules in RUssian 1357 1368 $agi-> stream_file('prepaid-cent2', '#'); 1369 }elseif((strtolower($this->currency)=='usd')&&($this ->current_language=='ru')&& ( $cents%10==1) ){ 1370 // test for the specific grammatical rules in RUssian 1371 $agi-> stream_file($cent_audio, '#'); 1358 1372 }else{ 1359 1373 $agi-> stream_file($cents_audio, '#'); … … 1417 1431 if ($units > 1){ 1418 1432 $agi -> say_number($units); 1419 if((strtolower($this->currency)=='usd')&& ( ( $units%10==2) || ($units%10==3 )|| ($units%10==4)) ){ 1420 // test for the specific grammatical rules in RUssian 1421 $agi-> stream_file('dollar2', '#'); 1422 }else{ 1423 $agi-> stream_file($units_audio, '#'); 1424 } 1433 1434 if(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ( ( $units%10==2) || ($units%10==3 )|| ($units%10==4)) ){ 1435 // test for the specific grammatical rules in RUssian 1436 $agi-> stream_file('dollar2', '#'); 1437 }elseif(($this ->current_language=='ru')&&(strtolower($this->currency)=='usd')&& ( $units%10==1)) { 1438 // test for the specific grammatical rules in RUssian 1439 $agi-> stream_file($unit_audio, '#'); 1440 }else{ 1441 $agi-> stream_file($units_audio, '#'); 1442 } 1443 1425 1444 }else{ 1426 1445 $agi -> say_number($units); … … 1433 1452 if ($cents>0){ 1434 1453 $agi -> say_number($cents); 1454 1455 1435 1456 if($cents>1){ 1436 if((strtolower($this-> agiconfig['force_language'])=='ru')&& ( ( $cents%10==2) || ($cents%10==3 )|| ($cents%10==4)) ){1457 if((strtolower($this->currency)=='usd')&&($this ->current_language=='ru')&& ( ( $cents%10==2) || ($cents%10==3 )|| ($cents%10==4)) ){ 1437 1458 // test for the specific grammatical rules in RUssian 1438 1459 $agi-> stream_file('prepaid-cent2', '#'); 1460 }elseif((strtolower($this->currency)=='usd')&&($this ->current_language=='ru')&& ( $cents%10==1) ){ 1461 // test for the specific grammatical rules in RUssian 1462 $agi-> stream_file($cent_audio, '#'); 1439 1463 }else{ 1440 1464 $agi-> stream_file($cents_audio, '#'); … … 1443 1467 $agi-> stream_file($cent_audio, '#'); 1444 1468 } 1469 1470 1471 1445 1472 1446 1473 $agi -> stream_file($cent_audio, '#');
