{sym(currency)}
@@ -431,8 +482,9 @@ export default function MCostSheet({ tripId, base, people, me, editing, prefill,
) : (
+ {/* An uneven split has no one share to print "each" with. */}
{customBalanced
- ? t('costs.splitSummary', { count: participants.size, amount: splitShareLabel(each, currency, fx, participants.size, base, locale) })
+ ? t('costs.splitBalanced')
: `${formatMoney(splitSum, currency, locale)} / ${formatMoney(totalNum, currency, locale)}`}
)}
diff --git a/client/tests/unit/mobile/trip/MCostSheet.test.tsx b/client/tests/unit/mobile/trip/MCostSheet.test.tsx
index ceec72c91..bb5969950 100644
--- a/client/tests/unit/mobile/trip/MCostSheet.test.tsx
+++ b/client/tests/unit/mobile/trip/MCostSheet.test.tsx
@@ -10,7 +10,7 @@ import { localToday } from '../../../../src/components/Planner/today'
import { resetAllStores } from '../../../helpers/store'
import { act, fireEvent, render, screen, waitFor } from '../../../helpers/render'
-// FE-MOB-COSTSH-001 to FE-MOB-COSTSH-038
+// FE-MOB-COSTSH-001 to FE-MOB-COSTSH-040
// The sheet reads its copy from useTranslation(), so assertions are English.
// EUR formats de-DE style: displayed amounts and inputs use a comma.
@@ -353,7 +353,7 @@ describe('MCostSheet', () => {
// The remaining share now suggests what is left of the total.
fireEvent.change(screen.getByPlaceholderText('70,00'), { target: { value: '70' } })
- expect(screen.getByText('Split 2 ways · 50,00 € each')).toBeInTheDocument()
+ expect(screen.getByText('Split matches total')).toBeInTheDocument()
fireEvent.click(submit())
await waitFor(() => expect(addBudgetItem).toHaveBeenCalledWith(1, expect.objectContaining({
@@ -744,4 +744,35 @@ describe('MCostSheet', () => {
fireEvent.change(shares[0], { target: { value: '10000' } })
expect(screen.getByText('₩10,000 / ₩60,000')).toBeInTheDocument()
})
+
+ it('FE-MOB-COSTSH-039: a custom split by shares saves the stay split by nights (#1165)', async () => {
+ renderSheet()
+ fillBasics('Apartment', '390')
+ fireEvent.click(screen.getByRole('button', { name: 'Custom' }))
+ fireEvent.click(screen.getByRole('radio', { name: 'Shares' }))
+ // One share each until something is typed: the split already balances.
+ expect(screen.getByRole('textbox', { name: 'Shares for You' })).toHaveAttribute('placeholder', '1')
+ fireEvent.change(screen.getByRole('textbox', { name: 'Shares for You' }), { target: { value: '5' } })
+ fireEvent.change(screen.getByRole('textbox', { name: 'Shares for bob' }), { target: { value: '4' } })
+ expect(screen.getByText('216,67 €')).toBeInTheDocument()
+ expect(screen.getByText('173,33 €')).toBeInTheDocument()
+
+ fireEvent.click(submit())
+ await waitFor(() => expect(addBudgetItem).toHaveBeenCalledTimes(1))
+ expect(addBudgetItem.mock.calls[0][1]).toMatchObject({
+ members: [{ user_id: 1, amount: 216.67 }, { user_id: 2, amount: 173.33 }],
+ })
+ })
+
+ it('FE-MOB-COSTSH-040: the custom split also takes percentages, the amount shown beside each', () => {
+ renderSheet()
+ fillBasics('Bag storage', '30')
+ fireEvent.click(screen.getByRole('button', { name: 'Custom' }))
+ fireEvent.click(screen.getByRole('radio', { name: '%' }))
+ expect(screen.getByText("Type each person's share in percent; together they have to make 100 %.")).toBeInTheDocument()
+ fireEvent.change(screen.getByRole('textbox', { name: 'You %' }), { target: { value: '60' } })
+ fireEvent.change(screen.getByRole('textbox', { name: 'bob %' }), { target: { value: '40' } })
+ expect(screen.getByText('18,00 €')).toBeInTheDocument()
+ expect(submit()).toBeEnabled()
+ })
})
diff --git a/shared/src/i18n/ar/budget.ts b/shared/src/i18n/ar/budget.ts
index 33b463b5b..c47da2231 100644
--- a/shared/src/i18n/ar/budget.ts
+++ b/shared/src/i18n/ar/budget.ts
@@ -197,6 +197,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'أدخل حصة كل شخص بالنسبة المئوية؛ يجب أن يكون مجموعها 100 %.',
'costs.splitUnit': 'إدخال الحصص كـ',
'costs.splitPercentOff': 'تم توزيع {sum} % من 100 %',
+ 'costs.splitUnitShares': 'الحصص',
+ 'costs.splitHint.shares':
+ 'أعطِ كل شخص عددًا من الحصص، مثل عدد الليالي التي أقامها؛ ويُقسَّم المبلغ الإجمالي بهذه النسبة.',
+ 'costs.splitSharesOf': 'حصص {name}',
+ 'costs.splitSharesNone': 'أعطِ حصة لشخص واحد على الأقل',
'costs.splitHint.ticket': 'اكتب ما ورد في الإيصال وحدّد من أخذ كل عنصر.',
'costs.filter.allCategories': 'كل الفئات',
'costs.filter.allDays': 'كل الأيام',
diff --git a/shared/src/i18n/az/budget.ts b/shared/src/i18n/az/budget.ts
index 06383ad9a..a12c453a2 100644
--- a/shared/src/i18n/az/budget.ts
+++ b/shared/src/i18n/az/budget.ts
@@ -159,6 +159,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Hər kəsin payını faizlə yazın; cəmi 100 % olmalıdır.',
'costs.splitUnit': 'Payları belə daxil et',
'costs.splitPercentOff': '100 %-dən {sum} % bölüşdürülüb',
+ 'costs.splitUnitShares': 'Paylar',
+ 'costs.splitHint.shares':
+ 'Hər kəsə pay sayı verin, məsələn qaldığı gecələrin sayı; ümumi məbləğ bu nisbətdə bölünür.',
+ 'costs.splitSharesOf': '{name} üçün paylar',
+ 'costs.splitSharesNone': 'Ən azı bir nəfərə pay verin',
'costs.splitHint.ticket': 'Qəbzdə olanları sadalayın və hər elementi kimin götürdüyünü işarələyin.',
'costs.pickSomeone': 'Bölüşdürmək üçün ən azı bir nəfər seçin.',
'costs.splitSummary': '{count} nəfər arasında bölünüb · hərəsinə {amount}',
diff --git a/shared/src/i18n/br/budget.ts b/shared/src/i18n/br/budget.ts
index ed66b67fb..30c5284f6 100644
--- a/shared/src/i18n/br/budget.ts
+++ b/shared/src/i18n/br/budget.ts
@@ -169,6 +169,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Digite a parte de cada pessoa em porcentagem; juntas devem somar 100 %.',
'costs.splitUnit': 'Inserir partes como',
'costs.splitPercentOff': '{sum} % de 100 % distribuídos',
+ 'costs.splitUnitShares': 'Cotas',
+ 'costs.splitHint.shares':
+ 'Dê a cada pessoa um número de cotas, como as noites em que ficou; o total é dividido nessa proporção.',
+ 'costs.splitSharesOf': 'Cotas de {name}',
+ 'costs.splitSharesNone': 'Dê uma cota a pelo menos uma pessoa',
'costs.splitHint.ticket': 'Liste o que estava no comprovante e marque quem consumiu cada item.',
'costs.filter.allCategories': 'Todas as categorias',
'costs.filter.allDays': 'Todos os dias',
diff --git a/shared/src/i18n/ca/budget.ts b/shared/src/i18n/ca/budget.ts
index ca5cce968..f191dc21a 100644
--- a/shared/src/i18n/ca/budget.ts
+++ b/shared/src/i18n/ca/budget.ts
@@ -134,6 +134,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Escriu la part de cada persona en percentatge; juntes han de sumar el 100 %.',
'costs.splitUnit': 'Introdueix les parts com a',
'costs.splitPercentOff': '{sum} % de 100 % repartit',
+ 'costs.splitUnitShares': 'Parts',
+ 'costs.splitHint.shares':
+ 'Dona a cada persona un nombre de parts, com ara les nits que s’hi ha allotjat; el total es reparteix en aquesta proporció.',
+ 'costs.splitSharesOf': 'Parts de {name}',
+ 'costs.splitSharesNone': 'Dona una part a almenys una persona',
'costs.splitHint.ticket': 'Llista el que hi havia al rebut i marca qui ha pres cada article.',
'costs.pickSomeone': 'Tria almenys una persona amb qui dividir-ho.',
'costs.splitSummary': 'Dividit entre {count} persones · {amount} cadascú',
diff --git a/shared/src/i18n/cs/budget.ts b/shared/src/i18n/cs/budget.ts
index 9a70a07e0..e5aeb8b09 100644
--- a/shared/src/i18n/cs/budget.ts
+++ b/shared/src/i18n/cs/budget.ts
@@ -176,6 +176,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Zadejte podíl každé osoby v procentech; dohromady musí dát 100 %.',
'costs.splitUnit': 'Zadávat podíly jako',
'costs.splitPercentOff': 'Rozděleno {sum} % ze 100 %',
+ 'costs.splitUnitShares': 'Podíly',
+ 'costs.splitHint.shares':
+ 'Dejte každé osobě počet podílů, třeba podle počtu nocí; celková částka se rozdělí v tomto poměru.',
+ 'costs.splitSharesOf': 'Podíly pro {name}',
+ 'costs.splitSharesNone': 'Dejte podíl alespoň jedné osobě',
'costs.splitHint.ticket': 'Vypište, co bylo na účtence, a zaškrtněte, kdo měl kterou položku.',
'costs.filter.allCategories': 'Všechny kategorie',
'costs.filter.allDays': 'Všechny dny',
diff --git a/shared/src/i18n/de/budget.ts b/shared/src/i18n/de/budget.ts
index ed455ccfc..b485a16eb 100644
--- a/shared/src/i18n/de/budget.ts
+++ b/shared/src/i18n/de/budget.ts
@@ -173,6 +173,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Gib den Anteil jeder Person in Prozent ein; zusammen müssen es 100 % sein.',
'costs.splitUnit': 'Anteile eingeben als',
'costs.splitPercentOff': '{sum} % von 100 % verteilt',
+ 'costs.splitUnitShares': 'Anteile',
+ 'costs.splitHint.shares':
+ 'Gib jeder Person eine Zahl von Anteilen, etwa die Nächte, die sie geblieben ist; der Betrag wird in diesem Verhältnis aufgeteilt.',
+ 'costs.splitSharesOf': 'Anteile von {name}',
+ 'costs.splitSharesNone': 'Gib mindestens einer Person einen Anteil',
'costs.splitHint.ticket': 'Liste auf, was auf dem Beleg steht, und hak ab, wer was hatte.',
'costs.ticketItemName': 'Artikelname',
'costs.ticketSplitting': 'Aufteilen auf:',
diff --git a/shared/src/i18n/en/budget.ts b/shared/src/i18n/en/budget.ts
index 4bc664664..f627c5b9c 100644
--- a/shared/src/i18n/en/budget.ts
+++ b/shared/src/i18n/en/budget.ts
@@ -143,6 +143,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': "Type each person's share in percent; together they have to make 100 %.",
'costs.splitUnit': 'Enter shares as',
'costs.splitPercentOff': '{sum} % of 100 % assigned',
+ 'costs.splitUnitShares': 'Shares',
+ 'costs.splitHint.shares':
+ 'Give each person a number of shares, such as the nights they stayed; the total is split in that ratio.',
+ 'costs.splitSharesOf': 'Shares for {name}',
+ 'costs.splitSharesNone': 'Give at least one person a share',
'costs.splitHint.ticket': 'List what was on the receipt and tick who had each item.',
'costs.pickSomeone': 'Pick at least one person to split with.',
'costs.splitSummary': 'Split {count} ways · {amount} each',
diff --git a/shared/src/i18n/es/budget.ts b/shared/src/i18n/es/budget.ts
index 027c04c94..265493535 100644
--- a/shared/src/i18n/es/budget.ts
+++ b/shared/src/i18n/es/budget.ts
@@ -169,6 +169,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Escribe la parte de cada persona en porcentaje; juntas deben sumar el 100 %.',
'costs.splitUnit': 'Introducir partes como',
'costs.splitPercentOff': '{sum} % de 100 % asignado',
+ 'costs.splitUnitShares': 'Partes',
+ 'costs.splitHint.shares':
+ 'Da a cada persona un número de partes, como las noches que se alojó; el total se reparte en esa proporción.',
+ 'costs.splitSharesOf': 'Partes de {name}',
+ 'costs.splitSharesNone': 'Da una parte al menos a una persona',
'costs.splitHint.ticket': 'Enumera lo que había en el recibo y marca quién tomó cada artículo.',
'costs.filter.allCategories': 'Todas las categorías',
'costs.filter.allDays': 'Todos los días',
diff --git a/shared/src/i18n/et/budget.ts b/shared/src/i18n/et/budget.ts
index f52831b91..b69c6a3e5 100644
--- a/shared/src/i18n/et/budget.ts
+++ b/shared/src/i18n/et/budget.ts
@@ -143,6 +143,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Sisesta iga inimese osa protsentides; kokku peab tulema 100 %.',
'costs.splitUnit': 'Sisesta osad kui',
'costs.splitPercentOff': 'Jaotatud {sum} % 100 %-st',
+ 'costs.splitUnitShares': 'Osad',
+ 'costs.splitHint.shares':
+ 'Anna igale inimesele osade arv, näiteks ööbitud ööde arv; summa jagatakse selles vahekorras.',
+ 'costs.splitSharesOf': '{name} osad',
+ 'costs.splitSharesNone': 'Anna vähemalt ühele inimesele osa',
'costs.splitHint.ticket': 'Loetle, mis tšekil oli, ja märgi iga kirje juurde, kellele see kuulus.',
'costs.pickSomeone': 'Vali jagamiseks vähemalt üks inimene.',
'costs.splitSummary': 'Jaotatud {count} osaks · igaühele {amount}',
diff --git a/shared/src/i18n/fr/budget.ts b/shared/src/i18n/fr/budget.ts
index a35d5cb64..bcefbd517 100644
--- a/shared/src/i18n/fr/budget.ts
+++ b/shared/src/i18n/fr/budget.ts
@@ -170,6 +170,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Saisissez la part de chacun en pourcentage ; ensemble elles doivent faire 100 %.',
'costs.splitUnit': 'Saisir les parts en',
'costs.splitPercentOff': '{sum} % sur 100 % répartis',
+ 'costs.splitUnitShares': 'Parts',
+ 'costs.splitHint.shares':
+ 'Donnez à chaque personne un nombre de parts, par exemple ses nuits sur place ; le total est réparti dans cette proportion.',
+ 'costs.splitSharesOf': 'Parts de {name}',
+ 'costs.splitSharesNone': 'Donnez une part à au moins une personne',
'costs.splitHint.ticket': 'Listez ce qui figurait sur le reçu et cochez qui a pris chaque article.',
'costs.filter.allCategories': 'Toutes les catégories',
'costs.filter.allDays': 'Tous les jours',
diff --git a/shared/src/i18n/gr/budget.ts b/shared/src/i18n/gr/budget.ts
index 39785dcec..14e4c6fa4 100644
--- a/shared/src/i18n/gr/budget.ts
+++ b/shared/src/i18n/gr/budget.ts
@@ -171,6 +171,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Πληκτρολογήστε το μερίδιο κάθε ατόμου σε ποσοστό· μαζί πρέπει να κάνουν 100 %.',
'costs.splitUnit': 'Εισαγωγή μεριδίων ως',
'costs.splitPercentOff': 'Κατανεμήθηκε {sum} % από 100 %',
+ 'costs.splitUnitShares': 'Μερίδια',
+ 'costs.splitHint.shares':
+ 'Δώστε σε κάθε άτομο έναν αριθμό μεριδίων, όπως τις νύχτες που έμεινε· το σύνολο μοιράζεται με αυτή την αναλογία.',
+ 'costs.splitSharesOf': 'Μερίδια για {name}',
+ 'costs.splitSharesNone': 'Δώστε μερίδιο σε τουλάχιστον ένα άτομο',
'costs.splitHint.ticket': 'Καταγράψτε τι είχε η απόδειξη και σημειώστε ποιος πήρε κάθε είδος.',
'costs.filter.allCategories': 'Όλες οι κατηγορίες',
'costs.filter.allDays': 'Όλες οι ημέρες',
diff --git a/shared/src/i18n/he/budget.ts b/shared/src/i18n/he/budget.ts
index 17f863df4..d66e2b1cf 100644
--- a/shared/src/i18n/he/budget.ts
+++ b/shared/src/i18n/he/budget.ts
@@ -148,6 +148,10 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'הקלידו את החלק של כל אדם באחוזים; ביחד הם צריכים להגיע ל-100%.',
'costs.splitUnit': 'הזנת חלקים כ-',
'costs.splitPercentOff': '{sum}% מתוך 100% חולקו',
+ 'costs.splitUnitShares': 'חלקים',
+ 'costs.splitHint.shares': 'תנו לכל אדם מספר חלקים, למשל מספר הלילות שנשאר; הסכום הכולל מתחלק ביחס הזה.',
+ 'costs.splitSharesOf': 'החלקים של {name}',
+ 'costs.splitSharesNone': 'תנו חלק לאדם אחד לפחות',
'costs.splitHint.ticket': 'רשמו מה היה בקבלה וסמנו מי לקח כל פריט.',
'costs.pickSomeone': 'בחרו לפחות אדם אחד לחלוקה.',
'costs.splitSummary': 'חלוקה ל-{count} · {amount} לכל אחד',
diff --git a/shared/src/i18n/hu/budget.ts b/shared/src/i18n/hu/budget.ts
index d121ad967..b5ce34af3 100644
--- a/shared/src/i18n/hu/budget.ts
+++ b/shared/src/i18n/hu/budget.ts
@@ -171,6 +171,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Add meg mindenki részét százalékban; együtt 100 %-ot kell kiadniuk.',
'costs.splitUnit': 'Részek megadása mint',
'costs.splitPercentOff': '100 %-ból {sum} % kiosztva',
+ 'costs.splitUnitShares': 'Részek',
+ 'costs.splitHint.shares':
+ 'Adj mindenkinek egy részszámot, például az eltöltött éjszakák számát; a végösszeg ebben az arányban oszlik meg.',
+ 'costs.splitSharesOf': '{name} részei',
+ 'costs.splitSharesNone': 'Adj részt legalább egy személynek',
'costs.splitHint.ticket': 'Sorold fel, mi szerepelt a nyugtán, és minden tételnél jelöld be, kié volt.',
'costs.filter.allCategories': 'Összes kategória',
'costs.filter.allDays': 'Összes nap',
diff --git a/shared/src/i18n/id/budget.ts b/shared/src/i18n/id/budget.ts
index 339897b34..f21c5744e 100644
--- a/shared/src/i18n/id/budget.ts
+++ b/shared/src/i18n/id/budget.ts
@@ -162,6 +162,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Ketik bagian tiap orang dalam persen; jumlahnya harus 100 %.',
'costs.splitUnit': 'Masukkan bagian sebagai',
'costs.splitPercentOff': '{sum} % dari 100 % terbagi',
+ 'costs.splitUnitShares': 'Bagian',
+ 'costs.splitHint.shares':
+ 'Beri setiap orang sejumlah bagian, misalnya jumlah malam menginap; total dibagi menurut perbandingan itu.',
+ 'costs.splitSharesOf': 'Bagian untuk {name}',
+ 'costs.splitSharesNone': 'Beri bagian kepada setidaknya satu orang',
'costs.splitHint.ticket': 'Tuliskan isi kuitansi dan centang siapa yang mengambil tiap item.',
'costs.filter.allCategories': 'Semua kategori',
'costs.filter.allDays': 'Semua hari',
diff --git a/shared/src/i18n/it/budget.ts b/shared/src/i18n/it/budget.ts
index 77d2cbf9e..601f8f3bc 100644
--- a/shared/src/i18n/it/budget.ts
+++ b/shared/src/i18n/it/budget.ts
@@ -169,6 +169,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Inserisci la quota di ciascuno in percentuale; insieme devono fare 100 %.',
'costs.splitUnit': 'Inserisci le quote come',
'costs.splitPercentOff': '{sum} % di 100 % assegnato',
+ 'costs.splitUnitShares': 'Quote',
+ 'costs.splitHint.shares':
+ 'Assegna a ogni persona un numero di quote, ad esempio le notti in cui è rimasta; il totale viene diviso in questa proporzione.',
+ 'costs.splitSharesOf': 'Quote di {name}',
+ 'costs.splitSharesNone': 'Assegna una quota ad almeno una persona',
'costs.splitHint.ticket': "Elenca cosa c'era sulla ricevuta e spunta chi ha preso ciascun articolo.",
'costs.filter.allCategories': 'Tutte le categorie',
'costs.filter.allDays': 'Tutti i giorni',
diff --git a/shared/src/i18n/ja/budget.ts b/shared/src/i18n/ja/budget.ts
index 179b2114b..2991492d6 100644
--- a/shared/src/i18n/ja/budget.ts
+++ b/shared/src/i18n/ja/budget.ts
@@ -162,6 +162,10 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': '各人の負担をパーセントで入力してください。合計で 100 % になる必要があります。',
'costs.splitUnit': '負担の入力方法',
'costs.splitPercentOff': '100 % のうち {sum} % を割り当て済み',
+ 'costs.splitUnitShares': '口数',
+ 'costs.splitHint.shares': '泊数など、各メンバーに口数を指定してください。合計金額はその比率で分けられます。',
+ 'costs.splitSharesOf': '{name}の口数',
+ 'costs.splitSharesNone': '少なくとも1人に口数を指定してください',
'costs.splitHint.ticket': 'レシートの品目を書き出し、それぞれ誰の分かにチェックを入れます。',
'costs.filter.allCategories': 'すべてのカテゴリー',
'costs.filter.allDays': 'すべての日',
diff --git a/shared/src/i18n/ko/budget.ts b/shared/src/i18n/ko/budget.ts
index 0a83f7ea0..4df7929af 100644
--- a/shared/src/i18n/ko/budget.ts
+++ b/shared/src/i18n/ko/budget.ts
@@ -162,6 +162,10 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': '각자의 몫을 퍼센트로 입력하세요. 합계가 100 %가 되어야 합니다.',
'costs.splitUnit': '몫 입력 방식',
'costs.splitPercentOff': '100 % 중 {sum} % 배분됨',
+ 'costs.splitUnitShares': '지분',
+ 'costs.splitHint.shares': '머문 박 수처럼 각자에게 지분 수를 정하세요. 총액이 그 비율로 나뉩니다.',
+ 'costs.splitSharesOf': '{name}의 지분',
+ 'costs.splitSharesNone': '최소 한 명에게 지분을 정하세요',
'costs.splitHint.ticket': '영수증에 있던 항목을 적고, 항목마다 누구 몫인지 체크하세요.',
'costs.filter.allCategories': '모든 카테고리',
'costs.filter.allDays': '모든 날짜',
diff --git a/shared/src/i18n/nl/budget.ts b/shared/src/i18n/nl/budget.ts
index 464375b33..56e025c57 100644
--- a/shared/src/i18n/nl/budget.ts
+++ b/shared/src/i18n/nl/budget.ts
@@ -170,6 +170,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Vul ieders aandeel in procenten in; samen moet het 100 % zijn.',
'costs.splitUnit': 'Aandelen invoeren als',
'costs.splitPercentOff': '{sum} % van 100 % verdeeld',
+ 'costs.splitUnitShares': 'Delen',
+ 'costs.splitHint.shares':
+ 'Geef iedereen een aantal delen, zoals het aantal overnachtingen; het totaal wordt in die verhouding verdeeld.',
+ 'costs.splitSharesOf': 'Delen voor {name}',
+ 'costs.splitSharesNone': 'Geef ten minste één persoon een deel',
'costs.splitHint.ticket': 'Zet op een rij wat er op de bon stond en vink aan wie welk item had.',
'costs.filter.allCategories': 'Alle categorieën',
'costs.filter.allDays': 'Alle dagen',
diff --git a/shared/src/i18n/pl/budget.ts b/shared/src/i18n/pl/budget.ts
index db8a780d0..2951fe741 100644
--- a/shared/src/i18n/pl/budget.ts
+++ b/shared/src/i18n/pl/budget.ts
@@ -183,6 +183,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Wpisz udział każdej osoby w procentach; razem musi to dać 100 %.',
'costs.splitUnit': 'Wpisuj udziały jako',
'costs.splitPercentOff': 'Przydzielono {sum} % ze 100 %',
+ 'costs.splitUnitShares': 'Udziały',
+ 'costs.splitHint.shares':
+ 'Przypisz każdej osobie liczbę udziałów, np. liczbę nocy; kwota zostanie podzielona w tej proporcji.',
+ 'costs.splitSharesOf': 'Udziały: {name}',
+ 'costs.splitSharesNone': 'Przypisz udział co najmniej jednej osobie',
'costs.splitHint.ticket': 'Wypisz, co było na paragonie, i zaznacz, kto miał którą pozycję.',
'costs.filter.allCategories': 'Wszystkie kategorie',
'costs.filter.allDays': 'Wszystkie dni',
diff --git a/shared/src/i18n/ru/budget.ts b/shared/src/i18n/ru/budget.ts
index c569c05bb..eb741f011 100644
--- a/shared/src/i18n/ru/budget.ts
+++ b/shared/src/i18n/ru/budget.ts
@@ -183,6 +183,10 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Введите долю каждого в процентах; вместе должно получиться 100 %.',
'costs.splitUnit': 'Вводить доли как',
'costs.splitPercentOff': 'Распределено {sum} % из 100 %',
+ 'costs.splitUnitShares': 'Доли',
+ 'costs.splitHint.shares': 'Укажите каждому число долей, например число ночей; сумма делится в этой пропорции.',
+ 'costs.splitSharesOf': 'Доли: {name}',
+ 'costs.splitSharesNone': 'Укажите долю хотя бы одному человеку',
'costs.splitHint.ticket': 'Перечислите, что было в чеке, и отметьте, кто что брал.',
'costs.filter.allCategories': 'Все категории',
'costs.filter.allDays': 'Все дни',
diff --git a/shared/src/i18n/sk/budget.ts b/shared/src/i18n/sk/budget.ts
index dad424480..6c44099ec 100644
--- a/shared/src/i18n/sk/budget.ts
+++ b/shared/src/i18n/sk/budget.ts
@@ -148,6 +148,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Zadajte podiel každej osoby v percentách; spolu musia dať 100 %.',
'costs.splitUnit': 'Zadávať podiely ako',
'costs.splitPercentOff': 'Rozdelené {sum} % zo 100 %',
+ 'costs.splitUnitShares': 'Podiely',
+ 'costs.splitHint.shares':
+ 'Dajte každej osobe počet podielov, napríklad podľa počtu nocí; celková suma sa rozdelí v tomto pomere.',
+ 'costs.splitSharesOf': 'Podiely pre {name}',
+ 'costs.splitSharesNone': 'Dajte podiel aspoň jednej osobe',
'costs.splitHint.ticket': 'Vypíšte, čo bolo na účtenke, a označte, kto mal ktorú položku.',
'costs.pickSomeone': 'Vyberte aspoň jednu osobu na rozdelenie.',
'costs.splitSummary': 'Rozdelené na {count} dielov · {amount} na osobu',
diff --git a/shared/src/i18n/sv/budget.ts b/shared/src/i18n/sv/budget.ts
index 0b195d0b0..59a8cf7c3 100644
--- a/shared/src/i18n/sv/budget.ts
+++ b/shared/src/i18n/sv/budget.ts
@@ -169,6 +169,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Skriv varje persons andel i procent; tillsammans ska det bli 100 %.',
'costs.splitUnit': 'Ange andelar som',
'costs.splitPercentOff': '{sum} % av 100 % fördelat',
+ 'costs.splitUnitShares': 'Andelar',
+ 'costs.splitHint.shares':
+ 'Ge varje person ett antal andelar, till exempel antal nätter; summan delas i den proportionen.',
+ 'costs.splitSharesOf': 'Andelar för {name}',
+ 'costs.splitSharesNone': 'Ge minst en person en andel',
'costs.splitHint.ticket': 'Lista det som stod på kvittot och bocka för vem som hade varje artikel.',
'costs.filter.allCategories': 'Alla kategorier',
'costs.filter.allDays': 'Alla dagar',
diff --git a/shared/src/i18n/th/budget.ts b/shared/src/i18n/th/budget.ts
index d7f7e4af1..55cf08b57 100644
--- a/shared/src/i18n/th/budget.ts
+++ b/shared/src/i18n/th/budget.ts
@@ -134,6 +134,10 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'ใส่ส่วนแบ่งของแต่ละคนเป็นเปอร์เซ็นต์ รวมกันต้องได้ 100 %',
'costs.splitUnit': 'ใส่ส่วนแบ่งเป็น',
'costs.splitPercentOff': 'แบ่งแล้ว {sum} % จาก 100 %',
+ 'costs.splitUnitShares': 'ส่วนแบ่ง',
+ 'costs.splitHint.shares': 'กำหนดจำนวนส่วนแบ่งให้แต่ละคน เช่น จำนวนคืนที่พัก แล้วยอดรวมจะถูกแบ่งตามสัดส่วนนั้น',
+ 'costs.splitSharesOf': 'ส่วนแบ่งของ {name}',
+ 'costs.splitSharesNone': 'กำหนดส่วนแบ่งให้อย่างน้อยหนึ่งคน',
'costs.splitHint.ticket': 'ใส่รายการที่อยู่ในใบเสร็จ แล้วติ๊กว่าใครสั่งรายการไหน',
'costs.pickSomeone': 'เลือกอย่างน้อยหนึ่งคนที่จะแยกด้วย',
'costs.splitSummary': '{count} คน · คนละ {amount}',
diff --git a/shared/src/i18n/tr/budget.ts b/shared/src/i18n/tr/budget.ts
index 900f03bd5..8447b5fbc 100644
--- a/shared/src/i18n/tr/budget.ts
+++ b/shared/src/i18n/tr/budget.ts
@@ -170,6 +170,10 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Herkesin payını yüzde olarak yazın; toplam %100 olmalı.',
'costs.splitUnit': 'Payları şu şekilde gir',
'costs.splitPercentOff': "%100'ün %{sum} kadarı dağıtıldı",
+ 'costs.splitUnitShares': 'Paylar',
+ 'costs.splitHint.shares': 'Herkese bir pay sayısı verin, örneğin kaldığı gece sayısı; toplam bu oranda bölünür.',
+ 'costs.splitSharesOf': '{name} payları',
+ 'costs.splitSharesNone': 'En az bir kişiye pay verin',
'costs.splitHint.ticket': 'Fişte neler olduğunu listeleyin ve her kalemi kimin aldığını işaretleyin.',
'costs.filter.allCategories': 'Tüm kategoriler',
'costs.filter.allDays': 'Tüm günler',
diff --git a/shared/src/i18n/uk/budget.ts b/shared/src/i18n/uk/budget.ts
index b5b9a25b8..62ade0c09 100644
--- a/shared/src/i18n/uk/budget.ts
+++ b/shared/src/i18n/uk/budget.ts
@@ -183,6 +183,11 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Введіть частку кожного у відсотках; разом має бути 100 %.',
'costs.splitUnit': 'Вводити частки як',
'costs.splitPercentOff': 'Розподілено {sum} % зі 100 %',
+ 'costs.splitUnitShares': 'Частки',
+ 'costs.splitHint.shares':
+ 'Вкажіть кожному кількість часток, наприклад кількість ночей; сума ділиться в цій пропорції.',
+ 'costs.splitSharesOf': 'Частки: {name}',
+ 'costs.splitSharesNone': 'Вкажіть частку хоча б одній людині',
'costs.splitHint.ticket': 'Перелічіть, що було в чеку, і позначте, хто брав кожну позицію.',
'costs.filter.allCategories': 'Усі категорії',
'costs.filter.allDays': 'Усі дні',
diff --git a/shared/src/i18n/vi/budget.ts b/shared/src/i18n/vi/budget.ts
index 8c485453f..83f470949 100644
--- a/shared/src/i18n/vi/budget.ts
+++ b/shared/src/i18n/vi/budget.ts
@@ -162,6 +162,10 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': 'Nhập phần của mỗi người theo phần trăm; tổng cộng phải là 100 %.',
'costs.splitUnit': 'Nhập phần theo',
'costs.splitPercentOff': 'Đã chia {sum} % trên 100 %',
+ 'costs.splitUnitShares': 'Phần',
+ 'costs.splitHint.shares': 'Đặt cho mỗi người một số phần, ví dụ số đêm đã ở; tổng tiền được chia theo tỷ lệ đó.',
+ 'costs.splitSharesOf': 'Số phần của {name}',
+ 'costs.splitSharesNone': 'Hãy đặt phần cho ít nhất một người',
'costs.splitHint.ticket': 'Liệt kê các món trên hóa đơn và đánh dấu ai đã dùng từng món.',
'costs.filter.allCategories': 'Tất cả danh mục',
'costs.filter.allDays': 'Tất cả các ngày',
diff --git a/shared/src/i18n/zh-TW/budget.ts b/shared/src/i18n/zh-TW/budget.ts
index 4a29df568..8eb587eb0 100644
--- a/shared/src/i18n/zh-TW/budget.ts
+++ b/shared/src/i18n/zh-TW/budget.ts
@@ -161,6 +161,10 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': '以百分比輸入每個人的份額,合計必須為 100 %。',
'costs.splitUnit': '份額輸入方式',
'costs.splitPercentOff': '已分配 {sum} %(共 100 %)',
+ 'costs.splitUnitShares': '份數',
+ 'costs.splitHint.shares': '為每個人設定份數,例如住了幾晚;總額按此比例分攤。',
+ 'costs.splitSharesOf': '{name} 的份數',
+ 'costs.splitSharesNone': '請至少為一人設定份數',
'costs.splitHint.ticket': '列出收據上的項目,並勾選每一項是誰的。',
'costs.filter.allCategories': '所有類別',
'costs.filter.allDays': '所有日期',
diff --git a/shared/src/i18n/zh/budget.ts b/shared/src/i18n/zh/budget.ts
index 5026a19d3..a8da96b9f 100644
--- a/shared/src/i18n/zh/budget.ts
+++ b/shared/src/i18n/zh/budget.ts
@@ -161,6 +161,10 @@ const budget: TranslationStrings = {
'costs.splitHint.percent': '以百分比输入每个人的份额,合计必须为 100 %。',
'costs.splitUnit': '份额输入方式',
'costs.splitPercentOff': '已分配 {sum} %(共 100 %)',
+ 'costs.splitUnitShares': '份数',
+ 'costs.splitHint.shares': '为每个人设定份数,例如住了几晚;总额按此比例分摊。',
+ 'costs.splitSharesOf': '{name} 的份数',
+ 'costs.splitSharesNone': '请至少为一人设定份数',
'costs.splitHint.ticket': '列出收据上的项目,并勾选每一项是谁的。',
'costs.filter.allCategories': '所有类别',
'costs.filter.allDays': '所有日期',
diff --git a/wiki/Budget-Tracking.md b/wiki/Budget-Tracking.md
index c3e08dd31..114d9da12 100644
--- a/wiki/Budget-Tracking.md
+++ b/wiki/Budget-Tracking.md
@@ -137,7 +137,7 @@ An expense with no payer is flagged **Unfinished** on its row and counted into t
**Split** decides who owes for the expense. The switch beside the heading has three modes, and a line under it says what the current one does. Every member is listed with a box to tick; an unticked member owes nothing.
- **Equally**: everyone ticked pays the same share, shown beside each name, with the head count and *{amount} per person* under the list. Remainder cents from rounding are handed out deterministically and rotated by the expense, so over a trip nobody is always the one who pays the extra cent.
-- **Custom**: type each person's share. Together they have to make the total: under the list, a green *Split matches total* or a red *Sum of splits: … (under by …)* / *(over by …)* says where you stand, and the dialog will not save until it matches. A small switch next to the hint (**Enter shares as**) picks between the currency symbol and **%**. In percent, each person gets a percentage instead, they have to add up to 100 % (a red *… % of 100 % assigned* says when they do not), and TREK turns them into amounts that add up to the total exactly.
+- **Custom**: type each person's share. Together they have to make the total: under the list, a green *Split matches total* or a red *Sum of splits: … (under by …)* / *(over by …)* says where you stand, and the dialog will not save until it matches. A small switch next to the hint (**Enter shares as**) picks between the currency symbol, **%** and **Shares**. In percent, each person gets a percentage instead, they have to add up to 100 % (a red *… % of 100 % assigned* says when they do not), and TREK turns them into amounts that add up to the total exactly. With **Shares**, each person gets a number of shares, such as the nights they stayed: everyone starts at one, and an apartment of 390 € for five nights against four comes to 216,67 € and 173,33 €. A person on zero shares owes nothing, and with nobody on a share the dialog says *Give at least one person a share*. What is saved is the amounts, so the expense reopens with them. The phone sheet has the same switch under the split modes.
- **Ticket**: list what was on the receipt. Each line has an **Item name**, a price and, under *Splitting:*, a chip per member to tick who had it. **Add item** adds a line, the bin removes one. The total is summed from the lines, **Individual shares** shows what each person comes to, cent-exact, and the lines are kept, so the list is still there the next time you open the expense.
## Settlement calculator