backups/.htaccess | 1
config/.htaccess | 1
config/accounts/index.html | 10
config/accounts/sample.ini | 7
config/accounts/test.ini | 7
config/settings/general.ini | 3
system/application/assets/css/admin-style.css | 57 +---
system/application/assets/css/custom.css | 87 ++++--
system/application/assets/css/printreport.css | 145 ++++++++++
system/application/assets/css/printvoucher.css | 61 ++++
system/application/assets/css/style.css | 56 +---
system/application/assets/css/tables.css | 65 ----
system/application/assets/images/icons/download.png |binary
system/application/assets/images/icons/rss.png |binary
system/application/config/accounts/sample.ini | 7
system/application/config/accounts/test.ini | 7
system/application/config/config.php | 22 +
system/application/config/general.ini | 3
system/application/controllers/account.php | 4
system/application/controllers/admin/active.php | 22 -
system/application/controllers/admin/carryforward.sql | 2
system/application/controllers/admin/create.php | 28 +-
system/application/controllers/admin/database.sql | 2
system/application/controllers/admin/gensetting.php | 90 ------
system/application/controllers/admin/manage.php | 32 +-
system/application/controllers/admin/setting.php | 90 ++++++
system/application/controllers/admin/welcome.php | 90 +++++-
system/application/controllers/group.php | 28 +-
system/application/controllers/ledger.php | 26 -
system/application/controllers/log.php | 45 +++
system/application/controllers/report.php | 71 ++++-
system/application/controllers/setting.php | 198 +++++++++++---
system/application/controllers/tag.php | 32 +-
system/application/controllers/voucher.php | 252 ++++++++++--------
system/application/helpers/MY_form_helper.php | 10
system/application/helpers/custom_helper.php | 65 ++++
system/application/libraries/Accountlist.php | 49 ---
system/application/libraries/Logger.php | 2
system/application/libraries/MY_Form_validation.php | 22 +
system/application/libraries/Startup.php | 8
system/application/views/admin/create.php | 2
system/application/views/admin/gensetting.php | 17 -
system/application/views/admin/manage/index.php | 2
system/application/views/admin/setting.php | 17 +
system/application/views/admin/welcome.php | 2
system/application/views/admin_template.php | 4
system/application/views/log/index.php | 16 +
system/application/views/report/balancesheet.php | 14 -
system/application/views/report/ledgerst.php | 130 ++++-----
system/application/views/report/profitandloss.php | 24 -
system/application/views/report/report_template.php | 28 ++
system/application/views/report/trialbalance.php | 14 -
system/application/views/rss.php | 31 ++
system/application/views/setting/cf.php | 2
system/application/views/setting/index.php | 10
system/application/views/setting/voucher.php | 41 ++
system/application/views/sidebar/tag.php | 4
system/application/views/template.php | 14 -
system/application/views/voucher/add.php | 12
system/application/views/voucher/downloadpreview.php | 105 +++++++
system/application/views/voucher/edit.php | 12
system/application/views/voucher/emailpreview.php | 46 +++
system/application/views/voucher/printpreview.php | 54 +++
system/application/views/voucher/view.php | 6
system/application/views/welcome_message.php | 37 +-
system/codeigniter/CodeIgniter.php | 2
system/libraries/Router.php | 4
user_guide/changelog.html | 9
user_guide/database/active_record.html | 2
user_guide/database/caching.html | 2
user_guide/database/call_function.html | 2
user_guide/database/configuration.html | 2
user_guide/database/connecting.html | 2
user_guide/database/examples.html | 2
user_guide/database/fields.html | 2
user_guide/database/forge.html | 2
user_guide/database/helpers.html | 2
user_guide/database/index.html | 2
user_guide/database/queries.html | 2
user_guide/database/results.html | 2
user_guide/database/table_data.html | 2
user_guide/database/transactions.html | 2
user_guide/database/utilities.html | 2
user_guide/doc_style/index.html | 2
user_guide/general/alternative_php.html | 2
user_guide/general/ancillary_classes.html | 2
user_guide/general/autoloader.html | 2
user_guide/general/caching.html | 2
user_guide/general/common_functions.html | 2
user_guide/general/controllers.html | 2
user_guide/general/core_classes.html | 2
user_guide/general/creating_libraries.html | 2
user_guide/general/credits.html | 2
user_guide/general/errors.html | 2
user_guide/general/helpers.html | 2
user_guide/general/hooks.html | 2
user_guide/general/libraries.html | 2
user_guide/general/managing_apps.html | 2
user_guide/general/models.html | 2
user_guide/general/plugins.html | 2
user_guide/general/profiling.html | 2
user_guide/general/quick_reference.html | 2
user_guide/general/requirements.html | 2
user_guide/general/reserved_names.html | 2
user_guide/general/routing.html | 2
user_guide/general/scaffolding.html | 2
user_guide/general/security.html | 2
user_guide/general/styleguide.html | 2
user_guide/general/urls.html | 2
user_guide/general/views.html | 2
user_guide/helpers/array_helper.html | 2
user_guide/helpers/compatibility_helper.html | 2
user_guide/helpers/cookie_helper.html | 2
user_guide/helpers/date_helper.html | 2
user_guide/helpers/directory_helper.html | 2
user_guide/helpers/download_helper.html | 2
user_guide/helpers/email_helper.html | 2
user_guide/helpers/file_helper.html | 2
user_guide/helpers/form_helper.html | 2
user_guide/helpers/html_helper.html | 2
user_guide/helpers/inflector_helper.html | 2
user_guide/helpers/language_helper.html | 2
user_guide/helpers/number_helper.html | 2
user_guide/helpers/path_helper.html | 2
user_guide/helpers/security_helper.html | 2
user_guide/helpers/smiley_helper.html | 2
user_guide/helpers/string_helper.html | 2
user_guide/helpers/text_helper.html | 2
user_guide/helpers/typography_helper.html | 2
user_guide/helpers/url_helper.html | 2
user_guide/helpers/xml_helper.html | 2
user_guide/images/nav_bg.jpg |binary
user_guide/images/nav_separator.jpg |binary
user_guide/images/nav_toggle.jpg |binary
user_guide/index.html | 2
user_guide/installation/downloads.html | 5
user_guide/installation/index.html | 2
user_guide/installation/troubleshooting.html | 2
user_guide/installation/upgrade_120.html | 2
user_guide/installation/upgrade_130.html | 2
user_guide/installation/upgrade_131.html | 2
user_guide/installation/upgrade_132.html | 2
user_guide/installation/upgrade_133.html | 2
user_guide/installation/upgrade_140.html | 2
user_guide/installation/upgrade_141.html | 2
user_guide/installation/upgrade_150.html | 2
user_guide/installation/upgrade_152.html | 2
user_guide/installation/upgrade_153.html | 2
user_guide/installation/upgrade_154.html | 2
user_guide/installation/upgrade_160.html | 2
user_guide/installation/upgrade_161.html | 2
user_guide/installation/upgrade_162.html | 2
user_guide/installation/upgrade_163.html | 2
user_guide/installation/upgrade_170.html | 2
user_guide/installation/upgrade_171.html | 2
user_guide/installation/upgrade_172.html | 2
user_guide/installation/upgrade_173.html | 98 +++++++
user_guide/installation/upgrade_b11.html | 2
user_guide/installation/upgrading.html | 3
user_guide/libraries/benchmark.html | 2
user_guide/libraries/calendar.html | 2
user_guide/libraries/config.html | 2
user_guide/libraries/email.html | 2
user_guide/libraries/encryption.html | 2
user_guide/libraries/file_uploading.html | 2
user_guide/libraries/form_validation.html | 2
user_guide/libraries/ftp.html | 2
user_guide/libraries/image_lib.html | 2
user_guide/libraries/input.html | 2
user_guide/libraries/language.html | 2
user_guide/libraries/loader.html | 2
user_guide/libraries/output.html | 2
user_guide/libraries/pagination.html | 2
user_guide/libraries/parser.html | 2
user_guide/libraries/sessions.html | 2
user_guide/libraries/table.html | 2
user_guide/libraries/trackback.html | 2
user_guide/libraries/typography.html | 2
user_guide/libraries/unit_testing.html | 2
user_guide/libraries/uri.html | 2
user_guide/libraries/user_agent.html | 2
user_guide/libraries/validation.html | 2
user_guide/libraries/xmlrpc.html | 2
user_guide/libraries/zip.html | 2
user_guide/license.html | 2
user_guide/overview/appflow.html | 2
user_guide/overview/at_a_glance.html | 2
user_guide/overview/cheatsheets.html | 2
user_guide/overview/features.html | 2
user_guide/overview/getting_started.html | 2
user_guide/overview/goals.html | 2
user_guide/overview/index.html | 2
user_guide/overview/mvc.html | 2
user_guide/toc.html | 2
194 files changed, 1851 insertions(+), 861 deletions(-)
New commits:
commit d7c7128381a1bfaf24794244376db614e70f349a
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Mon Dec 20 15:04:31 2010 +0530
Updated to CodeIgniter PHP Framework version 1.7.3
Website :
codeigniter.com
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php
index 5d5bb14..87f7abc 100644
--- a/system/codeigniter/CodeIgniter.php
+++ b/system/codeigniter/CodeIgniter.php
@@ -28,7 +28,7 @@
*/
// CI Version
-define('CI_VERSION', '1.7.2');
+define('CI_VERSION', '1.7.3');
/*
* ------------------------------------------------------
diff --git a/system/libraries/Router.php b/system/libraries/Router.php
index 20e6972..7dbad03 100644
--- a/system/libraries/Router.php
+++ b/system/libraries/Router.php
@@ -307,7 +307,7 @@ class CI_Router {
*/
function set_class($class)
{
- $this->class = $class;
+ $this->class = str_replace(array('/', '.'), '', $class);
}
// --------------------------------------------------------------------
@@ -366,7 +366,7 @@ class CI_Router {
*/
function set_directory($dir)
{
- $this->directory = $dir.'/';
+ $this->directory = str_replace(array('/', '.'), '',
$dir).'/';
}
// --------------------------------------------------------------------
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index ef999cc..9c62241 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="./toc.html">Table of
Contents Page</a></td>
</tr>
</table>
@@ -58,8 +58,11 @@ Change Log
<h1>Change Log</h1>
<h2>Version 1.7.3</h2>
-<p>Release Date: not yet released<br />
-SVN Revision: </p>
+<p>Release Date: December 06, 2010</p>
+
+<p>Version 1.7.3 is a security maintenance release, including a previously patched
file Upload class, and a new security fix to prevent possible directory
+ traversal in certain circumstances. There are no other significant changes.</p>
+
<h2>Version 1.7.2</h2>
<p>Release Date: September 11, 2009<br />
diff --git a/user_guide/database/active_record.html
b/user_guide/database/active_record.html
index 060262c..1ff709f 100644
--- a/user_guide/database/active_record.html
+++ b/user_guide/database/active_record.html
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/caching.html b/user_guide/database/caching.html
index b550a89..0b0b9f5 100644
--- a/user_guide/database/caching.html
+++ b/user_guide/database/caching.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/call_function.html
b/user_guide/database/call_function.html
index 19c1dd4..5f072dd 100644
--- a/user_guide/database/call_function.html
+++ b/user_guide/database/call_function.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/configuration.html
b/user_guide/database/configuration.html
index dcced6c..6739756 100644
--- a/user_guide/database/configuration.html
+++ b/user_guide/database/configuration.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/connecting.html b/user_guide/database/connecting.html
index fb76628..9352b0a 100644
--- a/user_guide/database/connecting.html
+++ b/user_guide/database/connecting.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/examples.html b/user_guide/database/examples.html
index d20b77d..ef0e92b 100644
--- a/user_guide/database/examples.html
+++ b/user_guide/database/examples.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/fields.html b/user_guide/database/fields.html
index 5cc2441..af03a44 100644
--- a/user_guide/database/fields.html
+++ b/user_guide/database/fields.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html
index d02046a..f9d1fae 100644
--- a/user_guide/database/forge.html
+++ b/user_guide/database/forge.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html
index 0d38d8f..c650ff0 100644
--- a/user_guide/database/helpers.html
+++ b/user_guide/database/helpers.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/index.html b/user_guide/database/index.html
index 46b299f..d746189 100644
--- a/user_guide/database/index.html
+++ b/user_guide/database/index.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/queries.html b/user_guide/database/queries.html
index f51ee07..ece7011 100644
--- a/user_guide/database/queries.html
+++ b/user_guide/database/queries.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/results.html b/user_guide/database/results.html
index f944a64..3b782a4 100644
--- a/user_guide/database/results.html
+++ b/user_guide/database/results.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/table_data.html b/user_guide/database/table_data.html
index 2bc75c2..224b962 100644
--- a/user_guide/database/table_data.html
+++ b/user_guide/database/table_data.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/transactions.html
b/user_guide/database/transactions.html
index 94022f6..d92f269 100644
--- a/user_guide/database/transactions.html
+++ b/user_guide/database/transactions.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/database/utilities.html b/user_guide/database/utilities.html
index a26e0f3..0416a07 100644
--- a/user_guide/database/utilities.html
+++ b/user_guide/database/utilities.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/doc_style/index.html b/user_guide/doc_style/index.html
index 7021b9d..5ced4f8 100644
--- a/user_guide/doc_style/index.html
+++ b/user_guide/doc_style/index.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/alternative_php.html
b/user_guide/general/alternative_php.html
index fc9653d..e1b6257 100644
--- a/user_guide/general/alternative_php.html
+++ b/user_guide/general/alternative_php.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/ancillary_classes.html
b/user_guide/general/ancillary_classes.html
index 30aa0a6..c6d5ec6 100644
--- a/user_guide/general/ancillary_classes.html
+++ b/user_guide/general/ancillary_classes.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/autoloader.html b/user_guide/general/autoloader.html
index ba87c77..93f2a60 100644
--- a/user_guide/general/autoloader.html
+++ b/user_guide/general/autoloader.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/caching.html b/user_guide/general/caching.html
index 64dbab8..a452024 100644
--- a/user_guide/general/caching.html
+++ b/user_guide/general/caching.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/common_functions.html
b/user_guide/general/common_functions.html
index 696815e..51c9c19 100644
--- a/user_guide/general/common_functions.html
+++ b/user_guide/general/common_functions.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/controllers.html b/user_guide/general/controllers.html
index 3eda8c4..dd780e5 100644
--- a/user_guide/general/controllers.html
+++ b/user_guide/general/controllers.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/core_classes.html b/user_guide/general/core_classes.html
index 1f95173..b10ed4a 100644
--- a/user_guide/general/core_classes.html
+++ b/user_guide/general/core_classes.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/creating_libraries.html
b/user_guide/general/creating_libraries.html
index aaecbdc..87289c1 100644
--- a/user_guide/general/creating_libraries.html
+++ b/user_guide/general/creating_libraries.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/credits.html b/user_guide/general/credits.html
index d0597bc..8ee3a9c 100644
--- a/user_guide/general/credits.html
+++ b/user_guide/general/credits.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/errors.html b/user_guide/general/errors.html
index cf50319..bf2055f 100644
--- a/user_guide/general/errors.html
+++ b/user_guide/general/errors.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/helpers.html b/user_guide/general/helpers.html
index 80a06c8..10e5525 100644
--- a/user_guide/general/helpers.html
+++ b/user_guide/general/helpers.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/hooks.html b/user_guide/general/hooks.html
index eb0d99a..ef54a63 100644
--- a/user_guide/general/hooks.html
+++ b/user_guide/general/hooks.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/libraries.html b/user_guide/general/libraries.html
index aec9f12..ab126cd 100644
--- a/user_guide/general/libraries.html
+++ b/user_guide/general/libraries.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/managing_apps.html
b/user_guide/general/managing_apps.html
index 195480c..cc51632 100644
--- a/user_guide/general/managing_apps.html
+++ b/user_guide/general/managing_apps.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/models.html b/user_guide/general/models.html
index 878934b..231fccc 100644
--- a/user_guide/general/models.html
+++ b/user_guide/general/models.html
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/plugins.html b/user_guide/general/plugins.html
index 58ae22e..3e95d52 100644
--- a/user_guide/general/plugins.html
+++ b/user_guide/general/plugins.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html
index f0c550b..12c2728 100644
--- a/user_guide/general/profiling.html
+++ b/user_guide/general/profiling.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/quick_reference.html
b/user_guide/general/quick_reference.html
index 74ea0a7..fc640de 100644
--- a/user_guide/general/quick_reference.html
+++ b/user_guide/general/quick_reference.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/requirements.html b/user_guide/general/requirements.html
index fab9d6f..f0e9d73 100644
--- a/user_guide/general/requirements.html
+++ b/user_guide/general/requirements.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/reserved_names.html
b/user_guide/general/reserved_names.html
index 2d637e8..d3c7770 100644
--- a/user_guide/general/reserved_names.html
+++ b/user_guide/general/reserved_names.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/routing.html b/user_guide/general/routing.html
index ab79c92..705632a 100644
--- a/user_guide/general/routing.html
+++ b/user_guide/general/routing.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/scaffolding.html b/user_guide/general/scaffolding.html
index 8597b6c..c1a0582 100644
--- a/user_guide/general/scaffolding.html
+++ b/user_guide/general/scaffolding.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/security.html b/user_guide/general/security.html
index 40ec5e2..b9da14c 100644
--- a/user_guide/general/security.html
+++ b/user_guide/general/security.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/styleguide.html b/user_guide/general/styleguide.html
index 94fd46f..04b2e04 100644
--- a/user_guide/general/styleguide.html
+++ b/user_guide/general/styleguide.html
@@ -34,7 +34,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/urls.html b/user_guide/general/urls.html
index 6a61c34..54a4224 100644
--- a/user_guide/general/urls.html
+++ b/user_guide/general/urls.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/general/views.html b/user_guide/general/views.html
index 3ad9699..6e758a4 100644
--- a/user_guide/general/views.html
+++ b/user_guide/general/views.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/array_helper.html b/user_guide/helpers/array_helper.html
index f098640..3190fb7 100644
--- a/user_guide/helpers/array_helper.html
+++ b/user_guide/helpers/array_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/compatibility_helper.html
b/user_guide/helpers/compatibility_helper.html
index 15712eb..9295812 100644
--- a/user_guide/helpers/compatibility_helper.html
+++ b/user_guide/helpers/compatibility_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/cookie_helper.html
b/user_guide/helpers/cookie_helper.html
index 7b1a171..a9859a3 100644
--- a/user_guide/helpers/cookie_helper.html
+++ b/user_guide/helpers/cookie_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/date_helper.html b/user_guide/helpers/date_helper.html
index 2ec17fb..96ea149 100644
--- a/user_guide/helpers/date_helper.html
+++ b/user_guide/helpers/date_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/directory_helper.html
b/user_guide/helpers/directory_helper.html
index eae2c52..36a682c 100644
--- a/user_guide/helpers/directory_helper.html
+++ b/user_guide/helpers/directory_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/download_helper.html
b/user_guide/helpers/download_helper.html
index 5c1c267..89334d1 100644
--- a/user_guide/helpers/download_helper.html
+++ b/user_guide/helpers/download_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/email_helper.html b/user_guide/helpers/email_helper.html
index 01579f8..3fe72df 100644
--- a/user_guide/helpers/email_helper.html
+++ b/user_guide/helpers/email_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/file_helper.html b/user_guide/helpers/file_helper.html
index 92f3ff3..933098c 100644
--- a/user_guide/helpers/file_helper.html
+++ b/user_guide/helpers/file_helper.html
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/form_helper.html b/user_guide/helpers/form_helper.html
index b9b11ac..5d19934 100644
--- a/user_guide/helpers/form_helper.html
+++ b/user_guide/helpers/form_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html
index a6920ee..d557a56 100644
--- a/user_guide/helpers/html_helper.html
+++ b/user_guide/helpers/html_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/inflector_helper.html
b/user_guide/helpers/inflector_helper.html
index ba25e07..6945d36 100644
--- a/user_guide/helpers/inflector_helper.html
+++ b/user_guide/helpers/inflector_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/language_helper.html
b/user_guide/helpers/language_helper.html
index e21a605..8ff9ad0 100644
--- a/user_guide/helpers/language_helper.html
+++ b/user_guide/helpers/language_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/number_helper.html
b/user_guide/helpers/number_helper.html
index 722b7f6..b18b5ea 100644
--- a/user_guide/helpers/number_helper.html
+++ b/user_guide/helpers/number_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/path_helper.html b/user_guide/helpers/path_helper.html
index 232c1b6..e987dcc 100644
--- a/user_guide/helpers/path_helper.html
+++ b/user_guide/helpers/path_helper.html
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/security_helper.html
b/user_guide/helpers/security_helper.html
index ec7eda4..a8e87fc 100644
--- a/user_guide/helpers/security_helper.html
+++ b/user_guide/helpers/security_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/smiley_helper.html
b/user_guide/helpers/smiley_helper.html
index 5bc58a3..bfd806f 100644
--- a/user_guide/helpers/smiley_helper.html
+++ b/user_guide/helpers/smiley_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/string_helper.html
b/user_guide/helpers/string_helper.html
index 36fa40f..68fc4cc 100644
--- a/user_guide/helpers/string_helper.html
+++ b/user_guide/helpers/string_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/text_helper.html b/user_guide/helpers/text_helper.html
index 120b380..0b54adb 100644
--- a/user_guide/helpers/text_helper.html
+++ b/user_guide/helpers/text_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/typography_helper.html
b/user_guide/helpers/typography_helper.html
index 046da42..8cbc533 100644
--- a/user_guide/helpers/typography_helper.html
+++ b/user_guide/helpers/typography_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/url_helper.html b/user_guide/helpers/url_helper.html
index 09f89df..af53abb 100644
--- a/user_guide/helpers/url_helper.html
+++ b/user_guide/helpers/url_helper.html
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/helpers/xml_helper.html b/user_guide/helpers/xml_helper.html
index 495b80b..e8e495a 100644
--- a/user_guide/helpers/xml_helper.html
+++ b/user_guide/helpers/xml_helper.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/images/nav_bg.jpg b/user_guide/images/nav_bg.jpg
new file mode 100644
index 0000000..440e04d
Binary files /dev/null and b/user_guide/images/nav_bg.jpg differ
diff --git a/user_guide/images/nav_separator.jpg b/user_guide/images/nav_separator.jpg
new file mode 100644
index 0000000..3f8b151
Binary files /dev/null and b/user_guide/images/nav_separator.jpg differ
diff --git a/user_guide/images/nav_toggle.jpg b/user_guide/images/nav_toggle.jpg
new file mode 100644
index 0000000..531bc26
Binary files /dev/null and b/user_guide/images/nav_toggle.jpg differ
diff --git a/user_guide/index.html b/user_guide/index.html
index a234b19..f5fdbdc 100644
--- a/user_guide/index.html
+++ b/user_guide/index.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/downloads.html
b/user_guide/installation/downloads.html
index 15c0f30..fb515d1 100644
--- a/user_guide/installation/downloads.html
+++ b/user_guide/installation/downloads.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
@@ -58,7 +58,8 @@ Downloading CodeIgniter
<h1>Downloading CodeIgniter</h1>
<ul>
-<li><a
href="http://codeigniter.com/download.php">CodeIgniter V
1.7.2 (Current version)</a></li>
+<li><a
href="http://codeigniter.com/download.php">CodeIgniter V
1.7.3 (Current version)</a></li>
+<li><a
href="http://codeigniter.com/download_files/CodeIgniter_1.7.2.zip&qu...
V 1.7.2</a></li>
<li><a
href="http://codeigniter.com/download_files/CodeIgniter_1.7.1.zip&qu...
V 1.7.1</a></li>
<li><a
href="http://codeigniter.com/download_files/CodeIgniter_1.7.0.zip&qu...
V 1.7.0</a></li>
<li><a
href="http://codeigniter.com/download_files/CodeIgniter_1.6.3.zip&qu...
V 1.6.3</a></li>
diff --git a/user_guide/installation/index.html b/user_guide/installation/index.html
index f960e28..a4593c4 100644
--- a/user_guide/installation/index.html
+++ b/user_guide/installation/index.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/troubleshooting.html
b/user_guide/installation/troubleshooting.html
index 08c5d9f..cbf0856 100644
--- a/user_guide/installation/troubleshooting.html
+++ b/user_guide/installation/troubleshooting.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_120.html
b/user_guide/installation/upgrade_120.html
index 2ac9ab2..83ca880 100644
--- a/user_guide/installation/upgrade_120.html
+++ b/user_guide/installation/upgrade_120.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_130.html
b/user_guide/installation/upgrade_130.html
index b36f39d..b7230b9 100644
--- a/user_guide/installation/upgrade_130.html
+++ b/user_guide/installation/upgrade_130.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_131.html
b/user_guide/installation/upgrade_131.html
index 002f07c..514bdd9 100644
--- a/user_guide/installation/upgrade_131.html
+++ b/user_guide/installation/upgrade_131.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_132.html
b/user_guide/installation/upgrade_132.html
index 01a1762..6add57e 100644
--- a/user_guide/installation/upgrade_132.html
+++ b/user_guide/installation/upgrade_132.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_133.html
b/user_guide/installation/upgrade_133.html
index f12a960..a81836e 100644
--- a/user_guide/installation/upgrade_133.html
+++ b/user_guide/installation/upgrade_133.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_140.html
b/user_guide/installation/upgrade_140.html
index e3f6d82..28284f9 100644
--- a/user_guide/installation/upgrade_140.html
+++ b/user_guide/installation/upgrade_140.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_141.html
b/user_guide/installation/upgrade_141.html
index 886542d..bf798cf 100644
--- a/user_guide/installation/upgrade_141.html
+++ b/user_guide/installation/upgrade_141.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_150.html
b/user_guide/installation/upgrade_150.html
index 4ebc78c..8eeeb95 100644
--- a/user_guide/installation/upgrade_150.html
+++ b/user_guide/installation/upgrade_150.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_152.html
b/user_guide/installation/upgrade_152.html
index 7930638..06825fd 100644
--- a/user_guide/installation/upgrade_152.html
+++ b/user_guide/installation/upgrade_152.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_153.html
b/user_guide/installation/upgrade_153.html
index 52efd70..a17a3c5 100644
--- a/user_guide/installation/upgrade_153.html
+++ b/user_guide/installation/upgrade_153.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_154.html
b/user_guide/installation/upgrade_154.html
index c241160..a511cf6 100644
--- a/user_guide/installation/upgrade_154.html
+++ b/user_guide/installation/upgrade_154.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_160.html
b/user_guide/installation/upgrade_160.html
index 35da95b..a5f299a 100644
--- a/user_guide/installation/upgrade_160.html
+++ b/user_guide/installation/upgrade_160.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_161.html
b/user_guide/installation/upgrade_161.html
index 2a9d047..ef8edb3 100644
--- a/user_guide/installation/upgrade_161.html
+++ b/user_guide/installation/upgrade_161.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_162.html
b/user_guide/installation/upgrade_162.html
index 0e86d5c..5c65808 100644
--- a/user_guide/installation/upgrade_162.html
+++ b/user_guide/installation/upgrade_162.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_163.html
b/user_guide/installation/upgrade_163.html
index 54a7c55..263e8bd 100644
--- a/user_guide/installation/upgrade_163.html
+++ b/user_guide/installation/upgrade_163.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_170.html
b/user_guide/installation/upgrade_170.html
index d3715e1..d7f765a 100644
--- a/user_guide/installation/upgrade_170.html
+++ b/user_guide/installation/upgrade_170.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_171.html
b/user_guide/installation/upgrade_171.html
index 9b37bd1..988dd5d 100644
--- a/user_guide/installation/upgrade_171.html
+++ b/user_guide/installation/upgrade_171.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_172.html
b/user_guide/installation/upgrade_172.html
index ade02b3..54221ab 100644
--- a/user_guide/installation/upgrade_172.html
+++ b/user_guide/installation/upgrade_172.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrade_173.html
b/user_guide/installation/upgrade_173.html
new file mode 100644
index 0000000..1f9c282
--- /dev/null
+++ b/user_guide/installation/upgrade_173.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
+<title>Upgrading from 1.7.2 to 1.7.3 : CodeIgniter User Guide</title>
+
+<style type='text/css' media='all'>@import
url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all'
href='../userguide.css' />
+
+<script type="text/javascript"
src="../nav/nav.js"></script>
+<script type="text/javascript"
src="../nav/prototype.lite.js"></script>
+<script type="text/javascript"
src="../nav/moo.fx.js"></script>
+<script type="text/javascript"
src="../nav/user_guide_menu.js"></script>
+
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='ExpressionEngine Dev Team' />
+<meta name='description' content='CodeIgniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script
type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a
href="javascript:void(0);" onclick="myHeight.toggle();"><img
src="../images/nav_toggle_darker.jpg" width="154"
height="43" border="0" title="Toggle Table of Contents"
alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
+<tr>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a
href="http://codeigniter.com/">CodeIgniter Home</a>
›
+<a href="../index.html">User Guide Home</a>
›
+Upgrading from 1.7.2 to 1.7.3
+</td>
+<td id="searchbox"><form method="get"
action="http://www.google.com/search"><input type="hidden"
name="as_sitesearch" id="as_sitesearch"
value="codeigniter.com/user_guide/" />Search User Guide <input
type="text" class="input" style="width:200px;"
name="q" id="q" size="31" maxlength="255"
value="" /> <input type="submit"
class="submit" name="sa" value="Go"
/></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Upgrading from 1.7.2 to 1.7.3</h1>
+
+<p>Before performing an update you should take your site offline by replacing the
index.php file with a static one.</p>
+
+
+
+<h2>Step 1: Update your CodeIgniter files</h2>
+
+<p>Replace these files and directories in your "system" folder with the
new versions:</p>
+
+<ul>
+
+<li><dfn>system/codeigniter</dfn></li>
+<li><dfn>system/database</dfn></li>
+<li><dfn>system/helpers</dfn></li>
+<li><dfn>system/language</dfn></li>
+<li><dfn>system/libraries</dfn></li>
+</ul>
+
+<p class="important"><strong>Note:</strong> If you have any
custom developed files in these folders please make copies of them first.</p>
+
+<h2>Step 2: Update your user guide</h2>
+<p>Please replace your local copy of the user guide with the new version, including
the image files.</p>
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic: <a href="index.html">Installation
Instructions</a>
+ ·
+<a href="#top">Top of
Page</a> ·
+<a href="../index.html">User Guide
Home</a> ·
+Next Topic: <a
href="troubleshooting.html">Troubleshooting</a>
+</p>
+<p><a href="http://codeigniter.com">CodeIgniter</a>
· Copyright © 2006-2010
· <a
href="http://ellislab.com/">Ellislab,
Inc.</a></p>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/user_guide/installation/upgrade_b11.html
b/user_guide/installation/upgrade_b11.html
index 647dd88..f34051f 100644
--- a/user_guide/installation/upgrade_b11.html
+++ b/user_guide/installation/upgrade_b11.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/installation/upgrading.html
b/user_guide/installation/upgrading.html
index 14a4455..48f239d 100644
--- a/user_guide/installation/upgrading.html
+++ b/user_guide/installation/upgrading.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
@@ -60,6 +60,7 @@ Upgrading from a Previous Version
<p>Please read the upgrade notes corresponding to the version you are upgrading
from.</p>
<ul>
+<li><a href="upgrade_173.html">Upgrading from 1.7.2 to
1.7.3</a></li>
<li><a href="upgrade_172.html">Upgrading from 1.7.1 to
1.7.2</a></li>
<li><a href="upgrade_171.html">Upgrading from 1.7.0 to
1.7.1</a></li>
<li><a href="upgrade_170.html">Upgrading from 1.6.3 to
1.7.0</a></li>
diff --git a/user_guide/libraries/benchmark.html b/user_guide/libraries/benchmark.html
index 30db0de..3fddb99 100644
--- a/user_guide/libraries/benchmark.html
+++ b/user_guide/libraries/benchmark.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/calendar.html b/user_guide/libraries/calendar.html
index 187aade..bde6eb2 100644
--- a/user_guide/libraries/calendar.html
+++ b/user_guide/libraries/calendar.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/config.html b/user_guide/libraries/config.html
index d911a42..24be07b 100644
--- a/user_guide/libraries/config.html
+++ b/user_guide/libraries/config.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/email.html b/user_guide/libraries/email.html
index 3b38b26..22912b9 100644
--- a/user_guide/libraries/email.html
+++ b/user_guide/libraries/email.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html
index 86b8cb4..8ad1f74 100644
--- a/user_guide/libraries/encryption.html
+++ b/user_guide/libraries/encryption.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/file_uploading.html
b/user_guide/libraries/file_uploading.html
index 28cf8de..f458d6e 100644
--- a/user_guide/libraries/file_uploading.html
+++ b/user_guide/libraries/file_uploading.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/form_validation.html
b/user_guide/libraries/form_validation.html
index 400af0e..c05f97f 100644
--- a/user_guide/libraries/form_validation.html
+++ b/user_guide/libraries/form_validation.html
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/ftp.html b/user_guide/libraries/ftp.html
index c0c8e62..b74e1be 100644
--- a/user_guide/libraries/ftp.html
+++ b/user_guide/libraries/ftp.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/image_lib.html b/user_guide/libraries/image_lib.html
index b6a3447..bb0ef10 100644
--- a/user_guide/libraries/image_lib.html
+++ b/user_guide/libraries/image_lib.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html
index dbc7925..e578970 100644
--- a/user_guide/libraries/input.html
+++ b/user_guide/libraries/input.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/language.html b/user_guide/libraries/language.html
index eb4835a..7fb1f74 100644
--- a/user_guide/libraries/language.html
+++ b/user_guide/libraries/language.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/loader.html b/user_guide/libraries/loader.html
index 19a10e4..2d97709 100644
--- a/user_guide/libraries/loader.html
+++ b/user_guide/libraries/loader.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/output.html b/user_guide/libraries/output.html
index 1e42591..21f1e03 100644
--- a/user_guide/libraries/output.html
+++ b/user_guide/libraries/output.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/pagination.html b/user_guide/libraries/pagination.html
index 187b331..a0d9fe6 100644
--- a/user_guide/libraries/pagination.html
+++ b/user_guide/libraries/pagination.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/parser.html b/user_guide/libraries/parser.html
index 4bf63ef..a1177ab 100644
--- a/user_guide/libraries/parser.html
+++ b/user_guide/libraries/parser.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html
index 11313b5..641d04d 100644
--- a/user_guide/libraries/sessions.html
+++ b/user_guide/libraries/sessions.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html
index 1c67e4b..2d96e07 100644
--- a/user_guide/libraries/table.html
+++ b/user_guide/libraries/table.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html
index 9e54bbf..2536298 100644
--- a/user_guide/libraries/trackback.html
+++ b/user_guide/libraries/trackback.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/typography.html b/user_guide/libraries/typography.html
index bcb2e66..7d01fd8 100644
--- a/user_guide/libraries/typography.html
+++ b/user_guide/libraries/typography.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/unit_testing.html
b/user_guide/libraries/unit_testing.html
index e0111e9..8ab8983 100644
--- a/user_guide/libraries/unit_testing.html
+++ b/user_guide/libraries/unit_testing.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/uri.html b/user_guide/libraries/uri.html
index 818115f..e9b3504 100644
--- a/user_guide/libraries/uri.html
+++ b/user_guide/libraries/uri.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/user_agent.html b/user_guide/libraries/user_agent.html
index 98bd7b1..b0acc44 100644
--- a/user_guide/libraries/user_agent.html
+++ b/user_guide/libraries/user_agent.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/validation.html b/user_guide/libraries/validation.html
index 25ea91d..b5e9ec4 100644
--- a/user_guide/libraries/validation.html
+++ b/user_guide/libraries/validation.html
@@ -27,7 +27,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/xmlrpc.html b/user_guide/libraries/xmlrpc.html
index cd4ed1c..d207119 100644
--- a/user_guide/libraries/xmlrpc.html
+++ b/user_guide/libraries/xmlrpc.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/libraries/zip.html b/user_guide/libraries/zip.html
index 36b969b..16cae3c 100644
--- a/user_guide/libraries/zip.html
+++ b/user_guide/libraries/zip.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/license.html b/user_guide/license.html
index fc79c22..20e6d40 100644
--- a/user_guide/license.html
+++ b/user_guide/license.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/overview/appflow.html b/user_guide/overview/appflow.html
index 8504ae8..1283ccb 100644
--- a/user_guide/overview/appflow.html
+++ b/user_guide/overview/appflow.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/overview/at_a_glance.html b/user_guide/overview/at_a_glance.html
index 6ee17fb..d9b7bcd 100644
--- a/user_guide/overview/at_a_glance.html
+++ b/user_guide/overview/at_a_glance.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/overview/cheatsheets.html b/user_guide/overview/cheatsheets.html
index a34cf71..79d90c2 100644
--- a/user_guide/overview/cheatsheets.html
+++ b/user_guide/overview/cheatsheets.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/overview/features.html b/user_guide/overview/features.html
index 3f584cd..de5ea55 100644
--- a/user_guide/overview/features.html
+++ b/user_guide/overview/features.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/overview/getting_started.html
b/user_guide/overview/getting_started.html
index b37d546..1ce8c25 100644
--- a/user_guide/overview/getting_started.html
+++ b/user_guide/overview/getting_started.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/overview/goals.html b/user_guide/overview/goals.html
index cdd93a3..7f312a0 100644
--- a/user_guide/overview/goals.html
+++ b/user_guide/overview/goals.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/overview/index.html b/user_guide/overview/index.html
index 4dbe55c..6719d7d 100644
--- a/user_guide/overview/index.html
+++ b/user_guide/overview/index.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/overview/mvc.html b/user_guide/overview/mvc.html
index 67bae89..ea5c706 100644
--- a/user_guide/overview/mvc.html
+++ b/user_guide/overview/mvc.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of
Contents Page</a></td>
</tr>
</table>
diff --git a/user_guide/toc.html b/user_guide/toc.html
index 367fb76..bd1c355 100644
--- a/user_guide/toc.html
+++ b/user_guide/toc.html
@@ -29,7 +29,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0"
style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 1.7.2</h1></td>
+<td><h1>CodeIgniter User Guide Version 1.7.3</h1></td>
</tr>
</table>
</div>
commit 94856ffde7b8fa076859b3feeb66c263c7eb50b8
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Sun Dec 19 11:42:10 2010 +0530
Added Voucher Download
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index e6f8809..1cf8be4 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -764,6 +764,56 @@ class Voucher extends Controller {
return;
}
+ function download($voucher_type, $voucher_id = 0)
+ {
+ $this->load->helper('download');
+ $this->load->model('Setting_model');
+ $this->load->model('Ledger_model');
+
+ $account = $this->Setting_model->get_current();
+
+ /* Load current voucher details */
+ if ( ! $cur_voucher = $this->Voucher_model->get_voucher($voucher_id,
$voucher_type))
+ {
+ $this->messages->add('Invalid Voucher.', 'error');
+ redirect('voucher/show/' . $voucher_type);
+ return;
+ }
+
+ $data['voucher_type'] = $voucher_type;
+ $data['voucher_number'] = $cur_voucher->number;
+ $data['voucher_date'] = date_mysql_to_php_display($cur_voucher->date);
+ $data['voucher_dr_total'] = $cur_voucher->dr_total;
+ $data['voucher_cr_total'] = $cur_voucher->cr_total;
+ $data['voucher_narration'] = $cur_voucher->narration;
+ $data['voucher_draft'] = $cur_voucher->draft;
+
+ /* Getting Ledger details */
+ $ledger_q = $this->db->query("SELECT * FROM voucher_items WHERE voucher_id =
? ORDER BY dc DESC", $voucher_id);
+
+ $counter = 0;
+ $data['ledger_data'] = array();
+ if ($ledger_q->num_rows() > 0)
+ {
+ foreach ($ledger_q->result() as $row)
+ {
+ $data['ledger_data'][$counter] = array(
+ 'id' => $row->ledger_id,
+ 'name' => $this->Ledger_model->get_name($row->ledger_id),
+ 'dc' => $row->dc,
+ 'amount' => $row->amount,
+ );
+ $counter++;
+ }
+ }
+
+ /* Download Voucher */
+ $file_name = $voucher_type . '_voucher_' . $cur_voucher->number .
".html";
+ $download_data = $this->load->view('voucher/downloadpreview', $data,
TRUE);
+ force_download($file_name, $download_data);
+ return;
+ }
+
function printpreview($voucher_type, $voucher_id)
{
$this->load->model('Setting_model');
diff --git a/system/application/views/voucher/downloadpreview.php
b/system/application/views/voucher/downloadpreview.php
new file mode 100644
index 0000000..8ab7043
--- /dev/null
+++ b/system/application/views/voucher/downloadpreview.php
@@ -0,0 +1,105 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
+<head>
+<title><?php echo ucfirst($voucher_type); ?> Voucher Number <?php echo
$voucher_number; ?></title>
+
+<style type="text/css">
+ body {
+ color:#000000;
+ font:14px "Helvetica Neue","Lucida Grande","Helvetica
Neue",Arial,sans-serif;
+ margin:20px;
+ padding:0;
+ }
+
+ #print-account-name {
+ text-align:center;
+ font-size:17px;
+ }
+
+ #print-account-address {
+ text-align:center;
+ font-size:14px;
+ }
+
+ #print-voucher-type {
+ text-align:center;
+ font-size:15px;
+ }
+
+ table#print-voucher-table {
+ border:1px solid #000000;
+ border-collapse: collapse;
+ }
+
+ table#print-voucher-table tr.tr-title {
+ text-align:left;
+ border:1px solid #000000;
+ padding:5px 0 5px 2px;
+ }
+
+ table#print-voucher-table tr.tr-title th {
+ padding:5px 0 5px 5px;
+ }
+
+ table#print-voucher-table td {
+ padding:5px 0 5px 5px;
+ }
+
+ table#print-voucher-table td.item {
+ padding-right:35px;
+ }
+
+ table#print-voucher-table td.last-item {
+ padding-right:5px;
+ }
+
+ table#print-voucher-table tr.tr-total {
+ border:1px solid #000000;
+ }
+</style>
+
+</head>
+<body>
+ <div id="print-account-name"><span
class="value"><?php echo
$this->config->item('account_name'); ?></span></div>
+ <div id="print-account-address"><span
class="value"><?php echo
$this->config->item('account_address'); ?></span></div>
+ <br />
+ <div id="print-voucher-type"><span
class="value"><?php echo ucfirst($voucher_type); ?>
Voucher</span></div>
+ <br />
+ <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Number : <span class="value"><?php echo
voucher_number_prefix($voucher_type) . $voucher_number; ?></span></div>
+ <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Date : <span class="value"><?php echo $voucher_date;
?></span></div>
+ <br />
+ <table id="print-voucher-table">
+ <thead>
+ <tr class="tr-title"><th>Ledger A/C</th><th>Dr
Amount</th><th>Cr Amount</th></tr>
+ </thead>
+ <tbody>
+ <?php
+ $currency = $this->config->item('account_currency_symbol');
+ foreach ($ledger_data as $id => $row)
+ {
+ echo "<tr class=\"tr-ledger\">";
+ if ($row['dc'] == "D")
+ {
+ echo "<td class=\"ledger-name item\">By " .
$row['name'] . "</td>";
+ } else {
+ echo "<td class=\"ledger-name item\"> To
" . $row['name'] . "</td>";
+ }
+ if ($row['dc'] == "D")
+ {
+ echo "<td class=\"ledger-dr item\">" . $currency . "
" . $row['amount'] . "</td>";
+ echo "<td class=\"ledger-cr last-item\"></td>";
+ } else {
+ echo "<td class=\"ledger-dr item\"></td>";
+ echo "<td class=\"ledger-cr last-item\">" . $currency .
" " . $row['amount'] . "</td>";
+ }
+ echo "</tr>";
+ }
+ echo "<tr class=\"tr-total\"><td
class=\"total-name\">Total</td><td
class=\"total-dr\">" . $currency . " " . $voucher_dr_total .
"</td><td class=\"total-cr\">" . $currency . " "
. $voucher_cr_total . "</td></tr>";
+ ?>
+ </tbody>
+ </table>
+ <br />
+ <div id="print-voucher-narration">Narration : <span
class="value"><?php echo $voucher_narration;
?></span></div>
+ <br />
+</body>
+</html>
commit 73ed31ecf5d48ee922161b31fbf26b02d8a5ee39
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Sun Dec 19 11:27:11 2010 +0530
Reset the $config['index_page'] to "index.php"
- Now it works with bitnami lamp stack
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/config/config.php b/system/application/config/config.php
index 5c95641..96245f0 100644
--- a/system/application/config/config.php
+++ b/system/application/config/config.php
@@ -37,7 +37,7 @@ $config['base_url'] .=
str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER
| variable so that it is blank.
|
*/
-$config['index_page'] = "";
+$config['index_page'] = "index.php";
/*
|--------------------------------------------------------------------------
commit 55c6056c9b6ae91981e06869e240cedc1402f15a
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Sun Dec 19 10:45:36 2010 +0530
Added a . to end of every message
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/account.php
b/system/application/controllers/account.php
index d5f259e..309bb41 100644
--- a/system/application/controllers/account.php
+++ b/system/application/controllers/account.php
@@ -11,9 +11,9 @@ class Account extends Controller {
$total_op = $this->Ledger_model->get_diff_op_balance();
if ($total_op > 0)
{
- $this->messages->add("Difference in Opening Balance is Dr " .
convert_cur($total_op), 'error');
+ $this->messages->add("Difference in Opening Balance is Dr " .
convert_cur($total_op) . '.', 'error');
} else if ($total_op < 0) {
- $this->messages->add("Difference in Opening Balance is Cr " .
convert_cur(-$total_op), 'error');
+ $this->messages->add("Difference in Opening Balance is Cr " .
convert_cur(-$total_op) . '.', 'error');
}
$this->template->load('template', 'account/index');
diff --git a/system/application/controllers/admin/active.php
b/system/application/controllers/admin/active.php
index f6780fb..5fdbf84 100644
--- a/system/application/controllers/admin/active.php
+++ b/system/application/controllers/admin/active.php
@@ -69,7 +69,7 @@ class Active extends Controller {
/* Check if database ini file exists */
if ( ! get_file_info($ini_file))
{
- $this->messages->add("Account setting file is missing",
'error');
+ $this->messages->add("Account setting file is missing.",
'error');
$this->template->load('admin_template', 'admin/active',
$data);
return;
}
@@ -78,7 +78,7 @@ class Active extends Controller {
$active_accounts = parse_ini_file($ini_file);
if ( ! $active_accounts)
{
- $this->messages->add("Invalid account setting file",
'error');
+ $this->messages->add("Invalid account setting file.",
'error');
$this->template->load('admin_template', 'admin/active',
$data);
return;
}
@@ -86,38 +86,38 @@ class Active extends Controller {
/* Check if all needed variables are set in ini file */
if ( ! isset($active_accounts['db_hostname']))
{
- $this->messages->add("Hostname missing from account setting file",
'error');
+ $this->messages->add("Hostname missing from account setting file.",
'error');
$this->template->load('admin_template', 'admin/active',
$data);
return;
}
if ( ! isset($active_accounts['db_port']))
{
- $this->messages->add("Port missing from account setting file. Default
MySQL port is 3306", 'error');
+ $this->messages->add("Port missing from account setting file. Default
MySQL port is 3306.", 'error');
$this->template->load('admin_template', 'admin/active',
$data);
return;
}
if ( ! isset($active_accounts['db_name']))
{
- $this->messages->add("Database name missing from account setting
file", 'error');
+ $this->messages->add("Database name missing from account setting
file.", 'error');
$this->template->load('admin_template', 'admin/active',
$data);
return;
}
if ( ! isset($active_accounts['db_username']))
{
- $this->messages->add("Database username missing from account setting
file", 'error');
+ $this->messages->add("Database username missing from account setting
file.", 'error');
$this->template->load('admin_template', 'admin/active',
$data);
return;
}
if ( ! isset($active_accounts['db_password']))
{
- $this->messages->add("Database password missing from account setting
file", 'error');
+ $this->messages->add("Database password missing from account setting
file.", 'error');
$this->template->load('admin_template', 'admin/active',
$data);
return;
}
/* Setting new account database details in session */
$this->session->set_userdata('db_active_label', $db_label);
- $this->messages->add("Active account settings changed",
'success');
+ $this->messages->add("Active account settings changed.",
'success');
redirect('admin');
}
return;
diff --git a/system/application/controllers/admin/create.php
b/system/application/controllers/admin/create.php
index 6157126..11a2317 100644
--- a/system/application/controllers/admin/create.php
+++ b/system/application/controllers/admin/create.php
@@ -204,7 +204,7 @@ class Create extends Controller {
/* Check if database ini file exists */
if (get_file_info($ini_file))
{
- $this->messages->add("Account with same label already exists",
'error');
+ $this->messages->add("Account with same label already exists.",
'error');
$this->template->load('admin_template', 'admin/create',
$data);
return;
}
@@ -212,7 +212,7 @@ class Create extends Controller {
/* Check if start date is less than end date */
if ($data_fy_end <= $data_fy_start)
{
- $this->messages->add("Financial start date cannot be greater than end
date", 'error');
+ $this->messages->add("Financial start date cannot be greater than end
date.", 'error');
$this->template->load('admin_template', 'admin/create',
$data);
return;
}
@@ -234,12 +234,12 @@ class Create extends Controller {
{
if ($newacc->query("CREATE DATABASE " .
mysql_real_escape_string($data_database_name)))
{
- $this->messages->add("New database created", 'success');
+ $this->messages->add("New database created.", 'success');
/* Retrying to connect to new database */
$newacc = $this->load->database($dsn, TRUE);
$conn_error = $newacc->_error_message();
} else {
- $this->messages->add("Cannot create database", 'error');
+ $this->messages->add("Cannot create database.", 'error');
$this->template->load('admin_template', 'admin/create',
$data);
return;
}
@@ -248,7 +248,7 @@ class Create extends Controller {
if ( ! $newacc->conn_id)
{
- $this->messages->add("Cannot connecting to database",
'error');
+ $this->messages->add("Cannot connecting to database.",
'error');
$this->template->load('admin_template', 'admin/create',
$data);
return;
} else if ($conn_error != "") {
@@ -256,7 +256,7 @@ class Create extends Controller {
$this->template->load('admin_template', 'admin/create',
$data);
return;
} else if ($newacc->query("SHOW TABLES")->num_rows() > 0) {
- $this->messages->add("Selected database in not empty",
'error');
+ $this->messages->add("Selected database in not empty.",
'error');
$this->template->load('admin_template', 'admin/create',
$data);
return;
} else {
@@ -274,7 +274,7 @@ class Create extends Controller {
/* Adding the account settings */
$newacc->query("INSERT INTO settings (id, name, address, email, fy_start,
fy_end, currency_symbol, date_format, timezone, database_version) VALUES (?, ?, ?, ?, ?,
?, ?, ?, ?, ?)", array(1, $data_account_name, $data_account_address,
$data_account_email, $data_fy_start, $data_fy_end, $data_account_currency,
$data_account_date, $data_account_timezone, 1));
- $this->messages->add("Successfully created webzash account",
'success');
+ $this->messages->add("Successfully created webzash account.",
'success');
/* Adding account settings to file. Code copied from manage controller */
$con_details = "[database]" . "\r\n" . "db_hostname =
\"" . $data_database_host . "\"" . "\r\n" .
"db_port = \"" . $data_database_port . "\"" .
"\r\n" . "db_name = \"" . $data_database_name .
"\"" . "\r\n" . "db_username = \"" .
$data_database_username . "\"" . "\r\n" . "db_password =
\"" . $data_database_password . "\"" . "\r\n";
@@ -284,10 +284,10 @@ class Create extends Controller {
/* Writing the connection string to end of file - writing in 'a' append mode
*/
if ( ! write_file($ini_file, $con_details))
{
- $this->messages->add("Failed to add account settings file. Please check
if \"" . $ini_file . "\" file is writable", 'error');
+ $this->messages->add("Failed to add account settings file. Please check
if \"" . $ini_file . "\" file is writable.", 'error');
$this->messages->add("You can manually create a text file \"" .
$ini_file . "\" with the following content :<br /><br />" .
$con_details_html, 'error');
} else {
- $this->messages->add("Successfully added webzash account settings file to
list of active accounts", 'success');
+ $this->messages->add("Successfully added webzash account settings file to
list of active accounts.", 'success');
}
redirect('admin');
diff --git a/system/application/controllers/admin/manage.php
b/system/application/controllers/admin/manage.php
index 689431e..5b24793 100644
--- a/system/application/controllers/admin/manage.php
+++ b/system/application/controllers/admin/manage.php
@@ -124,7 +124,7 @@ class Manage extends Controller {
/* Check if database ini file exists */
if (get_file_info($ini_file))
{
- $this->messages->add("Account with same label already exists",
'error');
+ $this->messages->add("Account with same label already exists.",
'error');
$this->template->load('admin_template', 'admin/manage/add',
$data);
return;
}
@@ -136,12 +136,12 @@ class Manage extends Controller {
/* Writing the connection string to end of file - writing in 'a' append mode
*/
if ( ! write_file($ini_file, $con_details))
{
- $this->messages->add("Failed to add account settings file. Please check if
\"" . $ini_file . "\" file is writable", 'error');
+ $this->messages->add("Failed to add account settings file. Please check if
\"" . $ini_file . "\" file is writable.", 'error');
$this->messages->add("You can manually create a text file \"" .
$ini_file . "\" with the following content :<br /><br />" .
$con_details_html, 'error');
$this->template->load('admin_template', 'admin/manage/add',
$data);
return;
} else {
- $this->messages->add("Successfully added webzash account to list of active
accounts", 'success');
+ $this->messages->add("Successfully added webzash account to list of active
accounts.", 'success');
redirect('admin/manage');
return;
}
@@ -209,7 +209,7 @@ class Manage extends Controller {
/* Check if database ini file exists */
if ( ! get_file_info($ini_file))
{
- $this->messages->add("Invalid account. Account setting file labeled "
. $database_label . " does not exists", 'error');
+ $this->messages->add("Invalid account. Account setting file labeled "
. $database_label . " does not exists.", 'error');
} else {
/* Parsing database ini file */
$active_accounts = parse_ini_file($ini_file);
@@ -271,12 +271,12 @@ class Manage extends Controller {
/* Writing the connection string to end of file - writing in 'a' append mode
*/
if ( ! write_file($ini_file, $con_details))
{
- $this->messages->add("Failed to edit account settings file. Please check
if \"" . $ini_file . "\" file is writable", 'error');
+ $this->messages->add("Failed to edit account settings file. Please check
if \"" . $ini_file . "\" file is writable.", 'error');
$this->messages->add("You can manually update the text file \""
. $ini_file . "\" with the following content :<br /><br />" .
$con_details_html, 'error');
$this->template->load('admin_template', 'admin/manage/edit',
$data);
return;
} else {
- $this->messages->add("Successfully updated webzash account settings",
'success');
+ $this->messages->add("Successfully updated webzash account
settings.", 'success');
redirect('admin/manage');
return;
}
@@ -289,18 +289,18 @@ class Manage extends Controller {
$this->template->set('page_title', 'Delete a webzash account');
$ini_file = $this->config->item('config_path') . "accounts/" .
$database_label . ".ini";
- $this->messages->add("Please delete " . $ini_file . " file
manually", 'error');
- $this->messages->add("Note that only the settings file will be delete.
Account database will have to be deleted manually", 'status');
+ $this->messages->add("Please delete " . $ini_file . " file
manually.", 'error');
+ $this->messages->add("Note that only the settings file will be delete.
Account database will have to be deleted manually.", 'status');
/*
if ( ! get_file_info($ini_file))
{
- $this->messages->add("Cannot delete account settings. Account setting file
labeled " . $database_label . " does not exists", 'error');
+ $this->messages->add("Cannot delete account settings. Account setting file
labeled " . $database_label . " does not exists.", 'error');
} else {
if (unlink($ini_file))
{
$this->messages->add("Account settings file delete",
'success');
} else {
- $this->messages->add("Cannot delete account settings. Please delete "
. $ini_file . " file manually", 'error');
+ $this->messages->add("Cannot delete account settings. Please delete "
. $ini_file . " file manually.", 'error');
}
} */
redirect('admin/manage');
diff --git a/system/application/controllers/admin/setting.php
b/system/application/controllers/admin/setting.php
index 0f70ab5..b65a247 100644
--- a/system/application/controllers/admin/setting.php
+++ b/system/application/controllers/admin/setting.php
@@ -60,7 +60,7 @@ class Setting extends Controller {
if ($data_row_count < 0 || $data_row_count > 200)
{
- $this->messages->add('Invalid value for Row Count', 'error');
+ $this->messages->add('Invalid value for Row Count.', 'error');
$this->template->load('admin_template', 'admin/setting');
return;
}
@@ -72,12 +72,12 @@ class Setting extends Controller {
/* Writing the connection string to end of file - writing in 'a' append mode
*/
if ( ! write_file($ini_file, $new_setting))
{
- $this->messages->add("Failed to update settings file. Please check if
\"" . $ini_file . "\" file is writable", 'error');
+ $this->messages->add("Failed to update settings file. Please check if
\"" . $ini_file . "\" file is writable.", 'error');
$this->messages->add("You can manually create a text file \"" .
$ini_file . "\" with the following content :<br /><br />" .
$new_setting_html, 'error');
$this->template->load('admin_template', 'admin/setting',
$data);
return;
} else {
- $this->messages->add('General settings updated successfully',
'success');
+ $this->messages->add('General settings updated successfully.',
'success');
redirect('admin/setting');
return;
}
diff --git a/system/application/controllers/admin/welcome.php
b/system/application/controllers/admin/welcome.php
index 4db7c31..a32238d 100644
--- a/system/application/controllers/admin/welcome.php
+++ b/system/application/controllers/admin/welcome.php
@@ -27,40 +27,40 @@ class Welcome extends Controller {
/* Check if database ini file exists */
if ( ! get_file_info($ini_file))
{
- $this->messages->add("Account setting file is missing",
'error');
+ $this->messages->add("Account setting file is missing.",
'error');
} else {
/* Parsing database ini file */
$active_accounts = parse_ini_file($ini_file);
if ( ! $active_accounts)
{
- $this->messages->add("Invalid account setting file",
'error');
+ $this->messages->add("Invalid account setting file.",
'error');
} else {
/* Check if all needed variables are set in ini file */
$ini_ok = TRUE;
if ( ! isset($active_accounts['db_hostname']))
{
$ini_ok = FALSE;
- $this->messages->add("Hostname missing from account setting file",
'error');
+ $this->messages->add("Hostname missing from account setting file.",
'error');
}
if ( ! isset($active_accounts['db_port']))
{
$ini_ok = FALSE;
- $this->messages->add("Port missing from account setting file. Default
MySQL port is 3306", 'error');
+ $this->messages->add("Port missing from account setting file. Default
MySQL port is 3306.", 'error');
}
if ( ! isset($active_accounts['db_name']))
{
$ini_ok = FALSE;
- $this->messages->add("Database name missing from account setting
file", 'error');
+ $this->messages->add("Database name missing from account setting
file.", 'error');
}
if ( ! isset($active_accounts['db_username']))
{
$ini_ok = FALSE;
- $this->messages->add("Database username missing from account setting
file", 'error');
+ $this->messages->add("Database username missing from account setting
file.", 'error');
}
if ( ! isset($active_accounts['db_password']))
{
$ini_ok = FALSE;
- $this->messages->add("Database password missing from account setting
file", 'error');
+ $this->messages->add("Database password missing from account setting
file.", 'error');
}
if ($ini_ok)
@@ -85,7 +85,7 @@ class Welcome extends Controller {
}
} else {
$is_label_set = FALSE;
- $this->messages->add('Please select a Webzash database',
'error');
+ $this->messages->add('Please select a Webzash database.',
'error');
}
if ($is_label_set)
@@ -105,7 +105,7 @@ class Welcome extends Controller {
if ( ! $valid_db_q)
{
$valid_webzash_db = FALSE;
- $this->messages->add('Invalid Webzash database', 'error');
+ $this->messages->add('Invalid Webzash database.', 'error');
break;
}
}
@@ -129,10 +129,10 @@ class Welcome extends Controller {
}
}
} else {
- $this->messages->add('Invalid database connection settings. Please check
whether the provided database name, username and password is valid',
'error');
+ $this->messages->add('Invalid database connection settings. Please check
whether the provided database name, username and password is valid.',
'error');
}
} else {
- $this->messages->add('Cannot connect to database server. Please check
whether database server is running', 'error');
+ $this->messages->add('Cannot connect to database server. Please check
whether database server is running.', 'error');
}
}
diff --git a/system/application/controllers/group.php
b/system/application/controllers/group.php
index 390a19b..af3c87c 100644
--- a/system/application/controllers/group.php
+++ b/system/application/controllers/group.php
@@ -71,13 +71,13 @@ class Group extends Controller {
if ( ! $this->db->query("INSERT INTO groups (name, parent_id,
affects_gross) VALUES (?, ?, ?)", array($data_name, $data_parent_id,
$data_affects_gross)))
{
$this->db->trans_rollback();
- $this->messages->add('Error addding ' . $data_name . ' - Group
A/C', 'error');
+ $this->messages->add('Error addding ' . $data_name . ' - Group
A/C.', 'error');
$this->logger->write_message("error", "Error adding Group A/C
named " . $data_name);
$this->template->load('template', 'group/add', $data);
return;
} else {
$this->db->trans_complete();
- $this->messages->add($data_name . ' - Group A/C added successfully',
'success');
+ $this->messages->add($data_name . ' - Group A/C added successfully.',
'success');
$this->logger->write_message("success", "Added Group A/C named
" . $data_name);
redirect('account');
return;
@@ -94,12 +94,12 @@ class Group extends Controller {
$id = $this->input->xss_clean($id);
$id = (int)$id;
if ($id < 1) {
- $this->messages->add('Invalid Group A/C', 'error');
+ $this->messages->add('Invalid Group A/C.', 'error');
redirect('account');
return;
}
if ($id < 5) {
- $this->messages->add('Cannot edit system created Group A/C',
'error');
+ $this->messages->add('Cannot edit system created Group A/C.',
'error');
redirect('account');
return;
}
@@ -108,7 +108,7 @@ class Group extends Controller {
$group_data_q = $this->db->query("SELECT * FROM groups WHERE id = ?",
array($id));
if ($group_data_q->num_rows() < 1)
{
- $this->messages->add('Invalid Group A/C', 'error');
+ $this->messages->add('Invalid Group A/C.', 'error');
redirect('account');
return;
}
@@ -168,13 +168,13 @@ class Group extends Controller {
if ( ! $this->db->query("UPDATE groups SET name = ?, parent_id = ?,
affects_gross = ? WHERE id = ?", array($data_name, $data_parent_id,
$data_affects_gross, $data_id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating ' . $data_name . ' - Group
A/C', 'error');
+ $this->messages->add('Error updating ' . $data_name . ' - Group
A/C.', 'error');
$this->logger->write_message("error", "Error updating Group A/C
named " . $data_name . " [id:" . $data_id . "]");
$this->template->load('template', 'group/edit', $data);
return;
} else {
$this->db->trans_complete();
- $this->messages->add($data_name . ' - Group A/C updated successfully',
'success');
+ $this->messages->add($data_name . ' - Group A/C updated successfully.',
'success');
$this->logger->write_message("success", "Updated Group A/C named
" . $data_name . " [id:" . $data_id . "]");
redirect('account');
return;
@@ -189,26 +189,26 @@ class Group extends Controller {
$id = $this->input->xss_clean($id);
$id = (int)$id;
if ($id < 1) {
- $this->messages->add('Invalid Group A/C', 'error');
+ $this->messages->add('Invalid Group A/C.', 'error');
redirect('account');
return;
}
if ($id < 5) {
- $this->messages->add('Cannot delete system created Group A/C',
'error');
+ $this->messages->add('Cannot delete system created Group A/C.',
'error');
redirect('account');
return;
}
$data_present_q = $this->db->query("SELECT * FROM groups WHERE parent_id =
?", array($id));
if ($data_present_q->num_rows() > 0)
{
- $this->messages->add('Cannot delete non-empty Group A/C',
'error');
+ $this->messages->add('Cannot delete non-empty Group A/C.',
'error');
redirect('account');
return;
}
$data_present_q = $this->db->query("SELECT * FROM ledgers WHERE group_id =
?", array($id));
if ($data_present_q->num_rows() > 0)
{
- $this->messages->add('Cannot delete non-empty Group A/C',
'error');
+ $this->messages->add('Cannot delete non-empty Group A/C.',
'error');
redirect('account');
return;
}
@@ -217,7 +217,7 @@ class Group extends Controller {
$group_q = $this->db->query("SELECT * FROM groups WHERE id = ?",
array($id));
if ($group_q->num_rows() < 1)
{
- $this->messages->add('Invalid Group A/C', 'error');
+ $this->messages->add('Invalid Group A/C.', 'error');
redirect('account');
return;
} else {
@@ -229,13 +229,13 @@ class Group extends Controller {
if ( ! $this->db->query("DELETE FROM groups WHERE id = ?",
array($id)))
{
$this->db->trans_rollback();
- $this->messages->add("Error deleting " . $group_data->name . "
- Group A/C", 'error');
+ $this->messages->add("Error deleting " . $group_data->name . "
- Group A/C.", 'error');
$this->logger->write_message("error", "Error deleting Group A/C
named " . $group_data->name . " [id:" . $id . "]");
redirect('account');
return;
} else {
$this->db->trans_complete();
- $this->messages->add($group_data->name . ' - Group A/C deleted
successfully', 'success');
+ $this->messages->add($group_data->name . ' - Group A/C deleted
successfully.', 'success');
$this->logger->write_message("success", "Deleted Group A/C named
" . $group_data->name . " [id:" . $id . "]");
redirect('account');
return;
diff --git a/system/application/controllers/ledger.php
b/system/application/controllers/ledger.php
index a763725..9f92b45 100644
--- a/system/application/controllers/ledger.php
+++ b/system/application/controllers/ledger.php
@@ -73,7 +73,7 @@ class Ledger extends Controller {
if ($data_group_id < 5)
{
- $this->messages->add("Invalid parent group", 'error');
+ $this->messages->add("Invalid parent group.", 'error');
$this->template->load('template', 'ledger/add', $data);
return;
}
@@ -87,13 +87,13 @@ class Ledger extends Controller {
if ( ! $this->db->query("INSERT INTO ledgers (name, group_id, op_balance,
op_balance_dc, type) VALUES (?, ?, ?, ?, ?)", array($data_name, $data_group_id,
$data_op_balance, $data_op_balance_dc, $data_ledger_type_cashbank)))
{
$this->db->trans_rollback();
- $this->messages->add('Error addding ' . $data_name . ' - Ledger
A/C', 'error');
+ $this->messages->add('Error addding ' . $data_name . ' - Ledger
A/C.', 'error');
$this->logger->write_message("error", "Error adding Ledger A/C
named " . $data_name);
$this->template->load('template', 'group/add', $data);
return;
} else {
$this->db->trans_complete();
- $this->messages->add($data_name . ' - Ledger A/C added successfully',
'success');
+ $this->messages->add($data_name . ' - Ledger A/C added successfully.',
'success');
$this->logger->write_message("success", "Added Ledger A/C named
" . $data_name);
redirect('account');
return;
@@ -111,7 +111,7 @@ class Ledger extends Controller {
$id = (int)$id;
if ($id < 1)
{
- $this->messages->add('Invalid Ledger A/C', 'error');
+ $this->messages->add('Invalid Ledger A/C.', 'error');
redirect('account');
return;
}
@@ -120,7 +120,7 @@ class Ledger extends Controller {
$ledger_data_q = $this->db->query("SELECT * FROM ledgers WHERE id = ?",
array($id));
if ($ledger_data_q->num_rows() < 1)
{
- $this->messages->add('Invalid Ledger A/C', 'error');
+ $this->messages->add('Invalid Ledger A/C.', 'error');
redirect('account');
return;
}
@@ -184,7 +184,7 @@ class Ledger extends Controller {
if ($data_group_id < 5)
{
- $this->messages->add("Invalid parent group", 'error');
+ $this->messages->add("Invalid parent group.", 'error');
$this->template->load('template', 'ledger/add', $data);
return;
}
@@ -198,13 +198,13 @@ class Ledger extends Controller {
if ( ! $this->db->query("UPDATE ledgers SET name = ?, group_id = ?,
op_balance = ?, op_balance_dc = ?, type = ? WHERE id = ?", array($data_name,
$data_group_id, $data_op_balance, $data_op_balance_dc, $data_ledger_type_cashbank,
$data_id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating ' . $data_name . ' - Ledger
A/C', 'error');
+ $this->messages->add('Error updating ' . $data_name . ' - Ledger
A/C.', 'error');
$this->logger->write_message("error", "Error updating Ledger A/C
named " . $data_name . " [id:" . $data_id . "]");
$this->template->load('template', 'ledger/edit', $data);
return;
} else {
$this->db->trans_complete();
- $this->messages->add($data_name . ' - Ledger A/C updated successfully',
'success');
+ $this->messages->add($data_name . ' - Ledger A/C updated
successfully.', 'success');
$this->logger->write_message("success", "Updated Ledger A/C
named " . $data_name . " [id:" . $data_id . "]");
redirect('account');
return;
@@ -220,14 +220,14 @@ class Ledger extends Controller {
$id = (int)$id;
if ($id < 1)
{
- $this->messages->add('Invalid Ledger A/C', 'error');
+ $this->messages->add('Invalid Ledger A/C.', 'error');
redirect('account');
return;
}
$data_present_q = $this->db->query("SELECT * FROM voucher_items WHERE
ledger_id = ?", array($id));
if ($data_present_q->num_rows() > 0)
{
- $this->messages->add('Cannot delete non-empty Ledger A/C',
'error');
+ $this->messages->add('Cannot delete non-empty Ledger A/C.',
'error');
redirect('account');
return;
}
@@ -236,7 +236,7 @@ class Ledger extends Controller {
$ledger_q = $this->db->query("SELECT * FROM ledgers WHERE id = ?",
array($id));
if ($ledger_q->num_rows() < 1)
{
- $this->messages->add('Invalid Ledger A/C', 'error');
+ $this->messages->add('Invalid Ledger A/C.', 'error');
redirect('account');
return;
} else {
@@ -248,13 +248,13 @@ class Ledger extends Controller {
if ( ! $this->db->query("DELETE FROM ledgers WHERE id = ?",
array($id)))
{
$this->db->trans_rollback();
- $this->messages->add("Error deleting " . $ledger_data->name .
" - Ledger A/C", 'error');
+ $this->messages->add("Error deleting " . $ledger_data->name .
" - Ledger A/C.", 'error');
$this->logger->write_message("error", "Error deleting Ledger A/C
named " . $ledger_data->name . " [id:" . $id . "]");
redirect('account');
return;
} else {
$this->db->trans_complete();
- $this->messages->add($ledger_data->name . " - Ledger A/C deleted
successfully", 'success');
+ $this->messages->add($ledger_data->name . " - Ledger A/C deleted
successfully.", 'success');
$this->logger->write_message("success", "Deleted Ledger A/C named
" . $ledger_data->name . " [id:" . $id . "]");
redirect('account');
return;
diff --git a/system/application/controllers/log.php
b/system/application/controllers/log.php
index 66730d0..5416c8c 100644
--- a/system/application/controllers/log.php
+++ b/system/application/controllers/log.php
@@ -14,10 +14,10 @@ class Log extends Controller {
{
if ($this->db->query('DELETE FROM logs'))
{
- $this->messages->add('Log cleared', 'success');
+ $this->messages->add('Log cleared.', 'success');
redirect("log");
} else {
- $this->messages->add('Error clearing Log', 'error');
+ $this->messages->add('Error clearing Log.', 'error');
redirect("log");
}
return;
diff --git a/system/application/controllers/report.php
b/system/application/controllers/report.php
index 4179524..ea86ee8 100644
--- a/system/application/controllers/report.php
+++ b/system/application/controllers/report.php
@@ -612,7 +612,7 @@ class Report extends Controller {
/* Checking for valid ledger id */
if ($data['ledger_id'] < 1)
{
- $this->messages->add("Invalid Ledger A/C", 'error');
+ $this->messages->add("Invalid Ledger A/C.", 'error');
redirect("report/ledgerst");
}
$data['report'] = "report/ledgerst";
diff --git a/system/application/controllers/setting.php
b/system/application/controllers/setting.php
index 6162040..f6af99a 100644
--- a/system/application/controllers/setting.php
+++ b/system/application/controllers/setting.php
@@ -135,13 +135,13 @@ class Setting extends Controller {
if ( ! $this->db->query("UPDATE settings SET name = ?, address = ?, email =
?, currency_symbol = ?, date_format = ?, timezone = ? WHERE id = 1",
array($data_account_name, $data_account_address, $data_account_email,
$data_account_currency, $data_account_date, $data_account_timezone)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating settings', 'error');
+ $this->messages->add('Error updating settings.', 'error');
$this->logger->write_message("error", "Error updating account
settings");
$this->template->load('template', 'setting/account', $data);
return;
} else {
$this->db->trans_complete();
- $this->messages->add('Settings updated successfully',
'success');
+ $this->messages->add('Settings updated successfully.',
'success');
$this->logger->write_message("success", "Updated account
settings");
redirect('setting');
return;
@@ -299,7 +299,7 @@ class Setting extends Controller {
/* Check if database ini file exists */
if (get_file_info($ini_file))
{
- $this->messages->add("Account with same label already exists",
'error');
+ $this->messages->add("Account with same label already exists.",
'error');
$this->template->load('template', 'setting/cf', $data);
return;
}
@@ -307,7 +307,7 @@ class Setting extends Controller {
/* Check if start date is less than end date */
if ($data_fy_end <= $data_fy_start)
{
- $this->messages->add("Financial start date cannot be greater than end
date", 'error');
+ $this->messages->add("Financial start date cannot be greater than end
date.", 'error');
$this->template->load('template', 'setting/cf', $data);
return;
}
@@ -329,12 +329,12 @@ class Setting extends Controller {
{
if ($newacc->query("CREATE DATABASE " .
mysql_real_escape_string($data_database_name)))
{
- $this->messages->add("New database created", 'success');
+ $this->messages->add("New database created.", 'success');
/* Retrying to connect to new database */
$newacc = $this->load->database($dsn, TRUE);
$conn_error = $newacc->_error_message();
} else {
- $this->messages->add("Cannot create database", 'error');
+ $this->messages->add("Cannot create database.", 'error');
$this->template->load('template', 'setting/cf', $data);
return;
}
@@ -343,7 +343,7 @@ class Setting extends Controller {
if ( ! $newacc->conn_id)
{
- $this->messages->add("Cannot connecting to database",
'error');
+ $this->messages->add("Cannot connecting to database.",
'error');
$this->template->load('template', 'setting/cf', $data);
return;
} else if ($conn_error != "") {
@@ -351,7 +351,7 @@ class Setting extends Controller {
$this->template->load('template', 'setting/cf', $data);
return;
} else if ($newacc->query("SHOW TABLES")->num_rows() > 0) {
- $this->messages->add("Selected database in not empty",
'error');
+ $this->messages->add("Selected database in not empty.",
'error');
$this->template->load('template', 'setting/cf', $data);
return;
} else {
@@ -370,7 +370,7 @@ class Setting extends Controller {
/* Adding the account settings */
$newacc->query("INSERT INTO settings (id, name, address, email, fy_start,
fy_end, currency_symbol, date_format, timezone, email_protocol, email_host, email_port,
email_username, email_password, database_version) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?)", array(1, $data_account_name, $data_account_address,
$data_account_email, $data_fy_start, $data_fy_end, $data_account_currency,
$data_account_date, $data_account_timezone, $data_account_email_protocol,
$data_account_email_host, $data_account_email_port, $data_account_email_username,
$data_account_email_password, 1));
- $this->messages->add("Successfully created webzash account",
'success');
+ $this->messages->add("Successfully created webzash account.",
'success');
/* Adding account settings to file. Code copied from manage controller */
$con_details = "[database]" . "\r\n" . "db_hostname =
\"" . $data_database_host . "\"" . "\r\n" .
"db_port = \"" . $data_database_port . "\"" .
"\r\n" . "db_name = \"" . $data_database_name .
"\"" . "\r\n" . "db_username = \"" .
$data_database_username . "\"" . "\r\n" . "db_password =
\"" . $data_database_password . "\"" . "\r\n";
@@ -386,7 +386,7 @@ class Setting extends Controller {
{
if ( ! $newacc->query("INSERT INTO groups (id, parent_id, name,
affects_gross) VALUES (?, ?, ?, ?)", array($row->id, $row->parent_id,
$row->name, $row->affects_gross)))
{
- $this->messages->add("Failed to add group " . $row->name,
'error');
+ $this->messages->add("Failed to add group " . $row->name .
'.', 'error');
$cf_status = FALSE;
}
}
@@ -417,13 +417,13 @@ class Setting extends Controller {
}
if ( ! $newacc->query("INSERT INTO ledgers (id, group_id, name, op_balance,
op_balance_dc, type) VALUES (?, ?, ?, ?, ?, ?)", array($row->id,
$row->group_id, $row->name, $op_balance, $op_balance_dc, $row->type)))
{
- $this->messages->add("Failed to add ledger " . $row->name,
'error');
+ $this->messages->add("Failed to add ledger " . $row->name .
'.', 'error');
$cf_status = FALSE;
}
} else {
if ( ! $newacc->query("INSERT INTO ledgers (id, group_id, name, op_balance,
op_balance_dc, type) VALUES (?, ?, ?, ?, ?, ?)", array($row->id,
$row->group_id, $row->name, 0, "D", $row->type)))
{
- $this->messages->add("Failed to add ledger " . $row->name,
'error');
+ $this->messages->add("Failed to add ledger " . $row->name .
'.', 'error');
$cf_status = FALSE;
}
}
@@ -435,23 +435,23 @@ class Setting extends Controller {
{
if ( ! $newacc->query("INSERT INTO tags (id, title, color, background)
VALUES (?, ?, ?, ?)", array($row->id, $row->title, $row->color,
$row->background)))
{
- $this->messages->add("Failed to add tag " . $row->title,
'error');
+ $this->messages->add("Failed to add tag " . $row->title .
'.', 'error');
$cf_status = FALSE;
}
}
if ($cf_status)
- $this->messages->add("Successfully carry forward to new account",
'success');
+ $this->messages->add("Successfully carry forward to new account.",
'success');
else
- $this->messages->add("Error in carry forward to new account",
'error');
+ $this->messages->add("Error in carry forward to new account.",
'error');
/* Writing the connection string to end of file - writing in 'a' append mode
*/
if ( ! write_file($ini_file, $con_details))
{
- $this->messages->add("Failed to add account settings file. Please check
if \"" . $ini_file . "\" file is writable", 'error');
+ $this->messages->add("Failed to add account settings file. Please check
if \"" . $ini_file . "\" file is writable.", 'error');
$this->messages->add("You can manually create a text file \"" .
$ini_file . "\" with the following content :<br /><br />" .
$con_details_html, 'error');
} else {
- $this->messages->add("Successfully added webzash account settings file to
list of active accounts", 'success');
+ $this->messages->add("Successfully added webzash account settings file to
list of active accounts.", 'success');
}
redirect('setting');
@@ -550,13 +550,13 @@ class Setting extends Controller {
if ( ! $this->db->query("UPDATE settings SET email_protocol = ?, email_host
= ?, email_port = ?, email_username = ?, email_password = ? WHERE id = 1",
array($data_email_protocol, $data_email_host, $data_email_port, $data_email_username,
$data_email_password)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating settings', 'error');
+ $this->messages->add('Error updating settings.', 'error');
$this->logger->write_message("error", "Error updating email
settings");
$this->template->load('template', 'setting/email', $data);
return;
} else {
$this->db->trans_complete();
- $this->messages->add('Email settings updated successfully',
'success');
+ $this->messages->add('Email settings updated successfully.',
'success');
$this->logger->write_message("success", "Updated email
settings");
redirect('setting');
return;
@@ -764,13 +764,13 @@ class Setting extends Controller {
if ( ! $this->db->query("UPDATE settings SET print_paper_height = ?,
print_paper_width = ?, print_margin_top = ?, print_margin_bottom = ?, print_margin_left =
?, print_margin_right = ?, print_orientation = ?, print_page_format = ?, print_page_layout
= ?, print_logo = ? WHERE id = 1", array($data_paper_height, $data_paper_width,
$data_margin_top, $data_margin_bottom, $data_margin_left, $data_margin_right,
$data_orientation, $data_output_format, $data_page_layout, $data_logo)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating printer settings',
'error');
+ $this->messages->add('Error updating printer settings.',
'error');
$this->logger->write_message("error", "Error updating printer
settings");
$this->template->load('template', 'setting/printer');
return;
} else {
$this->db->trans_complete();
- $this->messages->add('Printer settings updated successfully',
'success');
+ $this->messages->add('Printer settings updated successfully.',
'success');
$this->logger->write_message("success", "Updated printer
settings");
redirect('setting');
return;
@@ -791,7 +791,7 @@ class Setting extends Controller {
/* Write the backup file to server */
if ( ! write_file($this->config->item('backup_path') . $backup_filename,
$backup_data))
{
- $this->messages->add('Error saving backup file to server.' . '
Please check if "' . $this->config->item('backup_path') .
'" folder is writable', 'error');
+ $this->messages->add('Error saving backup file to server.' . '
Please check if "' . $this->config->item('backup_path') .
'" folder is writable.', 'error');
redirect('setting');
return;
}
@@ -877,13 +877,13 @@ class Setting extends Controller {
if ( ! $this->db->query("UPDATE settings SET receipt_voucher_prefix = ?,
payment_voucher_prefix = ?, contra_voucher_prefix = ?, journal_voucher_prefix = ? WHERE id
= 1", array($data_receipt_prefix, $data_payment_prefix, $data_contra_prefix,
$data_journal_prefix)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating voucher settings',
'error');
+ $this->messages->add('Error updating voucher settings.',
'error');
$this->logger->write_message("error", "Error updating voucher
settings");
$this->template->load('template', 'setting/voucher');
return;
} else {
$this->db->trans_complete();
- $this->messages->add('Voucher settings updated successfully',
'success');
+ $this->messages->add('Voucher settings updated successfully.',
'success');
$this->logger->write_message("success", "Updated voucher
settings");
redirect('setting');
return;
diff --git a/system/application/controllers/tag.php
b/system/application/controllers/tag.php
index 9358a0d..7730cb5 100644
--- a/system/application/controllers/tag.php
+++ b/system/application/controllers/tag.php
@@ -75,13 +75,13 @@ class Tag extends Controller {
if ( ! $this->db->query("INSERT INTO tags (title, color, background) VALUES
(?, ?, ?)", array($data_tag_title, $data_tag_color, $data_tag_background)))
{
$this->db->trans_rollback();
- $this->messages->add('Error addding ' . $data_tag_title . ' -
Tag', 'error');
+ $this->messages->add('Error addding ' . $data_tag_title . ' -
Tag.', 'error');
$this->logger->write_message("error", "Error adding tag named
" . $data_tag_title);
$this->template->load('template', 'tag/add', $data);
return;
} else {
$this->db->trans_complete();
- $this->messages->add("Added " . $data_tag_title . ' - Tag
successfully', 'success');
+ $this->messages->add("Added " . $data_tag_title . ' - Tag
successfully.', 'success');
$this->logger->write_message("success", "Added tag named "
. $data_tag_title);
redirect('tag');
return;
@@ -99,7 +99,7 @@ class Tag extends Controller {
$id = $this->input->xss_clean($id);
$id = (int)$id;
if ($id < 1) {
- $this->messages->add('Invalid Tag', 'error');
+ $this->messages->add('Invalid Tag.', 'error');
redirect('tag');
return;
}
@@ -108,7 +108,7 @@ class Tag extends Controller {
$tag_data_q = $this->db->query("SELECT * FROM tags WHERE id = ?",
array($id));
if ($tag_data_q->num_rows() < 1)
{
- $this->messages->add('Invalid Tag', 'error');
+ $this->messages->add('Invalid Tag.', 'error');
redirect('tag');
return;
}
@@ -169,13 +169,13 @@ class Tag extends Controller {
if ( ! $this->db->query("UPDATE tags SET title = ?, color = ?, background =
? WHERE id = ?", array($data_tag_title, $data_tag_color, $data_tag_background,
$id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating ' . $data_tag_title . ' -
Tag', 'error');
+ $this->messages->add('Error updating ' . $data_tag_title . ' -
Tag.', 'error');
$this->logger->write_message("error", "Error updating tag named
" . $data_tag_title . " [id:" . $id . "]");
$this->template->load('template', 'tag/edit', $data);
return;
} else {
$this->db->trans_complete();
- $this->messages->add("Updated " . $data_tag_title . ' - Tag
successfully', 'success');
+ $this->messages->add("Updated " . $data_tag_title . ' - Tag
successfully.', 'success');
$this->logger->write_message("success", "Updated tag named
" . $data_tag_title . " [id:" . $id . "]");
redirect('tag');
return;
@@ -191,14 +191,14 @@ class Tag extends Controller {
$id = $this->input->xss_clean($id);
$id = (int)$id;
if ($id < 1) {
- $this->messages->add('Invalid Tag', 'error');
+ $this->messages->add('Invalid Tag.', 'error');
redirect('tag');
return;
}
$data_valid_q = $this->db->query("SELECT * FROM tags WHERE id = ?",
array($id));
if ($data_valid_q->num_rows() < 1)
{
- $this->messages->add('Invalid Tag specified', 'error');
+ $this->messages->add('Invalid Tag specified.', 'error');
redirect('tag');
return;
}
@@ -209,7 +209,7 @@ class Tag extends Controller {
if ( ! $this->db->query("UPDATE vouchers SET tag_id = 0 WHERE tag_id =
?", array($id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error removing Tags', 'error');
+ $this->messages->add('Error removing Tags.', 'error');
$this->logger->write_message("error", "Error removing tag named
" . $data_tag->title . " [id:" . $id . "] from vouchers");
redirect('tag');
return;
@@ -217,13 +217,13 @@ class Tag extends Controller {
if ( ! $this->db->query("DELETE FROM tags WHERE id = ?", array($id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error deleting Tag', 'error');
+ $this->messages->add('Error deleting Tag.', 'error');
$this->logger->write_message("error", "Error deleting tag named
" . $data_tag->title . " [id:" . $id . "]");
redirect('tag');
return;
} else {
$this->db->trans_complete();
- $this->messages->add('Tag deleted successfully', 'success');
+ $this->messages->add('Tag deleted successfully.', 'success');
$this->logger->write_message("success", "Deleted tag named
" . $data_tag->title . " [id:" . $id . "]");
redirect('tag');
return;
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 815d7f5..e6f8809 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -63,7 +63,7 @@ class Voucher extends Controller {
$data['voucher_type'] = "";
break;
default :
- $this->messages->add('Invalid voucher type', 'error');
+ $this->messages->add('Invalid voucher type.', 'error');
redirect('voucher/show/all');
return;
break;
@@ -118,7 +118,7 @@ class Voucher extends Controller {
if ($voucher_type_int > 5)
{
- $this->messages->add('Invalid voucher type', 'error');
+ $this->messages->add('Invalid voucher type.', 'error');
redirect('voucher/show/all');
return;
} else if ($voucher_type == "draft") {
@@ -216,7 +216,7 @@ class Voucher extends Controller {
$this->template->set('page_title', 'View Journal Voucher');
break;
default :
- $this->messages->add('Invalid voucher type', 'error');
+ $this->messages->add('Invalid voucher type.', 'error');
redirect('voucher/show/all');
return;
break;
@@ -225,14 +225,14 @@ class Voucher extends Controller {
/* Load current voucher details */
if ( ! $cur_voucher = $this->Voucher_model->get_voucher($voucher_id,
$voucher_type))
{
- $this->messages->add('Invalid Voucher', 'error');
+ $this->messages->add('Invalid Voucher.', 'error');
redirect('voucher/show/' . $voucher_type);
return;
}
/* Load current voucher details */
if ( ! $cur_voucher_ledgers = $this->db->query("SELECT * FROM voucher_items
WHERE voucher_id = ? ORDER BY id ASC", array($voucher_id)))
{
- $this->messages->add('Voucher has no associated ledger data',
'error');
+ $this->messages->add('Voucher has no associated ledger data.',
'error');
}
$data['cur_voucher'] = $cur_voucher;
$data['cur_voucher_ledgers'] = $cur_voucher_ledgers;
@@ -258,7 +258,7 @@ class Voucher extends Controller {
$this->template->set('page_title', 'New Journal Voucher');
break;
default :
- $this->messages->add('Invalid voucher type', 'error');
+ $this->messages->add('Invalid voucher type.', 'error');
redirect('voucher/show/all');
return;
break;
@@ -373,7 +373,7 @@ class Voucher extends Controller {
$this->template->load('template', 'voucher/add', $data);
return;
} else if ($dr_total == 0 && $cr_total == 0) {
- $this->messages->add('Cannot save empty voucher', 'error');
+ $this->messages->add('Cannot save empty voucher.', 'error');
$this->template->load('template', 'voucher/add', $data);
return;
}
@@ -405,7 +405,7 @@ class Voucher extends Controller {
if ( ! $this->db->query("INSERT INTO vouchers (number, date, narration,
draft, type, tag_id) VALUES (?, ?, ?, ?, ?, ?)", array($data_number, $data_date,
$data_narration, $data_draft, $data_type, $data_tag)))
{
$this->db->trans_rollback();
- $this->messages->add('Error addding Voucher A/C', 'error');
+ $this->messages->add('Error addding Voucher A/C.', 'error');
$this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " since failed inserting
voucher");
$this->template->load('template', 'voucher/add', $data);
return;
@@ -440,7 +440,7 @@ class Voucher extends Controller {
if ( ! $this->db->query("INSERT INTO voucher_items (voucher_id, ledger_id,
amount, dc) VALUES (?, ?, ?, ?)", array($voucher_id, $data_ledger_id, $data_amount,
$data_ledger_dc)))
{
$this->db->trans_rollback();
- $this->messages->add('Error addding Ledger A/C ' . $data_ledger_id,
'error');
+ $this->messages->add('Error addding Ledger A/C ' . $data_ledger_id .
'.', 'error');
$this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " since failed inserting
voucher ledger items " . "[id:" . $data_ledger_id . "]");
$this->template->load('template', 'voucher/add', $data);
return;
@@ -451,7 +451,7 @@ class Voucher extends Controller {
if ( ! $this->db->query("UPDATE vouchers SET dr_total = ?, cr_total = ?
WHERE id = ?", array($dr_total, $cr_total, $voucher_id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating voucher total', 'error');
+ $this->messages->add('Error updating voucher total.',
'error');
$this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " since failed updating debit
and credit total");
$this->template->load('template', 'voucher/add', $data);
return;
@@ -459,7 +459,7 @@ class Voucher extends Controller {
/* Success */
$this->db->trans_complete();
- $this->messages->add(ucfirst($voucher_type) . ' Voucher number ' .
voucher_number_prefix($voucher_type) . $data_number . ' added successfully',
'success');
+ $this->messages->add(ucfirst($voucher_type) . ' Voucher number ' .
voucher_number_prefix($voucher_type) . $data_number . ' added successfully.',
'success');
$this->logger->write_message("success", "Added " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number);
redirect('voucher/show/' . $voucher_type);
$this->template->load('template', 'voucher/add', $data);
@@ -485,7 +485,7 @@ class Voucher extends Controller {
$this->template->set('page_title', 'Edit Journal Voucher');
break;
default :
- $this->messages->add('Invalid voucher type', 'error');
+ $this->messages->add('Invalid voucher type.', 'error');
redirect('voucher/show/all');
return;
break;
@@ -494,7 +494,7 @@ class Voucher extends Controller {
/* Load current voucher details */
if ( ! $cur_voucher = $this->Voucher_model->get_voucher($voucher_id,
$voucher_type))
{
- $this->messages->add('Invalid Voucher', 'error');
+ $this->messages->add('Invalid Voucher.', 'error');
redirect('voucher/show/' . $voucher_type);
return;
}
@@ -629,7 +629,7 @@ class Voucher extends Controller {
$this->template->load('template', 'voucher/edit', $data);
return;
} else if ($dr_total == 0 && $cr_total == 0) {
- $this->messages->add('Cannot save empty voucher', 'error');
+ $this->messages->add('Cannot save empty voucher.', 'error');
$this->template->load('template', 'voucher/edit', $data);
return;
}
@@ -660,7 +660,7 @@ class Voucher extends Controller {
if ( ! $this->db->query("UPDATE vouchers SET number = ?, date = ?,
narration = ?, draft = ?, tag_id = ? WHERE id = ?", array($data_number, $data_date,
$data_narration, $data_draft, $data_tag, $voucher_id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating Voucher A/C', 'error');
+ $this->messages->add('Error updating Voucher A/C.', 'error');
$this->logger->write_message("error", "Error updating voucher
details for " . ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " [id:" . $voucher_id .
"]");
$this->template->load('template', 'voucher/edit', $data);
return;
@@ -703,7 +703,7 @@ class Voucher extends Controller {
if ( ! $this->db->query("INSERT INTO voucher_items (voucher_id, ledger_id,
amount, dc) VALUES (?, ?, ?, ?)", array($voucher_id, $data_ledger_id, $data_amount,
$data_ledger_dc)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating Ledger A/C ' . $data_ledger_id,
'error');
+ $this->messages->add('Error updating Ledger A/C ' . $data_ledger_id .
'.', 'error');
$this->logger->write_message("error", "Error updating new
voucher item [id:" . $data_ledger_id . "] for " . ucfirst($voucher_type) .
" Voucher number " . voucher_number_prefix($voucher_type) . $data_number .
" [id:" . $voucher_id . "]");
$this->template->load('template', 'voucher/edit', $data);
return;
@@ -714,7 +714,7 @@ class Voucher extends Controller {
if ( ! $this->db->query("UPDATE vouchers SET dr_total = ?, cr_total = ?
WHERE id = ?", array($dr_total, $cr_total, $voucher_id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error updating voucher total', 'error');
+ $this->messages->add('Error updating voucher total.',
'error');
$this->logger->write_message("error", "Error updating voucher
total for " . ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " [id:" . $voucher_id .
"]");
$this->template->load('template', 'voucher/edit', $data);
return;
@@ -722,7 +722,7 @@ class Voucher extends Controller {
/* Success */
$this->db->trans_complete();
- $this->messages->add(ucfirst($voucher_type) . ' Voucher number ' .
voucher_number_prefix($voucher_type) . $data_number . ' updated successfully',
'success');
+ $this->messages->add(ucfirst($voucher_type) . ' Voucher number ' .
voucher_number_prefix($voucher_type) . $data_number . ' updated successfully.',
'success');
$this->logger->write_message("success", "Updated " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " [id:" . $voucher_id .
"]");
redirect('voucher/show/' . $voucher_type);
return;
@@ -735,7 +735,7 @@ class Voucher extends Controller {
/* Load current voucher details */
if ( ! $cur_voucher = $this->Voucher_model->get_voucher($voucher_id,
$voucher_type))
{
- $this->messages->add('Invalid Voucher', 'error');
+ $this->messages->add('Invalid Voucher.', 'error');
redirect('voucher/show/' . $voucher_type);
return;
}
@@ -744,7 +744,7 @@ class Voucher extends Controller {
if ( ! $this->db->query("DELETE FROM voucher_items WHERE voucher_id =
?", array($voucher_id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error deleting Voucher - Ledgers entry',
'error');
+ $this->messages->add('Error deleting Voucher - Ledgers entry.',
'error');
$this->logger->write_message("error", "Error deleting ledger
entries for " . ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . " [id:" .
$voucher_id . "]");
redirect('voucher/' . $voucher_type . '/' . $voucher_id);
return;
@@ -752,13 +752,13 @@ class Voucher extends Controller {
if ( ! $this->db->query("DELETE FROM vouchers WHERE id = ?",
array($voucher_id)))
{
$this->db->trans_rollback();
- $this->messages->add('Error deleting Voucher entry', 'error');
+ $this->messages->add('Error deleting Voucher entry.', 'error');
$this->logger->write_message("error", "Error deleting voucher
entry for " . ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . " [id:" .
$voucher_id . "]");
redirect('voucher/' . $voucher_type . '/' . $voucher_id);
return;
}
$this->db->trans_complete();
- $this->messages->add('Voucher deleted successfully', 'success');
+ $this->messages->add('Voucher deleted successfully.',
'success');
$this->logger->write_message("success", "Deleted " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . " [id:" .
$voucher_id . "]");
redirect('voucher/show/' . $voucher_type);
return;
@@ -774,7 +774,7 @@ class Voucher extends Controller {
/* Load current voucher details */
if ( ! $cur_voucher = $this->Voucher_model->get_voucher($voucher_id,
$voucher_type))
{
- $this->messages->add('Invalid Voucher', 'error');
+ $this->messages->add('Invalid Voucher.', 'error');
redirect('voucher/show/' . $voucher_type);
return;
}
@@ -821,7 +821,7 @@ class Voucher extends Controller {
/* Load current voucher details */
if ( ! $cur_voucher = $this->Voucher_model->get_voucher($voucher_id,
$voucher_type))
{
- $this->messages->add('Invalid Voucher', 'error');
+ $this->messages->add('Invalid Voucher.', 'error');
redirect('voucher/show/' . $voucher_type);
return;
}
commit 7026309d8dfdf4c4544141144e11789ee9b74a44
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Sat Dec 18 11:52:29 2010 +0530
Added accounts backup
- Created backups directory
- Added .htaccess file to backups directory to prevent unauthorized
access
- Added config file settings backup_path
- Added permission checks for backups directory
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/backups/.htaccess b/backups/.htaccess
new file mode 100644
index 0000000..8d2f256
--- /dev/null
+++ b/backups/.htaccess
@@ -0,0 +1 @@
+deny from all
diff --git a/system/application/config/config.php b/system/application/config/config.php
index a5cd306..5c95641 100644
--- a/system/application/config/config.php
+++ b/system/application/config/config.php
@@ -358,5 +358,15 @@ $config['asset_path'] =
'system/application/assets/';
*/
$config['config_path'] = 'config/';
+/*
+|--------------------------------------------------------------------------
+| Custom : Backup Path
+|--------------------------------------------------------------------------
+|
+| Sets the base backup path for all account backups
+|
+*/
+$config['backup_path'] = 'backups/';
+
/* End of file config.php */
/* Location: ./system/application/config/config.php */
diff --git a/system/application/controllers/admin/welcome.php
b/system/application/controllers/admin/welcome.php
index 2526902..4db7c31 100644
--- a/system/application/controllers/admin/welcome.php
+++ b/system/application/controllers/admin/welcome.php
@@ -152,15 +152,22 @@ class Welcome extends Controller {
$check_path = $this->config->item('config_path') .
"settings/";
if (! is_writable($check_path))
{
- $this->messages->add('Application settings directory "' .
$check_path . '" is not writable. You will not able able to save or edit any
application related settings.', 'error');
+ $this->messages->add('Application settings directory "' .
$check_path . '" is not writable. You will not able to save or edit any
application related settings.', 'error');
}
$check_path = $this->config->item('config_path') .
"accounts/";
if (! is_writable($check_path))
{
- $this->messages->add('Account settings directory "' . $check_path .
'" is not writable. You will not able able to save or edit any account related
settings.', 'error');
+ $this->messages->add('Account settings directory "' . $check_path .
'" is not writable. You will not able to save or edit any account related
settings.', 'error');
}
+ $check_path = $this->config->item('backup_path');
+ if (! is_writable($check_path))
+ {
+ $this->messages->add('Backup directory "' . $check_path .
'" is not writable. You will not able to save or download any backups.',
'error');
+ }
+
+ /* Security checks */
$check_path = $this->config->item('config_path');
if (substr(symbolic_permissions(fileperms($check_path)), -3, 1) == "r")
{
@@ -190,6 +197,16 @@ class Welcome extends Controller {
{
$this->messages->add('Security Risk ! The application settings directory
"' . $check_path . '" is world writeable.', 'error');
}
+
+ $check_path = $this->config->item('backup_path');
+ if (substr(symbolic_permissions(fileperms($check_path)), -3, 1) == "r")
+ {
+ $this->messages->add('Security Risk ! The application backup directory
"' . $check_path . '" is world readable.', 'error');
+ }
+ if (substr(symbolic_permissions(fileperms($check_path)), -2, 1) == "W")
+ {
+ $this->messages->add('Security Risk ! The application backup directory
"' . $check_path . '" is world writeable.', 'error');
+ }
}
}
diff --git a/system/application/controllers/setting.php
b/system/application/controllers/setting.php
index 6eefd5f..6162040 100644
--- a/system/application/controllers/setting.php
+++ b/system/application/controllers/setting.php
@@ -789,9 +789,9 @@ class Setting extends Controller {
$backup_data =& $this->dbutil->backup();
/* Write the backup file to server */
- if ( ! write_file('system/application/backups/' . $backup_filename,
$backup_data))
+ if ( ! write_file($this->config->item('backup_path') . $backup_filename,
$backup_data))
{
- $this->messages->add('Error saving backup file to server.' . '
Please check if "system/application/backups/" folder is writable',
'error');
+ $this->messages->add('Error saving backup file to server.' . '
Please check if "' . $this->config->item('backup_path') .
'" folder is writable', 'error');
redirect('setting');
return;
}
commit aa6bfd448e87d48ec5e6f4c3f83353a0b7340510
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Sat Dec 18 11:34:32 2010 +0530
Check permissions of /config directory
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/admin/welcome.php
b/system/application/controllers/admin/welcome.php
index a36d67a..2526902 100644
--- a/system/application/controllers/admin/welcome.php
+++ b/system/application/controllers/admin/welcome.php
@@ -139,9 +139,58 @@ class Welcome extends Controller {
if ($data['current_account'] == "")
$data['current_account'] = "No account is currently active. You can
" . anchor('admin/create', 'create', array('title' =>
'Create a new account', 'style' => 'color:#000000')) . " a
new account or " . anchor('admin/active', 'activate',
array('title' => 'Activate a existing account', 'style' =>
'color:#000000')) . " an existing account";
+ /* check for permissions */
+ $this->_check_permissions();
+
$this->template->load('admin_template', 'admin/welcome', $data);
return;
}
+
+ /* Check application file permissions for any security related issues */
+ function _check_permissions()
+ {
+ $check_path = $this->config->item('config_path') .
"settings/";
+ if (! is_writable($check_path))
+ {
+ $this->messages->add('Application settings directory "' .
$check_path . '" is not writable. You will not able able to save or edit any
application related settings.', 'error');
+ }
+
+ $check_path = $this->config->item('config_path') .
"accounts/";
+ if (! is_writable($check_path))
+ {
+ $this->messages->add('Account settings directory "' . $check_path .
'" is not writable. You will not able able to save or edit any account related
settings.', 'error');
+ }
+
+ $check_path = $this->config->item('config_path');
+ if (substr(symbolic_permissions(fileperms($check_path)), -3, 1) == "r")
+ {
+ $this->messages->add('Security Risk ! The application config directory
"' . $check_path . '" is world readable.', 'error');
+ }
+ if (substr(symbolic_permissions(fileperms($check_path)), -2, 1) == "W")
+ {
+ $this->messages->add('Security Risk ! The application config directory
"' . $check_path . '" is world writeable.', 'error');
+ }
+
+ $check_path = $this->config->item('config_path') .
"accounts/";
+ if (substr(symbolic_permissions(fileperms($check_path)), -3, 1) == "r")
+ {
+ $this->messages->add('Security Risk ! The application accounts directory
"' . $check_path . '" is world readable.', 'error');
+ }
+ if (substr(symbolic_permissions(fileperms($check_path)), -2, 1) == "W")
+ {
+ $this->messages->add('Security Risk ! The application accounts directory
"' . $check_path . '" is world writeable.', 'error');
+ }
+
+ $check_path = $this->config->item('config_path') .
"settings/";
+ if (substr(symbolic_permissions(fileperms($check_path)), -3, 1) == "r")
+ {
+ $this->messages->add('Security Risk ! The application settings directory
"' . $check_path . '" is world readable.', 'error');
+ }
+ if (substr(symbolic_permissions(fileperms($check_path)), -2, 1) == "W")
+ {
+ $this->messages->add('Security Risk ! The application settings directory
"' . $check_path . '" is world writeable.', 'error');
+ }
+ }
}
/* End of file welcome.php */
commit 5b58fc9ec6e9b6b9ebb9b8023a5700d37b7b1ee7
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Sat Dec 18 11:34:07 2010 +0530
Removed label column from settings table
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/admin/carryforward.sql
b/system/application/controllers/admin/carryforward.sql
index 17ffdbe..d7b5037 100644
--- a/system/application/controllers/admin/carryforward.sql
+++ b/system/application/controllers/admin/carryforward.sql
@@ -18,7 +18,6 @@ CREATE TABLE IF NOT EXISTS ledgers (
CREATE TABLE IF NOT EXISTS settings (
id int(1) NOT NULL,
- label varchar(255) NOT NULL,
name varchar(100) NOT NULL,
address varchar(255) NOT NULL,
email varchar(100) NOT NULL,
diff --git a/system/application/controllers/admin/create.php
b/system/application/controllers/admin/create.php
index 0f5a9d7..6157126 100644
--- a/system/application/controllers/admin/create.php
+++ b/system/application/controllers/admin/create.php
@@ -273,7 +273,7 @@ class Create extends Controller {
}
/* Adding the account settings */
- $newacc->query("INSERT INTO settings (id, label, name, address, email,
fy_start, fy_end, currency_symbol, date_format, timezone, database_version) VALUES (?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?)", array(1, "", $data_account_name,
$data_account_address, $data_account_email, $data_fy_start, $data_fy_end,
$data_account_currency, $data_account_date, $data_account_timezone, 1));
+ $newacc->query("INSERT INTO settings (id, name, address, email, fy_start,
fy_end, currency_symbol, date_format, timezone, database_version) VALUES (?, ?, ?, ?, ?,
?, ?, ?, ?, ?)", array(1, $data_account_name, $data_account_address,
$data_account_email, $data_fy_start, $data_fy_end, $data_account_currency,
$data_account_date, $data_account_timezone, 1));
$this->messages->add("Successfully created webzash account",
'success');
/* Adding account settings to file. Code copied from manage controller */
diff --git a/system/application/controllers/admin/database.sql
b/system/application/controllers/admin/database.sql
index db58541..ffdf48f 100644
--- a/system/application/controllers/admin/database.sql
+++ b/system/application/controllers/admin/database.sql
@@ -18,7 +18,6 @@ CREATE TABLE IF NOT EXISTS ledgers (
CREATE TABLE IF NOT EXISTS settings (
id int(1) NOT NULL,
- label varchar(255) NOT NULL,
name varchar(100) NOT NULL,
address varchar(255) NOT NULL,
email varchar(100) NOT NULL,
diff --git a/system/application/controllers/setting.php
b/system/application/controllers/setting.php
index 4d9d1db..6eefd5f 100644
--- a/system/application/controllers/setting.php
+++ b/system/application/controllers/setting.php
@@ -368,7 +368,7 @@ class Setting extends Controller {
}
/* Adding the account settings */
- $newacc->query("INSERT INTO settings (id, label, name, address, email,
fy_start, fy_end, currency_symbol, date_format, timezone, email_protocol, email_host,
email_port, email_username, email_password, database_version) VALUES (?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", array(1, "", $data_account_name,
$data_account_address, $data_account_email, $data_fy_start, $data_fy_end,
$data_account_currency, $data_account_date, $data_account_timezone,
$data_account_email_protocol, $data_account_email_host, $data_account_email_port,
$data_account_email_username, $data_account_email_password, 1));
+ $newacc->query("INSERT INTO settings (id, name, address, email, fy_start,
fy_end, currency_symbol, date_format, timezone, email_protocol, email_host, email_port,
email_username, email_password, database_version) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?)", array(1, $data_account_name, $data_account_address,
$data_account_email, $data_fy_start, $data_fy_end, $data_account_currency,
$data_account_date, $data_account_timezone, $data_account_email_protocol,
$data_account_email_host, $data_account_email_port, $data_account_email_username,
$data_account_email_password, 1));
$this->messages->add("Successfully created webzash account",
'success');
commit 78c8c7e4902ed1ef0f2a8224f34ad8808f2e75fb
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Sat Dec 18 10:47:49 2010 +0530
Moved the settings files in root folder
- Added the config directory to the root of application
- Added .htaccess to prevent direct access to it
- Added a config settings named config_path that can be changed
- Updated the application throughout to use this new config_path
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/config/.htaccess b/config/.htaccess
new file mode 100644
index 0000000..8d2f256
--- /dev/null
+++ b/config/.htaccess
@@ -0,0 +1 @@
+deny from all
diff --git a/config/accounts/index.html b/config/accounts/index.html
new file mode 100644
index 0000000..c942a79
--- /dev/null
+++ b/config/accounts/index.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+ <title>403 Forbidden</title>
+</head>
+<body>
+
+<p>Directory access is forbidden.</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/config/accounts/sample.ini b/config/accounts/sample.ini
new file mode 100644
index 0000000..2f8fa22
--- /dev/null
+++ b/config/accounts/sample.ini
@@ -0,0 +1,7 @@
+[database]
+db_hostname = "localhost"
+db_port = "3306"
+db_name = "wz_webzash"
+db_username = "root"
+db_password = ""
+
diff --git a/config/accounts/test.ini b/config/accounts/test.ini
new file mode 100644
index 0000000..c04d401
--- /dev/null
+++ b/config/accounts/test.ini
@@ -0,0 +1,7 @@
+[database]
+db_hostname = "localhost"
+db_port = "3306"
+db_name = "testing"
+db_username = "root"
+db_password = ""
+
diff --git a/config/settings/general.ini b/config/settings/general.ini
new file mode 100644
index 0000000..037e2ae
--- /dev/null
+++ b/config/settings/general.ini
@@ -0,0 +1,3 @@
+[general]
+row_count = "10"
+
diff --git a/system/application/config/accounts/index.html
b/system/application/config/accounts/index.html
deleted file mode 100644
index c942a79..0000000
--- a/system/application/config/accounts/index.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<html>
-<head>
- <title>403 Forbidden</title>
-</head>
-<body>
-
-<p>Directory access is forbidden.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/system/application/config/accounts/sample.ini
b/system/application/config/accounts/sample.ini
deleted file mode 100644
index 2f8fa22..0000000
--- a/system/application/config/accounts/sample.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[database]
-db_hostname = "localhost"
-db_port = "3306"
-db_name = "wz_webzash"
-db_username = "root"
-db_password = ""
-
diff --git a/system/application/config/accounts/test.ini
b/system/application/config/accounts/test.ini
deleted file mode 100644
index c04d401..0000000
--- a/system/application/config/accounts/test.ini
+++ /dev/null
@@ -1,7 +0,0 @@
-[database]
-db_hostname = "localhost"
-db_port = "3306"
-db_name = "testing"
-db_username = "root"
-db_password = ""
-
diff --git a/system/application/config/config.php b/system/application/config/config.php
index 08e7d6d..a5cd306 100644
--- a/system/application/config/config.php
+++ b/system/application/config/config.php
@@ -348,5 +348,15 @@ $config['proxy_ips'] = '';
*/
$config['asset_path'] = 'system/application/assets/';
+/*
+|--------------------------------------------------------------------------
+| Custom : Config Path
+|--------------------------------------------------------------------------
+|
+| Sets the base config path for all account related settings
+|
+*/
+$config['config_path'] = 'config/';
+
/* End of file config.php */
/* Location: ./system/application/config/config.php */
diff --git a/system/application/config/general.ini
b/system/application/config/general.ini
deleted file mode 100644
index 037e2ae..0000000
--- a/system/application/config/general.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[general]
-row_count = "10"
-
diff --git a/system/application/controllers/admin/active.php
b/system/application/controllers/admin/active.php
index 30b2210..f6780fb 100644
--- a/system/application/controllers/admin/active.php
+++ b/system/application/controllers/admin/active.php
@@ -21,8 +21,8 @@ class Active extends Controller {
$data['account'] = "";
}
- /* Getting list of files in the config/accounts directory */
- $accounts_list = get_filenames('system/application/config/accounts');
+ /* Getting list of files in the config - accounts directory */
+ $accounts_list = get_filenames($this->config->item('config_path') .
'accounts');
$data['accounts'] = array();
if ($accounts_list)
{
@@ -64,7 +64,7 @@ class Active extends Controller {
} else {
$db_label = $this->input->post('account', TRUE);
}
- $ini_file = "system/application/config/accounts/" . $db_label .
".ini";
+ $ini_file = $this->config->item('config_path') . "accounts/" .
$db_label . ".ini";
/* Check if database ini file exists */
if ( ! get_file_info($ini_file))
diff --git a/system/application/controllers/admin/create.php
b/system/application/controllers/admin/create.php
index 22fb2ea..0f5a9d7 100644
--- a/system/application/controllers/admin/create.php
+++ b/system/application/controllers/admin/create.php
@@ -199,7 +199,7 @@ class Create extends Controller {
$data_database_username = $this->input->post('database_username',
TRUE);
$data_database_password = $this->input->post('database_password',
TRUE);
- $ini_file = "system/application/config/accounts/" . $data_account_label .
".ini";
+ $ini_file = $this->config->item('config_path') . "accounts/" .
$data_account_label . ".ini";
/* Check if database ini file exists */
if (get_file_info($ini_file))
diff --git a/system/application/controllers/admin/manage.php
b/system/application/controllers/admin/manage.php
index 33c3cc1..689431e 100644
--- a/system/application/controllers/admin/manage.php
+++ b/system/application/controllers/admin/manage.php
@@ -14,8 +14,8 @@ class Manage extends Controller {
$this->template->set('page_title', 'Manage webzash accounts');
$this->template->set('nav_links', array('admin/manage/add' =>
'New account'));
- /* Getting list of files in the config/accounts directory */
- $accounts_list = get_filenames('system/application/config/accounts');
+ /* Getting list of files in the config - accounts directory */
+ $accounts_list = get_filenames($this->config->item('config_path') .
'accounts');
$data['accounts'] = array();
if ($accounts_list)
{
@@ -119,7 +119,7 @@ class Manage extends Controller {
$data_database_username = $this->input->post('database_username',
TRUE);
$data_database_password = $this->input->post('database_password',
TRUE);
- $ini_file = "system/application/config/accounts/" . $data_database_label .
".ini";
+ $ini_file = $this->config->item('config_path') . "accounts/" .
$data_database_label . ".ini";
/* Check if database ini file exists */
if (get_file_info($ini_file))
@@ -153,7 +153,7 @@ class Manage extends Controller {
{
$this->template->set('page_title', 'Edit a webzash account');
- $ini_file = "system/application/config/accounts/" . $database_label .
".ini";
+ $ini_file = $this->config->item('config_path') . "accounts/" .
$database_label . ".ini";
/* Form fields */
$data['database_name'] = array(
@@ -262,7 +262,7 @@ class Manage extends Controller {
$data_database_username = $this->input->post('database_username',
TRUE);
$data_database_password = $this->input->post('database_password',
TRUE);
- $ini_file = "system/application/config/accounts/" . $database_label .
".ini";
+ $ini_file = $this->config->item('config_path') . "accounts/" .
$database_label . ".ini";
$con_details = "[database]" . "\r\n" . "db_hostname =
\"" . $data_database_host . "\"" . "\r\n" .
"db_port = \"" . $data_database_port . "\"" .
"\r\n" . "db_name = \"" . $data_database_name .
"\"" . "\r\n" . "db_username = \"" .
$data_database_username . "\"" . "\r\n" . "db_password =
\"" . $data_database_password . "\"" . "\r\n";
@@ -288,7 +288,7 @@ class Manage extends Controller {
{
$this->template->set('page_title', 'Delete a webzash account');
- $ini_file = "system/application/config/accounts/" . $database_label .
".ini";
+ $ini_file = $this->config->item('config_path') . "accounts/" .
$database_label . ".ini";
$this->messages->add("Please delete " . $ini_file . " file
manually", 'error');
$this->messages->add("Note that only the settings file will be delete.
Account database will have to be deleted manually", 'status');
/*
diff --git a/system/application/controllers/admin/setting.php
b/system/application/controllers/admin/setting.php
index 0ab3611..0f70ab5 100644
--- a/system/application/controllers/admin/setting.php
+++ b/system/application/controllers/admin/setting.php
@@ -16,7 +16,7 @@ class Setting extends Controller {
$data['row_count'] = 20;
/* Loading settings from ini file */
- $ini_file = "system/application/config/general.ini";
+ $ini_file = $this->config->item('config_path') .
"settings/general.ini";
/* Check if database ini file exists */
if (get_file_info($ini_file))
diff --git a/system/application/controllers/admin/welcome.php
b/system/application/controllers/admin/welcome.php
index 59112b1..a36d67a 100644
--- a/system/application/controllers/admin/welcome.php
+++ b/system/application/controllers/admin/welcome.php
@@ -22,7 +22,7 @@ class Welcome extends Controller {
/* Fetching database label details from session */
$db_active_label = $this->session->userdata('db_active_label');
- $ini_file = "system/application/config/accounts/" . $db_active_label .
".ini";
+ $ini_file = $this->config->item('config_path') . "accounts/" .
$db_active_label . ".ini";
/* Check if database ini file exists */
if ( ! get_file_info($ini_file))
diff --git a/system/application/controllers/setting.php
b/system/application/controllers/setting.php
index 2722ceb..4d9d1db 100644
--- a/system/application/controllers/setting.php
+++ b/system/application/controllers/setting.php
@@ -294,7 +294,7 @@ class Setting extends Controller {
$data_database_username = $this->input->post('database_username',
TRUE);
$data_database_password = $this->input->post('database_password',
TRUE);
- $ini_file = "system/application/config/accounts/" . $data_account_label .
".ini";
+ $ini_file = $this->config->item('config_path') . "accounts/" .
$data_account_label . ".ini";
/* Check if database ini file exists */
if (get_file_info($ini_file))
diff --git a/system/application/libraries/Startup.php
b/system/application/libraries/Startup.php
index f7b52ea..1c9129b 100644
--- a/system/application/libraries/Startup.php
+++ b/system/application/libraries/Startup.php
@@ -24,7 +24,7 @@ class Startup
{
/* Fetching database label details from session */
$db_active_label = $CI->session->userdata('db_active_label');
- $ini_file = "system/application/config/accounts/" . $db_active_label .
".ini";
+ $ini_file = $CI->config->item('config_path') . "accounts/" .
$db_active_label . ".ini";
/* Check if database ini file exists */
if ( ! get_file_info($ini_file))
@@ -150,7 +150,7 @@ class Startup
$CI->config->set_item('account_journal_prefix',
$account_d->journal_voucher_prefix);
/************** Load general application settings *************/
- $setting_ini_file = "system/application/config/general.ini";
+ $setting_ini_file = $CI->config->item('config_path') .
"settings/general.ini";
$CI->config->set_item('row_count', 20);
/* Check if general application settings ini file exists */
diff --git a/system/application/views/admin/manage/index.php
b/system/application/views/admin/manage/index.php
index 23d07af..8c7561e 100644
--- a/system/application/views/admin/manage/index.php
+++ b/system/application/views/admin/manage/index.php
@@ -10,7 +10,7 @@ echo "<tbody>";
$odd_even = "odd";
foreach ($accounts as $label)
{
- $ini_file = "system/application/config/accounts/" . $label .
".ini";
+ $ini_file = $this->config->item('config_path') . "accounts/" .
$label . ".ini";
/* Check if database ini file exists */
if (get_file_info($ini_file))
commit 42bc119ae13153087e28efa3e81f357e39b5f6fe
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Fri Dec 17 17:28:12 2010 +0530
Added Download Voucher links and icon
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/images/icons/download.png
b/system/application/assets/images/icons/download.png
new file mode 100644
index 0000000..9b36fc3
Binary files /dev/null and b/system/application/assets/images/icons/download.png differ
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index efa302c..815d7f5 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -183,7 +183,9 @@ class Voucher extends Controller {
$html .= " " . anchor_popup('voucher/printpreview/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/print.png", 'border' =>
'0', 'alt' => 'Print ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Print ' . ucfirst($html_voucher_type)
. ' Voucher', 'width' => '600', 'height' =>
'600')) . " ";
- $html .= " " . anchor_popup('voucher/email/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/email.png", 'border' =>
'0', 'alt' => 'Email ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Email ' . ucfirst($html_voucher_type)
. ' Voucher', 'width' => '500', 'height' =>
'300')) . "</td>";
+ $html .= " " . anchor_popup('voucher/email/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/email.png", 'border' =>
'0', 'alt' => 'Email ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Email ' . ucfirst($html_voucher_type)
. ' Voucher', 'width' => '500', 'height' =>
'300')) . " ";
+
+ $html .= " " . anchor('voucher/download/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/save.png", 'border' => '0',
'alt' => 'Download ' . ucfirst($html_voucher_type) . '
Voucher', 'title' => "Download voucher")), array('title'
=> 'Download ' . ucfirst($html_voucher_type) . ' Voucher')) .
"</td>";
$html .= "</tr>";
$odd_even = ($odd_even == "odd") ? "even" : "odd";
diff --git a/system/application/views/voucher/add.php
b/system/application/views/voucher/add.php
index 37b097f..d094129 100644
--- a/system/application/views/voucher/add.php
+++ b/system/application/views/voucher/add.php
@@ -251,7 +251,7 @@ $(document).ready(function() {
echo
" ";
echo form_checkbox('voucher_email', 1, $voucher_email) . "Email";
echo
" ";
- echo form_checkbox('voucher_pdf', 1, $voucher_pdf) . "Download PDF";
+ echo form_checkbox('voucher_pdf', 1, $voucher_pdf) . "Download";
echo form_fieldset_close();
echo "</p>";
echo "<br /><br />";
diff --git a/system/application/views/voucher/edit.php
b/system/application/views/voucher/edit.php
index 202f776..1171012 100644
--- a/system/application/views/voucher/edit.php
+++ b/system/application/views/voucher/edit.php
@@ -251,7 +251,7 @@ $(document).ready(function() {
echo
" ";
echo form_checkbox('voucher_email', 1, $voucher_email) . "Email";
echo
" ";
- echo form_checkbox('voucher_pdf', 1, $voucher_pdf) . "Download PDF";
+ echo form_checkbox('voucher_pdf', 1, $voucher_pdf) . "Download";
echo form_fieldset_close();
echo "</p>";
echo "<br /><br />";
diff --git a/system/application/views/voucher/view.php
b/system/application/views/voucher/view.php
index f4f2710..35c3da0 100644
--- a/system/application/views/voucher/view.php
+++ b/system/application/views/voucher/view.php
@@ -62,4 +62,6 @@ else
echo anchor_popup('voucher/printpreview/' . $voucher_type . "/" .
$cur_voucher->id, 'Print', array('title' => 'Print this ' .
ucfirst($voucher_type) . ' Voucher', 'width' => '600',
'height' => '600'));
echo " | ";
echo anchor_popup('voucher/email/' . $voucher_type . "/" .
$cur_voucher->id, 'Email', array('title' => 'Email this ' .
ucfirst($voucher_type) . ' Voucher', 'width' => '400',
'height' => '200'));
+ echo " | ";
+ echo anchor('voucher/download/' . $voucher_type . "/" .
$cur_voucher->id, 'Download', array('title' => "Download
voucher", 'title' => 'Download this ' . ucfirst($voucher_type) .
' Voucher'));
commit adabf2de0fff76ad9773f254335004a23401664d
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Fri Dec 17 16:46:51 2010 +0530
Added index.html for security
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/config/accounts/index.html
b/system/application/config/accounts/index.html
new file mode 100644
index 0000000..c942a79
--- /dev/null
+++ b/system/application/config/accounts/index.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+ <title>403 Forbidden</title>
+</head>
+<body>
+
+<p>Directory access is forbidden.</p>
+
+</body>
+</html>
\ No newline at end of file
commit e0605d094eda27b95bf2da621a82517938a86545
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Fri Dec 17 16:40:08 2010 +0530
Replaced echo_value with print_value
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/setting.php
b/system/application/controllers/setting.php
index 86a82b3..2722ceb 100644
--- a/system/application/controllers/setting.php
+++ b/system/application/controllers/setting.php
@@ -38,40 +38,53 @@ class Setting extends Controller {
'id' => 'account_name',
'maxlength' => '100',
'size' => '40',
- 'value' => ($account_data) ? echo_value($account_data->name) :
'',
+ 'value' => '',
);
$data['account_address'] = array(
'name' => 'account_address',
'id' => 'account_address',
'rows' => '4',
'cols' => '47',
- 'value' => ($account_data) ? echo_value($account_data->address) :
'',
+ 'value' => '',
);
$data['account_email'] = array(
'name' => 'account_email',
'id' => 'account_email',
'maxlength' => '100',
'size' => '40',
- 'value' => ($account_data) ? echo_value($account_data->email) :
'',
+ 'value' => '',
);
- $data['fy_start'] = ($account_data) ?
date_mysql_to_php(echo_value($account_data->fy_start)) : "error";
- $data['fy_end'] = ($account_data) ?
date_mysql_to_php(echo_value($account_data->fy_end)) : "error";
+ $data['fy_start'] = '';
+ $data['fy_end'] = '';
$data['account_currency'] = array(
'name' => 'account_currency',
'id' => 'account_currency',
'maxlength' => '10',
'size' => '10',
- 'value' => ($account_data) ? echo_value($account_data->currency_symbol)
: '',
+ 'value' => '',
);
$data['account_date_options'] = array(
'dd/mm/yyyy' => 'Day / Month / Year',
'mm/dd/yyyy' => 'Month / Day / Year',
'yyyy/mm/dd' => 'Year / Month / Day',
);
- $data['account_date'] = ($account_data) ?
echo_value($account_data->date_format) : 'dd/mm/yyyy';
- $data['account_timezone'] = ($account_data) ?
echo_value($account_data->timezone) : 'UTC';
+ $data['account_date'] = 'dd/mm/yyyy';
+ $data['account_timezone'] = 'UTC';
+
+ /* Current account settings */
+ if ($account_data)
+ {
+ $data['account_name']['value'] = print_value($account_data->name);
+ $data['account_address']['value'] =
print_value($account_data->address);
+ $data['account_email']['value'] =
print_value($account_data->email);
+ $data['account_currency']['value'] =
print_value($account_data->currency_symbol);
+ $data['account_date'] = print_value($account_data->date_format);
+ $data['account_timezone'] = print_value($account_data->timezone);
+ $data['fy_start'] =
date_mysql_to_php(print_value($account_data->fy_start));
+ $data['fy_end'] = date_mysql_to_php(print_value($account_data->fy_end));
+ }
/* Form validations */
$this->form_validation->set_rules('account_name', 'Account Name',
'trim|required|min_length[2]|max_length[100]');
@@ -490,10 +503,10 @@ class Setting extends Controller {
if ($account_data)
{
- $data['email_protocol'] = ($account_data->email_protocol) ?
echo_value($account_data->email_protocol) : 'smtp';
- $data['email_host']['value'] = ($account_data->email_host) ?
echo_value($account_data->email_host) : '';
- $data['email_port']['value'] = ($account_data->email_port) ?
echo_value($account_data->email_port) : '';
- $data['email_username']['value'] = ($account_data->email_username)
? echo_value($account_data->email_username) : '';
+ $data['email_protocol'] = ($account_data->email_protocol) ?
print_value($account_data->email_protocol) : 'smtp';
+ $data['email_host']['value'] = ($account_data->email_host) ?
print_value($account_data->email_host) : '';
+ $data['email_port']['value'] = ($account_data->email_port) ?
print_value($account_data->email_port) : '';
+ $data['email_username']['value'] = ($account_data->email_username)
? print_value($account_data->email_username) : '';
}
/* Form validations */
@@ -641,14 +654,14 @@ class Setting extends Controller {
if ($account_data)
{
- $data['paper_height']['value'] =
($account_data->print_paper_height) ? echo_value($account_data->print_paper_height)
: '';
- $data['paper_width']['value'] = ($account_data->print_paper_width)
? echo_value($account_data->print_paper_width) : '';
- $data['margin_top']['value'] = ($account_data->print_margin_top) ?
echo_value($account_data->print_margin_top) : '';
- $data['margin_bottom']['value'] =
($account_data->print_margin_bottom) ?
echo_value($account_data->print_margin_bottom) : '';
- $data['margin_left']['value'] = ($account_data->print_margin_left)
? echo_value($account_data->print_margin_left) : '';
- $data['margin_right']['value'] =
($account_data->print_margin_right) ? echo_value($account_data->print_margin_right)
: '';
- $data['page_layout']['value'] = ($account_data->print_page_layout)
? echo_value($account_data->print_page_layout) : '';
- $data['logo']['value'] = ($account_data->print_logo) ?
echo_value($account_data->print_logo) : '';
+ $data['paper_height']['value'] =
($account_data->print_paper_height) ? print_value($account_data->print_paper_height)
: '';
+ $data['paper_width']['value'] = ($account_data->print_paper_width)
? print_value($account_data->print_paper_width) : '';
+ $data['margin_top']['value'] = ($account_data->print_margin_top) ?
print_value($account_data->print_margin_top) : '';
+ $data['margin_bottom']['value'] =
($account_data->print_margin_bottom) ?
print_value($account_data->print_margin_bottom) : '';
+ $data['margin_left']['value'] = ($account_data->print_margin_left)
? print_value($account_data->print_margin_left) : '';
+ $data['margin_right']['value'] =
($account_data->print_margin_right) ? print_value($account_data->print_margin_right)
: '';
+ $data['page_layout']['value'] = ($account_data->print_page_layout)
? print_value($account_data->print_page_layout) : '';
+ $data['logo']['value'] = ($account_data->print_logo) ?
print_value($account_data->print_logo) : '';
if ($account_data->print_orientation)
{
if ($account_data->print_orientation == "P")
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 7e9b51c..efa302c 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -293,7 +293,7 @@ class Voucher extends Controller {
$data['voucher_tag'] = 0;
/* Form validations */
- $this->form_validation->set_rules('voucher_number', 'Voucher
Number', 'trim|is_natural|uniquevoucherno[' . v_to_n($voucher_type) .
']');
+ $this->form_validation->set_rules('voucher_number', 'Voucher
Number', 'trim|required|is_natural_no_zero|uniquevoucherno[' .
v_to_n($voucher_type) . ']');
$this->form_validation->set_rules('voucher_date', 'Voucher Date',
'trim|required|is_date|is_date_within_range');
$this->form_validation->set_rules('voucher_narration', 'trim');
$this->form_validation->set_rules('voucher_tag', 'Tag',
'trim|is_natural');
@@ -565,7 +565,7 @@ class Voucher extends Controller {
}
/* Form validations */
- $this->form_validation->set_rules('voucher_number', 'Voucher
Number', 'trim|is_natural|uniquevouchernowithid[' . v_to_n($voucher_type) .
'.' . $voucher_id . ']');
+ $this->form_validation->set_rules('voucher_number', 'Voucher
Number', 'trim|required|is_natural_no_zero|uniquevouchernowithid[' .
v_to_n($voucher_type) . '.' . $voucher_id . ']');
$this->form_validation->set_rules('voucher_date', 'Voucher Date',
'trim|required|is_date|is_date_within_range');
$this->form_validation->set_rules('voucher_narration', 'trim');
$this->form_validation->set_rules('voucher_tag', 'Tag',
'trim|is_natural');
diff --git a/system/application/helpers/custom_helper.php
b/system/application/helpers/custom_helper.php
index d8de602..5a3617f 100644
--- a/system/application/helpers/custom_helper.php
+++ b/system/application/helpers/custom_helper.php
@@ -85,9 +85,9 @@ if ( ! function_exists('convert_cur'))
* @param a varaible
* @return string value
*/
-if ( ! function_exists('echo_value'))
+if ( ! function_exists('print_value'))
{
- function echo_value($value = NULL, $default = "")
+ function print_value($value = NULL, $default = "")
{
if (isset($value))
return $value;
diff --git a/system/application/views/voucher/add.php
b/system/application/views/voucher/add.php
index 1bf5b6a..37b097f 100644
--- a/system/application/views/voucher/add.php
+++ b/system/application/views/voucher/add.php
@@ -245,13 +245,13 @@ $(document).ready(function() {
echo "<p>";
echo form_fieldset('Options', array('class' =>
"fieldset-auto-width"));
- echo form_checkbox('voucher_draft', 1, echo_value($voucher_draft, FALSE)) .
"Draft";
+ echo form_checkbox('voucher_draft', 1, $voucher_draft) . "Draft";
echo "<br /><br />";
- echo form_checkbox('voucher_print', 1, echo_value($voucher_print, FALSE)) .
"Print";
+ echo form_checkbox('voucher_print', 1, $voucher_print) . "Print";
echo
" ";
- echo form_checkbox('voucher_email', 1, echo_value($voucher_email, FALSE)) .
"Email";
+ echo form_checkbox('voucher_email', 1, $voucher_email) . "Email";
echo
" ";
- echo form_checkbox('voucher_pdf', 1, echo_value($voucher_pdf, FALSE)) .
"Download PDF";
+ echo form_checkbox('voucher_pdf', 1, $voucher_pdf) . "Download PDF";
echo form_fieldset_close();
echo "</p>";
echo "<br /><br />";
diff --git a/system/application/views/voucher/edit.php
b/system/application/views/voucher/edit.php
index 24a92ac..202f776 100644
--- a/system/application/views/voucher/edit.php
+++ b/system/application/views/voucher/edit.php
@@ -245,13 +245,13 @@ $(document).ready(function() {
echo "<p>";
echo form_fieldset('Options', array('class' =>
"fieldset-auto-width"));
- echo form_checkbox('voucher_draft', 1, echo_value($voucher_draft, FALSE)) .
"Draft";
+ echo form_checkbox('voucher_draft', 1, $voucher_draft) . "Draft";
echo "<br /><br />";
- echo form_checkbox('voucher_print', 1, echo_value($voucher_print, FALSE)) .
"Print";
+ echo form_checkbox('voucher_print', 1, $voucher_print) . "Print";
echo
" ";
- echo form_checkbox('voucher_email', 1, echo_value($voucher_email, FALSE)) .
"Email";
+ echo form_checkbox('voucher_email', 1, $voucher_email) . "Email";
echo
" ";
- echo form_checkbox('voucher_pdf', 1, echo_value($voucher_pdf, FALSE)) .
"Download PDF";
+ echo form_checkbox('voucher_pdf', 1, $voucher_pdf) . "Download PDF";
echo form_fieldset_close();
echo "</p>";
echo "<br /><br />";
commit a465c63d471985ae48079a22191d7cbb4837acee
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Thu Dec 16 21:33:57 2010 +0530
Added Print report statement for Ledger St
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/printreport.css
b/system/application/assets/css/printreport.css
index f874ce4..1c31462 100644
--- a/system/application/assets/css/printreport.css
+++ b/system/application/assets/css/printreport.css
@@ -102,12 +102,39 @@ table.profit-loss-table tr td {
padding:5px 30px 5px 5px;
}
+table.profit-loss-table td.td-group {
+ font-weight:bold;
+}
+
table.profit-loss-total-table {
border:1px solid #000000;
background-color:#EEEEEE;
}
-table.profit-loss-table td.td-group {
+/**************************** LEDGER ACCOUNT ST *******************************/
+table.ledgerst-table {
+ border:1px solid #000000;
+ border-collapse: collapse;
+}
+
+table.ledgerst-table tr th {
+ text-align:left;
+ border:1px solid #000000;
+ padding:5px 30px 5px 5px;
+ background-color:#EEEEEE;
+}
+
+table.ledgerst-table tr td {
+ border:1px solid #000000;
+ padding:5px 30px 5px 5px;
+}
+
+table.ledgerst-total-table {
+ border:1px solid #000000;
+ background-color:#EEEEEE;
+}
+
+table.ledgerst-table td.td-group {
font-weight:bold;
}
diff --git a/system/application/controllers/report.php
b/system/application/controllers/report.php
index 04ce8c5..4179524 100644
--- a/system/application/controllers/report.php
+++ b/system/application/controllers/report.php
@@ -54,13 +54,14 @@ class Report extends Controller {
$this->template->set('page_title', 'Ledger Statement');
if ($ledger_id != 0)
- $this->template->set('nav_links',
array('report/download/ledgerst/' . $ledger_id => 'Download CSV'));
+ $this->template->set('nav_links',
array('report/download/ledgerst/' . $ledger_id => 'Download CSV',
'report/printpreview/ledgerst/' . $ledger_id => 'Print Preview'));
if ($_POST)
{
$ledger_id = $this->input->post('ledger_id', TRUE);
redirect('report/ledgerst/' . $ledger_id);
}
+ $data['print_preview'] = FALSE;
$data['ledger_id'] = $ledger_id;
$this->template->load('template', 'report/ledgerst', $data);
return;
@@ -602,6 +603,24 @@ class Report extends Controller {
$this->load->view('report/report_template', $data);
return;
}
+
+ if ($statement == "ledgerst")
+ {
+ /* Pagination setup */
+ $this->load->library('pagination');
+ $data['ledger_id'] = $this->uri->segment(4);
+ /* Checking for valid ledger id */
+ if ($data['ledger_id'] < 1)
+ {
+ $this->messages->add("Invalid Ledger A/C", 'error');
+ redirect("report/ledgerst");
+ }
+ $data['report'] = "report/ledgerst";
+ $data['title'] = "Ledger Statement for '" .
$this->Ledger_model->get_name($data['ledger_id']) . "'";
+ $data['print_preview'] = TRUE;
+ $this->load->view('report/report_template', $data);
+ return;
+ }
return;
}
}
diff --git a/system/application/views/report/ledgerst.php
b/system/application/views/report/ledgerst.php
index 37b77c7..6c0007d 100644
--- a/system/application/views/report/ledgerst.php
+++ b/system/application/views/report/ledgerst.php
@@ -1,43 +1,49 @@
<?php
$this->load->model('Ledger_model');
- echo form_open('report/ledgerst/' . $ledger_id);
- echo "<p>";
- echo form_input_ledger('ledger_id', $ledger_id);
- echo " ";
- echo form_submit('submit', 'Show');
- echo "</p>";
- echo form_close();
+ if ( ! $print_preview)
+ {
+ echo form_open('report/ledgerst/' . $ledger_id);
+ echo "<p>";
+ echo form_input_ledger('ledger_id', $ledger_id);
+ echo " ";
+ echo form_submit('submit', 'Show');
+ echo "</p>";
+ echo form_close();
+ }
/* Pagination configuration */
- $pagination_counter = $this->config->item('row_count');
- $page_count = (int)$this->uri->segment(4);
- $page_count = $this->input->xss_clean($page_count);
- if ( ! $page_count)
- $page_count = "0";
- $config['base_url'] = site_url('report/ledgerst/' . $ledger_id);
- $config['num_links'] = 10;
- $config['per_page'] = $pagination_counter;
- $config['uri_segment'] = 4;
- $config['total_rows'] = $this->db->query('SELECT * FROM vouchers join
voucher_items on vouchers.id = voucher_items.voucher_id WHERE voucher_items.ledger_id =
?', array($ledger_id))->num_rows();
- $config['full_tag_open'] = '<ul
id="pagination-flickr">';
- $config['full_close_open'] = '</ul>';
- $config['num_tag_open'] = '<li>';
- $config['num_tag_close'] = '</li>';
- $config['cur_tag_open'] = '<li class="active">';
- $config['cur_tag_close'] = '</li>';
- $config['next_link'] = 'Next »';
- $config['next_tag_open'] = '<li class="next">';
- $config['next_tag_close'] = '</li>';
- $config['prev_link'] = '« Previous';
- $config['prev_tag_open'] = '<li class="previous">';
- $config['prev_tag_close'] = '</li>';
- $config['first_link'] = 'First';
- $config['first_tag_open'] = '<li class="first">';
- $config['first_tag_close'] = '</li>';
- $config['last_link'] = 'Last';
- $config['last_tag_open'] = '<li class="last">';
- $config['last_tag_close'] = '</li>';
- $this->pagination->initialize($config);
+ if ( ! $print_preview)
+ {
+ $pagination_counter = $this->config->item('row_count');
+ $page_count = (int)$this->uri->segment(4);
+ $page_count = $this->input->xss_clean($page_count);
+ if ( ! $page_count)
+ $page_count = "0";
+ $config['base_url'] = site_url('report/ledgerst/' . $ledger_id);
+ $config['num_links'] = 10;
+ $config['per_page'] = $pagination_counter;
+ $config['uri_segment'] = 4;
+ $config['total_rows'] = $this->db->query('SELECT * FROM vouchers join
voucher_items on vouchers.id = voucher_items.voucher_id WHERE voucher_items.ledger_id =
?', array($ledger_id))->num_rows();
+ $config['full_tag_open'] = '<ul
id="pagination-flickr">';
+ $config['full_close_open'] = '</ul>';
+ $config['num_tag_open'] = '<li>';
+ $config['num_tag_close'] = '</li>';
+ $config['cur_tag_open'] = '<li class="active">';
+ $config['cur_tag_close'] = '</li>';
+ $config['next_link'] = 'Next »';
+ $config['next_tag_open'] = '<li class="next">';
+ $config['next_tag_close'] = '</li>';
+ $config['prev_link'] = '« Previous';
+ $config['prev_tag_open'] = '<li class="previous">';
+ $config['prev_tag_close'] = '</li>';
+ $config['first_link'] = 'First';
+ $config['first_tag_open'] = '<li class="first">';
+ $config['first_tag_close'] = '</li>';
+ $config['last_link'] = 'Last';
+ $config['last_tag_open'] = '<li class="last">';
+ $config['last_tag_close'] = '</li>';
+ $this->pagination->initialize($config);
+ }
if ($ledger_id != 0)
{
@@ -54,8 +60,12 @@
echo "</tr>";
echo "</table>";
echo "<br />";
-
- $ledgerst_q = $this->db->query("SELECT vouchers.id as vid, vouchers.number
as vnumber, vouchers.date as vdate, vouchers.draft as vdraft, vouchers.type as vtype,
voucher_items.amount as lamount, voucher_items.dc as ldc FROM vouchers join voucher_items
on vouchers.id = voucher_items.voucher_id WHERE voucher_items.ledger_id = ? ORDER BY
vouchers.date ASC, vouchers.number ASC LIMIT ${page_count}, ${pagination_counter}",
array($ledger_id));
+ if ( ! $print_preview) {
+ $ledgerst_q = $this->db->query("SELECT vouchers.id as vid, vouchers.number
as vnumber, vouchers.date as vdate, vouchers.draft as vdraft, vouchers.type as vtype,
voucher_items.amount as lamount, voucher_items.dc as ldc FROM vouchers join voucher_items
on vouchers.id = voucher_items.voucher_id WHERE voucher_items.ledger_id = ? ORDER BY
vouchers.date ASC, vouchers.number ASC LIMIT ${page_count}, ${pagination_counter}",
array($ledger_id));
+ } else {
+ $page_count = 0;
+ $ledgerst_q = $this->db->query("SELECT vouchers.id as vid, vouchers.number
as vnumber, vouchers.date as vdate, vouchers.draft as vdraft, vouchers.type as vtype,
voucher_items.amount as lamount, voucher_items.dc as ldc FROM vouchers join voucher_items
on vouchers.id = voucher_items.voucher_id WHERE voucher_items.ledger_id = ? ORDER BY
vouchers.date ASC, vouchers.number ASC", array($ledger_id));
+ }
echo "<table border=0 cellpadding=5 class=\"simple-table
ledgerst-table\">";
@@ -186,5 +196,6 @@
echo "</table>";
}
?>
-
+<?php if ( ! $print_preview) { ?>
<div id="pagination-container"><?php echo
$this->pagination->create_links(); ?></div>
+<?php } ?>
diff --git a/system/application/views/template.php
b/system/application/views/template.php
index 64e1a8e..dfec3e2 100644
--- a/system/application/views/template.php
+++ b/system/application/views/template.php
@@ -124,7 +124,7 @@ $(document).ready(function() {
echo "<ul id=\"main-links-nav\">";
foreach ($nav_links as $link => $title) {
if ($title == "Print Preview")
- echo "<li>" . anchor_popup($link, $title, array('title'
=> $title, 'class' => 'nav-links-item', 'style' =>
'background-image:url(\'' . asset_url() .
'images/buttons/navlink.png\');')) . "</li>";
+ echo "<li>" . anchor_popup($link, $title, array('title'
=> $title, 'class' => 'nav-links-item', 'style' =>
'background-image:url(\'' . asset_url() .
'images/buttons/navlink.png\');', 'width' => '1024')) .
"</li>";
else
echo "<li>" . anchor($link, $title, array('title' =>
$title, 'class' => 'nav-links-item', 'style' =>
'background-image:url(\'' . asset_url() .
'images/buttons/navlink.png\');')) . "</li>";
}
commit 3d2fb05034b343c42c0720964cc781e359e0f3a9
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Thu Dec 16 21:08:06 2010 +0530
Variable table width for Balance Sheet and P & L
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/report.php
b/system/application/controllers/report.php
index bc63bb8..04ce8c5 100644
--- a/system/application/controllers/report.php
+++ b/system/application/controllers/report.php
@@ -21,7 +21,9 @@ class Report extends Controller {
{
$this->template->set('page_title', 'Balance Sheet');
$this->template->set('nav_links',
array('report/download/balancesheet' => 'Download CSV',
'report/printpreview/balancesheet' => 'Print Preview'));
- $this->template->load('template', 'report/balancesheet');
+ $data['left_width'] = "450";
+ $data['right_width'] = "450";
+ $this->template->load('template', 'report/balancesheet', $data);
return;
}
@@ -29,7 +31,9 @@ class Report extends Controller {
{
$this->template->set('page_title', 'Profit And Loss Statement');
$this->template->set('nav_links',
array('report/download/profitandloss' => 'Download CSV',
'report/printpreview/profitandloss' => 'Print Preview'));
- $this->template->load('template', 'report/profitandloss');
+ $data['left_width'] = "450";
+ $data['right_width'] = "450";
+ $this->template->load('template', 'report/profitandloss',
$data);
return;
}
@@ -583,6 +587,8 @@ class Report extends Controller {
{
$data['report'] = "report/balancesheet";
$data['title'] = "Balance Sheet";
+ $data['left_width'] = "";
+ $data['right_width'] = "";
$this->load->view('report/report_template', $data);
return;
}
@@ -591,6 +597,8 @@ class Report extends Controller {
{
$data['report'] = "report/profitandloss";
$data['title'] = "Profit and Loss Statement";
+ $data['left_width'] = "";
+ $data['right_width'] = "";
$this->load->view('report/report_template', $data);
return;
}
diff --git a/system/application/views/report/balancesheet.php
b/system/application/views/report/balancesheet.php
index daad730..d9b40ad 100644
--- a/system/application/views/report/balancesheet.php
+++ b/system/application/views/report/balancesheet.php
@@ -5,9 +5,9 @@
echo "<tr valign=\"top\">";
$liability = new Accountlist();
- echo "<td>";
+ echo "<td width=\"" . $left_width . "\">";
$liability->init(2);
- echo "<table border=0 cellpadding=5 class=\"simple-table
balance-sheet-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
balance-sheet-table\" width=\"100%\">";
echo "<thead><tr><th>Liabilities</th><th
align=\"right\">Amount</th></tr></thead>";
$liability->account_st_short(0);
echo "</table>";
@@ -15,9 +15,9 @@
$liability_total = -$liability->total;
$asset = new Accountlist();
- echo "<td>";
+ echo "<td width=\"" . $right_width . "\">";
$asset->init(1);
- echo "<table border=0 cellpadding=5 class=\"simple-table
balance-sheet-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
balance-sheet-table\" width=\"100%\">";
echo "<thead><tr><th>Assets</th><th
align=\"right\">Amount</th></tr></thead>";
$asset->account_st_short(0);
echo "</table>";
@@ -44,7 +44,7 @@
echo "<tr class=\"total-area\">";
echo "<td>";
- echo "<table border=0 cellpadding=5
class=\"balance-sheet-total-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5
class=\"balance-sheet-total-table\" width=\"100%\">";
echo "<tr valign=\"top\">";
echo "<td class=\"bold\">Liability Total</td>";
echo "<td align=\"right\" class=\"bold\">" .
convert_cur($liability_total) . "</td>";
@@ -98,7 +98,7 @@
$total = $asset_total;
echo "<td>";
- echo "<table border=0 cellpadding=5
class=\"balance-sheet-total-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5
class=\"balance-sheet-total-table\" width=\"100%\">";
echo "<tr valign=\"top\">";
echo "<td class=\"bold\">Asset Total</td>";
echo "<td align=\"right\" class=\"bold\">" .
convert_cur($asset_total) . "</td>";
diff --git a/system/application/views/report/profitandloss.php
b/system/application/views/report/profitandloss.php
index f60d9e5..e21baf9 100644
--- a/system/application/views/report/profitandloss.php
+++ b/system/application/views/report/profitandloss.php
@@ -10,8 +10,8 @@
/* Gross P/L : Expenses */
$gross_expense_total = 0;
$gross_expense_list_q = $this->db->query("SELECT * FROM groups WHERE
parent_id = 4 AND affects_gross = 1");
- echo "<td>";
- echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-table\" width=\"450\">";
+ echo "<td width=\"" . $left_width . "\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-table\" width=\"100%\">";
echo "<thead><tr><th>Expenses (Gross)</th><th
align=\"right\">Amount</th></tr></thead>";
foreach ($gross_expense_list_q->result() as $row)
{
@@ -26,8 +26,8 @@
/* Gross P/L : Incomes */
$gross_income_total = 0;
$gross_income_list_q = $this->db->query("SELECT * FROM groups WHERE parent_id
= 3 AND affects_gross = 1");
- echo "<td>";
- echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-table\" width=\"450\">";
+ echo "<td width=\"" . $right_width . "\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-table\" width=\"100%\">";
echo "<thead><tr><th>Incomes (Gross)</th><th
align=\"right\">Amount</th></tr></thead>";
foreach ($gross_income_list_q->result() as $row)
{
@@ -49,7 +49,7 @@
$grosstotal = $gross_expense_total;
echo "<tr class=\"total-area\">";
echo "<td>";
- echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"100%\">";
echo "<tr valign=\"top\">";
echo "<td class=\"bold\">Total Gross Expenses</td>";
echo "<td align=\"right\" class=\"bold\">" .
convert_cur($gross_expense_total) . "</td>";
@@ -78,7 +78,7 @@
/* Showing Gross P/L : Incomes */
$grosstotal = $gross_income_total;
echo "<td>";
- echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"100%\">";
echo "<tr valign=\"top\">";
echo "<td class=\"bold\">Total Gross Incomes</td>";
echo "<td align=\"right\" class=\"bold\">" .
convert_cur($gross_income_total) . "</td>";
@@ -114,7 +114,7 @@
$net_expense_total = 0;
$net_expense_list_q = $this->db->query("SELECT * FROM groups WHERE parent_id
= 4 AND affects_gross != 1");
echo "<td>";
- echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-table\" width=\"100%\">";
echo "<thead><tr><th>Expenses (Net)</th><th
align=\"right\">Amount</th></tr></thead>";
foreach ($net_expense_list_q->result() as $row)
{
@@ -130,7 +130,7 @@
$net_income_total = 0;
$net_income_list_q = $this->db->query("SELECT * FROM groups WHERE parent_id =
3 AND affects_gross != 1");
echo "<td>";
- echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-table\" width=\"100%\">";
echo "<thead><tr><th>Incomes (Net)</th><th
align=\"right\">Amount</th></tr></thead>";
foreach ($net_income_list_q->result() as $row)
{
@@ -152,7 +152,7 @@
$nettotal = $net_expense_total;
echo "<tr class=\"total-area\">";
echo "<td>";
- echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"100%\">";
echo "<tr valign=\"top\">";
echo "<td class=\"bold\">Total Expenses</td>";
echo "<td align=\"right\" class=\"bold\">" .
convert_cur($nettotal) . "</td>";
@@ -194,7 +194,7 @@
/* Showing Net P/L : Incomes */
$nettotal = $net_income_total;
echo "<td>";
- echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"450\">";
+ echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"100%\">";
echo "<tr valign=\"top\">";
echo "<td class=\"bold\">Total Incomes</td>";
echo "<td align=\"right\" class=\"bold\">" .
convert_cur($nettotal) . "</td>";
commit 166965591f463a8851c043a2cf184892fd7573e8
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Thu Dec 16 12:17:10 2010 +0530
Added basic Print Statment for Balance Sheet and P and L
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/printreport.css
b/system/application/assets/css/printreport.css
index 7abbc57..f874ce4 100644
--- a/system/application/assets/css/printreport.css
+++ b/system/application/assets/css/printreport.css
@@ -28,31 +28,87 @@ body {
font-size:15px;
}
-table.simple-table {
+/************************************ COMMON **********************************/
+table.simple-table a {
+ text-decoration:none;
+ color:#000000;
+}
+
+/********************************* TRIAL BALANCE ******************************/
+table.trial-balance-table {
border:1px solid #000000;
border-collapse: collapse;
}
-table.simple-table tr th {
+table.trial-balance-table tr th {
text-align:left;
border:1px solid #000000;
padding:5px 30px 5px 5px;
background-color:#EEEEEE;
}
-table.simple-table tr td {
+table.trial-balance-table tr td {
text-align:left;
border:1px solid #000000;
padding:5px 30px 5px 5px;
}
-table.simple-table a {
- text-decoration:none;
- color:#000000;
+table.trial-balance-table tr.tr-total {
+ border:1px solid #000000;
+}
+
+/********************************* BALANCE SHEET ******************************/
+table.balance-sheet-table {
+ border:1px solid #000000;
+ border-collapse: collapse;
+}
+
+table.balance-sheet-table tr th {
+ text-align:left;
+ border:1px solid #000000;
+ padding:5px 30px 5px 5px;
+ background-color:#EEEEEE;
+}
+
+table.balance-sheet-table tr td {
+ border:1px solid #000000;
+ padding:5px 30px 5px 5px;
}
-table.simple-table tr.tr-total {
+table.balance-sheet-total-table {
border:1px solid #000000;
+ background-color:#EEEEEE;
+}
+
+table.balance-sheet-table td.td-group {
+ font-weight:bold;
+}
+
+/**************************** PROFIT AND LOSS ST ******************************/
+table.profit-loss-table {
+ border:1px solid #000000;
+ border-collapse: collapse;
+}
+
+table.profit-loss-table tr th {
+ text-align:left;
+ border:1px solid #000000;
+ padding:5px 30px 5px 5px;
+ background-color:#EEEEEE;
+}
+
+table.profit-loss-table tr td {
+ border:1px solid #000000;
+ padding:5px 30px 5px 5px;
+}
+
+table.profit-loss-total-table {
+ border:1px solid #000000;
+ background-color:#EEEEEE;
+}
+
+table.profit-loss-table td.td-group {
+ font-weight:bold;
}
@media print {
diff --git a/system/application/controllers/report.php
b/system/application/controllers/report.php
index 9f64932..bc63bb8 100644
--- a/system/application/controllers/report.php
+++ b/system/application/controllers/report.php
@@ -20,7 +20,7 @@ class Report extends Controller {
function balancesheet($period = NULL)
{
$this->template->set('page_title', 'Balance Sheet');
- $this->template->set('nav_links',
array('report/download/balancesheet' => 'Download CSV'));
+ $this->template->set('nav_links',
array('report/download/balancesheet' => 'Download CSV',
'report/printpreview/balancesheet' => 'Print Preview'));
$this->template->load('template', 'report/balancesheet');
return;
}
@@ -28,7 +28,7 @@ class Report extends Controller {
function profitandloss($period = NULL)
{
$this->template->set('page_title', 'Profit And Loss Statement');
- $this->template->set('nav_links',
array('report/download/profitandloss' => 'Download CSV'));
+ $this->template->set('nav_links',
array('report/download/profitandloss' => 'Download CSV',
'report/printpreview/profitandloss' => 'Print Preview'));
$this->template->load('template', 'report/profitandloss');
return;
}
@@ -578,6 +578,22 @@ class Report extends Controller {
$this->load->view('report/report_template', $data);
return;
}
+
+ if ($statement == "balancesheet")
+ {
+ $data['report'] = "report/balancesheet";
+ $data['title'] = "Balance Sheet";
+ $this->load->view('report/report_template', $data);
+ return;
+ }
+
+ if ($statement == "profitandloss")
+ {
+ $data['report'] = "report/profitandloss";
+ $data['title'] = "Profit and Loss Statement";
+ $this->load->view('report/report_template', $data);
+ return;
+ }
return;
}
}
commit 3d356daea9d75d877fabff210bce4d7488ce0b47
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Thu Dec 16 11:59:08 2010 +0530
Added Print report statement for Trial balance
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/printreport.css
b/system/application/assets/css/printreport.css
new file mode 100644
index 0000000..7abbc57
--- /dev/null
+++ b/system/application/assets/css/printreport.css
@@ -0,0 +1,62 @@
+/*********************************** COMMON ***********************************/
+body {
+ color:#000000;
+ font:14px "Helvetica Neue","Lucida Grande","Helvetica
Neue",Arial,sans-serif;
+ margin:20px;
+ padding:0;
+}
+
+/******************************** SPECIFIC ************************************/
+
+#print-account-name {
+ text-align:center;
+ font-size:17px;
+}
+
+#print-account-address {
+ text-align:center;
+ font-size:14px;
+}
+
+#print-report-title {
+ text-align:center;
+ font-size:17px;
+}
+
+#print-report-period {
+ text-align:center;
+ font-size:15px;
+}
+
+table.simple-table {
+ border:1px solid #000000;
+ border-collapse: collapse;
+}
+
+table.simple-table tr th {
+ text-align:left;
+ border:1px solid #000000;
+ padding:5px 30px 5px 5px;
+ background-color:#EEEEEE;
+}
+
+table.simple-table tr td {
+ text-align:left;
+ border:1px solid #000000;
+ padding:5px 30px 5px 5px;
+}
+
+table.simple-table a {
+ text-decoration:none;
+ color:#000000;
+}
+
+table.simple-table tr.tr-total {
+ border:1px solid #000000;
+}
+
+@media print {
+ .hide-print {
+ display: none;
+ }
+}
\ No newline at end of file
diff --git a/system/application/controllers/report.php
b/system/application/controllers/report.php
index 61e0cad..9f64932 100644
--- a/system/application/controllers/report.php
+++ b/system/application/controllers/report.php
@@ -36,7 +36,7 @@ class Report extends Controller {
function trialbalance($period = NULL)
{
$this->template->set('page_title', 'Trial Balance');
- $this->template->set('nav_links',
array('report/download/trialbalance' => 'Download CSV'));
+ $this->template->set('nav_links',
array('report/download/trialbalance' => 'Download CSV',
'report/printpreview/trialbalance' => 'Print Preview'));
$this->load->library('accountlist');
$this->template->load('template', 'report/trialbalance');
@@ -566,6 +566,20 @@ class Report extends Controller {
}
return;
}
+
+ function printpreview($statement, $id = NULL)
+ {
+ /********************** TRIAL BALANCE *************************/
+ if ($statement == "trialbalance")
+ {
+ $this->load->library('accountlist');
+ $data['report'] = "report/trialbalance";
+ $data['title'] = "Trial Balance";
+ $this->load->view('report/report_template', $data);
+ return;
+ }
+ return;
+ }
}
/* End of file report.php */
diff --git a/system/application/views/report/report_template.php
b/system/application/views/report/report_template.php
new file mode 100644
index 0000000..01d2333
--- /dev/null
+++ b/system/application/views/report/report_template.php
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
+<head>
+<title>Webzash<?php if (isset($page_title)) echo ' | ' . $page_title;
?></title>
+<?php echo link_tag(asset_url() . 'images/favicon.ico', 'shortcut
icon', 'image/ico'); ?>
+<link type="text/css" rel="stylesheet" href="<?php echo
asset_url(); ?>css/printreport.css">
+</head>
+<body>
+ <div id="print-account-name"><span
class="value"><?php echo
$this->config->item('account_name'); ?></span></div>
+ <div id="print-account-address"><span
class="value"><?php echo
$this->config->item('account_address'); ?></span></div>
+ <br />
+ <div id="print-report-title"><span
class="value"><?php echo $title; ?></span></div>
+ <div id="print-report-period">
+ <span class="value">
+ Financial year<br />
+ <?php echo
date_mysql_to_php_display($this->config->item('account_fy_start')); ?> -
<?php echo
date_mysql_to_php_display($this->config->item('account_fy_end')); ?>
+ </span>
+ </div>
+ <br />
+ <div id="main-content">
+ <?php $this->load->view($report); ?>
+ </div>
+ <br />
+ <form>
+ <input class="hide-print" type="button"
onClick="window.print()" value="Print Statement">
+ </form>
+</body>
+</html>
diff --git a/system/application/views/template.php
b/system/application/views/template.php
index 2eb72b3..64e1a8e 100644
--- a/system/application/views/template.php
+++ b/system/application/views/template.php
@@ -123,7 +123,10 @@ $(document).ready(function() {
<?php if (isset($nav_links)) {
echo "<ul id=\"main-links-nav\">";
foreach ($nav_links as $link => $title) {
- echo "<li>" . anchor($link, $title, array('title' =>
$title, 'class' => 'nav-links-item', 'style' =>
'background-image:url(\'' . asset_url() .
'images/buttons/navlink.png\');')) . "</li>";
+ if ($title == "Print Preview")
+ echo "<li>" . anchor_popup($link, $title, array('title'
=> $title, 'class' => 'nav-links-item', 'style' =>
'background-image:url(\'' . asset_url() .
'images/buttons/navlink.png\');')) . "</li>";
+ else
+ echo "<li>" . anchor($link, $title, array('title' =>
$title, 'class' => 'nav-links-item', 'style' =>
'background-image:url(\'' . asset_url() .
'images/buttons/navlink.png\');')) . "</li>";
}
echo "</ul>";
} ?>
commit 45648e5ef736cced534ea5ba6fe9de7c43fac764
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Thu Dec 16 11:19:49 2010 +0530
Use helpers to display amount
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/helpers/custom_helper.php
b/system/application/helpers/custom_helper.php
index bfbf915..d8de602 100644
--- a/system/application/helpers/custom_helper.php
+++ b/system/application/helpers/custom_helper.php
@@ -39,9 +39,32 @@ if ( ! function_exists('convert_amount_dc'))
if ($amount == "D")
return "0";
else if ($amount < 0)
- return "Cr " . -$amount;
+ return "Cr " . convert_cur(-$amount);
else
- return "Dr " . $amount;
+ return "Dr " . convert_cur($amount);
+ }
+}
+
+/**
+ * Converts Opening balance amount to Dr or Cr Value
+ *
+ * Covnerts the Opening balance amount to 0 or Dr or Cr value for display
+ *
+ * @access public
+ * @param amount
+ * @param debit or credit
+ * @return string
+ */
+if ( ! function_exists('convert_opening'))
+{
+ function convert_opening($amount, $dc)
+ {
+ if ($amount == 0)
+ return "0";
+ else if ($dc == 'D')
+ return "Dr " . convert_cur($amount);
+ else
+ return "Cr " . convert_cur($amount);
}
}
diff --git a/system/application/libraries/Accountlist.php
b/system/application/libraries/Accountlist.php
index d9a52b3..8b9e578 100644
--- a/system/application/libraries/Accountlist.php
+++ b/system/application/libraries/Accountlist.php
@@ -81,17 +81,7 @@ class Accountlist
echo $this->print_space($this->counter);
echo " " . $this->name;
echo "</td>";
-
- echo "<td align=\"right\">";
- if ($this->total == 0)
- echo "0";
- else if ($this->total < 0)
- echo "Cr " . convert_cur(-$this->total);
- else
- echo "Dr " . convert_cur($this->total);
- echo $this->print_space($this->counter);
- echo "</td>";
-
+ echo "<td align=\"right\">" .
convert_amount_dc($this->total) . $this->print_space($this->counter) .
"</td>";
echo "</tr>";
}
foreach ($this->children_groups as $id => $data)
@@ -110,17 +100,7 @@ class Accountlist
echo $this->print_space($this->counter);
echo " " . anchor('report/ledgerst/' .
$data['id'], $data['name'], array('title' =>
$data['name'] . ' Ledger Statement', 'style' =>
'color:#000000'));
echo "</td>";
-
- echo "<td align=\"right\">";
- if ($data['total'] == 0)
- echo "0";
- else if ($data['total'] < 0)
- echo "Cr " . convert_cur(-$data['total']);
- else
- echo "Dr " . convert_cur($data['total']);
- echo $this->print_space($this->counter);
- echo "</td>";
-
+ echo "<td align=\"right\">" .
convert_amount_dc($data['total']) . $this->print_space($this->counter) .
"</td>";
echo "</tr>";
}
$this->counter--;
@@ -171,29 +151,8 @@ class Accountlist
echo " " . anchor('report/ledgerst/' .
$data['id'], $data['name'], array('title' =>
$data['name'] . ' Ledger Statement', 'style' =>
'color:#000000'));
echo "</td>";
echo "<td>Ledger A/C</td>";
-
- echo "<td>";
- if ($data['opbalance'] == 0)
- {
- echo "0";
- } else {
- echo ($data['optype'] == "D") ? "Dr " : "Cr
";
- echo convert_cur($data['opbalance']);
- }
- echo "</td>";
-
- echo "<td>";
- if ($data['total'] == 0)
- {
- echo "0";
- } else if ($data['total'] > 0)
- {
- echo "Dr " . convert_cur($data['total']);
- } else {
- echo "Cr " . convert_cur(-$data['total']);
- }
- echo "</td>";
-
+ echo "<td>" . convert_opening($data['opbalance'],
$data['optype']) . "</td>";
+ echo "<td>" . convert_amount_dc($data['total']) .
"</td>";
echo "<td class=\"td-actions\">" .
anchor('ledger/edit/' . $data['id'], 'Edit', array('title'
=> "Edit Ledger", 'class' => 'red-link'));
echo " " . anchor('ledger/delete/' . $data['id'],
img(array('src' => asset_url() . "images/icons/delete.png",
'border' => '0', 'alt' => 'Delete Ledger')),
array('class' => "confirmClick", 'title' => "Delete
Ledger")) . "</td>";
echo "</tr>";
diff --git a/system/application/views/report/ledgerst.php
b/system/application/views/report/ledgerst.php
index 636fa45..37b77c7 100644
--- a/system/application/views/report/ledgerst.php
+++ b/system/application/views/report/ledgerst.php
@@ -47,16 +47,10 @@
/* Ledger Summary */
echo "<table class=\"ledger-summary\">";
echo "<tr>";
- if ($optype == "D")
- echo "<td><b>Opening Balance</b></td><td>Dr "
. $opbalance . "</td>";
- else
- echo "<td><b>Opening Balance</b></td><td>Cr "
. $opbalance . "</td>";
+ echo "<td><b>Opening Balance</b></td><td>" .
convert_opening($opbalance, $optype) . "</td>";
echo "</tr>";
echo "<tr>";
- if ($clbalance < 0)
- echo "<td><b>Closing Balance</b></td><td>Cr "
. convert_cur(-$clbalance) . "</td>";
- else
- echo "<td><b>Closing Balance</b></td><td>Dr "
. convert_cur($clbalance) . "</td>";
+ echo "<td><b>Closing Balance</b></td><td>" .
convert_amount_dc($clbalance) . "</td>";
echo "</tr>";
echo "</table>";
echo "<br />";
@@ -75,10 +69,10 @@
/* Opening balance */
if ($optype == "D")
{
- echo "<tr class=\"tr-balance\"><td colspan=7>Opening
Balance</td><td>" . convert_dc($optype) . " " . $opbalance .
"</td></tr>";
+ echo "<tr class=\"tr-balance\"><td colspan=7>Opening
Balance</td><td>" . convert_opening($opbalance, $optype) .
"</td></tr>";
$cur_balance += $opbalance;
} else {
- echo "<tr class=\"tr-balance\"><td colspan=7>Opening
Balance</td><td>" . convert_dc($optype) . " " . $opbalance .
"</td></tr>";
+ echo "<tr class=\"tr-balance\"><td colspan=7>Opening
Balance</td><td>" . convert_opening($opbalance, $optype) .
"</td></tr>";
$cur_balance -= $opbalance;
}
} else {
@@ -104,12 +98,7 @@
}
/* Show new current total */
- if ($cur_balance < 0)
- {
- echo "<tr class=\"tr-balance\"><td
colspan=7>Opening</td><td>Cr " . convert_cur(-$cur_balance) .
"</td></tr>";
- } else {
- echo "<tr class=\"tr-balance\"><td
colspan=7>Opening</td><td>Dr " . convert_cur($cur_balance) .
"</td></tr>";
- }
+ echo "<tr class=\"tr-balance\"><td
colspan=7>Opening</td><td>" . convert_amount_dc($cur_balance) .
"</td></tr>";
}
foreach ($ledgerst_q->result() as $row)
@@ -184,7 +173,7 @@
}
echo "<td>";
if ($row->vdraft == 0)
- echo ($cur_balance < 0) ? "Cr " . convert_cur(-$cur_balance) : "Dr
" . convert_cur($cur_balance);
+ echo convert_amount_dc($cur_balance);
else
echo "-";
echo "</td>";
@@ -193,13 +182,7 @@
}
/* Current Page Closing Balance */
- if ($cur_balance < 0)
- {
- echo "<tr class=\"tr-balance\"><td
colspan=7>Closing</td><td>Cr " . convert_cur(-$cur_balance) .
"</td></tr>";
- } else {
- echo "<tr class=\"tr-balance\"><td
colspan=7>Closing</td><td>Dr " . convert_cur($cur_balance) .
"</td></tr>";
- }
-
+ echo "<tr class=\"tr-balance\"><td
colspan=7>Closing</td><td>" . convert_amount_dc($cur_balance) .
"</td></tr>";
echo "</table>";
}
?>
diff --git a/system/application/views/report/trialbalance.php
b/system/application/views/report/trialbalance.php
index 540e9bf..5fe7878 100644
--- a/system/application/views/report/trialbalance.php
+++ b/system/application/views/report/trialbalance.php
@@ -18,20 +18,12 @@
echo "<td>";
list ($opbal_amount, $opbal_type) =
$this->Ledger_model->get_op_balance($ledger_id);
- if ($opbal_amount == 0)
- echo "0";
- else
- echo convert_dc($opbal_type) . " " . $opbal_amount;
+ echo convert_opening($opbal_amount, $opbal_type);
echo "</td>";
echo "<td>";
$clbal_amount = $this->Ledger_model->get_ledger_balance($ledger_id);
- if ($clbal_amount == 0)
- echo "0";
- else if ($clbal_amount < 0)
- echo "Cr " . convert_cur(-$clbal_amount);
- else
- echo "Dr " . convert_cur($clbal_amount);
+ echo convert_amount_dc($clbal_amount);
echo "</td>";
echo "<td>";
diff --git a/system/application/views/welcome_message.php
b/system/application/views/welcome_message.php
index b9a2f99..5f9e14e 100644
--- a/system/application/views/welcome_message.php
+++ b/system/application/views/welcome_message.php
@@ -109,14 +109,7 @@ jQuery(document).ready(function () {
{
echo "<tr>";
echo "<td>" . anchor('report/ledgerst/' .
$row['id'], $row['name'], array('title' => $row['name']
. ' Statement')) . "</td>";
- echo "<td>";
- if ($row['balance'] == 0)
- echo "0";
- else if ($row['balance'] > 0)
- echo "Dr " . $row['balance'];
- else
- echo "Cr " . -$row['balance'];
- echo "</td>";
+ echo "<td>" . convert_amount_dc($row['balance']) .
"</td>";
echo "</tr>";
}
echo "</tbody>";
commit c000c6faf257d930d03c5e971c55b853c3b290ce
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Wed Dec 15 11:44:14 2010 +0530
Updated Voucher Settings
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/views/setting/index.php
b/system/application/views/setting/index.php
index 2088162..e925798 100644
--- a/system/application/views/setting/index.php
+++ b/system/application/views/setting/index.php
@@ -52,7 +52,7 @@
</div>
<div class="settings-container">
<div class="settings-title">
- <?php echo anchor('setting/voucher', 'Voucher',
array('title' => 'Voucher Settings')); ?>
+ <?php echo anchor('setting/voucher', 'Voucher Settings',
array('title' => 'Voucher Settings')); ?>
</div>
<div class="settings-desc">
Voucher settings
commit 5f9cca98834b7dc9b1154b29dae5817858dcfd3e
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Wed Dec 15 11:40:18 2010 +0530
Updated Logger
- Ability to clear Log
- Display full RSS feed of the log
- Display full log information
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/custom.css
b/system/application/assets/css/custom.css
index bb634e0..e4b737b 100644
--- a/system/application/assets/css/custom.css
+++ b/system/application/assets/css/custom.css
@@ -33,6 +33,10 @@ a.anchor-link-b {
text-decoration:none;
}
+.float-right {
+ float:right;
+}
+
/* Fieldset */
.fieldset-auto-width {
display:inline;
@@ -214,10 +218,6 @@ ul#pagination-flickr {
border-radius:5px;
}
-.tag-edit {
- float:right;
-}
-
/***************************** RECENT ACTIVITY ********************************/
#recent-activity-list {
margin-left:30px;
diff --git a/system/application/assets/images/icons/rss.png
b/system/application/assets/images/icons/rss.png
old mode 100755
new mode 100644
diff --git a/system/application/controllers/log.php
b/system/application/controllers/log.php
new file mode 100644
index 0000000..66730d0
--- /dev/null
+++ b/system/application/controllers/log.php
@@ -0,0 +1,45 @@
+<?php
+
+class Log extends Controller {
+ function index()
+ {
+ $this->load->helper('text');
+ $this->template->set('page_title', 'Logs');
+ $this->template->set('nav_links', array('log/clear' =>
'Clear Log'));
+ $this->template->load('template', 'log/index');
+ return;
+ }
+
+ function clear()
+ {
+ if ($this->db->query('DELETE FROM logs'))
+ {
+ $this->messages->add('Log cleared', 'success');
+ redirect("log");
+ } else {
+ $this->messages->add('Error clearing Log', 'error');
+ redirect("log");
+ }
+ return;
+ }
+
+ function feed()
+ {
+ $this->load->helper('xml');
+ $this->load->helper('text');
+ $data['feed_name'] = $this->config->item('account_name');
+ $data['feed_url'] = base_url();
+ $data['page_description'] = 'Accounting feed for ' .
$data['feed_name'];
+ $data['page_language'] = 'en-en';
+ $data['creator_email'] = $this->config->item('account_email');
+
+ $this->db->order_by("id", "desc");
+ $data['feed_data'] = $this->db->get('logs');
+
+ header("Content-Type: application/rss+xml");
+ $this->load->view('rss', $data);
+ }
+}
+
+/* End of file account.php */
+/* Location: ./system/application/controllers/account.php */
diff --git a/system/application/libraries/Logger.php
b/system/application/libraries/Logger.php
index 4a980c5..8adb7da 100644
--- a/system/application/libraries/Logger.php
+++ b/system/application/libraries/Logger.php
@@ -29,7 +29,7 @@ class Logger
default: $data['level'] = 0; break;
}
$data['host_ip'] = $CI->input->ip_address();
- $data['url'] = current_url();
+ $data['url'] = uri_string();
$data['user_agent'] = $CI->input->user_agent();
$data['message_title'] = $title;
$data['message_desc'] = $desc;
diff --git a/system/application/views/log/index.php
b/system/application/views/log/index.php
new file mode 100644
index 0000000..a1c4777
--- /dev/null
+++ b/system/application/views/log/index.php
@@ -0,0 +1,16 @@
+<?php
+ $this->db->order_by("id", "desc");
+ $logs_q = $this->db->get('logs');
+ echo "<table border=0 class=\"simple-table\">";
+ echo "<thead><tr><th
width=\"90\">Date</th><th>Host
IP</th><th>Message</th><th
width=\"30\">URL</th><th>Browser</th></tr></thead>";
+ foreach ($logs_q->result() as $row)
+ {
+ echo "<tr>";
+ echo "<td>" . date_mysql_to_php_display($row->date) .
"</td>";
+ echo "<td>" . $row->host_ip . "</td>";
+ echo "<td>" . $row->message_title . "</td>";
+ echo "<td>" . anchor($row->url, "Link",
array('title' => 'Link to action', 'class' =>
'anchor-link-a')) . "</td>";
+ echo "<td>" . character_limiter($row->user_agent, 25) .
"</td>";
+ echo "</tr>";
+ }
+ echo "</table>";
diff --git a/system/application/views/rss.php b/system/application/views/rss.php
new file mode 100644
index 0000000..920d23e
--- /dev/null
+++ b/system/application/views/rss.php
@@ -0,0 +1,31 @@
+<?php echo '<?xml version="1.0" encoding="utf-8"?>'
. "\n"; ?>
+<rss version="2.0"
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
+
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
+
xmlns:admin="http://webns.net/mvcb/"
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+
xmlns:content="http://purl.org/rss/1.0/modules/content/">
+
+ <channel>
+ <title><?php echo $feed_name; ?></title>
+ <link><?php echo $feed_url; ?></link>
+ <description><?php echo $page_description; ?></description>
+ <dc:language><?php echo $page_language; ?></dc:language>
+ <dc:creator><?php echo $creator_email; ?></dc:creator>
+
+ <dc:rights>Copyright <?php echo gmdate("Y", time());
?></dc:rights>
+ <admin:generatorAgent
rdf:resource="http://www.codeigniter.com/" />
+
+ <?php foreach($feed_data->result() as $row): ?>
+ <item>
+ <title><?php echo xml_convert($row->message_title); ?></title>
+ <link><?php echo site_url($row->url); ?></link>
+ <guid><?php echo site_url($row->url); ?></guid>
+ <description><![CDATA[
+ <?php echo $row->message_title; ?>
+ ]]></description>
+ <pubDate><?php echo $row->date; ?></pubDate>
+ </item>
+ <?php endforeach; ?>
+ </channel>
+</rss>
diff --git a/system/application/views/sidebar/tag.php
b/system/application/views/sidebar/tag.php
index 4ee56cf..a49650c 100644
--- a/system/application/views/sidebar/tag.php
+++ b/system/application/views/sidebar/tag.php
@@ -1,5 +1,5 @@
<?php
-echo "<div class=\"tag-title\">Tags<span
class=\"tag-edit\">" . anchor("tag", "Edit") .
"</span></div>";
+echo "<div class=\"tag-title\">Tags<span
class=\"float-right\">" . anchor("tag", "Edit") .
"</span></div>";
echo "<div class=\"tag-content\">";
$tags = $this->Tag_model->get_all_tags($allow_none = FALSE);
echo "<ul id=\"tag-list\">";
diff --git a/system/application/views/welcome_message.php
b/system/application/views/welcome_message.php
index 7c344fd..b9a2f99 100644
--- a/system/application/views/welcome_message.php
+++ b/system/application/views/welcome_message.php
@@ -170,7 +170,7 @@ jQuery(document).ready(function () {
</div>
<div id="dashboard-log">
<div id="dashboard-recent-log" class="dashboard-log-item">
- <div class="dashboard-log-title">Recent Activity</div>
+ <div class="dashboard-log-title">Recent Activity <span
class="float-right"><?php echo anchor('log/feed',
img(array('src'=> asset_url() . "images/icons/rss.png",
'border' => '0', 'alt' => 'Log Feed',
'width' => '16px',))); ?></span></div>
<div class="dashboard-log-content">
<?php
if ($logs)
@@ -191,7 +191,7 @@ jQuery(document).ready(function () {
{
echo "<div class=\"dashboard-log-footer\">";
echo "<span>";
- echo anchor("", "more...", array('class' =>
'anchor-link-a no-underline'));
+ echo anchor("log", "more...", array('class' =>
'anchor-link-a'));
echo "</span>";
}
?>
commit f175fcc0ef7682c9ff4e816fb4fcd7e681f41dfb
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Wed Dec 15 11:39:15 2010 +0530
Added user column to logs
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/admin/carryforward.sql
b/system/application/controllers/admin/carryforward.sql
index 4df5623..17ffdbe 100644
--- a/system/application/controllers/admin/carryforward.sql
+++ b/system/application/controllers/admin/carryforward.sql
@@ -85,6 +85,7 @@ CREATE TABLE IF NOT EXISTS logs (
date datetime NOT NULL,
level int(1) NOT NULL,
host_ip varchar(25) NOT NULL,
+ user varchar(25) NOT NULL,
url varchar(255) NOT NULL,
user_agent varchar(100) NOT NULL,
message_title varchar(255) NOT NULL,
diff --git a/system/application/controllers/admin/database.sql
b/system/application/controllers/admin/database.sql
index b474c21..db58541 100644
--- a/system/application/controllers/admin/database.sql
+++ b/system/application/controllers/admin/database.sql
@@ -85,6 +85,7 @@ CREATE TABLE IF NOT EXISTS logs (
date datetime NOT NULL,
level int(1) NOT NULL,
host_ip varchar(25) NOT NULL,
+ user varchar(25) NOT NULL,
url varchar(255) NOT NULL,
user_agent varchar(100) NOT NULL,
message_title varchar(255) NOT NULL,
commit 6cbba60d45091cf3e4f0ce59b023c0e481eab799
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Wed Dec 15 11:15:15 2010 +0530
Added Feed icon
From
http://www.feedicons.com
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/images/icons/rss.png
b/system/application/assets/images/icons/rss.png
new file mode 100755
index 0000000..d64c669
Binary files /dev/null and b/system/application/assets/images/icons/rss.png differ
commit 22b22844f43265f2bae94d20774fa85e3c914896
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 21:33:20 2010 +0530
Added Voucher email template
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 0095e82..7e9b51c 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -850,40 +850,35 @@ class Voucher extends Controller {
}
else
{
-
- /* Preparing message */
- $message = "";
- $message .= "<h3>" . ucfirst($voucher_type) . "
Voucher</h3>";
- $message .= "<p><b>" .
$this->config->item('account_name') . "</b></p>";
- $message .= "<p>" .
$this->config->item('account_address') . "</p>";
- $message .= "<p>Voucher Number : " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . "</p>";
- $message .= "<p>Voucher Date : " .
date_mysql_to_php_display($cur_voucher->date) . "</p>";
- $message .= "<table border=1>";
- $message .= "<thead><tr><th>Ledger A/C</th><th>Dr
Amount</th><th>Cr Amount</th></tr></thead>";
-
- $ledger_q;
- if ($voucher_type == "receipt" || $voucher_type == "contra")
- $ledger_q = $this->db->query("SELECT * FROM voucher_items WHERE voucher_id
= ? ORDER BY dc DESC", $voucher_id);
- else
- $ledger_q = $this->db->query("SELECT * FROM voucher_items WHERE voucher_id
= ? ORDER BY dc ASC", $voucher_id);
+ $voucher_data['voucher_type'] = $voucher_type;
+ $voucher_data['voucher_number'] = $cur_voucher->number;
+ $voucher_data['voucher_date'] =
date_mysql_to_php_display($cur_voucher->date);
+ $voucher_data['voucher_dr_total'] = $cur_voucher->dr_total;
+ $voucher_data['voucher_cr_total'] = $cur_voucher->cr_total;
+ $voucher_data['voucher_narration'] = $cur_voucher->narration;
+ $voucher_data['voucher_draft'] = $cur_voucher->draft;
- foreach ($ledger_q->result() as $row)
+ /* Getting Ledger details */
+ $ledger_q = $this->db->query("SELECT * FROM voucher_items WHERE voucher_id
= ? ORDER BY dc DESC", $voucher_id);
+
+ $counter = 0;
+ $voucher_data['ledger_data'] = array();
+ if ($ledger_q->num_rows() > 0)
{
- $message .= "<tr>";
- $message .= "<td>" .
$this->Ledger_model->get_name($row->ledger_id) . "</td>";
- if ($row->dc == "D")
+ foreach ($ledger_q->result() as $row)
{
- $message .= "<td>" . $row->amount . "</td>";
- $message .= "<td>-</td>";
- } else {
- $message .= "<td>-</td>";
- $message .= "<td>" . $row->amount . "</td>";
+ $voucher_data['ledger_data'][$counter] = array(
+ 'id' => $row->ledger_id,
+ 'name' => $this->Ledger_model->get_name($row->ledger_id),
+ 'dc' => $row->dc,
+ 'amount' => $row->amount,
+ );
+ $counter++;
}
- $message .= "</tr>";
}
- $message .=
"<tr><td><b>TOTAL</b></td><td><b>" .
$cur_voucher->dr_total . "</b></td><td><b>" .
$cur_voucher->cr_total . "</b></td></tr>";
- $message .= "</table>";
- $message .= "<p>" . "Narration : " .
$cur_voucher->narration . "</p>";
+
+ /* Preparing message */
+ $message = $this->load->view('voucher/emailpreview', $voucher_data,
TRUE);
/* Sending email */
$config['protocol'] =
$this->config->item('account_email_protocol');
diff --git a/system/application/views/voucher/emailpreview.php
b/system/application/views/voucher/emailpreview.php
new file mode 100644
index 0000000..f925edd
--- /dev/null
+++ b/system/application/views/voucher/emailpreview.php
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
+<head>
+<title>Print - <?php echo ucfirst($voucher_type); ?> Voucher Number <?php
echo $voucher_number; ?></title>
+</head>
+<body>
+ <p><?php echo $this->config->item('account_name');
?></p>
+ <p><?php echo $this->config->item('account_address');
?></p>
+ <p><strong><?php echo ucfirst($voucher_type); ?>
Voucher</strong></p>
+ <p><?php echo ucfirst($voucher_type); ?> Voucher Number :
<strong><?php echo voucher_number_prefix($voucher_type) . $voucher_number;
?></strong></p>
+ <p><?php echo ucfirst($voucher_type); ?> Voucher Date :
<strong><?php echo $voucher_date; ?></strong></p>
+ <table border=1 cellpadding=6>
+ <thead>
+ <tr><th align="left">Ledger A/C</th><th>Dr
Amount</th><th>Cr Amount</th></tr>
+ </thead>
+ <tbody>
+ <?php
+ $currency = $this->config->item('account_currency_symbol');
+ foreach ($ledger_data as $id => $row)
+ {
+ echo "<tr>";
+ if ($row['dc'] == "D")
+ {
+ echo "<td>By " . $row['name'] . "</td>";
+ } else {
+ echo "<td> To " . $row['name'] .
"</td>";
+ }
+ if ($row['dc'] == "D")
+ {
+ echo "<td>" . $currency . " " . $row['amount'] .
"</td>";
+ echo "<td></td>";
+ } else {
+ echo "<td></td>";
+ echo "<td>" . $currency . " " . $row['amount'] .
"</td>";
+ }
+ echo "</tr>";
+ }
+ echo "<tr><td>Total</td><td>" . $currency . "
" . $voucher_dr_total . "</td><td>" . $currency . "
" . $voucher_cr_total . "</td></tr>";
+ ?>
+ </tbody>
+ </table>
+ <br />
+ <p>Narration : <span class="value"><?php echo
$voucher_narration; ?></p>
+ <br />
+</body>
+</html>
commit 4e6a0bbb494801a4a8665878032fbc37bea95617
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 15:34:18 2010 +0530
Added Voucher prefix to Logger and error messages
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index d604293..0095e82 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -404,7 +404,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error addding Voucher A/C', 'error');
- $this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " . $data_number . " since failed
inserting voucher");
+ $this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " since failed inserting
voucher");
$this->template->load('template', 'voucher/add', $data);
return;
} else {
@@ -439,7 +439,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error addding Ledger A/C ' . $data_ledger_id,
'error');
- $this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " . $data_number . " since failed
inserting voucher ledger items " . "[id:" . $data_ledger_id .
"]");
+ $this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " since failed inserting
voucher ledger items " . "[id:" . $data_ledger_id . "]");
$this->template->load('template', 'voucher/add', $data);
return;
}
@@ -450,15 +450,15 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error updating voucher total', 'error');
- $this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " . $data_number . " since failed
updating debit and credit total");
+ $this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " since failed updating debit
and credit total");
$this->template->load('template', 'voucher/add', $data);
return;
}
/* Success */
$this->db->trans_complete();
- $this->messages->add(ucfirst($voucher_type) . ' Voucher number ' .
$data_number . ' added successfully', 'success');
- $this->logger->write_message("success", "Added " .
ucfirst($voucher_type) . " Voucher number " . $data_number);
+ $this->messages->add(ucfirst($voucher_type) . ' Voucher number ' .
voucher_number_prefix($voucher_type) . $data_number . ' added successfully',
'success');
+ $this->logger->write_message("success", "Added " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number);
redirect('voucher/show/' . $voucher_type);
$this->template->load('template', 'voucher/add', $data);
return;
@@ -659,7 +659,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error updating Voucher A/C', 'error');
- $this->logger->write_message("error", "Error updating voucher
details for " . ucfirst($voucher_type) . " Voucher number " . $data_number
. " [id:" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error updating voucher
details for " . ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " [id:" . $voucher_id .
"]");
$this->template->load('template', 'voucher/edit', $data);
return;
}
@@ -669,7 +669,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error deleting old Ledger A/C\'s',
'error');
- $this->logger->write_message("error", "Error updating old
voucher items for " . ucfirst($voucher_type) . " Voucher number " .
$data_number . " [id:" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error updating old
voucher items for " . ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " [id:" . $voucher_id .
"]");
$this->template->load('template', 'voucher/edit', $data);
return;
}
@@ -702,7 +702,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error updating Ledger A/C ' . $data_ledger_id,
'error');
- $this->logger->write_message("error", "Error updating new
voucher item [id:" . $data_ledger_id . "] for " . ucfirst($voucher_type) .
" Voucher number " . $data_number . " [id:" . $voucher_id .
"]");
+ $this->logger->write_message("error", "Error updating new
voucher item [id:" . $data_ledger_id . "] for " . ucfirst($voucher_type) .
" Voucher number " . voucher_number_prefix($voucher_type) . $data_number .
" [id:" . $voucher_id . "]");
$this->template->load('template', 'voucher/edit', $data);
return;
}
@@ -713,15 +713,15 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error updating voucher total', 'error');
- $this->logger->write_message("error", "Error updating voucher
total for " . ucfirst($voucher_type) . " Voucher number " . $data_number .
" [id:" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error updating voucher
total for " . ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " [id:" . $voucher_id .
"]");
$this->template->load('template', 'voucher/edit', $data);
return;
}
/* Success */
$this->db->trans_complete();
- $this->messages->add(ucfirst($voucher_type) . ' Voucher number ' .
$data_number . ' updated successfully', 'success');
- $this->logger->write_message("success", "Updated " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[id:" . $voucher_id . "]");
+ $this->messages->add(ucfirst($voucher_type) . ' Voucher number ' .
voucher_number_prefix($voucher_type) . $data_number . ' updated successfully',
'success');
+ $this->logger->write_message("success", "Updated " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $data_number . " [id:" . $voucher_id .
"]");
redirect('voucher/show/' . $voucher_type);
return;
}
@@ -743,7 +743,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error deleting Voucher - Ledgers entry',
'error');
- $this->logger->write_message("error", "Error deleting ledger
entries for " . ucfirst($voucher_type) . " Voucher number " .
$cur_voucher->number . " [id:" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error deleting ledger
entries for " . ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . " [id:" .
$voucher_id . "]");
redirect('voucher/' . $voucher_type . '/' . $voucher_id);
return;
}
@@ -751,13 +751,13 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error deleting Voucher entry', 'error');
- $this->logger->write_message("error", "Error deleting voucher
entry for " . ucfirst($voucher_type) . " Voucher number " .
$cur_voucher->number . " [id:" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error deleting voucher
entry for " . ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . " [id:" .
$voucher_id . "]");
redirect('voucher/' . $voucher_type . '/' . $voucher_id);
return;
}
$this->db->trans_complete();
$this->messages->add('Voucher deleted successfully', 'success');
- $this->logger->write_message("success", "Deleted " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[id:" . $voucher_id . "]");
+ $this->logger->write_message("success", "Deleted " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . " [id:" .
$voucher_id . "]");
redirect('voucher/show/' . $voucher_type);
return;
}
@@ -899,15 +899,15 @@ class Voucher extends Controller {
$this->email->from('', 'Webzash');
$this->email->to($this->input->post('email_to', TRUE));
- $this->email->subject(ucfirst($voucher_type) . ' Voucher No. ' .
$cur_voucher->number);
+ $this->email->subject(ucfirst($voucher_type) . ' Voucher No. ' .
voucher_number_prefix($voucher_type) . $cur_voucher->number);
$this->email->message($message);
if ($this->email->send())
{
$data['message'] = "Successfully sent email !";
- $this->logger->write_message("success", "Emailed " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[id:" . $voucher_id . "]");
+ $this->logger->write_message("success", "Emailed " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . " [id:" .
$voucher_id . "]");
} else {
$data['error'] = "Error sending email. Please check you email
settings";
- $this->logger->write_message("error", "Error emailing " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[id:" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error emailing " .
ucfirst($voucher_type) . " Voucher number " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . " [id:" .
$voucher_id . "]");
}
$this->load->view('voucher/email', $data);
return;
commit 2d1c177307cd8850248f3c5f51ed83e9e86e1229
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 15:20:18 2010 +0530
Added Voucher Prefix
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/report.php
b/system/application/controllers/report.php
index 22fd4f6..61e0cad 100644
--- a/system/application/controllers/report.php
+++ b/system/application/controllers/report.php
@@ -213,7 +213,7 @@ class Report extends Controller {
foreach ($ledgerst_q->result() as $row)
{
$ledgerst[$counter][0] = date_mysql_to_php($row->vdate);
- $ledgerst[$counter][1] = $row->vid;
+ $ledgerst[$counter][1] = voucher_number_prefix(n_to_v($row->vtype)) .
$row->vnumber;
/* Opposite voucher name */
if ($row->ldc == "D")
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 9bb55c9..d604293 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -158,7 +158,7 @@ class Voucher extends Controller {
$html .= "\">";
$html .= "<td>" . date_mysql_to_php_display($row->date) .
"</td>";
- $html .= "<td>" . anchor('voucher/view/' .
strtolower($html_voucher_type) . "/" . $row->id, $row->number,
array('title' => 'View ' . ucfirst($html_voucher_type) . '
Voucher', 'class' => 'anchor-link-a')) . "</td>";
+ $html .= "<td>" . anchor('voucher/view/' .
strtolower($html_voucher_type) . "/" . $row->id,
voucher_number_prefix($html_voucher_type) . $row->number, array('title' =>
'View ' . ucfirst($html_voucher_type) . ' Voucher', 'class' =>
'anchor-link-a')) . "</td>";
$html .= "<td>";
$html .= $this->Tag_model->show_voucher_tag($row->tag_id);
@@ -856,7 +856,7 @@ class Voucher extends Controller {
$message .= "<h3>" . ucfirst($voucher_type) . "
Voucher</h3>";
$message .= "<p><b>" .
$this->config->item('account_name') . "</b></p>";
$message .= "<p>" .
$this->config->item('account_address') . "</p>";
- $message .= "<p>Voucher Number : " . $cur_voucher->number .
"</p>";
+ $message .= "<p>Voucher Number : " .
voucher_number_prefix($voucher_type) . $cur_voucher->number . "</p>";
$message .= "<p>Voucher Date : " .
date_mysql_to_php_display($cur_voucher->date) . "</p>";
$message .= "<table border=1>";
$message .= "<thead><tr><th>Ledger A/C</th><th>Dr
Amount</th><th>Cr Amount</th></tr></thead>";
diff --git a/system/application/helpers/custom_helper.php
b/system/application/helpers/custom_helper.php
index ffe1363..bfbf915 100644
--- a/system/application/helpers/custom_helper.php
+++ b/system/application/helpers/custom_helper.php
@@ -119,5 +119,39 @@ if ( ! function_exists('v_to_n'))
}
}
+/**
+ * Converts Voucher number to proper voucher prefix formats
+ *
+ * @access public
+ * @param voucher type
+ * @return string
+ */
+if ( ! function_exists('voucher_number_prefix'))
+{
+ function voucher_number_prefix($voucher_type)
+ {
+ $CI =& get_instance();
+
+ $voucher_prefix = "";
+
+ switch ($voucher_type)
+ {
+ case "receipt":
+ $voucher_prefix = $CI->config->item('account_receipt_prefix');
+ break;
+ case "payment":
+ $voucher_prefix = $CI->config->item('account_payment_prefix');
+ break;
+ case "contra":
+ $voucher_prefix = $CI->config->item('account_contra_prefix');
+ break;
+ case "journal":
+ $voucher_prefix = $CI->config->item('account_journal_prefix');
+ break;
+ }
+ return $voucher_prefix;
+ }
+}
+
/* End of file custom_helper.php */
/* Location: ./system/application/helpers/custom_helper.php */
diff --git a/system/application/libraries/Startup.php
b/system/application/libraries/Startup.php
index 43bb741..f7b52ea 100644
--- a/system/application/libraries/Startup.php
+++ b/system/application/libraries/Startup.php
@@ -144,6 +144,10 @@ class Startup
$CI->config->set_item('account_email_port', $account_d->email_port);
$CI->config->set_item('account_email_username',
$account_d->email_username);
$CI->config->set_item('account_email_password',
$account_d->email_password);
+ $CI->config->set_item('account_receipt_prefix',
$account_d->receipt_voucher_prefix);
+ $CI->config->set_item('account_payment_prefix',
$account_d->payment_voucher_prefix);
+ $CI->config->set_item('account_contra_prefix',
$account_d->contra_voucher_prefix);
+ $CI->config->set_item('account_journal_prefix',
$account_d->journal_voucher_prefix);
/************** Load general application settings *************/
$setting_ini_file = "system/application/config/general.ini";
diff --git a/system/application/views/report/ledgerst.php
b/system/application/views/report/ledgerst.php
index 0d5a15e..636fa45 100644
--- a/system/application/views/report/ledgerst.php
+++ b/system/application/views/report/ledgerst.php
@@ -121,7 +121,7 @@
echo date_mysql_to_php_display($row->vdate);
echo "</td>";
echo "<td>";
- echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, $row->vnumber, array('title' => 'View ' . '
Voucher', 'class' => 'anchor-link-a'));
+ echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, voucher_number_prefix(n_to_v($row->vtype)) . $row->vnumber,
array('title' => 'View ' . ' Voucher', 'class' =>
'anchor-link-a'));
echo "</td>";
/* Getting opposite Ledger name */
diff --git a/system/application/views/voucher/add.php
b/system/application/views/voucher/add.php
index 08fb5f8..1bf5b6a 100644
--- a/system/application/views/voucher/add.php
+++ b/system/application/views/voucher/add.php
@@ -187,7 +187,7 @@ $(document).ready(function() {
echo "<p>";
echo form_label('Voucher Number', 'voucher_number');
echo " ";
- echo form_input($voucher_number);
+ echo voucher_number_prefix($voucher_type) . form_input($voucher_number);
echo
" ";
echo form_label('Voucher Date', 'voucher_date');
echo " ";
diff --git a/system/application/views/voucher/edit.php
b/system/application/views/voucher/edit.php
index 0a9bd5f..24a92ac 100644
--- a/system/application/views/voucher/edit.php
+++ b/system/application/views/voucher/edit.php
@@ -187,7 +187,7 @@ $(document).ready(function() {
echo "<p>";
echo form_label('Voucher Number', 'voucher_number');
echo " ";
- echo form_input($voucher_number);
+ echo voucher_number_prefix($voucher_type) . form_input($voucher_number);
echo
" ";
echo form_label('Voucher Date', 'voucher_date');
echo " ";
diff --git a/system/application/views/voucher/printpreview.php
b/system/application/views/voucher/printpreview.php
index d26daf3..8b27448 100644
--- a/system/application/views/voucher/printpreview.php
+++ b/system/application/views/voucher/printpreview.php
@@ -11,7 +11,7 @@
<br />
<div id="print-voucher-type"><span
class="value"><?php echo ucfirst($voucher_type); ?>
Voucher</span></div>
<br />
- <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Number : <span class="value"><?php echo $voucher_number;
?></span></div>
+ <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Number : <span class="value"><?php echo
voucher_number_prefix($voucher_type) . $voucher_number; ?></span></div>
<div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Date : <span class="value"><?php echo $voucher_date;
?></span></div>
<br />
<table id="print-voucher-table">
diff --git a/system/application/views/voucher/view.php
b/system/application/views/voucher/view.php
index 4f95b47..f4f2710 100644
--- a/system/application/views/voucher/view.php
+++ b/system/application/views/voucher/view.php
@@ -1,4 +1,4 @@
-<p>Voucher Number : <span class="bold"><?php echo
$cur_voucher->number; ?></span>
+<p>Voucher Number : <span class="bold"><?php echo
voucher_number_prefix($voucher_type) . $cur_voucher->number; ?></span>
Voucher Date : <span class="bold"><?php echo
date_mysql_to_php_display($cur_voucher->date); ?></span>
</p>
commit 6aea12aa0ee2155288f32efdea8a7f77c38ddd54
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 14:41:45 2010 +0530
Renamed gensetting to setting
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/admin/gensetting.php
b/system/application/controllers/admin/gensetting.php
deleted file mode 100644
index 85b2578..0000000
--- a/system/application/controllers/admin/gensetting.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-
-class Gensetting extends Controller {
-
- function Gensetting()
- {
- parent::Controller();
- return;
- }
-
- function index()
- {
- $this->template->set('page_title', 'General Settings');
-
- /* Default settings */
- $data['row_count'] = 20;
-
- /* Loading settings from ini file */
- $ini_file = "system/application/config/general.ini";
-
- /* Check if database ini file exists */
- if (get_file_info($ini_file))
- {
- /* Parsing database ini file */
- $cur_setting = parse_ini_file($ini_file);
- if ($cur_setting)
- {
- $data['row_count'] = isset($cur_setting['row_count']) ?
$cur_setting['row_count'] : "20";
- }
- }
-
- /* Form fields */
- $data['row_count_options'] = array(
- '10' => 10,
- '20' => 20,
- '50' => 50,
- '100' => 100,
- '200' => 200,
- );
-
- /* Form validations */
- $this->form_validation->set_rules('row_count', 'Row Count',
'trim|required|is_natural_no_zero');
-
- /* Repopulating form */
- if ($_POST)
- {
- $data['row_count'] = $this->input->post('row_count', TRUE);
- }
-
- /* Validating form */
- if ($this->form_validation->run() == FALSE)
- {
- $this->messages->add(validation_errors(), 'error');
- $this->template->load('admin_template', 'admin/gensetting',
$data);
- return;
- }
- else
- {
- $data_row_count = $this->input->post('row_count', TRUE);
-
- if ($data_row_count < 0 || $data_row_count > 200)
- {
- $this->messages->add('Invalid value for Row Count', 'error');
- $this->template->load('admin_template', 'admin/gensetting');
- return;
- }
-
- $new_setting = "[general]" . "\r\n" . "row_count =
\"" . $data_row_count . "\"" . "\r\n";
-
- $new_setting_html = '[general]<br />row_count = "' .
$data_row_count . '"<br />';
-
- /* Writing the connection string to end of file - writing in 'a' append mode
*/
- if ( ! write_file($ini_file, $new_setting))
- {
- $this->messages->add("Failed to update settings file. Please check if
\"" . $ini_file . "\" file is writable", 'error');
- $this->messages->add("You can manually create a text file \"" .
$ini_file . "\" with the following content :<br /><br />" .
$new_setting_html, 'error');
- $this->template->load('admin_template', 'admin/gensetting',
$data);
- return;
- } else {
- $this->messages->add('General settings updated successfully',
'success');
- redirect('admin/gensetting');
- return;
- }
- }
- return;
- }
-}
-
-/* End of file gensetting.php */
-/* Location: ./system/application/controllers/admin/gensetting.php */
diff --git a/system/application/controllers/admin/setting.php
b/system/application/controllers/admin/setting.php
new file mode 100644
index 0000000..0ab3611
--- /dev/null
+++ b/system/application/controllers/admin/setting.php
@@ -0,0 +1,90 @@
+<?php
+
+class Setting extends Controller {
+
+ function Setting()
+ {
+ parent::Controller();
+ return;
+ }
+
+ function index()
+ {
+ $this->template->set('page_title', 'General Settings');
+
+ /* Default settings */
+ $data['row_count'] = 20;
+
+ /* Loading settings from ini file */
+ $ini_file = "system/application/config/general.ini";
+
+ /* Check if database ini file exists */
+ if (get_file_info($ini_file))
+ {
+ /* Parsing database ini file */
+ $cur_setting = parse_ini_file($ini_file);
+ if ($cur_setting)
+ {
+ $data['row_count'] = isset($cur_setting['row_count']) ?
$cur_setting['row_count'] : "20";
+ }
+ }
+
+ /* Form fields */
+ $data['row_count_options'] = array(
+ '10' => 10,
+ '20' => 20,
+ '50' => 50,
+ '100' => 100,
+ '200' => 200,
+ );
+
+ /* Form validations */
+ $this->form_validation->set_rules('row_count', 'Row Count',
'trim|required|is_natural_no_zero');
+
+ /* Repopulating form */
+ if ($_POST)
+ {
+ $data['row_count'] = $this->input->post('row_count', TRUE);
+ }
+
+ /* Validating form */
+ if ($this->form_validation->run() == FALSE)
+ {
+ $this->messages->add(validation_errors(), 'error');
+ $this->template->load('admin_template', 'admin/setting',
$data);
+ return;
+ }
+ else
+ {
+ $data_row_count = $this->input->post('row_count', TRUE);
+
+ if ($data_row_count < 0 || $data_row_count > 200)
+ {
+ $this->messages->add('Invalid value for Row Count', 'error');
+ $this->template->load('admin_template', 'admin/setting');
+ return;
+ }
+
+ $new_setting = "[general]" . "\r\n" . "row_count =
\"" . $data_row_count . "\"" . "\r\n";
+
+ $new_setting_html = '[general]<br />row_count = "' .
$data_row_count . '"<br />';
+
+ /* Writing the connection string to end of file - writing in 'a' append mode
*/
+ if ( ! write_file($ini_file, $new_setting))
+ {
+ $this->messages->add("Failed to update settings file. Please check if
\"" . $ini_file . "\" file is writable", 'error');
+ $this->messages->add("You can manually create a text file \"" .
$ini_file . "\" with the following content :<br /><br />" .
$new_setting_html, 'error');
+ $this->template->load('admin_template', 'admin/setting',
$data);
+ return;
+ } else {
+ $this->messages->add('General settings updated successfully',
'success');
+ redirect('admin/setting');
+ return;
+ }
+ }
+ return;
+ }
+}
+
+/* End of file setting.php */
+/* Location: ./system/application/controllers/admin/setting.php */
diff --git a/system/application/views/admin/gensetting.php
b/system/application/views/admin/gensetting.php
deleted file mode 100644
index 07e3da8..0000000
--- a/system/application/views/admin/gensetting.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
- echo form_open('admin/gensetting');
-
- echo "<p>";
- echo form_label('Number of rows to display per page', 'row_count');
- echo "<br />";
- echo form_dropdown('row_count', $row_count_options, $row_count);
- echo "</p>";
-
- echo "<p>";
- echo form_submit('submit', 'Update');
- echo " ";
- echo anchor('admin', 'Back', array('title' => 'Back to
admin'));
- echo "</p>";
-
- echo form_close();
-
diff --git a/system/application/views/admin/setting.php
b/system/application/views/admin/setting.php
new file mode 100644
index 0000000..f365f0a
--- /dev/null
+++ b/system/application/views/admin/setting.php
@@ -0,0 +1,17 @@
+<?php
+ echo form_open('admin/setting');
+
+ echo "<p>";
+ echo form_label('Number of rows to display per page', 'row_count');
+ echo "<br />";
+ echo form_dropdown('row_count', $row_count_options, $row_count);
+ echo "</p>";
+
+ echo "<p>";
+ echo form_submit('submit', 'Update');
+ echo " ";
+ echo anchor('admin', 'Back', array('title' => 'Back to
admin'));
+ echo "</p>";
+
+ echo form_close();
+
diff --git a/system/application/views/admin/welcome.php
b/system/application/views/admin/welcome.php
index 2a8b841..d6f34de 100644
--- a/system/application/views/admin/welcome.php
+++ b/system/application/views/admin/welcome.php
@@ -32,7 +32,7 @@
<div id="right-col">
<div class="settings-container">
<div class="settings-title">
- <?php echo anchor('admin/gensetting', 'General Settings',
array('title' => 'General Application Settings')); ?>
+ <?php echo anchor('admin/setting', 'General Settings',
array('title' => 'General Application Settings')); ?>
</div>
<div class="settings-desc">
General application settings
commit d435cdb5cc49a288e5b19c428d22acfb54999c3d
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 14:36:34 2010 +0530
Added voucher prefix settings
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/setting.php
b/system/application/controllers/setting.php
index 91ffd7d..86a82b3 100644
--- a/system/application/controllers/setting.php
+++ b/system/application/controllers/setting.php
@@ -789,6 +789,95 @@ class Setting extends Controller {
redirect('setting');
return;
}
+
+ function voucher()
+ {
+ $this->template->set('page_title', 'Voucher Settings');
+ $account_data = $this->Setting_model->get_current();
+
+ $data['receipt_prefix'] = array(
+ 'name' => 'receipt_prefix',
+ 'id' => 'receipt_prefix',
+ 'maxlength' => '10',
+ 'size' => '10',
+ 'value' => '',
+ );
+ $data['payment_prefix'] = array(
+ 'name' => 'payment_prefix',
+ 'id' => 'payment_prefix',
+ 'maxlength' => '10',
+ 'size' => '10',
+ 'value' => '',
+ );
+ $data['contra_prefix'] = array(
+ 'name' => 'contra_prefix',
+ 'id' => 'contra_prefix',
+ 'maxlength' => '10',
+ 'size' => '10',
+ 'value' => '',
+ );
+ $data['journal_prefix'] = array(
+ 'name' => 'journal_prefix',
+ 'id' => 'journal_prefix',
+ 'maxlength' => '10',
+ 'size' => '10',
+ 'value' => '',
+ );
+
+ if ($account_data)
+ {
+ $data['receipt_prefix']['value'] =
$account_data->receipt_voucher_prefix;
+ $data['payment_prefix']['value'] =
$account_data->payment_voucher_prefix;
+ $data['contra_prefix']['value'] =
$account_data->contra_voucher_prefix;
+ $data['journal_prefix']['value'] =
$account_data->journal_voucher_prefix;
+ }
+
+ /* Form validations */
+ $this->form_validation->set_rules('receipt_prefix', 'Prefix Receipt
Vouchers', 'trim');
+ $this->form_validation->set_rules('payment_prefix', 'Prefix Payment
Vouchers', 'trim');
+ $this->form_validation->set_rules('contra_prefix', 'Prefix Contra
Vouchers', 'trim');
+ $this->form_validation->set_rules('journal_prefix', 'Prefix Journal
Vouchers', 'trim');
+
+ /* Repopulating form */
+ if ($_POST)
+ {
+ $data['receipt_prefix']['value'] =
$this->input->post('receipt_prefix', TRUE);
+ $data['payment_prefix']['value'] =
$this->input->post('payment_prefix', TRUE);
+ $data['contra_prefix']['value'] =
$this->input->post('contra_prefix', TRUE);
+ $data['journal_prefix']['value'] =
$this->input->post('journal_prefix', TRUE);
+ }
+
+ /* Validating form */
+ if ($this->form_validation->run() == FALSE)
+ {
+ $this->messages->add(validation_errors(), 'error');
+ $this->template->load('template', 'setting/voucher', $data);
+ return;
+ } else {
+ $data_receipt_prefix = $this->input->post('receipt_prefix', TRUE);
+ $data_payment_prefix = $this->input->post('payment_prefix', TRUE);
+ $data_contra_prefix = $this->input->post('contra_prefix', TRUE);
+ $data_journal_prefix = $this->input->post('journal_prefix', TRUE);
+
+ /* Update settings */
+ $this->db->trans_start();
+ if ( ! $this->db->query("UPDATE settings SET receipt_voucher_prefix = ?,
payment_voucher_prefix = ?, contra_voucher_prefix = ?, journal_voucher_prefix = ? WHERE id
= 1", array($data_receipt_prefix, $data_payment_prefix, $data_contra_prefix,
$data_journal_prefix)))
+ {
+ $this->db->trans_rollback();
+ $this->messages->add('Error updating voucher settings',
'error');
+ $this->logger->write_message("error", "Error updating voucher
settings");
+ $this->template->load('template', 'setting/voucher');
+ return;
+ } else {
+ $this->db->trans_complete();
+ $this->messages->add('Voucher settings updated successfully',
'success');
+ $this->logger->write_message("success", "Updated voucher
settings");
+ redirect('setting');
+ return;
+ }
+ }
+ return;
+ }
}
/* End of file setting.php */
diff --git a/system/application/views/setting/index.php
b/system/application/views/setting/index.php
index c203961..2088162 100644
--- a/system/application/views/setting/index.php
+++ b/system/application/views/setting/index.php
@@ -26,7 +26,7 @@
</div>
<div class="settings-container">
<div class="settings-title">
- <?php echo anchor('setting/printer', 'Printer Settings',
array('title' => 'Printer Settings')); ?>
+ <?php echo anchor('setting/printer', 'Printer Settings',
array('title' => 'Printer Settings')); ?>
</div>
<div class="settings-desc">
Setup printing options for vouchers, reports, etc.
@@ -50,6 +50,14 @@
Manage Voucher Tags
</div>
</div>
+ <div class="settings-container">
+ <div class="settings-title">
+ <?php echo anchor('setting/voucher', 'Voucher',
array('title' => 'Voucher Settings')); ?>
+ </div>
+ <div class="settings-desc">
+ Voucher settings
+ </div>
+ </div>
</div>
</div>
<div class="clear">
diff --git a/system/application/views/setting/voucher.php
b/system/application/views/setting/voucher.php
new file mode 100644
index 0000000..e629be6
--- /dev/null
+++ b/system/application/views/setting/voucher.php
@@ -0,0 +1,41 @@
+<?php
+ echo form_open('setting/voucher');
+
+ echo "<p>";
+ echo form_fieldset('Prefix Settings', array('class' =>
"fieldset-auto-width"));
+
+ echo "<p>";
+ echo form_label('Prefix Receipt Vouchers', 'receipt_prefix');
+ echo "<br />";
+ echo form_input($receipt_prefix);
+ echo "</p>";
+
+ echo "<p>";
+ echo form_label('Prefix Payment Vouchers', 'payment_prefix');
+ echo "<br />";
+ echo form_input($payment_prefix);
+ echo "</p>";
+
+ echo "<p>";
+ echo form_label('Prefix Contra Vouchers', 'contra_prefix');
+ echo "<br />";
+ echo form_input($contra_prefix);
+ echo "</p>";
+
+ echo "<p>";
+ echo form_label('Prefix Journal Vouchers', 'journal_prefix');
+ echo "<br />";
+ echo form_input($journal_prefix);
+ echo "</p>";
+
+ echo form_fieldset_close();
+ echo "</p>";
+
+ echo "<p>";
+ echo form_submit('submit', 'Update');
+ echo " ";
+ echo anchor('setting', 'Back', array('title' => 'Back to
settings'));
+ echo "</p>";
+
+ echo form_close();
+
commit 0ebe94b55c00e9a8b2d67be8fe434b21fc6848f9
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 13:54:10 2010 +0530
Check if Financial start date is less than end date
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/admin/create.php
b/system/application/controllers/admin/create.php
index 8c47a7c..22fb2ea 100644
--- a/system/application/controllers/admin/create.php
+++ b/system/application/controllers/admin/create.php
@@ -209,6 +209,14 @@ class Create extends Controller {
return;
}
+ /* Check if start date is less than end date */
+ if ($data_fy_end <= $data_fy_start)
+ {
+ $this->messages->add("Financial start date cannot be greater than end
date", 'error');
+ $this->template->load('admin_template', 'admin/create',
$data);
+ return;
+ }
+
if ($data_database_host == "")
$data_database_host = "localhost";
if ($data_database_port == "")
diff --git a/system/application/controllers/setting.php
b/system/application/controllers/setting.php
index e2c4f29..91ffd7d 100644
--- a/system/application/controllers/setting.php
+++ b/system/application/controllers/setting.php
@@ -291,6 +291,14 @@ class Setting extends Controller {
return;
}
+ /* Check if start date is less than end date */
+ if ($data_fy_end <= $data_fy_start)
+ {
+ $this->messages->add("Financial start date cannot be greater than end
date", 'error');
+ $this->template->load('template', 'setting/cf', $data);
+ return;
+ }
+
if ($data_database_host == "")
$data_database_host = "localhost";
if ($data_database_port == "")
commit 5821cf05d5b7dddfb7c29be3445a7cd19bebb23e
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 13:45:07 2010 +0530
Added Currency to Voucher printing
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 060e887..9bb55c9 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -181,7 +181,7 @@ class Voucher extends Controller {
$html .= " " . anchor('voucher/delete/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/delete.png", 'border' =>
'0', 'alt' => 'Delete ' . ucfirst($html_voucher_type) . '
Voucher', 'class' => "confirmClick", 'title' =>
"Delete voucher")), array('title' => 'Delete ' .
ucfirst($html_voucher_type) . ' Voucher')) . " ";
- $html .= " " . anchor_popup('voucher/printpreview/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/print.png", 'border' =>
'0', 'alt' => 'Print ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Print ' . ucfirst($html_voucher_type)
. ' Voucher')) . " ";
+ $html .= " " . anchor_popup('voucher/printpreview/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/print.png", 'border' =>
'0', 'alt' => 'Print ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Print ' . ucfirst($html_voucher_type)
. ' Voucher', 'width' => '600', 'height' =>
'600')) . " ";
$html .= " " . anchor_popup('voucher/email/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/email.png", 'border' =>
'0', 'alt' => 'Email ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Email ' . ucfirst($html_voucher_type)
. ' Voucher', 'width' => '500', 'height' =>
'300')) . "</td>";
diff --git a/system/application/views/voucher/printpreview.php
b/system/application/views/voucher/printpreview.php
index da45fb5..d26daf3 100644
--- a/system/application/views/voucher/printpreview.php
+++ b/system/application/views/voucher/printpreview.php
@@ -20,6 +20,7 @@
</thead>
<tbody>
<?php
+ $currency = $this->config->item('account_currency_symbol');
foreach ($ledger_data as $id => $row)
{
echo "<tr class=\"tr-ledger\">";
@@ -31,15 +32,15 @@
}
if ($row['dc'] == "D")
{
- echo "<td class=\"ledger-dr item\">Dr " .
$row['amount'] . "</td>";
+ echo "<td class=\"ledger-dr item\">" . $currency . "
" . $row['amount'] . "</td>";
echo "<td class=\"ledger-cr last-item\"></td>";
} else {
echo "<td class=\"ledger-dr item\"></td>";
- echo "<td class=\"ledger-cr last-item\">Cr " .
$row['amount'] . "</td>";
+ echo "<td class=\"ledger-cr last-item\">" . $currency .
" " . $row['amount'] . "</td>";
}
echo "</tr>";
}
- echo "<tr class=\"tr-total\"><td
class=\"total-name\">Total</td><td
class=\"total-dr\">Dr " . $voucher_dr_total . "</td><td
class=\"total-cr\">Cr " . $voucher_cr_total .
"</td></tr>";
+ echo "<tr class=\"tr-total\"><td
class=\"total-name\">Total</td><td
class=\"total-dr\">" . $currency . " " . $voucher_dr_total .
"</td><td class=\"total-cr\">" . $currency . " "
. $voucher_cr_total . "</td></tr>";
?>
</tbody>
</table>
diff --git a/system/application/views/voucher/view.php
b/system/application/views/voucher/view.php
index 09c36c0..4f95b47 100644
--- a/system/application/views/voucher/view.php
+++ b/system/application/views/voucher/view.php
@@ -59,7 +59,7 @@ else
echo " | ";
echo anchor('voucher/delete/' . $voucher_type . "/" .
$cur_voucher->id, 'Delete', array('class' =>
"confirmClick", 'title' => "Delete voucher",
'title' => 'Delete this ' . ucfirst($voucher_type) . '
Voucher'));
echo " | ";
- echo anchor_popup('voucher/printpreview/' . $voucher_type . "/" .
$cur_voucher->id, 'Print', array('title' => 'Print this ' .
ucfirst($voucher_type) . ' Voucher'));
+ echo anchor_popup('voucher/printpreview/' . $voucher_type . "/" .
$cur_voucher->id, 'Print', array('title' => 'Print this ' .
ucfirst($voucher_type) . ' Voucher', 'width' => '600',
'height' => '600'));
echo " | ";
echo anchor_popup('voucher/email/' . $voucher_type . "/" .
$cur_voucher->id, 'Email', array('title' => 'Email this ' .
ucfirst($voucher_type) . ' Voucher', 'width' => '400',
'height' => '200'));
commit d07518fc3ac8b297cfe58930423f9f6c8a5261f3
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 13:38:58 2010 +0530
Renamed to printpreview
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index c3a3242..060e887 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -181,7 +181,7 @@ class Voucher extends Controller {
$html .= " " . anchor('voucher/delete/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/delete.png", 'border' =>
'0', 'alt' => 'Delete ' . ucfirst($html_voucher_type) . '
Voucher', 'class' => "confirmClick", 'title' =>
"Delete voucher")), array('title' => 'Delete ' .
ucfirst($html_voucher_type) . ' Voucher')) . " ";
- $html .= " " . anchor_popup('voucher/printview/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/print.png", 'border' =>
'0', 'alt' => 'Print ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Print ' . ucfirst($html_voucher_type)
. ' Voucher')) . " ";
+ $html .= " " . anchor_popup('voucher/printpreview/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/print.png", 'border' =>
'0', 'alt' => 'Print ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Print ' . ucfirst($html_voucher_type)
. ' Voucher')) . " ";
$html .= " " . anchor_popup('voucher/email/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/email.png", 'border' =>
'0', 'alt' => 'Email ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Email ' . ucfirst($html_voucher_type)
. ' Voucher', 'width' => '500', 'height' =>
'300')) . "</td>";
@@ -762,7 +762,7 @@ class Voucher extends Controller {
return;
}
- function printview($voucher_type, $voucher_id)
+ function printpreview($voucher_type, $voucher_id)
{
$this->load->model('Setting_model');
$this->load->model('Ledger_model');
@@ -804,7 +804,7 @@ class Voucher extends Controller {
}
}
- $this->load->view('voucher/printview', $data);
+ $this->load->view('voucher/printpreview', $data);
return;
}
diff --git a/system/application/views/voucher/printpreview.php
b/system/application/views/voucher/printpreview.php
new file mode 100644
index 0000000..da45fb5
--- /dev/null
+++ b/system/application/views/voucher/printpreview.php
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
+<head>
+<title>Print - <?php echo ucfirst($voucher_type); ?> Voucher Number <?php
echo $voucher_number; ?></title>
+<?php echo link_tag(asset_url() . 'images/favicon.ico', 'shortcut
icon', 'image/ico'); ?>
+<link type="text/css" rel="stylesheet" href="<?php echo
asset_url(); ?>css/printvoucher.css">
+</head>
+<body>
+ <div id="print-account-name"><span
class="value"><?php echo
$this->config->item('account_name'); ?></span></div>
+ <div id="print-account-address"><span
class="value"><?php echo
$this->config->item('account_address'); ?></span></div>
+ <br />
+ <div id="print-voucher-type"><span
class="value"><?php echo ucfirst($voucher_type); ?>
Voucher</span></div>
+ <br />
+ <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Number : <span class="value"><?php echo $voucher_number;
?></span></div>
+ <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Date : <span class="value"><?php echo $voucher_date;
?></span></div>
+ <br />
+ <table id="print-voucher-table">
+ <thead>
+ <tr class="tr-title"><th>Ledger A/C</th><th>Dr
Amount</th><th>Cr Amount</th></tr>
+ </thead>
+ <tbody>
+ <?php
+ foreach ($ledger_data as $id => $row)
+ {
+ echo "<tr class=\"tr-ledger\">";
+ if ($row['dc'] == "D")
+ {
+ echo "<td class=\"ledger-name item\">By " .
$row['name'] . "</td>";
+ } else {
+ echo "<td class=\"ledger-name item\"> To
" . $row['name'] . "</td>";
+ }
+ if ($row['dc'] == "D")
+ {
+ echo "<td class=\"ledger-dr item\">Dr " .
$row['amount'] . "</td>";
+ echo "<td class=\"ledger-cr last-item\"></td>";
+ } else {
+ echo "<td class=\"ledger-dr item\"></td>";
+ echo "<td class=\"ledger-cr last-item\">Cr " .
$row['amount'] . "</td>";
+ }
+ echo "</tr>";
+ }
+ echo "<tr class=\"tr-total\"><td
class=\"total-name\">Total</td><td
class=\"total-dr\">Dr " . $voucher_dr_total . "</td><td
class=\"total-cr\">Cr " . $voucher_cr_total .
"</td></tr>";
+ ?>
+ </tbody>
+ </table>
+ <br />
+ <div id="print-voucher-narration">Narration : <span
class="value"><?php echo $voucher_narration;
?></span></div>
+ <br />
+ <form>
+ <input class="hide-print" type="button"
onClick="window.print()" value="Print voucher">
+ </form>
+</body>
+</html>
diff --git a/system/application/views/voucher/printview.php
b/system/application/views/voucher/printview.php
deleted file mode 100644
index 64db194..0000000
--- a/system/application/views/voucher/printview.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
-<head>
-<title>Print - <?php echo ucfirst($voucher_type); ?> Voucher Number <?php
echo $voucher_number; ?></title>
-<?php echo link_tag(asset_url() . 'images/favicon.ico', 'shortcut
icon', 'image/ico'); ?>
-<link type="text/css" rel="stylesheet" href="<?php echo
asset_url(); ?>css/printvoucher.css">
-</head>
-<body>
- <div id="print-html-link" class="hide-print"><a
href="javascript:window.print();">Print HTML</a></div>
- <br />
- <div id="print-account-name"><span
class="value"><?php echo
$this->config->item('account_name'); ?></span></div>
- <div id="print-account-address"><span
class="value"><?php echo
$this->config->item('account_address'); ?></span></div>
- <br />
- <div id="print-voucher-type"><span
class="value"><?php echo ucfirst($voucher_type); ?>
Voucher</span></div>
- <br />
- <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Number : <span class="value"><?php echo $voucher_number;
?></span></div>
- <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Date : <span class="value"><?php echo $voucher_date;
?></span></div>
- <br />
- <table id="print-voucher-table">
- <thead>
- <tr class="tr-title"><th>Ledger A/C</th><th>Dr
Amount</th><th>Cr Amount</th></tr>
- </thead>
- <tbody>
- <?php
- foreach ($ledger_data as $id => $row)
- {
- echo "<tr class=\"tr-ledger\">";
- if ($row['dc'] == "D")
- {
- echo "<td class=\"ledger-name item\">By " .
$row['name'] . "</td>";
- } else {
- echo "<td class=\"ledger-name item\"> To
" . $row['name'] . "</td>";
- }
- if ($row['dc'] == "D")
- {
- echo "<td class=\"ledger-dr item\">Dr " .
$row['amount'] . "</td>";
- echo "<td class=\"ledger-cr last-item\"></td>";
- } else {
- echo "<td class=\"ledger-dr item\"></td>";
- echo "<td class=\"ledger-cr last-item\">Cr " .
$row['amount'] . "</td>";
- }
- echo "</tr>";
- }
- echo "<tr class=\"tr-total\"><td
class=\"total-name\">Total</td><td
class=\"total-dr\">Dr " . $voucher_dr_total . "</td><td
class=\"total-cr\">Cr " . $voucher_cr_total .
"</td></tr>";
- ?>
- </tbody>
- </table>
- <br />
- <div id="print-voucher-narration">Narration : <span
class="value"><?php echo $voucher_narration;
?></span></div>
- <br />
- <form>
- <input class="hide-print" type="button"
onClick="window.print()" value="Print voucher">
- </form>
-</body>
-</html>
diff --git a/system/application/views/voucher/view.php
b/system/application/views/voucher/view.php
index 80c4f09..09c36c0 100644
--- a/system/application/views/voucher/view.php
+++ b/system/application/views/voucher/view.php
@@ -59,7 +59,7 @@ else
echo " | ";
echo anchor('voucher/delete/' . $voucher_type . "/" .
$cur_voucher->id, 'Delete', array('class' =>
"confirmClick", 'title' => "Delete voucher",
'title' => 'Delete this ' . ucfirst($voucher_type) . '
Voucher'));
echo " | ";
- echo anchor_popup('voucher/printview/' . $voucher_type . "/" .
$cur_voucher->id, 'Print', array('title' => 'Print this ' .
ucfirst($voucher_type) . ' Voucher'));
+ echo anchor_popup('voucher/printpreview/' . $voucher_type . "/" .
$cur_voucher->id, 'Print', array('title' => 'Print this ' .
ucfirst($voucher_type) . ' Voucher'));
echo " | ";
echo anchor_popup('voucher/email/' . $voucher_type . "/" .
$cur_voucher->id, 'Email', array('title' => 'Email this ' .
ucfirst($voucher_type) . ' Voucher', 'width' => '400',
'height' => '200'));
commit f82d48dc342d90190e82bdf7562f2c27aac2dbc7
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 12:51:00 2010 +0530
Added Voucher print styling
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/printvoucher.css
b/system/application/assets/css/printvoucher.css
index e69de29..7578edc 100644
--- a/system/application/assets/css/printvoucher.css
+++ b/system/application/assets/css/printvoucher.css
@@ -0,0 +1,61 @@
+/*********************************** COMMON ***********************************/
+body {
+ color:#000000;
+ font:14px "Helvetica Neue","Lucida Grande","Helvetica
Neue",Arial,sans-serif;
+ margin:20px;
+ padding:0;
+}
+
+/******************************** SPECIFIC ************************************/
+
+#print-account-name {
+ text-align:center;
+ font-size:17px;
+}
+
+#print-account-address {
+ text-align:center;
+ font-size:14px;
+}
+
+#print-voucher-type {
+ text-align:center;
+ font-size:15px;
+}
+
+table#print-voucher-table {
+ border:1px solid #000000;
+ border-collapse: collapse;
+}
+
+table#print-voucher-table tr.tr-title {
+ text-align:left;
+ border:1px solid #000000;
+ padding:5px 0 5px 2px;
+}
+
+table#print-voucher-table tr.tr-title th {
+ padding:5px 0 5px 5px;
+}
+
+table#print-voucher-table td {
+ padding:5px 0 5px 5px;
+}
+
+table#print-voucher-table td.item {
+ padding-right:35px;
+}
+
+table#print-voucher-table td.last-item {
+ padding-right:5px;
+}
+
+table#print-voucher-table tr.tr-total {
+ border:1px solid #000000;
+}
+
+@media print {
+ .hide-print {
+ display: none;
+ }
+}
\ No newline at end of file
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 32e88c9..c3a3242 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -786,11 +786,7 @@ class Voucher extends Controller {
$data['voucher_draft'] = $cur_voucher->draft;
/* Getting Ledger details */
- $ledger_q;
- if ($voucher_type == "receipt" || $voucher_type == "contra")
- $ledger_q = $this->db->query("SELECT * FROM voucher_items WHERE voucher_id
= ? ORDER BY dc DESC", $voucher_id);
- else
- $ledger_q = $this->db->query("SELECT * FROM voucher_items WHERE voucher_id
= ? ORDER BY dc ASC", $voucher_id);
+ $ledger_q = $this->db->query("SELECT * FROM voucher_items WHERE voucher_id =
? ORDER BY dc DESC", $voucher_id);
$counter = 0;
$data['ledger_data'] = array();
diff --git a/system/application/views/voucher/printview.php
b/system/application/views/voucher/printview.php
index 8e827bf..64db194 100644
--- a/system/application/views/voucher/printview.php
+++ b/system/application/views/voucher/printview.php
@@ -6,36 +6,50 @@
<link type="text/css" rel="stylesheet" href="<?php echo
asset_url(); ?>css/printvoucher.css">
</head>
<body>
- <div id="print-html-link"><a
href="JavaScript:window.print();">Print HTML</a></div>
- <div id="print-voucher-type"><span
class="value"><?php echo ucfirst($voucher_type); ?>
Voucher</span></div>
+ <div id="print-html-link" class="hide-print"><a
href="javascript:window.print();">Print HTML</a></div>
+ <br />
<div id="print-account-name"><span
class="value"><?php echo
$this->config->item('account_name'); ?></span></div>
<div id="print-account-address"><span
class="value"><?php echo
$this->config->item('account_address'); ?></span></div>
- <div id="print-voucher-number">Voucher Number : <span
class="value"><?php echo $voucher_number; ?></span></div>
- <div id="print-voucher-number">Voucher Date : <span
class="value"><?php echo $voucher_date; ?></span></div>
+ <br />
+ <div id="print-voucher-type"><span
class="value"><?php echo ucfirst($voucher_type); ?>
Voucher</span></div>
+ <br />
+ <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Number : <span class="value"><?php echo $voucher_number;
?></span></div>
+ <div id="print-voucher-number"><?php echo ucfirst($voucher_type);
?> Voucher Date : <span class="value"><?php echo $voucher_date;
?></span></div>
+ <br />
<table id="print-voucher-table">
<thead>
- <tr><th>Ledger A/C</th><th>Dr Amount</th><th>Cr
Amount</th></tr>
+ <tr class="tr-title"><th>Ledger A/C</th><th>Dr
Amount</th><th>Cr Amount</th></tr>
</thead>
<tbody>
<?php
foreach ($ledger_data as $id => $row)
{
- echo "<tr>";
- echo "<td>" . $row['name'] . "</td>";
+ echo "<tr class=\"tr-ledger\">";
+ if ($row['dc'] == "D")
+ {
+ echo "<td class=\"ledger-name item\">By " .
$row['name'] . "</td>";
+ } else {
+ echo "<td class=\"ledger-name item\"> To
" . $row['name'] . "</td>";
+ }
if ($row['dc'] == "D")
{
- echo "<td>Dr " . $row['amount'] . "</td>";
- echo "<td></td>";
+ echo "<td class=\"ledger-dr item\">Dr " .
$row['amount'] . "</td>";
+ echo "<td class=\"ledger-cr last-item\"></td>";
} else {
- echo "<td></td>";
- echo "<td>Cr " . $row['amount'] . "</td>";
+ echo "<td class=\"ledger-dr item\"></td>";
+ echo "<td class=\"ledger-cr last-item\">Cr " .
$row['amount'] . "</td>";
}
echo "</tr>";
}
- echo "<tr><td>Total</td><td>Dr " . $voucher_dr_total
. "</td><td>Cr " . $voucher_cr_total .
"</td></tr>";
+ echo "<tr class=\"tr-total\"><td
class=\"total-name\">Total</td><td
class=\"total-dr\">Dr " . $voucher_dr_total . "</td><td
class=\"total-cr\">Cr " . $voucher_cr_total .
"</td></tr>";
?>
</tbody>
</table>
+ <br />
<div id="print-voucher-narration">Narration : <span
class="value"><?php echo $voucher_narration;
?></span></div>
+ <br />
+ <form>
+ <input class="hide-print" type="button"
onClick="window.print()" value="Print voucher">
+ </form>
</body>
</html>
commit 88f5830960bb0a87e26b3b7c06007d076954ad73
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Tue Dec 14 12:14:10 2010 +0530
Voucher print now uses a separate view and css
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/printvoucher.css
b/system/application/assets/css/printvoucher.css
new file mode 100644
index 0000000..e69de29
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 3023138..32e88c9 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -181,7 +181,7 @@ class Voucher extends Controller {
$html .= " " . anchor('voucher/delete/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/delete.png", 'border' =>
'0', 'alt' => 'Delete ' . ucfirst($html_voucher_type) . '
Voucher', 'class' => "confirmClick", 'title' =>
"Delete voucher")), array('title' => 'Delete ' .
ucfirst($html_voucher_type) . ' Voucher')) . " ";
- $html .= " " . anchor_popup('voucher/printhtml/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/print.png", 'border' =>
'0', 'alt' => 'Print ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Print ' . ucfirst($html_voucher_type)
. ' Voucher')) . " ";
+ $html .= " " . anchor_popup('voucher/printview/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/print.png", 'border' =>
'0', 'alt' => 'Print ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Print ' . ucfirst($html_voucher_type)
. ' Voucher')) . " ";
$html .= " " . anchor_popup('voucher/email/' .
strtolower($html_voucher_type) . "/" . $row->id , img(array('src'
=> asset_url() . "images/icons/email.png", 'border' =>
'0', 'alt' => 'Email ' . ucfirst($html_voucher_type) . '
Voucher')), array('title' => 'Email ' . ucfirst($html_voucher_type)
. ' Voucher', 'width' => '500', 'height' =>
'300')) . "</td>";
@@ -762,7 +762,7 @@ class Voucher extends Controller {
return;
}
- function printhtml($voucher_type, $voucher_id)
+ function printview($voucher_type, $voucher_id)
{
$this->load->model('Setting_model');
$this->load->model('Ledger_model');
@@ -777,37 +777,38 @@ class Voucher extends Controller {
return;
}
- echo "<h3>" . ucfirst($voucher_type) . "
Voucher</h3>";
- echo "<p><b>" . $account->name .
"</b></p>";
- echo "<p>" . $account->address . "</p>";
- echo "<p>Voucher Number : " . $cur_voucher->number .
"</p>";
- echo "<p>Voucher Date : " .
date_mysql_to_php_display($cur_voucher->date) . "</p>";
- echo "<table border=1>";
- echo "<thead><tr><th>Ledger A/C</th><th>Dr
Amount</th><th>Cr Amount</th></tr></thead>";
-
+ $data['voucher_type'] = $voucher_type;
+ $data['voucher_number'] = $cur_voucher->number;
+ $data['voucher_date'] = date_mysql_to_php_display($cur_voucher->date);
+ $data['voucher_dr_total'] = $cur_voucher->dr_total;
+ $data['voucher_cr_total'] = $cur_voucher->cr_total;
+ $data['voucher_narration'] = $cur_voucher->narration;
+ $data['voucher_draft'] = $cur_voucher->draft;
+
+ /* Getting Ledger details */
$ledger_q;
if ($voucher_type == "receipt" || $voucher_type == "contra")
$ledger_q = $this->db->query("SELECT * FROM voucher_items WHERE voucher_id
= ? ORDER BY dc DESC", $voucher_id);
else
$ledger_q = $this->db->query("SELECT * FROM voucher_items WHERE voucher_id
= ? ORDER BY dc ASC", $voucher_id);
-
- foreach ($ledger_q->result() as $row)
+
+ $counter = 0;
+ $data['ledger_data'] = array();
+ if ($ledger_q->num_rows() > 0)
{
- echo "<tr>";
- echo "<td>" . $this->Ledger_model->get_name($row->ledger_id)
. "</td>";
- if ($row->dc == "D")
+ foreach ($ledger_q->result() as $row)
{
- echo "<td>" . $row->amount . "</td>";
- echo "<td>-</td>";
- } else {
- echo "<td>-</td>";
- echo "<td>" . $row->amount . "</td>";
+ $data['ledger_data'][$counter] = array(
+ 'id' => $row->ledger_id,
+ 'name' => $this->Ledger_model->get_name($row->ledger_id),
+ 'dc' => $row->dc,
+ 'amount' => $row->amount,
+ );
+ $counter++;
}
- echo "</tr>";
}
- echo
"<tr><td><b>TOTAL</b></td><td><b>" .
$cur_voucher->dr_total . "</b></td><td><b>" .
$cur_voucher->cr_total . "</b></td></tr>";
- echo "</table>";
- echo "<p>" . "Narration : " . $cur_voucher->narration .
"</p>";
+
+ $this->load->view('voucher/printview', $data);
return;
}
diff --git a/system/application/views/voucher/printview.php
b/system/application/views/voucher/printview.php
new file mode 100644
index 0000000..8e827bf
--- /dev/null
+++ b/system/application/views/voucher/printview.php
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">
+<head>
+<title>Print - <?php echo ucfirst($voucher_type); ?> Voucher Number <?php
echo $voucher_number; ?></title>
+<?php echo link_tag(asset_url() . 'images/favicon.ico', 'shortcut
icon', 'image/ico'); ?>
+<link type="text/css" rel="stylesheet" href="<?php echo
asset_url(); ?>css/printvoucher.css">
+</head>
+<body>
+ <div id="print-html-link"><a
href="JavaScript:window.print();">Print HTML</a></div>
+ <div id="print-voucher-type"><span
class="value"><?php echo ucfirst($voucher_type); ?>
Voucher</span></div>
+ <div id="print-account-name"><span
class="value"><?php echo
$this->config->item('account_name'); ?></span></div>
+ <div id="print-account-address"><span
class="value"><?php echo
$this->config->item('account_address'); ?></span></div>
+ <div id="print-voucher-number">Voucher Number : <span
class="value"><?php echo $voucher_number; ?></span></div>
+ <div id="print-voucher-number">Voucher Date : <span
class="value"><?php echo $voucher_date; ?></span></div>
+ <table id="print-voucher-table">
+ <thead>
+ <tr><th>Ledger A/C</th><th>Dr Amount</th><th>Cr
Amount</th></tr>
+ </thead>
+ <tbody>
+ <?php
+ foreach ($ledger_data as $id => $row)
+ {
+ echo "<tr>";
+ echo "<td>" . $row['name'] . "</td>";
+ if ($row['dc'] == "D")
+ {
+ echo "<td>Dr " . $row['amount'] . "</td>";
+ echo "<td></td>";
+ } else {
+ echo "<td></td>";
+ echo "<td>Cr " . $row['amount'] . "</td>";
+ }
+ echo "</tr>";
+ }
+ echo "<tr><td>Total</td><td>Dr " . $voucher_dr_total
. "</td><td>Cr " . $voucher_cr_total .
"</td></tr>";
+ ?>
+ </tbody>
+ </table>
+ <div id="print-voucher-narration">Narration : <span
class="value"><?php echo $voucher_narration;
?></span></div>
+</body>
+</html>
diff --git a/system/application/views/voucher/view.php
b/system/application/views/voucher/view.php
index 2857822..80c4f09 100644
--- a/system/application/views/voucher/view.php
+++ b/system/application/views/voucher/view.php
@@ -59,7 +59,7 @@ else
echo " | ";
echo anchor('voucher/delete/' . $voucher_type . "/" .
$cur_voucher->id, 'Delete', array('class' =>
"confirmClick", 'title' => "Delete voucher",
'title' => 'Delete this ' . ucfirst($voucher_type) . '
Voucher'));
echo " | ";
- echo anchor_popup('voucher/printhtml/' . $voucher_type . "/" .
$cur_voucher->id, 'Print', array('title' => 'Print this ' .
ucfirst($voucher_type) . ' Voucher'));
+ echo anchor_popup('voucher/printview/' . $voucher_type . "/" .
$cur_voucher->id, 'Print', array('title' => 'Print this ' .
ucfirst($voucher_type) . ' Voucher'));
echo " | ";
echo anchor_popup('voucher/email/' . $voucher_type . "/" .
$cur_voucher->id, 'Email', array('title' => 'Email this ' .
ucfirst($voucher_type) . ' Voucher', 'width' => '400',
'height' => '200'));
commit 5a0728d5e77394fe4c9095839710ec98dc22864d
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Mon Dec 13 16:52:22 2010 +0530
Added new form element form_input_date_restrict
- Added it to voucher add and edit
- Restrict the date range within the financial year
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/helpers/MY_form_helper.php
b/system/application/helpers/MY_form_helper.php
index 441f6c7..e3a7dc7 100644
--- a/system/application/helpers/MY_form_helper.php
+++ b/system/application/helpers/MY_form_helper.php
@@ -43,6 +43,16 @@ if ( ! function_exists('form_input_date'))
}
}
+if ( ! function_exists('form_input_date_restrict'))
+{
+ function form_input_date_restrict($data = '', $value = '', $extra =
'')
+ {
+ $defaults = array('type' => 'text', 'name' => (( !
is_array($data)) ? $data : ''), 'value' => $value);
+
+ return "<input "._parse_form_attributes($data, $defaults).$extra."
class=\"datepicker-restrict\"/>";
+ }
+}
+
if ( ! function_exists('form_input_ledger'))
{
function form_input_ledger($name, $selected = NULL, $extra = '')
diff --git a/system/application/views/template.php
b/system/application/views/template.php
index 526b70a..2eb72b3 100644
--- a/system/application/views/template.php
+++ b/system/application/views/template.php
@@ -47,6 +47,11 @@ $(document).ready(function() {
extraWidth: 1
}).superfish(); // call supersubs first, then superfish, so that subs are
$('.datepicker').datepick({dateFormat: '<?php echo
$this->config->item('account_date_format'); ?>'});
+ $('.datepicker-restrict').datepick({
+ dateFormat: '<?php echo
$this->config->item('account_date_format'); ?>',
+ minDate: '<?php echo
date_mysql_to_php($this->config->item('account_fy_start')); ?>',
+ maxDate: '<?php echo
date_mysql_to_php($this->config->item('account_fy_end')); ?>',
+ });
});
</script>
diff --git a/system/application/views/voucher/add.php
b/system/application/views/voucher/add.php
index c73c2bf..08fb5f8 100644
--- a/system/application/views/voucher/add.php
+++ b/system/application/views/voucher/add.php
@@ -191,7 +191,7 @@ $(document).ready(function() {
echo
" ";
echo form_label('Voucher Date', 'voucher_date');
echo " ";
- echo form_input_date($voucher_date);
+ echo form_input_date_restrict($voucher_date);
echo "</p>";
echo "<table class=\"voucher-table\">";
diff --git a/system/application/views/voucher/edit.php
b/system/application/views/voucher/edit.php
index 7022da2..0a9bd5f 100644
--- a/system/application/views/voucher/edit.php
+++ b/system/application/views/voucher/edit.php
@@ -191,7 +191,7 @@ $(document).ready(function() {
echo
" ";
echo form_label('Voucher Date', 'voucher_date');
echo " ";
- echo form_input_date($voucher_date);
+ echo form_input_date_restrict($voucher_date);
echo "</p>";
echo "<table class=\"voucher-table\">";
commit 889952cae9a96754a6e2c5e820d7ee640d6b3cfc
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Mon Dec 13 16:27:21 2010 +0530
Styled Recent Activity list
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/custom.css
b/system/application/assets/css/custom.css
index cd39a29..bb634e0 100644
--- a/system/application/assets/css/custom.css
+++ b/system/application/assets/css/custom.css
@@ -33,6 +33,25 @@ a.anchor-link-b {
text-decoration:none;
}
+/* Fieldset */
+.fieldset-auto-width {
+ display:inline;
+ padding:20px;
+ padding-right:50px;
+}
+
+.fieldset-auto-width legend {
+ border: 1px solid #0099CC;
+ background:#E5F1F4;
+ padding:4px;
+}
+
+/* Form */
+.form-help-text {
+ font-size:12px;
+ font-weight:italic;
+}
+
/******************************** PAGINATION **********************************/
#pagination-container {
margin-top:20px;
@@ -95,39 +114,6 @@ ul#pagination-flickr {
border:solid 1px #666666;
}
-/* Fieldset */
-.fieldset-auto-width {
- display:inline;
- padding:20px;
- padding-right:50px;
-}
-
-.fieldset-auto-width legend {
- border: 1px solid #0099CC;
- background:#E5F1F4;
- padding:4px;
-}
-
-/* Tags */
-.tags {
- font-size:10px;
- font-weight:bold;
- text-decoration:none;
- margin:0 5px 0 1px;
- padding:3px;
- -moz-border-radius:5px;
- border-radius:5px;
-}
-
-.form-help-text {
- font-size:12px;
- font-weight:italic;
-}
-
-.tag-edit {
- float:right;
-}
-
/********************************* DASHBOARD **********************************/
#dashboard-summary {
@@ -217,3 +203,24 @@ ul#pagination-flickr {
color:#0000FF;
text-decoration:none;
}
+
+.tags {
+ font-size:10px;
+ font-weight:bold;
+ text-decoration:none;
+ margin:0 5px 0 1px;
+ padding:3px;
+ -moz-border-radius:5px;
+ border-radius:5px;
+}
+
+.tag-edit {
+ float:right;
+}
+
+/***************************** RECENT ACTIVITY ********************************/
+#recent-activity-list {
+ margin-left:30px;
+ padding:0px;
+ list-style-type:square;
+}
diff --git a/system/application/views/welcome_message.php
b/system/application/views/welcome_message.php
index 4e92f7c..7c344fd 100644
--- a/system/application/views/welcome_message.php
+++ b/system/application/views/welcome_message.php
@@ -175,7 +175,7 @@ jQuery(document).ready(function () {
<?php
if ($logs)
{
- echo "<ul>";
+ echo "<ul id=\"recent-activity-list\">";
foreach ($logs->result() as $row)
{
echo "<li>" . $row->message_title . "</li>";
commit 941146b99d3fa0f85960538c749da658902100f9
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Mon Dec 13 16:17:47 2010 +0530
Cleaned up CSS inline styles
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/admin-style.css
b/system/application/assets/css/admin-style.css
index 2761156..8c7c565 100644
--- a/system/application/assets/css/admin-style.css
+++ b/system/application/assets/css/admin-style.css
@@ -110,11 +110,6 @@ body {
text-decoration:none;
}
-#content #main ul#main-links-nav li a:hover
-{
- color:#444444;
-}
-
/* MESSAGE BOX */
#message-box {
border:solid 1px #787878;
@@ -166,3 +161,8 @@ a.no-underline {
text-align:left;
}
+#admin-area {
+ font-size:18px;
+ color:#FF0000;
+}
+
diff --git a/system/application/assets/css/custom.css
b/system/application/assets/css/custom.css
index 17211f1..cd39a29 100644
--- a/system/application/assets/css/custom.css
+++ b/system/application/assets/css/custom.css
@@ -24,8 +24,13 @@
color:#999999;
}
-.black-link {
+a.anchor-link-a {
+ color:#1A2745;
+}
+
+a.anchor-link-b {
color:#000000;
+ text-decoration:none;
}
/******************************** PAGINATION **********************************/
@@ -93,7 +98,8 @@ ul#pagination-flickr {
/* Fieldset */
.fieldset-auto-width {
display:inline;
- padding:10px;
+ padding:20px;
+ padding-right:50px;
}
.fieldset-auto-width legend {
@@ -118,6 +124,10 @@ ul#pagination-flickr {
font-weight:italic;
}
+.tag-edit {
+ float:right;
+}
+
/********************************* DASHBOARD **********************************/
#dashboard-summary {
diff --git a/system/application/assets/css/style.css
b/system/application/assets/css/style.css
index da89225..7bf6cb8 100644
--- a/system/application/assets/css/style.css
+++ b/system/application/assets/css/style.css
@@ -157,4 +157,9 @@ a.no-underline {
text-decoration:none;
}
+/* NOT SO COMMON */
+#beta-area {
+ font-size:18px;
+ color:#00000;
+}
diff --git a/system/application/assets/css/tables.css
b/system/application/assets/css/tables.css
index c0ba714..0e9a903 100644
--- a/system/application/assets/css/tables.css
+++ b/system/application/assets/css/tables.css
@@ -39,8 +39,8 @@
color:#FF0000;
}
-.simple-table a.blue-link {
- color:#1A2745;
+tr.total-area {
+ background-color: #F8F8F8;
}
/******************************************************************************/
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 2f5eea7..3023138 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -158,15 +158,15 @@ class Voucher extends Controller {
$html .= "\">";
$html .= "<td>" . date_mysql_to_php_display($row->date) .
"</td>";
- $html .= "<td>" . anchor('voucher/view/' .
strtolower($html_voucher_type) . "/" . $row->id, $row->number,
array('title' => 'View ' . ucfirst($html_voucher_type) . '
Voucher', 'class' => 'blue-link')) . "</td>";
+ $html .= "<td>" . anchor('voucher/view/' .
strtolower($html_voucher_type) . "/" . $row->id, $row->number,
array('title' => 'View ' . ucfirst($html_voucher_type) . '
Voucher', 'class' => 'anchor-link-a')) . "</td>";
$html .= "<td>";
$html .= $this->Tag_model->show_voucher_tag($row->tag_id);
if ($ledger)
if ($ledger_multiple)
- $html .= anchor('voucher/view/' . strtolower($html_voucher_type) .
"/" . $row->id, "(" . $ledger->name . ")",
array('title' => 'View ' . ucfirst($html_voucher_type) . '
Voucher', 'class' => 'blue-link'));
+ $html .= anchor('voucher/view/' . strtolower($html_voucher_type) .
"/" . $row->id, "(" . $ledger->name . ")",
array('title' => 'View ' . ucfirst($html_voucher_type) . '
Voucher', 'class' => 'anchor-link-a'));
else
- $html .= anchor('voucher/view/' . strtolower($html_voucher_type) .
"/" . $row->id, $ledger->name, array('title' => 'View '
. ucfirst($html_voucher_type) . ' Voucher', 'class' =>
'blue-link'));
+ $html .= anchor('voucher/view/' . strtolower($html_voucher_type) .
"/" . $row->id, $ledger->name, array('title' => 'View '
. ucfirst($html_voucher_type) . ' Voucher', 'class' =>
'anchor-link-a'));
$html .= "</td>";
$html .= "<td>" . ucfirst($html_voucher_type) .
"</td>";
diff --git a/system/application/views/admin/create.php
b/system/application/views/admin/create.php
index 86deaad..130c295 100644
--- a/system/application/views/admin/create.php
+++ b/system/application/views/admin/create.php
@@ -62,7 +62,7 @@
echo "</p>";
echo "<p>";
- echo form_fieldset('Database Settings', array('class' =>
"fieldset-auto-width", 'style' => "width:500px;"));
+ echo form_fieldset('Database Settings', array('class' =>
"fieldset-auto-width"));
echo "<p>";
echo form_checkbox('create_database', 1, $create_database) . " Create
database if it does not exists";
diff --git a/system/application/views/admin_template.php
b/system/application/views/admin_template.php
index 6d69061..ecaa4ab 100644
--- a/system/application/views/admin_template.php
+++ b/system/application/views/admin_template.php
@@ -33,10 +33,10 @@ $(document).ready(function(){
<div id="container">
<div id="header">
<div id="logo">
- Webzash <span style="font-size:18px;color:#FF0000;">Admin
area</span>
+ Webzash <span id="admin-area">Admin area</span>
</div>
<div id="admin">
- <?php echo anchor('', 'Back to accounts', array('title'
=> "Back to accounts", 'style' => 'color:#000000;
text-decoration:none')); ?>
+ <?php echo anchor('', 'Back to accounts', array('title'
=> "Back to accounts", 'class' => 'anchor-link-b'));
?>
</div>
<div id="info">
</div>
diff --git a/system/application/views/report/balancesheet.php
b/system/application/views/report/balancesheet.php
index 174c803..daad730 100644
--- a/system/application/views/report/balancesheet.php
+++ b/system/application/views/report/balancesheet.php
@@ -42,7 +42,7 @@
$total = $liability_total;
- echo "<tr style=\"background-color:#F8F8F8;\">";
+ echo "<tr class=\"total-area\">";
echo "<td>";
echo "<table border=0 cellpadding=5
class=\"balance-sheet-total-table\" width=\"450\">";
echo "<tr valign=\"top\">";
diff --git a/system/application/views/report/ledgerst.php
b/system/application/views/report/ledgerst.php
index 78054ab..0d5a15e 100644
--- a/system/application/views/report/ledgerst.php
+++ b/system/application/views/report/ledgerst.php
@@ -121,7 +121,7 @@
echo date_mysql_to_php_display($row->vdate);
echo "</td>";
echo "<td>";
- echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, $row->vnumber, array('title' => 'View ' . '
Voucher', 'style' => 'color:#000000'));
+ echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, $row->vnumber, array('title' => 'View ' . '
Voucher', 'class' => 'anchor-link-a'));
echo "</td>";
/* Getting opposite Ledger name */
@@ -135,9 +135,9 @@
$opp_ledger_name =
$this->Ledger_model->get_name($opp_voucher_name_d->ledger_id);
if ($opp_voucher_name_q->num_rows() > 1)
{
- echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, "(" . $opp_ledger_name . ")", array('title'
=> 'View ' . ' Voucher', 'style' =>
'color:#000000'));
+ echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, "(" . $opp_ledger_name . ")", array('title'
=> 'View ' . ' Voucher', 'class' =>
'anchor-link-a'));
} else {
- echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, $opp_ledger_name, array('title' => 'View ' . '
Voucher', 'style' => 'color:#000000'));
+ echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, $opp_ledger_name, array('title' => 'View ' . '
Voucher', 'class' => 'anchor-link-a'));
}
}
} else {
@@ -147,9 +147,9 @@
$opp_ledger_name =
$this->Ledger_model->get_name($opp_voucher_name_d->ledger_id);
if ($opp_voucher_name_q->num_rows() > 1)
{
- echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, "(" . $opp_ledger_name . ")", array('title'
=> 'View ' . ' Voucher', 'style' =>
'color:#000000'));
+ echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, "(" . $opp_ledger_name . ")", array('title'
=> 'View ' . ' Voucher', 'class' =>
'anchor-link-a'));
} else {
- echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, $opp_ledger_name, array('title' => 'View ' . '
Voucher', 'style' => 'color:#000000'));
+ echo anchor('voucher/view/' . n_to_v($row->vtype) . '/' .
$row->vid, $opp_ledger_name, array('title' => 'View ' . '
Voucher', 'class' => 'anchor-link-a'));
}
}
diff --git a/system/application/views/report/profitandloss.php
b/system/application/views/report/profitandloss.php
index c134b7d..f60d9e5 100644
--- a/system/application/views/report/profitandloss.php
+++ b/system/application/views/report/profitandloss.php
@@ -47,7 +47,7 @@
/* Showing Gross P/L : Expenses */
$grosstotal = $gross_expense_total;
- echo "<tr style=\"background-color:#F8F8F8;\">";
+ echo "<tr class=\"total-area\">";
echo "<td>";
echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"450\">";
echo "<tr valign=\"top\">";
@@ -150,7 +150,7 @@
/* Showing Net P/L : Expenses */
$nettotal = $net_expense_total;
- echo "<tr style=\"background-color:#F8F8F8;\">";
+ echo "<tr class=\"total-area\">";
echo "<td>";
echo "<table border=0 cellpadding=5 class=\"simple-table
profit-loss-total-table\" width=\"450\">";
echo "<tr valign=\"top\">";
diff --git a/system/application/views/report/trialbalance.php
b/system/application/views/report/trialbalance.php
index e028a09..540e9bf 100644
--- a/system/application/views/report/trialbalance.php
+++ b/system/application/views/report/trialbalance.php
@@ -13,7 +13,7 @@
echo "<tr class=\"tr-" . $odd_even . "\">";
echo "<td>";
- echo anchor('report/ledgerst/' . $ledger_id, $ledger_name,
array('title' => $ledger_name . ' Ledger Statement', 'style'
=> 'color:#000000'));
+ echo anchor('report/ledgerst/' . $ledger_id, $ledger_name,
array('title' => $ledger_name . ' Ledger Statement', 'class'
=> 'anchor-link-a'));
echo "</td>";
echo "<td>";
diff --git a/system/application/views/setting/cf.php
b/system/application/views/setting/cf.php
index 03b1c53..c04cd91 100644
--- a/system/application/views/setting/cf.php
+++ b/system/application/views/setting/cf.php
@@ -32,7 +32,7 @@
echo "</p>";
echo "<p>";
- echo form_fieldset('Database Settings', array('class' =>
"fieldset-auto-width", 'style' => "width:500px;"));
+ echo form_fieldset('Database Settings', array('class' =>
"fieldset-auto-width"));
echo "<p>";
echo form_checkbox('create_database', 1, $create_database) . " Create
database if it does not exists";
diff --git a/system/application/views/sidebar/tag.php
b/system/application/views/sidebar/tag.php
index 027af49..4ee56cf 100644
--- a/system/application/views/sidebar/tag.php
+++ b/system/application/views/sidebar/tag.php
@@ -1,5 +1,5 @@
<?php
-echo "<div class=\"tag-title\">Tags<span
style=\"float:right;\">" . anchor("tag", "Edit") .
"</span></div>";
+echo "<div class=\"tag-title\">Tags<span
class=\"tag-edit\">" . anchor("tag", "Edit") .
"</span></div>";
echo "<div class=\"tag-content\">";
$tags = $this->Tag_model->get_all_tags($allow_none = FALSE);
echo "<ul id=\"tag-list\">";
@@ -12,7 +12,7 @@ echo "<div class=\"tag-title\">Tags<span
style=\"float:right;\">" . anchor("tag"
}
} else {
echo "<li>No tags defined</li>";
- echo "<li>" . anchor("tag/add", "Add one",
array('title' => 'Add tag', 'class' => 'blue-link'))
. "</li>";
+ echo "<li>" . anchor("tag/add", "Add one",
array('title' => 'Add tag', 'class' =>
'anchor-link-a')) . "</li>";
}
echo "</ul>";
echo "</div>";
diff --git a/system/application/views/template.php
b/system/application/views/template.php
index 7e04a4c..526b70a 100644
--- a/system/application/views/template.php
+++ b/system/application/views/template.php
@@ -55,10 +55,10 @@ $(document).ready(function() {
<div id="container">
<div id="header">
<div id="logo">
- Webzash <span
style="font-size:18px;color:#00000;">(beta)</span>
+ Webzash <span id="beta-area">(beta)</span>
</div>
<div id="admin">
- <?php echo anchor('admin', 'Administer', array('title'
=> "Administer", 'style' => 'color:#000000;
text-decoration:none')); ?>
+ <?php echo anchor('admin', 'Administer', array('title'
=> "Administer", 'class' => 'anchor-link-b')); ?>
</div>
<div id="info">
<?php
diff --git a/system/application/views/welcome_message.php
b/system/application/views/welcome_message.php
index b84efd1..4e92f7c 100644
--- a/system/application/views/welcome_message.php
+++ b/system/application/views/welcome_message.php
@@ -2,7 +2,7 @@
#income-expense-graph-header {
width: 200px;
text-align: center;
- padding-bottom:10px;
+ padding-bottom:30px;
}
#income-expense-graph-data {
width: 200px;
@@ -12,7 +12,7 @@
#asset-liability-graph-header {
width: 200px;
text-align: center;
- padding-bottom:10px;
+ padding-bottom:30px;
}
#asset-liability-graph-data {
width: 200px;
@@ -84,8 +84,16 @@ jQuery(document).ready(function () {
<div id="dashboard-welcome-back" class="dashboard-item">
<div class="dashboard-title">Account Summary</div>
<div class="dashboard-content">
- <div>Welcome back, <strong><?php echo
$this->config->item('account_name');?> !</strong></div>
- <div id="dashboard-draft">You have <?php echo
anchor("voucher/show/draft", $draft_count . " draft",
array('class' => 'black-link')); ?> voucher(s)</div>
+ <table class="dashboard-summary-table">
+ <tbody>
+ <tr>
+ <td><div>Welcome back, <strong><?php echo
$this->config->item('account_name');?>
!</strong></div></td>
+ </tr>
+ <tr>
+ <td><div id="dashboard-draft">You have <?php echo
anchor("voucher/show/draft", $draft_count . " draft",
array('class' => 'anchor-link-a')); ?>
voucher(s)</div></td>
+ </tr>
+ </tbody>
+ </table>
</div>
</div>
<div class="clear"></div>
@@ -142,7 +150,7 @@ jQuery(document).ready(function () {
<?php if ($show_income_expense) { ?>
<td width="300">
<div id="income-expense" class="graph">
- <div id="income-expense-graph-header"><h4>Incomes Vs
Expenses</h4></div>
+ <div id="income-expense-graph-header"><strong>Incomes Vs
Expenses</strong></div>
<div id="income-expense-graph-data"></div>
</div>
</td>
@@ -150,7 +158,7 @@ jQuery(document).ready(function () {
<?php if ($show_asset_liability) { ?>
<td width="300">
<div id="asset-liability" class="graph">
- <div id="asset-liability-graph-header"><h4>Assets Vs
Liabilities</h4></div>
+ <div id="asset-liability-graph-header"><strong>Assets Vs
Liabilities</strong></div>
<div id="asset-liability-graph-data""></div>
</div>
</td>
@@ -183,7 +191,7 @@ jQuery(document).ready(function () {
{
echo "<div class=\"dashboard-log-footer\">";
echo "<span>";
- echo anchor("", "more...", array('class' =>
'blue-link no-underline'));
+ echo anchor("", "more...", array('class' =>
'anchor-link-a no-underline'));
echo "</span>";
}
?>
commit 24b6da2cd529cec19b6fa39e0231613692c293bd
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Mon Dec 13 15:24:31 2010 +0530
Cleaned up CSS Font sizes
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/admin-style.css
b/system/application/assets/css/admin-style.css
index 44d5e45..2761156 100644
--- a/system/application/assets/css/admin-style.css
+++ b/system/application/assets/css/admin-style.css
@@ -24,14 +24,14 @@ body {
#header #logo {
padding:35px 0 0 18px;
- font-size:400%;
+ font-size:40px;
float:left;
width:70%;
}
#header #admin {
color:#000000;
- font-size:120%;
+ font-size:15px;
display:block;
position:absolute;
background:none repeat scroll 0 0 #E5F1F4;
@@ -54,18 +54,18 @@ body {
}
#content #main #main-title {
- font-size:150%;
+ font-size:19px;
padding:10px 0 10px 0;
}
#content #main #main-content {
padding:10px 0 10px 0;
- font-size:120%;
+ font-size:14px;
}
#footer {
color:#555555;
- font-size:100%;
+ font-size:13px;
margin:9px 20px 18px 20px;
text-align:center;
}
@@ -73,7 +73,7 @@ body {
#footer a {
color:#555555;
- font-size:100%;
+ font-size:13px;
text-align:center;
}
diff --git a/system/application/assets/css/custom.css
b/system/application/assets/css/custom.css
index 0cc3e8f..17211f1 100644
--- a/system/application/assets/css/custom.css
+++ b/system/application/assets/css/custom.css
@@ -15,7 +15,7 @@
}
.settings-title a {
- font-size: 110%;
+ font-size:16px;
text-decoration:underline;
color:#000000;
}
diff --git a/system/application/assets/css/style.css
b/system/application/assets/css/style.css
index 9a7fecb..da89225 100644
--- a/system/application/assets/css/style.css
+++ b/system/application/assets/css/style.css
@@ -1,7 +1,7 @@
body {
background:none repeat scroll 0 0 #DDDDDD;
color:#333333;
- font:12px/1.5em "Helvetica Neue","Lucida Grande","Helvetica
Neue",Arial,sans-serif;
+ font:12px "Helvetica Neue","Lucida Grande","Helvetica
Neue",Arial,sans-serif;
margin:0;
min-width:950px;
padding:0;
@@ -24,14 +24,14 @@ body {
#header #logo {
padding:35px 0 0 18px;
- font-size:400%;
+ font-size:40px;
float:left;
width:70%;
}
#header #admin {
color:#000000;
- font-size:120%;
+ font-size:15px;
display:block;
position:absolute;
background:none repeat scroll 0 0 #E5F1F4;
@@ -48,7 +48,7 @@ body {
top:10px;
background:none repeat scroll 0 0 #EEEEEE;
padding:10px;
- font-size:120%;
+ font-size:15px;
-moz-border-radius: 10px;
border-radius: 1px;
}
@@ -67,18 +67,18 @@ body {
}
#content #main #main-title {
- font-size:150%;
+ font-size:19px;
padding:10px 0 10px 0;
}
#content #main #main-content {
padding:10px 0 10px 0;
- font-size:120%;
+ font-size:14px;
}
#footer {
color:#555555;
- font-size:100%;
+ font-size:13px;
margin:9px 20px 18px 20px;
text-align:center;
}
@@ -86,7 +86,7 @@ body {
#footer a {
color:#555555;
- font-size:100%;
+ font-size:13px;
text-align:center;
}
diff --git a/system/application/assets/css/tables.css
b/system/application/assets/css/tables.css
index 4e2251d..c0ba714 100644
--- a/system/application/assets/css/tables.css
+++ b/system/application/assets/css/tables.css
@@ -3,8 +3,7 @@
/******************************************************************************/
.simple-table {
- font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
- font-size:13px;
+ font-size:14px;
border-collapse:collapse;
text-align:left;
}
@@ -50,7 +49,7 @@
.voucher-table {
font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
- font-size:13px;
+ font-size:14px;
border-collapse:collapse;
text-align:left;
}
@@ -113,8 +112,7 @@
}
.balance-sheet-total-table {
- font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
- font-size:13px;
+ font-size:14px;
border-collapse:collapse;
text-align:left;
}
@@ -139,8 +137,7 @@
}
.profit-loss-total-table {
- font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
- font-size:13px;
+ font-size:14px;
border-collapse:collapse;
text-align:left;
}
@@ -191,8 +188,7 @@
}
.ledger-summary {
- font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
- font-size: 13px;
+ font-size:14px;
border-collapse: collapse;
text-align: left;
border: 1px solid #BBBBBB;
diff --git a/system/application/views/welcome_message.php
b/system/application/views/welcome_message.php
index 00932f0..b84efd1 100644
--- a/system/application/views/welcome_message.php
+++ b/system/application/views/welcome_message.php
@@ -80,8 +80,6 @@ jQuery(document).ready(function () {
});
});
</script>
-
-<h3><This is beta software not meant for production use
!></h3>
<div id="dashboard-summary">
<div id="dashboard-welcome-back" class="dashboard-item">
<div class="dashboard-title">Account Summary</div>
commit 849e292d81fafcb050453b2b5cea1f56d564076d
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Mon Dec 13 15:11:57 2010 +0530
Cleaned up CSS
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/assets/css/admin-style.css
b/system/application/assets/css/admin-style.css
index a17a5e6..44d5e45 100644
--- a/system/application/assets/css/admin-style.css
+++ b/system/application/assets/css/admin-style.css
@@ -70,12 +70,6 @@ body {
text-align:center;
}
-#footer {
- color:#555555;
- font-size:100%;
- text-align:center;
-}
-
#footer a {
color:#555555;
@@ -121,15 +115,7 @@ body {
color:#444444;
}
-/* COMMON */
-.clear {
- clear:both;
-}
-
-.bold {
- font-weight:bold;
-}
-
+/* MESSAGE BOX */
#message-box {
border:solid 1px #787878;
background:#F0F0F0;
@@ -157,22 +143,20 @@ body {
text-align:left;
}
-/* NOT SO COMMON */
-.voucher-add-links {
- margin:0 0 10px 0;
+/* COMMON */
+.clear {
+ clear:both;
}
-.voucher-add-links a {
- text-decoration:underline;
- color:#000000;
- font-size:90%;
+.bold {
+ font-weight:bold;
}
-.voucher-add-links a:hover
-{
- color:#AAAAAA;
+a.no-underline {
+ text-decoration:none;
}
+/* NOT SO COMMON */
#current-active-account {
border:solid 1px #787878;
background:#F0F0F0;
@@ -181,3 +165,4 @@ body {
margin:0 0 10px 0;
text-align:left;
}
+
diff --git a/system/application/assets/css/custom.css
b/system/application/assets/css/custom.css
index 7065075..0cc3e8f 100644
--- a/system/application/assets/css/custom.css
+++ b/system/application/assets/css/custom.css
@@ -28,17 +28,19 @@
color:#000000;
}
-/* Pagination */
+/******************************** PAGINATION **********************************/
#pagination-container {
margin-top:20px;
margin-bottom:50px;
}
+
ul#pagination-flickr {
border:0;
margin:0;
padding:0;
float:none;
}
+
#pagination-flickr li {
border:0;
margin:0;
@@ -46,10 +48,12 @@ ul#pagination-flickr {
font-size:11px;
list-style:none;
}
+
#pagination-flickr a {
border:solid 1px #DDDDDD;
margin-right:2px;
}
+
#pagination-flickr .previous-off,
#pagination-flickr .next-off {
color:#666666;
@@ -58,11 +62,13 @@ ul#pagination-flickr {
font-weight:bold;
padding:3px 4px;
}
+
#pagination-flickr .next a,
#pagination-flickr .previous a {
font-weight:bold;
border:solid 1px #FFFFFF;
}
+
#pagination-flickr .active{
color:#000000;
font-weight:bold;
@@ -70,6 +76,7 @@ ul#pagination-flickr {
float:left;
padding:4px 6px;
}
+
#pagination-flickr a:link,
#pagination-flickr a:visited {
color:#0063e3;
@@ -78,6 +85,7 @@ ul#pagination-flickr {
padding:3px 6px;
text-decoration:none;
}
+
#pagination-flickr a:hover{
border:solid 1px #666666;
}
diff --git a/system/application/assets/css/style.css
b/system/application/assets/css/style.css
index b3cb2ff..9a7fecb 100644
--- a/system/application/assets/css/style.css
+++ b/system/application/assets/css/style.css
@@ -83,12 +83,6 @@ body {
text-align:center;
}
-#footer {
- color:#555555;
- font-size:100%;
- text-align:center;
-}
-
#footer a {
color:#555555;
@@ -122,15 +116,7 @@ body {
text-decoration:none;
}
-/* COMMON */
-.clear {
- clear:both;
-}
-
-.bold {
- font-weight:bold;
-}
-
+/* MESSAGE BOX */
#message-box {
border:solid 1px #787878;
background:#F0F0F0;
@@ -158,22 +144,17 @@ body {
text-align:left;
}
-/* NOT SO COMMON */
-.voucher-add-links {
- margin:0 0 10px 0;
-}
-
-.voucher-add-links a {
- text-decoration:underline;
- color:#000000;
- font-size:90%;
+/* COMMON */
+.clear {
+ clear:both;
}
-.voucher-add-links a:hover
-{
- color:#AAAAAA;
+.bold {
+ font-weight:bold;
}
a.no-underline {
text-decoration:none;
}
+
+
diff --git a/system/application/assets/css/tables.css
b/system/application/assets/css/tables.css
index 4eebea6..4e2251d 100644
--- a/system/application/assets/css/tables.css
+++ b/system/application/assets/css/tables.css
@@ -1,50 +1,3 @@
-.generaltable th {
- background:none repeat scroll 0 0 #0099CC;
- color:#FFFFFF;
- font-weight:bold;
-}
-
-.generaltable tr:hover {
- background:none repeat scroll 0 0 #ECFBD4;
-}
-
-.generaltable .group-tr
-{
- background:none repeat scroll 0 0 #E5F1F4;
- padding:10px;
-}
-
-.generaltable .ledger-tr
-{
- background:none repeat scroll 0 0 #F8FBFC;
-}
-
-.generaltable tr.tr-odd {
- background:none repeat scroll 0 0 #E5F1F4;
-}
-
-.generaltable tr.tr-even {
- background:none repeat scroll 0 0 #F8FBFC;
-}
-
-.generaltable tr.tr-balance {
- background:none repeat scroll 0 0 #FFF8C6;
-}
-
-.generaltable tr.tr-draft {
- background:none repeat scroll 0 0 #DDDDDD;
-}
-
-.generaltable tr.new-row {
- background:none repeat scroll 0 0 #EEEEEE;
-}
-
-.vouchertable th {
- background:none repeat scroll 0 0 #0099CC;
- color:#FFFFFF;
- font-weight:bold;
-}
-
/******************************************************************************/
/******************************* SIMPLE TABLE *********************************/
/******************************************************************************/
commit 0940dc071ae723be4f6a418106efda3a4290b96a
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Mon Dec 13 10:32:37 2010 +0530
Added validation for voucher date within financial year
Voucher date cannot be more than end of current financial year
and cannot be less than start of current financial year
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 717eaed..2f5eea7 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -294,7 +294,7 @@ class Voucher extends Controller {
/* Form validations */
$this->form_validation->set_rules('voucher_number', 'Voucher
Number', 'trim|is_natural|uniquevoucherno[' . v_to_n($voucher_type) .
']');
- $this->form_validation->set_rules('voucher_date', 'Voucher Date',
'trim|required|is_date');
+ $this->form_validation->set_rules('voucher_date', 'Voucher Date',
'trim|required|is_date|is_date_within_range');
$this->form_validation->set_rules('voucher_narration', 'trim');
$this->form_validation->set_rules('voucher_tag', 'Tag',
'trim|is_natural');
@@ -566,7 +566,7 @@ class Voucher extends Controller {
/* Form validations */
$this->form_validation->set_rules('voucher_number', 'Voucher
Number', 'trim|is_natural|uniquevouchernowithid[' . v_to_n($voucher_type) .
'.' . $voucher_id . ']');
- $this->form_validation->set_rules('voucher_date', 'Voucher Date',
'trim|required|is_date');
+ $this->form_validation->set_rules('voucher_date', 'Voucher Date',
'trim|required|is_date|is_date_within_range');
$this->form_validation->set_rules('voucher_narration', 'trim');
$this->form_validation->set_rules('voucher_tag', 'Tag',
'trim|is_natural');
diff --git a/system/application/libraries/MY_Form_validation.php
b/system/application/libraries/MY_Form_validation.php
index b06eef2..74a7f17 100644
--- a/system/application/libraries/MY_Form_validation.php
+++ b/system/application/libraries/MY_Form_validation.php
@@ -112,7 +112,27 @@ class MY_Form_validation extends CI_Form_validation {
$CI->messages->add('Invalid date format. Please check your account
settings', 'error');
return "";
}
- return checkdate($m , $d, $y) ? TRUE : FALSE;
+ return checkdate($m, $d, $y) ? TRUE : FALSE;
+ }
+
+ function is_date_within_range($str)
+ {
+ $CI =& get_instance();
+ $cur_date = date_php_to_mysql($str);
+ $start_date = $CI->config->item('account_fy_start');
+ $end_date = $CI->config->item('account_fy_end');
+
+ if ($cur_date < $start_date)
+ {
+ $CI->form_validation->set_message('is_date_within_range', 'The %s is
less than start of current financial year');
+ return FALSE;
+ } else if ($cur_date > $end_date)
+ {
+ $CI->form_validation->set_message('is_date_within_range', 'The %s is
more than end of current financial year');
+ return FALSE;
+ } else {
+ return TRUE;
+ }
}
function is_hex($str)
commit ef7ecb8493e4a23985dbeb45d8262d336368a52d
Author: Prashant P Shah <pshah.mumbai(a)gmail.com>
Date: Sun Dec 12 22:19:57 2010 +0530
Added id to Logger messages
Signed-off-by: Prashant P Shah <pshah.mumbai(a)gmail.com>
diff --git a/system/application/controllers/tag.php
b/system/application/controllers/tag.php
index 8ed90c1..9358a0d 100644
--- a/system/application/controllers/tag.php
+++ b/system/application/controllers/tag.php
@@ -170,13 +170,13 @@ class Tag extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error updating ' . $data_tag_title . ' -
Tag', 'error');
- $this->logger->write_message("error", "Error updating tag named
" . $data_tag_title . " [" . $id . "]");
+ $this->logger->write_message("error", "Error updating tag named
" . $data_tag_title . " [id:" . $id . "]");
$this->template->load('template', 'tag/edit', $data);
return;
} else {
$this->db->trans_complete();
$this->messages->add("Updated " . $data_tag_title . ' - Tag
successfully', 'success');
- $this->logger->write_message("success", "Updated tag named
" . $data_tag_title . " [" . $id . "]");
+ $this->logger->write_message("success", "Updated tag named
" . $data_tag_title . " [id:" . $id . "]");
redirect('tag');
return;
}
@@ -210,7 +210,7 @@ class Tag extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error removing Tags', 'error');
- $this->logger->write_message("error", "Error removing tag named
" . $data_tag->title . " [" . $id . "] from vouchers");
+ $this->logger->write_message("error", "Error removing tag named
" . $data_tag->title . " [id:" . $id . "] from vouchers");
redirect('tag');
return;
} else {
@@ -218,13 +218,13 @@ class Tag extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error deleting Tag', 'error');
- $this->logger->write_message("error", "Error deleting tag named
" . $data_tag->title . " [" . $id . "]");
+ $this->logger->write_message("error", "Error deleting tag named
" . $data_tag->title . " [id:" . $id . "]");
redirect('tag');
return;
} else {
$this->db->trans_complete();
$this->messages->add('Tag deleted successfully', 'success');
- $this->logger->write_message("success", "Deleted tag named
" . $data_tag->title . " [" . $id . "]");
+ $this->logger->write_message("success", "Deleted tag named
" . $data_tag->title . " [id:" . $id . "]");
redirect('tag');
return;
}
diff --git a/system/application/controllers/voucher.php
b/system/application/controllers/voucher.php
index 5d187aa..717eaed 100644
--- a/system/application/controllers/voucher.php
+++ b/system/application/controllers/voucher.php
@@ -439,7 +439,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error addding Ledger A/C ' . $data_ledger_id,
'error');
- $this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " . $data_number . " since failed
inserting voucher ledger items " . "[" . $data_ledger_id . "]");
+ $this->logger->write_message("error", "Error adding " .
ucfirst($voucher_type) . " Voucher number " . $data_number . " since failed
inserting voucher ledger items " . "[id:" . $data_ledger_id .
"]");
$this->template->load('template', 'voucher/add', $data);
return;
}
@@ -659,7 +659,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error updating Voucher A/C', 'error');
- $this->logger->write_message("error", "Error updating voucher
details for " . ucfirst($voucher_type) . " Voucher number " . $data_number
. " [" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error updating voucher
details for " . ucfirst($voucher_type) . " Voucher number " . $data_number
. " [id:" . $voucher_id . "]");
$this->template->load('template', 'voucher/edit', $data);
return;
}
@@ -669,7 +669,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error deleting old Ledger A/C\'s',
'error');
- $this->logger->write_message("error", "Error updating old
voucher items for " . ucfirst($voucher_type) . " Voucher number " .
$data_number . " [" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error updating old
voucher items for " . ucfirst($voucher_type) . " Voucher number " .
$data_number . " [id:" . $voucher_id . "]");
$this->template->load('template', 'voucher/edit', $data);
return;
}
@@ -702,7 +702,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error updating Ledger A/C ' . $data_ledger_id,
'error');
- $this->logger->write_message("error", "Error updating new
voucher item [" . $data_ledger_id . "] for " . ucfirst($voucher_type) .
" Voucher number " . $data_number . " [" . $voucher_id .
"]");
+ $this->logger->write_message("error", "Error updating new
voucher item [id:" . $data_ledger_id . "] for " . ucfirst($voucher_type) .
" Voucher number " . $data_number . " [id:" . $voucher_id .
"]");
$this->template->load('template', 'voucher/edit', $data);
return;
}
@@ -713,7 +713,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error updating voucher total', 'error');
- $this->logger->write_message("error", "Error updating voucher
total for " . ucfirst($voucher_type) . " Voucher number " . $data_number .
" [" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error updating voucher
total for " . ucfirst($voucher_type) . " Voucher number " . $data_number .
" [id:" . $voucher_id . "]");
$this->template->load('template', 'voucher/edit', $data);
return;
}
@@ -721,7 +721,7 @@ class Voucher extends Controller {
/* Success */
$this->db->trans_complete();
$this->messages->add(ucfirst($voucher_type) . ' Voucher number ' .
$data_number . ' updated successfully', 'success');
- $this->logger->write_message("success", "Updated " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[" . $voucher_id . "]");
+ $this->logger->write_message("success", "Updated " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[id:" . $voucher_id . "]");
redirect('voucher/show/' . $voucher_type);
return;
}
@@ -743,7 +743,7 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error deleting Voucher - Ledgers entry',
'error');
- $this->logger->write_message("error", "Error deleting ledger
entries for " . ucfirst($voucher_type) . " Voucher number " .
$cur_voucher->number . " [" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error deleting ledger
entries for " . ucfirst($voucher_type) . " Voucher number " .
$cur_voucher->number . " [id:" . $voucher_id . "]");
redirect('voucher/' . $voucher_type . '/' . $voucher_id);
return;
}
@@ -751,13 +751,13 @@ class Voucher extends Controller {
{
$this->db->trans_rollback();
$this->messages->add('Error deleting Voucher entry', 'error');
- $this->logger->write_message("error", "Error deleting voucher
entry for " . ucfirst($voucher_type) . " Voucher number " .
$cur_voucher->number . " [" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error deleting voucher
entry for " . ucfirst($voucher_type) . " Voucher number " .
$cur_voucher->number . " [id:" . $voucher_id . "]");
redirect('voucher/' . $voucher_type . '/' . $voucher_id);
return;
}
$this->db->trans_complete();
$this->messages->add('Voucher deleted successfully', 'success');
- $this->logger->write_message("success", "Deleted " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[" . $voucher_id . "]");
+ $this->logger->write_message("success", "Deleted " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[id:" . $voucher_id . "]");
redirect('voucher/show/' . $voucher_type);
return;
}
@@ -907,10 +907,10 @@ class Voucher extends Controller {
if ($this->email->send())
{
$data['message'] = "Successfully sent email !";
- $this->logger->write_message("success", "Emailed " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[" . $voucher_id . "]");
+ $this->logger->write_message("success", "Emailed " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[id:" . $voucher_id . "]");
} else {
$data['error'] = "Error sending email. Please check you email
settings";
- $this->logger->write_message("error", "Error emailing " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[" . $voucher_id . "]");
+ $this->logger->write_message("error", "Error emailing " .
ucfirst($voucher_type) . " Voucher number " . $cur_voucher->number . "
[id:" . $voucher_id . "]");
}
$this->load->view('voucher/email', $data);
return;