Skip to content
Merged

Dev #1572

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
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public class InvoiceService(
if (site != null && site.Supplier != null && site.Supplier.Number != null && accountDistributionCode != null)
{
// This can not be UTC Now it is sent to cas and can not be in the future - this is not being stored in Unity as a date
var localDateTime = DateTime.UtcNow.ToLocalTime();
var vancouverTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
var localDateTime = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, vancouverTimeZone);
var currentMonth = localDateTime.ToString("MMM").Trim('.');
var currentDay = localDateTime.ToString("dd");
var currentYear = localDateTime.ToString("yyyy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,17 @@ public virtual async Task<List<PaymentRequestDto>> UpdateStatusAsync(List<Update
try
{
var payment = await paymentRequestsRepository.GetAsync(dto.PaymentRequestId);
payment.SetNote(dto.Note);
if (payment == null)
continue;

if (!string.IsNullOrWhiteSpace(payment.Note) && !string.IsNullOrWhiteSpace(dto.Note))
{
payment.SetNote($"{payment.Note}; {dto.Note}");
}
else
{
payment.SetNote(dto.Note);
}

var triggerAction = await DetermineTriggerActionAsync(dto, payment);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ public async Task<IActionResult> OnPostAsync()
.Select(payment => new UpdatePaymentStatusRequestDto
{
PaymentRequestId = payment.Id,
IsApprove = IsApproval
IsApprove = IsApproval,
Note = Note ?? String.Empty
})
.ToList();

Expand Down