Taxify_Sales_Tax_Rates_and_Filing - Version 0.1.9

Version Notes

Initial Public Release

Download this release

Release Info

Developer Vonnda Development
Extension Taxify_Sales_Tax_Rates_and_Filing
Version 0.1.9
Comparing to
See all releases


Code changes from version 0.1.8 to 0.1.9

app/code/local/Vonnda/Taxify/Helper/Data.php CHANGED
@@ -46,7 +46,7 @@ class Vonnda_Taxify_Helper_Data extends Mage_Core_Helper_Abstract
46
 
47
  public function getProductTaxClassMap()
48
  {
49
- $map = array('0' => 'NON', '6' => 'NON');
50
  foreach (Mage::getModel('tax/class')->getCollection() as $taxClass) {
51
  $map[$taxClass->getClassId()] =
52
  $taxClass->getTaxifyProductTaxability();
46
 
47
  public function getProductTaxClassMap()
48
  {
49
+ $map = array();
50
  foreach (Mage::getModel('tax/class')->getCollection() as $taxClass) {
51
  $map[$taxClass->getClassId()] =
52
  $taxClass->getTaxifyProductTaxability();
app/code/local/Vonnda/Taxify/Model/Config.php CHANGED
@@ -12,8 +12,12 @@ class Vonnda_Taxify_Model_Config extends Mage_Core_Model_Abstract
12
  return 'https://ws.taxify.co/taxify/1.0/core/service.asmx';
13
  }
14
 
15
- public function isEnabled()
16
  {
 
 
 
 
17
  return Mage::getStoreConfigFlag('tax/taxify/enabled');
18
  }
19
 
12
  return 'https://ws.taxify.co/taxify/1.0/core/service.asmx';
13
  }
14
 
15
+ public function isEnabled($storeId=null)
16
  {
17
+ if ($storeId) {
18
+ return Mage::getStoreConfigFlag('tax/taxify/enabled', $storeId);
19
+ }
20
+
21
  return Mage::getStoreConfigFlag('tax/taxify/enabled');
22
  }
23
 
app/code/local/Vonnda/Taxify/Model/Observer.php CHANGED
@@ -8,18 +8,20 @@ class Vonnda_Taxify_Model_Observer
8
  $this->config = Mage::getModel('taxify/config');
9
  }
10
 
11
- public function isEnabled()
12
  {
13
- return $this->config->isEnabled();
14
  }
15
 
16
  public function quoteCollectTotalsBefore(Varien_Event_Observer $observer)
17
  {
18
- if (!$this->isEnabled()) {
 
19
  return;
20
  }
21
 
22
- Mage::getConfig()->setNode('global/sales/quote/totals/tax/class', 'vonnda_taxify_model_sales_quote_address_total_tax');
 
23
  }
24
 
25
  public function salesOrderPlaceAfter(Varien_Event_Observer $observer)
8
  $this->config = Mage::getModel('taxify/config');
9
  }
10
 
11
+ public function isEnabled($storeId=null)
12
  {
13
+ return $this->config->isEnabled($storeId);
14
  }
15
 
16
  public function quoteCollectTotalsBefore(Varien_Event_Observer $observer)
17
  {
18
+ $storeId = $observer->getEvent()->getQuote()->getStoreId();
19
+ if (!$this->isEnabled($storeId)) {
20
  return;
21
  }
22
 
23
+ Mage::getConfig()->setNode('global/sales/quote/totals/tax/class',
24
+ 'vonnda_taxify_model_sales_quote_address_total_tax');
25
  }
26
 
27
  public function salesOrderPlaceAfter(Varien_Event_Observer $observer)
app/code/local/Vonnda/Taxify/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Vonnda_Taxify>
5
- <version>0.1.8</version>
6
  </Vonnda_Taxify>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <Vonnda_Taxify>
5
+ <version>0.1.9</version>
6
  </Vonnda_Taxify>
7
  </modules>
8
  <global>
app/code/local/Vonnda/Taxify/etc/system.xml CHANGED
@@ -42,7 +42,7 @@
42
  <sort_order>10</sort_order>
43
  <show_in_default>1</show_in_default>
44
  <show_in_website>1</show_in_website>
45
- <show_in_store>0</show_in_store>
46
  </enabled>
47
  <password translate="label">
48
  <label>API Key</label>
@@ -60,7 +60,7 @@
60
  <sort_order>50</sort_order>
61
  <show_in_default>1</show_in_default>
62
  <show_in_website>1</show_in_website>
63
- <show_in_store>0</show_in_store>
64
  </test_mode>
65
  </fields>
66
  </taxify>
42
  <sort_order>10</sort_order>
43
  <show_in_default>1</show_in_default>
44
  <show_in_website>1</show_in_website>
45
+ <show_in_store>1</show_in_store>
46
  </enabled>
47
  <password translate="label">
48
  <label>API Key</label>
60
  <sort_order>50</sort_order>
61
  <show_in_default>1</show_in_default>
62
  <show_in_website>1</show_in_website>
63
+ <show_in_store>1</show_in_store>
64
  </test_mode>
65
  </fields>
66
  </taxify>
app/code/local/Vonnda/Taxify/tests/Request/CalculateTest.php CHANGED
@@ -80,7 +80,7 @@ class CalculateTest extends PHPUnit_Framework_TestCase
80
 
81
  $resp = $calculate->getItemTaxabilityCode($item);
82
 
83
- $this->assertEquals('NON', $resp);
84
 
85
 
86
  $calculate = Mage::getModel('taxify/request_calculate');
@@ -95,7 +95,7 @@ class CalculateTest extends PHPUnit_Framework_TestCase
95
 
96
  $resp = $calculate->getItemTaxabilityCode($item);
97
 
98
- $this->assertEquals('NON', $resp);
99
  }
100
 
101
  public function testSpreadDiscountToItems()
80
 
81
  $resp = $calculate->getItemTaxabilityCode($item);
82
 
83
+ $this->assertEquals('', $resp);
84
 
85
 
86
  $calculate = Mage::getModel('taxify/request_calculate');
95
 
96
  $resp = $calculate->getItemTaxabilityCode($item);
97
 
98
+ $this->assertEquals('', $resp);
99
  }
100
 
101
  public function testSpreadDiscountToItems()
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Taxify_Sales_Tax_Rates_and_Filing</name>
4
- <version>0.1.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License V2</license>
7
  <channel>community</channel>
@@ -11,8 +11,8 @@
11
  <notes>Initial Public Release</notes>
12
  <authors><author><name>Vonnda Development</name><user>Vonnda</user><email>info@vonnda.com</email></author></authors>
13
  <date>2015-11-02</date>
14
- <time>18:37:07</time>
15
- <contents><target name="magelocal"><dir name="Vonnda"><dir name="Taxify"><dir name="Block"><dir name="Adminhtml"><dir name="Tax"><dir name="Class"><dir name="Edit"><file name="Form.php" hash="4c8f337cb03db39cc74bb5df9d94850d"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="8ee6e72b3d7fbbcee931f4253560c7d2"/></dir><dir name="Model"><file name="Client.php" hash="87d2fc2b68acbe9f624e00afca87f9d8"/><file name="Config.php" hash="2db3425ee59a162dedf5ef8a4fa655e3"/><dir name="Export"><file name="Row.php" hash="7c1ba01053c94524fa5bca031e310747"/></dir><file name="Export.php" hash="a7c54832cb11773f1598aa3a4778a59e"/><file name="Feed.php" hash="04f391cc7357d47184c243e81d068bf7"/><file name="Observer.php" hash="52d7d7e74b2a0676b58ad4262e26fc49"/><dir name="Request"><file name="Calculate.php" hash="75fa6340fbcfd7bc95a55b67c054bb82"/><file name="Cancel.php" hash="2d1eadf52123f4db8151832502d8ba01"/><file name="Codes.php" hash="43336ee3c7839b9746493c3f5860b8e0"/><file name="Commit.php" hash="3ec21b8860ab14f3eadc7bb9e53c02c1"/><file name="Request.php" hash="0047d6dc437b007e7923b70082aead6c"/><file name="Verifyaddress.php" hash="fff9f9d0ac574ac185916afaf7bdde0c"/><file name="Version.php" hash="ff41825cbc827abed4e0a2597e67ee67"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="326120cd05749e9b48e7dd966a3b2c19"/></dir></dir><dir name="Sales"><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Tax.php" hash="e41ac495324df63351c07f7772df7e9b"/></dir><file name=".DS_Store" hash="d6c424b95f6c304aa0e0c861c9a01073"/></dir><file name=".DS_Store" hash="e3088067e0aac643641350be6bd5da89"/></dir><file name=".DS_Store" hash="d8aa3112ea4a1c59b473e14dcddf7d1f"/></dir><file name=".DS_Store" hash="89503324a3148078dbd8a9ac140ae571"/></dir><dir name="controllers"><file name="TaxifyController.php" hash="1815f4c0074dfb6a508283ae92c97488"/></dir><dir name="etc"><file name="adminhtml.xml" hash="504a3e32bd2d6695811f67523c03504a"/><file name="config.xml" hash="4fc6a85dc644261d0564ddd4d08e118f"/><file name="system.xml" hash="f99743421bbf8bf7c4d19dca7a4b0d53"/></dir><dir name="sql"><dir name="taxify_setup"><file name="mysql4-install-0.1.1.php" hash="523629216cc236efa1e3a08dc40b9291"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="f63715adff31a85fb43aa1aecfc42c2d"/></dir></dir><dir name="tests"><dir name="Helper"><file name="DataTest.php" hash="3156f91fb3fdc07c3e7e9b06670ab049"/></dir><dir name="Model"><dir name="Export"><file name="RowTest.php" hash="370afb16507950dcbf2ac27090c8452c"/></dir><file name="ExportTest.php" hash="04ec5d1e4a71bf840881b2cb55be5528"/></dir><dir name="Request"><file name="CalculateTest.php" hash="7bd6291be8d42329a211fd6f73161cd8"/><file name="CancelTest.php" hash="b8ba6f0004d493f72ce22c66375ffdac"/><file name="CodesTest.php" hash="34101e57f496b40b817496fa78abad3a"/><file name="CommitTest.php" hash="59c4473ba919047dd821e05b335dbc38"/></dir><file name="SampleTest.php" hash="32606c8d8b84d95aec73bdeb1c03ca1e"/><dir name="fixtures"><file name="calculateMultiSimpleProductSuccess.txt" hash="6d7426310bebbcb0b758697035a4e8f7"/><file name="calculateSuccess.txt" hash="892ebdae0cd70bcf36cc34be2d21da76"/><file name="exportQueryResult.txt" hash="d07fec0de05420e89536fadb822baa84"/></dir></dir><file name=".DS_Store" hash="1f5579cf877cc451179cc658a1117441"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vonnda_Taxify.xml" hash="b3120a86b364f80ee8daf825412a1318"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="taxify"><file name="export.phtml" hash="25487d4b0664dd7cfbea135ad50bf948"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>5.6.2</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Taxify_Sales_Tax_Rates_and_Filing</name>
4
+ <version>0.1.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License V2</license>
7
  <channel>community</channel>
11
  <notes>Initial Public Release</notes>
12
  <authors><author><name>Vonnda Development</name><user>Vonnda</user><email>info@vonnda.com</email></author></authors>
13
  <date>2015-11-02</date>
14
+ <time>21:43:52</time>
15
+ <contents><target name="magelocal"><dir name="Vonnda"><dir name="Taxify"><dir name="Block"><dir name="Adminhtml"><dir name="Tax"><dir name="Class"><dir name="Edit"><file name="Form.php" hash="4c8f337cb03db39cc74bb5df9d94850d"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="df447d3734709072c2176093e785e008"/></dir><dir name="Model"><file name="Client.php" hash="87d2fc2b68acbe9f624e00afca87f9d8"/><file name="Config.php" hash="f7a352b7e1d175d7dab6eed90d4b10a9"/><dir name="Export"><file name="Row.php" hash="7c1ba01053c94524fa5bca031e310747"/></dir><file name="Export.php" hash="a7c54832cb11773f1598aa3a4778a59e"/><file name="Feed.php" hash="04f391cc7357d47184c243e81d068bf7"/><file name="Observer.php" hash="5a55b5190d0da8b4bbb62f6e8097c215"/><dir name="Request"><file name="Calculate.php" hash="75fa6340fbcfd7bc95a55b67c054bb82"/><file name="Cancel.php" hash="2d1eadf52123f4db8151832502d8ba01"/><file name="Codes.php" hash="43336ee3c7839b9746493c3f5860b8e0"/><file name="Commit.php" hash="3ec21b8860ab14f3eadc7bb9e53c02c1"/><file name="Request.php" hash="0047d6dc437b007e7923b70082aead6c"/><file name="Verifyaddress.php" hash="fff9f9d0ac574ac185916afaf7bdde0c"/><file name="Version.php" hash="ff41825cbc827abed4e0a2597e67ee67"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="326120cd05749e9b48e7dd966a3b2c19"/></dir></dir><dir name="Sales"><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Tax.php" hash="e41ac495324df63351c07f7772df7e9b"/></dir><file name=".DS_Store" hash="d6c424b95f6c304aa0e0c861c9a01073"/></dir><file name=".DS_Store" hash="e3088067e0aac643641350be6bd5da89"/></dir><file name=".DS_Store" hash="d8aa3112ea4a1c59b473e14dcddf7d1f"/></dir><file name=".DS_Store" hash="89503324a3148078dbd8a9ac140ae571"/></dir><dir name="controllers"><file name="TaxifyController.php" hash="1815f4c0074dfb6a508283ae92c97488"/></dir><dir name="etc"><file name="adminhtml.xml" hash="504a3e32bd2d6695811f67523c03504a"/><file name="config.xml" hash="d19fc359312b8e6d6fd6cfe2895dd50c"/><file name="system.xml" hash="2d8e7e036755c1b0c291259575ffd87d"/></dir><dir name="sql"><dir name="taxify_setup"><file name="mysql4-install-0.1.1.php" hash="523629216cc236efa1e3a08dc40b9291"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="f63715adff31a85fb43aa1aecfc42c2d"/></dir></dir><dir name="tests"><dir name="Helper"><file name="DataTest.php" hash="3156f91fb3fdc07c3e7e9b06670ab049"/></dir><dir name="Model"><dir name="Export"><file name="RowTest.php" hash="370afb16507950dcbf2ac27090c8452c"/></dir><file name="ExportTest.php" hash="04ec5d1e4a71bf840881b2cb55be5528"/></dir><dir name="Request"><file name="CalculateTest.php" hash="b38e42d9f0a6d770605ad873c4f793b1"/><file name="CancelTest.php" hash="b8ba6f0004d493f72ce22c66375ffdac"/><file name="CodesTest.php" hash="34101e57f496b40b817496fa78abad3a"/><file name="CommitTest.php" hash="59c4473ba919047dd821e05b335dbc38"/></dir><file name="SampleTest.php" hash="32606c8d8b84d95aec73bdeb1c03ca1e"/><dir name="fixtures"><file name="calculateMultiSimpleProductSuccess.txt" hash="6d7426310bebbcb0b758697035a4e8f7"/><file name="calculateSuccess.txt" hash="892ebdae0cd70bcf36cc34be2d21da76"/><file name="exportQueryResult.txt" hash="d07fec0de05420e89536fadb822baa84"/></dir></dir><file name=".DS_Store" hash="1f5579cf877cc451179cc658a1117441"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vonnda_Taxify.xml" hash="b3120a86b364f80ee8daf825412a1318"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="taxify"><file name="export.phtml" hash="25487d4b0664dd7cfbea135ad50bf948"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>5.6.2</max></php></required></dependencies>
18
  </package>