The error looks like salesprice rounding error, because i update salesprice after inserting markuptrans. sl.SalesPrice -= round((trans.salesLine().DS_SatisFiyati * sg.Value ) / toplam, 0.01); sl.lineAmount = sl.calcLineAmountForced(); sl.update(); What is wrong in my code?
________________________________ Kimden: Cenk Ince [mailto:[EMAIL PROTECTED] Gönderilmiş: Paz 02.01.2005 19:14 Kime: Axapta-Knowledge-Village@yahoogroups.com Konu: Markuptrans voucher error, because of rounding I create a markup trans for a salesline with code, same as i create from markuptrans form on salesline. Both records identical, however i get error when i try to get invoice for that salesorder. What is absent in my code? Thanks and good years... //************************************************* ttsbegin; select forupdate sl where sl.RecId == trans.salesLine().RecId; select forupdate mt where mt.TransTableId == tablenum(salesline) && mt.TransRecId == trans.salesLine().RecId && mt.MarkupCode == sg.MarkupCode; mt.initFromSalesLine(trans.salesLine()); mt.lineNum = MarkupTrans::lastLineNum( mt.transTableId, mt.transRecId) + 1; mt.initFromSalesLine(trans.salesLine()); mt.initFromMarkupTable(MArkupTable::find(ModuleInventCustVend::Cust,sg.MarkupCode)); mt.MarkupCode = sg.MarkupCode; sairGider = (trans.Qty * trans.salesLine().DS_SatisFiyati * sg.Value ) / toplam; mt.Value = round(sairGider,0.01); mt.ModuleCategory = HeadingLine::Linie; mt.insert(); eskibf = sl.SalesPrice; sl.SalesPrice -= round((trans.salesLine().DS_SatisFiyati * sg.Value ) / toplam, 0.01); sl.lineAmount = sl.calcLineAmountForced(); sl.update(); ........................................... //******************************************************* Sharing the knowledge on Axapta. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Axapta-Knowledge-Village/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
<<winmail.dat>>