diff --git a/account/application/helpers/accounts_helper.php b/account/application/helpers/accounts_helper.php index 88f586d..2cf9a3d 100644 --- a/account/application/helpers/accounts_helper.php +++ b/account/application/helpers/accounts_helper.php @@ -5,7 +5,6 @@ function generateACCategoryCode($group_id) $acgroup_code = $ci->db->where("acgroup_id=$group_id")->get("tbl_acgroups")->row()->acgroup_code; $lastACCategoryCode = $ci->db->select_max("accategory_code")->where("acgroup_id=$group_id")->get("tbl_accategories")->row()->accategory_code; $category_part = substr($lastACCategoryCode, 1); - $category_part = (float)$category_part + 1; //if($category_part<10)$category_part="00".$category_part; if ($category_part < 10) $category_part = "00" . $category_part; @@ -18,7 +17,6 @@ function generateAccountCode($category_id) $accategory_code = $ci->db->where("accategory_id=$category_id")->get("tbl_accategories")->row()->accategory_code; $lastAccountCode = $ci->db->select_max("account_code")->where("accategory_id=$category_id")->get("tbl_accounts")->row()->account_code; $account_part = substr($lastAccountCode, 4); - $account_part = (float)$account_part + 1; //if($category_part<10)$category_part="00".$category_part; if ($account_part < 10) $account_part = "00" . $account_part; @@ -54,13 +52,10 @@ function showAccountCategoriesSelector($fieldName, $fieldID, $condition = "1=1", $html .= " required"; } $html .= ">"; - $html .= ""; - foreach ($AccountCategories as $AccountCategory) { $html .= ""; } - $html .= ""; echo $html; } @@ -68,7 +63,6 @@ function showAccountCategoriesByIds($AccountCategories = array()) { // pre($AccountCategories); //die; $ci = &get_instance(); - if ($AccountCategories) { $AccountCategories_a = $ci->db->where("status", 1); $AccountCategories_a = $AccountCategories_a->where_in("accategory_id", $AccountCategories); @@ -80,22 +74,19 @@ function showAccountCategoriesByIds($AccountCategories = array()) echo implode(", ", $html); } } - - function linkVoucher($voucher_id) { - if($voucher_id!=0) { - $ci = &get_instance(); - $Voucher = $ci->db->where("voucher_id", $voucher_id)->get("tbl_vouchers")->row(); - $Name = $ci->db->where("vouchertype_id", $Voucher->voucher_type)->get("tbl_vouchertypes")->row()->voucher_type . " Voucher # " . $Voucher->voucher_no; - echo "$Name"; + if ($voucher_id != 0) { + $ci = &get_instance(); + $Voucher = $ci->db->where("voucher_id", $voucher_id)->get("tbl_vouchers")->row(); + $Name = $ci->db->where("vouchertype_id", $Voucher->voucher_type)->get("tbl_vouchertypes")->row()->voucher_type . " Voucher # " . $Voucher->voucher_no; + echo "$Name"; } else { echo ""; } } function linkLedger($Account) { - $ci = &get_instance(); echo "$Account->account_name"; } @@ -143,15 +134,11 @@ function generateVoucherNo($vouchertype_id = "") { $ci = &get_instance(); $voucherTypeCondition = ($vouchertype_id != "") ? " WHERE voucher_type = '$vouchertype_id'" : ""; - $query = $ci->db->query("SELECT MAX(voucher_no) AS voucher_no FROM tbl_vouchers" . $voucherTypeCondition); $row = $query->row(); - $newVoucherNo = ($row->voucher_no !== null) ? $row->voucher_no + 1 : 1; - return $newVoucherNo; } - function countChildCategories($acgroup_id) { $ci = &get_instance(); diff --git a/account/application/views/accounts/accategories/list-parents-only.php b/account/application/views/accounts/accategories/list-parents-only.php index 7314b4a..6f6a7c5 100644 --- a/account/application/views/accounts/accategories/list-parents-only.php +++ b/account/application/views/accounts/accategories/list-parents-only.php @@ -14,9 +14,9 @@ - + - @@ -26,7 +26,7 @@ break; endforeach; ?> parent_category_id == 0) : ?> - + '; echo ''; - echo ''; echo ''; @@ -55,7 +55,6 @@ function displayCategoryTree($tree) .expandable { text-decoration: underline; } -
diff --git a/account/application/views/accounts/balancesheet.php b/account/application/views/accounts/balancesheet.php index 53373bb..ce34123 100644 --- a/account/application/views/accounts/balancesheet.php +++ b/account/application/views/accounts/balancesheet.php @@ -1,5 +1,5 @@ acc->getAccountsByGroup(1); $LiabilitiesTotal = $this->acc->getAccountBalanceByGroup(2); $EquityTotal = $this->acc->getAccountBalanceByGroup(5); $AssetsTotal = $this->acc->getAccountBalanceByGroup(1, false); - $IncomeAccounts = $this->acc->getAccountsByGroup(3); $ExpenseAccounts = $this->acc->getAccountsByGroup(4); $IncomesTotal = $this->acc->getAccountBalanceByGroup(3); $ExpensesTotal = $this->acc->getAccountBalanceByGroup(4); $PL = $IncomesTotal - $ExpensesTotal; -$LiabilitiesTotal=$LiabilitiesTotal+$EquityTotal+$PL; +$LiabilitiesTotal = $LiabilitiesTotal + $EquityTotal + $PL; ?>
-
@@ -39,13 +37,11 @@ $LiabilitiesTotal=$LiabilitiesTotal+$EquityTotal+$PL;
- - - - - - - - - - - - -
TypeType Category NameAction + Action
AccountGroup->acgroup_name; ?> accategory_name; ?> " class="btn btn-info btn-xs"> diff --git a/account/application/views/accounts/balances/bycategory.php b/account/application/views/accounts/balances/bycategory.php index d72619f..7889fb7 100644 --- a/account/application/views/accounts/balances/bycategory.php +++ b/account/application/views/accounts/balances/bycategory.php @@ -29,12 +29,12 @@ function displayCategoryTree($tree) // print_r($category);die; echo '
' . $category['accategory_id'] . '' - . ($category['parent_category_id'] == 0 - ? "" + echo '' + . ($category['parent_category_id'] == 0 + ? "" : "") - . $category['accategory_name'] - . "" + . $category['accategory_name'] + . "" . ($category['parent_category_id'] == 0 ? "" : "") . '' . myCurrency($category['dr']) . '
Liabilities Amount Assets Amount
acc->showTable($LiabilitiesAccounts); ?> @@ -54,33 +50,22 @@ $LiabilitiesTotal=$LiabilitiesTotal+$EquityTotal+$PL; acc->showTable($AssetsAccounts, false); ?>
Net Profit:
Total Liabilities: Total Assets:
diff --git a/account/application/views/accounts/balancesheet_new.php b/account/application/views/accounts/balancesheet_new.php index f3005c4..893727b 100644 --- a/account/application/views/accounts/balancesheet_new.php +++ b/account/application/views/accounts/balancesheet_new.php @@ -3,87 +3,13 @@ $this->load->library("BIBAccounts"); $BIBAccounts = new BIBAccounts(); ?>
@@ -243,9 +169,9 @@ $BIBAccounts = new BIBAccounts(); - + - + @@ -283,6 +209,9 @@ $BIBAccounts = new BIBAccounts(); ?>
ParticularsLiabilities AmountParticularsAssets Amount
+ + + getAccountGroupsWithBalances(5); ?> --> - @@ -241,10 +240,10 @@ $PL = $IncomesTotal - $ExpensesTotal; - + - + @@ -263,20 +262,19 @@ $PL = $IncomesTotal - $ExpensesTotal; --> - - - + + + - - - + + + -
          
@@ -292,17 +290,16 @@ $PL = $IncomesTotal - $ExpensesTotal; --> - - - - + + + -       - - +       + + diff --git a/account/application/views/accounts/ledger/partywise.php b/account/application/views/accounts/ledger/partywise.php index 671fb55..7af939e 100644 --- a/account/application/views/accounts/ledger/partywise.php +++ b/account/application/views/accounts/ledger/partywise.php @@ -1,70 +1,58 @@
- -
-
-

-
-
myaccounts->showAccountsCombo("account_id", "", "account_id", "status=1", isset($_GET['account_id']) ? $_GET['account_id'] : 1, $CSSclass = ""); ?>
-
+
- - -
-
- -
- - - myaccounts->showLedger($account_id, $fromDate, $toDate, $fiscalStart, $fiscalEnd); - } ?> -
-
- +
\ No newline at end of file diff --git a/account/application/views/accounts/receipt_and_payment.php b/account/application/views/accounts/receipt_and_payment.php index bdaefd9..e06dc9f 100644 --- a/account/application/views/accounts/receipt_and_payment.php +++ b/account/application/views/accounts/receipt_and_payment.php @@ -8,7 +8,6 @@ $ExpenseAccounts = $this->acc->getAccountsByGroup(4); $IncomesTotal = $this->acc->getAccountBalanceByGroup(3); $ExpensesTotal = $this->acc->getAccountBalanceByGroup(4); $PL = $IncomesTotal - $ExpensesTotal; - ?> - - - - -
-
-

Receipts And Payments

-
-
- -
- -