BlueShoes Application Framework made with PHP http://www.blueshoes.org/


Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: C:/usr/local/lib/php/blueshoes-4.2/core/util/Bs_Finance.class.php
BlueShoes Application Framework - util

Bs_Finance

Bs_Object
   |
  +-- Bs_Finance

This static class provides some useful finance functions.

 

private class Bs_Finance extends Bs_Object

This static class provides some useful finance functions.
no dependencies here yet.

Authors
Version4.0.$id$
Copyrightblueshoes.org

 

Methods inherited from Bs_Object

isex, isexception, tostring, tohtml, persist, unpersist, bs_object, bbsetoutput, bbawake, bbisawake, bbxmsg, bbxfunctionstart, bbxfunctionend, bbxecho, bbxvar, bbxvardump, bbforcetrace, bbbufferstart, bbbufferget, bbbufferendflush, bbbufferendclean

Public Method Summary

string

toPrice([ integer $price ], string $centsSeparateChar, string $thousandsSeparateChar)

returns a number formatted as a price, eg 45115 -> 451.15
string

toPercent([ integer $number, string $separateChar ], string $percentSign)

returns a percent value, eg 650 -> 6.50%
bool

ccVal(string $Num, [ string $Name ])

ccVal - Credit Card Validation function.
void

Bs_Finance()

Warning: documentation is missing.

Private Method Summary

void

dispdollars( $amount, $style)

Warning: documentation is missing.

Private Constant Summary

BS_FINANCE_VERSION >>4.0.$x$<< Warning: documentation is missing.

Public Method Details

toPrice

public string toPrice( [ integer $price ], string $centsSeparateChar, string $thousandsSeparateChar )

  returns a number formatted as a price, eg 45115 -> 451.15

Parameter
integer $price = >>0<<
the number to be converted into a 'price'
string $centsSeparateChar
Warning: documentation is missing.
string $thousandsSeparateChar
Warning: documentation is missing.
Returns string


toPercent

public string toPercent( [ integer $number, string $separateChar ], string $percentSign )

  returns a percent value, eg 650 -> 6.50%

Parameter
integer $number = >>0<<
the number to be converted into a 'price'
string $separateChar = >>'.'<<
the % string that is attached to the new number. eg "5.35" -> "5.35%". default is '%'.
string $percentSign
Warning: documentation is missing.
Returns string


ccVal

public bool ccVal( string $Num, [ string $Name ] )

  ccVal - Credit Card Validation function.
This function accepts a credit card number and, optionally, a code fora credit card name. If a Name code is specified, the number is checkedagainst card-specific criteria, then validated with the Luhn Mod 10formula. Otherwise it is only checked against the formula. Valid namecodes are:mcd - Master Cardvis - Visaamx - American Expressdsc - Discoverdnc - Diners Clubjcb - JCBCopyright (c) 1999 Holotech Enterprises. All rights reserved.You may freely modify and use this function for your own purposes. Youmay freely distribute it, without modification and with this noticeand entire header intact.A description of the criteria used in this function can be found athttp://www.beachnet.com/~hstiles/cardtype.html. If you have anyquestions or comments, please direct them to ccval@holotech.netmaybe also check http://www.icverify.com/ --andrejthere is also detailed description at http://www.webmasterbase.com/article/728

Parameter
string $Num
the card number
string $Name = >>'n/a'<<
the short form of the cart type (n/a, mcd, vis, amx, dsc, dsc, dnc, jcb) default is 'n/a'.
Returns bool


Bs_Finance

public void Bs_Finance( )

 

Warning: documentation is missing.

Returns void


Private Method Details

dispdollars

private void dispdollars( $amount, $style )

 

Warning: documentation is missing.

Parameter
$amount
Warning: documentation is missing.
$style
Warning: documentation is missing.
Returns void


Private Constant Details

BS_FINANCE_VERSION

define( BS_FINANCE_VERSION, >>4.0.$x$<< )
Case: default: case sensitive




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta