parent
							
								
									dbae5b4d35
								
							
						
					
					
						commit
						0263fa5e2f
					
				|  | @ -33,6 +33,10 @@ export const registerHelpers = async function () { | ||||||
|   Handlebars.registerHelper("mult", function (lh, rh) { |   Handlebars.registerHelper("mult", function (lh, rh) { | ||||||
|     return parseFloat(lh) * parseFloat(rh); |     return parseFloat(lh) * parseFloat(rh); | ||||||
|   }); |   }); | ||||||
|  |      | ||||||
|  |   Handlebars.registerHelper("multround", function (lh, rh) { | ||||||
|  |     return Math.round((parseFloat(lh) * parseFloat(rh)) * 100) / 100; | ||||||
|  |   }) | ||||||
| 
 | 
 | ||||||
|   Handlebars.registerHelper("roundWeight", function (weight) { |   Handlebars.registerHelper("roundWeight", function (weight) { | ||||||
|     return Math.round(parseFloat(weight) / 100) / 10; |     return Math.round(parseFloat(weight) / 100) / 10; | ||||||
|  |  | ||||||
|  | @ -176,7 +176,7 @@ | ||||||
|               </h4> |               </h4> | ||||||
|             </a> |             </a> | ||||||
|           </div> |           </div> | ||||||
|           <div class="field-long">{{mult item.data.quantity.value item.data.cost}}</div> |           <div class="field-long">{{multround item.data.quantity.value item.data.cost}}</div> | ||||||
|           <div class="field-short quantity"> |           <div class="field-short quantity"> | ||||||
|             <input value="{{item.data.quantity.value}}" type="text" |             <input value="{{item.data.quantity.value}}" type="text" | ||||||
|               placeholder="0" />{{#if item.data.quantity.max}}<span>/{{item.data.quantity.max}}</span>{{/if}} |               placeholder="0" />{{#if item.data.quantity.max}}<span>/{{item.data.quantity.max}}</span>{{/if}} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue