/** * Adds additional transaction based data * * @param OnePica_AvaTax_Model_Sales_Quote_Address|Mage_Sales_Model_Order $object * @return $this */ protected function _addGeneralInfo($object) { $storeId = $this->_getStoreIdByObject($object); $this->_setCompanyCode($storeId); $this->_request->setBusinessIdentificationNo($this->_getVatId($object)); $this->_request->setDetailLevel(DetailLevel::$Document); $this->_request->setDocDate($this->_getDateModel()->date('Y-m-d')); $this->_request->setExemptionNo(''); $this->_request->setDiscount(0.0); //cannot be used in Magento $this->_request->setSalespersonCode(Mage::helper('avatax')->getSalesPersonCode($storeId)); $this->_request->setLocationCode(Mage::helper('avatax')->getLocationCode($storeId)); $this->_request->setCountry(Mage::getStoreConfig('shipping/origin/country_id', $storeId)); $this->_request->setCurrencyCode(Mage::app()->getStore($storeId)->getBaseCurrencyCode()); $this->_addCustomer($object); if ($object instanceof Mage_Sales_Model_Order && $object->getIncrementId()) { $this->_request->setReferenceCode('Magento Order #' . $object->getIncrementId()); } return $this; }