susee:add decimal point

This commit is contained in:
suseendhiran17 2023-07-06 16:32:04 +05:30
parent 8242deb4c6
commit 9e0cdc8d6c
5 changed files with 251 additions and 74 deletions

View File

@ -50,7 +50,7 @@
</div>
<div class="col-8 col-lg-2 mt-4">
<div class="quantity">
<div class="d-flex"><span class="price-symbol">$</span><span class="price"><?= $value['cost']; ?></span><span>x</span></div>
<div class="d-flex"><span class="price-symbol">$</span><span class="price"><?php $number = $value['cost'];echo number_format($number, 2, '.', ''); ?></span><span>x</span></div>
<div class="qty-no">
<button type="button" class="minus"><i class="fa fa-minus"></i></button>
@ -65,7 +65,7 @@
</div>
</div>
<div class="col-4 col-lg-2 mt-4 text-right-price">
<div class="product-price <?php echo $key; ?>">$<?= $value['cost'] * $pack_id[$key]['count'] ?></div>
<div class="product-price <?php echo $key; ?>">$<?php $number = $value['cost'] * $pack_id[$key]['count'];echo number_format($number, 2, '.', ''); ?></div>
<input id="cost_<?php echo $key; ?>" value="<?= $value['cost'] ?>" type="hidden">
<div class="remove-product"><a href="<?= base_url('/remove_product/').md5($pack_id[$key]['id']); ?>">Remove</a></div>
</div>
@ -86,7 +86,7 @@
<div class="subtotal-label">Subtotal</div>
</div>
<div class="col-9">
<div class="subtotal-price text-right-price subtotal"><span class="price-symbol">$</span><?= $cost_sum; ?></div>
<div class="subtotal-price text-right-price subtotal"><span class="price-symbol">$</span><?php $number = $cost_sum;echo number_format($number, 2, '.', ''); ?></div>
</div>
</div>
@ -101,7 +101,7 @@
</div>
<div class="col-3 col-lg-2 text-end">
<input id="gst" value="<?= $gst[0]['value'] ?>" type="hidden">
<div class="subtotal-price text-right-price gst"><span class="price-symbol">$</span><?= $cost_sum * $gst[0]['value'] / 100; ?></div>
<div class="subtotal-price text-right-price gst"><span class="price-symbol">$</span><?php $number = $cost_sum * $gst[0]['value'] / 100; echo number_format($number, 2, '.', ''); ?></div>
</div>
<div class="col-6 col-lg-6">
@ -125,7 +125,7 @@
<div class="subtotal-label">Total</div>
</div>
<div class="col-9">
<div class="subtotal-price text-right-price total"><span class="price-symbol">$</span><?= round($cost_sum + $cost_sum * $pst[0]['value'] / 100 + $cost_sum * $gst[0]['value'] / 100 , 2 ) ?></div>
<div class="subtotal-price text-right-price total"><span class="price-symbol">$</span><?php $number = $cost_sum + $cost_sum * $pst[0]['value'] / 100 + $cost_sum * $gst[0]['value'] / 100 ;echo number_format($number, 2, '.', ''); ?></div>
</div>
</div>
<?php } ?>

View File

@ -391,9 +391,9 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
<div class="row evo">
<div class="col-lg-8 col-8"><div class="product-name"><?php echo $row['package_name']." ($".$row['cost']." x ".$row['count'].")"; ?></div></div>
<div class="col-lg-8 col-8"><div class="product-name"><?php echo $row['package_name']." ($".number_format($row['cost'], 2, '.', '')." x ".$row['count'].")"; ?></div></div>
<div class="col-lg-4 col-4 text-end"><div class="product-price"><span class="price-symbol">$</span><?php echo $row['cost'] * $row['count']; ?></div></div>
<div class="col-lg-4 col-4 text-end"><div class="product-price"><span class="price-symbol">$</span><?php $number = $row['cost'] * $row['count'];echo number_format($number, 2, '.', ''); ?></div></div>
</div>
@ -403,7 +403,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
<div class="col-lg-6 col-6"><p>Items (<?= $item_count; ?>) : </p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?= $amount; ?></p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?php echo number_format($amount, 2, '.', ''); ?></p></div>
</div>
<?php if($pst != 0){ ?>
@ -411,7 +411,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
<div class="col-lg-6 col-6"><p>PST : </p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?= round($amount * $pst / 100 , 2); ?></p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?php $number = $amount * $pst / 100; echo number_format($number, 2, '.', '');?></p></div>
</div>
<?php } ?>
@ -419,7 +419,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
<div class="col-lg-6 col-6"><p>GST : </p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?= round($amount * $gst / 100 , 2); ?></p></div>
<div class="col-lg-6 col-6 text-end"><p><span class="price-symbol">$</span><?php $number = $amount * $gst / 100 ; echo number_format($number, 2, '.', '');?></p></div>
</div>
@ -427,7 +427,7 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
<div class="col-lg-6 col-6"><h5>Order Total : </h5></div>
<div class="col-lg-6 col-6 text-end"><div class="product-total"><span class="price-symbol">$</span><?= round( ( $amount + (($amount * ($gst + $pst) ) / 100) ) , 2 ); ?></div></div>
<div class="col-lg-6 col-6 text-end"><div class="product-total"><span class="price-symbol">$</span><?php $number =$amount + (($amount * ($gst + $pst) ) / 100); echo number_format($number, 2, '.', '');?></div></div>
</div>

View File

@ -67,7 +67,7 @@
<img src="<?= base_url()."/public"; ?>/assets/member_images/cart-icon.png" alt="" width="70" height="70">
</div>
<div class="col-10 col-lg-10">
<div class="product-name"><?php echo $val['package_name']." (".$val['cost']." x ".$val['pack_count'].")"; ?></div>
<div class="product-name"><?php echo $val['package_name']." (".number_format($val['cost'], 2, '.', '')." x ".$val['pack_count'].")"; ?></div>
<div class="credits-number"><?php echo $val['credit_points']; ?> Credits</div>
<!-- <div class="credit-point">20+4 Credits Extra*</div>
@ -78,7 +78,7 @@
</div>
<div class="col-12 col-lg-6 d-flex justify-content-end align-items-start">
<div class="order-total"><span class="price-symbol">$</span><?php echo $val['costSum']; ?></div>
<div class="order-total"><span class="price-symbol">$</span><?php echo number_format($val['costSum'], 2, '.', ''); ?></div>
</div>
</div>
<?php } ?>
@ -91,7 +91,7 @@
<div class="subtotal label">Subtotal</div>
</div>
<div class="col-6 col-lg-6 text-end">
<div class="subtotal"><span class="price-symbol">$</span><?= $Subtotal; ?></div>
<div class="subtotal"><span class="price-symbol">$</span><?= number_format($Subtotal, 2, '.', ''); ?></div>
</div>
</div>
@ -104,7 +104,7 @@
<div class="taxes pst label">GST :</div>
</div>
<div class="col-3 col-lg-2 text-end">
<div class="taxes pst"><span class="price-symbol">$</span><?= round($Subtotal * $gst / 100 , 2); ?></div>
<div class="taxes pst"><span class="price-symbol">$</span><?php $number = $Subtotal * $gst / 100;echo number_format($number, 2, '.', ''); ?></div>
</div>
<?php if($pst != 0){?>
@ -115,7 +115,7 @@
<div class="taxes gst label">PST :</div>
</div>
<div class="col-lg-2 text-end">
<div class="taxes gst"><span class="price-symbol">$</span><?= round($Subtotal * $pst / 100 , 2); ?></div>
<div class="taxes gst"><span class="price-symbol">$</span><?php $number = $Subtotal * $pst / 100;echo number_format($number, 2, '.', ''); ?></div>
</div>
<?php }?>
@ -127,7 +127,7 @@
<div class="order-total label">Total</div>
</div>
<div class="col-6 col-lg-6 text-end">
<div class="order-total"><span class="price-symbol">$</span><?= round( ( $Subtotal + (($Subtotal * ($gst + $pst) ) / 100) ) , 2 ); ?></div>
<div class="order-total"><span class="price-symbol">$</span><?php $number = $Subtotal + (($Subtotal * ($gst + $pst) ) / 100) ;echo number_format($number, 2, '.', ''); ?></div>
</div>
</div>
</div>

280
composer.lock generated
View File

@ -126,25 +126,26 @@
},
{
"name": "brick/math",
"version": "0.11.0",
"version": "0.9.3",
"source": {
"type": "git",
"url": "https://github.com/brick/math.git",
"reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478"
"reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/brick/math/zipball/0ad82ce168c82ba30d1c01ec86116ab52f589478",
"reference": "0ad82ce168c82ba30d1c01ec86116ab52f589478",
"url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae",
"reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae",
"shasum": ""
},
"require": {
"php": "^8.0"
"ext-json": "*",
"php": "^7.1 || ^8.0"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^9.0",
"vimeo/psalm": "5.0.0"
"phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0",
"vimeo/psalm": "4.9.2"
},
"type": "library",
"autoload": {
@ -169,15 +170,19 @@
],
"support": {
"issues": "https://github.com/brick/math/issues",
"source": "https://github.com/brick/math/tree/0.11.0"
"source": "https://github.com/brick/math/tree/0.9.3"
},
"funding": [
{
"url": "https://github.com/BenMorel",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/brick/math",
"type": "tidelift"
}
],
"time": "2023-01-15T23:15:59+00:00"
"time": "2021-08-15T20:50:18+00:00"
},
{
"name": "codeigniter4/framework",
@ -496,16 +501,16 @@
},
{
"name": "google/apiclient-services",
"version": "v0.305.0",
"version": "v0.307.0",
"source": {
"type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git",
"reference": "6731fd0d3e2f1ff2794f36108b55c0a3480edf3d"
"reference": "5f7d451aa912355dda61aa29ac3a4afa8b252467"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/6731fd0d3e2f1ff2794f36108b55c0a3480edf3d",
"reference": "6731fd0d3e2f1ff2794f36108b55c0a3480edf3d",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/5f7d451aa912355dda61aa29ac3a4afa8b252467",
"reference": "5f7d451aa912355dda61aa29ac3a4afa8b252467",
"shasum": ""
},
"require": {
@ -534,9 +539,9 @@
],
"support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues",
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.305.0"
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.307.0"
},
"time": "2023-06-07T02:11:36+00:00"
"time": "2023-07-01T01:02:13+00:00"
},
{
"name": "google/auth",
@ -1314,20 +1319,20 @@
},
{
"name": "psr/cache",
"version": "3.0.0",
"version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/cache.git",
"reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf"
"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
"reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf",
"url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8",
"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
"shasum": ""
},
"require": {
"php": ">=8.0.0"
"php": ">=5.3.0"
},
"type": "library",
"extra": {
@ -1347,7 +1352,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "https://www.php-fig.org/"
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for caching libraries",
@ -1357,9 +1362,9 @@
"psr-6"
],
"support": {
"source": "https://github.com/php-fig/cache/tree/3.0.0"
"source": "https://github.com/php-fig/cache/tree/master"
},
"time": "2021-02-03T23:26:27+00:00"
"time": "2016-08-06T20:24:11+00:00"
},
{
"name": "psr/http-client",
@ -1707,23 +1712,25 @@
},
{
"name": "ramsey/uuid",
"version": "4.7.4",
"version": "4.2.3",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
"reference": "60a4c63ab724854332900504274f6150ff26d286"
"reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286",
"reference": "60a4c63ab724854332900504274f6150ff26d286",
"url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
"reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df",
"shasum": ""
},
"require": {
"brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11",
"brick/math": "^0.8 || ^0.9",
"ext-json": "*",
"php": "^8.0",
"ramsey/collection": "^1.2 || ^2.0"
"php": "^7.2 || ^8.0",
"ramsey/collection": "^1.0",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-php80": "^1.14"
},
"replace": {
"rhumsaa/uuid": "self.version"
@ -1735,23 +1742,24 @@
"doctrine/annotations": "^1.8",
"ergebnis/composer-normalize": "^2.15",
"mockery/mockery": "^1.3",
"moontoast/math": "^1.1",
"paragonie/random-lib": "^2",
"php-mock/php-mock": "^2.2",
"php-mock/php-mock-mockery": "^1.3",
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpbench/phpbench": "^1.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-mockery": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpunit/phpunit": "^8.5 || ^9",
"ramsey/composer-repl": "^1.4",
"slevomat/coding-standard": "^8.4",
"slevomat/coding-standard": "^7.0",
"squizlabs/php_codesniffer": "^3.5",
"vimeo/psalm": "^4.9"
},
"suggest": {
"ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
"ext-ctype": "Enables faster processing of character classification using ctype functions.",
"ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
"ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
"paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
@ -1759,6 +1767,9 @@
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "4.x-dev"
},
"captainhook": {
"force-install": true
}
@ -1783,7 +1794,7 @@
],
"support": {
"issues": "https://github.com/ramsey/uuid/issues",
"source": "https://github.com/ramsey/uuid/tree/4.7.4"
"source": "https://github.com/ramsey/uuid/tree/4.2.3"
},
"funding": [
{
@ -1795,7 +1806,7 @@
"type": "tidelift"
}
],
"time": "2023-04-15T23:01:58+00:00"
"time": "2021-09-25T23:10:38+00:00"
},
{
"name": "square/square",
@ -1856,25 +1867,25 @@
},
{
"name": "symfony/deprecation-contracts",
"version": "v3.0.2",
"version": "v2.5.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c"
"reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
"reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66",
"shasum": ""
},
"require": {
"php": ">=8.0.2"
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.0-dev"
"dev-main": "2.5-dev"
},
"thanks": {
"name": "symfony/contracts",
@ -1903,7 +1914,7 @@
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2"
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2"
},
"funding": [
{
@ -1919,7 +1930,172 @@
"type": "tidelift"
}
],
"time": "2022-01-02T09:55:41+00:00"
"time": "2022-01-02T09:53:40+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a",
"reference": "5bbc823adecdae860bb64756d639ecfec17b050a",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.27.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.27-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2022-11-03T14:55:06+00:00"
},
{
"name": "symfony/polyfill-php81",
@ -2310,16 +2486,16 @@
},
{
"name": "nikic/php-parser",
"version": "v4.15.5",
"version": "v4.16.0",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e"
"reference": "19526a33fb561ef417e822e85f08a00db4059c17"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e",
"reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17",
"reference": "19526a33fb561ef417e822e85f08a00db4059c17",
"shasum": ""
},
"require": {
@ -2360,9 +2536,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5"
"source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0"
},
"time": "2023-05-19T20:20:00+00:00"
"time": "2023-06-25T14:52:30+00:00"
},
{
"name": "phar-io/manifest",

View File

@ -44,23 +44,24 @@ $(".input-text").change(function(){
id = $(this).attr("id");
url = $('#url').val();
var cost = $('#cost_'+id+'').val();
$('.'+id+'').html('$'+$('#'+id+'').val() * cost+'');
val = $('#'+id+'').val() * cost;
$('.'+id+'').html('$'+val.toFixed(2)+'');
// console.log($('.0').text().replace("$", ""));
subtotal = Number($('.0').text().replace("$", "")) + Number($('.1').text().replace("$", ""));
$('.subtotal').html('$'+subtotal+'');
$('.subtotal').html('$'+subtotal.toFixed(2)+'');
if ($('#pst').val())
{
pst = subtotal * $('#pst').val() / 100;
$('.pst').html('$'+pst+'');
$('.pst').html('$'+pst.toFixed(2)+'');
}
else
{
pst = 0;
}
gst = subtotal * $('#gst').val() / 100;
$('.gst').html('$'+gst+'');
$('.gst').html('$'+gst.toFixed(2)+'');
total = subtotal + pst + gst;
$('.total').html('$'+total+'')
$('.total').html('$'+total.toFixed(2)+'')
$.ajax({