Dynamics ax 2012 The quantity cannot be reduced in sales order

Error in Ax 2012: The quantity cannot be reduced. The number of inventory transactions on order is too low because the quantity or part of it is referenced by an output order or a production order or is marked against other transactions

Steps to repro this error:
  1. Create SO with 20 quantities.

  2. Perform Picking List with 20 quantities

  3. Perform Picking List registration with 10 quantities

  4. Perform packing slip with 10 quantities

Now, reduce the quantity @ SO line from 20 to 15. System throws the following error message;

1.jpeg

To overcome this issue:
Click on Inventory -> Output order

2.jpeg

System will not allow to select Output order menu unless quantity is changed back from 15 to 20. Change the Sales line quantity from 15 to 20 and click on Output order menu.
New form will open (Output order), click on Functions -> End inventory order

3.png

Once clicked on End inventory order, system opens the following dialog box;

4.png

Click on Ok button.
Close the output order form.

Now edit the quantity in SO line, it will allow to edit the quantity without any errors.


If you can't handle it up here

Cancel the deliver remainder 

X++

static void _CancelDeliverReminder(Args _args)

{

InventTransOrigin o;

InventTrans i;

WMSOrderTrans r;

   SalesLine s;

ttsbegin;

while select forupdate i

   join o where i.InventTransOrigin == o.recid && !i.datephysical// && i.InventTransOrigin == 5637377135 //&& o.InventTransId =='LOT185976'

   join s where s.inventtransid == o.InventTransId && s.LineNum == 2

           && o.ReferenceId == 'SO002304'

       && !i.DatePhysical

{

   select

        r where r.inventtransid == o.inventtransid

       && r.expeditionStatus == WMSExpeditionStatus::Activated;

   if (!r)

   {

      i.TransChildRefId = '';

      i.TransChildType = InventTransChildType::None;

       info(strFmt('%1, %2, %3',s.LineNum,s.SalesId,i.recid));
       
       i.update();

   }

   else

       info(strFmt('Cannot be cancelled, because the sales picking list %1 is still open.',r.routeId));

}

ttscommit;

}

Then

static void Job26(Args _args)
{
InventTrans inventtrans;


    ;

    ttsBegin;
    select forUpdate inventtrans where inventtrans.RecId == 5637431645;

    inventtrans.TransChildRefId = '';
    inventtrans.TransChildType = InventTransChildType::None;
    inventtrans.doUpdate();

    ttsCommit;

}

5.png


    Danzel
    Danzel管理员

    • 声明:本文由Danzel于2020-05-27转载(优化),转载须经原站同意并注明出处。
    • 本文地址:http://maryd.cn/?id=55
    上一篇:Dynamics ax 2012 Update Item Status
    下一篇:关于AX2012的Date、Time、UTCDateTime

    留言评论

    暂无留言
    取消
    扫码支持