Class Taxes
	
	
		- 
			Model
			
			
			
		
- 
			 AppModel AppModel
- 
			 Taxes Taxes
Methods summary
		
		
			| 
				 public 
				
				
				 | 
			#
			__construct( )
				
Initialize Taxes Overrides | 
		
			| 
				 public 
				integer
				
				 | 
			#
			add( array $vars )
				
Adds a tax rule to the system 
				
Adds a tax rule to the system Parameters
						$varsarray$vars An array of tax info including: - company_id The company ID this tax rule
applies to. - level The tax level this rule will be apart of. - name The name of
the tax rule (optional, default NULL) - amount The tax amount (optional, default
0.00) - type The tax type (optional, default 'exclusive') - country The country
this tax rule will apply to (optional, defalut NULL) - state The state this tax
rule will apply to (optional, default NULL) - status The status of this tax rule
(optional, default 'active')
Returns
						integerThe ID of the tax rule created, void on error
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			edit( integer $tax_id, array $vars )
				
Updates a tax rule Parameters
						$tax_idinteger$tax_id The tax ID
$varsarray$vars An array of tax info including: - company_id The company ID this tax rule
applies to. - level The tax level this rule will be apart of. - name The name of
the tax rule (optional, default NULL) - amount The tax amount (optional, default
0.00) - type The tax type (optional, default 'exclusive') - country The country
this tax rule will apply to (optional, default NULL) - state The state tis tax
rule will apply to (optional, default NULL) - status The status of this tax rule
(optional, default 'active')
Returns
						integerThe ID of the tax rule created, void on error
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			delete( integer $tax_id )
				
Sets a tax to inactive Parameters
						$tax_idinteger$tax_id The ID of the tax rule to mark deleted (inactive)
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getTaxTypes( )
				
Fetches all tax types Returns
						arrayA key=>value array of tax types
 
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getTaxLevels( )
				
Fetches all tax levels Returns
						arrayA key=>value array of tax levels
 
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getTaxStatus( )
				
Fetchas all status types Returns
						arrayA key=>value array of tax statuses
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			get( integer $tax_id )
				
Fetches a tax Parameters
						$tax_idinteger$tax_id The tax ID
Returns
						mixedA stdClass objects representing the tax, false if it does not exist
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getAll( integer $company_id )
				
Retrieves a list of all tax rules for a particular company 
				
Retrieves a list of all tax rules for a particular company Parameters
						$company_idinteger$company_id The company ID
Returns
						mixedAn array of stdClass objects representing tax rules, or false if none exist
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateType( string $type )
				
Validates a tax's 'type' field 
				
Validates a tax's 'type' field Parameters
						$typestring$type The type to check
Returns
						booleanTrue if the type is validated, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateStatus( string $status )
				
Validates a tax's 'status' field 
				
Validates a tax's 'status' field Parameters
						$statusstring$status The status to check
Returns
						booleanTrue if the status is validated, false otherwise
 
 | 
		
		Methods inherited from AppModel
		
			_(), 
			boolToInt(), 
			currencyToDecimal(), 
			dateToUtc(), 
			errors(), 
			getPerPage(), 
			ifSet(), 
			loadCrypto(), 
			setDefaultIfEmpty(), 
			setPerPage(), 
			setRulesIfSet(), 
			strToBool(), 
			systemDecrypt(), 
			systemEncrypt(), 
			systemHash(), 
			truncateDecimal(), 
			validateExists(), 
			validateStateCountry()
		
		Methods inherited from Model
		
			affectedRows(), 
			begin(), 
			commit(), 
			getConnection(), 
			lastInsertId(), 
			makeDSN(), 
			prepare(), 
			query(), 
			rollBack(), 
			setAttribute(), 
			setFetchMode()
		
		Magic methods summary
		Properties summary
		Properties inherited from AppModel
		
			$replacement_keys