Client feedback : GWM
This commit is contained in:
parent
f08d86e408
commit
be3216ce2e
@ -62,7 +62,8 @@ $routes->get('get_branch_edit_form/(:any)',"Branch::get_branch_edit_form/$1");
|
|||||||
$routes->get('product_index/', 'Products::product_index');
|
$routes->get('product_index/', 'Products::product_index');
|
||||||
$routes->get('product_index/(:any)', 'Products::product_index/$1');
|
$routes->get('product_index/(:any)', 'Products::product_index/$1');
|
||||||
$routes->post("add_product", "Products::add_product");
|
$routes->post("add_product", "Products::add_product");
|
||||||
$routes->get("new_product/(:any)", "Products::new_product/$1");
|
$routes->get("add_new_product", "Products::add_new_product");
|
||||||
|
$routes->get("edit_product/(:any)", "Products::edit_product/$1");
|
||||||
$routes->get("delete_product/(:any)", "Products::delete_product/$1");
|
$routes->get("delete_product/(:any)", "Products::delete_product/$1");
|
||||||
$routes->post("get_vendors_by_model", "Products::get_vendors_by_model");
|
$routes->post("get_vendors_by_model", "Products::get_vendors_by_model");
|
||||||
$routes->post("get_models", "Products::get_models");
|
$routes->post("get_models", "Products::get_models");
|
||||||
|
|||||||
@ -80,12 +80,10 @@ class Products extends BaseController
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function new_product($product_id)
|
public function add_new_product()
|
||||||
{
|
{
|
||||||
|
|
||||||
if(!$this->session->has('logged_user')) { return redirect()->to(base_url()); }
|
if(!$this->session->has('logged_user')) { return redirect()->to(base_url()); }
|
||||||
if ($product_id === '0') {
|
|
||||||
|
|
||||||
|
|
||||||
$tax = $this->ProductModel->getTax();
|
$tax = $this->ProductModel->getTax();
|
||||||
$data['tax']=$tax;
|
$data['tax']=$tax;
|
||||||
@ -103,20 +101,29 @@ class Products extends BaseController
|
|||||||
$data['vendorsProduct'] =[];
|
$data['vendorsProduct'] =[];
|
||||||
|
|
||||||
|
|
||||||
|
$productcategory = $this->ProductCategoryModel->orderBy('product_category_id')->findAll();
|
||||||
|
$data['product_id'] = 0;
|
||||||
|
$data['additionalProdutName'] = [];
|
||||||
|
|
||||||
} else if ($product_id !== '0') {
|
|
||||||
|
|
||||||
$data['page_name']="Edit Product";
|
echo view('product_form',$data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function edit_product($product_id)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(!$this->session->has('logged_user')) { return redirect()->to(base_url()); }
|
||||||
|
|
||||||
|
|
||||||
|
$data['page_name'] = "Edit Product";
|
||||||
|
|
||||||
$products = $this->ProductModel->where('product_id', $product_id)->get()->getRowArray();
|
$products = $this->ProductModel->where('product_id', $product_id)->get()->getRowArray();
|
||||||
|
|
||||||
$products['make_id'] = json_decode($products['make_id'], true);
|
$products['make_id'] = json_decode($products['make_id'], true);
|
||||||
$products['models_id'] = json_decode($products['models_id'], true);
|
$products['models_id'] = json_decode($products['models_id'], true);
|
||||||
|
|
||||||
|
|
||||||
$data['products'] = $products;
|
$data['products'] = $products;
|
||||||
|
|
||||||
|
|
||||||
$data['make'] = $this->BikemakeModel->where('business_id', $this->session->get('logged_user_business_id'))->orderBy('make')->findAll();
|
$data['make'] = $this->BikemakeModel->where('business_id', $this->session->get('logged_user_business_id'))->orderBy('make')->findAll();
|
||||||
|
|
||||||
$make_id = $products['make_id'];
|
$make_id = $products['make_id'];
|
||||||
@ -139,12 +146,7 @@ class Products extends BaseController
|
|||||||
|
|
||||||
$vendorIds = json_decode($products['vendor'], true);
|
$vendorIds = json_decode($products['vendor'], true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$vendors = [];
|
$vendors = [];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($vendorIds as $vendorId) {
|
foreach ($vendorIds as $vendorId) {
|
||||||
$vendor = $this->VendorModel->find($vendorId);
|
$vendor = $this->VendorModel->find($vendorId);
|
||||||
if ($vendor) {
|
if ($vendor) {
|
||||||
@ -152,13 +154,11 @@ class Products extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$data['vendorsProduct'] = $vendors;
|
$data['vendorsProduct'] = $vendors;
|
||||||
// print_r($data['vendors']);die;
|
|
||||||
|
|
||||||
$preferredVendorId = $products['prefered_vendor'];
|
$preferredVendorId = $products['prefered_vendor'];
|
||||||
// Pass the preferred vendor ID to the view
|
|
||||||
$data['preferredVendorId'] = $preferredVendorId; // print_r($data);die;
|
$data['preferredVendorId'] = $preferredVendorId;
|
||||||
// print_r($data);die;
|
|
||||||
}
|
|
||||||
|
|
||||||
$data['product_id'] = $product_id;
|
$data['product_id'] = $product_id;
|
||||||
|
|
||||||
@ -171,8 +171,6 @@ class Products extends BaseController
|
|||||||
$data['productcategory'] = $productcategory;
|
$data['productcategory'] = $productcategory;
|
||||||
$data['additionalProdutName'] = $additionalProdutName;
|
$data['additionalProdutName'] = $additionalProdutName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo view('product_form',$data);
|
echo view('product_form',$data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -245,7 +245,7 @@ class Purchase extends BaseController
|
|||||||
$this->PurchaseOrderModel->update($purchase_order_id, $data);
|
$this->PurchaseOrderModel->update($purchase_order_id, $data);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
$this->PurchaseOrderModel->insert($data);
|
||||||
$purchase_order_id = $this->PurchaseOrderModel->getInsertID();
|
$purchase_order_id = $this->PurchaseOrderModel->getInsertID();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,10 +317,10 @@ class Purchase extends BaseController
|
|||||||
// send purhase data through mail
|
// send purhase data through mail
|
||||||
|
|
||||||
$vendor = $this->VendorModel->where('vendor_id',$this->request->getPost('vendor_id'))->findAll();
|
$vendor = $this->VendorModel->where('vendor_id',$this->request->getPost('vendor_id'))->findAll();
|
||||||
$mail_status = $this->download_purchase_invoice($purchase_order_id, $vendor[0]['vendor_email']);
|
// $mail_status = $this->download_purchase_invoice($purchase_order_id, $vendor[0]['vendor_email']);
|
||||||
|
|
||||||
// echo $mail_status;die;
|
// echo $mail_status;die;
|
||||||
$_SESSION['mail_status'] = $mail_status;
|
// $_SESSION['mail_status'] = $mail_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -419,7 +419,6 @@ class Sales extends BaseController
|
|||||||
->first();
|
->first();
|
||||||
$data['items'] = $this->SalesOrderModel->getSalesOrderProductsForPdf($sales_order_id);
|
$data['items'] = $this->SalesOrderModel->getSalesOrderProductsForPdf($sales_order_id);
|
||||||
|
|
||||||
|
|
||||||
$html = view('invoice_pdf_template', $data);
|
$html = view('invoice_pdf_template', $data);
|
||||||
return $this->respond(['status' => 'success','code' => 200,'data' => $html],200);
|
return $this->respond(['status' => 'success','code' => 200,'data' => $html],200);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,8 +12,11 @@ class SalesOrderModel extends Model
|
|||||||
->where('sales_order_id', $sales_order_id)
|
->where('sales_order_id', $sales_order_id)
|
||||||
|
|
||||||
->join('branches as B','B.branch_id = sales_order.branch_id','left')
|
->join('branches as B','B.branch_id = sales_order.branch_id','left')
|
||||||
|
->join('vehicle as V','V.vehicle_id = sales_order.vehicle_id','left')
|
||||||
|
->join('client as C','V.client_id = C.client_id','left')
|
||||||
->select('sales_order.*')
|
->select('sales_order.*')
|
||||||
->select('B.branch_name ,B.address as company_address,B.city as company_city,B.state as company_state,B.postal_code as company_postal_code,B.contact_1 as company_mobile_no_1,B.contact_2 as company_mobile_no_2,B.gstno as company_gstno')
|
->select('B.branch_name ,B.address as company_address,B.city as company_city,B.state as company_state,B.postal_code as company_postal_code,B.contact_1 as company_mobile_no_1,B.contact_2 as company_mobile_no_2,B.gstno as company_gstno')
|
||||||
|
->select('C.gstnumber as client_gst')
|
||||||
|
|
||||||
->get()
|
->get()
|
||||||
->getResult();
|
->getResult();
|
||||||
|
|||||||
@ -52,7 +52,8 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="inputPassword4" class="col-form-label">Address</label>
|
<label for="inputPassword4" class="col-form-label">Address</label>
|
||||||
<input type="text" class="form-control" name="address" placeholder="Address"value="<?= isset($client['address']) ? $client['address'] : '' ?>" >
|
<textarea class="form-control" name="address" placeholder="Address"><?= isset($client['address']) ? $client['address'] : '' ?></textarea>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="inputPassword4" class="col-form-label">City</label>
|
<label for="inputPassword4" class="col-form-label">City</label>
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
<td style="width: 18.5039%; height: 18px; text-align: right; font-size: small;"><?= $sales[0]->mode_of_payment; ?></td>
|
<td style="width: 18.5039%; height: 18px; text-align: right; font-size: small;"><?= $sales[0]->mode_of_payment; ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="height: 18px;">
|
<tr style="height: 18px;">
|
||||||
<td style="width: 49.4096%; height: 18px; font-size: small;">Mobile: <?= $sales[0]->mobile_no; ?></td>
|
<td style="width: 49.4096%; height: 18px; font-size: small;">Mobile: <?= $sales[0]->mobile_no; ?> , GST: <?= ($sales[0]->client_gst) ? $sales[0]->client_gst : 'nil'; ?></td>
|
||||||
<td style="width: 1.9685%; height: 18px;"> </td>
|
<td style="width: 1.9685%; height: 18px;"> </td>
|
||||||
<td style="width: 30.3148%; height: 18px;"> </td>
|
<td style="width: 30.3148%; height: 18px;"> </td>
|
||||||
<td style="width: 18.5039%; height: 18px;"> </td>
|
<td style="width: 18.5039%; height: 18px;"> </td>
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
<ol class="breadcrumb m-0">
|
<ol class="breadcrumb m-0">
|
||||||
<li class="">
|
<li class="">
|
||||||
<a href="<?= base_url() . "product_index"; ?>" class="btn btn-primary waves-effect"> View All Product</a>
|
<a href="<?= base_url() . "product_index"; ?>" class="btn btn-primary waves-effect"> View All Product</a>
|
||||||
<a href="<?= base_url() . "new_product/0"; ?>" class="btn btn-primary waves-effect"> Add New Product</a>
|
<a href="<?= base_url() . "add_new_product"; ?>" class="btn btn-primary waves-effect"> Add New Product</a>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<?php if(!$manufacturer_id) { ?>
|
<?php if(!$manufacturer_id) { ?>
|
||||||
<li class="">
|
<li class="">
|
||||||
<a href="<?= base_url() . "product_categories"; ?>" class="btn btn-primary waves-effect">Categories View</a>
|
<a href="<?= base_url() . "product_categories"; ?>" class="btn btn-primary waves-effect">Categories View</a>
|
||||||
<a href="<?= base_url() . "new_product/0"; ?>" class="btn btn-primary waves-effect"> Add New Product</a>
|
<a href="<?= base_url() . "add_new_product"; ?>" class="btn btn-primary waves-effect"> Add New Product</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ol>
|
</ol>
|
||||||
@ -112,7 +112,7 @@
|
|||||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||||
<div class="dropdown-menu ">
|
<div class="dropdown-menu ">
|
||||||
<?php if($value['isactive'] == 1){ ?>
|
<?php if($value['isactive'] == 1){ ?>
|
||||||
<a href="<?= "new_product/" . $value['product_id']; ?>" class="dropdown-item edit-button" onclick="setSessionPagination('product_tr_<?php echo $index+1; ?>')"><i class="ri-pencil-line mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
<a href="<?= "edit_product/" . $value['product_id']; ?>" class="dropdown-item edit-button" onclick="setSessionPagination('product_tr_<?php echo $index+1; ?>')"><i class="ri-pencil-line mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||||
<?php } if($value['isactive'] == 1): ?>
|
<?php } if($value['isactive'] == 1): ?>
|
||||||
<a class="dropdown-item" data-id="<?php echo $value['product_id']; ?>" data-isactive="<?php echo $value['isactive']; ?>" title="Deactivate" onclick="statusChange(this), setSessionPagination('product_tr_<?php echo $index+1; ?>')" ><i class="fa fa-user " style="font-size:20px"></i><i class="fa fa-times mr-2" style="font-size: x-small;" style="font-size:20px"></i>Deactivate</a>
|
<a class="dropdown-item" data-id="<?php echo $value['product_id']; ?>" data-isactive="<?php echo $value['isactive']; ?>" title="Deactivate" onclick="statusChange(this), setSessionPagination('product_tr_<?php echo $index+1; ?>')" ><i class="fa fa-user " style="font-size:20px"></i><i class="fa fa-times mr-2" style="font-size: x-small;" style="font-size:20px"></i>Deactivate</a>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
|
|||||||
@ -123,10 +123,9 @@
|
|||||||
<!-- <h4 class="header-title">Billing Address Details :</h4><br> -->
|
<!-- <h4 class="header-title">Billing Address Details :</h4><br> -->
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="inputPassword4" class="col-form-label">Address<span
|
<label for="inputPassword4" class="col-form-label">Address<span class="text-danger"></span></label>
|
||||||
class="text-danger"></span></label>
|
<textarea class="form-control" name="billing_address" placeholder="Address"><?= isset($sales['billing_address']) ? $sales['billing_address'] : '' ?></textarea>
|
||||||
<input type="text" class="form-control" name="billing_address" placeholder="Address"
|
|
||||||
value="<?= isset($sales['billing_address']) ? $sales['billing_address'] : '' ?>">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -100,7 +100,8 @@
|
|||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div class="form-group col-md-3">
|
||||||
<label for="inputPassword4" class="col-form-label">Address</label>
|
<label for="inputPassword4" class="col-form-label">Address</label>
|
||||||
<input type="text" class="form-control" name="address" placeholder="Address"value="<?= isset($vehicle['address']) ? $vehicle['address'] : '' ?>" >
|
<textarea class="form-control" name="address" placeholder="Address"><?= isset($vehicle['address']) ? $vehicle['address'] : '' ?></textarea>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user