fix: correct a typo (#1126)

This commit is contained in:
Lance Finney
2024-09-24 01:58:11 -05:00
committed by GitHub
parent 43960d1806
commit 559efb8ebf

View File

@@ -33,7 +33,7 @@ import { products } from './products';
</form> </form>
<div class="flex justify-between"> <div class="flex justify-between">
<div>SubTotal</div> <div>SubTotal</div>
<div>{{ totalWihoutVat() }} €</div> <div>{{ totalWithoutVat() }} €</div>
</div> </div>
<div class="flex justify-between"> <div class="flex justify-between">
<div>VAT (21%)</div> <div>VAT (21%)</div>
@@ -66,7 +66,7 @@ export default class OrderComponent {
quantity = toSignal(this.form.controls.quantity.valueChanges, { quantity = toSignal(this.form.controls.quantity.valueChanges, {
initialValue: this.form.getRawValue().quantity, initialValue: this.form.getRawValue().quantity,
}); });
totalWihoutVat = computed(() => Number(this.price()) * this.quantity()); totalWithoutVat = computed(() => Number(this.price()) * this.quantity());
vat = computed(() => this.totalWihoutVat() * 0.21); vat = computed(() => this.totalWithoutVat() * 0.21);
total = computed(() => this.totalWihoutVat() + this.vat()); total = computed(() => this.totalWithoutVat() + this.vat());
} }