Hi,
I have two scenarios where I am posting a financial journal using x++,
process is like this : creating header, then lines and posting is not happening immediately. user will be doing posting in separate process later. so user can see tds before and after posting.
these two journal posting happening from separate forms and independent of each other, now in first process, tds entry is being created and i am able to calculate tds before and after posting as well. but in 2nd journal posting tds is not showing before and after posting as well.
same accounts is being used in both process for debit and credit. is their any reason why tds is not there in 2nd case?
Also, customer requirement is to post tds for 2nd case and we should be able to calculate before and after posting, how can we do that with x++.
Also, in createLedgerJournalLine method, we are doing journal line, transtaxinformation and LedgerJournalTransTaxExtensionIN insertion.
first while receive process (1st case), the code looks like this:
this.createLedgerJournalTable(journlaName);
creditLedgerDimension = LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber('vendoraccount',LedgerJournalACType::Vend);
this.createLedgerJournalLine(PostingDateLoc, voucher, LedgerJournalACType::Vend, creditLedgerDimension, dimensionDefault,
-(Amt), invid, NoYes::Yes, 0, 0, inventLocationLogisticsLocation.Location, logisticsLocation.RecId, NoYes::No, txt, '',
dateNull(), tdsRequired, invoiceDate, tdsgroup, 0);
debitLedgerDimension = LedgerDimensionFacade::serviceCreateLedgerDimension(LedgerDimension,DimensionDefault);
this.createLedgerJournalLine(PostingDateLoc, voucher, LedgerJournalACType::Ledger, debitLedgerDimension, DimensionDefault,
Amt, ' ', NoYes::Yes, 0, HSNCodeTable_IN, inventLocationLogisticsLocation.Location, logisticsLocation.RecId, NoYes::No, txt, '',
dateNull(), tdsRequired, dateNull(),tdsgroup, 0, TaxRateType);
now the other scenario (2nd case) is just reversed from above process - which is return process:
debitLedgerDimension = LedgerDynamicAccountHelper::getDynamicAccountFromAccountNumber(VendAccount,LedgerJournalACType::Vend);
creditLedgerDimension = LedgerDimensionFacade::serviceCreateLedgerDimension(LedgerDimension,DimensionDefault);
this.createLedgerJournalLine(PostingDateLoc,voucher,LedgerJournalACType::Ledger,creditLedgerDimension,DimensionDefault,
-(Amt),InvId,NoYes::Yes,sacCode,0,inventLocationLogisticsLocation.Location,logisticsLocation.RecId,
NoYes::No,journalDescription,'',dateNull(),NoYes::Yes,InvoiceDate,'',0,taxRateType);
this.createLedgerJournalLine(PostingDateLoc,voucher,LedgerJournalACType::Vend,debitLedgerDimension,DimensionDefault,
Amt,invoiceId,NoYes::Yes,0,0,inventLocationLogisticsLocation.Location,logisticsLocation.RecId,NoYes::No,journalDescription,'',dateNull(),NoYes::Yes,invoiceadate,'',0,taxRateType);
With regards,
Rahul