diff --git a/pages/createDocument/edit/[[id]].vue b/pages/createDocument/edit/[[id]].vue index 4669c20..86dd9d2 100644 --- a/pages/createDocument/edit/[[id]].vue +++ b/pages/createDocument/edit/[[id]].vue @@ -730,20 +730,22 @@ const documentReport = computed(() => { if(service.personalComposition) { service.personalComposition.forEach(entry => { - totalHoursFromServices.total += entry.quantity + totalHoursFromServices.total += entry.quantity * row.quantity - totalHoursFromServices.totalPurchasePrice += entry.quantity * entry.purchasePrice - totalHoursSellingPrice += entry.quantity * entry.price + totalHoursFromServices.totalPurchasePrice += entry.quantity * entry.purchasePrice * row.quantity + totalHoursSellingPrice += entry.quantity * entry.price * row.quantity if(totalHoursFromServices.byName[entry.name]) { - totalHoursFromServices.byName[entry.name] += entry.quantity + totalHoursFromServices.byName[entry.name] += entry.quantity * row.quantity } else { - totalHoursFromServices.byName[entry.name] = entry.quantity + totalHoursFromServices.byName[entry.name] = entry.quantity * row.quantity } }) + } else { + //totalHoursSellingPrice += service.sellingPriceComposed.totalWorker * row.quantity } //totalProductsPurchasePrice += product.purchasePrice * row.quantity