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