diff --git a/src/views/pms/PigBatchManagementView.vue b/src/views/pms/PigBatchManagementView.vue index 3caf9a18..83f2469c 100644 --- a/src/views/pms/PigBatchManagementView.vue +++ b/src/views/pms/PigBatchManagementView.vue @@ -180,8 +180,8 @@ export default { // Calculate unassigned_pig_count for each batch using currentTotalQuantity and currentTotalPigsInPens const assembledBatches = Array.from(batchMap.values()); assembledBatches.forEach(batch => { - // Use currentTotalQuantity and currentTotalPigsInPens directly from the batch object - batch.unassigned_pig_count = (batch.currentTotalQuantity || 0) - (batch.currentTotalPigsInPens || 0); + // Use currentTotalQuantity and currentTotalPigsInPens directly from the batch object + batch.unassigned_pig_count = (batch.current_total_quantity || 0) - (batch.current_total_pigs_in_pens || 0); }); return assembledBatches; },