Item Fix
This commit is contained in:
parent
cace9c396a
commit
7a08ac374a
@ -480,7 +480,7 @@
|
||||
},
|
||||
showProduct() {
|
||||
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);
|
||||
return product ? product : {};
|
||||
@ -843,6 +843,24 @@
|
||||
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() {
|
||||
// Your currency conversion logic here
|
||||
console.log('Selected currency:', this.currency);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user