Do Not Ship Before

Does the Do Not Ship Before field have any functionality in the system or is it reference only?

It appears in the following tables…

image

(Thought that might help)

EDIT: See this for the Schema as a Help file.

1 Like

I know the OrderAlloc BO method CheckDates() will throw just a Warning not an Exception if DoNotShipBeforeDate or DoNotShipAfterDate are outside the DateTime.Now Window

Warning: you are processing one or more releases outside of their Do Not Ship Before/After Date.

I would assume it would CheckDates during PackOut or somewhere within Shipping.

Just tested it, it doesn’t. Of course it doesn’t why wouldn’t it LOL!

It might only be used then on Order Alloc Entry not even sure what that Form is… Ran a used by on the Method looks like the only place in the Entire Epicor Directory I found it in was:

  • OrderAllocAdapter
  • OrderAllocEntry
1 Like

That’s ok i’ll build a BPM and post it here in case anyone else runs into this.

2 Likes

Fires on POFindBuffer in CustShip that way when it matches the row to what’s on the order we can shoot that down.

image

foreach(var row in ttPackOut.Where(x => x.SysRowID == rowident))
{
  // Get the order line detail and see if there is a do not ship before or after
  var ord = Db.OrderDtl.With(LockHint.NoLock).Where(x => x.Company == row.Company && x.OrderNum == row.OrderNum && x.OrderLine == row.OrderLine).FirstOrDefault();
  if(ord != null && (ord.DoNotShipBeforeDate != null || ord.DoNotShipAfterDate != null))
  {
    // Check if it has a do not ship before
    if(ord.DoNotShipBeforeDate > this.BaqConstants.Today)
    {
      found = 0;
      rowident = Guid.Empty;
      throw new Ice.BLException($"Order {ord.OrderNum} line {ord.OrderLine} is not to ship before {((DateTime)ord.DoNotShipBeforeDate).ToString("MM/dd/yyyy")}. Do not pack this out!");
    }
    // Check if it has a do not ship after
    if(ord.DoNotShipAfterDate < this.BaqConstants.Today)
    {
      found = 0;
      rowident = Guid.Empty;
      throw new Ice.BLException($"Order {ord.OrderNum} line {ord.OrderLine} is not to ship after {((DateTime)ord.DoNotShipAfterDate).ToString("MM/dd/yyyy")}. Please contact customer service.");
    }
  }
}
2 Likes

I know this topic has been resolved, but I am curious as to where I can find this field. Can it be modified from Order Entry?

Yes I believe it’s on the line and the release. Not 100% if it’s actually exposed in the UI though. We’ve been customized so long now I couldn’t tell you what is real and what isn’t off the top of my head lol

1 Like

Just curious here.

Can we drop the ‘!= null’ from the If statement expressions?

C# typically only will let you if its a boolean. One thing people do use instead often is.

if (string.IsNullOrEmpty(variable)) { }

1 Like

No because I am using “ord” to evaluate other values and if I don’t check if “ord” is null first I will get instance of an object exceptions trying to get to the properties.

@jgiese.wci
I know this is old… but I was wondering how the DoNotShipBeforeDate is initially being set.
It doesn’t look like anything native does that, are you using a BPM and if so, how are you determining the value?

Our Service reps set it manually when required

2 Likes

To my knowledge this field is for orders coming in through EDI, where customers give the date in their POs… There is also a DoNotShipAfterDate. We use this field to record the CancelAfterDate given by one of our customers in their PO sent through EDI.

1 Like