|
11.09.2013, 17:41 | #1 |
MCTS
|
Проводки переноса в AX2012
В методе TransferInventTransOrigin таблицы InventTrans есть код, который вычисяет номер лота связанной проводки переноса (по отношению к текущей проводке):
X++: // don't combine the statements below as that most likely results in wide index scans instead of narrow index seeks. if (this.Qty <= 0) { // This is most likely the standard issue of a transfer so try that first. select firstonly inventTransOrigin exists join inventTransOriginTransfer where inventTransOriginTransfer.IssueInventTransOrigin == this.InventTransOrigin && inventTransOriginTransfer.ReceiptInventTransOrigin == inventTransOrigin.RecId; if (!inventTransOrigin.RecId) { // This wasn't the issue - try the receipt select firstonly inventTransOrigin exists join inventTransOriginTransfer where inventTransOriginTransfer.IssueInventTransOrigin == inventTransOrigin.RecId && inventTransOriginTransfer.ReceiptInventTransOrigin == this.InventTransOrigin; } } else { // This is most likely the standard receipt of a transfer so try that first. select firstonly inventTransOrigin exists join inventTransOriginTransfer where inventTransOriginTransfer.IssueInventTransOrigin == inventTransOrigin.RecId && inventTransOriginTransfer.ReceiptInventTransOrigin == this.InventTransOrigin; if (!inventTransOrigin.RecId) { // This wasn't the receipt - try the issue select firstonly inventTransOrigin exists join inventTransOriginTransfer where inventTransOriginTransfer.IssueInventTransOrigin == this.InventTransOrigin && inventTransOriginTransfer.ReceiptInventTransOrigin == inventTransOrigin.RecId; } }
__________________
I could tell you, but then I would have to bill you. |
|
|
|