if(row.Part_Description != null) { check_same_item = 0; for each rec in input.Item_Details { if(rec.Part_Description == row.Part_Description) { check_same_item = check_same_item + 1; } } if(check_same_item == 2) { alert "You have already entered the same item"; row.Part_Description=null; } else { mat_data = Materials[ID == row.Part_Description]; row.Rate=ifnull(mat_data.Selling_Price,0.0); row.Part_No=mat_data.ID; /*-------------------------Tax Showing----------------------------*/ if(input.Place_of_Supply.Inside_India == "Yes") { tax_det = if(input.Customer_Name.Destination.Short_Name == "" || input.Customer_Name.Destination.Short_Name == null,if(input.Place_of_Supply.Short_Name == "TN",mat_data.GST_Details,mat_data.IGST_Details),if(input.Customer_Name.Destination.Short_Name == "TN",mat_data.GST_Details,mat_data.IGST_Details)); } else { tax_det = GST_Details[Tax_Name == "IGST0"].ID; } /*-----------------------End-------------------------------------------------------------------------------*/ row.Tax=tax_det; row.UoM=row.Part_Description.Primary_UoM; row.Remarks_multiline=row.Part_Description.Specification; //Check Stock Summary row.Stock_FG_Qty=ifnull(Inventory[Part_No == row.Part_No && Part_Description == row.Part_Description].Available_Qty,0.0); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter