feat: multi-grup sumber, batch send, & perbaikan tip
Multi-Grup Sumber & UI:
- Model ReceiptGroup: satu struk bisa punya banyak grup sumber (
revenue)
- Tombol "Tambah Sumber" dengan dashed border (max 10 grup)
- Hapus label "Dari:" di SourceAccountSelector (chip saja)
- Default 1 grup kosong di ReceiptProvider constructor &
_resetState
Akun Tujuan ke Config:
- Pindah DestinationAccountSelector dari receipt body ke Config
screen
- Persist & load via SharedPreferences (permanen, tidak di-reset)
- Dropdown auto-load dari cache/mirror saat buka Config
- Tombol "Sinkronisasi Manual" sekarang simpan ke mirror &
refresh dropdown
Batch Send via SubmissionTask:
- Model SubmissionTask: konteks per-grup (group/tip +
destination + date)
- TransactionSubmissionDialog refactor: terima
List<SubmissionTask>
- Helper buildTasksFromReceipt &
buildTasksFromAllUnsubmittedReceipts
- LocalReceiptsScreen: tombol "Kirim Semua Nota" + post-process
status
Bug Fix:
- copyWith sentinel pattern: field nullable (tipSourceAccount,
destinationAccount, fireflyUrl, accessToken) kini bisa di-set
ke null
- Tip dapat dibersihkan dengan "Batal Tip" & reset antar
transaksi
- Hapus tombol "Muat Akun" (redundan dgn Sinkronisasi Manual)
Lainnya:
- Date picker untuk tanggal transaksi
- Font courier prime caching via CourierStyles
- Perf: compute() untuk decode image, cancel stream bluetooth,
fix rebuild loop
- External link: <queries> AndroidManifest + skip canLaunchUrl
- Layout cetak: hapus Ke:, sederhanakan separator grup, hapus
TIP: TIDAK
- Hapus TransactionLinksScreen, ganti inline copy/open di popup
2026-06-27 20:18:51 +07:00
|
|
|
import 'receipt_group.dart';
|
|
|
|
|
|
|
|
|
|
/// Satu tugas kirim ke Firefly III: satu grup deposit atau satu tip.
|
|
|
|
|
///
|
|
|
|
|
/// Kalau [group] tidak null → deposit transaksi grup.
|
|
|
|
|
/// Kalau [group] null → transaksi tip, pakai [tipSourceAccountId]/[tipAmount].
|
|
|
|
|
class SubmissionTask {
|
|
|
|
|
final String taskId;
|
|
|
|
|
final ReceiptGroup? group;
|
|
|
|
|
final double? tipAmount;
|
|
|
|
|
final String? tipSourceAccountId;
|
|
|
|
|
final String? tipSourceAccountName;
|
|
|
|
|
final String destinationAccountId;
|
|
|
|
|
final String destinationAccountName;
|
|
|
|
|
final DateTime transactionDate;
|
2026-09-04 09:48:34 +07:00
|
|
|
final List<String>? tags;
|
feat: multi-grup sumber, batch send, & perbaikan tip
Multi-Grup Sumber & UI:
- Model ReceiptGroup: satu struk bisa punya banyak grup sumber (
revenue)
- Tombol "Tambah Sumber" dengan dashed border (max 10 grup)
- Hapus label "Dari:" di SourceAccountSelector (chip saja)
- Default 1 grup kosong di ReceiptProvider constructor &
_resetState
Akun Tujuan ke Config:
- Pindah DestinationAccountSelector dari receipt body ke Config
screen
- Persist & load via SharedPreferences (permanen, tidak di-reset)
- Dropdown auto-load dari cache/mirror saat buka Config
- Tombol "Sinkronisasi Manual" sekarang simpan ke mirror &
refresh dropdown
Batch Send via SubmissionTask:
- Model SubmissionTask: konteks per-grup (group/tip +
destination + date)
- TransactionSubmissionDialog refactor: terima
List<SubmissionTask>
- Helper buildTasksFromReceipt &
buildTasksFromAllUnsubmittedReceipts
- LocalReceiptsScreen: tombol "Kirim Semua Nota" + post-process
status
Bug Fix:
- copyWith sentinel pattern: field nullable (tipSourceAccount,
destinationAccount, fireflyUrl, accessToken) kini bisa di-set
ke null
- Tip dapat dibersihkan dengan "Batal Tip" & reset antar
transaksi
- Hapus tombol "Muat Akun" (redundan dgn Sinkronisasi Manual)
Lainnya:
- Date picker untuk tanggal transaksi
- Font courier prime caching via CourierStyles
- Perf: compute() untuk decode image, cancel stream bluetooth,
fix rebuild loop
- External link: <queries> AndroidManifest + skip canLaunchUrl
- Layout cetak: hapus Ke:, sederhanakan separator grup, hapus
TIP: TIDAK
- Hapus TransactionLinksScreen, ganti inline copy/open di popup
2026-06-27 20:18:51 +07:00
|
|
|
|
|
|
|
|
SubmissionTask({
|
|
|
|
|
required this.taskId,
|
|
|
|
|
this.group,
|
|
|
|
|
this.tipAmount,
|
|
|
|
|
this.tipSourceAccountId,
|
|
|
|
|
this.tipSourceAccountName,
|
|
|
|
|
required this.destinationAccountId,
|
|
|
|
|
required this.destinationAccountName,
|
|
|
|
|
required this.transactionDate,
|
2026-09-04 09:48:34 +07:00
|
|
|
this.tags,
|
feat: multi-grup sumber, batch send, & perbaikan tip
Multi-Grup Sumber & UI:
- Model ReceiptGroup: satu struk bisa punya banyak grup sumber (
revenue)
- Tombol "Tambah Sumber" dengan dashed border (max 10 grup)
- Hapus label "Dari:" di SourceAccountSelector (chip saja)
- Default 1 grup kosong di ReceiptProvider constructor &
_resetState
Akun Tujuan ke Config:
- Pindah DestinationAccountSelector dari receipt body ke Config
screen
- Persist & load via SharedPreferences (permanen, tidak di-reset)
- Dropdown auto-load dari cache/mirror saat buka Config
- Tombol "Sinkronisasi Manual" sekarang simpan ke mirror &
refresh dropdown
Batch Send via SubmissionTask:
- Model SubmissionTask: konteks per-grup (group/tip +
destination + date)
- TransactionSubmissionDialog refactor: terima
List<SubmissionTask>
- Helper buildTasksFromReceipt &
buildTasksFromAllUnsubmittedReceipts
- LocalReceiptsScreen: tombol "Kirim Semua Nota" + post-process
status
Bug Fix:
- copyWith sentinel pattern: field nullable (tipSourceAccount,
destinationAccount, fireflyUrl, accessToken) kini bisa di-set
ke null
- Tip dapat dibersihkan dengan "Batal Tip" & reset antar
transaksi
- Hapus tombol "Muat Akun" (redundan dgn Sinkronisasi Manual)
Lainnya:
- Date picker untuk tanggal transaksi
- Font courier prime caching via CourierStyles
- Perf: compute() untuk decode image, cancel stream bluetooth,
fix rebuild loop
- External link: <queries> AndroidManifest + skip canLaunchUrl
- Layout cetak: hapus Ke:, sederhanakan separator grup, hapus
TIP: TIDAK
- Hapus TransactionLinksScreen, ganti inline copy/open di popup
2026-06-27 20:18:51 +07:00
|
|
|
}) : assert(
|
|
|
|
|
(group != null) ||
|
|
|
|
|
(tipAmount != null && tipSourceAccountId != null),
|
|
|
|
|
'Harus punya group atau data tip');
|
|
|
|
|
|
|
|
|
|
bool get isTip => group == null;
|
|
|
|
|
String get label =>
|
|
|
|
|
isTip ? 'Tip (${tipSourceAccountName ?? '?'})' : (group?.sourceAccountName ?? 'Grup');
|
|
|
|
|
double get amount => isTip ? (tipAmount ?? 0) : (group?.total ?? 0);
|
|
|
|
|
}
|