NEW Show total of payment on payment confirm page
This commit is contained in:
parent
ed00f6bfb9
commit
4d07e39067
@ -409,6 +409,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
}
|
||||
function callForResult(imgId)
|
||||
{
|
||||
console.log("callForResult Calculate total of payment");
|
||||
var json = {};
|
||||
var form = $("#payment_form");
|
||||
|
||||
@ -445,6 +446,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
}
|
||||
});
|
||||
}
|
||||
callForResult();
|
||||
$("#payment_form").find("input.amount").change(function() {
|
||||
callForResult();
|
||||
});
|
||||
@ -690,10 +692,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'");
|
||||
print '<input type="hidden" class="remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
||||
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">';
|
||||
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult();
|
||||
} else {
|
||||
print '<input type="text" size="8" name="'.$namef.'_disabled" value="'.dol_escape_htmltag(GETPOST($namef)).'" disabled>';
|
||||
print '<input type="hidden" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">';
|
||||
print '<input type="hidden" class="amount" name="'.$namef.'" value="'.dol_escape_htmltag(GETPOST($namef)).'">'; // class is requied to be used by javascript callForResult();
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user