Replace the hand-rolled model.Copy(target) pattern in every SaveXxx with FindIndex -> in-place replace (or Add on new). Move the two hidden defaults out of the deleted Copy bodies: Currency = "CHF" default now lives in AccountRepository.SaveAccount; BookingDate = ValueDate default now lives in TransactionRepository.SaveTransaction. Delete Copy from Account, BookingRule, BookingText, SubClass, and SplitPredefinition. Keep Transaction.Clone() (renamed from Copy, and now includes RelatedParty) for the defensive copy in GetTransaction and ViewService.WithDisplaySign. Fixes a pre-existing bug where Transaction.Copy silently dropped RelatedParty on every update save. 42 tests total, all passing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
13 lines
No EOL
275 B
C#
13 lines
No EOL
275 B
C#
namespace Schaad.Accounting.Models
|
|
{
|
|
public class SplitPredefinition
|
|
{
|
|
public string Id { get; set; }
|
|
|
|
public string BookingText { get; set; }
|
|
|
|
public decimal BookingValue { get; set; }
|
|
|
|
public string AccountId { get; set; }
|
|
}
|
|
} |