correction of error for purchase and sales
This commit is contained in:
parent
ec6bfaf7ff
commit
e3c8a3b5fe
@ -12,14 +12,17 @@ class Reports extends CI_Controller
|
|||||||
}
|
}
|
||||||
public function _remap($alias = "", $params = array())
|
public function _remap($alias = "", $params = array())
|
||||||
{
|
{
|
||||||
|
// dd($this->session);
|
||||||
$data['dataValue'] = $this->session;
|
$data['dataValue'] = $this->session;
|
||||||
$data['pageTitle'] = "Sales";
|
$data['pageTitle'] = "Sales";
|
||||||
|
$datas['fiscalStart'] =NepaliDate($this->session->FiscalYear->fiscalyear_from);
|
||||||
|
$datas['fiscalEnd'] =NepaliDate($this->session->FiscalYear->fiscalyear_to);
|
||||||
switch ($alias) {
|
switch ($alias) {
|
||||||
case 'purchase_vs_sales':
|
case 'purchase_vs_sales':
|
||||||
$data['StockRecords']=$this->MStocks->getStockRecords();
|
$data['StockRecords']=$this->MStocks->getStockRecords();
|
||||||
$data['PurchaseDetails'] = $this->MPurchases->getItemPurchases();
|
$data['PurchaseDetails'] = $this->MPurchases->getItemPurchases();
|
||||||
$data['SalesDetails'] = $this->MSales->getItemSales();
|
$data['SalesDetails'] = $this->MSales->getItemSales();
|
||||||
$data['StockItems'] = $this->MStocks->getStockSummary();
|
$data['StockItems'] = $this->MStocks->getStockSummary($datas);
|
||||||
loadview("inventory/reports/purchase_vs_sales", $data);
|
loadview("inventory/reports/purchase_vs_sales", $data);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -801,8 +801,4 @@ class bibaccounts
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//////
|
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,6 @@ class MStocks extends CI_Model
|
|||||||
}
|
}
|
||||||
public function getStockSummary($data)
|
public function getStockSummary($data)
|
||||||
{
|
{
|
||||||
|
|
||||||
$stocklocation_id = $data['stocklocation_id'] ?? null;
|
$stocklocation_id = $data['stocklocation_id'] ?? null;
|
||||||
$this->db->where("status", 1);
|
$this->db->where("status", 1);
|
||||||
if ($stocklocation_id != 0) {
|
if ($stocklocation_id != 0) {
|
||||||
|
@ -250,10 +250,10 @@ $BIBAccounts = new BIBAccounts();
|
|||||||
<?php foreach ($AccountGroups as $group) : ?>
|
<?php foreach ($AccountGroups as $group) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="p-0">
|
<td colspan="2" class="p-0">
|
||||||
<!-- <div id="group_<?php echo $group->acgroup_id; ?>" class=""> -->
|
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||||
<?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
<?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
||||||
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
||||||
<!-- </div> -->
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
@ -272,6 +272,7 @@ $BIBAccounts = new BIBAccounts();
|
|||||||
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<?php $PL = $incomes_totalClosingCr - $incomes_totalClosingDr; ?>
|
<?php $PL = $incomes_totalClosingCr - $incomes_totalClosingDr; ?>
|
||||||
<tr>
|
<tr>
|
||||||
@ -312,11 +313,11 @@ $BIBAccounts = new BIBAccounts();
|
|||||||
<?php foreach ($AccountGroups as $group) : ?>
|
<?php foreach ($AccountGroups as $group) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="p-0">
|
<td colspan="2" class="p-0">
|
||||||
<!-- <div id="group_<?php echo $group->acgroup_id; ?>" class=""> -->
|
<div id="group_<?php echo $group->acgroup_id; ?>" class="">
|
||||||
<i> <?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
<i> <?php $Accountcategories = $BIBAccounts->getRootCategoriesWithBalances($group->acgroup_id); ?>
|
||||||
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
<?php $BIBAccounts->renderAccountCategoriesTable($Accountcategories, $ReportOptions, false, array()); ?>
|
||||||
</i>
|
</i>
|
||||||
<!-- </div> -->
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
@ -45,7 +45,9 @@
|
|||||||
<?php $PTotal = 0;
|
<?php $PTotal = 0;
|
||||||
$a = 0;
|
$a = 0;
|
||||||
foreach ($PurchaseDetails as $Purchase) : $a++; ?>
|
foreach ($PurchaseDetails as $Purchase) : $a++; ?>
|
||||||
|
<?php// var_dump($Purchase->Item->title);die(); ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td><?php echo $a; ?></td>
|
<td><?php echo $a; ?></td>
|
||||||
<td><?php echo $Purchase->Item->title; ?></td>
|
<td><?php echo $Purchase->Item->title; ?></td>
|
||||||
<td class="text-right"><?php echo $Purchase->total_qty; ?></td>
|
<td class="text-right"><?php echo $Purchase->total_qty; ?></td>
|
||||||
@ -185,7 +187,8 @@
|
|||||||
foreach ($StockItems as $Stock) : $a++; ?>
|
foreach ($StockItems as $Stock) : $a++; ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-center"><?php echo $a; ?></td>
|
<td class="text-center"><?php echo $a; ?></td>
|
||||||
<td><?php echo $Stock->Item->title; ?></td>
|
<?php //echo "<pre>";print_r($Stock->Summary->Item->title); die() ;?>
|
||||||
|
<td><?php echo $Stock->Summary->Item->title; ?></td>
|
||||||
<td><?php echo $Stock->Summary->Unit->title; ?></td>
|
<td><?php echo $Stock->Summary->Unit->title; ?></td>
|
||||||
<td class="text-right"><?php echo $oqty = $Stock->Summary->Opening->qty; ?></td>
|
<td class="text-right"><?php echo $oqty = $Stock->Summary->Opening->qty; ?></td>
|
||||||
<td class="text-right"><?php echo myCurrency($orate = $Stock->Summary->Opening->rate); ?></td>
|
<td class="text-right"><?php echo myCurrency($orate = $Stock->Summary->Opening->rate); ?></td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user