Quoaton two level approval

I want 2 level of quote Approval.

At 1st Level a single person will be authorized to do the approval for all quotes
At 2nd Level only when the grand total exceeds 10,0000 then a specified person should approve it.

Use Workflow for it.

If second approval is conditional then you have to write a script to check your grand total.
e.g. If you have 3 stages - 1. first approval 2. Second Approval 3. Approved
If it exceeds 10,0000 then go to the second stage otherwise just skip the second one and jump to approved state using script.

Thank you , do you have any idea how i can write scrpit for that?

Write Custom Script for it.


frappe.ui.form.on('Quotation', {
	validate: function(frm) {
			Write your Script here
			You Can Access Workflow state as follows: