Hey there,
We have an implementation where the customer has 8 plants, with only one plant live so far.
All orders are going into Epicor, and then we’re issuing zero dollar drop ship POs to the other plants and they ship from there. We enter the drop shipments and invoice the customer, but we never match a vendor invoice to the PO. This generates lots and lots of received/not invoiced POs.
I have a customization going that will look for drop ships for specific vendors and create new GRNI invoice just fine. But having issues creating the receipt detail.
Here’s the code:
foreach (DataRow row in dtDropShipPO.Rows)
{
int poNum = Convert.ToInt32(row["DropShipDtl_PONum"]);
oTrans.GetNewManualGRNIClearing();
edvAPInvHed.CurrentDataRow["REFPONum"] = row["DropShipDtl_PONum"];
edvAPInvHed.CurrentDataRow["InvoiceDate"] = invoiceDate;
//oTrans.ValidateGNRIClearingCreation();
numRecs ++;
// detail
MessageBox.Show("po " + poNum.ToString());
getDropShipRecNotInvDtl(poNum);
foreach (DataRow rowDtl in dtDropShipDtl.Rows)
{
**oTrans.GetNewAPInvDtl("REC"); // tried a type of R, REC, and RECEIVE**
MessageBox.Show("new row " + edvAPInvDtl.Row.ToString()); **// SHOWS ROW = -1**
edvAPInvDtl.CurrentDataRow.BeginEdit();
edvAPInvDtl.CurrentDataRow["DropShipPackSlip"] = Convert.ToInt32(rowDtl["DropShipDtl_PackSlip"]);
edvAPInvDtl.CurrentDataRow["DropShipPackLine"] = Convert.ToInt32(rowDtl["DropShipDtl_PackLine"]);
edvAPInvDtl.CurrentDataRow.EndEdit();
MessageBox.Show("after");
}
}
MessageBox.Show(numRecs.ToString() + " Records created.");
I’m trying to create an entry in APinvDtl of type “receipt.” But after the line:
oTrans.GetNewAPInvDtl(“REC”); (I tried “R” which is what winds up in APInvDtl.LineType, and also “RECEIPT”)
No error at that point, but there isn’t a new record generated. At the message just following the row equals -1, and then I get an error trying to assign the pack list num.
Anyone done something like this?
I’ve thought about entering invoices via DMT, but don’t want them to have to do this every month until the project gets completed.
I also can generate a tool click with “New Receipt Line” but still have to go through manually selecting hundreds of drop ship detail lines.
Thanks,
Joe