web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

How To remove The Reservation from any open order?

Abdel Fatah Ahmed Profile Picture Abdel Fatah Ahmed

to remove the reservation from any open order to use those items after remove the reservation this code below  can help :


Note : you can write this code in Jop Or inside any events like click event .

void UnreserveOpenOrders()
{
 // This is the table variable
SalesLine _salesLine;
InventQty _InventQty;
;
 select  forupdate _salesLine
            where ( _salesLine.SalesStatus ==SalesStatus::None || _salesLine.SalesStatus   ==SalesStatus::Backorder);

 while (_salesLine)
    {
      if(_salesLine.RemainSalesPhysical > 0)
         {
         try
         {
  // un reserve all the remaining quantity
     this.SalesReserveQty(_salesLine,_salesLine.RemainSalesPhysical);

         }
          catch
          {
          info(_salesLine.ItemId);
          }
          }

      next _salesLine;
    }
}

Comments

*This post is locked for comments