hello guys, can you help me please..
how to code in tables method to generate counting and insert/update the qty to the field ?
im new in ax so please help.
give me some references to do it
thanks in advance guys
i put the codes if youre want to see if its wrong :
[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:25484449-6965-4157-92a9-b5cdc65fb7c8:type=text&text=private%20void%20EU_MTD_FOBFlow%28%29%0D%0A%7B%0D%0A%20%20%20%20VendInvoiceTrans%20trans%2Ctrans2%3B%0D%0A%20%20%20%20VendInvoiceJour%20jour%3B%0D%0A%20%20%20%20%0D%0A%20%20%20%20ItemGroupId%20itemgroup%2C%20items%3B%0D%0A%20%20%20%20str%20param%3B%0D%0A%20%20%20%20real%20suma%2C%20qtyxharga%2C%20qtyxhargaMALLY%2C%20qtyxhargaMALFN%2C%20qtyxhargaMIBUS%2C%20qtyxhargaMPINX%2C%0D%0A%20%20%20%20%20%20%20%20%20qtyxhargaMRING%20%2CqtyxhargaMCLIP%20%2CqtyxhargaMGCHX%20%2CqtyxhargaMICXX%2C%0D%0A%20%20%20%20%20%20%20%20%20qtyxhargaMORNG%20%2CqtyxhargaMPBUS%20%2CqtyxhargaMPSTB%20%2CqtyxhargaMPSTI%2C%0D%0A%20%20%20%20%20%20%20%20%20qtyxhargaMVLGI%20%2CqtyxhargaMKBXX%20%2CqtyxhargaMKPXX%20%2CqtyxhargaMKSXX%2C%0D%0A%20%20%20%20%20%20%20%20%20qtyxhargaMKTXX%2C%20qtyxhargaMLXXX%20%2CqtyxhargaMPSRX%3B%0D%0A%20%20%20%20%0D%0A%20%20%20%20while%20select%20jour%0D%0A%20%20%20%20%20%20%20%20where%20jour.PurchID%20%3D%3D%20this.PurchId%0D%0A%20%20%20%20%20%20%20%20%26%26%20jour.InvoiceId%20%3D%3D%20this.InvoiceId%0D%0A%20%20%20%20%20%20%20%20%26%26%20jour.InvoiceDate%20%3D%3D%20this.InvoiceDate%0D%0A%20%20%20%20%20%20%20%20%26%26%20jour.numberSequenceGroup%20%3D%3D%20this.numberSequenceGroup%0D%0A%20%20%20%20%20%20%20%20%26%26%20jour.InternalInvoiceId%20%3D%3D%20this.InternalInvoiceId%0D%0A%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20param%20%3D%20subStr%28trans.ItemId%2C1%2C4%29%3B%0D%0A%20%20%20%20%20%20%20%20if%28param%20%3D%3D%20%22ALLY%22%0D%0A%20%20%20%20%20%20%20%20%7C%7C%20param%20%3D%3D%20%22ALFN%22%0D%0A%20%20%20%20%20%20%20%20%7C%7C%20param%20%3D%3D%20%22IBUS%22%29%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20itemgroup%20%3D%20subStr%28trans.ItemId%2C1%2C4%29%3B%0D%0A%20%20%20%20%20%20%20%20%7Delse%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20itemgroup%20%3D%20subStr%28trans.ItemId%2C5%2C4%29%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%2F%2FPERHITUNGAN%20freight%0D%0A%20%20%20%20%20%20%20%20suma%20%3D%20trans.Qty%20%2A%20trans.PurchPrice%3B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22ALLY%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMALLY%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMALLY%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22ALFN%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMALFN%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMALFN%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22IBUS%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMIBUS%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMIBUS%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22PINX%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMPINX%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMPINX%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22RING%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMRING%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMRING%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22CLIP%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMCLIP%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMCLIP%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22GCHX%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMGCHX%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMGCHX%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22ICXX%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMICXX%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMICXX%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22ORNG%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMORNG%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMORNG%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22PBUS%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMPBUS%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMPBUS%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22PSTB%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMPBUS%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMPBUS%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22PSTI%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMPSTI%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMPSTI%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22VLGI%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22VLGX%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22VLGD%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMVLGI%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMVLGI%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22KBSF%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KBSX%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMKBXX%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMKBXX%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22KPCF%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KPFF%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KPFX%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KPSF%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KPSX%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMKPXX%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMKPXX%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22KSCF%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KSFF%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KSFX%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KSSF%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KSSX%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KRSX%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMKSXX%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMKSXX%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22KTFF%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KTSF%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22KTSX%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMKTXX%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMKTXX%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22LCF1%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22LFF1%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22LSXX%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22LSFX%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22LFXX%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22LFFX%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22LFFS%22%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7C%7C%20itemgroup%20%3D%3D%20%22LCFX%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMLXXX%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMLXXX%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%28itemgroup%20%3D%3D%20%22PSRI%22%20%7C%7C%20itemgroup%20%3D%3D%20%22PSR3%22%29%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMPSRX%20%2B%3D%20suma%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.EU_FLD_FOB%20%3D%20qtyxhargaMPSRX%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20if%28qtyxhargaMALLY%20%3E%200%20%7C%7C%20qtyxhargaMALFN%20%3E%200%20%7C%7C%20qtyxhargaMIBUS%20%3E%200%20%7C%7C%20qtyxhargaMPINX%20%3E%200%20%7C%7C%20qtyxhargaMRING%20%3E%200%0D%0A%20%20%20%20%20%20%20%20%7C%7C%20qtyxhargaMCLIP%20%3E%200%20%7C%7C%20qtyxhargaMGCHX%20%3E%200%20%7C%7C%20qtyxhargaMICXX%20%3E%200%20%7C%7C%20qtyxhargaMORNG%20%3E%200%20%7C%7C%20qtyxhargaMPBUS%20%3E%200%0D%0A%20%20%20%20%20%20%20%20%7C%7C%20qtyxhargaMPSTB%20%3E%200%20%7C%7C%20qtyxhargaMPSTI%20%3E%200%20%7C%7C%20qtyxhargaMVLGI%20%3E%200%20%7C%7C%20qtyxhargaMKBXX%20%3E%200%20%7C%7C%20qtyxhargaMKPXX%20%3E%200%0D%0A%20%20%20%20%20%20%20%20%7C%7C%20qtyxhargaMKSXX%20%3E%200%20%7C%7C%20qtyxhargaMKTXX%20%3E%200%20%7C%7C%20qtyxhargaMLXXX%20%3E%200%20%7C%7C%20qtyxhargaMPSRX%20%3E%200%29%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20info%28strFmt%28%22%251%20%252%20%253%20%254%20%255%20%256%20%257%20%258%20%259%20%2510%20%2511%20%2512%20%2513%20%2514%20%2515%20%2516%20%2517%20%2518%20%2519%20%2520%20%2521%22%2C%20itemgroup%2C%20suma%2C%20qtyxhargaMALLY%2C%20qtyxhargaMALFN%2C%20qtyxhargaMIBUS%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMPINX%2C%20qtyxhargaMRING%2C%20qtyxhargaMCLIP%2C%20qtyxhargaMGCHX%2C%20qtyxhargaMICXX%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMORNG%2C%20qtyxhargaMPBUS%2C%20qtyxhargaMPSTB%2C%20qtyxhargaMPSTI%2C%20qtyxhargaMVLGI%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMKBXX%2C%20qtyxhargaMKPXX%2C%20qtyxhargaMKSXX%2C%20qtyxhargaMKTXX%2C%20qtyxhargaMLXXX%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20qtyxhargaMPSRX%29%29%3B%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%7D%0D%0A%7D]