diff --git a/app/Controllers/Jobcard.php b/app/Controllers/Jobcard.php index ac25baa..72e2a16 100755 --- a/app/Controllers/Jobcard.php +++ b/app/Controllers/Jobcard.php @@ -940,7 +940,9 @@ class Jobcard extends BaseController } $product['qty'] = $pt->qty; $product['tax'] = $pt->tax; - $product['amount'] = $pt->amount / $pt->qty; //(isset($rework) ? 0 : $pt->amount / $pt->qty ); + $product['amount'] = $pt->amount; + // $product['amount'] = $pt->amount / $pt->qty; + //(isset($rework) ? 0 : $pt->amount / $pt->qty ); if(empty($pt->id)) { $this->JobcardProductModel->insert($product); $job_card_product_id = $this->JobcardProductModel->getInsertID(); diff --git a/app/Views/job_card_form.php b/app/Views/job_card_form.php index 75a74f3..965c709 100755 --- a/app/Views/job_card_form.php +++ b/app/Views/job_card_form.php @@ -709,7 +709,7 @@ $(document).ready(async function() { newRow += ''; newRow += '' + '' + - '' + + '' + ''; newRow += ''; @@ -1562,7 +1562,7 @@ $(document).ready(function() { var taxAmount = final_amount-amt; console.log(taxAmount); - $(row).find('.tax-amount').val(parseFloat(taxAmount).toFixed(2)).attr('value', taxAmount.toFixed(2)); + $(row).find('.total-tax-amount').val(parseFloat(taxAmount).toFixed(2)).attr('value', taxAmount.toFixed(2)); var rate = amt / quantity; @@ -1676,18 +1676,7 @@ $(document).ready(function() { updateCalculations(); }); - //gwm - $(document).on('keyup change', '.rate-d-only', function() { - alert(); - - className = $(this).closest('tr').attr('class'); - if(className == 'product') { - calculateAmount($(this).closest('tr'), $(this).closest('tr').attr('class'),'child'); - } - - // Calculate amount and update amount input field - updateCalculations(); - }); +