Item Fix
This commit is contained in:
parent
cace9c396a
commit
7a08ac374a
@ -480,7 +480,7 @@
|
|||||||
},
|
},
|
||||||
showProduct() {
|
showProduct() {
|
||||||
if (!this.selectedProduct) {
|
if (!this.selectedProduct) {
|
||||||
return []; // No company selected, return empty list
|
return []; // No company selected, return empty listx`
|
||||||
}
|
}
|
||||||
const product = this.products.find(c => c.productId === this.selectedProduct);
|
const product = this.products.find(c => c.productId === this.selectedProduct);
|
||||||
return product ? product : {};
|
return product ? product : {};
|
||||||
@ -843,6 +843,24 @@
|
|||||||
console.error('Error fetching currency data:', error);
|
console.error('Error fetching currency data:', error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
calculateWarrantyEndDate() {
|
||||||
|
// Check if DODate and warranty are valid
|
||||||
|
if (!this.DODate || isNaN(Date.parse(this.DODate))) {
|
||||||
|
this.EndWDate = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const DODates = new Date(this.DODate);
|
||||||
|
const warrantyMonth = parseInt(this.warranty);
|
||||||
|
|
||||||
|
// Ensure warranty is a valid number
|
||||||
|
if (!isNaN(warrantyMonth)) {
|
||||||
|
DODates.setMonth(DODates.getMonth() + warrantyMonth);
|
||||||
|
this.EndWDate = DODates.toISOString().split('T')[0];
|
||||||
|
} else {
|
||||||
|
this.EndWDate = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
convertCurrency() {
|
convertCurrency() {
|
||||||
// Your currency conversion logic here
|
// Your currency conversion logic here
|
||||||
console.log('Selected currency:', this.currency);
|
console.log('Selected currency:', this.currency);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user