Merge code : GWM
This commit is contained in:
parent
3e06b1da7b
commit
6da79d08e3
@ -151,12 +151,15 @@ class Products extends BaseController
|
|||||||
$ProductModel = new ProductModel();
|
$ProductModel = new ProductModel();
|
||||||
|
|
||||||
$tax= $this->request->getPost('tax')/2;
|
$tax= $this->request->getPost('tax')/2;
|
||||||
// print_r($this->request->getPost());die;
|
$ml = 0; $box = 0; $qty_per_box = 0; $barrel = 0; $ltr_per_barrel = 0;
|
||||||
|
if ($this->request->getPost('per') == 'ml') {
|
||||||
if ($this->request->getPost('per') != 'ml') {
|
|
||||||
$ml = 0;
|
|
||||||
}else{
|
|
||||||
$ml = $this->request->getPost('ml');
|
$ml = $this->request->getPost('ml');
|
||||||
|
}else if ($this->request->getPost('per') == 'box'){
|
||||||
|
$box = $this->request->getPost('box');
|
||||||
|
$qty_per_box = $this->request->getPost('qty_per_box');
|
||||||
|
}else if ($this->request->getPost('per') == 'barrel'){
|
||||||
|
$barrel = $this->request->getPost('barrel');
|
||||||
|
$ltr_per_barrel = $this->request->getPost('ltr_per_barrel');
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
@ -170,7 +173,6 @@ class Products extends BaseController
|
|||||||
'cgst' => $tax,
|
'cgst' => $tax,
|
||||||
'purchase_cost' => $this->request->getPost('purchase_cost'),
|
'purchase_cost' => $this->request->getPost('purchase_cost'),
|
||||||
'qty_stock'=> $this->request->getPost('qty_in_stock'),
|
'qty_stock'=> $this->request->getPost('qty_in_stock'),
|
||||||
'qty_in_demand'=> $this->request->getPost('qty_in_demand'),
|
|
||||||
'description' => $this->request->getPost('description'),
|
'description' => $this->request->getPost('description'),
|
||||||
'vendor' =>json_encode( $this->request->getPost('vendor')),
|
'vendor' =>json_encode( $this->request->getPost('vendor')),
|
||||||
'purchase_order_level' => $this->request->getPost('purchase_order_level'),
|
'purchase_order_level' => $this->request->getPost('purchase_order_level'),
|
||||||
@ -188,7 +190,11 @@ class Products extends BaseController
|
|||||||
|
|
||||||
'total_amount' => $this->request->getPost('total_amount'),
|
'total_amount' => $this->request->getPost('total_amount'),
|
||||||
'per' => $this->request->getPost('per'),
|
'per' => $this->request->getPost('per'),
|
||||||
'ml' => $ml
|
'ml' => $ml,
|
||||||
|
'box' => $box,
|
||||||
|
'qty_per_box' => $qty_per_box,
|
||||||
|
'barrel' => $barrel,
|
||||||
|
'ltr_per_barrel' => $ltr_per_barrel
|
||||||
];
|
];
|
||||||
|
|
||||||
$product_id = $this->request->getPost('product_id');
|
$product_id = $this->request->getPost('product_id');
|
||||||
|
|||||||
@ -9,7 +9,7 @@ class ProductModel extends Model
|
|||||||
'quality','product_name','branch_id','prefered_vendor','product_category','mfr_part_no','purchase_order_level',
|
'quality','product_name','branch_id','prefered_vendor','product_category','mfr_part_no','purchase_order_level',
|
||||||
'unit_price','commision_rate','sgst','cgst','purchase_cost','usage_unit','vendor','qty_stock','reorder_level',
|
'unit_price','commision_rate','sgst','cgst','purchase_cost','usage_unit','vendor','qty_stock','reorder_level',
|
||||||
'handler','qty_in_demand','product_image','description','specification','hsn_sac','isactive','total_amount',
|
'handler','qty_in_demand','product_image','description','specification','hsn_sac','isactive','total_amount',
|
||||||
'per','ml'];
|
'per','ml','box','qty_per_box','barrel','ltr_per_barrel'];
|
||||||
|
|
||||||
|
|
||||||
public function getTax()
|
public function getTax()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user