-
Notifications
You must be signed in to change notification settings - Fork 3
Recharges #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Recharges #426
Changes from all commits
Commits
Show all changes
200 commits
Select commit
Hold shift + click to select a range
d978ec7
Recharges
jSylvestre 28c4f55
Adds invoice type to invoices and teams
jSylvestre 156e9a6
Renames InvoiceTypes to AllowedInvoiceTypes
jSylvestre 2a65b2e
Adds invoice type to invoices and teams
jSylvestre 175348f
Adds EF Core migrations history table
jSylvestre 52d9315
Merge remote-tracking branch 'origin/master' into JCS/RechargesDbChan…
jSylvestre acb5fec
Validates and standardizes invoice types
jSylvestre 195438d
Configures default invoice types for new teams
jSylvestre 968a9dd
Adds type and allowed invoice type to tests
jSylvestre 62d65ed
Merge pull request #427 from ucdavis/JCS/RechargesDbChanges20250915
jSylvestre 73a382f
Adds database migrations on startup
jSylvestre 0defdfc
Merge pull request #430 from ucdavis/JCS/AutoMigrate
jSylvestre f5b73de
Adds invoice type selection to teams
jSylvestre c31935d
Improves form checkbox spacing
jSylvestre 5dab9de
not needed
jSylvestre 703aa9f
Displays allowed invoice type in team details
jSylvestre 05265ab
Restricts invoice type editing to admins.
jSylvestre 8f518ea
Restricts invoice type modification to admins
jSylvestre ed4590e
Merge pull request #431 from ucdavis/JCS/ManageTeamRecharge20250926
jSylvestre d01bde9
Adds RechargeAccount entity
jSylvestre faa64c0
Adds recharge accounts to invoice
jSylvestre f93bcf1
Adds recharge account tests
jSylvestre c86c8e4
Adds recharge account entity
jSylvestre fb00289
Adds user tracking fields
jSylvestre f711917
Adds fields for recharge account audit
jSylvestre 72f79d8
Adds script to create migrations
jSylvestre b382e92
Adds recharge account approval fields
jSylvestre 4ef08de
Adds Recharge Accounts to Invoices
jSylvestre acbfda4
First pass at selecting invoice type
jSylvestre 90360ee
Replaces button-group with toggle for invoice type
jSylvestre ebf75f2
Enhances invoice type toggle appearance
jSylvestre 2a01182
Moves invoice type toggle styles to SCSS
jSylvestre 91d7ca9
Merge pull request #436 from ucdavis/JCS/UIToggle
jSylvestre 18406eb
Adds invoice type validation
jSylvestre 9b0b22b
Adds fields to RechargeAccount tests
jSylvestre 0ca92af
Merge branch 'JCS/TrackEntryApproval' into JCS/Validation20251001
jSylvestre 2b0c9aa
Extracts model errors from ModelState
jSylvestre 9383514
Updates invoice details page title
jSylvestre f87c4dc
Hides discount/tax for Recharge invoices
jSylvestre 97abfd3
Merge pull request #437 from ucdavis/JCS/Validation20251001
jSylvestre f3a2a8d
Merge pull request #435 from ucdavis/JCS/ServerSide20251001
jSylvestre f3212e1
Merge pull request #434 from ucdavis/JCS/TrackEntryApproval
jSylvestre b72c70d
Merge pull request #433 from ucdavis/JCS/RechargeDbNewTable
jSylvestre 3f3a68d
AE Validation for Recharges
jSylvestre bd58f90
Implements recharge account validation
jSylvestre 1291e1b
Refactors account validation logic.
jSylvestre 7a4dd5e
Adds approvers to recharge account validation
jSylvestre ae0c739
Adds recharge account validation logic
jSylvestre ead1a25
Approvers list
jSylvestre fa127af
Merge pull request #438 from ucdavis/JCS/RechargeValidation
jSylvestre e170e01
Adds Recharge Account Item Model
jSylvestre da1966a
WIP
jSylvestre f36bcef
AI stuff
jSylvestre ce7e5e4
Ignores Invoice property during serialization
jSylvestre c541da3
Adds recharge account support to invoices
jSylvestre c7fcf1b
Improves layout of recharge account entries.
jSylvestre 637ecdd
Enhances invoice recharge account display
jSylvestre 1075b5a
Adds CCOA picker functionality to invoice creation
jSylvestre 0372e47
Adjusts layout of recharge accounts table
jSylvestre 81ce600
Validates account amounts on recharge
jSylvestre e51060e
Fixes recharge account creation logic.
jSylvestre 4642df6
Adds recharge accounts control
jSylvestre 6f7bb6d
Validation is still a little funky. Green checkmark appears...
jSylvestre 66ca075
fix test
jSylvestre a81024c
Improves Recharge Accounts Control styling
jSylvestre 6bcbf49
Adds success alert for valid chart strings
jSylvestre 4d9ec37
Validates form before opening send modal
jSylvestre 38ace94
Fixes circular updates in recharge accounts
jSylvestre bd0bd6f
Improves chart string validation and UX
jSylvestre 1198cdf
Recalculates percentages when invoice total changes
jSylvestre 22964ae
Validates credit/debit totals against invoice total
jSylvestre 8b9dcd0
Merge pull request #440 from ucdavis/JCS/AiWorkNeedsReview
jSylvestre a4afee5
Merge pull request #439 from ucdavis/JCS/Recharge20251006
jSylvestre aabb883
WIP Details page
jSylvestre 6032094
Improves invoice total validation for recharge accounts
jSylvestre 9476abc
Merge pull request #441 from ucdavis/JCS/Recharge20251007
jSylvestre 254afbe
Merge remote-tracking branch 'origin/JCS/Recharge2025' into JCS/Recha…
jSylvestre f15d0be
Merge pull request #442 from ucdavis/JCS/FixDebitRechargeValidation
jSylvestre 3dbd1c7
Merge remote-tracking branch 'origin/JCS/Recharge2025' into JCS/Recha…
jSylvestre 5645e33
Displays recharge account details in a table
jSylvestre e44a1ba
Enhances invoice type display in list
jSylvestre 19234f1
Merge pull request #443 from ucdavis/JCS/Recharge20251007
jSylvestre 4219063
Adds recharge invoice payment functionality
jSylvestre 8241e9b
Removes unnecessary style rule
jSylvestre fb29365
Updates invoice email for recharge invoices
jSylvestre fbecbb5
Updates state immutably in account controls
jSylvestre f23a84d
Sanitizes chart string validation messages
jSylvestre cd14f48
Much better.
jSylvestre fb1c547
Merge pull request #446 from ucdavis/JCS/RechargeFixes20251013
jSylvestre d272eb5
Will need new statuses
jSylvestre e1319d4
Merge remote-tracking branch 'origin/JCS/Recharge2025' into JCS/Recha…
jSylvestre f28e619
Update test
jSylvestre 7231dfb
Merge pull request #444 from ucdavis/JCS/Recharge20251009
jSylvestre 6fb2a84
WIP
jSylvestre 123781b
Merge remote-tracking branch 'origin/master' into JCS/Recharge20251014
jSylvestre ce8fc22
WIP, Recharge Pay page
jSylvestre d0c0ec2
stub
jSylvestre 88ee62a
Adds recharge invoice payment feature
jSylvestre 53d77e5
Supports debit-only invoice payments
jSylvestre 5621dde
Simplifies debit account mapping
jSylvestre 8919039
Improves invoice payment validation process
jSylvestre e7f6f03
Improves recharge accounts UI and functionality
jSylvestre 97af1d4
Adds noreferrer to finjector links
jSylvestre 1bef930
Opens Finjector link in new tab
jSylvestre d47ef1a
Looks like it is working payment side, need to check edit invoice
jSylvestre 0bcf38f
Endpoint for a preview page
jSylvestre 3e45c9c
WIP Preview Page
jSylvestre 7234cb3
Enables preview of Recharge invoices
jSylvestre 447e58e
Adds interactive recharge preview
jSylvestre 280deb5
Merge pull request #450 from ucdavis/JCS/RechargePreviewPage
jSylvestre 8eada8b
Merge pull request #448 from ucdavis/JCS/RechargeVibe20251015
jSylvestre 59fdde6
Validates recharge invoice data
jSylvestre 41b9403
Restricts coupons and taxes for recharge invoices
jSylvestre 962d1c1
Enhances recharge invoice validation and processing
jSylvestre b25639f
Validates recharge accounts server-side.
jSylvestre f09f0a6
Includes RechargeAccounts in invoice queries
jSylvestre fbcc8be
Make the download match existing look.
jSylvestre 9bd376c
wip
jSylvestre 3dbb4e3
Improves invoice payment workflow
jSylvestre 96ddec4
Improves recharge payment workflow
jSylvestre 3c64f67
wip
jSylvestre 5650344
Implements recharge account payment processing
jSylvestre 09bfe65
Adds recharge paid by customer history event
jSylvestre 0490750
Improves recharge paid history message
jSylvestre f3527df
Adds support for expandable history details
jSylvestre 94e9740
Improves invoice history details display
jSylvestre 3d3cd8f
Adds recharge account details to invoice history
jSylvestre ac7bb2d
WIP
jSylvestre 73d4800
todos
jSylvestre 56c9914
Sets PaidAt and Status for auto approvals
jSylvestre 4407177
WIP
jSylvestre 9f26b89
Merge branch 'JCS/RechargeServerSide20251029' into JCS/ApproversEmail
jSylvestre eee193a
Adds financial approver email
jSylvestre 136df1b
Adds string truncation helper
jSylvestre 9cf602e
Merge pull request #452 from ucdavis/JCS/ApproversEmail
jSylvestre 5373a92
Truncates memo field in financial approval email
jSylvestre 2202f5e
Adds recharge sent to financial approvers history
jSylvestre c87c39d
Adds tooltips to account validation statuses
jSylvestre 43e5a03
cleanup
jSylvestre ee3a16b
Merge pull request #451 from ucdavis/JCS/RechargeServerSide20251029
jSylvestre f67cb7a
Adds recharge invoice approval workflow
jSylvestre 7098c60
test
jSylvestre c511810
Adds support for financial approval view
jSylvestre 84e495b
Adds recharge rejection functionality
jSylvestre e1beffd
Adds financial approver recharge approval
jSylvestre c7b9c6b
Adds approver check to recharge validation
jSylvestre dc9a429
Merge pull request #455 from ucdavis/JCS/Recharge20251104
jSylvestre ea5355c
Adds financial recharge approval
jSylvestre 139cece
Renames action parameter for recharge approval
jSylvestre 1d8e6ed
Removes redundant debit chart string display
jSylvestre 75ce065
Adds recharge account validation
jSylvestre b65852d
Adds recharge accounts correctly
jSylvestre 37311d9
React cleanup
jSylvestre 2858c8e
Improves button cursor on disabled state.
jSylvestre 5e9db48
Merge pull request #458 from ucdavis/JCS/RechargeReactChanges20251107
jSylvestre 9baf656
Prevents self-approval of recharge accounts
jSylvestre addc076
Adds user creation during emulation
jSylvestre 3252c89
Enhances Recharge Invoice Approval Process
jSylvestre a91b976
Merge pull request #456 from ucdavis/JCS/RechargeApproval20251106
jSylvestre f57c222
Adds checkApprover parameter to recharge validation
jSylvestre c5971ba
Merge pull request #459 from ucdavis/JCS/Recharge20251112
jSylvestre 9582e4c
Sloth money movement
jSylvestre 0c50132
Excludes recharge invoices from money movement job
jSylvestre ebeda39
Adds recharge invoice processing
jSylvestre 927ee9d
Bumps assembly version to 2.0.0.0
jSylvestre 1bc79c6
Adds Approved status to Invoice
jSylvestre 6739456
Adds recharge money movement job
jSylvestre 7fb61c4
Cleans up MoneyMovementJob and configures PaymentsApi
jSylvestre 3288e8d
Enables recharge validation and improves job logging
jSylvestre 318e693
Allows resending of Recharge invoices
jSylvestre e67c4e9
Handles Sloth transaction errors better
jSylvestre a975ef5
Updates recharge sloth integration
jSylvestre 3c3e7f5
This will not compile.
jSylvestre 9ce92ec
Updates recharge process to use sloth transactions
jSylvestre e2b3a15
Merge pull request #460 from ucdavis/JCS/RechargeSloth
jSylvestre bcb81e2
Updates receipt link
jSylvestre 2d40d66
Adds recharge invoice functionality
jSylvestre cb6992e
Merge pull request #461 from ucdavis/JCS/Recharge20251114
jSylvestre ff992ed
Adds recharge auto-approval functionality
jSylvestre 9710a99
Adds auto-approve job for recharge invoices
jSylvestre 2db486a
Adds auto-approve job to the pipeline
jSylvestre 98daf29
Removes AggieEnterprise settings
jSylvestre e06471f
Downgrades AutoApprove job to net6.0
jSylvestre 623dde2
Updates app name for auto-approve job
jSylvestre ce128ff
Updates AutoApprove job project path
jSylvestre d4bf652
Removes unnecessary database save
jSylvestre 85b9935
Improves recharge invoice approval flow
jSylvestre f07666f
Merge pull request #463 from ucdavis/JCS/Recharge20251117
jSylvestre 4454488
Streamlines recharge invoice approval
jSylvestre a04ee70
Merge pull request #464 from ucdavis/JCS/Recharge20251117
jSylvestre 51b0143
Adds recharge approval history
jSylvestre 1a64af7
Not used from here
jSylvestre 6953dc6
Enables recharge financial segment validation
jSylvestre 2b7ddbf
Merge pull request #462 from ucdavis/JCS/RechargeAutoApproveJob
jSylvestre f35b8c9
oops
jSylvestre f078efe
Hides payment details for recharge invoices
jSylvestre 0539364
Processes recharge invoices for Sloth upload
jSylvestre ee461fa
Improves chart string validation display
jSylvestre dc32a1d
Merge pull request #467 from ucdavis/JCS/RechargeSanatize
jSylvestre 42a9768
Merge pull request #466 from ucdavis/JCS/Recharge20251119
jSylvestre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
Payments.Jobs.AutoApprove/Payments.Jobs.AutoApprove.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net6.0</TargetFramework> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\src\Payments.Core\Payments.Core.csproj" /> | ||
| <ProjectReference Include="..\src\Payments.Jobs.Core\Payments.Jobs.Core.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <None Update="appsettings.json"> | ||
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory> | ||
| </None> | ||
| <None Update="run.cmd"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
| <None Update="settings.job"> | ||
| <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
| </None> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| using Microsoft.EntityFrameworkCore; | ||
| using Microsoft.Extensions.Configuration; | ||
| using Microsoft.Extensions.DependencyInjection; | ||
| using Microsoft.Extensions.Options; | ||
| using Payments.Core.Data; | ||
| using Payments.Core.Domain; | ||
| using Payments.Core.Jobs; | ||
| using Payments.Core.Models.Configuration; | ||
| using Payments.Core.Models.History; | ||
| using Payments.Core.Services; | ||
| using Payments.Jobs.Core; | ||
| using Serilog; | ||
| using System; | ||
|
|
||
| namespace Payments.Jobs.MoneyMovement | ||
| { | ||
| public class Program : JobBase | ||
| { | ||
| private static ILogger _log; | ||
|
|
||
| public static void Main(string[] args) | ||
| { | ||
| // setup env | ||
| Configure(); | ||
|
|
||
|
|
||
| _log = Log.Logger | ||
| .ForContext("jobname", "AutoApprove"); | ||
|
|
||
| var assembyName = typeof(Program).Assembly.GetName(); | ||
| _log.Information("Running {job} build {build}", assembyName.Name, assembyName.Version); | ||
| _log.Information("AutoApprove Version 1"); | ||
|
|
||
| // setup di | ||
| var provider = ConfigureServices(); | ||
| var dbContext = provider.GetService<ApplicationDbContext>(); | ||
|
|
||
|
|
||
| try | ||
| { | ||
| if(dbContext == null) | ||
| { | ||
| throw new InvalidOperationException("Failed to obtain ApplicationDbContext from service provider."); | ||
| } | ||
| var financeSettings = provider.GetService<IOptions<FinanceSettings>>()?.Value; | ||
| if (financeSettings == null) | ||
| { | ||
| throw new InvalidOperationException("FinanceSettings configuration is missing or invalid."); | ||
| } | ||
| var daysToAutoApprove = financeSettings.RechargeAutoApproveDays; | ||
| var dateThreshold = DateTime.UtcNow.AddDays(-daysToAutoApprove); | ||
|
|
||
| var invoices = dbContext.Invoices | ||
| .Include(i => i.RechargeAccounts) | ||
| .Where(a => a.Type == Invoice.InvoiceTypes.Recharge && a.Status == Invoice.StatusCodes.PendingApproval && | ||
| a.PaidAt != null && a.PaidAt <= dateThreshold).ToList(); | ||
| _log.Information("Found {count} invoices to auto-approve", invoices.Count); | ||
| foreach (var invoice in invoices) | ||
| { | ||
| invoice.Status = Invoice.StatusCodes.Approved; | ||
| foreach (var ra in invoice.RechargeAccounts.Where(a => a.Direction == RechargeAccount.CreditDebit.Debit && string.IsNullOrWhiteSpace( a.ApprovedByKerb))) | ||
| { | ||
| ra.ApprovedByKerb = "Automated"; | ||
| ra.ApprovedByName = "System"; | ||
| } | ||
|
|
||
| invoice.Paid = true; | ||
|
|
||
| var approvalAction = new History() | ||
| { | ||
| Type = HistoryActionTypes.RechargeApprovedByFinancialApprover.TypeCode, | ||
| ActionDateTime = DateTime.UtcNow, | ||
| Actor = "System", | ||
| Data = "All debit recharge accounts have been approved." | ||
| }; | ||
|
|
||
| invoice.History.Add(approvalAction); | ||
| dbContext.Invoices.Update(invoice); | ||
| _log.Information("Auto-approved invoice {invoiceId}", invoice.Id); | ||
|
|
||
| dbContext.SaveChanges(); | ||
| } | ||
| } | ||
| catch (Exception ex) | ||
| { | ||
|
|
||
| _log.Error("Error running AutoApprove job", ex); | ||
| throw; | ||
| } | ||
|
|
||
| _log.Information("AutoApprove job completed"); | ||
|
|
||
| } | ||
|
|
||
| private static ServiceProvider ConfigureServices() | ||
| { | ||
| IServiceCollection services = new ServiceCollection(); | ||
|
|
||
| // options files | ||
| services.Configure<FinanceSettings>(Configuration.GetSection("Finance")); | ||
|
|
||
|
|
||
| // db service | ||
| services.AddDbContext<ApplicationDbContext>(options => | ||
| options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")) | ||
| ); | ||
|
|
||
|
|
||
|
|
||
| return services.BuildServiceProvider(); | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "profiles": { | ||
| "Payments.Jobs.AutoApprove": { | ||
| "commandName": "Project", | ||
| "environmentVariables": { | ||
| "ASPNETCORE_ENVIRONMENT": "Development" | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "ConnectionStrings": { | ||
| "DefaultConnection": "Data Source=.\\SQLExpress;Initial Catalog=Payments;Integrated Security=True;MultipleActiveResultSets=True" | ||
| }, | ||
| "Logging": { | ||
| "LogLevel": { | ||
| "Default": "Warning" | ||
| } | ||
| }, | ||
| "Finance": { | ||
| "RechargeAutoApproveDays": 7 | ||
| }, | ||
| "Stackify": { | ||
| "AppName": "payments.jobs.autoapprove", | ||
| "ApiKey": "[External]", | ||
| "Environment": "[External]" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| @echo off | ||
|
|
||
| dotnet Payments.Jobs.AutoApprove.dll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "schedule": "0 0 6 * * *" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| using System; | ||
| using System.ComponentModel.DataAnnotations; | ||
| using Payments.Core.Domain; | ||
|
|
||
| namespace Payments.Core.Attributes | ||
| { | ||
| /// <summary> | ||
| /// Validates that the invoice type is one of the valid invoice types defined in Invoice.InvoiceTypes | ||
| /// </summary> | ||
| public class ValidInvoiceTypeAttribute : ValidationAttribute | ||
| { | ||
| public override bool IsValid(object value) | ||
| { | ||
| if (value == null) | ||
| { | ||
| return false; // Required attribute should handle null values | ||
| } | ||
|
|
||
| var stringValue = value.ToString(); | ||
|
|
||
| // Check against the constants defined in Invoice.InvoiceTypes | ||
| return stringValue == Invoice.InvoiceTypes.CreditCard || | ||
| stringValue == Invoice.InvoiceTypes.Recharge; | ||
| } | ||
|
|
||
| public override string FormatErrorMessage(string name) | ||
| { | ||
| return $"The {name} field must be either '{Invoice.InvoiceTypes.CreditCard}' or '{Invoice.InvoiceTypes.Recharge}'."; | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| @echo off | ||
| REM Check for exactly one argument | ||
| REM from package manager console .\CreateMigration.bat MigrationName | ||
| IF "%~1"=="" ( | ||
| echo 1 argument required, 0 provided. Usage: CreateMigration.bat MigrationName | ||
| exit /b 1 | ||
| ) | ||
|
|
||
| dotnet ef migrations add %1 --context ApplicationDbContext --output-dir Migrations --startup-project ../Payments.Mvc --project ../Payments.Core | ||
|
|
||
| echo All done | ||
jSylvestre marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect namespace.
The namespace is
Payments.Jobs.MoneyMovementbut this is the AutoApprove job. This copy-paste error could cause confusion and potential namespace conflicts.Apply this diff:
📝 Committable suggestion
🤖 Prompt for AI Agents