Showing posts with label SalesFormLetter. Show all posts
Showing posts with label SalesFormLetter. Show all posts

Tuesday, June 27, 2017

Create/Post Sales order Invoice through x++

Hi,

Today i am going to show you how to create/post sales order invoice in x++

static void createPostSalesOrderInvoice(Args _args)
{
        SalesFormLetter salesFormLetter;
        salesFormLetter=SalesFormLetter::construct(DocumentStatus::Invoice);
       salesFormLetter.update(SalesTable::find('SO-ASC0001'));
       info(strFmt("%1 Sales Order Posted and Final Status is Invoiced",salesTable.SalesId));
}

now run this job

Confirm Sales Order through code

Hi,

Today i am going to show you how to conform sales order through code

static void confirmSalesOrder (Args _args)
{
        SalesTable salesTable;
        SalesFormLetter salesFormLetter ;
     
        SalesTable = SalesTable::find('SO-ASC0001');

        salesFormLetter = SalesFormLetter::construct(DocumentStatus::Confirmation);

        salesFormLetter.update(salesTable);

}

now run this code,

Post/Create Sales order Packing slip x++

Hi Folks,

Today i am going to show you code how to create and post Packing slip through x++;

static void createPostSalesPackingSlip(Args _args)
{
    SalesTable salesTable;
    SalesFormLetter salesFormLetter;

    salesTable = SalesTable::find('SO-ASC001');
      //Posting Sales Order 
    salesFormLetter=SalesFormLetter::construct(DocumentStatus::PackingSlip);
    salesFormLetter.update(SalesTable::find(sid));
       salesFormLetter.update(salesTable,systemDateGet(),SalesUpdate::All,AccountOrder::Non e, NoYes::No,NoYes::Yes);
    info("Sales Order Status is Delivered");
}

run this job.