Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.btn-submit').click(function (e) {
- e.preventDefault();
- var flag = false;
- $('.materialAccHead').each(function () {
- if (($(this).find('option:selected').val() == '' || $(this).find('option:selected').val() == 'undefined')) {
- $(this).addClass('errorclass');
- scrollToTopError('errorclass');
- flag = true;
- }
- });
- $('.advance_amount_class').each(function () {
- var order_amount = parseFloat($(this).parents('tbody').find('.order_amount').html());
- if($(this).val()!='') {
- if(order_amount < parseFloat($(this).val())) {
- $(this).addClass('errorclass');
- scrollToTopError('errorclass');
- flag = true;
- }
- }
- });
- if (flag == false)
- {
- $('#yii-purchase-add-form').submit();
- }
- });
Add Comment
Please, Sign In to add comment