Fixed price amount changing on save

no refs

On (un)archiving a price, the visible amount for a price fluctuated till the save was completed due to incorrect amount calculation, fixed here.
This commit is contained in:
Rishabh 2021-05-09 23:27:16 +05:30
parent fab98939fd
commit b762d3a873

View File

@ -89,12 +89,14 @@ export default class ProductController extends Controller {
@action
async archivePrice(price) {
price.active = false;
price.amount = price.amount * 100;
this.send('savePrice', price);
}
@action
async activatePrice(price) {
price.active = true;
price.amount = price.amount * 100;
this.send('savePrice', price);
}