* Hardcoded one order to process for Brose for testing purposes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user