X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Forder_pkg.html;h=2511a3deb547ac7fd555fbe91db878d39e6f8a23;hb=4117c20f85ce085d7dd42b8970ce9c65b95d7e27;hp=a7571ca5851e5893d387c57c3f44aae8cacdbb0b;hpb=63a268637b2d51a8766412617724b9436439deb6;p=freeside.git diff --git a/httemplate/misc/order_pkg.html b/httemplate/misc/order_pkg.html index a7571ca58..2511a3deb 100644 --- a/httemplate/misc/order_pkg.html +++ b/httemplate/misc/order_pkg.html @@ -10,8 +10,14 @@ function enable_order_pkg () { if ( document.OrderPkgForm.pkgpart.selectedIndex > 0 ) { document.OrderPkgForm.submit.disabled = false; + if ( document.OrderPkgForm.pkgpart.options[document.OrderPkgForm.pkgpart.selectedIndex].getAttribute('data-can_discount') == 1 ) { + document.OrderPkgForm.discountnum.disabled = false; + } else { + document.OrderPkgForm.discountnum.disabled = true; + } } else { document.OrderPkgForm.submit.disabled = true; + document.OrderPkgForm.discountnum.disabled = true; } } @@ -54,12 +60,29 @@ +% if ( $cust_main->payby =~ /^(CARD|CHEK)$/ ) { +% my $what = lc(FS::payby->shortname($cust_main->payby)); +