Hide add row button after 7 rows

child table will not come in the script, the parent doctype will come. please check the example.