feat(FE-356): Display egg production and HPP in PDF export

This commit is contained in:
rstubryan
2025-12-20 10:25:40 +07:00
parent 478e9eb541
commit 982a5d0d11
@@ -290,10 +290,10 @@ const createPDFDocument = (
<Text>{formatNumber(group.avg_weight_kg)}</Text> <Text>{formatNumber(group.avg_weight_kg)}</Text>
</View> </View>
<View style={[pdfStyles.tableCellRight, { flex: 1 }]}> <View style={[pdfStyles.tableCellRight, { flex: 1 }]}>
<Text>-</Text> <Text>{formatNumber(group.egg_production_pieces)}</Text>
</View> </View>
<View style={[pdfStyles.tableCellRight, { flex: 1 }]}> <View style={[pdfStyles.tableCellRight, { flex: 1 }]}>
<Text>-</Text> <Text>{formatNumber(group.egg_production_kg)}</Text>
</View> </View>
<View style={[pdfStyles.tableCell, { flex: 1.5 }]}> <View style={[pdfStyles.tableCell, { flex: 1.5 }]}>
<Text> <Text>
@@ -322,16 +322,10 @@ const createPDFDocument = (
<Text>-</Text> <Text>-</Text>
</View> </View>
<View style={[pdfStyles.tableCellRight, { flex: 1 }]}> <View style={[pdfStyles.tableCellRight, { flex: 1 }]}>
<Text> <Text>{formatCurrency(group.hpp_rp)}</Text>
{formatCurrency(
group.remaining_chicken_birds > 0
? group.hpp_rp / group.remaining_chicken_birds
: 0
)}
</Text>
</View> </View>
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}> <View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
<Text>-</Text> <Text>{formatCurrency(group.egg_hpp_rp_per_kg)}</Text>
</View> </View>
<View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}> <View style={[pdfStyles.tableCellRight, { flex: 1.2 }]}>
<Text>{formatCurrency(group.remaining_value_rp)}</Text> <Text>{formatCurrency(group.remaining_value_rp)}</Text>