Commercers_Inventorymanagement_Starter - Version 0.1.0

Version Notes

New extension by .commercers www.commercers.com

Download this release

Release Info

Developer Commercers
Extension Commercers_Inventorymanagement_Starter
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

Files changed (30) hide show
  1. app/code/local/Commercers/Commercers/Helper/Data.php +10 -0
  2. app/code/local/Commercers/Commercers/etc/adminhtml.xml +28 -0
  3. app/code/local/Commercers/Commercers/etc/config.xml +58 -0
  4. app/code/local/Commercers/Commercers/etc/system.xml +28 -0
  5. app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Catalog/Product/Renderer/Translate.php +10 -0
  6. app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Catalog/Product/Tabs.php +19 -0
  7. app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Catalog/Product/Tabs/Transactions.php +91 -0
  8. app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Inventorymanagement.php +32 -0
  9. app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Inventorymanagement/Grid.php +65 -0
  10. app/code/local/Commercers/Inventorymanagement/Helper/Data.php +10 -0
  11. app/code/local/Commercers/Inventorymanagement/Model/Adminhtml/System/Config/Backend/Commercers/Inventorymanagement.php +40 -0
  12. app/code/local/Commercers/Inventorymanagement/Model/Cron.php +306 -0
  13. app/code/local/Commercers/Inventorymanagement/Model/Inventorymanagement.php +16 -0
  14. app/code/local/Commercers/Inventorymanagement/Model/Mysql4/Inventorymanagement.php +15 -0
  15. app/code/local/Commercers/Inventorymanagement/Model/Mysql4/Inventorymanagement/Collection.php +56 -0
  16. app/code/local/Commercers/Inventorymanagement/Model/Mysql4/Transactions.php +15 -0
  17. app/code/local/Commercers/Inventorymanagement/Model/Mysql4/Transactions/Collection.php +56 -0
  18. app/code/local/Commercers/Inventorymanagement/Model/Transactions.php +15 -0
  19. app/code/local/Commercers/Inventorymanagement/controllers/Adminhtml/Catalog/ProductController.php +26 -0
  20. app/code/local/Commercers/Inventorymanagement/controllers/Adminhtml/InventorymanagementController.php +72 -0
  21. app/code/local/Commercers/Inventorymanagement/etc/adminhtml.xml +28 -0
  22. app/code/local/Commercers/Inventorymanagement/etc/config.xml +168 -0
  23. app/code/local/Commercers/Inventorymanagement/etc/system.xml +108 -0
  24. app/code/local/Commercers/Inventorymanagement/sql/inventorymanagement_setup/mysql4-install-0.1.0.php +31 -0
  25. app/design/adminhtml/default/default/layout/inventorymanagement.xml +22 -0
  26. app/etc/modules/Commercers_Commercers.xml +15 -0
  27. app/etc/modules/Commercers_Inventorymanagement.xml +18 -0
  28. app/locale/de_DE/Commercers_Commercers.csv +3 -0
  29. app/locale/de_DE/Commercers_Inventorymanagement.csv +49 -0
  30. package.xml +42 -0
app/code/local/Commercers/Commercers/Helper/Data.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers
6
+ */
7
+
8
+ class Commercers_Commercers_Helper_Data extends Mage_Core_Helper_Abstract {
9
+
10
+ }
app/code/local/Commercers/Commercers/etc/adminhtml.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * commercers.com
5
+ * Commercers
6
+ */
7
+ -->
8
+ <config>
9
+ <acl>
10
+ <resources>
11
+ <admin>
12
+ <children>
13
+ <system>
14
+ <children>
15
+ <config>
16
+ <children>
17
+ <commercers title="title" module="commercers_commercers">
18
+ <title>Commercers</title>
19
+ </commercers>
20
+ </children>
21
+ </config>
22
+ </children>
23
+ </system>
24
+ </children>
25
+ </admin>
26
+ </resources>
27
+ </acl>
28
+ </config>
app/code/local/Commercers/Commercers/etc/config.xml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * commercers.com
5
+ * Commercers
6
+ */
7
+ -->
8
+ <config>
9
+ <modules>
10
+ <Commercers_Commercers>
11
+ <version>0.1.2</version>
12
+ </Commercers_Commercers>
13
+ </modules>
14
+ <global>
15
+ <helpers>
16
+ <commercers_commercers>
17
+ <class>Commercers_Commercers_Helper</class>
18
+ </commercers_commercers>
19
+ </helpers>
20
+ </global>
21
+ <adminhtml>
22
+ <translate>
23
+ <modules>
24
+ <commercers_commercers>
25
+ <files>
26
+ <default>Commercers_Commercers.csv</default>
27
+ </files>
28
+ </commercers_commercers>
29
+ </modules>
30
+ </translate>
31
+
32
+ <menu>
33
+ <catalog>
34
+ <children>
35
+ <commercers translate="title" module="commercers_commercers">
36
+ <title>Commercers</title>
37
+ </commercers>
38
+ </children>
39
+ </catalog>
40
+ </menu>
41
+
42
+ <acl>
43
+ <resources>
44
+ <admin>
45
+ <children>
46
+ <catalog>
47
+ <children>
48
+ <commercers translate="title" module="commercers_commercers">
49
+ <title>Commercers</title>
50
+ </commercers>
51
+ </children>
52
+ </catalog>
53
+ </children>
54
+ </admin>
55
+ </resources>
56
+ </acl>
57
+ </adminhtml>
58
+ </config>
app/code/local/Commercers/Commercers/etc/system.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Commercers.com
5
+ * Commercers
6
+ */
7
+ -->
8
+ <config>
9
+ <tabs>
10
+ <commercers translate="label" module="commercers_commercers">
11
+ <label>Commercers Extensions</label>
12
+ <sort_order>300</sort_order>
13
+ </commercers>
14
+ </tabs>
15
+ <sections>
16
+ <commercers translate="label" module="commercers_commercers">
17
+ <label>Stock </label>
18
+ <tab>commercers</tab>
19
+ <frontend_type>text</frontend_type>
20
+ <sort_order>50</sort_order>
21
+ <show_in_default>1</show_in_default>
22
+ <show_in_website>0</show_in_website>
23
+ <show_in_store>0</show_in_store>
24
+ <groups>
25
+ </groups>
26
+ </commercers>
27
+ </sections>
28
+ </config>
app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Catalog/Product/Renderer/Translate.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Commercers_Inventorymanagement_Block_Adminhtml_Catalog_Product_Renderer_Translate extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
3
+ {
4
+ public function render(Varien_Object $row)
5
+ {
6
+ $value = $row->getData($this->getColumn()->getIndex());
7
+ return Mage::helper('inventorymanagement')->__($value);
8
+ }
9
+ }
10
+ ?>
app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Catalog/Product/Tabs.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Commercers_Inventorymanagement_Block_Adminhtml_Catalog_Product_Tabs extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs
4
+ {
5
+ private $parent;
6
+
7
+ protected function _prepareLayout()
8
+ {
9
+ $this->parent = parent::_prepareLayout();
10
+ $this->addTab('transactions', array(
11
+ 'label' => Mage::helper('catalog')->__('Inventory management'),
12
+ 'title' => Mage::helper('inventorymanagement')->__('Inventory management'),
13
+ 'url' => $this->getUrl('*/*/transactions', array('_current' => true)),
14
+ 'class' => 'ajax',
15
+ ));
16
+ return $this->parent;
17
+ }
18
+ }
19
+ ?>
app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Catalog/Product/Tabs/Transactions.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * commercers.com
4
+ * Commercers Inventory management
5
+ */
6
+ class Commercers_Inventorymanagement_Block_Adminhtml_Catalog_Product_Tabs_Transactions extends Mage_Adminhtml_Block_Widget_Grid
7
+ {
8
+ public function __construct()
9
+ {
10
+ parent::__construct();
11
+ $this->setId('inventorymanagement_testgrid');
12
+ $this->setDefaultSort('date');
13
+ $this->setDefaultDir('DESC');
14
+ $this->setSkipGenerateContent(true);
15
+ $this->setSaveParametersInSession(true);
16
+ $this->setUseAjax(true);
17
+ }
18
+
19
+ protected function _prepareCollection()
20
+ {
21
+ $product = Mage::registry('product');
22
+
23
+ $collection = Mage::getModel('inventorymanagement/transactions')->getCollection()
24
+ ->addAttributeToFilter('product_id', array('eq' => $product->getId()));
25
+
26
+ $this->setCollection($collection);
27
+
28
+ return parent::_prepareCollection();
29
+ }
30
+
31
+ protected function _prepareColumns()
32
+ {
33
+ $this->addColumn('transaction_id', array(
34
+ 'header' => Mage::helper('inventorymanagement')->__('ID'),
35
+ 'align' =>'right',
36
+ 'width' => 80,
37
+ 'index' => 'transaction_id',
38
+ ));
39
+
40
+ $this->addColumn('date', array(
41
+ 'header' => Mage::helper('adminhtml')->__('Date'),
42
+ 'align' => 'left',
43
+ 'width' => 200,
44
+ 'type' => 'datetime',
45
+ 'index' => 'date',
46
+ ));
47
+
48
+ $this->addColumn('type', array(
49
+ 'header' => Mage::helper('inventorymanagement')->__('Type'),
50
+ 'align' => 'left',
51
+ 'width' => 400,
52
+ 'index' => 'type',
53
+ 'renderer' => 'Commercers_Inventorymanagement_Block_Adminhtml_Catalog_Product_Renderer_Translate',
54
+ ));
55
+
56
+ $this->addColumn('reference', array(
57
+ 'header' => Mage::helper('adminhtml')->__('Transaction reference'),
58
+ 'align' => 'left',
59
+ 'width' => 200,
60
+ 'index' => 'reference',
61
+ 'renderer' => 'Commercers_Inventorymanagement_Block_Adminhtml_Catalog_Product_Renderer_Translate',
62
+ ));
63
+
64
+ $this->addColumn('qty', array(
65
+ 'header' => Mage::helper('inventorymanagement')->__('Difference'),
66
+ 'align' => 'left',
67
+ 'width' => 120,
68
+ 'index' => 'qty',
69
+ ));
70
+
71
+ $this->addColumn('stock', array(
72
+ 'header' => Mage::helper('adminhtml')->__('Stock'),
73
+ 'align' => 'left',
74
+ 'width' => 120,
75
+ 'index' => 'stock',
76
+ ));
77
+
78
+ return parent::_prepareColumns();
79
+ }
80
+
81
+ public function getRowUrl($row)
82
+ {
83
+ return "http://www.commercers-shop.com/com_de/magento-extensions/magento-warenwirtschaft-pro.html";
84
+ }
85
+
86
+ public function getGridUrl()
87
+ {
88
+ return $this->_getData('grid_url') ? $this->_getData('grid_url') : $this->getUrl('*/*/transactionsGrid', array('_current'=>true));
89
+ }
90
+ }
91
+ ?>
app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Inventorymanagement.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ class Commercers_Inventorymanagement_Block_Adminhtml_Inventorymanagement extends Mage_Adminhtml_Block_Widget_Grid_Container
8
+ {
9
+ public function __construct()
10
+ {
11
+ $this->_controller = 'adminhtml_inventorymanagement';
12
+ $this->_blockGroup = 'inventorymanagement';
13
+ $this->_headerText = Mage::helper('inventorymanagement')->__('Commercers Inventory Management Update Log');
14
+
15
+ $this->_addButton('run_now', array(
16
+ 'label' => Mage::helper('inventorymanagement')->__('Run now'),
17
+ 'onclick' => 'setLocation(\''.$this->getUrl('*/*/run').'\')',
18
+ 'class' => 'save',
19
+ ), -100);
20
+
21
+ $this->_addButton('export', array(
22
+ 'label' => Mage::helper('adminhtml')->__('Export'),
23
+ 'onclick' => 'setLocation(\''.$this->getUrl('*/*/export').'\')',
24
+ 'class' => 'save',
25
+ ), -100);
26
+
27
+ parent::__construct();
28
+ $this->_removeButton('add');
29
+ }
30
+ }
31
+
32
+ ?>
app/code/local/Commercers/Inventorymanagement/Block/Adminhtml/Inventorymanagement/Grid.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ class Commercers_Inventorymanagement_Block_Adminhtml_Inventorymanagement_Grid extends Mage_Adminhtml_Block_Widget_Grid
8
+ {
9
+ public function __construct()
10
+ {
11
+ parent::__construct();
12
+ $this->setId('inventorymanagementGrid');
13
+ $this->setDefaultSort('history_id');
14
+ $this->setDefaultDir('DESC');
15
+ $this->setSaveParametersInSession(true);
16
+ $this->setUseAjax(true);
17
+ }
18
+
19
+ protected function _prepareCollection()
20
+ {
21
+ $collection = Mage::getModel('inventorymanagement/inventorymanagement')->getCollection();
22
+ $this->setCollection($collection);
23
+ return parent::_prepareCollection();
24
+ }
25
+
26
+ protected function _prepareColumns()
27
+ {
28
+ $this->addColumn('history_id', array(
29
+ 'header' => Mage::helper('adminhtml')->__('ID'),
30
+ 'align' =>'right',
31
+ 'width' => '30px',
32
+ 'index' => 'history_id',
33
+ ));
34
+
35
+ $this->addColumn('date', array(
36
+ 'header' => Mage::helper('inventorymanagement')->__('Date, time'),
37
+ 'align' =>'left',
38
+ 'width' => '70px',
39
+ 'type' => 'datetime',
40
+ 'index' => 'date',
41
+ ));
42
+
43
+ $this->addColumn('execution', array(
44
+ 'header' => Mage::helper('inventorymanagement')->__('Execution'),
45
+ 'align' => 'left',
46
+ 'width' => '120px',
47
+ 'index' => 'execution',
48
+ ));
49
+
50
+ return parent::_prepareColumns();
51
+ }
52
+
53
+ public function getRowUrl($row)
54
+ {
55
+ return false;
56
+ }
57
+
58
+ public function getGridUrl()
59
+ {
60
+ return $this->getUrl('*/*/grid', array('_current'=>true));
61
+ }
62
+
63
+
64
+ }
65
+ ?>
app/code/local/Commercers/Inventorymanagement/Helper/Data.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+
8
+ class Commercers_Inventorymanagement_Helper_Data extends Mage_Core_Helper_Abstract {
9
+
10
+ }
app/code/local/Commercers/Inventorymanagement/Model/Adminhtml/System/Config/Backend/Commercers/Inventorymanagement.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * commercers.com
4
+ * Commercers Inventory management
5
+ */
6
+ class Commercers_Inventorymanagement_Model_Adminhtml_System_Config_Backend_Commercers_Inventorymanagement extends Mage_Core_Model_Config_Data
7
+ {
8
+ const CRON_STRING_PATH = 'crontab/jobs/commercers_inventorymanagement/schedule/cron_expr';
9
+ const CRON_MODEL_PATH = 'crontab/jobs/commercers_inventorymanagement/run/model';
10
+
11
+ protected function _afterSave()
12
+ {
13
+ $minute = $this->getData('groups/inventorymanagement/fields/minute/value');
14
+ $hour = $this->getData('groups/inventorymanagement/fields/hour/value');
15
+ $day = $this->getData('groups/inventorymanagement/fields/day/value');
16
+ $month = $this->getData('groups/inventorymanagement/fields/month/value');
17
+ $dayofweek = $this->getData('groups/inventorymanagement/fields/dayofweek/value');
18
+ $errorEmail = $this->getData('groups/inventorymanagement/fields/error_email/value');
19
+
20
+ $cronExprArray = array( $minute, $hour, $day, $month, $dayofweek );
21
+ $cronExprString = join(' ', $cronExprArray);
22
+
23
+ try {
24
+ Mage::getModel('core/config_data')
25
+ ->load(self::CRON_STRING_PATH, 'path')
26
+ ->setValue($cronExprString)
27
+ ->setPath(self::CRON_STRING_PATH)
28
+ ->save();
29
+
30
+ Mage::getModel('core/config_data')
31
+ ->load(self::CRON_MODEL_PATH, 'path')
32
+ ->setValue((string) Mage::getConfig()->getNode(self::CRON_MODEL_PATH))
33
+ ->setPath(self::CRON_MODEL_PATH)
34
+ ->save();
35
+ }
36
+ catch (Exception $e) {
37
+ Mage::throwException(Mage::helper('adminhtml')->__('Unable to save the cron expression.'));
38
+ }
39
+ }
40
+ }
app/code/local/Commercers/Inventorymanagement/Model/Cron.php ADDED
@@ -0,0 +1,306 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * commercers.com
4
+ * Commercers Inventory management
5
+ */
6
+ class Commercers_Inventorymanagement_Model_Cron extends Mage_Core_Model_Abstract
7
+ {
8
+ const TYPE_CORRECTION = 'Correction';
9
+ const TYPE_RECEIVING = 'Receiving';
10
+ const TYPE_INVENTORY = 'Stock taking';
11
+ const TYPE_SALE = 'Sale';
12
+ const TYPE_CREDITMEMO = 'Credit memo';
13
+ const TYPE_CANCELLATION = 'Cancellation';
14
+ const EXECUTION_CRON = 'Cron';
15
+ const LIGHT_TEXT = 'More Information in Pro Version';
16
+
17
+ public function collectTransactions()
18
+ {
19
+ $this->_errors = array();
20
+ try
21
+ {
22
+ $data = Mage::getModel('inventorymanagement/transactions')->getCollection()->getData();
23
+ if(empty($data))
24
+ {
25
+ $this->initiateData();
26
+ $lastDate = now();
27
+ }
28
+ else
29
+ {
30
+ $history = Mage::getModel('inventorymanagement/inventorymanagement')->getCollection()
31
+ ->addAttributeToSort('date', 'desc');
32
+
33
+ foreach ($history as $entry)
34
+ {
35
+ $lastDate = $entry->getDate();
36
+ break;
37
+ }
38
+
39
+ if(Mage::helper('core')->isModuleEnabled('Commercers_Receivinglog'))
40
+ {
41
+ $this->writeReceiving($lastDate);
42
+ }
43
+ if(Mage::helper('core')->isModuleEnabled('Commercers_Inventorylog'))
44
+ {
45
+ $this->writeStocktaking($lastDate);
46
+ }
47
+ $this->writeSales($lastDate);
48
+ $this->writeCreditmemo($lastDate);
49
+ $this->writeCancellations($lastDate);
50
+ $this->writeCorrections($lastDate);
51
+ }
52
+ $this->writeHistory();
53
+ }
54
+ catch (Exception $e) {
55
+ $this->_errors[] = $e->getMessage();
56
+ }
57
+ return $this;
58
+ }
59
+
60
+ protected function writeReceiving($lastDate)
61
+ {
62
+ $receivinglog = Mage::getModel('receivinglog/receivinglog')->getCollection()
63
+ ->addAttributeToFilter('date', array('gt' => $lastDate))
64
+ ->addAttributeToSort('date', 'ASC');
65
+
66
+ foreach($receivinglog as $receiving)
67
+ {
68
+ $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $receiving->getSku());
69
+ $this->writeData(
70
+ $receiving->getDate(),
71
+ $receiving->getDifference(),
72
+ $product->getId(),
73
+ self::TYPE_RECEIVING,
74
+ self::LIGHT_TEXT
75
+ );
76
+
77
+ }
78
+ }
79
+
80
+ protected function writeStocktaking($lastDate)
81
+ {
82
+ $inventorylog = Mage::getModel('inventorylog/inventorylog')->getCollection()
83
+ ->addAttributeToFilter('date', array('gt' => $lastDate))
84
+ ->addAttributeToSort('date', 'ASC');
85
+
86
+ foreach($inventorylog as $inventory)
87
+ {
88
+ $this->writeData(
89
+ $inventory->getDate(),
90
+ $inventory->getDifference(),
91
+ $inventory->getProductId(),
92
+ self::TYPE_INVENTORY,
93
+ self::LIGHT_TEXT
94
+ );
95
+ }
96
+ }
97
+
98
+ protected function writeSales($lastDate)
99
+ {
100
+ $sales = Mage::getModel('sales/order')->getCollection()
101
+ ->addFieldToFilter('created_at', array('gt' => $lastDate))
102
+ ->addAttributeToSort('created_at', 'ASC');
103
+
104
+ foreach($sales as $order)
105
+ {
106
+ $items = $order->getItemsCollection();
107
+ foreach ($items as $item)
108
+ {
109
+ $this->writeData(
110
+ $order->getCreatedAt(),
111
+ 0-$item->getQtyOrdered(),
112
+ $item->getProductId(),
113
+ self::TYPE_SALE,
114
+ self::LIGHT_TEXT
115
+ );
116
+ }
117
+ }
118
+ }
119
+
120
+ protected function writeCreditmemo($lastDate)
121
+ {
122
+ $creditmemo = Mage::getModel('sales/order_creditmemo')->getCollection()
123
+ ->addFieldToFilter('created_at', array('gt' => $lastDate))
124
+ ->addAttributeToSort('created_at', 'ASC');
125
+ foreach($creditmemo as $creditmemoItem)
126
+ {
127
+ $createdAt = $creditmemoItem->getCreatedAt();
128
+ $orderID = $creditmemoItem->getOrderId();
129
+ $orders = Mage::getModel('sales/order')->getCollection()
130
+ ->addAttributeToFilter('entity_id', array('eq' => $orderID));
131
+ foreach($orders as $order)
132
+ {
133
+ $items = $order->getItemsCollection();
134
+ foreach($items as $item)
135
+ {
136
+ if($item->getParentItem() != null)
137
+ {
138
+ $refunded = $item->getParentItem()->getQtyRefunded();
139
+ }
140
+ else
141
+ {
142
+ $refunded = $item->getQtyRefunded();
143
+ }
144
+ if($refunded != 0)
145
+ {
146
+ $this->writeData(
147
+ $createdAt,
148
+ $refunded,
149
+ $item->getProductId(),
150
+ self::TYPE_CREDITMEMO,
151
+ self::LIGHT_TEXT
152
+ );
153
+ }
154
+ }
155
+ }
156
+ }
157
+ }
158
+
159
+ protected function writeCancellations($lastDate)
160
+ {
161
+ $sales = Mage::getModel('sales/order')->getCollection()
162
+ ->addFieldToFilter('updated_at', array('gt' => $lastDate))
163
+ ->addAttributeToSort('updated_at', 'ASC');
164
+
165
+ foreach($sales as $order)
166
+ {
167
+ $items = $order->getItemsCollection();
168
+ foreach ($items as $item)
169
+ {
170
+ if($item->getParentItem() != null)
171
+ {
172
+ $canceled = $item->getParentItem()->getQtyCanceled();
173
+ }
174
+ else
175
+ {
176
+ $canceled = $item->getQtyCanceled();
177
+ }
178
+ if($canceled != 0)
179
+ {
180
+ $this->writeData(
181
+ $order->getUpdatedAt(),
182
+ $canceled,
183
+ $item->getProductId(),
184
+ self::TYPE_CANCELLATION,
185
+ self::LIGHT_TEXT
186
+ );
187
+ }
188
+ }
189
+ }
190
+ }
191
+
192
+ protected function writeCorrections($lastDate)
193
+ {
194
+ $products = Mage::getModel('catalog/product')->getCollection();
195
+ foreach($products as $product)
196
+ {
197
+ $old_entries = Mage::getModel('inventorymanagement/transactions')->getCollection()
198
+ ->addFieldToFilter('product_id', array('eq' => $product->getId()))
199
+ ->addFieldToFilter('date', array('lteq' => $lastDate))
200
+ ->addAttributeToSort('date', 'DESC');
201
+ foreach($old_entries as $entry_old)
202
+ {
203
+ $last_qty = $entry_old->getStock();
204
+ break;
205
+ }
206
+ $new_entries = Mage::getModel('inventorymanagement/transactions')->getCollection()
207
+ ->addFieldToFilter('product_id', array('eq' => $product->getId()))
208
+ ->addFieldToFilter('date', array('gt' => $lastDate))
209
+ ->addAttributeToSort('date', 'ASC');
210
+ foreach($new_entries as $entry)
211
+ {
212
+ $last_qty = $last_qty + $entry->getQty();
213
+ $entry->setStock($last_qty)
214
+ ->save();
215
+ }
216
+ $stock_items = Mage::getModel('cataloginventory/stock_item');
217
+ $stock_item = $stock_items->loadByProduct($product->getId());
218
+ $stock = $stock_item->getQty();
219
+ if($last_qty != $stock)
220
+ {
221
+ $this->writeData(
222
+ now(),
223
+ $stock-$last_qty,
224
+ $product->getId(),
225
+ self::TYPE_CORRECTION,
226
+ self::LIGHT_TEXT,
227
+ $stock
228
+ );
229
+ }
230
+ }
231
+ }
232
+
233
+ protected function initiateData()
234
+ {
235
+ $products = Mage::getModel('catalog/product')->getCollection();
236
+ foreach($products as $product)
237
+ {
238
+ $stock_items = Mage::getModel('cataloginventory/stock_item');
239
+ $stock_item = $stock_items->loadByProduct($product->getId());
240
+ if (!$stock_item)
241
+ {
242
+ $this->_getSession()->addError($this->__('The current number in stock could not be detected.'));
243
+ }
244
+ else
245
+ {
246
+ $count = $stock_item->getQty();
247
+ $this->writeData(
248
+ now(),
249
+ $count,
250
+ $product->getId(),
251
+ self::TYPE_CORRECTION,
252
+ self::LIGHT_TEXT,
253
+ $count
254
+ );
255
+ }
256
+ }
257
+ }
258
+
259
+ private function writeData($date, $qty, $product_id, $type, $ref, $stock = null)
260
+ {
261
+ try
262
+ {
263
+ $model = Mage::getModel('inventorymanagement/transactions');
264
+ $model->setDate($date)
265
+ ->setProductID($product_id)
266
+ ->setType($type)
267
+ ->setReference($ref)
268
+ ->setQty($qty)
269
+ ->setStock($stock)
270
+ ->save();
271
+
272
+ return;
273
+ } catch (Exception $e) {
274
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
275
+ return;
276
+ }
277
+ }
278
+
279
+ private function writeHistory()
280
+ {
281
+ try
282
+ {
283
+ $model = Mage::getModel('inventorymanagement/inventorymanagement');
284
+
285
+ $execution = Mage::getSingleton('core/session')->getExecution();
286
+ if($execution != self::EXECUTION_CRON)
287
+ {
288
+ Mage::getSingleton('core/session')->setExecution(self::EXECUTION_CRON);
289
+ if(empty($execution))
290
+ {
291
+ $execution = self::EXECUTION_CRON;
292
+ }
293
+ }
294
+
295
+ $model->setDate(now())
296
+ ->setExecution($execution)
297
+ ->save();
298
+
299
+ return;
300
+ } catch (Exception $e) {
301
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
302
+ return;
303
+ }
304
+ }
305
+ }
306
+ ?>
app/code/local/Commercers/Inventorymanagement/Model/Inventorymanagement.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ class Commercers_Inventorymanagement_Model_Inventorymanagement extends Mage_Core_Model_Abstract
8
+ {
9
+ public function _construct()
10
+ {
11
+ parent::_construct();
12
+ $this->_init('inventorymanagement/inventorymanagement');
13
+ }
14
+
15
+ }
16
+ ?>
app/code/local/Commercers/Inventorymanagement/Model/Mysql4/Inventorymanagement.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ class Commercers_Inventorymanagement_Model_Mysql4_Inventorymanagement extends Mage_Core_Model_Mysql4_Abstract
8
+ {
9
+ public function _construct()
10
+ {
11
+ $this->_init('inventorymanagement/inventorymanagement', 'history_id');
12
+ }
13
+ }
14
+
15
+ ?>
app/code/local/Commercers/Inventorymanagement/Model/Mysql4/Inventorymanagement/Collection.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+
8
+ class Commercers_Inventorymanagement_Model_Mysql4_Inventorymanagement_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
9
+ {
10
+ public function _construct()
11
+ {
12
+ $this->_init('inventorymanagement/inventorymanagement');
13
+ }
14
+
15
+ public function addAttributeToFilter($attribute, $condition = null)
16
+ {
17
+ $this->addFieldToFilter($this->_attributeToField($attribute), $condition);
18
+ return $this;
19
+ }
20
+
21
+ protected function _attributeToField($attribute)
22
+ {
23
+ $field = false;
24
+ if (is_string($attribute)) {
25
+ $field = $attribute;
26
+ } elseif ($attribute instanceof Mage_Eav_Model_Entity_Attribute) {
27
+ $field = $attribute->getAttributeCode();
28
+ }
29
+ if (!$field) {
30
+ Mage::throwException(Mage::helper('inventorymanagement')->__('Cannot determine the field name.'));
31
+ }
32
+ return $field;
33
+ }
34
+
35
+ protected function _joinFields($from = '', $to = '')
36
+ {
37
+ $this->addAttributeToFilter('created_at' , array("from" => $from, "to" => $to, "datetime" => true))
38
+ ->getSelect()->group('("*")');
39
+
40
+ return $this;
41
+ }
42
+
43
+ public function setDateRange($from, $to)
44
+ {
45
+ $this->_reset()
46
+ ->_joinFields($from, $to);
47
+ return $this;
48
+ }
49
+
50
+ public function addAttributeToSort($attribute, $dir = 'asc')
51
+ {
52
+ $this->addOrder($this->_attributeToField($attribute), $dir);
53
+ return $this;
54
+ }
55
+ }
56
+ ?>
app/code/local/Commercers/Inventorymanagement/Model/Mysql4/Transactions.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ class Commercers_Inventorymanagement_Model_Mysql4_Transactions extends Mage_Core_Model_Mysql4_Abstract
8
+ {
9
+ public function _construct()
10
+ {
11
+ $this->_init('inventorymanagement/transactions', 'transaction_id');
12
+ }
13
+ }
14
+
15
+ ?>
app/code/local/Commercers/Inventorymanagement/Model/Mysql4/Transactions/Collection.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+
8
+ class Commercers_Inventorymanagement_Model_Mysql4_Transactions_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
9
+ {
10
+ public function _construct()
11
+ {
12
+ $this->_init('inventorymanagement/transactions');
13
+ }
14
+
15
+ public function addAttributeToFilter($attribute, $condition = null)
16
+ {
17
+ $this->addFieldToFilter($this->_attributeToField($attribute), $condition);
18
+ return $this;
19
+ }
20
+
21
+ protected function _attributeToField($attribute)
22
+ {
23
+ $field = false;
24
+ if (is_string($attribute)) {
25
+ $field = $attribute;
26
+ } elseif ($attribute instanceof Mage_Eav_Model_Entity_Attribute) {
27
+ $field = $attribute->getAttributeCode();
28
+ }
29
+ if (!$field) {
30
+ Mage::throwException(Mage::helper('inventorymanagement')->__('Cannot determine the field name.'));
31
+ }
32
+ return $field;
33
+ }
34
+
35
+ protected function _joinFields($from = '', $to = '')
36
+ {
37
+ $this->addAttributeToFilter('created_at' , array("from" => $from, "to" => $to, "datetime" => true))
38
+ ->getSelect()->group('("*")');
39
+
40
+ return $this;
41
+ }
42
+
43
+ public function setDateRange($from, $to)
44
+ {
45
+ $this->_reset()
46
+ ->_joinFields($from, $to);
47
+ return $this;
48
+ }
49
+
50
+ public function addAttributeToSort($attribute, $dir = 'asc')
51
+ {
52
+ $this->addOrder($this->_attributeToField($attribute), $dir);
53
+ return $this;
54
+ }
55
+ }
56
+ ?>
app/code/local/Commercers/Inventorymanagement/Model/Transactions.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ class Commercers_Inventorymanagement_Model_Transactions extends Mage_Core_Model_Abstract
8
+ {
9
+ public function _construct()
10
+ {
11
+ parent::_construct();
12
+ $this->_init('inventorymanagement/transactions');
13
+ }
14
+ }
15
+ ?>
app/code/local/Commercers/Inventorymanagement/controllers/Adminhtml/Catalog/ProductController.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once("Mage/Adminhtml/controllers/Catalog/ProductController.php");
4
+ /*
5
+ * commercers.com
6
+ * Commercers Inventory management
7
+ */
8
+ class Commercers_Inventorymanagement_Adminhtml_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController
9
+ {
10
+ public function transactionsGridAction()
11
+ {
12
+ $this->_initProduct();
13
+ $this->loadLayout();
14
+ $this->getLayout()->getBlock('inventorymanagement.catalog.product.tabs.transactions');
15
+ $this->renderLayout();
16
+ }
17
+
18
+ public function transactionsAction()
19
+ {
20
+ $this->_initProduct();
21
+ $this->loadLayout();
22
+ $this->getLayout()->getBlock('inventorymanagement.catalog.product.tabs.transactions');
23
+ $this->renderLayout();
24
+ }
25
+ }
26
+ ?>
app/code/local/Commercers/Inventorymanagement/controllers/Adminhtml/InventorymanagementController.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * commercers.com
4
+ * Commercers Inventory management
5
+ */
6
+ class Commercers_Inventorymanagement_Adminhtml_InventorymanagementController extends Mage_Adminhtml_Controller_Action
7
+ {
8
+ protected function _initAction()
9
+ {
10
+ $this->loadLayout()
11
+ ->_setActiveMenu('catalog/commercers/inventorymanagement')
12
+ ->_addBreadcrumb(Mage::helper('adminhtml')->__('Inventory management'), Mage::helper('adminhtml')->__('Inventory management'));
13
+ return $this;
14
+ }
15
+
16
+ public function indexAction()
17
+ {
18
+ $this->_initAction()
19
+ ->renderLayout();
20
+ }
21
+
22
+ public function gridAction()
23
+ {
24
+ $this->loadLayout();
25
+ $this->getResponse()->setBody(
26
+ $this->getLayout()->createBlock('inventorymanagement/adminhtml_inventorymanagement_grid')->toHtml()
27
+ );
28
+ }
29
+
30
+ public function editAction()
31
+ {
32
+ $this->_redirect('*/*/');
33
+ }
34
+
35
+ public function runAction()
36
+ {
37
+ Mage::getSingleton('core/session')->setExecution(Mage::getSingleton('admin/session')->getUser()->getUsername());
38
+ $cron = Mage::getModel('inventorymanagement/cron')->collectTransactions();
39
+ $this->_getSession()->addSuccess($this->__("Collection of Transactions executed."));
40
+ $this->_redirect('*/*/index');
41
+ }
42
+
43
+ public function exportAction()
44
+ {
45
+ $fileName = 'inventorymanagement_history.csv';
46
+ $content = $this->getLayout()->createBlock('inventorymanagement/adminhtml_inventorymanagement_grid')->getCsv();
47
+ $type = 'text/csv';
48
+ $this->_prepareDownloadResponse($fileName, $content, $type);
49
+ }
50
+
51
+ protected function _prepareDownloadResponse($fileName, $content, $contentType = 'application/octet-stream', $contentLength = null)
52
+ {
53
+ $session = Mage::getSingleton('admin/session');
54
+ if ($session->isFirstPageAfterLogin()) {
55
+ $this->_redirect($session->getUser()->getStartupPageUrl());
56
+ return $this;
57
+ }
58
+ $this->getResponse()
59
+ ->setHttpResponseCode(200)
60
+ ->setHeader('Pragma', 'public', true)
61
+ ->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)
62
+ ->setHeader('Content-type', $contentType, true)
63
+ ->setHeader('Content-Length', is_null($contentLength) ? strlen($content) : $contentLength)
64
+ ->setHeader('Content-Disposition', 'attachment; filename=' . $fileName)
65
+ ->setHeader('Last-Modified', date('r'));
66
+ if (!is_null($content)) {
67
+ $this->getResponse()->setBody($content);
68
+ }
69
+ return $this;
70
+ }
71
+ }
72
+ ?>
app/code/local/Commercers/Inventorymanagement/etc/adminhtml.xml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ -->
8
+ <config>
9
+ <acl>
10
+ <resources>
11
+ <admin>
12
+ <children>
13
+ <system>
14
+ <children>
15
+ <config>
16
+ <children>
17
+ <inventorymanagement title="title" module="inventorymanagement">
18
+ <title>Commercers Inventory management</title>
19
+ </inventorymanagement>
20
+ </children>
21
+ </config>
22
+ </children>
23
+ </system>
24
+ </children>
25
+ </admin>
26
+ </resources>
27
+ </acl>
28
+ </config>
app/code/local/Commercers/Inventorymanagement/etc/config.xml ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ -->
8
+ <config>
9
+ <modules>
10
+ <Commercers_Inventorymanagement>
11
+ <version>0.1.0</version>
12
+ </Commercers_Inventorymanagement>
13
+ </modules>
14
+
15
+ <global>
16
+ <blocks>
17
+ <inventorymanagement>
18
+ <class>Commercers_Inventorymanagement_Block</class>
19
+ </inventorymanagement>
20
+ <adminhtml>
21
+ <rewrite>
22
+ <catalog_product_edit_tabs>Commercers_Inventorymanagement_Block_Adminhtml_Catalog_Product_Tabs</catalog_product_edit_tabs>
23
+ </rewrite>
24
+ </adminhtml>
25
+ </blocks>
26
+ <models>
27
+ <inventorymanagement>
28
+ <class>Commercers_Inventorymanagement_Model</class>
29
+ <resourceModel>inventorymanagement_mysql4</resourceModel>
30
+ </inventorymanagement>
31
+ <inventorymanagement_mysql4>
32
+ <class>Commercers_Inventorymanagement_Model_Mysql4</class>
33
+ <entities>
34
+ <transactions><table>commercers_inventorymanagement_transactions</table></transactions>
35
+ <inventorymanagement><table>commercers_inventorymanagement</table></inventorymanagement>
36
+ </entities>
37
+ </inventorymanagement_mysql4>
38
+ </models>
39
+ <resources>
40
+ <inventorymanagement_setup>
41
+ <setup>
42
+ <module>Commercers_Inventorymanagement</module>
43
+ </setup>
44
+ <connection>
45
+ <use>core_setup</use>
46
+ </connection>
47
+ </inventorymanagement_setup>
48
+ <inventorymanagement_write>
49
+ <connection>
50
+ <use>core_write</use>
51
+ </connection>
52
+ </inventorymanagement_write>
53
+ <inventorymanagement_read>
54
+ <connection>
55
+ <use>core_read</use>
56
+ </connection>
57
+ </inventorymanagement_read>
58
+ </resources>
59
+ <helpers>
60
+ <inventorymanagement>
61
+ <class>Commercers_Inventorymanagement_Helper</class>
62
+ </inventorymanagement>
63
+ </helpers>
64
+ </global>
65
+
66
+ <admin>
67
+ <routers>
68
+ <inventorymanagement>
69
+ <use>admin</use>
70
+ <args>
71
+ <module>Commercers_Inventorymanagement</module>
72
+ <frontName>inventorymanagement</frontName>
73
+ </args>
74
+ </inventorymanagement>
75
+ <adminhtml>
76
+ <args>
77
+ <modules>
78
+ <Commercers_Inventorymanagement_Adminhtml before="Mage_Adminhtml">Commercers_Inventorymanagement_Adminhtml</Commercers_Inventorymanagement_Adminhtml>
79
+ </modules>
80
+ </args>
81
+ </adminhtml>
82
+ </routers>
83
+ </admin>
84
+
85
+ <adminhtml>
86
+ <translate>
87
+ <modules>
88
+ <inventorymanagement>
89
+ <files>
90
+ <default>Commercers_Inventorymanagement.csv</default>
91
+ </files>
92
+ </inventorymanagement>
93
+ </modules>
94
+ </translate>
95
+
96
+ <menu>
97
+ <catalog>
98
+ <children>
99
+ <commercers>
100
+ <children>
101
+ <inventorymanagement translate="title" module="commercers_commercers">
102
+ <sort_order>15</sort_order>
103
+ <title>Inventory management</title>
104
+ <children>
105
+ <configuration translate="title" module="inventorymanagement">
106
+ <sort_order>2</sort_order>
107
+ <title>Configuration</title>
108
+ <action>adminhtml/system_config/edit/section/inventorymanagement</action>
109
+ </configuration>
110
+ <inventorymanagement translate="title" module="inventorymanagement">
111
+ <sort_order>1</sort_order>
112
+ <title>Update Log</title>
113
+ <action>inventorymanagement/adminhtml_inventorymanagement</action>
114
+ </inventorymanagement>
115
+ </children>
116
+ </inventorymanagement>
117
+ </children>
118
+ </commercers>
119
+ </children>
120
+ </catalog>
121
+ </menu>
122
+
123
+ <acl>
124
+ <resources>
125
+ <admin>
126
+ <children>
127
+ <catalog>
128
+ <children>
129
+ <commercers>
130
+ <children>
131
+ <inventorymanagement translate="title" module="inventorymanagement">
132
+ <title>Commercers Inventory management</title>
133
+ <children>
134
+ <configuration translate="title" module="inventorymanagement">
135
+ <title>Configuration</title>
136
+ </configuration>
137
+ <inventorymanagement translate="title" module="inventorymanagement">
138
+ <title>Update Log</title>
139
+ </inventorymanagement>
140
+ </children>
141
+ </inventorymanagement>
142
+ </children>
143
+ </commercers>
144
+ </children>
145
+ </catalog>
146
+ </children>
147
+ </admin>
148
+ </resources>
149
+ </acl>
150
+
151
+ <layout>
152
+ <updates>
153
+ <inventorymanagement>
154
+ <file>inventorymanagement.xml</file>
155
+ </inventorymanagement>
156
+ </updates>
157
+ </layout>
158
+ </adminhtml>
159
+ <crontab>
160
+ <jobs>
161
+ <commercers_inventorymanagement>
162
+ <run>
163
+ <model>inventorymanagement/cron::collectTransactions</model>
164
+ </run>
165
+ </commercers_inventorymanagement>
166
+ </jobs>
167
+ </crontab>
168
+ </config>
app/code/local/Commercers/Inventorymanagement/etc/system.xml ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /*
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ -->
8
+ <config>
9
+ <sections>
10
+ <inventorymanagement translate="label" module="inventorymanagement">
11
+ <label>Inventory management</label>
12
+ <tab>commercers</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>50</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <inventorymanagement translate="label">
20
+ <label>Inventory management cronjob</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>1</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>0</show_in_website>
25
+ <show_in_store>0</show_in_store>
26
+ <fields>
27
+ <minute translate="label comment">
28
+ <label>Minutes</label>
29
+ <comment><![CDATA[<span class='notice'>'x'</span> minutes after every full hour<br><span class='notice'>'*/x'</span> every x minutes<br><span class='notice'>'*'</span> every minute<br><span class='notice'>'x,y'</span> after x and after y minutes after every full hour<br><span class='notice'>'x-y'</span> every minute between x and y after every full hour]]></comment>
30
+ <frontend_type>text</frontend_type>
31
+ <backend_model>inventorymanagement/adminhtml_system_config_backend_commercers_inventorymanagement</backend_model>
32
+ <sort_order>1</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>0</show_in_website>
35
+ <show_in_store>0</show_in_store>
36
+ </minute>
37
+ <hour translate="label comment">
38
+ <label>Hour</label>
39
+ <comment><![CDATA[<span class='notice'>'x'</span> hour of the day<br><span class='notice'>'*/x'</span> every x hours<br><span class='notice'>'*'</span> every hour<br><span class='notice'>'x,y'</span> x-th and y-th hour of the day<br><span class='notice'>'x-y'</span> every hour between x and y of the day]]></comment>
40
+ <frontend_type>text</frontend_type>
41
+ <backend_model>inventorymanagement/adminhtml_system_config_backend_commercers_inventorymanagement</backend_model>
42
+ <sort_order>2</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>0</show_in_website>
45
+ <show_in_store>0</show_in_store>
46
+ </hour>
47
+ <day translate="label comment">
48
+ <label>Day</label>
49
+ <comment><![CDATA[<span class='notice'>'x'</span> day of the month<br><span class='notice'>'*/x'</span> every x days<br><span class='notice'>'*'</span> every day<br><span class='notice'>'x,y'</span> x-th and y-th day of the month<br><span class='notice'>'x-y'</span> every day between x and y of the month]]></comment>
50
+ <frontend_type>text</frontend_type>
51
+ <backend_model>inventorymanagement/adminhtml_system_config_backend_commercers_inventorymanagement</backend_model>
52
+ <sort_order>3</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>0</show_in_website>
55
+ <show_in_store>0</show_in_store>
56
+ </day>
57
+ <month translate="label comment">
58
+ <label>Month</label>
59
+ <comment><![CDATA[<span class='notice'>'*'</span> every month<br>further opions analog to days]]></comment>
60
+ <frontend_type>text</frontend_type>
61
+ <backend_model>inventorymanagement/adminhtml_system_config_backend_commercers_inventorymanagement</backend_model>
62
+ <sort_order>4</sort_order>
63
+ <show_in_default>1</show_in_default>
64
+ <show_in_website>0</show_in_website>
65
+ <show_in_store>0</show_in_store>
66
+ </month>
67
+ <dayofweek translate="label comment">
68
+ <label>Day of the week</label>
69
+ <comment><![CDATA[<span class='notice'>0 and 7</span> equals sunday<br><span class='notice'>1</span> equals monday, <span class='notice'>2</span> equals tuesday, ...<br>further options analog to days]]></comment>
70
+ <frontend_type>text</frontend_type>
71
+ <backend_model>inventorymanagement/adminhtml_system_config_backend_commercers_inventorymanagement</backend_model>
72
+ <sort_order>5</sort_order>
73
+ <show_in_default>1</show_in_default>
74
+ <show_in_website>0</show_in_website>
75
+ <show_in_store>0</show_in_store>
76
+ </dayofweek>
77
+ <error_email translate="label">
78
+ <label>Error Email Recipient</label>
79
+ <frontend_type>text</frontend_type>
80
+ <sort_order>6</sort_order>
81
+ <show_in_default>1</show_in_default>
82
+ <show_in_website>0</show_in_website>
83
+ <show_in_store>0</show_in_store>
84
+ </error_email>
85
+ <error_email_identity translate="label">
86
+ <label>Error Email Sender</label>
87
+ <frontend_type>select</frontend_type>
88
+ <source_model>adminhtml/system_config_source_email_identity</source_model>
89
+ <sort_order>7</sort_order>
90
+ <show_in_default>1</show_in_default>
91
+ <show_in_website>0</show_in_website>
92
+ <show_in_store>0</show_in_store>
93
+ </error_email_identity>
94
+ <error_email_template translate="label">
95
+ <label>Error Email Template</label>
96
+ <frontend_type>select</frontend_type>
97
+ <source_model>adminhtml/system_config_source_email_template</source_model>
98
+ <sort_order>8</sort_order>
99
+ <show_in_default>1</show_in_default>
100
+ <show_in_website>0</show_in_website>
101
+ <show_in_store>0</show_in_store>
102
+ </error_email_template>
103
+ </fields>
104
+ </inventorymanagement>
105
+ </groups>
106
+ </inventorymanagement>
107
+ </sections>
108
+ </config>
app/code/local/Commercers/Inventorymanagement/sql/inventorymanagement_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * commercers.com
4
+ * Commercers Inventory management
5
+ */
6
+ $installer = $this;
7
+ $installer->startSetup();
8
+
9
+ $installer->run(
10
+ "DROP TABLE IF EXISTS {$this->getTable('commercers_inventorymanagement_transactions')};
11
+ CREATE TABLE {$this->getTable('commercers_inventorymanagement_transactions')}(
12
+ `transaction_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
13
+ `date` datetime,
14
+ `product_id` INT(10) UNSIGNED NOT NULL,
15
+ `type` VARCHAR(64) NOT NULL,
16
+ `reference` VARCHAR(64) NOT NULL,
17
+ `qty` DECIMAL(12,4),
18
+ `stock` DECIMAL(12,4),
19
+ PRIMARY KEY (`transaction_id`)
20
+ )ENGINE=InnoDB DEFAULT CHARSET=utf8;
21
+ DROP TABLE IF EXISTS {$this->getTable('commercers_inventorymanagement')};
22
+ CREATE TABLE {$this->getTable('commercers_inventorymanagement')}(
23
+ `history_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
24
+ `date` datetime,
25
+ `execution` VARCHAR(64) NOT NULL,
26
+ PRIMARY KEY (`history_id`)
27
+ )ENGINE=InnoDB DEFAULT CHARSET=utf8;
28
+ ");
29
+
30
+
31
+ $installer->endSetup();
app/design/adminhtml/default/default/layout/inventorymanagement.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ commercers.com
4
+ Commercers Inventory management
5
+ -->
6
+ <layout version="0.1.0">
7
+ <inventorymanagement_adminhtml_inventorymanagement_index>
8
+ <reference name="content">
9
+ <block type="inventorymanagement/adminhtml_inventorymanagement" name="inventorymanagement" />
10
+ </reference>
11
+ </inventorymanagement_adminhtml_inventorymanagement_index>
12
+ <adminhtml_catalog_product_transactions>
13
+ <block type="core/text_list" name="root">
14
+ <block type="inventorymanagement/adminhtml_catalog_product_tabs_transactions" name="inventorymanagement.catalog.product.tabs.transactions" />
15
+ </block>
16
+ </adminhtml_catalog_product_transactions>
17
+ <adminhtml_catalog_product_transactionsgrid>
18
+ <block type="core/text_list" name="root">
19
+ <block type="inventorymanagement/adminhtml_catalog_product_tabs_transactions" name="inventorymanagement.catalog.product.tabs.transactions" />
20
+ </block>
21
+ </adminhtml_catalog_product_transactionsgrid>
22
+ </layout>
app/etc/modules/Commercers_Commercers.xml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * commercers.com
5
+ * Commercers
6
+ */
7
+ -->
8
+ <config>
9
+ <modules>
10
+ <Commercers_Commercers>
11
+ <codePool>local</codePool>
12
+ <active>true</active>
13
+ </Commercers_Commercers>
14
+ </modules>
15
+ </config>
app/etc/modules/Commercers_Inventorymanagement.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * commercers.com
5
+ * Commercers Inventory management
6
+ */
7
+ -->
8
+ <config>
9
+ <modules>
10
+ <Commercers_Inventorymanagement>
11
+ <codePool>local</codePool>
12
+ <active>true</active>
13
+ <depends>
14
+ <Commercers_Commercers/>
15
+ </depends>
16
+ </Commercers_Inventorymanagement>
17
+ </modules>
18
+ </config>
app/locale/de_DE/Commercers_Commercers.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ "Commercers Extensions","Commercers Erweiterungen"
2
+ "Commercers Stock","Commercers Inventur"
3
+ "Stock ","Inventur"
app/locale/de_DE/Commercers_Inventorymanagement.csv ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Commercers Inventory management","Commercers Warenwirtschaft"
2
+ "Date of transaction","Datum der Transaktion"
3
+ "Type of transaction","Transaktionsart"
4
+ "Sale","Verkauf"
5
+ "Sales","Verkäufe"
6
+ "Orders","Bestellungen"
7
+ "Receiving","Wareneingang"
8
+ "Stock taking","Inventurbuchung"
9
+ "Credit memo","Gutschrift"
10
+ "Credit memos","Gutschriften"
11
+ "Rate of credit memos","Gutschrifts-Quote"
12
+ "Rate of cancellations","Stornierungs-Quote"
13
+ "Cancellations","Stornierungen"
14
+ "Cancellation","Stornierung"
15
+ "Correction","Korrekturbuchung"
16
+ "Adjusting entry","Korrekturbuchung"
17
+ "Transaction reference","Transaktionsreferenz"
18
+ "Current stock","Aktueller Bestand"
19
+ "Difference","Differenz"
20
+ "Inventory management","Warenwirtschaft"
21
+ "Successfully saved","Erfolgreich gespeichert"
22
+ "Minutes","Minute"
23
+ "<span class='notice'>'x'</span> minutes after every full hour<br><span class='notice'>'*/x'</span> every x minutes<br><span class='notice'>'*'</span> every minute<br><span class='notice'>'x,y'</span> after x and after y minutes after every full hour<br><span class='notice'>'x-y'</span> every minute between x and y after every full hour","<span class='notice'>'x'</span> Minuten nach jeder vollen Stunde<br><span class='notice'>'*/x'</span> Alle x Minuten<br><span class='notice'>'*'</span> Jede Minute<br><span class='notice'>'x,y'</span> Nach x und nach y Minuten nach jeder vollen Stunde<br><span class='notice'>'x-y'</span> Jede Minute von x bis y nach jeder vollen Stunde"
24
+ "Hour","Stunde"
25
+ "<span class='notice'>'x'</span> hour of the day<br><span class='notice'>'*/x'</span> every x hours<br><span class='notice'>'*'</span> every hour<br><span class='notice'>'x,y'</span> x-th and y-th hour of the day<br><span class='notice'>'x-y'</span> every hour between x and y of the day","<span class='notice'>'x'</span> Stunde des Tages<br><span class='notice'>'*/x'</span> Alle x Stunden<br><span class='notice'>'*'</span> Jede Stunde<br><span class='notice'>'x,y'</span> x-te und y-te Stunde des Tages<br><span class='notice'>'x-y'</span> Jede Stunde von x bis y eines Tages"
26
+ "Day","Tag"
27
+ "<span class='notice'>'x'</span> day of the month<br><span class='notice'>'*/x'</span> every x days<br><span class='notice'>'*'</span> every day<br><span class='notice'>'x,y'</span> x-th and y-th day of the month<br><span class='notice'>'x-y'</span> every day between x and y of the month","<span class='notice'>'x'</span> Tag des Monats<br><span class='notice'>'*/x'</span> Alle x Tage<br><span class='notice'>'*'</span> Jeden Tag<br><span class='notice'>'x,y'</span> x-ter und y-ter Tag des Monats<br><span class='notice'>'x-y'</span> Jeden Tag von x bis y eines Monats"
28
+ "Month","Monat"
29
+ "<span class='notice'>'*'</span> every month<br>further opions analog to days","<span class='notice'>'*'</span> Jeden Monat<br>Sonstige Optionen analog zu Tagen"
30
+ "Day of the week","Wochentag"
31
+ "<span class='notice'>0 and 7</span> equals sunday<br><span class='notice'>1</span> equals monday, <span class='notice'>2</span> equals tuesday, ...<br>further options analog to days","<span class='notice'>0 und 7</span> entspricht Sonntag<br><span class='notice'>1</span> entspricht Montag, <span class='notice'>2</span> entspricht Dienstag, ...<br>Sonstige Optionen analog zu Tagen"
32
+ "Run now","Jetzt ausführen"
33
+ "Commercers Inventory Management Update Log","Commercers Inventory Management Aktualisierungsübersicht"
34
+ "Date, time","Datum, Uhrzeit"
35
+ "Execution","Ausführung"
36
+ "finished","beendet"
37
+ "Status","Status"
38
+ "'x' minutes after every full hour <br>It can contain HTML formatting too!","test<br>test"
39
+ "Transaction reference","Transaktionsreferenz"
40
+ "Type","Typ"
41
+ "Ran '%s' (Duration: %s sec)","'%s' wurde ausgeführt (Dauer: %s sec)"
42
+ "'%s' messages:<pre>%s</pre>","'%s' Weitere Informationen:<pre>%s</pre>"
43
+ "Error while running '%s'","Bei Ausführung von '%s' ist ein Fehler aufgetreten."
44
+ "Collection of Transactions executed.","Aktualisierung der Transaktionen ausgeführt."
45
+ "More Information in Pro Version","Mehr Informationen in der Pro Version"
46
+ "Inventory management / statistics","Warenwirtschaft / Statistik"
47
+ "Since","Seit"
48
+ "Update Log","Aktualisierungsübersicht"
49
+
package.xml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Commercers_Inventorymanagement_Starter</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.commercers-shop.com/com_eng/agb">commercers UG terms / license</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>See all transaction for each SKU directly in your shop backend. The extension lists all sales and cancelations</summary>
10
+ <description>Material Management Starter&#xD;
11
+ &#xD;
12
+ See all transaction for each SKU directly in Magento. Our extention lists all sales, credit notes and cancelation directly in the article management section. Manual corrections are also considered as such. Using Magento Material Management gives you clear information when the selected product was sold in which quantity and how many item were returned.&#xD;
13
+ &#xD;
14
+ The Magento Material Management Extension is fully compatible with our Magento Stock Taking and Magento Receiving extension. Transactions generated by prescribed moduls are fully considered.&#xD;
15
+ &#xD;
16
+ All data is updated automatically in defined frequencies utilising a cron job. However, a manual recalculation of transactions is possible at any time.&#xD;
17
+ &#xD;
18
+ The Material Management Professional edition gives you further functionality in stating clear reference to each sale, credit note and cancelation, which is only a click away. Additionally, statistical information concerning the number of products sold, returned and the respective return level is available.&#xD;
19
+ &#xD;
20
+ This extension is fully compatible with our Stock Taking extension and our Receiving Manager as well as our Order Proposal Manager&#xD;
21
+ ________________________________________&#xD;
22
+ Warenwirtschaft - Starter&#xD;
23
+ &#xD;
24
+ Kennen Sie den Bestandsverlauf Ihrer Artikel? Wann wurde ein bestimmter Artikel in welcher Menge verkauft, wie oft wurde dieser wieder gutgeschrieben? Fragen zur Warenwirtschaft blieben in Magento bislang unbeantwortet. Mit der Magento Warenwirtschaft k&#xF6;nnen Sie ab sofort den Bestandsverlauf jedes Artikels einsehen. Es werden Verk&#xE4;ufe, Gutschriften und auch Stornierungen ber&#xFC;cksichtigt. Manuelle Bestandsanpassungen werden als Korrekturbuchung dargestellt.&#xD;
25
+ &#xD;
26
+ Die Aktualisierung der Magento Warenwirtschaft erfolgt als CRON automatisiert. Ben&#xF6;tigen Sie die aktuellen Daten zur Warenwirtschaft zu einem bestimmten Zeitpunkt, l&#xE4;sst sich die Funktion auch manuell ansto&#xDF;en.&#xD;
27
+ &#xD;
28
+ Die Extension ist vollst&#xE4;ndig kompatibel mit unserem Magento Inventur Manager und unserem Magento Wareneingangsmodul, so dass bei Einsatz der vorgenannten Extensions nahezu alle Warenwirtschaftstransaktionen eines Artikels einsehbar sind.&#xD;
29
+ &#xD;
30
+ In der professional Version unserer Magento Warenwirtschaft, erhalten Sie dar&#xFC;ber hinaus noch Statistiken zu jedem Artikel, so dass Sie Anzahl der Verk&#xE4;ufe, der Gutschriften und der Stornierung, wie auch Stornierungs- und Gutschriftsquoten einsehen k&#xF6;nnen.&#xD;
31
+ &#xD;
32
+ Dar&#xFC;ber hinaus sind in der Magento Warenwirtschaft professional Version Referenzen f&#xFC;r alle Transaktionen verlinkt, so dass Sie direkt die Details zu jeder Einzelbuchung einsehen k&#xF6;nnen.&#xD;
33
+ &#xD;
34
+ Diese Extension ist selbstverst&#xE4;ndlich kompatibel mit unserem Inventur Manager, der Wareneingang Extension und der Reichweitenanalyse und Bestellung Extension</description>
35
+ <notes>New extension by .commercers www.commercers.com</notes>
36
+ <authors><author><name>Commercers</name><user>Covos</user><email>info@commercers.com</email></author></authors>
37
+ <date>2013-03-12</date>
38
+ <time>11:12:35</time>
39
+ <contents><target name="magelocal"><dir name="Commercers"><dir name="Commercers"><dir name="Helper"><file name="Data.php" hash="b18a004d519cee41224b2f55fb8dc676"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2909356b27b43a114acfb65d7e08720f"/><file name="config.xml" hash="97ebfe91a9c40ab1725a510eb36feb4e"/><file name="system.xml" hash="09ed2e34540209bcb89763bc1b081ae6"/></dir></dir><dir name="Inventorymanagement"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Renderer"><file name="Translate.php" hash="2afe2ea4846278b15ef4a2b915475ea5"/></dir><dir name="Tabs"><file name="Transactions.php" hash="23145a9bb4701ee8ed94dfe80c291706"/></dir><file name="Tabs.php" hash="8adc9ae5c5a7184d70287590f88a4741"/></dir></dir><dir name="Inventorymanagement"><file name="Grid.php" hash="3aa583d936c3c2b19cee02f673b005ce"/></dir><file name="Inventorymanagement.php" hash="05f2a92f76fef18cfb92f612901af2be"/></dir></dir><dir name="Helper"><file name="Data.php" hash="fd9cdacb4c206ee83fe0d3973882a3cf"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Commercers"><file name="Inventorymanagement.php" hash="e0db4963aa88244ed0c02776e9d4a77a"/></dir></dir></dir></dir></dir><file name="Cron.php" hash="45d06c92741c6d5c5558889518a27a1e"/><file name="Inventorymanagement.php" hash="76cedda2d5576172418af0f1f4c22031"/><dir name="Mysql4"><dir name="Inventorymanagement"><file name="Collection.php" hash="746f7ffd0991abcf6e3c74cd8b9af37f"/></dir><file name="Inventorymanagement.php" hash="5c289ec20734251801c5d11618205716"/><dir name="Transactions"><file name="Collection.php" hash="b6e28ad6d3a0aca76c6dcb0acf888d12"/></dir><file name="Transactions.php" hash="097cde95bd39d31119e991b46414bbd8"/></dir><file name="Transactions.php" hash="a978ab1d6d9df90be6941f659310132f"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Catalog"><file name="ProductController.php" hash="f7823920e88ad2cc907df3d4899dec53"/></dir><file name="InventorymanagementController.php" hash="7d793ef51744053dbf1624e253772e85"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="b4423fbda30af74fbce1df5b4f403a10"/><file name="config.xml" hash="ead425512808dda5259814c48b50d7a9"/><file name="system.xml" hash="f39c868f573fb5a016ce6ca45ce68f3f"/></dir><dir name="sql"><dir name="inventorymanagement_setup"><file name="mysql4-install-0.1.0.php" hash="2c7d4288be0c5b86ae07e26c73e3d4d3"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="inventorymanagement.xml" hash="e587f7a4ba43a4cd8f53692f651b3404"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Commercers_Commercers.xml" hash="f1cdd9682f82e3b77ccfd028d9d20ece"/><file name="Commercers_Inventorymanagement.xml" hash="1605ca6a46597958e4dd42aecdbaee4a"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="Commercers_Commercers.csv" hash="ffcc988e82449b37e278ede090131000"/><file name="Commercers_Inventorymanagement.csv" hash="62ab5ccd596e1ae193da59cbca5a4d30"/></dir></target></contents>
40
+ <compatible/>
41
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.4.1.1</min><max>1.7</max></package></required></dependencies>
42
+ </package>