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/(:any)', 'Products::product_index/$1');
|
||||
$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->post("get_vendors_by_model", "Products::get_vendors_by_model");
|
||||
$routes->post("get_models", "Products::get_models");
|
||||
|
||||
@ -80,13 +80,11 @@ 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 ($product_id === '0') {
|
||||
|
||||
|
||||
|
||||
$tax = $this->ProductModel->getTax();
|
||||
$data['tax']=$tax;
|
||||
|
||||
@ -103,20 +101,29 @@ class Products extends BaseController
|
||||
$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['make_id'] = json_decode($products['make_id'], true);
|
||||
$products['models_id'] = json_decode($products['models_id'], true);
|
||||
|
||||
|
||||
$data['products'] = $products;
|
||||
|
||||
|
||||
$data['make'] = $this->BikemakeModel->where('business_id', $this->session->get('logged_user_business_id'))->orderBy('make')->findAll();
|
||||
|
||||
$make_id = $products['make_id'];
|
||||
@ -139,12 +146,7 @@ class Products extends BaseController
|
||||
|
||||
$vendorIds = json_decode($products['vendor'], true);
|
||||
|
||||
|
||||
|
||||
$vendors = [];
|
||||
|
||||
|
||||
|
||||
foreach ($vendorIds as $vendorId) {
|
||||
$vendor = $this->VendorModel->find($vendorId);
|
||||
if ($vendor) {
|
||||
@ -152,28 +154,24 @@ class Products extends BaseController
|
||||
}
|
||||
}
|
||||
$data['vendorsProduct'] = $vendors;
|
||||
// print_r($data['vendors']);die;
|
||||
|
||||
$preferredVendorId = $products['prefered_vendor'];
|
||||
|
||||
$data['preferredVendorId'] = $preferredVendorId;
|
||||
|
||||
|
||||
$preferredVendorId = $products['prefered_vendor'];
|
||||
// Pass the preferred vendor ID to the view
|
||||
$data['preferredVendorId'] = $preferredVendorId; // print_r($data);die;
|
||||
// print_r($data);die;
|
||||
}
|
||||
$data['product_id'] = $product_id;
|
||||
|
||||
$data['product_id'] = $product_id;
|
||||
$productcategory = $this->ProductCategoryModel->orderBy('product_category_id')->findAll();
|
||||
$additionalProdutName = $this->additionalProductNameModal
|
||||
->where('product_id', $product_id)
|
||||
->where('isactive', 1)
|
||||
->orderBy('product_names_id', 'asc')
|
||||
->findAll();
|
||||
$data['productcategory'] = $productcategory;
|
||||
$data['additionalProdutName'] = $additionalProdutName;
|
||||
|
||||
$productcategory = $this->ProductCategoryModel->orderBy('product_category_id')->findAll();
|
||||
$additionalProdutName = $this->additionalProductNameModal
|
||||
->where('product_id', $product_id)
|
||||
->where('isactive', 1)
|
||||
->orderBy('product_names_id', 'asc')
|
||||
->findAll();
|
||||
$data['productcategory'] = $productcategory;
|
||||
$data['additionalProdutName'] = $additionalProdutName;
|
||||
|
||||
|
||||
|
||||
echo view('product_form',$data);
|
||||
echo view('product_form',$data);
|
||||
}
|
||||
|
||||
public function add_product()
|
||||
|
||||
@ -245,7 +245,7 @@ class Purchase extends BaseController
|
||||
$this->PurchaseOrderModel->update($purchase_order_id, $data);
|
||||
} else {
|
||||
|
||||
|
||||
$this->PurchaseOrderModel->insert($data);
|
||||
$purchase_order_id = $this->PurchaseOrderModel->getInsertID();
|
||||
}
|
||||
|
||||
@ -317,10 +317,10 @@ class Purchase extends BaseController
|
||||
// send purhase data through mail
|
||||
|
||||
$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;
|
||||
$_SESSION['mail_status'] = $mail_status;
|
||||
// $_SESSION['mail_status'] = $mail_status;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -419,7 +419,6 @@ class Sales extends BaseController
|
||||
->first();
|
||||
$data['items'] = $this->SalesOrderModel->getSalesOrderProductsForPdf($sales_order_id);
|
||||
|
||||
|
||||
$html = view('invoice_pdf_template', $data);
|
||||
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)
|
||||
|
||||
->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('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()
|
||||
->getResult();
|
||||
|
||||
@ -52,7 +52,8 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<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 class="form-group col-md-6">
|
||||
<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>
|
||||
</tr>
|
||||
<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: 30.3148%; height: 18px;"> </td>
|
||||
<td style="width: 18.5039%; height: 18px;"> </td>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="">
|
||||
<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>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<?php if(!$manufacturer_id) { ?>
|
||||
<li class="">
|
||||
<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>
|
||||
<?php } ?>
|
||||
</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>
|
||||
<div class="dropdown-menu ">
|
||||
<?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): ?>
|
||||
<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: ?>
|
||||
|
||||
@ -123,10 +123,9 @@
|
||||
<!-- <h4 class="header-title">Billing Address Details :</h4><br> -->
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="inputPassword4" class="col-form-label">Address<span
|
||||
class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" name="billing_address" placeholder="Address"
|
||||
value="<?= isset($sales['billing_address']) ? $sales['billing_address'] : '' ?>">
|
||||
<label for="inputPassword4" class="col-form-label">Address<span class="text-danger"></span></label>
|
||||
<textarea class="form-control" name="billing_address" placeholder="Address"><?= isset($sales['billing_address']) ? $sales['billing_address'] : '' ?></textarea>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@ -100,7 +100,8 @@
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user