Hi all; I try to insert markuptrans, there are 3 markupCodes, for 1 of them i can insert markuptrans, but for 2 others i can't insert it,
All setup for 3 of markupcodes are the same. i get error : "Cannot create a record in Misc. charges transactions (MarkupTrans). Misc. charges code: Klise, . The record already exists.". Does anybody knows why does this happen? My code is like ................................. ttsbegin; select forupdate mt where mt.TransTableId == tablenum(salesline) && mt.TransRecId == trans.salesLine().RecId && mt.MarkupCode == sg.MarkupCode; if(!mt) { mt.initValue(); 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 = decround(sairGider,2); info(num2str(mt.Value,1,1,1,1)); mt.insert(); } else { mt.Value += decround(sairGider,2); info(num2str(mt.Value,1,1,1,1)); mt.update(); } ............................................... Thanks ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/kGEolB/TM --------------------------------------------------------------------~-> 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>>