Moverment Journal and Ledger Trans posting

Hello,

I am doing customization for movement journal. I developed one Remark/Text field in movement journal. Now I want to post same remark/text field in ledger trans - txt field when click on “Post” button. Posting will be depend if Remark/Text filed is not blank. Can any body help me.

Either can any one help me to where to write update code for ledger trans relation with inventjournaltrans record. coz here line to line relation is not present betweeen movement journal lines and ledger trans lines. I checked and come to conclusion that Line got matched with journalid, voucher, amount. so this becomes difficult to update. Can any body help me.

Hi Suvarna,

You can write the code in the clicked method of the InventJournalMovement Form (\Forms\InventJournalMovement\Designs\Design[ButtonGroup:ButtonGroup]\MenuItemButton:PostJournal\Methods\clicked )

And there in clicked method you can update the ledgerTrans Table something like this :

void clicked()

{

LedgerTrans tranLed;

;

super();

ttsbegin;

WHile Select forupdate tranLed

where tranLed.JournalNum == inventjournaltrans.JournalId

{

tranLed.VT_remarks = inventjournaltrans.VT_Text; // Customized fields

tranLed.doUpdate();

}

ttscommit;

}

Hello,

thanks for your reply! that’s working fine. But I have multiple lines in movement journal with different Remark/Text. In ledger trans that also need to be insert/update as per line wise with different Remark/Text.

Its better to use the class “LedgerVoucherTransObject” and your code in initFromLedgerPostingTransaction()

Hello,

Thanks! for the reply. I got the class but method = initFromLedgerPostingTransaction() is not getting in that class.

Hi Suvarna.K,

U created a RemarkTxt field in InventJournalTrans table form Moment Journal of Inventory management module and Ledger module is complete different where the posting should effect. so have to create a field of RemarkTxt in Ledger module. I cannot get you in which destination table’s field you are going to store?.

Hello,

I have developed new field in table InventJournalTrans with name “txt”, extended data type property is InventJournalTransTxt. In the form InventJournalTrans, overview tab page from the table InventJournalTrans new field is called. In the form InvnetJournalTrans → Data Sources → InventJournalTrans → field Txt → method = lookup is override to call lookup from InventJournalTxt master. In the form, under txt column, drop down and even free typing text also allowed for end user. Next I am doing movement journal with offset account. In the offset accunt’s transaction, same txt should be appear/fetch in Transaction Text. Table is Ledger Trans and field “Txt” is already present in that table. When Movement Journal gets post same time my new developed txt should get post or update in ledger trans table. In movement journal with single line record this is working fine. If movement journal with multiple lines/items with different-different txt then it is not updating in ledger trans with respect to line/item wise record.

Hi Santosh Kumar,

Thanks for your reply. I have done my work. In the class “LedgerVoucherTransObject”, I used method “ParmTransTxt”.

Hi Suvarna Kore

I have problem same to you. I just write the code below in the parmTransTxt____ method of “LedgerVoucherTransObject” class as your solution.

TransTxt parmTransTxt(TransTxt _transTxt = ledgerTrans.Txt)
{
InventJournalTrans invent; //1.n# NTLH
;

if(ledgerTrans.TransType == LedgerTransType::Invent) //1.n# NTLH
ledgerTrans.Txt = invent.inventJournalTrans().data().SKVNdescription; // SKVNdescription is the customize field in InventJournalTrans
else //1.n# NTLH
ledgerTrans.Txt = _transTxt;

return ledgerTrans.Txt;
}

I can’t get data of SKVNdescription field**,** values of this field is “”, I don’t know where i was wrong? Please help me fix this problem

Hello,

Have you done same customized field in Invent type journal. Same field should be present in InventType journal table even on the form. When user do the transactions in journal entry that time same customized field will be pass in leger trans also.

Hello Suvarna Kore,

My Problem as:

When a journal in Inventory management > JOURNAL > Movement> Line is posted, I want to “Txt” field of “LedgerTrans” table update value of SKVNDescription of InventJournalTrans , so I have added a field “SKVNDescription”, on table "InventJournalTrans. I don’t make any in Invent Type Journal.

As your problem, I just updated method “parmsTransTxt” in “LedgerVoucherTransObject” class :

TransTxt parmTransTxt(TransTxt _transTxt = ledgerTrans.Txt)
{
InventJournalTrans invent; //1.n# NTLH
;

if(ledgerTrans.TransType == LedgerTransType::Invent) //1.n# NTLH
ledgerTrans.Txt = invent.inventJournalTrans().data().SKVNdescription; // SKVNdescription is the customize field in InventJournalTrans
else //1.n# NTLH
ledgerTrans.Txt = _transTxt;

return ledgerTrans.Txt;
}

but I can’t get data of SKVNdescription field**,** values of this field is “”, I don’t know where i was wrong? Please help me fix this problem.

I’m sorry. I don’t understand clearly your reply about “Invent type journal”, i just do in InventJournalTrans. So, I explain again for we understand together.

Hello,

why don’t u try Movement journal post button, on click method after super. Check 1st journal is posted, if journal is posted then with journal id condition in query update SKVNdescription ledger trans table. In my method I have given condition for journal number and voucher number in the class.

TransTxt parmTransTxt(TransTxt _transTxt = ledgerTrans.Txt)
{
InventJournalTrans _inventJournalTrans;
;
while select _inventJournalTrans where
_inventJournalTrans.JournalId == ledgerTrans.JournalNum &&
_inventJournalTrans.Voucher == ledgerTrans.Voucher

if (_inventJournalTrans.Txt)
{
ledgerTrans.Txt = _inventJournalTrans.Txt;
}
else
ledgerTrans.Txt = _transTxt;
return ledgerTrans.Txt;
}

But please verify other journals postings, because I have faced problem while posting other journals with this code. That’s why I have shifted this code on post button of the journal.

Hello Suvarna Kore,

Thank you for you reply. When I post journal with a single line I have get data of SKVNDescription field from InventJournalTrans table to Txt field of LedgerTrans table.

But with journal more line, Txt just get the last line of Invent journal line, I also try on click method of Movement journal button but can’t do.

In the LedgerTrans table have Voucher and JournalNum for link with InventJournalTrans, haven’t got any field for distinguished different between more line of InventJournalTrans in LedgerTrans, you have any idea about this problem?

Hello,

IM → set up → journals → journal names → Journal tab page = new voucher by = select - “Change date or item”. then u r problem will solve. It will create new journal num to each and every line for that journal. with respect to this transaction text also will be updated to each and every every line for that journal.