eZPublishCommunityProject(LegacyStack)  2013.5
vatrules.php File Reference

Namespaces

 kernel
 Autoloader definition for eZ Publish Kernel files.
 

Functions

 compareVatRules ($a, $b)
 Auxiliary function used to sort VAT rules. More...
 
 findErrors ($vatRules)
 Find errors in VAT charging rules. More...
 

Variables

 $errors = findErrors( $vatRules )
 
 $http = eZHTTPTool::instance()
 
 $module = $Params['Module']
 
 $path = array()
 
 $path []
 
 $Result = array()
 
 $Result ['path'] = $path
 
 $Result ['content'] = $tpl->fetch( "design:shop/vatrules.tpl" )
 
 $tpl = eZTemplate::factory()
 
if($http->hasPostVariable("AddRuleButton"))
if($http->hasPostVariable("RemoveRuleButton"))
if($http->hasPostVariable("SaveCategoriesButton")) 
$vatRules = eZVatRule::fetchList()
 

Function Documentation

compareVatRules (   $a,
  $b 
)

Auxiliary function used to sort VAT rules.

Rules are sorted by country and categories. Any specific categories list or country is considered less than '*' (Any).

findErrors (   $vatRules)

Find errors in VAT charging rules.

Returns
list of errors, or false if no errors found.

Variable Documentation

$errors = findErrors( $vatRules )
$module = $Params['Module']
$path = array()
$path[]
Initial value:
= array( 'text' => ezpI18n::tr( 'kernel/shop/vatrules', 'VAT rules' ),
'url' => false )
static tr($context, $source, $comment=null, $arguments=null)
Translates the source $source with context $context and optional comment $comment and returns the tra...
Definition: ezpi18n.php:86
$Result = array()
$Result['path'] = $path
$Result['content'] = $tpl->fetch( "design:shop/vatrules.tpl" )
if ($http->hasPostVariable("AddRuleButton")) if ($http->hasPostVariable("RemoveRuleButton")) if ($http->hasPostVariable("SaveCategoriesButton")) $vatRules = eZVatRule::fetchList()