create journal method.

Hello guys,

I have creditTable form and I have a button called Credit purchase dairy.When I click this button,İts create ledgerjournalTable,LedgerJournalTrans.and also I have button on this form called invoice list.Its shows Proformoinvoice table.

they want ,when I click the invoice list button and if its come not empty,they want to group the ProformoInvoicetable by projectid,parcel etc…and they wantto create separate voucher for each line with different number.

so far I wrote this:

I wrote on the method createJournal from createjournalfromcrdtTable class.

numberSeq = NumberSeq::newGetVoucherFromId(ledgerJournalName.NumberSequenceTable);
voucher = numberSeq.voucher();
ledgerJournalTrans.Voucher = voucher;
while select sum(AmountCur) from BuzProformaInvoiceTable group by BuzCrdtId,ParselDimValue,ProjId where BuzProformaInvoiceTable.BuzCrdtId == buzcrdttable.BuzCrdtId && BuzProformaInvoiceTable.BuzCrdtId!=""
{
ledgerJournalTrans.clear();
ledgerJournalTrans.Voucher = voucher;

ledgerJournalTrans = setLedgerJournalTransCommonField(voucher,
ledgerJournalTable.JournalNum,
currencyCode,
ledgerJournalName.TransactionTxtType
);

What issue do you have?

With the credit purchase log creation button; If there is no invoice for the selected credit on the proforma invoice table, we will create a daily record as if it were a standard run.
If the proforma billing table contains bills linked to the credit, we will create the daily record in a single day so that the billing amounts are grouped on Credit no., Site and Parcels basis and will generate separate chips for each.

That doesn’t explain what your issue is. Please try explaining the issue.

my issue is holl thing actually.I dont know how to do in first place

Your are explaining a requirement that is based on your existing custom code. It would be difficult to provide a solution.
If you could be more specific on what is stopping you and what you have tried that is not working, then it would help the person who is going to help you.