diff --git a/app/Controllers/Products.php b/app/Controllers/Products.php index 5832359..3b7954c 100644 --- a/app/Controllers/Products.php +++ b/app/Controllers/Products.php @@ -59,6 +59,7 @@ class Products extends BaseController $ProductModel = new ProductModel(); + $tax= $this->request->getPost('tax')/2; $data = [ 'product_name' => $this->request->getPost('productname'), @@ -67,12 +68,13 @@ class Products extends BaseController 'serial_no' => $this->request->getPost('serial_no'), 'unit_price' => $this->request->getPost('unit_price'), 'commision_rate' => $this->request->getPost('commision_rate'), - 'sgst' => $this->request->getPost('sgst_value'), - 'cgst' => $this->request->getPost('cgst_value'), + 'sgst' => $tax, + 'cgst' => $tax, 'purchase_cost' => $this->request->getPost('purchase_cost'), - 'qty'=> $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'), + 'vendor' => $this->request->getPost('vendor'), 'isactive' => 1 , 'branch_id' => $this->session->get('logged_user_branch_id') ]; diff --git a/app/Controllers/Sales.php b/app/Controllers/Sales.php index 2872aff..05e7f43 100644 --- a/app/Controllers/Sales.php +++ b/app/Controllers/Sales.php @@ -123,7 +123,7 @@ $data['product']=$product; $status = $this->request->getPost('status'); foreach ($product_ids as $key => $product_id) { $qty = isset($quantities[$key]) ? $quantities[$key] : 0; - if ($status == 'InvoiceGenerated') { + if ($status == 'Paid') { // echo"hello";die; // Calculate updated quantity and update Product table $this->updateProductQuantity($ProductModel, $product_id, $qty); @@ -232,8 +232,8 @@ public function delete_sales_product() 'format' => 'A5', 'default_font_size' => 0, 'default_font' => '', - 'margin_left' => 2, - 'margin_right' => 2, + + // 'margin_right' => 1, 'margin_top' => 6, 'margin_bottom' => 6, 'margin_header' => 6, @@ -249,9 +249,7 @@ public function delete_sales_product() $mpdf->SetAuthor($data[0]->branch_name); $mpdf->SetCreator(''); - $htmlFooter='
= $value->company_address ?>,
= $value->company_city ?>,
= $value->company_state ?>
- = $value->company_postal_code ? " - ".$value->company_postal_code:"" ?>.
= $value->company_mobile_no ?>
| Billing Address | |||||
|---|---|---|---|---|---|
|
= $value->client_name ?> @@ -208,9 +208,9 @@ p { | |||||
| S.no | Item Name | -Qty | +Rate | - +Qty | Total | = $item->product_name ?> | -= $item->qty ?> | ₹= number_format($item->net_price, 2, '.', ',') ?> | += $item->qty ?> | +₹= number_format($item->amount, 2, '.', ',') ?> | diff --git a/app/Views/product_form.php b/app/Views/product_form.php index 0b1a5ab..be7a8bd 100644 --- a/app/Views/product_form.php +++ b/app/Views/product_form.php @@ -41,7 +41,7 @@= $value['total']; ?> | " class="edit-button"> - + " class="edit-button"> - + " class="delete-button"> | diff --git a/app/Views/sales_order_form.php b/app/Views/sales_order_form.php index 6e0749f..56aa354 100644 --- a/app/Views/sales_order_form.php +++ b/app/Views/sales_order_form.php @@ -41,7 +41,7 @@ @@ -198,7 +198,10 @@ - + + + +