Medma_Stock_Control - Version 1.0.0

Version Notes

First Preview Release

Download this release

Release Info

Developer Medma Infomatix
Extension Medma_Stock_Control
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (30) hide show
  1. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol.php +14 -0
  2. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol.php~ +14 -0
  3. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit.php +81 -0
  4. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit.php~ +53 -0
  5. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Form.php +145 -0
  6. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Form.php~ +145 -0
  7. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Tab/Form.php +119 -0
  8. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Tab/Form.php~ +119 -0
  9. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Tabs.php +24 -0
  10. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Grid.php +88 -0
  11. app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Grid.php~ +92 -0
  12. app/code/local/Medma/Stockcontrol/Block/Stockcontrol.php +10 -0
  13. app/code/local/Medma/Stockcontrol/Block/Stockcontrol.php~ +12 -0
  14. app/code/local/Medma/Stockcontrol/Helper/Data.php +6 -0
  15. app/code/local/Medma/Stockcontrol/Helper/Data.php~ +6 -0
  16. app/code/local/Medma/Stockcontrol/Model/Mysql4/Stockcontrol.php +10 -0
  17. app/code/local/Medma/Stockcontrol/Model/Mysql4/Stockcontrol.php~ +10 -0
  18. app/code/local/Medma/Stockcontrol/Model/Mysql4/Stockcontrol/Collection.php +10 -0
  19. app/code/local/Medma/Stockcontrol/Model/Mysql4/Stockcontrol/Collection.php~ +10 -0
  20. app/code/local/Medma/Stockcontrol/Model/Stockcontrol.php +10 -0
  21. app/code/local/Medma/Stockcontrol/Model/Stockcontrol.php~ +10 -0
  22. app/code/local/Medma/Stockcontrol/controllers/Adminhtml/StockcontrolController.php +135 -0
  23. app/code/local/Medma/Stockcontrol/controllers/Adminhtml/StockcontrolController.php~ +129 -0
  24. app/code/local/Medma/Stockcontrol/controllers/Adminhtml/StockcontrolController_bkp21may2012.php +120 -0
  25. app/code/local/Medma/Stockcontrol/etc/config.xml +92 -0
  26. app/code/local/Medma/Stockcontrol/etc/config.xml~ +76 -0
  27. app/code/local/Medma/Stockcontrol/sql/stockcontrol_setup/mysql4-install-0.1.0.php +23 -0
  28. app/code/local/Medma/Stockcontrol/sql/stockcontrol_setup/mysql4-install-0.1.0.php~ +21 -0
  29. app/etc/modules/Medma_Stockcontrol.xml +9 -0
  30. package.xml +22 -0
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Medma_Stockcontrol_Block_Adminhtml_Stockcontrol extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->_controller = 'adminhtml_stockcontrol';
8
+ $this->_blockGroup = 'stockcontrol';
9
+ $this->_headerText = Mage::helper('stockcontrol')->__('Enter Stock');
10
+ //$this->_removeButton('add');
11
+ //d($this);
12
+
13
+ }
14
+ }
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol.php~ ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Medma_Printcodes_Block_Adminhtml_Printcodes extends Mage_Adminhtml_Block_Widget_Grid_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->_controller = 'adminhtml_printcodes';
8
+ $this->_blockGroup = 'printcodes';
9
+ $this->_headerText = Mage::helper('printcodes')->__('Enter Print Code');
10
+ //$this->_removeButton('add');
11
+ //d($this);
12
+
13
+ }
14
+ }
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit.php ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Medma_Stockcontrol_Block_Adminhtml_Stockcontrol_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->_objectId = 'id';
8
+ $this->_blockGroup = 'stockcontrol';
9
+ $this->_controller = 'adminhtml_stockcontrol';
10
+ $this->_formScripts[] = "
11
+
12
+
13
+
14
+
15
+
16
+ function getPresentQty(base_url,product_id,next_quantity_id,secret_key){
17
+
18
+
19
+ // alert(base_url+product_id+next_quantity_id+secret_key);
20
+ new Ajax.Request(base_url+'stockcontrol/adminhtml_stockcontrol/getPresentQty/product_id/'+product_id+'/key/'+secret_key,
21
+
22
+
23
+ {
24
+
25
+
26
+ method:'Post',
27
+
28
+
29
+ onSuccess: function(transport){
30
+
31
+
32
+ var response = transport.responseText || 'no response text';
33
+ //alert('success'+response);
34
+
35
+ document.getElementById(next_quantity_id).value=response;
36
+
37
+ },
38
+
39
+
40
+ onFailure: function(){
41
+
42
+
43
+
44
+
45
+
46
+ alert('Failure in Ajax');
47
+
48
+
49
+ }
50
+
51
+
52
+ });
53
+
54
+
55
+ }
56
+
57
+
58
+
59
+
60
+ ";
61
+
62
+ }
63
+
64
+
65
+ public function getHeaderText()
66
+
67
+ {
68
+
69
+ if( Mage::registry('stockcontrol_data') && Mage::registry('stockcontrol_data')->getId() ) {
70
+
71
+ return Mage::helper('stockcontrol')->__("Edit Stock '%s'", $this->htmlEscape(Mage::registry('stockcontrol_data')->getName()));
72
+
73
+
74
+ } else {
75
+
76
+ return Mage::helper('stockcontrol')->__('Add Stock');
77
+
78
+ }
79
+
80
+ }
81
+ }
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit.php~ ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Futurtek_Stockcontrol_Block_Adminhtml_Stockcontrol_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
3
+ {
4
+ public function __construct()
5
+ {
6
+ parent::__construct();
7
+ $this->_objectId = 'id';
8
+ $this->_blockGroup = 'stockcontrol';
9
+ $this->_controller = 'adminhtml_stockcontrol';
10
+ $this->_formScripts[] = "
11
+
12
+ function getPresentQty(base_url,product_id,next_quantity_id,secret_key){
13
+ // alert(base_url+product_id+next_quantity_id+secret_key);
14
+ new Ajax.Request(base_url+'stockcontrol/adminhtml_stockcontrol/getPresentQty/product_id/'+product_id+'/key/'+secret_key,
15
+ {
16
+ method:'Post',
17
+ onSuccess: function(transport){
18
+ var response = transport.responseText || 'no response text';
19
+ alert('success'+response);
20
+
21
+ document.getElementById(next_quantity_id).value=response;
22
+
23
+ },
24
+ onFailure: function(){
25
+
26
+ alert('Failure in Ajax');
27
+ }
28
+ });
29
+ }
30
+
31
+
32
+ ";
33
+
34
+ }
35
+
36
+
37
+ public function getHeaderText()
38
+
39
+ {
40
+
41
+ if( Mage::registry('stockcontrol_data') && Mage::registry('stockcontrol_data')->getId() ) {
42
+
43
+ return Mage::helper('stockcontrol')->__("Edit Stock '%s'", $this->htmlEscape(Mage::registry('stockcontrol_data')->getName()));
44
+
45
+
46
+ } else {
47
+
48
+ return Mage::helper('stockcontrol')->__('Add Stock');
49
+
50
+ }
51
+
52
+ }
53
+ }
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Form.php ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Stockcontrol_Block_Adminhtml_Stockcontrol_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post'));
11
+
12
+ $form->setUseContainer(true);
13
+ $this->setForm($form);
14
+ $hlp = Mage::helper('stockcontrol');
15
+
16
+
17
+
18
+ $collection = Mage::getResourceModel('stockcontrol/stockcontrol');
19
+ /************************Code to get the base URL*******************/
20
+
21
+
22
+
23
+ $getbase_url = $this->getBaseUrl();
24
+
25
+
26
+
27
+ /******************************************************************/
28
+
29
+
30
+
31
+ /*****Code to get the Secret Key of an controller Action in magento admin panel**********/
32
+
33
+
34
+
35
+
36
+ $getPresentQty_key = Mage::getSingleton('adminhtml/url')->getSecretKey("adminhtml_stockcontrol","getPresentQtyAction");
37
+
38
+
39
+
40
+ /******************************************************************/
41
+
42
+
43
+ $products_model=Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->load();
44
+
45
+ //print_r($products_model);exit;
46
+ $products_values= array();
47
+
48
+ $products_values[] = array(
49
+
50
+ 'label' => 'Select Product',
51
+
52
+ 'value' => ''
53
+ );
54
+ $operation_values= array();
55
+ $operation_model=array('Stock In'=>'Stock In','Stock Out'=>'Stock Out');
56
+ $operation_values[] = array(
57
+
58
+ 'label' => 'Select Operation',
59
+ 'value' => '',
60
+
61
+ );
62
+ foreach($operation_model as $key => $values)
63
+ {
64
+ $operation_values[] = array(
65
+ 'label' => $values,
66
+ 'value' => $key
67
+ );
68
+ }
69
+
70
+ foreach($products_model as $key => $values)
71
+ {
72
+ $products_values[] = array(
73
+ 'label' => $values['sku'],
74
+ 'value' => $values['entity_id']
75
+ );
76
+ }
77
+
78
+
79
+ // Most Important Line for printing the above query //
80
+
81
+ //$collection->printlogquery(true);
82
+ //exit(0);
83
+
84
+ $fldInfo = $form->addFieldset('stockcontrol_info', array('legend'=> $hlp->__('Stockcontrol')));
85
+
86
+ $fldInfo->addField('product_id', 'select', array(
87
+
88
+ 'label' => $hlp->__('Product Name'),
89
+
90
+ 'class' => 'required-entry',
91
+
92
+ 'name' => 'product_id',
93
+
94
+ 'values' =>$products_values,
95
+
96
+ 'onchange' => "getPresentQty('$getbase_url',this.value,'present_qty','$getPresentQty_key');"
97
+ ));
98
+
99
+
100
+ $fldInfo->addField('present_qty', 'text', array(
101
+ 'label' => $hlp->__('Present Qty'),
102
+ 'name' => 'present_qty',
103
+ 'readonly' =>'true',
104
+
105
+ ));
106
+ $fldInfo->addField('operation', 'select', array(
107
+ 'label' => $hlp->__('Operation'),
108
+ 'class' => 'required-entry',
109
+ 'values' =>$operation_values,
110
+ 'name' => 'operation',
111
+
112
+ ));
113
+ $fldInfo->addField('added_qty', 'text', array(
114
+ 'label' => $hlp->__('Qty(Qty(Stock In/Stock Out)'),
115
+ 'class' => 'required-entry',
116
+ 'name' => 'added_qty',
117
+
118
+ ));
119
+ $fldInfo->addField('reason', 'textarea', array(
120
+ 'label' => $hlp->__('Reason For Stock Adjustment'),
121
+ 'class' => 'required-entry',
122
+ 'name' => 'reason',
123
+
124
+ ));
125
+
126
+
127
+
128
+
129
+ ?>
130
+
131
+ <?php
132
+
133
+
134
+
135
+
136
+
137
+ if ( Mage::registry('stockcontrol_data') ) {
138
+ $form->setValues(Mage::registry('stockcontrol_data')->getData());
139
+ }
140
+
141
+
142
+ return parent::_prepareForm();
143
+
144
+ }
145
+ }
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Form.php~ ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Futurtek_Stockcontrol_Block_Adminhtml_Stockcontrol_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
4
+ {
5
+ protected function _prepareForm()
6
+ {
7
+ $form = new Varien_Data_Form(array(
8
+ 'id' => 'edit_form',
9
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
10
+ 'method' => 'post'));
11
+
12
+ $form->setUseContainer(true);
13
+ $this->setForm($form);
14
+ $hlp = Mage::helper('stockcontrol');
15
+
16
+
17
+
18
+ $collection = Mage::getResourceModel('stockcontrol/stockcontrol');
19
+ /************************Code to get the base URL*******************/
20
+
21
+
22
+
23
+ $getbase_url = $this->getBaseUrl();
24
+
25
+
26
+
27
+ /******************************************************************/
28
+
29
+
30
+
31
+ /*****Code to get the Secret Key of an controller Action in magento admin panel**********/
32
+
33
+
34
+
35
+
36
+ $getPresentQty_key = Mage::getSingleton('adminhtml/url')->getSecretKey("adminhtml_stockcontrol","getPresentQtyAction");
37
+
38
+
39
+
40
+ /******************************************************************/
41
+
42
+
43
+ $products_model=Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->load();
44
+
45
+ //print_r($products_model);exit;
46
+ $products_values= array();
47
+
48
+ $products_values[] = array(
49
+
50
+ 'label' => 'Select Product',
51
+
52
+ 'value' => ''
53
+ );
54
+ $operation_values= array();
55
+ $operation_model=array('Stock In'=>'Stock In','Stock Out'=>'Stock Out');
56
+ $operation_values[] = array(
57
+
58
+ 'label' => 'Select Operation',
59
+ 'value' => '',
60
+
61
+ );
62
+ foreach($operation_model as $key => $values)
63
+ {
64
+ $operation_values[] = array(
65
+ 'label' => $values,
66
+ 'value' => $key
67
+ );
68
+ }
69
+
70
+ foreach($products_model as $key => $values)
71
+ {
72
+ $products_values[] = array(
73
+ 'label' => $values['sku'],
74
+ 'value' => $values['entity_id']
75
+ );
76
+ }
77
+
78
+
79
+ // Most Important Line for printing the above query //
80
+
81
+ //$collection->printlogquery(true);
82
+ //exit(0);
83
+
84
+ $fldInfo = $form->addFieldset('stockcontrol_info', array('legend'=> $hlp->__('Stockcontrol')));
85
+
86
+ $fldInfo->addField('product_id', 'select', array(
87
+
88
+ 'label' => $hlp->__('Product Name'),
89
+
90
+ 'class' => 'required-entry',
91
+
92
+ 'name' => 'product_id',
93
+
94
+ 'values' =>$products_values,
95
+
96
+ 'onchange' => "getPresentQty('$getbase_url',this.value,'present_qty','$getPresentQty_key');"
97
+ ));
98
+
99
+
100
+ $fldInfo->addField('present_qty', 'text', array(
101
+ 'label' => $hlp->__('Present Qty'),
102
+ 'name' => 'present_qty',
103
+ 'readonly' =>'true',
104
+
105
+ ));
106
+ $fldInfo->addField('operation', 'select', array(
107
+ 'label' => $hlp->__('Operation'),
108
+ 'class' => 'required-entry',
109
+ 'values' =>$operation_values,
110
+ 'name' => 'operation',
111
+
112
+ ));
113
+ $fldInfo->addField('added_qty', 'text', array(
114
+ 'label' => $hlp->__('Qty(Stock In/Out)'),
115
+ 'class' => 'required-entry',
116
+ 'name' => 'added_qty',
117
+
118
+ ));
119
+ $fldInfo->addField('reason', 'textarea', array(
120
+ 'label' => $hlp->__('Reason For Stock Adjustment'),
121
+ 'class' => 'required-entry',
122
+ 'name' => 'reason',
123
+
124
+ ));
125
+
126
+
127
+
128
+
129
+ ?>
130
+
131
+ <?php
132
+
133
+
134
+
135
+
136
+
137
+ if ( Mage::registry('stockcontrol_data') ) {
138
+ $form->setValues(Mage::registry('stockcontrol_data')->getData());
139
+ }
140
+
141
+
142
+ return parent::_prepareForm();
143
+
144
+ }
145
+ }
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Tab/Form.php ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Medma_Groups_Block_Adminhtml_Groups_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ protected function _prepareForm()
5
+ {
6
+ $form = new Varien_Data_Form(array(
7
+ 'id' => 'edit_form',
8
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
9
+ 'method' => 'post'));
10
+
11
+ $form->setUseContainer(true);
12
+ $this->setForm($form);
13
+ $hlp = Mage::helper('groups');
14
+
15
+ /*******************Code to display values from multiple tables*********************/
16
+
17
+ $id = Mage::registry('brands_data')->getId();
18
+
19
+ $brand_model = Mage::registry('brands_data')->getData();
20
+
21
+ $power_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
22
+
23
+ // $diameter_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
24
+ //
25
+ // $power_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
26
+ //
27
+ // $power_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
28
+ //
29
+ // $power_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
30
+
31
+ /*******************Code to display values from multiple tables*********************/
32
+
33
+
34
+ $fldInfo = $form->addFieldset('brands_info', array('legend'=> $hlp->__('Brands Details')));
35
+
36
+ // $fldInfo->addField('store_id', 'select', array(
37
+ // 'label' => $hlp->__('Store View'),
38
+ // 'class' => 'required-entry',
39
+ // 'required' => true,
40
+ // 'name' => 'store_id',
41
+ // // 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()
42
+ // ));
43
+ //
44
+ // $fldInfo->addField('follow_up', 'select', array(
45
+ // 'label' => $hlp->__('Follow Up'),
46
+ // 'name' => 'follow_up',
47
+ // 'options' => array(
48
+ // 'first' => $hlp->__('First'),
49
+ // 'second' => $hlp->__('Second'),
50
+ // 'third' => $hlp->__('Third'),
51
+ // ),
52
+ // ));
53
+
54
+ // $fldInfo->addField('sheduled_at', 'date', array(
55
+ // 'label' => $hlp->__('Alert Will Be Sent On'),
56
+ // 'image' => $this->getSkinUrl('images/grid-cal.gif'),
57
+ // 'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT),
58
+ // 'name' => 'sheduled_at',
59
+ // ));
60
+ //
61
+ // $fldInfo->addField('customer_email', 'text', array(
62
+ // 'label' => $hlp->__('Customer E-mail'),
63
+ // 'class' => 'required-entry validate-email',
64
+ // 'required' => true,
65
+ // 'name' => 'customer_email',
66
+ // ));
67
+ // $fldInfo->addField('brand_id', 'text', array(
68
+ // 'label' => $hlp->__('Brand ID'),
69
+ // 'class' => 'required-entry',
70
+ // 'required' => true,
71
+ // 'name' => 'brand_id',
72
+ // ));
73
+ $fldInfo->addField('brand_name', 'text', array(
74
+ 'label' => $hlp->__('Brand Name'),
75
+ 'class' => 'required-entry',
76
+ 'required' => true,
77
+ 'name' => 'brand_name',
78
+ ));
79
+
80
+ $fldInfo->addField('power_value', 'text', array(
81
+ 'label' => $hlp->__('Power Value'),
82
+ 'class' => 'required-entry',
83
+ 'required' => true,
84
+ 'name' => 'power_value',
85
+ ));
86
+ // $fldInfo->addField('power_value', 'select', array(
87
+ // 'label' => $hlp->__('Power Value'),
88
+ // 'options' => array(
89
+ // 'first' => $hlp->__('First'),
90
+ // 'second' => $hlp->__('Second'),
91
+ // 'third' => $hlp->__('Third')),
92
+ // 'name' => 'power_value',
93
+ // ));
94
+ //
95
+ // $fldInfo->addField('products', 'textarea', array(
96
+ // 'label' => $hlp->__('Produsts'),
97
+ // 'class' => 'required-entry',
98
+ // 'required' => true,
99
+ // 'name' => 'products',
100
+ // 'style' => 'width:35em;height:15em;',
101
+ // ));
102
+ // $fldInfo->addField('is_preprocessed', 'hidden', array(
103
+ // 'name' => 'is_preprocessed',
104
+ // 'value' => 1,
105
+ // ));
106
+
107
+ if ( Mage::registry('brands_data') ) {
108
+ //$form->setValues(Mage::registry('brands_data')->getData());
109
+ $form->setValues(array_merge($power_model[0],$brand_model));
110
+
111
+
112
+ }
113
+
114
+ return parent::_prepareForm();
115
+ }
116
+ }
117
+
118
+ ?>
119
+
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Tab/Form.php~ ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Medma_Groups_Block_Adminhtml_Groups_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
3
+ {
4
+ protected function _prepareForm()
5
+ {
6
+ $form = new Varien_Data_Form(array(
7
+ 'id' => 'edit_form',
8
+ 'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
9
+ 'method' => 'post'));
10
+
11
+ $form->setUseContainer(true);
12
+ $this->setForm($form);
13
+ $hlp = Mage::helper('brands');
14
+
15
+ /*******************Code to display values from multiple tables*********************/
16
+
17
+ $id = Mage::registry('brands_data')->getId();
18
+
19
+ $brand_model = Mage::registry('brands_data')->getData();
20
+
21
+ $power_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
22
+
23
+ // $diameter_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
24
+ //
25
+ // $power_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
26
+ //
27
+ // $power_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
28
+ //
29
+ // $power_model = Mage::getModel('brands/power')->getCollection()->addFieldToFilter('brand_id',array('eq'=>$id))->getData();
30
+
31
+ /*******************Code to display values from multiple tables*********************/
32
+
33
+
34
+ $fldInfo = $form->addFieldset('brands_info', array('legend'=> $hlp->__('Brands Details')));
35
+
36
+ // $fldInfo->addField('store_id', 'select', array(
37
+ // 'label' => $hlp->__('Store View'),
38
+ // 'class' => 'required-entry',
39
+ // 'required' => true,
40
+ // 'name' => 'store_id',
41
+ // // 'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm()
42
+ // ));
43
+ //
44
+ // $fldInfo->addField('follow_up', 'select', array(
45
+ // 'label' => $hlp->__('Follow Up'),
46
+ // 'name' => 'follow_up',
47
+ // 'options' => array(
48
+ // 'first' => $hlp->__('First'),
49
+ // 'second' => $hlp->__('Second'),
50
+ // 'third' => $hlp->__('Third'),
51
+ // ),
52
+ // ));
53
+
54
+ // $fldInfo->addField('sheduled_at', 'date', array(
55
+ // 'label' => $hlp->__('Alert Will Be Sent On'),
56
+ // 'image' => $this->getSkinUrl('images/grid-cal.gif'),
57
+ // 'format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT),
58
+ // 'name' => 'sheduled_at',
59
+ // ));
60
+ //
61
+ // $fldInfo->addField('customer_email', 'text', array(
62
+ // 'label' => $hlp->__('Customer E-mail'),
63
+ // 'class' => 'required-entry validate-email',
64
+ // 'required' => true,
65
+ // 'name' => 'customer_email',
66
+ // ));
67
+ // $fldInfo->addField('brand_id', 'text', array(
68
+ // 'label' => $hlp->__('Brand ID'),
69
+ // 'class' => 'required-entry',
70
+ // 'required' => true,
71
+ // 'name' => 'brand_id',
72
+ // ));
73
+ $fldInfo->addField('brand_name', 'text', array(
74
+ 'label' => $hlp->__('Brand Name'),
75
+ 'class' => 'required-entry',
76
+ 'required' => true,
77
+ 'name' => 'brand_name',
78
+ ));
79
+
80
+ $fldInfo->addField('power_value', 'text', array(
81
+ 'label' => $hlp->__('Power Value'),
82
+ 'class' => 'required-entry',
83
+ 'required' => true,
84
+ 'name' => 'power_value',
85
+ ));
86
+ // $fldInfo->addField('power_value', 'select', array(
87
+ // 'label' => $hlp->__('Power Value'),
88
+ // 'options' => array(
89
+ // 'first' => $hlp->__('First'),
90
+ // 'second' => $hlp->__('Second'),
91
+ // 'third' => $hlp->__('Third')),
92
+ // 'name' => 'power_value',
93
+ // ));
94
+ //
95
+ // $fldInfo->addField('products', 'textarea', array(
96
+ // 'label' => $hlp->__('Produsts'),
97
+ // 'class' => 'required-entry',
98
+ // 'required' => true,
99
+ // 'name' => 'products',
100
+ // 'style' => 'width:35em;height:15em;',
101
+ // ));
102
+ // $fldInfo->addField('is_preprocessed', 'hidden', array(
103
+ // 'name' => 'is_preprocessed',
104
+ // 'value' => 1,
105
+ // ));
106
+
107
+ if ( Mage::registry('brands_data') ) {
108
+ //$form->setValues(Mage::registry('brands_data')->getData());
109
+ $form->setValues(array_merge($power_model[0],$brand_model));
110
+
111
+
112
+ }
113
+
114
+ return parent::_prepareForm();
115
+ }
116
+ }
117
+
118
+ ?>
119
+
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Edit/Tabs.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Groups_Block_Adminhtml_Groups_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
4
+ {
5
+
6
+ public function __construct()
7
+ {
8
+ parent::__construct();
9
+ $this->setId('groups_tabs');
10
+ $this->setDestElementId('edit_form');
11
+ $this->setTitle(Mage::helper('groups')->__('Manage Lens Groups'));
12
+ }
13
+
14
+ protected function _beforeToHtml()
15
+ {
16
+ $this->addTab('form_section', array(
17
+ 'label' => Mage::helper('groups')->__('Item Information'),
18
+ 'title' => Mage::helper('groups')->__('Item Information'),
19
+ 'content' => $this->getLayout()->createBlock('groups/adminhtml_groups_edit_tab_form')->toHtml(),
20
+ ));
21
+
22
+ return parent::_beforeToHtml();
23
+ }
24
+ }
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Grid.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author Adjustware
4
+ */
5
+ class Medma_Stockcontrol_Block_Adminhtml_Stockcontrol_Grid extends Mage_Adminhtml_Block_Widget_Grid
6
+ {
7
+ public function __construct()
8
+ {
9
+ parent::__construct();
10
+ $this->setId('stockcontrolGrid');
11
+ $this->setDefaultSort('id');
12
+ //$this->_removeButton('add_new');
13
+
14
+ }
15
+
16
+ protected function _prepareCollection()
17
+ {
18
+ $collection = Mage::getModel('stockcontrol/stockcontrol')->getCollection();
19
+
20
+ $collection->getSelect()->join(
21
+ array('pc'=>'catalog_product_flat_1'),
22
+ 'main_table.product_id = pc.entity_id',
23
+ array('product_name'=>'pc.name'));
24
+ $collection->getSelect()->join(
25
+ array('cisi'=>'catalog_product_flat_1'),
26
+ 'main_table.product_id = cisi.entity_id',
27
+ array('sku'=>'cisi.sku'));
28
+ $this->setCollection($collection);
29
+ return parent::_prepareCollection();
30
+ }
31
+
32
+
33
+ protected function _prepareColumns()
34
+ {
35
+ $this->addColumn('product_id', array(
36
+ 'header'=> Mage::helper('stockcontrol')->__('Product Name'),
37
+ 'width' => '80px',
38
+ 'type' => 'text',
39
+ 'index' => 'product_name',
40
+ 'filter_index' => 'main_table.product_name'
41
+ ));
42
+ $this->addColumn('sku', array(
43
+ 'header'=> Mage::helper('stockcontrol')->__('Sku'),
44
+ 'width' => '80px',
45
+ 'type' => 'text',
46
+ 'index' => 'sku'
47
+ ));
48
+
49
+ $this->addColumn('old_qty', array(
50
+ 'header' => Mage::helper('stockcontrol')->__('Old Qty'),
51
+ 'index' => 'present_qty',
52
+ 'type' => 'text',
53
+ 'width' => '100px',
54
+ 'filter_index' => 'main_table.present_qty'
55
+ ));
56
+
57
+ $this->addColumn('added_qty', array(
58
+ 'header' => Mage::helper('stockcontrol')->__('Qty(Stock In/Stock Out)'),
59
+ 'index' => 'added_qty',
60
+ 'type' => 'text',
61
+ 'width' => '100px',
62
+ ));
63
+ $this->addColumn('present_qty', array(
64
+ 'header' => Mage::helper('stockcontrol')->__('Present Qty'),
65
+ 'index' => 'total_qty',
66
+ 'type' => 'text',
67
+ 'width' => '100px',
68
+ ));
69
+ $this->addColumn('operation', array(
70
+ 'header' => Mage::helper('stockcontrol')->__('Operation'),
71
+ 'index' => 'operation',
72
+ 'type' => 'text',
73
+ 'width' => '100px',
74
+ ));
75
+ $this->addColumn('qty_added_date', array(
76
+ 'header' => Mage::helper('stockcontrol')->__('Qty(Stock In/Stock Out) Date'),
77
+ 'index' => 'qty_added_date',
78
+ 'type' => 'text',
79
+ 'width' => '100px',
80
+ ));
81
+
82
+ return $this;
83
+ }
84
+
85
+
86
+
87
+
88
+ }
app/code/local/Medma/Stockcontrol/Block/Adminhtml/Stockcontrol/Grid.php~ ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author Adjustware
4
+ */
5
+ class Medma_Stockcontrol_Block_Adminhtml_Stockcontrol_Grid extends Mage_Adminhtml_Block_Widget_Grid
6
+ {
7
+ public function __construct()
8
+ {
9
+ parent::__construct();
10
+ $this->setId('stockcontrolGrid');
11
+ $this->setDefaultSort('id');
12
+ //$this->_removeButton('add_new');
13
+
14
+ }
15
+
16
+ protected function _prepareCollection()
17
+ {
18
+ $collection = Mage::getModel('stockcontrol/stockcontrol')->getCollection();
19
+
20
+
21
+ // $collection->getSelect()->join(
22
+ // array('pc'=>'catalog_product_flat_1'),
23
+ // 'main_table.product_id = pc.entity_id',
24
+ // array('pro_name'=>'main_table.product_id'));
25
+ $collection->getSelect()->join(
26
+ array('cisi'=>'catalog_product_flat_1'),
27
+ 'main_table.product_id = cisi.entity_id',
28
+ array('sku'=>'cisi.sku'));
29
+ //$collection->printLogQuery(true);
30
+ //print_r($collection);
31
+ //exit;
32
+ $this->setCollection($collection);
33
+ return parent::_prepareCollection();
34
+ }
35
+
36
+
37
+ protected function _prepareColumns()
38
+ {
39
+ $this->addColumn('product_id', array(
40
+ 'header'=> Mage::helper('stockcontrol')->__('Product Name'),
41
+ 'width' => '80px',
42
+ 'type' => 'text',
43
+ 'index' => 'sku'
44
+
45
+ ));
46
+ $this->addColumn('sku', array(
47
+ 'header'=> Mage::helper('stockcontrol')->__('Sku'),
48
+ 'width' => '80px',
49
+ 'type' => 'text',
50
+ 'index' => 'sku'
51
+ ));
52
+
53
+ $this->addColumn('old_qty', array(
54
+ 'header' => Mage::helper('stockcontrol')->__('Old Qty'),
55
+ 'index' => 'present_qty',
56
+ 'type' => 'text',
57
+ 'width' => '100px',
58
+ 'filter_index' => 'main_table.present_qty'
59
+ ));
60
+
61
+ $this->addColumn('added_qty', array(
62
+ 'header' => Mage::helper('stockcontrol')->__('Qty(Stock In/Stock Out)'),
63
+ 'index' => 'added_qty',
64
+ 'type' => 'text',
65
+ 'width' => '100px',
66
+ ));
67
+ $this->addColumn('present_qty', array(
68
+ 'header' => Mage::helper('stockcontrol')->__('Present Qty'),
69
+ 'index' => 'total_qty',
70
+ 'type' => 'text',
71
+ 'width' => '100px',
72
+ ));
73
+ $this->addColumn('operation', array(
74
+ 'header' => Mage::helper('stockcontrol')->__('Operation'),
75
+ 'index' => 'operation',
76
+ 'type' => 'text',
77
+ 'width' => '100px',
78
+ ));
79
+ $this->addColumn('qty_added_date', array(
80
+ 'header' => Mage::helper('stockcontrol')->__('Qty(Stock In/Stock Out) Date'),
81
+ 'index' => 'qty_added_date',
82
+ 'type' => 'text',
83
+ 'width' => '100px',
84
+ ));
85
+
86
+ return $this;
87
+ }
88
+
89
+
90
+
91
+
92
+ }
app/code/local/Medma/Stockcontrol/Block/Stockcontrol.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Medma_Stockcontrol_Block_Stockcontrol extends Mage_Core_Block_Template
3
+ {
4
+ protected function _toHtml()
5
+ {
6
+ // return 'Weldone';
7
+ }
8
+
9
+ }
10
+ ?>
app/code/local/Medma/Stockcontrol/Block/Stockcontrol.php~ ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Medma_Printcodes_Block_Printcodes extends Mage_Core_Block_Template
3
+ {
4
+ protected function _toHtml()
5
+ {
6
+ // return 'Weldone';
7
+ }
8
+ public function pqr(){
9
+ return 'neelima';
10
+ }
11
+ }
12
+ ?>
app/code/local/Medma/Stockcontrol/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Stockcontrol_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Medma/Stockcontrol/Helper/Data.php~ ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Printcodes_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Medma/Stockcontrol/Model/Mysql4/Stockcontrol.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Stockcontrol_Model_Mysql4_Stockcontrol extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the florist_id refers to the key field in your database table.
8
+ $this->_init('stockcontrol/stockcontrol', 'stock_id');
9
+ }
10
+ }
app/code/local/Medma/Stockcontrol/Model/Mysql4/Stockcontrol.php~ ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Printcodes_Model_Mysql4_Printcodes extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ // Note that the florist_id refers to the key field in your database table.
8
+ $this->_init('printcodes/printcodes', 'print_code_id');
9
+ }
10
+ }
app/code/local/Medma/Stockcontrol/Model/Mysql4/Stockcontrol/Collection.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Stockcontrol_Model_Mysql4_Stockcontrol_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('stockcontrol/stockcontrol');
9
+ }
10
+ }
app/code/local/Medma/Stockcontrol/Model/Mysql4/Stockcontrol/Collection.php~ ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Printcodes_Model_Mysql4_Printcodes_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('printcodes/printcodes');
9
+ }
10
+ }
app/code/local/Medma/Stockcontrol/Model/Stockcontrol.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Stockcontrol_Model_Stockcontrol extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('stockcontrol/stockcontrol');
9
+ }
10
+ }
app/code/local/Medma/Stockcontrol/Model/Stockcontrol.php~ ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Printcodes_Model_Printcodes extends Mage_Core_Model_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('printcodes/printcodes');
9
+ }
10
+ }
app/code/local/Medma/Stockcontrol/controllers/Adminhtml/StockcontrolController.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Medma_Stockcontrol_Adminhtml_StockcontrolController extends Mage_Adminhtml_Controller_action
4
+ {
5
+ public function indexAction() {
6
+
7
+
8
+ $this->loadLayout();
9
+ $this->_setActiveMenu('catalog/stockcontrol');
10
+ //$this->_addBreadcrumb($this->__('Manage Grouped Product Discount Rule'), $this->__('Discount'));
11
+ $this->_addContent($this->getLayout()->createBlock('stockcontrol/adminhtml_stockcontrol'));
12
+ $this->renderLayout();
13
+
14
+ }
15
+
16
+ public function editAction() {
17
+ $id = $this->getRequest()->getParam('id');
18
+
19
+ $model = Mage::getModel('stockcontrol/stockcontrol')->load($id);
20
+
21
+ if ($model->getId() || $id == 0) {
22
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
23
+ if (!empty($data)) {
24
+ $model->setData($data);
25
+ }
26
+
27
+ Mage::register('stockcontrol_data', $model);
28
+ $this->loadLayout();
29
+ $this->_setActiveMenu('catalog/stockcontrol');
30
+
31
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
32
+
33
+ $this->_addContent($this->getLayout()->createBlock('stockcontrol/adminhtml_stockcontrol_edit'));
34
+
35
+ $this->renderLayout();
36
+ } else {
37
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('stockcontrol')->__('Item does not exist'));
38
+ $this->_redirect('*/*/');
39
+ }
40
+ }
41
+
42
+
43
+
44
+
45
+ public function newAction() {
46
+ $this->editAction();
47
+ }
48
+
49
+ public function saveAction() {
50
+ $id= $this->getRequest()->getParam('id');
51
+
52
+ $model= Mage::getModel('stockcontrol/stockcontrol');
53
+
54
+ if ($data = $this->getRequest()->getPost()) {
55
+ if($data['operation']=='Stock In'){
56
+ $total_qty=$data['present_qty']+$data['added_qty'];
57
+ }elseif($data['operation']=='Stock Out'){
58
+ if($data['present_qty']<='0'){
59
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('stockcontrol')->__('Quantity is less to perform Stock Out operation'));
60
+ $this->_redirect('*/*/');
61
+ return;
62
+ }else{
63
+ $total_qty=$data['present_qty']-$data['added_qty'];
64
+ }
65
+ }
66
+ $model_product= Mage::getModel('catalog/product');
67
+ $_product = $model_product->load($data['product_id']);
68
+ $stockData = $_product->getStockData();
69
+ $stockData['qty'] = $total_qty;
70
+ if($total_qty>0){
71
+ $stockData['is_in_stock'] = 1;
72
+ }else{
73
+ $stockData['is_in_stock'] = 0;
74
+ }
75
+ $_product->setStockData($stockData);
76
+ $_product->save();
77
+ $user = Mage::getSingleton('admin/session')->getData();
78
+ $userId = $user['user']['user_id'];
79
+ $data['total_qty']=$total_qty;
80
+ $data['added_by']=$userId ;
81
+ // $stocklevel = (int)Mage::getModel('cataloginventory/stock_item')
82
+ // ->loadByProduct($_product)->getQty();
83
+ // echo $stocklevel;exit;
84
+ try {
85
+
86
+ $model->setData($data)->setId($id);
87
+ $model->save();
88
+
89
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('stockcontrol')->__('Quantity Update Operation Perform successfully'));
90
+
91
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
92
+
93
+ $this->_redirect('*/*/');
94
+ return;
95
+ } catch (Exception $e) {
96
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
97
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
98
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
99
+ return;
100
+ }
101
+ }
102
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('stockcontrol')->__('Unable to find item to save'));
103
+ $this->_redirect('*/*/');
104
+ }
105
+ public function deleteAction() {
106
+ if( $this->getRequest()->getParam('id') > 0 ) {
107
+ try {
108
+ $model = Mage::getModel('stockcontrol/stockcontrol');
109
+
110
+ $model->setId($this->getRequest()->getParam('id'))
111
+ ->delete();
112
+
113
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
114
+ $this->_redirect('*/*/');
115
+ } catch (Exception $e) {
116
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
117
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
118
+ }
119
+ }
120
+ $this->_redirect('*/*/');
121
+ }
122
+ public function getPresentQtyAction(){
123
+ $product_id = $this->getRequest()->getParam('product_id');
124
+
125
+ $model = Mage::getModel('catalog/product');
126
+ $_product = $model->load($product_id);
127
+ $stocklevel = (int)Mage::getModel('cataloginventory/stock_item')
128
+ ->loadByProduct($_product)->getQty();
129
+
130
+
131
+ echo $stocklevel;
132
+ }
133
+
134
+
135
+ }
app/code/local/Medma/Stockcontrol/controllers/Adminhtml/StockcontrolController.php~ ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Futurtek_Stockcontrol_Adminhtml_StockcontrolController extends Mage_Adminhtml_Controller_action
4
+ {
5
+ public function indexAction() {
6
+
7
+
8
+ $this->loadLayout();
9
+ $this->_setActiveMenu('catalog/stockcontrol');
10
+ //$this->_addBreadcrumb($this->__('Manage Grouped Product Discount Rule'), $this->__('Discount'));
11
+ $this->_addContent($this->getLayout()->createBlock('stockcontrol/adminhtml_stockcontrol'));
12
+ $this->renderLayout();
13
+
14
+ }
15
+
16
+ public function editAction() {
17
+ $id = $this->getRequest()->getParam('id');
18
+
19
+ $model = Mage::getModel('stockcontrol/stockcontrol')->load($id);
20
+
21
+ if ($model->getId() || $id == 0) {
22
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
23
+ if (!empty($data)) {
24
+ $model->setData($data);
25
+ }
26
+
27
+ Mage::register('stockcontrol_data', $model);
28
+ $this->loadLayout();
29
+ $this->_setActiveMenu('catalog/stockcontrol');
30
+
31
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
32
+
33
+ $this->_addContent($this->getLayout()->createBlock('stockcontrol/adminhtml_stockcontrol_edit'));
34
+
35
+ $this->renderLayout();
36
+ } else {
37
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('stockcontrol')->__('Item does not exist'));
38
+ $this->_redirect('*/*/');
39
+ }
40
+ }
41
+
42
+
43
+
44
+
45
+ public function newAction() {
46
+ $this->editAction();
47
+ }
48
+
49
+ public function saveAction() {
50
+ $id= $this->getRequest()->getParam('id');
51
+
52
+ $model= Mage::getModel('stockcontrol/stockcontrol');
53
+
54
+ if ($data = $this->getRequest()->getPost()) {
55
+ if($data['operation']=='Stock In'){
56
+ $total_qty=$data['present_qty']+$data['added_qty'];
57
+ }elseif($data['operation']=='Stock Out'){
58
+ if($data['present_qty']<='0'){
59
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('stockcontrol')->__('Quantity is less to perform Stock Out operation'));
60
+ $this->_redirect('*/*/');
61
+ }else{
62
+ $total_qty=$data['present_qty']-$data['added_qty'];
63
+ }
64
+ }
65
+ $model_product= Mage::getModel('catalog/product');
66
+ $_product = $model_product->load($data['product_id']);
67
+ $stockData = $_product->getStockData();
68
+ $stockData['qty'] = $total_qty;
69
+ $_product->setStockData($stockData);
70
+ $_product->save();
71
+ $user = Mage::getSingleton('admin/session')->getData();
72
+ $userId = $user['user']['user_id'];
73
+ $data['total_qty']=$total_qty;
74
+ $data['added_by']=$userId ;
75
+ // $stocklevel = (int)Mage::getModel('cataloginventory/stock_item')
76
+ // ->loadByProduct($_product)->getQty();
77
+ // echo $stocklevel;exit;
78
+ try {
79
+
80
+ $model->setData($data)->setId($id);
81
+ $model->save();
82
+
83
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('stockcontrol')->__('Quantity Update Operation Perform successfully'));
84
+
85
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
86
+
87
+ $this->_redirect('*/*/');
88
+ return;
89
+ } catch (Exception $e) {
90
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
91
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
92
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
93
+ return;
94
+ }
95
+ }
96
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('stockcontrol')->__('Unable to find item to save'));
97
+ $this->_redirect('*/*/');
98
+ }
99
+ public function deleteAction() {
100
+ if( $this->getRequest()->getParam('id') > 0 ) {
101
+ try {
102
+ $model = Mage::getModel('stockcontrol/stockcontrol');
103
+
104
+ $model->setId($this->getRequest()->getParam('id'))
105
+ ->delete();
106
+
107
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
108
+ $this->_redirect('*/*/');
109
+ } catch (Exception $e) {
110
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
111
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
112
+ }
113
+ }
114
+ $this->_redirect('*/*/');
115
+ }
116
+ public function getPresentQtyAction(){
117
+ $product_id = $this->getRequest()->getParam('product_id');
118
+
119
+ $model = Mage::getModel('catalog/product');
120
+ $_product = $model->load($product_id);
121
+ $stocklevel = (int)Mage::getModel('cataloginventory/stock_item')
122
+ ->loadByProduct($_product)->getQty();
123
+
124
+
125
+ echo $stocklevel;
126
+ }
127
+
128
+
129
+ }
app/code/local/Medma/Stockcontrol/controllers/Adminhtml/StockcontrolController_bkp21may2012.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Futurtek_Stockcontrol_Adminhtml_StockcontrolController extends Mage_Adminhtml_Controller_action
4
+ {
5
+ public function indexAction() {
6
+
7
+
8
+ $this->loadLayout();
9
+ $this->_setActiveMenu('catalog/stockcontrol');
10
+ //$this->_addBreadcrumb($this->__('Manage Grouped Product Discount Rule'), $this->__('Discount'));
11
+ $this->_addContent($this->getLayout()->createBlock('stockcontrol/adminhtml_stockcontrol'));
12
+ $this->renderLayout();
13
+
14
+ }
15
+
16
+ public function editAction() {
17
+ $id = $this->getRequest()->getParam('id');
18
+
19
+ $model = Mage::getModel('stockcontrol/stockcontrol')->load($id);
20
+
21
+ if ($model->getId() || $id == 0) {
22
+ $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
23
+ if (!empty($data)) {
24
+ $model->setData($data);
25
+ }
26
+
27
+ Mage::register('stockcontrol_data', $model);
28
+ $this->loadLayout();
29
+ $this->_setActiveMenu('catalog/stockcontrol');
30
+
31
+ $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);
32
+
33
+ $this->_addContent($this->getLayout()->createBlock('stockcontrol/adminhtml_stockcontrol_edit'));
34
+
35
+ $this->renderLayout();
36
+ } else {
37
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('stockcontrol')->__('Item does not exist'));
38
+ $this->_redirect('*/*/');
39
+ }
40
+ }
41
+
42
+
43
+
44
+
45
+ public function newAction() {
46
+ $this->editAction();
47
+ }
48
+
49
+ public function saveAction() {
50
+ $id= $this->getRequest()->getParam('id');
51
+
52
+ $model= Mage::getModel('stockcontrol/stockcontrol');
53
+
54
+ if ($data = $this->getRequest()->getPost()) {
55
+ $total_qty=$data['present_qty']+$data['added_qty'];
56
+ $model_product= Mage::getModel('catalog/product');
57
+ $_product = $model_product->load($data['product_id']);
58
+ $stockData = $_product->getStockData();
59
+ $stockData['qty'] = $total_qty;
60
+ $_product->setStockData($stockData);
61
+ $_product->save();
62
+ $user = Mage::getSingleton('admin/session')->getData();
63
+ $userId = $user['user']['user_id'];
64
+ $data['total_qty']=$total_qty;
65
+ $data['added_by']=$userId ;
66
+ // $stocklevel = (int)Mage::getModel('cataloginventory/stock_item')
67
+ // ->loadByProduct($_product)->getQty();
68
+ // echo $stocklevel;exit;
69
+ try {
70
+
71
+ $model->setData($data)->setId($id);
72
+ $model->save();
73
+
74
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('stockcontrol')->__('Item added successfully'));
75
+
76
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
77
+
78
+ $this->_redirect('*/*/');
79
+ return;
80
+ } catch (Exception $e) {
81
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
82
+ Mage::getSingleton('adminhtml/session')->setFormData($data);
83
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
84
+ return;
85
+ }
86
+ }
87
+ Mage::getSingleton('adminhtml/session')->addError(Mage::helper('stockcontrol')->__('Unable to find item to save'));
88
+ $this->_redirect('*/*/');
89
+ }
90
+ public function deleteAction() {
91
+ if( $this->getRequest()->getParam('id') > 0 ) {
92
+ try {
93
+ $model = Mage::getModel('stockcontrol/stockcontrol');
94
+
95
+ $model->setId($this->getRequest()->getParam('id'))
96
+ ->delete();
97
+
98
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));
99
+ $this->_redirect('*/*/');
100
+ } catch (Exception $e) {
101
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
102
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
103
+ }
104
+ }
105
+ $this->_redirect('*/*/');
106
+ }
107
+ public function getPresentQtyAction(){
108
+ $product_id = $this->getRequest()->getParam('product_id');
109
+
110
+ $model = Mage::getModel('catalog/product');
111
+ $_product = $model->load($product_id);
112
+ $stocklevel = (int)Mage::getModel('cataloginventory/stock_item')
113
+ ->loadByProduct($_product)->getQty();
114
+
115
+
116
+ echo $stocklevel;
117
+ }
118
+
119
+
120
+ }
app/code/local/Medma/Stockcontrol/etc/config.xml ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Medma_Stockcontrol>
5
+ <version>0.1.0</version>
6
+ </Medma_Stockcontrol>
7
+ </modules>
8
+ <admin>
9
+ <routers>
10
+ <stockcontrol>
11
+ <use>admin</use>
12
+ <args>
13
+ <module>Medma_Stockcontrol</module>
14
+ <frontName>stockcontrol</frontName>
15
+ </args>
16
+ </stockcontrol>
17
+ </routers>
18
+ </admin>
19
+
20
+ <adminhtml>
21
+ <menu>
22
+ <catalog>
23
+ <children>
24
+ <stockcontrol translate="title" module="stockcontrol">
25
+ <title>Stock Control</title>
26
+ <sort_order>5</sort_order>
27
+ <action>stockcontrol/adminhtml_stockcontrol</action>
28
+ </stockcontrol>
29
+ </children>
30
+ </catalog>
31
+ </menu>
32
+
33
+ <acl>
34
+ <resources>
35
+ <admin>
36
+ <children>
37
+ <catalog>
38
+ <children>
39
+ <stockcontrol translate="title">
40
+ <title>Stock Control</title>
41
+ <sort_order>1600</sort_order>
42
+ </stockcontrol>
43
+ </children>
44
+ </catalog>
45
+ </children>
46
+ </admin>
47
+ </resources>
48
+ </acl>
49
+ </adminhtml>
50
+
51
+ <global>
52
+ <models>
53
+ <stockcontrol>
54
+ <class>Medma_Stockcontrol_Model</class>
55
+ <resourceModel>stockcontrol_mysql4</resourceModel>
56
+ </stockcontrol>
57
+
58
+ <stockcontrol_mysql4>
59
+ <class>Medma_Stockcontrol_Model_Mysql4</class>
60
+ <entities>
61
+ <stockcontrol>
62
+ <table>stockcontrol</table>
63
+ </stockcontrol>
64
+ </entities>
65
+ </stockcontrol_mysql4>
66
+
67
+ </models>
68
+ <resources>
69
+ <stockcontrol_write>
70
+ <connection>
71
+ <use>core_write</use>
72
+ </connection>
73
+ </stockcontrol_write>
74
+ <stockcontrol_read>
75
+ <connection>
76
+ <use>core_read</use>
77
+ </connection>
78
+ </stockcontrol_read>
79
+ </resources>
80
+ <blocks>
81
+ <stockcontrol>
82
+ <class>Medma_Stockcontrol_Block</class>
83
+ </stockcontrol>
84
+ </blocks>
85
+ <helpers>
86
+ <stockcontrol>
87
+ <class>Medma_Stockcontrol_Helper</class>
88
+ </stockcontrol>
89
+ </helpers>
90
+ </global>
91
+
92
+ </config>
app/code/local/Medma/Stockcontrol/etc/config.xml~ ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Futurtek_Stockcontrol>
5
+ <version>0.1.0</version>
6
+ </Futurtek_Stockcontrol>
7
+ </modules>
8
+ <admin>
9
+ <routers>
10
+ <stockcontrol>
11
+ <use>admin</use>
12
+ <args>
13
+ <module>Futurtek_Stockcontrol</module>
14
+ <frontName>stockcontrol</frontName>
15
+ </args>
16
+ </stockcontrol>
17
+ </routers>
18
+ </admin>
19
+
20
+ <adminhtml>
21
+ <menu>
22
+ <catalog>
23
+ <children>
24
+ <stockcontrol translate="title" module="stockcontrol">
25
+ <title>Stock Control</title>
26
+ <sort_order>5</sort_order>
27
+ <action>stockcontrol/adminhtml_stockcontrol</action>
28
+ </stockcontrol>
29
+ </children>
30
+ </catalog>
31
+ </menu>
32
+
33
+ <acl>
34
+ <resources>
35
+ <admin>
36
+ <children>
37
+ <catalog>
38
+ <children>
39
+ <stockcontrol translate="title">
40
+ <title>Stock Control</title>
41
+ <sort_order>1600</sort_order>
42
+ </stockcontrol>
43
+ </children>
44
+ </catalog>
45
+ </children>
46
+ </admin>
47
+ </resources>
48
+ </acl>
49
+ </adminhtml>
50
+
51
+ <global>
52
+ <resources>
53
+ <stockcontrol_write>
54
+ <connection>
55
+ <use>core_write</use>
56
+ </connection>
57
+ </stockcontrol_write>
58
+ <stockcontrol_read>
59
+ <connection>
60
+ <use>core_read</use>
61
+ </connection>
62
+ </stockcontrol_read>
63
+ </resources>
64
+ <blocks>
65
+ <stockcontrol>
66
+ <class>Futurtek_Stockcontrol_Block</class>
67
+ </stockcontrol>
68
+ </blocks>
69
+ <helpers>
70
+ <stockcontrol>
71
+ <class>Futurtek_Stockcontrol_Helper</class>
72
+ </stockcontrol>
73
+ </helpers>
74
+ </global>
75
+
76
+ </config>
app/code/local/Medma/Stockcontrol/sql/stockcontrol_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+
10
+ CREATE TABLE IF NOT EXISTS `stockcontrol` (
11
+ `stock_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
12
+ `product_id` int(11) unsigned NOT NULL,
13
+ `present_qty` varchar(255) NOT NULL DEFAULT '',
14
+ `added_qty` varchar(255) NOT NULL DEFAULT '',
15
+ `total_qty` varchar(255) NOT NULL,
16
+ `qty_added_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
17
+ `added_by` varchar(255) NOT NULL,
18
+ PRIMARY KEY (`stock_id`)
19
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
20
+
21
+ ");
22
+
23
+ $installer->endSetup();
app/code/local/Medma/Stockcontrol/sql/stockcontrol_setup/mysql4-install-0.1.0.php~ ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ $installer->run("
8
+
9
+
10
+ CREATE TABLE stockcontrol(
11
+ `stock_id` int(11) unsigned NOT NULL auto_increment,
12
+ `product_id` int(11) unsigned NOT NULL,
13
+ `present_qty` varchar(255) NOT NULL default '',
14
+ `added_qty` varchar(255) NOT NULL default '',
15
+ `qty_added_date` varchar(255) NOT NULL default '',
16
+ PRIMARY KEY (`stock_id`)
17
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18
+
19
+ ");
20
+
21
+ $installer->endSetup();
app/etc/modules/Medma_Stockcontrol.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Medma_Stockcontrol>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Medma_Stockcontrol>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Medma_Stock_Control</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSLv3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>This module is used to control stock in magento.By this module you have complete knowledge of the user update stock&#xD;
10
+ </summary>
11
+ <description>Stock Control module is used to manage Inventory&#xD;
12
+ in Magento in better way as have following advantages&#xD;
13
+ 1):We have complete information of who updated the quantity on which day and time&#xD;
14
+ 2):If we want our user to manage only inventory then we create role and do it easily</description>
15
+ <notes>First Preview Release</notes>
16
+ <authors><author><name>Medma Infomatix</name><user>Medma_Infomatix</user><email>gaurav@medma.in</email></author></authors>
17
+ <date>2012-10-01</date>
18
+ <time>05:56:54</time>
19
+ <contents><target name="magelocal"><dir name="Medma"><dir name="Stockcontrol"><dir name="Block"><dir name="Adminhtml"><dir name="Stockcontrol"><dir name="Edit"><file name="Form.php" hash="04527132fde312cd20402a33af859004"/><file name="Form.php~" hash="f66ffd3af0973498fe9cb90929365ccf"/><dir name="Tab"><file name="Form.php" hash="dfd11760871042496386ae18c5ae9bff"/><file name="Form.php~" hash="baa38642837860829ae4330426ae88bb"/></dir><file name="Tabs.php" hash="da26b4d3c6030d4c8ea46e3bfef42c07"/></dir><file name="Edit.php" hash="055da82654c680b506483a2b26dd0271"/><file name="Edit.php~" hash="a981188db908e39535459396818c27dc"/><file name="Grid.php" hash="ee7127ec1e25ae918eaf522add17f3bd"/><file name="Grid.php~" hash="c705e16351733e3c42feee637cc490ea"/></dir><file name="Stockcontrol.php" hash="26905c050ba2f9d49c521e676015acdc"/><file name="Stockcontrol.php~" hash="9db80488257bd92314be28ce7f3f8ece"/></dir><file name="Stockcontrol.php" hash="b27ea72a7b1a39c152c35dd40cb92666"/><file name="Stockcontrol.php~" hash="6843b73e90c114bf2de8545958c93947"/></dir><dir name="Helper"><file name="Data.php" hash="cd53ffe2d92f8ef59aef9ae6fc5f0e32"/><file name="Data.php~" hash="8ea6f23e9f926e8bafa179ab916057cf"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Stockcontrol"><file name="Collection.php" hash="c3514b030650f22f78b57c106c4ab0e5"/><file name="Collection.php~" hash="94baeb8e35cfe94c8e26a776c6974f33"/></dir><file name="Stockcontrol.php" hash="5c92de9f6d97358416e45bd10b8da1c1"/><file name="Stockcontrol.php~" hash="92cb8352ecd2d8726c0f892f2d3c2377"/></dir><file name="Stockcontrol.php" hash="abaa8b60c5557b28812e096bacd9f832"/><file name="Stockcontrol.php~" hash="b9dd52b6f70e8f54d5603307a60b19cb"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="StockcontrolController.php" hash="38300680f568beeac57c34c965199710"/><file name="StockcontrolController.php~" hash="57ad64f6135f393e79f975b70ce3c6e0"/><file name="StockcontrolController_bkp21may2012.php" hash="55d9b368b15ae9b9161ed244fadaf093"/></dir></dir><dir name="etc"><file name="config.xml" hash="e253fa10b436a1a46f733c9f76d50c24"/><file name="config.xml~" hash="49d71eda2e2282fda94041009e89d212"/></dir><dir name="sql"><dir name="stockcontrol_setup"><file name="mysql4-install-0.1.0.php" hash="89dc60ea7d377d6b63306978f3e8c581"/><file name="mysql4-install-0.1.0.php~" hash="a5664fd08d056a847252df46a2162557"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Medma_Stockcontrol.xml" hash="5661fa743ccc78a1af4f0679d6685c29"/></dir></target></contents>
20
+ <compatible/>
21
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
22
+ </package>