Commit 998527c
committed
Merge pull request #228 from fefe982/dev-check-multi
Transaction involving multiple currencies cannot be modified.
Also add some bug fix to make mutli-currency transactions display correctly.
- Rewrite setSplits in Transaction. Now split is not added one by one through addSplit, but the split list is directly assigned. This way the currency information in split is kept. addSplit will reset the currency information. The currency information is used to display the correct currency symbol in split view.
- In TransactionFormFragment, when a multi-currency transaction is loaded, every control is disabled except the split edit button. Pressing "save" or changing the account dropdown list on the upper left corner wouldn't change the transaction, an warning is shown instead. Transfer account dropdown is loaded with accounts without the currency restriction, so the correct transfer account can be shown. The split edit button will bring the SplitEditDialogFragment.
- In SplitEditDialogFragment, when a multi-currency transaction is loaded, every control in each split is disabled. Pressing the "Add Split" button or "save" button would not change the transaction, a warning is shown instead. Balance in the lower right corner would not be calculated and fixed to zero. The account drop-down for each split is load without the currency restriction, so the correct account can be shown. As currency information for each split is kept (see 1), correct currency symbol is used for each split.6 files changed
Lines changed: 130 additions & 35 deletions
File tree
- app
- res/values
- src/org/gnucash/android
- db
- model
- ui/transaction
- dialog
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
328 | 329 | | |
329 | 330 | | |
330 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
600 | 618 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 188 | + | |
192 | 189 | | |
193 | 190 | | |
194 | 191 | | |
| |||
Lines changed: 48 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
| |||
220 | 225 | | |
221 | 226 | | |
222 | 227 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
| |||
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
234 | 243 | | |
235 | 244 | | |
236 | 245 | | |
| |||
361 | 370 | | |
362 | 371 | | |
363 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
364 | 390 | | |
365 | 391 | | |
366 | 392 | | |
| |||
426 | 452 | | |
427 | 453 | | |
428 | 454 | | |
429 | | - | |
430 | | - | |
| 455 | + | |
| 456 | + | |
431 | 457 | | |
432 | 458 | | |
433 | 459 | | |
| |||
459 | 485 | | |
460 | 486 | | |
461 | 487 | | |
462 | | - | |
| 488 | + | |
463 | 489 | | |
464 | 490 | | |
465 | 491 | | |
| |||
545 | 571 | | |
546 | 572 | | |
547 | 573 | | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
553 | 583 | | |
554 | 584 | | |
555 | 585 | | |
556 | 586 | | |
557 | | - | |
| 587 | + | |
558 | 588 | | |
559 | 589 | | |
560 | | - | |
| 590 | + | |
561 | 591 | | |
562 | 592 | | |
563 | 593 | | |
| |||
700 | 730 | | |
701 | 731 | | |
702 | 732 | | |
703 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
704 | 738 | | |
705 | 739 | | |
706 | 740 | | |
| |||
Lines changed: 60 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
105 | | - | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
112 | 125 | | |
113 | 126 | | |
114 | 127 | | |
| |||
131 | 144 | | |
132 | 145 | | |
133 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
134 | 169 | | |
135 | 170 | | |
136 | 171 | | |
| |||
158 | 193 | | |
159 | 194 | | |
160 | 195 | | |
161 | | - | |
162 | | - | |
| 196 | + | |
| 197 | + | |
163 | 198 | | |
164 | 199 | | |
165 | 200 | | |
| |||
194 | 229 | | |
195 | 230 | | |
196 | 231 | | |
197 | | - | |
| 232 | + | |
198 | 233 | | |
199 | 234 | | |
200 | 235 | | |
| |||
258 | 293 | | |
259 | 294 | | |
260 | 295 | | |
261 | | - | |
262 | | - | |
263 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
264 | 303 | | |
265 | 304 | | |
266 | 305 | | |
267 | 306 | | |
268 | 307 | | |
269 | 308 | | |
270 | 309 | | |
271 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
272 | 316 | | |
273 | 317 | | |
274 | 318 | | |
| |||
307 | 351 | | |
308 | 352 | | |
309 | 353 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
317 | 362 | | |
318 | | - | |
319 | 363 | | |
320 | 364 | | |
321 | 365 | | |
| |||
0 commit comments