EBoekhouden_Export - Version 4.1.9

Version Notes

Verbetering voor Magento 1.7 i.c.m. bundle producten.

Download this release

Release Info

Developer Magento Core Team
Extension EBoekhouden_Export
Version 4.1.9
Comparing to
See all releases


Code changes from version 4.1.7 to 4.1.9

app/code/community/Eboekhouden/Export/Model/Export/Sales.php CHANGED
@@ -567,19 +567,9 @@ class Eboekhouden_Export_Model_Export_Sales
567
  $sXml = '';
568
  $sComment = '';
569
 
570
- $oOrderItem = null; /* @var $oOrderItem Mage_Sales_Model_Order_Item */
571
- if ( is_a($oItem, 'Mage_Sales_Model_Order_Item') )
572
- {
573
- $oOrderItem = $oItem;
574
- }
575
- else
576
- {
577
- $oOrderItem = $oItem->getOrderItem();
578
- }
579
 
580
- if ( ( !method_exists($oItem, 'isDummy') || !$oItem->isDummy() )
581
- && ( empty($oOrderItem) || 'bundle' != $oOrderItem->getProductType() )
582
- )
583
  {
584
  $iStoreId = $oContainer->getStoreId();
585
  if (empty($iStoreId))
@@ -589,9 +579,9 @@ class Eboekhouden_Export_Model_Export_Sales
589
 
590
  $oOrder = $oContainer->getOrder();
591
  /* @var $oOrder Mage_Sales_Model_Order */
592
- $sProductId = $oItem->getProductId();
593
 
594
  $fVatPercent = $this->_getItemVatPerc( $oContainer, $oItem );
 
595
  $sComment .= ' [BTW '.$fVatPercent.'%] ';
596
  $fVatFactor = (100 + $fVatPercent) / 100;
597
  if (empty($fVatFactor)
@@ -897,6 +887,10 @@ class Eboekhouden_Export_Model_Export_Sales
897
  return $sVatCode;
898
  }
899
 
 
 
 
 
900
  private function _vatPercRound($fVatPercent)
901
  {
902
  $aKnownRates = array(0, 6, 19); // TODO Fill this based on db data
@@ -912,4 +906,50 @@ class Eboekhouden_Export_Model_Export_Sales
912
  return round($fVatPercent, 3);
913
  }
914
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
915
  }
567
  $sXml = '';
568
  $sComment = '';
569
 
570
+ $sType = $this->_getItemType( $oItem );
 
 
 
 
 
 
 
 
571
 
572
+ if ( 'dummy' != $sType && 'child' != $sType )
 
 
573
  {
574
  $iStoreId = $oContainer->getStoreId();
575
  if (empty($iStoreId))
579
 
580
  $oOrder = $oContainer->getOrder();
581
  /* @var $oOrder Mage_Sales_Model_Order */
 
582
 
583
  $fVatPercent = $this->_getItemVatPerc( $oContainer, $oItem );
584
+ $sComment .= ' type:'.$sType.' ';
585
  $sComment .= ' [BTW '.$fVatPercent.'%] ';
586
  $fVatFactor = (100 + $fVatPercent) / 100;
587
  if (empty($fVatFactor)
887
  return $sVatCode;
888
  }
889
 
890
+ /**
891
+ * @param $fVatPercent float
892
+ * @return float
893
+ */
894
  private function _vatPercRound($fVatPercent)
895
  {
896
  $aKnownRates = array(0, 6, 19); // TODO Fill this based on db data
906
  return round($fVatPercent, 3);
907
  }
908
 
909
+
910
+ /**
911
+ * @param $oItem Mage_Sales_Model_Invoice_Item|Mage_Sales_Model_Order_Item
912
+ * @return string
913
+ */
914
+ private function _getItemType( &$oItem )
915
+ {
916
+ $oOrderItem = null; /* @var $oOrderItem Mage_Sales_Model_Order_Item */
917
+ if ( is_a($oItem, 'Mage_Sales_Model_Order_Item') )
918
+ {
919
+ $oOrderItem = $oItem;
920
+ }
921
+ else
922
+ {
923
+ $oOrderItem = $oItem->getOrderItem();
924
+ }
925
+
926
+ $sProductId = $oItem->getProductId();
927
+ $sType = 'unknown';
928
+ if ( method_exists($oItem, 'isDummy') && $oItem->isDummy() )
929
+ {
930
+ $sType = 'dummy';
931
+ }
932
+ elseif ( preg_match('|^weee_|', $sProductId) )
933
+ {
934
+ $sType = 'weee';
935
+ }
936
+ elseif ('shipping' == $sProductId)
937
+ {
938
+ $sType = 'shipping';
939
+ }
940
+ elseif ( !empty($oOrderItem) )
941
+ {
942
+ $sType = $oOrderItem->getProductType();
943
+ if ( $oOrderItem->getParentItemId() )
944
+ {
945
+ $sType = 'child';
946
+ }
947
+ }
948
+ else
949
+ {
950
+ $sType = 'no_orderitem';
951
+ }
952
+ return $sType;
953
+ }
954
+
955
  }
app/code/community/Eboekhouden/Export/etc/config.xml CHANGED
@@ -35,6 +35,7 @@
35
  <modules>
36
  <Eboekhouden_Export>
37
  <version>4.0</version>
 
38
  </Eboekhouden_Export>
39
  </modules>
40
 
35
  <modules>
36
  <Eboekhouden_Export>
37
  <version>4.0</version>
38
+ <!-- This is only the "resource version", does only need to be increased in case of database structure changes. -->
39
  </Eboekhouden_Export>
40
  </modules>
41
 
package.xml CHANGED
@@ -1,8 +1,8 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>EBoekhouden_Export</name>
4
- <version>4.1.7</version>
5
- <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/mit-license.php">MIT</license>
7
  <channel>community</channel>
8
  <extends/>
@@ -31,12 +31,11 @@ Meer informatie over deze koppeling met Magento kunt u terugvinden als u ingelog
31
  -----------------------------------------------------&#xD;
32
  Info about uninstalling can be found in &#xD;
33
  app/code/community/Eboekhouden/Export/sql/HOWTO_UnInstall.sql</description>
34
- <notes>Ondersteuning voor Magento 1.7.0 toegevoegd.&#xD;
35
- Verbetering ivm korting op verzendkosten in Magento 1.7.0.</notes>
36
  <authors><author><name>Ronald Kas</name><user>auto-converted</user><email>info@e-boekhouden.nl</email></author><author><name>Jeroen Vermeulen</name><user>auto-converted</user><email>info@jeroenvermeulen.eu</email></author></authors>
37
- <date>2012-05-11</date>
38
- <time>16:19:00</time>
39
- <contents><target name="magecommunity"><dir name="Eboekhouden"><dir name="Export"><dir name="Block"><dir name="Sales"><dir name="Creditmemo"><file name="Grid.php" hash="5d323b6842ac429c346fc1a00d8b38ee"/></dir><dir name="Invoice"><file name="Grid.php" hash="264f95548e6d5dd501a4c613fb38b3a8"/></dir><dir name="Order"><file name="Grid.php" hash="a1a9fe52f445f7f40e553b4c7f6dce99"/></dir></dir><dir name="Tax"><dir name="Rate"><dir name="Grid"><dir name="Renderer"><file name="Ebvatcode.php" hash="d34d2edd9593e4d2c23a20c8e0864c95"/></dir></dir><file name="Form.php" hash="ea36d8fde2272e24f5187c0bfd9deb76"/><file name="Grid.php" hash="ca50f669ccd75b1365d5937d0390fe3e"/></dir></dir></dir><dir name="Helper"><file name="AccountNumber.php" hash="599c8af6b93e2206c631aa79e9ba5dd4"/><file name="Data.php" hash="2f92f90de33e89e321aa4385d56ced0e"/></dir><dir name="Model"><dir name="Config"><file name="Costcenter.php" hash="7f280ef51e003de0bf80f0ab2b9685f0"/><file name="Ledgeraccount.php" hash="318e87f5932d4bd898d1552d27c50bc7"/><file name="Taxcalculationrate.php" hash="9871b70f56e8fee7cd3364bc8b3de2c5"/></dir><dir name="Export"><file name="Sales.php" hash="46a58f5afb8e97d47dc666a260b8792c"/></dir><dir name="Import"><file name="Costcenter.php" hash="593b1a269583073098f5c1f52002058f"/><file name="Ebcode.php" hash="4127f3460ccb06e800f88baf86a58008"/><file name="Gbcodes.php" hash="d513db427803e3c079f6577b7b240219"/></dir><dir name="Product"><dir name="Attribute"><file name="Costcenter.php" hash="3b1e02791a8ff9782d18f14afdc90221"/><file name="Ledgeraccount.php" hash="132f16b2407b579605cb24de6ea5b6ab"/></dir></dir><dir name="Tax"><dir name="Attribute"><file name="Ebtaxcode.php" hash="493372a121ba4490b4f3310373cc3e22"/></dir></dir><file name="Info.php" hash="c8dbbbaeead14393cb36c0eec5706882"/></dir><dir name="controllers"><dir name="Catalog"><file name="ProductController.php" hash="b19ff72404a75fcb1d89da436d3c68e9"/></dir><dir name="Export"><file name="SaleController.php" hash="c4f64b12685ad9558dff62f26ac7e6f2"/></dir><file name="MutatieController.php" hash="1634fcb7298ef44b369f9ac9fbdf87b4"/></dir><dir name="etc"><file name="config.xml" hash="fa4c164f6e65e4bfb8d6d4288542075d"/><file name="system.xml" hash="f8c0a0868c859a7f6fb35c77bddd2e38"/></dir><dir name="sql"><dir name="eboekhouden_setup"><dir name="includes"><file name="install-current.php" hash="f603e6d7289c9791d5357093f403313a"/></dir><file name="mysql4-install-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.0.2-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.0.7-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.1.5-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.2.0-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.2.2-4.0.php" hash="e0ce8dbd2e1de28479e90505abbc6297"/><file name="mysql4-upgrade-1.2.6-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.3-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.4-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.5-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.6-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-2.0-4.0.php" hash="b1b333b3815368af7d599e5126eca26e"/><file name="mysql4-upgrade-3.0-4.0.php" hash="b1b333b3815368af7d599e5126eca26e"/></dir><file name="HOWTO_UnInstall.sql" hash="691131453816d890630a6d3a21b6c7bf"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eboekhouden_Export.xml" hash="9ced450b54f7225a83049f6bff3adbae"/></dir></target></contents>
40
  <compatible/>
41
  <dependencies/>
42
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>EBoekhouden_Export</name>
4
+ <version>4.1.9</version>
5
+ <stability>beta</stability>
6
  <license uri="http://opensource.org/licenses/mit-license.php">MIT</license>
7
  <channel>community</channel>
8
  <extends/>
31
  -----------------------------------------------------&#xD;
32
  Info about uninstalling can be found in &#xD;
33
  app/code/community/Eboekhouden/Export/sql/HOWTO_UnInstall.sql</description>
34
+ <notes>Verbetering voor Magento 1.7 i.c.m. bundle producten.</notes>
 
35
  <authors><author><name>Ronald Kas</name><user>auto-converted</user><email>info@e-boekhouden.nl</email></author><author><name>Jeroen Vermeulen</name><user>auto-converted</user><email>info@jeroenvermeulen.eu</email></author></authors>
36
+ <date>2012-05-28</date>
37
+ <time>18:12:16</time>
38
+ <contents><target name="magecommunity"><dir name="Eboekhouden"><dir name="Export"><dir name="Block"><dir name="Sales"><dir name="Creditmemo"><file name="Grid.php" hash="5d323b6842ac429c346fc1a00d8b38ee"/></dir><dir name="Invoice"><file name="Grid.php" hash="264f95548e6d5dd501a4c613fb38b3a8"/></dir><dir name="Order"><file name="Grid.php" hash="a1a9fe52f445f7f40e553b4c7f6dce99"/></dir></dir><dir name="Tax"><dir name="Rate"><dir name="Grid"><dir name="Renderer"><file name="Ebvatcode.php" hash="d34d2edd9593e4d2c23a20c8e0864c95"/></dir></dir><file name="Form.php" hash="ea36d8fde2272e24f5187c0bfd9deb76"/><file name="Grid.php" hash="ca50f669ccd75b1365d5937d0390fe3e"/></dir></dir></dir><dir name="Helper"><file name="AccountNumber.php" hash="599c8af6b93e2206c631aa79e9ba5dd4"/><file name="Data.php" hash="2f92f90de33e89e321aa4385d56ced0e"/></dir><dir name="Model"><dir name="Config"><file name="Costcenter.php" hash="7f280ef51e003de0bf80f0ab2b9685f0"/><file name="Ledgeraccount.php" hash="318e87f5932d4bd898d1552d27c50bc7"/><file name="Taxcalculationrate.php" hash="9871b70f56e8fee7cd3364bc8b3de2c5"/></dir><dir name="Export"><file name="Sales.php" hash="ad994b03059aec468f5e7d80fe9612f9"/></dir><dir name="Import"><file name="Costcenter.php" hash="593b1a269583073098f5c1f52002058f"/><file name="Ebcode.php" hash="4127f3460ccb06e800f88baf86a58008"/><file name="Gbcodes.php" hash="d513db427803e3c079f6577b7b240219"/></dir><dir name="Product"><dir name="Attribute"><file name="Costcenter.php" hash="3b1e02791a8ff9782d18f14afdc90221"/><file name="Ledgeraccount.php" hash="132f16b2407b579605cb24de6ea5b6ab"/></dir></dir><dir name="Tax"><dir name="Attribute"><file name="Ebtaxcode.php" hash="493372a121ba4490b4f3310373cc3e22"/></dir></dir><file name="Info.php" hash="c8dbbbaeead14393cb36c0eec5706882"/></dir><dir name="controllers"><dir name="Catalog"><file name="ProductController.php" hash="b19ff72404a75fcb1d89da436d3c68e9"/></dir><dir name="Export"><file name="SaleController.php" hash="c4f64b12685ad9558dff62f26ac7e6f2"/></dir><file name="MutatieController.php" hash="1634fcb7298ef44b369f9ac9fbdf87b4"/></dir><dir name="etc"><file name="config.xml" hash="d9690c0722566ff61aeecea8bb76e583"/><file name="system.xml" hash="f8c0a0868c859a7f6fb35c77bddd2e38"/></dir><dir name="sql"><dir name="eboekhouden_setup"><dir name="includes"><file name="install-current.php" hash="f603e6d7289c9791d5357093f403313a"/></dir><file name="mysql4-install-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.0.2-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.0.7-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.1.5-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.2.0-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.2.2-4.0.php" hash="e0ce8dbd2e1de28479e90505abbc6297"/><file name="mysql4-upgrade-1.2.6-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.3-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.4-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.5-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-1.6-4.0.php" hash="8febe17420f3a5a2e99eb86605ab3dd3"/><file name="mysql4-upgrade-2.0-4.0.php" hash="b1b333b3815368af7d599e5126eca26e"/><file name="mysql4-upgrade-3.0-4.0.php" hash="b1b333b3815368af7d599e5126eca26e"/></dir><file name="HOWTO_UnInstall.sql" hash="691131453816d890630a6d3a21b6c7bf"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eboekhouden_Export.xml" hash="9ced450b54f7225a83049f6bff3adbae"/></dir></target></contents>
39
  <compatible/>
40
  <dependencies/>
41
  </package>