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
);