- newsletter: prende la lista utenti (flag news_on)

- Abilita a Tutti la Newsletter news_on
- isCommerciale
- JobsInProgress
- PCB: Corretto Totali che era a zero
This commit is contained in:
Surya Paolo
2025-05-06 18:19:03 +02:00
parent 70f1e5cbf1
commit 57cfa5858b
53 changed files with 1123 additions and 428 deletions

View File

@@ -312,14 +312,26 @@ export const useProducts = defineStore('Products', {
return mystr;
},
getTotaleOrdineByOrdId: (state: IProductsState) => (idOrdine: string, idGasordine: string, mostra_solo_ordini_produttore: boolean): number => {
getTotaleOrdineByOrdId: (state: IProductsState) => (idOrdine: string, idGasordine: string, totale: boolean, mostra_solo_ordini_produttore: boolean, status: number): number => {
const arrprod = state.orders.filter((rec: IOrderCart) => {
if (idGasordine && !rec.items?.some(item => item.order && item.order.idGasordine === idGasordine) || (rec._id !== idOrdine)) {
return false; // Skip records not matching gasordine condition
let arrprod = []
if (totale) {
arrprod = state.orders.filter((rec: IOrderCart) => {
if (idGasordine && !rec.items?.some(item => item.order && item.order.idGasordine === idGasordine) || (rec.status !== status)) {
return false; // Skip records not matching gasordine condition
}
return true;
});
} else {
arrprod = state.orders.filter((rec: IOrderCart) => {
if (idGasordine && !rec.items?.some(item => item.order && item.order.idGasordine === idGasordine) || (rec._id !== idOrdine)) {
return false; // Skip records not matching gasordine condition
}
return true;
});
}
return true;
});
let subtotalPrice = 0