From bb11ca28cfcaf2b30b29f78a5a4b0e382ded244f Mon Sep 17 00:00:00 2001 From: Sampanna Rimal Date: Thu, 8 Aug 2024 17:35:09 +0545 Subject: [PATCH 1/2] data limits in final accounts + final books account clickable --- .../controllers/accounts/Reports.php | 10 +++++++ account/application/libraries/Myaccounts.php | 2 +- .../views/accounts/balancesheet_new.php | 20 ++++++++++++-- .../application/views/accounts/cash_flow.php | 26 ++++++++++++++++-- .../views/accounts/ledger_bankbook.php | 2 +- .../views/accounts/ledger_cashbook.php | 2 +- account/application/views/accounts/pl_new.php | 21 ++++++++++++-- .../views/accounts/receipt_and_payment.php | 26 ++++++++++++++++-- .../views/accounts/trialbalance_new.php | 23 ++++++++++++++-- .../inventory/reports/purchase_vs_sales.php | 15 ++++++++-- account/pdf/ledgers/ledger_1.wpdf | Bin 17710 -> 17710 bytes 11 files changed, 128 insertions(+), 19 deletions(-) diff --git a/account/application/controllers/accounts/Reports.php b/account/application/controllers/accounts/Reports.php index 2011cb4..f6003ca 100644 --- a/account/application/controllers/accounts/Reports.php +++ b/account/application/controllers/accounts/Reports.php @@ -65,6 +65,8 @@ class Reports extends CI_Controller loadView("accounts/trialbalance", $data); break; case 'trialbalance': + $data['fiscalStart'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_from); + $data['fiscalEnd'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_to); $data['pageTitle'] = "Trial Balance"; loadView("accounts/trialbalance_new", $data); break; @@ -130,6 +132,8 @@ class Reports extends CI_Controller loadView("accounts/pl", $data); break; case 'pl': + $data['fiscalStart'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_from); + $data['fiscalEnd'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_to); $data['pageTitle'] = "Profit & Loss Statement"; loadView("accounts/pl_new", $data); break; @@ -143,6 +147,8 @@ class Reports extends CI_Controller loadView("accounts/balancesheet", $data); break; case 'balance_sheet': + $data['fiscalStart'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_from); + $data['fiscalEnd'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_to); $data['pageTitle'] = "Balance Sheet"; loadView("accounts/balancesheet_new", $data); break; @@ -151,6 +157,8 @@ class Reports extends CI_Controller loadView("accounts/balance_sheet_vertical", $data); break; case 'cash_flow': + $data['fiscalStart'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_from); + $data['fiscalEnd'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_to); $data['pageTitle'] = "Cash Flow"; loadView("accounts/cash_flow", $data); break; @@ -163,6 +171,8 @@ class Reports extends CI_Controller loadView("accounts/incomes_expenses", $data); break; case 'receipt_and_payment': + $data['fiscalStart'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_from); + $data['fiscalEnd'] = NepaliDate($this->session->userdata['FiscalYear']->fiscalyear_to); $data['pageTitle'] = "Cash Flow"; loadView("accounts/receipt_and_payment", $data); break; diff --git a/account/application/libraries/Myaccounts.php b/account/application/libraries/Myaccounts.php index ee725fb..a72f92f 100644 --- a/account/application/libraries/Myaccounts.php +++ b/account/application/libraries/Myaccounts.php @@ -205,7 +205,7 @@ class myaccounts $balance = getBalance($Account->account_id); $BalanceTotal += $balance; // pre($Account); - $html .= "" . $Account->account_name . "" . $Account->Category->accategory_name . "" . (($balance >= 0) ? myCurrency($balance) : "") . "" . (($balance < 0) ? myCurrency(abs($balance)) : "") . ""; + $html .= "" . $Account->account_name . "" . $Account->Category->accategory_name . "" . (($balance >= 0) ? myCurrency($balance) : "") . "" . (($balance < 0) ? myCurrency(abs($balance)) : "") . ""; endforeach; $html .= ""; if ($full==""){ diff --git a/account/application/views/accounts/balancesheet_new.php b/account/application/views/accounts/balancesheet_new.php index a96f5c1..b0ef6c2 100644 --- a/account/application/views/accounts/balancesheet_new.php +++ b/account/application/views/accounts/balancesheet_new.php @@ -110,13 +110,13 @@ $BIBAccounts = new BIBAccounts();
- +
- +
@@ -521,6 +521,22 @@ function footerfunctions() link.click(); } + +
- +
- +
@@ -396,4 +396,24 @@ $PL = $IncomesTotal - $ExpensesTotal; - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/account/application/views/accounts/ledger_bankbook.php b/account/application/views/accounts/ledger_bankbook.php index 2e653dd..6a6903d 100644 --- a/account/application/views/accounts/ledger_bankbook.php +++ b/account/application/views/accounts/ledger_bankbook.php @@ -43,7 +43,7 @@ $balance = getBalance($Account->account_id); $BalanceTotal += $balance; // pre($Account); - $html .= "" . $sn . "" . $Account->account_name . "" . $Account->Category->accategory_name . "" . (($balance >= 0) ? myCurrency($balance) : "") . "" . (($balance < 0) ? myCurrency(abs($balance)) : "") . ""; + $html .= "" . $sn . "" . $Account->account_name . "" . $Account->Category->accategory_name . "" . (($balance >= 0) ? myCurrency($balance) : "") . "" . (($balance < 0) ? myCurrency(abs($balance)) : "") . ""; endforeach; $html .= ""; $html .= "Total" . myCurrency($BalanceTotal) . ""; diff --git a/account/application/views/accounts/ledger_cashbook.php b/account/application/views/accounts/ledger_cashbook.php index 9941cce..36e581f 100644 --- a/account/application/views/accounts/ledger_cashbook.php +++ b/account/application/views/accounts/ledger_cashbook.php @@ -44,7 +44,7 @@ $balance = getBalance($Account->account_id); $BalanceTotal += $balance; // pre($Account); - $html .= "" . $sn . "" . $Account->account_name . "" . $Account->Category->accategory_name . "" . (($balance >= 0) ? myCurrency($balance) : "") . "" . (($balance < 0) ? myCurrency(abs($balance)) : "") . ""; + $html .= "" . $sn . "" . $Account->account_name . "" . $Account->Category->accategory_name . "" . (($balance >= 0) ? myCurrency($balance) : "") . "" . (($balance < 0) ? myCurrency(abs($balance)) : "") . ""; endforeach; $html .= ""; $html .= "Total" . myCurrency($BalanceTotal) . ""; diff --git a/account/application/views/accounts/pl_new.php b/account/application/views/accounts/pl_new.php index 426d1fd..8fff70d 100644 --- a/account/application/views/accounts/pl_new.php +++ b/account/application/views/accounts/pl_new.php @@ -116,13 +116,13 @@ $BIBAccounts = new BIBAccounts();
- +
- +
@@ -449,6 +449,23 @@ function footerfunctions() link.click(); } + + \ 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 4f1a00e..19e758e 100644 --- a/account/application/views/accounts/receipt_and_payment.php +++ b/account/application/views/accounts/receipt_and_payment.php @@ -122,13 +122,13 @@ $PL = $IncomesTotal - $ExpensesTotal;
- +
- +
@@ -379,4 +379,24 @@ $PL = $IncomesTotal - $ExpensesTotal; - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/account/application/views/accounts/trialbalance_new.php b/account/application/views/accounts/trialbalance_new.php index 38ac939..17cc5d9 100644 --- a/account/application/views/accounts/trialbalance_new.php +++ b/account/application/views/accounts/trialbalance_new.php @@ -111,13 +111,13 @@ $BIBAccounts = new BIBAccounts();
- +
- +
@@ -357,6 +357,23 @@ function footerfunctions() document.body.appendChild(link); link.click(); } - + + + \ No newline at end of file diff --git a/account/application/views/inventory/reports/purchase_vs_sales.php b/account/application/views/inventory/reports/purchase_vs_sales.php index 53b129a..cd51d07 100644 --- a/account/application/views/inventory/reports/purchase_vs_sales.php +++ b/account/application/views/inventory/reports/purchase_vs_sales.php @@ -126,17 +126,19 @@ - + + + @@ -177,6 +179,7 @@ $sumoamount = 0; $sumclamount = 0; $sumcogs = 0; + $sumgp = 0; ?> @@ -185,6 +188,7 @@ Item->title; ?> Summary->Unit->title; ?> Summary->Opening->qty; ?> + Summary->Opening->rate); ?> Summary->Opening->amount); ?> Summary->Purchase->qty; ?> Summary->Purchase->rate); ?> @@ -200,8 +204,10 @@ Summary->Closing->amount); ?> Summary->Sales->qty) * ($Stock->Summary->Purchase->rate); ?> - Summary->Sales->qty) - $cogs; ?> - Summary->Sales->amount > 0) ? (($Stock->Summary->Sales->amount - $cogs) / $Stock->Summary->Sales->amount) * 100 : 0; ?> + Summary->Sales->amount) - $cogs; ?> + + + Summary->Sales->amount > 0) ? ($gp/ $Stock->Summary->Sales->amount) * 100 : 0; ?> @@ -223,6 +230,7 @@ Grand Total + @@ -235,6 +243,7 @@ + diff --git a/account/pdf/ledgers/ledger_1.wpdf b/account/pdf/ledgers/ledger_1.wpdf index eeabd0cd07128448e8d50b099d96d3c0a2d4f2b7..12f26a6f8ec6c687cf32d7a79a34333d620cf572 100644 GIT binary patch delta 465 zcmV;?0WSWoiUF>Q0g$SHUNQO2w8bi-)8L~;@1b77r*gS$ zf9>{g->f!G2kW+j(cS9xMw|oHr=*eLA#bXtP14| z^005yiu#p3BQk_DpwUu=18)@aA-TtHyW2M_c-VbO5L2ii4-91ys4xYaBT!)^aV2|q zn`?Pw`1A(-%9IQ&gvA+D#8ztX{Xf zZ2DMcH;BMtpkDC(^2)`|VdPuY#z(Ytv)ZP59aCy>KJ(Q!-#mk$Q*Sfb=($Q0g$SH*boxMP8`~*|Gv8h#2QfvTk>kx?>;m0&MWZ*eO+zq4mNEElhx<*xL7r>U!iY7XaU-w@sJ(Px*7`j2*z$9+>;dDwL~aopUN~ZXUAZ{U8hl~6XtOLD#lrK zF2y`8&X8j>PZTzPu_sqCL;AHTP%n4@&y8qCmlF^W~xLGkT&m=Wjtdg;u7hBEQcUlf?9(ygoSNJ9%-UIYu=yOuOn~tLkmn zB-6)Xc3lt{bkqxeUOuVV81#IrT3L^pZdU79uVIP}PG`P0_?u?nWbADsn>^R+*Grl5 z3Kgfa{QbRae-CuQ^3V%D*v`RrZ$NvFo$2GRwl&b%^?&^Y35T;?0!u*$HZe9dIW;!3 HuS0(UK?>e~ From 6b49232b773ab48266629d019c6cca3bdf12c398 Mon Sep 17 00:00:00 2001 From: Sampanna Rimal Date: Thu, 8 Aug 2024 18:15:16 +0545 Subject: [PATCH 2/2] changes --- account/application/libraries/Myaccounts.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/account/application/libraries/Myaccounts.php b/account/application/libraries/Myaccounts.php index a72f92f..ad78319 100644 --- a/account/application/libraries/Myaccounts.php +++ b/account/application/libraries/Myaccounts.php @@ -982,7 +982,9 @@ class myaccounts Transactions as $Transaction) : ?>
cr) ? "      " : "") . $this->getAccountDetails($Transaction->account_id)->account_name; ?>
+ narration): ?> (narration; ?>) +