The code you wrote in the file default.php in moduleds/mod_dms_documents/tmpl/default.php is correct. However, you need to modify one more file modules/mod_dms_documents/helper.php to get price of document from database.
In this case :
1. Keep the modification you made before .
2. Get the file below, unzip it and upload to modules/mod_dms_documents folder.
After that it should work as expected .
Regards,
Tuan
Attachment helper-20120323.zip not found