aggiornamento scontistica, corretto errori
This commit is contained in:
@@ -44,7 +44,7 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
getProduct: (state: IProductsState) => (code: string): IProduct => {
|
||||
const prod = state.products.find((prod: IProduct) => prod.code === code)
|
||||
return prod ? prod : { storehouses: [] }
|
||||
return prod ? prod : { storehouses: [], scontisticas: [] }
|
||||
},
|
||||
|
||||
getCart: (state: IProductsState) => (): ICart => {
|
||||
@@ -151,6 +151,8 @@ export const useProducts = defineStore('Products', {
|
||||
active: false,
|
||||
idProducer: '',
|
||||
idStorehouses: [],
|
||||
idScontisticas: [],
|
||||
scontisticas: [],
|
||||
idProvider: '',
|
||||
producer: {},
|
||||
storehouses: [],
|
||||
@@ -191,7 +193,6 @@ export const useProducts = defineStore('Products', {
|
||||
idapp: process.env.APP_ID,
|
||||
idProduct: product._id,
|
||||
idProducer: product.idProducer,
|
||||
idProvider: product.idProvider,
|
||||
status: shared_consts.OrderStatus.IN_CART,
|
||||
price: product.price,
|
||||
after_price: product.after_price,
|
||||
@@ -201,7 +202,7 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
quantity: order.quantity,
|
||||
idStorehouse: order.idStorehouse,
|
||||
|
||||
idScontisticas: product.idScontisticas,
|
||||
}
|
||||
|
||||
if (product.storehouses.length === 1) {
|
||||
|
||||
Reference in New Issue
Block a user