Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/Payments.Core/Domain/Team.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,23 @@ public Team()

public bool SlothAutoApprove { get; set; } = false;

/// <summary>
/// This will be a system admin setting.
/// It will relax the rules for Aggie Enterprise chart string validation.
/// The idea is that an application using the API will determine what is valid or not.
///
/// Possibly we could have an invoice value that could be specified instead if we wanted to get that fancy.
/// </summary>
public bool UseCustomAccountValidation { get; set; } = false;

/// <summary>
/// This will be a system admin setting.
/// This may be used if UseCustomAccountValidation is true.
/// If it is, the recharge debit natural account/expenditure type will be replaced
/// </summary>
[StringLength(6)]
public string RechargeDebitNaturalAccount { get; set; }

[NotMapped]
public FinancialAccount DefaultAccount {
get {
Expand Down
2 changes: 1 addition & 1 deletion src/Payments.Core/Jobs/MoneyMovementJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public async Task FindBankReconcileTransactions(ILogger log)
if (accountOverride != null)
{
//Do we want to validate? Sloth will validate (based on the current config setting in prod), but we can do it here to avoid a failed transaction. This is a bit of a judgement call. If we don't validate, the transaction will fail and the invoice will stay in paid status. If we do validate, the invoice will be rejected and the user will have to fix it.
var validationResult = await _aggieEnterpriseService.IsAccountValid(accountOverride.FinancialSegmentString);
var validationResult = await _aggieEnterpriseService.IsAccountValid(accountOverride.FinancialSegmentString, team);
if (validationResult.IsValid)
{
incomeAeAccount = validationResult.ChartString ?? accountOverride.FinancialSegmentString;
Expand Down
Loading
Loading