From a25dd5720c9252cf304250b7bfed5b2a368e0680 Mon Sep 17 00:00:00 2001 From: trencik91 Date: Sat, 13 Dec 2025 13:36:57 +0100 Subject: [PATCH] * Hardcoded one order to process for Brose for testing purposes --- DelforSender/Clients/Brose/ClientBrose.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DelforSender/Clients/Brose/ClientBrose.cs b/DelforSender/Clients/Brose/ClientBrose.cs index c110650..10b09fd 100644 --- a/DelforSender/Clients/Brose/ClientBrose.cs +++ b/DelforSender/Clients/Brose/ClientBrose.cs @@ -28,6 +28,8 @@ public class ClientBrose( { public new async Task 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;