+
+
@@ -167,7 +175,8 @@
diff --git a/src/store/Products.ts b/src/store/Products.ts
index 359a1cd9..564104b3 100755
--- a/src/store/Products.ts
+++ b/src/store/Products.ts
@@ -197,7 +197,7 @@ export const useProducts = defineStore('Products', {
getOrdersAllCart: (state: IProductsState) => (idGasordine: string): IOrderCart[] => {
return state.orders.filter((rec: IOrderCart) => {
- if ((idGasordine && !rec.items?.some(item => item.order.idGasordine === idGasordine))) {
+ if ((idGasordine && !rec.items?.some(item => item.order && item.order.idGasordine === idGasordine))) {
return false; // Skip records not matching gasordine condition
}
return true
@@ -210,11 +210,11 @@ export const useProducts = defineStore('Products', {
getOrdersCart: (state: IProductsState) => (tipoord: number, hasGasordine: any, idGasordine: string): IOrderCart[] | undefined => {
return state.orders.filter((rec: IOrderCart) => {
- if (idGasordine && !rec.items?.some(item => item.order.idGasordine === idGasordine)) {
+ if (idGasordine && !rec.items?.some(item => item.order && item.order.idGasordine === idGasordine)) {
return false; // Skip records not matching gasordine condition
}
- if (hasGasordine && !rec.items?.some(item => item.order.idGasordine)) {
+ if (hasGasordine && !rec.items?.some(item => item.order && item.order.idGasordine)) {
return false; // Skip records not matching gasordine condition
}
@@ -1013,6 +1013,13 @@ export const useProducts = defineStore('Products', {
return qty ? qty > 0 : false
},
+ CanDeleteIfSub(myorder: IOrder): boolean {
+ let qty = myorder.quantity + myorder.quantitypreordered
+
+ qty = qty - this.qtaNextSub(myorder, myorder.product!)
+ return qty === 0
+ },
+
enableAddQty(myorder: IOrder, myproduct: IProduct): boolean {
const globalStore = useGlobalStore()
if (globalStore.site.ecomm && globalStore.site.ecomm.enablePreOrders) {
diff --git a/src/views/admin/dbop/dbop.vue b/src/views/admin/dbop/dbop.vue
index bf5f47e6..61fca5e8 100755
--- a/src/views/admin/dbop/dbop.vue
+++ b/src/views/admin/dbop/dbop.vue
@@ -650,6 +650,14 @@
>
+
+
+
+
diff --git a/src/views/ecommerce/orderInfo/orderInfo.ts b/src/views/ecommerce/orderInfo/orderInfo.ts
index cb43c29d..dc1de964 100755
--- a/src/views/ecommerce/orderInfo/orderInfo.ts
+++ b/src/views/ecommerce/orderInfo/orderInfo.ts
@@ -55,6 +55,14 @@ export default defineComponent({
const statusnow = ref(0)
const arrnumstatus = ref(
[])
const columns = ref([
+ {
+ name: 'ind',
+ required: true,
+ align: 'left',
+ label: 'Ind',
+ field: 'ind',
+ sortable: true
+ },
{
name: 'apri',
align: 'center',
@@ -104,6 +112,14 @@ export default defineComponent({
])
const columns_Admin = ref([
+ {
+ name: 'ind',
+ required: true,
+ align: 'left',
+ label: 'Ind',
+ field: 'ind',
+ sortable: true
+ },
{
name: 'apri',
align: 'center',
@@ -220,6 +236,11 @@ export default defineComponent({
rowsWithTotals.push(totals);
}
+ // Supponendo che rowsWithTotals sia il tuo array di record
+ rowsWithTotals.forEach((record: any, index: number) => {
+ record.ind = index;
+ });
+
return rowsWithTotals;
} else {
return []
diff --git a/src/views/ecommerce/orderInfo/orderInfo.vue b/src/views/ecommerce/orderInfo/orderInfo.vue
index 5ebc6ae7..76f573f9 100755
--- a/src/views/ecommerce/orderInfo/orderInfo.vue
+++ b/src/views/ecommerce/orderInfo/orderInfo.vue
@@ -198,6 +198,11 @@
+
+
+ {{index}}
+
+