I need to often be reminded of how to calculate a percentage. The context here is that I want a progress bar in one of my programs.
To determine what percent a number is of a total number:
(Progress ...
... (Display amount and then percentage beneath in smaller)
Line Item Totals have been added to the above code retrospectively without proper testing.
Aggregate of total amount may be unnecessary as this ...
... + v_BooksOrgID
type :GET
connection:"zbooks"
];
for each m_Tax in r_Taxes.get("taxes")
{
m_Taxes.put(m_Tax.get("tax_percentage").toString(),m_Tax.get("tax_id"));
}
info m_Taxes;
//
// ---------------------------------
// ...
... each r_Tax in r_Taxes.get("taxes")
{
m_Taxes.put(r_Tax.get("tax_percentage").toString(),r_Tax.get("tax_id"));
}
}
l_DebugMessages.add("ZB Taxes: " + m_Taxes);
//
// set chart of accounts to use
v_Endpoint ...
... GET
connection: "joel_books"
];
for each r_Tax in r_Taxes.get("taxes")
{
m_Taxes.put(r_Tax.get("tax_percentage").toString(), r_Tax.get("tax_id"));
}
info m_Taxes;
//
// set Tax ID for a sales order ...
... the process would be: allow a user to apply for leave, then on save/submit, auto approve/reject the application based on a custom function that could calculate the percentage of staff who already booked ...
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies. Read more about our Privacy Policy.