FIX_PDF
This commit is contained in:
parent
be3216ce2e
commit
378dcbba0b
@ -112,6 +112,7 @@ class Jobcard extends BaseController
|
||||
/** CALCULATE LABOURCOST WITH TAX */
|
||||
$totalAmount = 0;
|
||||
$totalTax = 0;
|
||||
$hsn_sac = 0;
|
||||
|
||||
// Calculate total amount and total tax
|
||||
foreach ($labourcost as $product) {
|
||||
@ -150,6 +151,8 @@ class Jobcard extends BaseController
|
||||
//asign values to same array
|
||||
$data['job_card_products'][$key]['tax_amount'] = $tax;
|
||||
$data['job_card_products'][$key]['total_amount'] = $total;
|
||||
$data['job_card_products'][$key]['taxable_value'] = $amount;
|
||||
$data['job_card_products'][$key]['hsn_sac'] = $hsn_sac;
|
||||
|
||||
//calculate sum
|
||||
$data['sum_of_tax'] += $tax;
|
||||
|
||||
@ -83,7 +83,7 @@ class JobcardModel extends Model
|
||||
|
||||
public function get_jobcard_products_details($job_id)
|
||||
{
|
||||
$this->select('job_card_product.*, products.product_name, products.per');
|
||||
$this->select('job_card_product.*, products.product_name, products.per,products.hsn_sac');
|
||||
$this->join('job_card_product', 'job_card_product.job_card_id = job_card.job_card_id');
|
||||
$this->join('products', 'products.product_id = job_card_product.product_id');
|
||||
$this->where('job_card_product.is_active', 1);
|
||||
|
||||
@ -46,7 +46,7 @@ class SalesOrderModel extends Model
|
||||
$result = $this->db->table('sales_order_product')
|
||||
->where('sales_order_product.sales_order_id', $sales_order_id)
|
||||
->join('products', 'products.product_id = sales_order_product.product_id')
|
||||
->select('sales_order_product.*, products.product_name, products.per, products.ml')
|
||||
->select('sales_order_product.*, products.product_name, products.per, products.ml,products.hsn_sac')
|
||||
->get()
|
||||
->getResult();
|
||||
|
||||
|
||||
16
app/Views/invoice_pdf_template.php
Normal file → Executable file
16
app/Views/invoice_pdf_template.php
Normal file → Executable file
@ -88,11 +88,13 @@
|
||||
<thead>
|
||||
|
||||
<tr style="height: 36px; border: 1px solid lightgrey;background: lightgray; font-size: x-small;">
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>No</strong></td>
|
||||
<td style="width: 5%; height: 36px; text-align: center; font-size: small;"><strong>No</strong></td>
|
||||
<td style="width: 20%; height: 36px; text-align: left; font-size: small;"><strong>Description</strong></td>
|
||||
<td style="width: 5%; height: 36px; text-align: center; font-size: small;"><strong>HSN/SAC</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>Rate(₹)</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>Qty</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>Per</strong></td>
|
||||
<td style="width: 5%; height: 36px; text-align: center; font-size: small;"><strong>Qty</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>Taxable Value</strong></td>
|
||||
<td style="width: 5%; height: 36px; text-align: center; font-size: small;"><strong>Per</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>GST(%)</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: 12px;"><strong>Total Tax(₹)</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: right; font-size: small;"><strong>Total(₹)</strong></td>
|
||||
@ -114,9 +116,11 @@
|
||||
<tr >
|
||||
<td style="width: 10%; padding:10px; text-align: center; font-size: small;"> <?= $key+1; ?> </td>
|
||||
<td style="width: 10%; padding:10px; font-size: small;"> <?= $value->product_name; ?> </td>
|
||||
<td style="width: 10%; padding:10px; text-align: center; font-size: small;"><?php echo $value->net_price; ?></td>
|
||||
<td style="width: 10%; padding:10px; text-align: center; font-size: small;"><?= $value->qty; ?></td>
|
||||
<td style="width: 10%; padding:10px; text-align: center; font-size: small;"><?= $value->per; ?></td>
|
||||
<td style="width: 10%; padding:10px; text-align: center; font-size: small;"><?= $value->hsn_sac; ?></td>
|
||||
<td style="width: 10%; padding:10px; text-align: center; font-size: small;"><?= $value->net_price; ?></td>
|
||||
<td style="width: 5%; padding:10px; text-align: center; font-size: small;"><?= $value->qty; ?></td>
|
||||
<td style="width: 10%; padding:10px; text-align: center; font-size: small;"><?= ($value->net_price * $value->qty); ?></td>
|
||||
<td style="width: 5%; padding:10px; text-align: center; font-size: small;"><?= $value->per; ?></td>
|
||||
<td style="width: 10%; padding:10px; text-align: center; font-size: small;"><?= $value->tax; ?></td>
|
||||
<td style="width: 10%; padding:10px; text-align: center; font-size: small;"> <?php echo number_format($tax, 2, '.', ''); ?></td>
|
||||
<td style="width: 10%; padding:10px; text-align: right; font-size: small;"><?php echo number_format($value->amount, 2, '.', ''); ?></td>
|
||||
|
||||
@ -89,10 +89,12 @@
|
||||
|
||||
<tr style="height: 36px; border: 1px solid lightgrey;background: lightgray; font-size: x-small;">
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>No</strong></td>
|
||||
<td style="width: 20%; height: 36px; text-align: left; font-size: small;"><strong>Description</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: left; font-size: small;"><strong>Description</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: left; font-size: small;"><strong>HSN/SAC</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>Rate(₹)</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>Qty</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>Per</strong></td>
|
||||
<td style="width: 5%; height: 36px; text-align: center; font-size: small;"><strong>Qty</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>Taxable Value</strong></td>
|
||||
<td style="width: 5%; height: 36px; text-align: center; font-size: small;"><strong>Per</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: small;"><strong>GST(%)</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: center; font-size: 12px;"><strong>Total Tax(₹)</strong></td>
|
||||
<td style="width: 10%; height: 36px; text-align: right; font-size: small;"><strong>Total(₹)</strong></td>
|
||||
@ -105,12 +107,14 @@
|
||||
<?php foreach ($job_card_products as $key => $value) { ?>
|
||||
|
||||
<tr >
|
||||
<td style="width: 10%; height: 5px;text-align: center; font-size: small;"> <?= $key+1; ?> </td>
|
||||
<td style="width: 10%; height: 5px; font-size: small;"> <?= $value['product_name']; ?> </td>
|
||||
<td style="width: 5%; height: 5px;text-align: center; font-size: small;"> <?= $key+1; ?> </td>
|
||||
<td style="width: 20%; height: 5px; font-size: small;"> <?= $value['product_name']; ?> </td>
|
||||
<td style="width: 5%; height: 5px;text-align: center; font-size: small;"> <?= $value['hsn_sac']; ?> </td>
|
||||
<td style="width: 10%; height: 5px;text-align: center; font-size: small;"><?php echo $value['amount']; ?></td>
|
||||
<td style="width: 10%; height: 5px;text-align: center; font-size: small;"><?= $value['qty']; ?></td>
|
||||
<td style="width: 10%; height: 5px;text-align: center; font-size: small;"><?= $value['per']; ?></td>
|
||||
<td style="width: 10%; height: 5px;text-align: center; font-size: small;"><?= $value['tax']; ?></td>
|
||||
<td style="width: 5%; height: 5px;text-align: center; font-size: small;"><?= $value['qty']; ?></td>
|
||||
<td style="width: 10%; height: 5px;text-align: center; font-size: small;"><?= $value['taxable_value'] ; ?></td>
|
||||
<td style="width: 5%; height: 5px;text-align: center; font-size: small;"><?= $value['per']; ?></td>
|
||||
<td style="width: 10%; height: 5px;text-align: center; font-size: small;"><?= number_format($value['tax'], 2, '.', ''); ?></td>
|
||||
<td style="width: 10%; height: 5px;text-align: center; font-size: small;"> <?php echo number_format($value['tax_amount'], 2, '.', ''); ?></td>
|
||||
<td style="width: 10%; height: 5px;text-align: right; font-size: small;"><?php echo number_format($value['total_amount'], 2, '.', ''); ?></td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user