if(row.Rate != null && row.Qty != null && row.Tax != null) { get_tax_value = GST_Details[ID == row.Tax].Total_Rate; Tax_calc = ifnull(row.Qty,0.0) * ifnull(row.Rate,0.0) * ifnull(get_tax_value,0.0) / 100; amount_calc = row.Qty * row.Rate; row.Sub_Total=ifnull(amount_calc,0.00); row.Tax_Value=Tax_calc; row.Total_Amount=ifnull(amount_calc,0.0) + ifnull(Tax_calc,0.0); tot = 0.0; for each rec in Item_Details { tot = tot + ifnull(rec.Total_Amount,0.0); } input.Item_Total = tot; input.Overall_Total = ifnull(input.Item_Total,0.0) + ifnull(input.Extra_Charge_s_Total,0.0); // // new fields caluclation - 1/4/2023 - stats // input.Gross_Total = ifnull(input.Gross_Total,0.0) + ifnull(row.Sub_Total,0.0)+ifnull(input.Tax_Total,0.0); // input.Tax_Total = ifnull(input.Tax_Total,0.0)+ifnull(row.Tax_Value,0.0); // // new fields calculation ends } if(row.Tax == null) { row.Tax_Value=0.0; row.Total_Amount=ifnull(row.Qty,0.0) * ifnull(row.Rate,0.0); tot1 = 0.0; for each rec in Item_Details { tot1 = tot1 + rec.Total_Amount; } input.Item_Total = tot1; input.Overall_Total = ifnull(input.Item_Total,0.0) + ifnull(input.Extra_Charge_s_Total,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