refactor(arap): rustfmt the unit's files, and the write-off's SOURCE line (P4b S7)
No behaviour: the files as rustfmt leaves them after the unit's edits (the commits before this one were made before the formatter ran), and the Ledger::write_off spec block cites A-5 alone for the direct write-off method (A-6 is the hand-entry refusal, not this command).
This commit is contained in:
1 parent
f31dd2640b
commit
22cdfcf34b
9 files changed
+75
-50
No files matched your search
@@ -49,6 +49,6 @@ pub use snapshot::{DiskCheck, Snapshot};
|
||||
pub use store::{
|
||||
Attachment, BillPreview, DepreciationRun, DisposalPreview, EntryRow, EventRow, InvoicePreview,
|
||||
JOURNAL_FILE, LEGACY_DB_FILE, LOCK_FILE, MAX_RECURRING_RUN, PayrollLineInput, Reconciliation,
|
||||
Statement, Store, Subject, VerifyReport, WriteOffEvidence, database_in_use, db_file, db_file_for,
|
||||
is_database_file,
|
||||
Statement, Store, Subject, VerifyReport, WriteOffEvidence, database_in_use, db_file,
|
||||
db_file_for, is_database_file,
|
||||
};
|
||||
@@ -3747,13 +3747,8 @@ impl Store {
|
||||
let description = format!("Write off invoice {invoice}: {}", reason.trim());
|
||||
let (entry_id, mut journaled) =
|
||||
self.journal_auto_entry(date, &description, bad, ar, amount)?;
|
||||
let written_off = crate::meta::invoice_written_off(
|
||||
invoice,
|
||||
entry_id,
|
||||
date,
|
||||
amount,
|
||||
reason.trim(),
|
||||
);
|
||||
let written_off =
|
||||
crate::meta::invoice_written_off(invoice, entry_id, date, amount, reason.trim());
|
||||
journaled.push(self.append_journal("invoice.written_off", written_off)?);
|
||||
let live = self.ledger.write_off(invoice, date, amount, reason)?;
|
||||
debug_assert_eq!(live, entry_id, "id allocator diverged from journal");
|
||||
|
||||
Reference in new issue
Block a user