Programmer:Cancel Purchase Order

From AutoCount Resource Center
Revision as of 08:38, 7 June 2018 by DanielY (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Technical Specification

  1. Item can be added through transfer from Purchase Order.
  2. Cancel Purchase Order (document) is not to void Purchase Order.

Partial Transfer

public void NewCancelPO(BCE.Data.DBSetting dbSetting)
{
    BCE.AutoCount.Invoicing.Purchase.CancelPO.CancelPOCommand cmd =
        BCE.AutoCount.Invoicing.Purchase.CancelPO.CancelPOCommand.Create(dbSetting);
    BCE.AutoCount.Invoicing.Purchase.CancelPO.CancelPO doc = cmd.AddNew();

    //Transfer one line of item from PO, if more than one line, write a loop
    string poDocNo = "PO-00001";
    string itemCode = "ItemA";
    string uom = "UNIT";
    decimal qtyToTransfer = 1;
    decimal focQtyToTrasnfer = 0;

    //Using Partial Transfer
    doc.PartialTransfer(BCE.AutoCount.Invoicing.Purchase.TransferFrom.PurchaseOrder,
        poDocNo, itemCode, uom, qtyToTransfer, focQtyToTrasnfer);

    try
    {
        doc.Save();
        //log save successful
    }
    catch (BCE.Application.AppException ex)
    {
        //log exception
    }
}

Go to menu

Go to top
Resources For AutoCount Software Developers