24 Haziran 2016 Cuma

AXAPTA - Clear left open QTY's at a transfer order

If a transfer order haven't got completed and that left QTY's related with an output order and reserved, Functions->Deliver remainder->Cancel quantity button will not work. It'll get an error about "there's not enough QTY with ordered" and quit. It's about that QTY reserved with output order and can't unreserve (At least I couldn't a way) direct with one line code. If you even unreserve from menu, relation will still stay and you'll get that error again. In first tie with output order should be break. I couldn't a way break relation with standart code and found this way, it seem works:

    InventTransferTable header;
    InventTransferLine  line;
    WMSOrderTrans       orderTrans;
    InventTrans         inventTrans;
    while select header
            where header.TransferId == myTransferId
        join forupdate line
            where line.TransferId == header.TransferId &&
                  (line.QtyRemainReceive > 0 || line.QtyRemainShip>0) 

        while select orderTrans
            where orderTrans.inventTransId == line.InventTransId &&
                  orderTrans.expeditionStatus != WMSExpeditionStatus::Complete &&
                  orderTrans.expeditionStatus != WMSExpeditionStatus::Cancelled &&
                  orderTrans.expeditionStatus != WMSExpeditionStatus::CancelledSW
        while select forupdate inventTrans
            where (inventTrans.StatusIssue == StatusIssue::ReservPhysical ||
                   (inventTrans.TransChildRefId != "" &&
                    inventTrans.TransChildType == InventTransChildType::WMSOrder) ) &&
                  inventTrans.InventTransId == line.InventTransId
            inventTrans.TransChildRefId = "";
            inventTrans.TransChildType = InventTransChildType::None;
        line.QtyRemainReceive = 0;
        line.QtyRemainShip    = 0;
        line.AutoReservation = NoYes::No;

8 Haziran 2016 Çarşamba

AXAPTA - Cancel a WMS picking list or cancel line of picking list

Cancel whole list:

Cancel a line: