* Hardcoded one order to process for Brose for testing purposes

This commit is contained in:
2025-12-13 13:36:57 +01:00
parent 3da28b4771
commit a25dd5720c

View File

@@ -28,6 +28,8 @@ public class ClientBrose(
{
public new async Task<EdiCustomerOrderDto?> ProcessClientOrder(OrderModel orderModel)
{
if (orderModel.ScheduleOrderDto.PONum != "5500284923") return null;
EdiCustomerOrderDto? ediCustomerOrderDto = await base.ProcessClientOrder(orderModel);
string wzNumber =
@@ -155,7 +157,6 @@ public class ClientBrose(
int daysToSubtract = ((int)ediDate.DayOfWeek - (int)DayOfWeek.Thursday + 7) % 7;
DateTime sendingDate = ediDate.AddDays(-daysToSubtract);
// If we're before Thursday, we need the previous Thursday
if (sendingDate.DayOfWeek < DayOfWeek.Thursday)
sendingDate = sendingDate.AddDays(-7);
@@ -178,14 +179,15 @@ public class ClientBrose(
(int, int) boxes = (1, quantity);
if (GetRemainderAndQuantity(quantity, 2272, out int quotient, out var qty) ||
GetRemainderAndQuantity(quantity, 3550, out quotient, out qty))
GetRemainderAndQuantity(quantity, 3550, out quotient, out qty) ||
GetRemainderAndQuantity(quantity, 2000, out quotient, out qty))
{
return (quotient, qty);
}
return boxes;
}
private bool GetRemainderAndQuantity(int qty, int divider, out int quotient, out int quantity)
{
quotient = 1;