diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index 752cfac5..a56d708e 100755
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -316,6 +316,7 @@ $routes->match(['GET', 'POST', 'PUT', 'DELETE'], 'EditStoreRequisition', 'Storer
$routes->get( 'AddIGR', 'Inwardgateregister::addIGR'); // ADD IGR page - working
$routes->get( 'ViewIGR', 'Inwardgateregister::viewIGR'); // View IGR PAGE - Working
$routes->post('ViewIGR', 'Inwardgateregister::viewIGR');//for filter purpose
+$routes->post('cancellationIGR', 'Inwardgateregister::cancellationIGR');
$routes->get( 'accountsDashboard', 'Inwardgateregister::accountsDashboard'); // View IGR PAGE - Working
$routes->post('ViewIGRDetails', 'Inwardgateregister::viewIGRDetails');
$routes->post('GetIGRLineItemDetails', 'Inwardgateregister::getIGRLineItemDetails');
@@ -544,3 +545,20 @@ $routes->post('updateTrpProductionDetails', 'StockController::updateTrpProductio
$routes->post('updateAbstractDetails','StockController::updateAbstractDetails');
+//Reports Module
+
+$routes->get('allReports','Report::allReports');
+
+// Material Report Links
+$routes->get('MM_Supplier', 'Report::MM_Supplier');
+$routes->get('MM_Item','Report::MM_Item');
+$routes->match(['GET', 'POST'],'MM_ReceiptValue','Report::MM_ReceiptValue');
+
+//Inward Report Links
+$routes->match(['GET', 'POST'],'ipurchase','Report::ipurchase');
+$routes->match(['GET', 'POST'],'iyear_wise', 'Report::iyear_wise');
+$routes->match(['GET', 'POST'],'ipurchase_supplier' , 'Report::ipurchase_supplier');
+$routes->match(['GET', 'POST'],'iconsolidate' , 'Report::iconsolidate');
+$routes->match(['GET', 'POST'],'icumulative' , 'Report::icumulative');
+$routes->match(['GET', 'POST'],'rawi_cumulative' , 'Report::rawi_cumulative');
+$routes->match(['GET', 'POST'],'rawi_consolidate' , 'Report::rawi_consolidate');
\ No newline at end of file
diff --git a/app/Controllers/Report.php b/app/Controllers/Report.php
index 36f1c166..54a2bae7 100755
--- a/app/Controllers/Report.php
+++ b/app/Controllers/Report.php
@@ -219,6 +219,8 @@ class Report extends BaseController
$fa = substr((string)$ab, 0, -5);
$aa = substr((string)$ab, 5, 5);
$m = $this->request->getPost('month');
+ $data['month'] = $m;
+ $data['financialyear'] = $ab;
$data['finyear'] = $this->dahsboard_Model->report_finyear();
$data['mmr'] = $this->dahsboard_Model->report_MMReceiptValue($fa, $aa, $m);
}
@@ -244,10 +246,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);
}
@@ -541,14 +553,20 @@ class Report extends BaseController
$this->global['pageTitle'] = 'Inward PO Reports';
if ($this->request->getPost('btn_submit')) {
$cname = $this->request->getPost('client_name');
+ $data['client_name'] = $cname;
$prod = $this->request->getPost('item_name');
+ $data['item_name'] = $prod;
$ab = $this->request->getPost('financialyear');
+ $data['financialyear'] = $ab;
$cat = $this->request->getVar('cat');
$fa = substr((string)$ab, 0, -5);
$aa = substr((string)$ab, 5, 5);
$m = $this->request->getPost('month');
+ $data['month'] = $m;
$frm = $this->request->getPost('from_date');
+ $data['frm'] = $frm;
$t = $this->request->getPost('to_date');
+ $data['t'] = $t;
//print_r($prod);
$data['material'] = $this->dahsboard_Model->material_name();
$data['cust'] = $this->dahsboard_Model->customer_name();
diff --git a/app/Models/Dashboard_model.php b/app/Models/Dashboard_model.php
index 82e2cd67..b2a4fcb2 100755
--- a/app/Models/Dashboard_model.php
+++ b/app/Models/Dashboard_model.php
@@ -875,7 +875,9 @@ group by po.SupplierID,pl.MaterialCode";
{
- $sql = "SELECT MaterialCode,MaterialName,UOM,Category,HSNCODE FROM t_materialmaster group by MaterialCode";
+ $sql = "SELECT MaterialCode,MaterialName,UOM, t_configdetails.ConfigValue as Category,HSNCODE FROM t_materialmaster
+ join t_configdetails on t_configdetails.key = t_materialmaster.Category
+ group by MaterialCode";
$query = $this->db->query($sql);
return $query->getResult();
}
@@ -909,65 +911,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 . "' ";
+ }
@@ -1065,11 +1067,11 @@ pm.Status != 'ST030' and pm.Status != 'ST056' and pm.Status != 'ST027' ";
$sql = "SELECT
- CASE WHEN MONTH(PODate)>=4 THEN
- concat(YEAR(PODate), '-',YEAR(PODate)+1)
- ELSE concat(YEAR(PODate)-1,'-', YEAR(PODate)) END AS financial_year
- FROM t_purchaseorder_master
-GROUP BY financial_year";
+ CASE WHEN MONTH(PODate)>=4 THEN
+ concat(YEAR(PODate), '-',YEAR(PODate)+1)
+ ELSE concat(YEAR(PODate)-1,'-', YEAR(PODate)) END AS financial_year
+ FROM t_purchaseorder_master
+ GROUP BY financial_year";
$query = $this->db->query($sql);
return $query->getResult();
}
diff --git a/app/Views/EditservicePurchaseorder.php b/app/Views/EditservicePurchaseorder.php
index 3b080fbe..a75ecd90 100755
--- a/app/Views/EditservicePurchaseorder.php
+++ b/app/Views/EditservicePurchaseorder.php
@@ -1715,7 +1715,7 @@ if (!empty($getlogpodtl)) {
Submit
Approve
- OK
+ OK
Submit
Reset
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_pending_purchase.php b/app/Views/Report_pending_purchase.php
index a4c5eafd..913a9c29 100755
--- a/app/Views/Report_pending_purchase.php
+++ b/app/Views/Report_pending_purchase.php
@@ -125,6 +125,7 @@
+
+
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/assetListing.php b/app/Views/assetListing.php
index fe17cfe4..287f3f69 100755
--- a/app/Views/assetListing.php
+++ b/app/Views/assetListing.php
@@ -153,7 +153,7 @@
IsActive == 0) { ?>
-
@@ -168,7 +168,7 @@
- IsActive == 0) {
?>
-
diff --git a/app/Views/editOldemppay.php b/app/Views/editOldemppay.php
index 7e92e7b8..790852dd 100755
--- a/app/Views/editOldemppay.php
+++ b/app/Views/editOldemppay.php
@@ -343,8 +343,8 @@ if (!empty($emppay)) {
-
-
+
+
diff --git a/app/Views/editRawmaterial.php b/app/Views/editRawmaterial.php
index 48b5e391..c298dcbb 100755
--- a/app/Views/editRawmaterial.php
+++ b/app/Views/editRawmaterial.php
@@ -114,7 +114,7 @@ if ($total <= $reorder) {
Edit Material - Details
diff --git a/app/Views/editSupplier.php b/app/Views/editSupplier.php
index 5e90c047..ea05467d 100755
--- a/app/Views/editSupplier.php
+++ b/app/Views/editSupplier.php
@@ -287,7 +287,7 @@ if (!empty($supplier)) {
Edit Supplier Details
diff --git a/app/Views/editconfig.php b/app/Views/editconfig.php
index 1013c078..4cf8da5b 100755
--- a/app/Views/editconfig.php
+++ b/app/Views/editconfig.php
@@ -157,9 +157,9 @@ if (!empty($master)) {
|
Config_ID === 'C023'){ ?>
-
+ |
@@ -168,7 +168,7 @@ if (!empty($master)) {
|
- ConfigValue; ?> |
+ ConfigValue; ?> |
@@ -422,8 +422,6 @@ if (!empty($master)) {
},
success: function(data) {
- console.log(data);
-
if (data.length > 0) {
if (data[0]?.isActive == 1) {
@@ -509,15 +507,17 @@ if (!empty($master)) {
var id = $(this).data('id');
var key = $(this).data('key');
var code = $(this).data('code');
- var configValue = $(this).data('configvalue');
+ var configValue = $(this).attr('data-configvalue');
+
+ console.log(configValue);
$('#key').val(key);
$('#Config_ID').val(code);
$('#configValue').val(configValue);
-
$('#EditConfiguration').modal('show');
-
+
});
+
@@ -541,7 +541,25 @@ if (!empty($master)) {
success: function(response) {
if (response.status) {
alert('Config Value updated successfully');
- location.reload();
+
+ let key = $('#key').val();
+
+ let configValue = $("#configValue").val();
+
+ let configId = $('#Config_ID').val();
+ if (configId === "C023") {
+ $(`#configtable tbody tr td.config-value-td a[data-key="${key}"]`).text(configValue);
+ } else {
+ $(`#configtable tbody tr td.config-value-td[data-key="${key}"]`).text(configValue);
+ }
+
+ $(`#configtable tbody tr td a.editConfigurationBtn[data-key="${key}"]`).attr('data-configvalue', configValue);
+
+
+ $("#configValue").val(" ");
+
+ $('#EditConfiguration').modal('hide');
+
} else {
alert('Failed to update Config Value');
}
diff --git a/app/Views/editimportpo.php b/app/Views/editimportpo.php
index f75f9938..fe03f7d6 100755
--- a/app/Views/editimportpo.php
+++ b/app/Views/editimportpo.php
@@ -1409,10 +1409,12 @@ if (!empty($getlogpodtl)) {
Submit
Approve
- OK
+
+ OK
Submit
- OK
+ OK
+
diff --git a/app/Views/employeeLeaveApplicationForm.php b/app/Views/employeeLeaveApplicationForm.php
index b7bcc8d6..594a4fa5 100755
--- a/app/Views/employeeLeaveApplicationForm.php
+++ b/app/Views/employeeLeaveApplicationForm.php
@@ -82,7 +82,7 @@
| From Date |
To Date |
Number Of Days |
- Status |
+ Status |
Action |
@@ -105,7 +105,7 @@
= esc($stdate) ?> |
= esc($eddate) ?> |
= esc($d['no_of_days']) ?> |
-
+ |
|
IsActive == 0) { ?>
-
+
+
@@ -217,11 +219,12 @@
class="fa fa-edit" style="color:#02a8b5;">
+
-
+
|
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 @@
+
+
+
-
-