Tuesday, March 13, 2018

Register serial numbers for the items with sales order packing slip posting


    InventTrackingRegisterTrans InventTrackingRegisterTrans;
    InventTrackingRegisterTransform formcontroller;
    SalesParmTable  salesParmtable;
    SalesParmLine   salesParmLine;
    boolean                         isCorrection;
    SalesTable  SalesTable;
    SalesFormLetter_Packingslip salesFormLetter;
    SalesFormLetter salesLetter = SalesFormLetter::construct(DocumentStatus::PackingSlip);

    select salesParmtable where salesParmtable.SalesId == "SO-00131";
    while select salesParmLine where salesParmLine.ParmId == salesParmtable.ParmId
    {
       
        isCorrection = (salesParmLine.salesLine().QtyOrdered * salesParmLine.DeliverNow < 0);
        if (!isCorrection)
        {
            formcontroller = InventTrackingRegisterTransForm::newForPackingSlip(salesParmLine);
        }
        formController.insertSerialNumber("xxxx");
           
      
    }
    SalesTable  = SalesTable::find("SO-00131");
    
    salesFormLetter = SalesFormLetter_Packingslip::newPackingSlip();
                    salesFormLetter.transDate(systemDateGet());
                    salesFormLetter.update(salesTable,
                                            systemdateget(),
                                            SalesUpdate::All,
                                            AccountOrder::None,
                                            NoYes::No,
                                            NoYes::No);

No comments:

Post a Comment