06.03.2014, 17:25 | #1 |
Участник
|
PurchLine update conflict ??
Мне нужно присвоить новые значения полю PurchLine.PurchReceivedNow , код приблизительно такой:
X++: ttsBegin; while select forupdate purchLine order by Confirmeddlv where purchLine.PurchId == purchId && purchLine.ItemId == itemId && purchLine.PurchStatus == PurchStatus::Backorder && (!purchLine.IsDeleted) exists join InventDim where lalala { // purchLine.reread(); if (receivedQty >= purchLine.RemainPurchPhysical) { purchLine.PurchReceivedNow = purchLine.RemainPurchPhysical; receivedQty -= purchLine.RemainPurchPhysical; } else { purchLine.PurchReceivedNow = receivedQty; receivedQty = 0; } purchLine.setInventReceivedNow(); purchLine.Tax1099Amount = 0; purchLine.Tax1099StateAmount = 0; if (purchLine.validateWrite()) { purchLine.update(); } else { throw error('my error'); } } Ax2012 R2 Последний раз редактировалось IKA; 06.03.2014 в 17:35. |
|
Теги |
ax2012, ax2012r2 |
|
|