skailan-crm
Version:
Servicio de CRM y gestión de ventas para Skailan
39 lines • 1.13 kB
JavaScript
export class QuoteItem {
id;
organizationId;
quoteId;
productId;
quantity;
unitPrice;
totalPrice;
notes;
createdAt;
updatedAt;
constructor(id, organizationId, quoteId, productId, quantity, unitPrice, totalPrice, notes, createdAt, updatedAt) {
this.id = id;
this.organizationId = organizationId;
this.quoteId = quoteId;
this.productId = productId;
this.quantity = quantity;
this.unitPrice = unitPrice;
this.totalPrice = totalPrice;
this.notes = notes;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
}
updateQuantity(newQuantity) {
this.quantity = newQuantity;
this.totalPrice = this.quantity * this.unitPrice;
this.updatedAt = new Date();
}
updateUnitPrice(newUnitPrice) {
this.unitPrice = newUnitPrice;
this.totalPrice = this.quantity * this.unitPrice;
this.updatedAt = new Date();
}
updateNotes(newNotes) {
this.notes = newNotes;
this.updatedAt = new Date();
}
}
//# sourceMappingURL=QuoteItem.js.map