Not sure if you can achieve what you want without extending magento basic functionality. I had to do something similar and this is what I did:
First I rewrote sales_order_creditmemo_totals for automatic creditmemos (maybe you dont need this, so you can go to the second part):
In my module config.xml:
<blocks>
<adminhtml>
<rewrite>
...
<sales_order_creditmemo_totals>Bla_Customercredit_Block_Adminhtml_Sales_Creditmemo</sales_order_creditmemo_totals>
</rewrite>
</adminhtml>
<sales>
<rewrite>
...
<order_creditmemo_totals>Bla_Customercredit_Block_Sales_Creditmemo</order_creditmemo_totals>
</rewrite>
</sales>
</blocks>
Then in Block/Adminhtml/Sales/Creditmemo.php
class Bla_Customercredit_Block_Adminhtml_Sales_Creditmemo extends Mage_Sales_Block_Order_Creditmemo_Totals
{
protected $_code = 'credit';
protected function _initTotals()
{
$helper = $this->getCreditsHelper();
parent::_initTotals();
$baseAmount = $this->getOrder()->getBaseCustomerCredit();
$this->addTotal(
new Varien_Object(
array(
'code' => $this->_code,
'value' => -$creditAmount,
'base_value' => -$baseAmount,
'label' => $helper->__('Bla Credit'),
)
),
'discount'
);
return $this;
}
}
As you can see I did this to create creditmemos for orders with customer credit, so I also rewrote sales_order_totals and sales_order_invoice_totals but I think you dont need to do this.
Second:
I also added a my own template to add some functionality during the manual creditmemo cretion, so the admin could decide how
to generate it. For that I created an items.phtml under app/design/adminhtml/default/default/template/MODULE_NAME/order/creditmemo/create/items.phtml, in this phtml I added some input fields to change the efault values. I also added in my module in an admin controller under Company_CustomerCredit_Adminhtml_CustomerController
require_once 'Mage/Adminhtml/controllers/CustomerController.php';
class Bla_Customercredit_Adminhtml_CustomerController extends Mage_Adminhtml_CustomerController
{
/**
* Overload to save customer credits, then call
* parent::saveAction()
*/
public function saveAction()
{
$data = $this->getRequest()->getPost();
if($data && $data['bla_credits'])
{
if(!empty($data['bla_credits']['id']))
{
$model = Mage::getModel('credits/credits')->load($data['bla_credits']['id']);
}
else
{
unset($data['bla_credits']['id']);
$model = Mage::getModel('credits/credits');
}
try
{
$model->setData($data['bla_credits']);
$model->save();
}
catch(Exception $e)
{
}
}
parent::saveAction();
}
}