Created
March 23, 2015 19:00
-
-
Save hasokeric/075fcfbcd08f8a116129 to your computer and use it in GitHub Desktop.
Epicor oTrans.adapter.NegativeInventoryTest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Check for Negative Inventory, Epicor does Check for this however we have no control | |
* wether we should play the ERROR sound or not unless we check and play the sound | |
* before Epicor makes a Dialog Box appear | |
* | |
* @var partNum | |
* @var lotNum | |
* @var qty | |
* @type Custom Function | |
* @return bool | |
*/ | |
public bool CheckNegativeInventory(string partNum, string lotNum, decimal qty) | |
{ | |
// Get Epicor DataRow | |
DataRow drPO = edvPackOut.dataView[edvPackOut.Row].Row; | |
string pcPartNum = partNum; | |
string pcWhseCode = Convert.ToString(drPO["WarehouseCode"]); | |
string pcBinNum = Convert.ToString(drPO["BinNum"]); | |
string pcLotNum = lotNum; | |
string pcJobNum = Convert.ToString(drPO["JobNum"]); | |
string pcDimCode = Convert.ToString(drPO["InventoryShipUOM"]); | |
decimal pdTranQty = Convert.ToDecimal(qty); | |
string pcNeqQtyAction = string.Empty; | |
string pcMessage = string.Empty; | |
this.oTrans.adapter.NegativeInventoryTest(pcPartNum, pcWhseCode, pcBinNum, pcLotNum, pcDimCode, 1.0m, pdTranQty, out pcNeqQtyAction, out pcMessage); | |
if ((pcMessage != "") && (pcNeqQtyAction == "Ask User")) | |
{ | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment