fix budget exceeded still can submit Ledger Journal WorkFlow , ledgerJournalCheckPost

on class LedgerJournalWFApprSubmitToWF \ main

//add by fanddy, fix Bugs exceed budget still can submit on 30/03/2015
    LedgerJournalCheckPost ledgerJournalCheckPost;
	FormDataSource fds;
    //end add by fanddy


    Debug::assert(tableId == tableNum(LedgerJournalTable));
    Debug::assert(recId != 0);

    // The method has not been called correctly.
    if (tableId != tableNum(LedgerJournalTable) ||
        recId == 0)
    {
        throw error(strFmt("@SYS19306", funcName()));
    }
    //add by fanddy, fix Bugs exceed budget still can submit on 30/03/2015
    else
    {
        ledgerJournalCheckPost= ledgerJournalCheckPost::newLedgerJournalTable(ledgerJournalTable,NoYes::No,NoYes::Yes);
        ledgerJournalCheckPost.run();

        if(!ledgerJournalCheckPost.getParmCheckJournalTID())
        {
            throw error("Can't submit this journal");
        }
		//refresh form dataSource , fix error when submit must restore form dataSource 
		fds = args.record().dataSource();
		fds.research(true);
		fds.refresh();
    }
    //end add by fanddy

i did some modify on class LedgerJournalCheckPost for returning checkJournal result.
on LedgerJournalCheckPost\run method

//edited by fanddy
checkResultTID = this.checkJournal();
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s