Job Quantities Claimed to Inventory without Material Issued

Hello Community,
I am in need of someone with a little more experience here to bounce some ideas around and maybe get a little guidance on how to resolve a problem my company is experiencing.

My company produces to inventory and we are always having problems with inventory count on component parts being off.

There are several reasons why this issue exists.

  1. We have a LOT of new hires that forget to issue piece parts/subcomponents to the job during kitting operations.

  2. We store a LOT of our parts in our Cleanrooms and the Cleanroom staff are not authorized to issue part to the job (this cannot be changed due to past problems of issuing double the part and other things). So when the parts reach inventory our staff is unaware that parts still need to be issued to the job for our previous cleanroom operation.

  3. When our Shipping/Inventory department goes to claim parts using Job Receipt to Inventory, the system does not tell them that there were unclaimed material quantities on the job.

I was wondering if there was a way to put a hard stop into place when we are doing a MFG receipt into stock if all the material is not issued. Clearly with all the new people back in our shipping department it is happening more often and parts are being put into stock without the lower level components being issued to the job. This is a problem for everyone because the job gets closed and planning thinks we have parts that don’t exist due to the job being closed and part never issued.

We had a part that told us there were 6000 parts on hand, when in reality we only had 50 left… This is a BIG Problem.

We currently have C# code that produces a warning when Inventory tries to claim more then the produced qty on the previous operation (see image below).

Maybe there could be a way to check that all the material for the complete quantity has been issued before allowing the transaction, not just the transaction quantity of the previous operation. You know, to ‘dummy’ proof the process and completely prevent this from happening in the future. Or are there issues that could make this a bad idea.
Or…
I thought of putting a kitting operation before inventory forcing them to claim the cleanroom parts, but this adds another step in the process. However this could be the easies/quickest fix.

Please let me know your thoughts and if maybe I am missing something within Epicor that could resolve this. Are any of you doing something to mitigate the issuing (or the lack of) wrong quantities or claiming of wrong quantities?

Please share your thoughts and knowledge, I would GREATLY appreciate any help. :slight_smile:

-Bekka-

A BPM could be made that checks all the “Issued Complete” fields for a job, and prevents receipt if not all materials have been issued. But this wouldn’t prevent over issues, prior to receipt.

Rather than merely looking up the boolean, you could sum up the variance in the job.

Abs(JobMtl.Issued Qty - JobMtl.RequiredQty)

Basic way would be if sum of the above > 0, then throw error. However, I’d probably add a custom field(s) on the site/part class/part etc. to store an acceptable variance. No reason to hold up everything because someone fat fingered a 2 cent screw. That might mean comparing the cost of the issued mtl, which is also in the JobMtl table.

Those are great ideas, but I think there would be an issue based on the way my company handles their jobs. We might have a job of 200 parts out on the floor, however 50 may be already in inventory, 100 may be in cleanroom and 50 might still be on the machine… I need a way to verify that the correct number of subcomponents have been issued per the completed quantities of parts going into inventory.

Example:
Parent Part: Metal Plate with 200 holes
Job Qty: 500
Subcomponent 1:1/2" Pins
Qty Needed: 50 EA
Subcomponent 2: 1/4" Pins
Qty Needed: 10 EA

If Inventory is trying to claim 25 parts into inventory, I need the system to see that the following has been issued to the job before they can claim the parts into the system:
Parent Part: Metal Plate with 200 holes
Inventory Qty: 25 plates
Subcomponent 1:1/2" Pins
Issued Qty Needed: 1250 EA
Subcomponent 2: 1/4" Pins
Issued Qty Needed: 250 EA

If these quantities are shown as issued to the job, then allow the transaction. If not, stop the transaction and issue an warning informing them they need to claim the correct qty of subcomponents.
I hope that made sense.
Do you think this could be handled by a method directive?

Made perfect sense. And a BPM could handle all that.

You’d probably want to use Erp.ReceiptsFromMfg.ReceiveMfgPartToInventory. A Pre-Proc to throw an exception when the materials required for (Qty to receive + previous Receipts) is more than the actual material issues. This isn’t hard to do - unless you use multi-level BOM’s. Because then you’d need to make sure all the components of the sub-assemblies have also been issued.

@Sire - have you considered using back flushing?

I guess my company used backflush in the past and it caused many problems. Now when you mention it they flinch. I have asked our Inventory department if we could try it, but they haven’t agreed to it yet…

1 Like

It really is best implement as all or nothing, and not always great when doing make to order. Especially if there is long time between the part being used, and the assembly/parent being completed. During that time it looks like it is in stock, when it is not.

Do you report quantities completed? You could put a BPM in there to prevent accepting qty’s completed if insufficient materials have been issued. Then also prevent receipts to inventory, when Qty Completed is less than Qty to receive.

It’s fairly straightforward … until all the “exceptions” start to show up. You don’t want to have the system do a hard stop if material wasn’t really need.

For example, an assembly needs 20 ounces of epoxy. Because 2 oz is always left in the mixing cup, the job needs 22 oz. Say another job needs 17 oz (15 for the assembly, and 2 for waste). If you’re about to do both jobs, you might only dispense 37 oz (20 for the 1st job, 15 for the 2nd, and the 2 for the waste). In that scenario, you’d have to issue 22 to job 1 and 17 to job 2. If you split the 2 oz of waste between the jobs, then each would be “under issued” and you couldn’t continue.

Yeah, I think that is what happened and we ended up being late on a ton of orders. Never a good thing.

We do use quantities completed. Actually the previous person setup a BPM preventing the transaction to inventory if Trans Qty > Qty available to complete.

Where I am stuck in creating this BPM is how do I get it to check all BOM items and their issued Qty’s. I need to have it check each BOM line. See my thought process is Prevent Transaction if each BOM item’s Qty isn’t equal to Required Qty X Completed Qty. However finding the correct fields to accomplish this is proving to be a slight challenge.
Can I just write code in a condition stating JobMtl.IssuedQty… Or do I need a invoke BO method to get access to the table first then have the condition. Also, is there potential issue with my process?

By the way, thank you for helping me. I really appreciate it.:slight_smile:

The biggest potential issue would be if your BOM’s are multi level with phantom assemblies. Because then for the top level, you’d need to walk into the lower levels to see if they were issued enough.

If it is just to check to see if enough material has been issued prior to accepting the qty completed entry (an not multiple BOM levels), that could be done with a fairly simple BPM using widgets alone. If you’re comfortable writing code, then maybe just start from there and you could include what’s required for mult-level BOMs from the get go.

We do not use multi-level BOMs.

If it can be done using widgets alone, which field in PartTrans would be used to check the issued qty of the BOM items? I only see TransQty, ActTransQty, QtyCompleted, and QtyAvailComplete. I would think to use the Condition Field with The ‘Specific Field’ of the ‘Changed’ Row is ‘Equal to’ the ‘Specific Expression’. However, PartTrans only seems to have cost for MTL listed in the context fields.

I wouldn’t want to take the QtyCompleted multiplied by the TransQty because wouldn’t that just multiply it by any Transaction Qty in record? And where would you get the Required Qty to multiply by the QtyCompleted without pulling the Job/methods details… I think I am missing something or I am not connecting the dots correctly. Hmm…

Turns out that it can’t be done with just widgets (at least not very easily). So instead, just loop through the JobMtl records for the Job and AsmSeq, comparing the previous issues to the total needed.

JobHead has the field QtyCompleted, which you can use to determine prior entries of completed quantities.

JobMtl has fields QtyPer and IssuedQty. You can use IssuedQty to determine the qty of each mater issued so far.

The BO Labor, has a method DefaultLaborQty, which you can put a pre-proc BPM on. One of the parameters in that method is laborQty. This is the value that was entered in the Qty Completed field in labor entry.

In a pre-proc for Labor.DefaultLaborQty():

  1. Create the following variables:
    image

  2. Add the widgets as shown:
    image

  3. In Set JobNum:
    image

  4. In Set AsmSeq:
    image

  5. In Loop Thru JobMtls:

Custom Code
dbg = "";   // clear debuging string
ErrorCount = 0; // clear count of materials with insufficient issues 

// get the prior Completed Qty for this job
PriorQtyComp = Db.JobHead
  .Where( r =>r.Company == callContextClient.CurrentCompany 
    && r.JobNum == JobNum)
  .Select(r =>r.QtyCompleted)
  .DefaultIfEmpty(0m)
  .FirstOrDefault();

// calc total qtyy completed (prior plus this qty)
ReqQty = PriorQtyComp + laborQty;

// set the debug message
dbg = "MtlSeq" + "\t" + "PartNum" + "\t" + "QtyIssued" + "\t" + "Qty Required" + "\n";

// loop though each JobMtl for the matching JobNum and AsmSeq
foreach (var jm in (from JobMtl_Row in Db.JobMtl where
  JobMtl_Row.JobNum == JobNum && JobMtl_Row.AssemblySeq == AsmSeq
  select JobMtl_Row)){
    // check if total qty of material issues is greater than qty already issued
    if(  (jm.QtyPer * ReqQty) > jm.IssuedQty){
      ErrorCount++;
      dbg = dbg + "*";  // put an '*' at strt of material rows with under issues
      }
    else{
      dbg = dbg + " ";
      }
    // add rows of debug info, from the JobMtl record
    dbg = dbg + jm.MtlSeq.ToString() + "\t";
    dbg = dbg + jm.PartNum + "\t";
    dbg = dbg + jm.IssuedQty.ToString() + "\t";
    dbg = dbg + (jm.QtyPer * ReqQty).ToString() +  "\n";
    }

// update (or clear) debug message if any "errors" exist 
if(ErrorCount > 0){
    dbg = dbg + "\n\n !!! " + ErrorCount.ToString() + " Mtl(s) have not been sufficiently Issued to Job\n";
    }
else {
    dbg = "";
    }
  1. In the Condition:
    image

  2. In the Exception, put whatever you want to show to the user, that there have not been enough materials issued. The variable dbg holds a message about the under issued materials. So include it in the Exception, if you want.

  3. The other Message box was really just for debugging. Or you can show a message that there have been enough materials issued.

The result is:

Please share your custom code, thank you, and have fun every day

Click the triangle in my post. It will expand to show the code.

image

1 Like

It works, thank you so much for sharing

I also have a small problem, the MtlSeq display is randomly sorted without sorting by size, do you have a solution?Please check the attachment, thank you very much for your help
新建 Microsoft Office Word 文档.docx (77.6 KB)