Пример #1
0
 /**
  * set vat flag according to delivery address
  */
 protected function setVatFlag($customer_id)
 {
     $Order = new ecommerce_order();
     if ($this->guest_customer) {
         $this->include_vat = $Order->isVatEligibleByCountry($this->delivery_country);
     } else {
         $this->include_vat = $Order->isVatEligible($this->delivery_address_id, $customer_id);
     }
 }
Пример #2
0
 protected function isVatEligible($customer_id)
 {
     $result = true;
     if (is_numeric($_SESSION['client']['customer']['delivery_address_id'])) {
         require_once 'models/ecommerce/ecommerce_order.php';
         $Order = new ecommerce_order();
         return $Order->isVatEligible($_SESSION['client']['customer']['delivery_address_id'], $customer_id);
     }
     return $result;
 }