- preordinabili corretti + altro

This commit is contained in:
Surya Paolo
2023-12-29 21:17:17 +01:00
parent 633b9a2d8c
commit ade9c149c5
11 changed files with 138 additions and 41 deletions

View File

@@ -69,7 +69,7 @@ class Cart {
async addqty(itemorder) {
const myitem = this.items.find((rec) => rec.order._id.toString() === itemorder._id)
if (!!myitem) {
let stepmin = myitem.order.product.minStepQty | 1;
let stepmin = myitem.order.product.minStepQty;
let step = stepmin;
if (this.isAvailableByOrder(myitem.order)) {
if (myitem.order.quantity === 0)
@@ -100,8 +100,8 @@ class Cart {
}
qtaNextSub(myorder, myproduct) {
let step = myproduct.minStepQty | 1
let minqta = myproduct.minBuyQty | 1
let step = myproduct.minStepQty
let minqta = myproduct.minBuyQty
if (myproduct.quantityAvailable > 0) {
if (myorder.quantity === minqta)
step = minqta