diff --git a/app/Controllers/Login.php b/app/Controllers/Login.php index 2d65ce28..1179d303 100755 --- a/app/Controllers/Login.php +++ b/app/Controllers/Login.php @@ -140,9 +140,9 @@ class Login extends BaseController */ public function resetPasswordUser() { - $mobileno = $this->request->getPost('phno'); + $emailid = $this->request->getPost('email'); - $result = $this->login_model->getuserid($mobileno, $emailid); + $result = $this->login_model->getuserid($emailid); if (!empty($result)) { @@ -169,13 +169,13 @@ class Login extends BaseController $this->login_model->updatepassword($result[0]->userId, $resetpassword); - session()->setFlashdata('success', 'Password sent successfully. Please check your mobile .'); + session()->setFlashdata('success', 'Password sent successfully. Please check your E-mail .'); return redirect()->to('/login'); } else { - session()->setFlashdata('error', 'Given Mobile Number or Email is not registered with us.'); + session()->setFlashdata('error', 'Given Email is not registered with us.'); return redirect()->to('login'); } } diff --git a/app/Controllers/Sales.php b/app/Controllers/Sales.php index 093a2564..977b468f 100755 --- a/app/Controllers/Sales.php +++ b/app/Controllers/Sales.php @@ -90,6 +90,7 @@ class Sales extends BaseController $stock = $this->request->getVar('stock')??"none"; // maybe any thing like bag or resin or power or diesel or gas $data['stock'] = $this->ipinvoice_model->getClosingStock($stock); + $data['givenStock'] = $stock ?? 'resin'; diff --git a/app/Models/Ipinvoice_model.php b/app/Models/Ipinvoice_model.php index 09ca546c..149afec2 100755 --- a/app/Models/Ipinvoice_model.php +++ b/app/Models/Ipinvoice_model.php @@ -672,17 +672,25 @@ class Ipinvoice_model extends Model default: - $result [] = ['header' => 'Gas Final Closing']; + $builder = $this->db->table('t_resinStockDetails trd') + ->select('trd.balanceStock, tmm.MaterialName ,tmm.MaterialCode') + ->join('t_materialmaster tmm', 'tmm.MaterialCode = trd.materialCode') + ->where('trd.date', $lastDateOfCurrentMonth) + ->get() + ->getResultArray(); + $header =array_column($builder,'MaterialName'); + + $materialCode =array_column($builder,'MaterialCode'); + + $body =array_column($builder,'balanceStock'); + + + $result [] = ['header' => $header]; + + $result [] = ['materialCode' => $materialCode]; - $builder = $this->db - ->table('t_gasstockdetails') - ->select('balanceStock') - ->where('date',$lastDateOfCurrentMonth) - ->get() - ->getResultArray(); - - $result[] =['body' => $builder[0]['balanceStock']] ; + $result [] = ['body' => $body ?? "Not Opened Yet" ] ; } diff --git a/app/Models/Login_model.php b/app/Models/Login_model.php index 122ffd63..f8df94b8 100755 --- a/app/Models/Login_model.php +++ b/app/Models/Login_model.php @@ -151,12 +151,11 @@ class Login_model extends Model /** * get the user dtl */ - function getuserid($mobileno, $emailid) + function getuserid($emailid) { $builder = $this->db->table('tbl_users as UsrTbl'); $builder->select('UsrTbl.userId,UsrTbl.email,EmpTbl.ContactNumber,EmpTbl.FirstName') ->join('t_employee_details as EmpTbl', 'UsrTbl.EmpID = EmpTbl.EmpID') - ->where('EmpTbl.ContactNumber', $mobileno) ->where('UsrTbl.email', $emailid) ->where('UsrTbl.isDeleted', 0); $res = $builder->get(); diff --git a/app/Views/forgotPassword.php b/app/Views/forgotPassword.php index 1c4cae59..fd40ea65 100755 --- a/app/Views/forgotPassword.php +++ b/app/Views/forgotPassword.php @@ -24,10 +24,6 @@

Forgot Password

-
- - -
diff --git a/app/Views/requisitionlisting.php b/app/Views/requisitionlisting.php index d0cf9670..c2c05114 100755 --- a/app/Views/requisitionlisting.php +++ b/app/Views/requisitionlisting.php @@ -235,7 +235,7 @@ if (!empty($Status)) { var table = $('#requisition_listing').DataTable({ dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination buttons: [ - 'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons + 'excel', 'pdf' // Export buttons ], pageLength: 10, // Default rows per page lengthMenu: [ diff --git a/app/Views/sales_dashboard.php b/app/Views/sales_dashboard.php index 26988248..b3754288 100755 --- a/app/Views/sales_dashboard.php +++ b/app/Views/sales_dashboard.php @@ -115,16 +115,42 @@
-

Stock Dashboard

+

This Month Stock Closing

-
- Gas - Diesel - Resin - Bag +
+
+ Resin + Bag + Diesel + Gas +
+ +
+ +
+ + @@ -157,9 +183,12 @@ - - - + + + @@ -173,8 +202,12 @@ - - + + @@ -305,7 +338,7 @@ dom: 'Brtip', // Remove length and search inputs lengthChange: false, searching: false, - buttons: ['excel'], + buttons: [''], responsive: true, order: false, language: { @@ -375,4 +408,62 @@ } } }); + + + + \ No newline at end of file
+ + +
1 + + + +