Skip to Content
0
Aug 22, 2019 at 09:55 AM

Post FixedAsset - Acquisition via ABSL logic

149 Views Last edit Aug 31, 2023 at 04:18 AM 2 rev

Dear Experts,

We are trying to Post FixedAsset - Acquisition via AddOn logic because we need to post bulk data at one time.

We can write Journal Entry Voucher via logic but normally it need Debit G/L Account and Credit G/L Account to assign.

But for the Fixed Assets Acquisition Posting, it posted with blank G/L for Credit but with FixedAsset master data reference in item details.

I've checked in the Accounting Entry BO and found that it is inserted with AccountingCodingBlockTypeCode = "IMAT" with ChartOfAccountsItemCode/content = blank for Debit item.

But in the BO structure, there has no related node or association for FixedAssets.

Here is my current absl logic to create JEV.

// Post JEV
var eleJVRoot: elementsof AccountingEntry;
var eleJVitem1: elementsof AccountingEntry.Item;
var eleJVitem2: elementsof AccountingEntry.Item;
var eleSB: elementsof AccountingEntry.SetOfBooks;
var NewJV;
var JVitem;
var SBK;


var act : AccountingCodingBlockTypeCode;
act.content = "IMAT";


eleJVRoot.Note.content = "test";
NewJV = AccountingEntry.Create(eleJVRoot);
// Create Journal Entry Voucher
SBK = NewJV.SetOfBooks.Create(eleSB); 
NewJV.PostingDate = Context.GetCurrentUserDate();
NewJV.CompanyID = "COM4000"; // company ID
NewJV.AccountingDocumentTypeCode = "00059"; // 00059 - Manual Posting for Fixed Assets
NewJV.BusinessTransactionTypeCode = "643"; // 643 - Manual Posting of Acquisition Costs 
NewJV.AccountingClosingStepCode = "010"; // 010 - Operational postings
SBK.SetOfBooksID.content = "SB1"; // set of books ID


eleJVitem1.AccountingCodingBlockTypeCode = act;
eleJVitem1.ChartOfAccountsCode = "PCUS";
eleJVitem1.DebitCreditCode="1"; // Debit
eleJVitem1.TransactionCurrencyAmount.content = 1000;
eleJVitem1.TransactionCurrencyAmount.currencyCode = "USD";
NewJV.Item.Create(eleJVitem1);


eleJVitem2.ChartOfAccountsCode = "PCUS";
eleJVitem2.ChartOfAccountsItemCode.content = "275000";
eleJVitem2.DebitCreditCode = "2"; //Credit
eleJVitem2.TransactionCurrencyAmount.content = -1000;
eleJVitem2.TransactionCurrencyAmount.currencyCode = "USD";
NewJV.Item.Create(eleJVitem2);	


NewJV.SubmitForPosting();
NewJV.Post();

Is there any idea how can we create JEV for FixedAsset - Acquisition via logic.

Thanks and Regards,

May