Hi
i have removed the code which your mentioned above now also i m facing same issue i did debug and checked the line values are getting and store in table also but not showing in for, please see the below code which i changed now,
static void CustPaymJournalCreate(Args _args)
{
CustTable custTable;
BankAccountTable bankAccountTable;
Ledgerjournalname ledgerjournalname;
LedgerjournalTable ledgerjournalTable;
LedgerjournalTrans ledgerjournalTrans;
LedgerjournalCheckPost ledgerjournalCheckPost;
DimensionAttributeValueCombination dimensionAttribute;
NumberSeq numberSeq;
CompanyBankAccountId bankAccountId;
DimensionDisplayValue ledgerDimension;
AccountNum custAccountNum;
LedgerJournalACTypeAll ledgerJournalACTypeAll;
LedgerTransType ledgerTransType;
LedgerJournalACType ledgerJournalACType;
bankAccountId = "CITI-CHN";
custAccountNum = "CA005";
//select firstOnly ledgerjournalname;
//select firstOnly custTable
//where custTable.AccountNum like 'CA006';
//select firstOnly custTableBank
//where custTable.AccountNum like 'Yes-INR';
// create journal
select ledgerjournalname
where ledgerjournalname.JournalName == "CRJ";
ledgerjournalTable.JournalName = ledgerjournalname.JournalName;
ledgerjournalTable.initFromLedgerJournalName();
ledgerjournalTable.JournalNum = JournalTableData::newTable(ledgerjournalTable).nextJournalId();
ledgerjournalTable.insert();
LEDGERJOURNALTRANS.JOURNALNUM = LEDGERJOURNALTABLE.JOURNALNUM;
NUMBERSEQ = NUMBERSEQ::NEWGETVOUCHERFROMID((LEDGERJOURNALNAME.NUMBERSEQUENCETABLE));
LEDGERJOURNALTRANS.VOUCHER = NUMBERSEQ.VOUCHER();
ledgerjournalTrans.CurrencyCode = "INR";
ledgerjournalTrans.ExchRate = Currency::exchRate(ledgerjournalTrans.CurrencyCode);
ledgerjournalTrans.AccountType = LedgerJournalACType::Cust;
if(LedgerJournalACType::Cust == ledgerJournalTrans.AccountType)
{
select RecId from dimensionAttribute
where dimensionAttribute.DisplayValue == custAccountNum
&& dimensionAttribute.LedgerDimensionType == LedgerDimensionType::Account;
if(dimensionAttribute.RecId != 0)
{
ledgerjournalTrans.LedgerDimension = dimensionAttribute.RecId;
}
else
{
throw Error("Not available");
}
}
ledgerjournalTrans.Txt = 'Customer payment journal demo';
ledgerjournalTrans.AmountCurCredit = 2000;
ledgerjournalTrans.TransDate = systemDateGet();
ledgerjournalTrans.MarkedInvoice = 'IND-DN-16-17-10026';
ledgerjournalTrans.OffsetAccountType = LedgerJournalACType::Bank;
if(LedgerJournalACType::Bank == ledgerjournalTrans.OffsetAccountType)
{
select RecId from dimensionAttribute
where dimensionAttribute.DisplayValue == bankAccountId
&& dimensionAttribute.LedgerDimensionType == LedgerDimensionType::Account;
if(dimensionAttribute.RecId)
{
ledgerjournalTrans.OffsetLedgerDimension = dimensionAttribute.RecId;
}
else
{
throw Error("Not available");
}
}
ledgerjournalTrans.insert();
}
please the below screen shots
line table withe data for HTL - 000361
form
Please give any solutions .
Thank you