diff --git a/app/Controllers/Report.php b/app/Controllers/Report.php
index 36f1c166..b1b5509c 100755
--- a/app/Controllers/Report.php
+++ b/app/Controllers/Report.php
@@ -244,10 +244,20 @@ class Report extends BaseController
$data['cust'] = $this->dahsboard_Model->customer_name();
$data['finyear'] = $this->dahsboard_Model->report_finyear();
$data['purchase'] = $this->dahsboard_Model->report_purchase($cname, $prod, $fa, $aa, $m, $frm, $t);
+
+ $data['cname'] = $cname;
+ $data['prod'] = $prod;
+ $data['ab'] = $ab;
+ $data['m'] = $m;
+ $data['frm'] = $frm;
+ $data['t'] = $t;
+
}
+
$data['material'] = $this->dahsboard_Model->material_name();
$data['cust'] = $this->dahsboard_Model->customer_name();
$data['finyear'] = $this->dahsboard_Model->report_finyear();
+
$this->loadviews("Report_purchase", $this->global, $data, NULL);
}
diff --git a/app/Models/Dashboard_model.php b/app/Models/Dashboard_model.php
index 3bfa49d0..ff3c8fba 100755
--- a/app/Models/Dashboard_model.php
+++ b/app/Models/Dashboard_model.php
@@ -909,65 +909,65 @@ where pm.PODate != 0 ";
$sql = "SELECT pm.PONO as pono,pm.POType as potype,date_format(pm.PODate,'%d-%m-%Y') as created_date,
-TIME_FORMAT(pm.PODate,'%l:%i %p') as created_time,
-mm.MaterialName as material_name,sd.SupplierName as supplier_name,
-ifnull(sum(distinct pl.Quantity),0) as quantity,mm.UOM as UOM,ifnull(sum(distinct pl.Rate),0) as rate,
-round(ifnull(sum(distinct pl.Quantity * pl.Rate),0),2) as value,
-if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate,
-ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) as sgst,
-ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) as cgst,
-ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) as igst,
-ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0) as discount,
-ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) as freight,
-ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) as Package,
-ifnull(rt.Insurance,0) as insurance,
-round((
- if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)),
-if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)),
-ifnull(sum(pl.Quantity * pl.Rate),0)))
-+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0)
-+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0)
-+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0)
-+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
-+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0)
-+ ifnull(rt.Insurance,0)
-- ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total
- FROM t_purchaseorder_master pm
-join t_purchaseorder_lineitem pl on pl.PONO = pm.PONO
-left join t_materialmaster mm on mm.MaterialCode = pl.MaterialCode
-left join t_supplierdetailsn sd on sd.SupplierID = pm.SupplierID
-left join t_service_tax st on st.LineItemNo = pl.LineItemNo
-left join t_revenue_tax rt on rt.LineItemNo = pl.LineItemNo
-where
-pm.Status != 'ST030' and pm.Status != 'ST056' and pm.Status != 'ST027'";
+ TIME_FORMAT(pm.PODate,'%l:%i %p') as created_time,
+ mm.MaterialName as material_name,sd.SupplierName as supplier_name,
+ ifnull(sum(distinct pl.Quantity),0) as quantity,mm.UOM as UOM,ifnull(sum(distinct pl.Rate),0) as rate,
+ round(ifnull(sum(distinct pl.Quantity * pl.Rate),0),2) as value,
+ if(POType = 'IMPORT' or POType = 'CAPITAL',sum(distinct pm.ExchangeRate),0) as exchange_rate,
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0) as sgst,
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0) as cgst,
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0) as igst,
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0) as discount,
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0) as freight,
+ ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0) as Package,
+ ifnull(rt.Insurance,0) as insurance,
+ round((
+ if(POType = 'IMPORT',sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)),
+ if(POType = 'CAPITAL' && CapitalRange = 0,sum(distinct pm.ExchangeRate * (pl.Quantity * pl.Rate)),
+ ifnull(sum(pl.Quantity * pl.Rate),0)))
+ + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterSGST),sum(distinct st.After_SGST)),0)
+ + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterCGST),sum(distinct st.After_CGST)),0)
+ + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterIGST),sum(distinct st.After_IGST)),0)
+ + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterFreightValue),sum(distinct st.AfterFreightValue)),0)
+ + ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterPackagingValue),0),0)
+ + ifnull(rt.Insurance,0)
+ - ifnull(if(POType = 'REVENUE',sum(distinct rt.AfterDiscount),sum(distinct st.Afterdiscountval)),0)),2) as total
+ FROM t_purchaseorder_master pm
+ join t_purchaseorder_lineitem pl on pl.PONO = pm.PONO
+ left join t_materialmaster mm on mm.MaterialCode = pl.MaterialCode
+ left join t_supplierdetailsn sd on sd.SupplierID = pm.SupplierID
+ left join t_service_tax st on st.LineItemNo = pl.LineItemNo
+ left join t_revenue_tax rt on rt.LineItemNo = pl.LineItemNo
+ where
+ pm.Status != 'ST030' and pm.Status != 'ST056' and pm.Status != 'ST027'";
- if ($cname != '') {
+ if ($cname != '') {
- $sql .= "and sd.SupplierName = '" . $cname . "'";
- }
+ $sql .= "and sd.SupplierName = '" . $cname . "'";
+ }
- if ($fa and $aa != '') {
+ if ($fa and $aa != '') {
- $sql .= " and (pm.PODate >= '" . $fa . "-04-01' and pm.PODate <= '" . $aa . "-03-31')";
- }
- if ($m != '') {
+ $sql .= " and (pm.PODate >= '" . $fa . "-04-01' and pm.PODate <= '" . $aa . "-03-31')";
+ }
+ if ($m != '') {
- $sql .= "and monthname(pm.PODate) = '" . $m . "'";
- }
+ $sql .= "and monthname(pm.PODate) = '" . $m . "'";
+ }
- if ($frm and $t != '') {
- $fromd = date("Y-m-d", strtotime($frm));
- $tod = date("Y-m-d", strtotime($t));
+ if ($frm and $t != '') {
+ $fromd = date("Y-m-d", strtotime($frm));
+ $tod = date("Y-m-d", strtotime($t));
- $sql .= "and date(pm.PODate) >= '" . $fromd . "'
- and date(pm.PODate) <= '" . $tod . "'";
- }
- if ($prod != '') {
+ $sql .= "and date(pm.PODate) >= '" . $fromd . "'
+ and date(pm.PODate) <= '" . $tod . "'";
+ }
+ if ($prod != '') {
- $sql .= " and mm.MaterialName = '" . $prod . "' ";
- }
+ $sql .= " and mm.MaterialName = '" . $prod . "' ";
+ }
diff --git a/app/Views/Report_POreleased.php b/app/Views/Report_POreleased.php
index b4e28287..818e3677 100755
--- a/app/Views/Report_POreleased.php
+++ b/app/Views/Report_POreleased.php
@@ -1,253 +1,258 @@
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | PO No |
- PO Type |
- PO Date |
- Released Date |
- Requested Department |
- Total Order Value (₹) |
-
-
-
-
-
-
- | PONO?> |
- POType?> |
- PODate);echo $date->format('d-m-Y'); ?> |
- ReleasedDate);echo $date->format('d-m-Y'); ?> |
- Dept_Name?> |
- TotalOrderValue,2,'.','');
- echo number_format($rel->TotalOrderValue,2,'.','')?> |
-
-
-
-
-
-
- |
- |
- |
- |
- |
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/Views/Report_consolidate.php b/app/Views/Report_consolidate.php
index a3ca2dd8..8a58eeeb 100755
--- a/app/Views/Report_consolidate.php
+++ b/app/Views/Report_consolidate.php
@@ -1,153 +1,141 @@
+
+ });
+
-
-
-
-
-
-
-
-
-
-
-
-
+ .dataTables_filter {
+ /* width: 50%; */
+ float: right;
+ text-align: right;
+ }
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
diff --git a/app/Views/Report_openorder.php b/app/Views/Report_openorder.php
index 4184f9f2..b79259e3 100755
--- a/app/Views/Report_openorder.php
+++ b/app/Views/Report_openorder.php
@@ -1,252 +1,264 @@
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- | PO No |
- PO Type |
- PO Date |
- Approved Date |
- Requested Department |
- Total Order Value (₹) |
-
-
-
-
-
-
- | PONO?> |
- POType?> |
- PODate?> |
- ApprovedDate?> |
- Dept_Name?> |
- TotalOrderValue,2,'.','');
- echo number_format($rel->TotalOrderValue,2,'.','')?> |
-
-
-
-
-
-
- |
- |
- |
- |
- |
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/Views/Report_purchase.php b/app/Views/Report_purchase.php
index dffcf848..c8006637 100755
--- a/app/Views/Report_purchase.php
+++ b/app/Views/Report_purchase.php
@@ -1,261 +1,190 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ .dataTables_filter {
+ /* width: 50%; */
+ float: right;
+ text-align: right;
+ }
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
\ No newline at end of file
+});
+
\ No newline at end of file
diff --git a/app/Views/Report_supplier.php b/app/Views/Report_supplier.php
index 01a6984f..1d73cc98 100755
--- a/app/Views/Report_supplier.php
+++ b/app/Views/Report_supplier.php
@@ -1,421 +1,290 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+ .dataTables_filter input {
+ padding: 4px;
+ }
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
\ No newline at end of file
+});
+
\ No newline at end of file
diff --git a/app/Views/Report_totalorders.php b/app/Views/Report_totalorders.php
index 88376871..b00883e8 100755
--- a/app/Views/Report_totalorders.php
+++ b/app/Views/Report_totalorders.php
@@ -1,110 +1,106 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/Views/Report_year_wise.php b/app/Views/Report_year_wise.php
index e6907b5b..106db822 100755
--- a/app/Views/Report_year_wise.php
+++ b/app/Views/Report_year_wise.php
@@ -1,118 +1,133 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
\ No newline at end of file
+});
+
\ No newline at end of file
diff --git a/app/Views/report_pendingreqst.php b/app/Views/report_pendingreqst.php
index 7467326c..6988c8ee 100755
--- a/app/Views/report_pendingreqst.php
+++ b/app/Views/report_pendingreqst.php
@@ -1,277 +1,260 @@
+
+
+
-
-