mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 18:40:34 -05:00
@@ -13,9 +13,31 @@ import format from '../spreadsheet/format';
|
||||
import NamespaceContext from '../spreadsheet/NamespaceContext';
|
||||
import useSheetValue from '../spreadsheet/useSheetValue';
|
||||
|
||||
function ToBudget({ toBudget }) {
|
||||
let budgetAmount = useSheetValue(toBudget);
|
||||
return (
|
||||
<View style={{ alignItems: 'center', marginBottom: 15 }}>
|
||||
<Text style={styles.text}>
|
||||
{budgetAmount < 0 ? 'Overbudget:' : 'To budget:'}
|
||||
</Text>
|
||||
<Text
|
||||
style={[
|
||||
styles.text,
|
||||
{
|
||||
fontWeight: '600',
|
||||
fontSize: 22,
|
||||
color: budgetAmount < 0 ? colors.r4 : colors.n1,
|
||||
},
|
||||
]}
|
||||
>
|
||||
{format(budgetAmount, 'financial')}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BudgetSummary({ month, modalProps }) {
|
||||
const prevMonthName = monthUtils.format(monthUtils.prevMonth(month), 'MMM');
|
||||
const budgetAmount = useSheetValue(rolloverBudget.toBudget);
|
||||
|
||||
return (
|
||||
<Modal title="Budget Details" {...modalProps} animate>
|
||||
@@ -74,23 +96,7 @@ function BudgetSummary({ month, modalProps }) {
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={{ alignItems: 'center', marginBottom: 15 }}>
|
||||
<Text style={styles.text}>
|
||||
{budgetAmount < 0 ? 'Overbudget:' : 'To budget:'}
|
||||
</Text>
|
||||
<Text
|
||||
style={[
|
||||
styles.text,
|
||||
{
|
||||
fontWeight: '600',
|
||||
fontSize: 22,
|
||||
color: budgetAmount < 0 ? colors.r4 : colors.n1,
|
||||
},
|
||||
]}
|
||||
>
|
||||
{format(budgetAmount, 'financial')}
|
||||
</Text>
|
||||
</View>
|
||||
<ToBudget toBudget={rolloverBudget.toBudget} />
|
||||
|
||||
<View
|
||||
style={{
|
||||
|
||||
6
upcoming-release-notes/1540.md
Normal file
6
upcoming-release-notes/1540.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [shall0pass]
|
||||
---
|
||||
|
||||
Mobile: Show the correct To Budget amount on Budget Summary
|
||||
Reference in New Issue
Block a user