Guest User

Untitled

a guest
Dec 11th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.   calculateValues(index: number) {
  3.  
  4.         this.products[index].cartId = 1;
  5.  
  6.  
  7.         if (this.products[index].unitId === undefined) {
  8.  
  9.             this.products[index].unitId = this.products[index].defaultUnitNo;
  10.  
  11.             if (this.products[index].auxiliaryUnit) {
  12.  
  13.                 this.products[index].converter = FormattingUtils.unitConverterString(this.products[index].denominator, this.products[index].auxiliaryUnit, this.products[index].numerator, this.products[index].basicUnit);
  14.  
  15.             } else {
  16.  
  17.                 this.products[index].auxiliaryUnit = this.products[index].basicUnit;
  18.  
  19.             }
  20.  
  21.  
  22.         }
  23.  
  24. changeQuantity(index, quantity) {
  25.         this.products[index].quantity = quantity;
  26.         this.products[index].quantityChanged = true;
  27.     }
Advertisement
Add Comment
Please, Sign In to add comment