View | Details | Raw Unified | Return to bug 37563
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-7 / +7 lines)
Lines 439-446 Link Here
439
                var accountline = button.data('accountline');
439
                var accountline = button.data('accountline');
440
                $('#payoutline').val(accountline);
440
                $('#payoutline').val(accountline);
441
                var amount = button.data('amount') * -1;
441
                var amount = button.data('amount') * -1;
442
                $("#paid + span").replaceWith(amount.format_price());
442
                $("#paid + span").text(amount.format_price());
443
                $("#amount").attr({ "value": amount, "max": amount, "min": 0 });
443
                $("#amount").attr({ "value": amount.format_price(), "max": amount, "min": 0 });
444
                $("#amount, #payout_transaction_type").focus();
444
                $("#amount, #payout_transaction_type").focus();
445
            });
445
            });
446
446
Lines 453-460 Link Here
453
                var amount = button.data('amount');
453
                var amount = button.data('amount');
454
                var amountoutstanding = button.data('amountoutstanding') || 0;
454
                var amountoutstanding = button.data('amountoutstanding') || 0;
455
                var paid = amount - amountoutstanding;
455
                var paid = amount - amountoutstanding;
456
                $("#paid + span").replaceWith(paid.format_price());
456
                $("#paid + span").text(paid.format_price());
457
                $("#returned").attr({ "value": paid, "max": paid, "min": 0 });
457
                $("#returned").attr({ "value": paid.format_price(), "max": paid.format_price(), "min": 0 });
458
                var member = button.data('member');
458
                var member = button.data('member');
459
                if ( member === '' ) {
459
                if ( member === '' ) {
460
                    $("#refund_type option[value='AC']").remove();
460
                    $("#refund_type option[value='AC']").remove();
Lines 470-478 Link Here
470
                $("#item + span").replaceWith(item);
470
                $("#item + span").replaceWith(item);
471
                var accountline = button.data('accountline');
471
                var accountline = button.data('accountline');
472
                $('#discountline').val(accountline);
472
                $('#discountline').val(accountline);
473
                var amount = button.data('amount');
473
                var amountoutstanding = button.data('amountoutstanding');
474
                $("#charged + span").replaceWith(amount.format_price());
474
                $("#charged + span").text(amountoutstanding);
475
                $("#discount").attr({ "max": amount, "min": 0 });
475
                $("#discount").attr({ "value": (0).format_price(), "max": amountoutstanding, "min": 0 });
476
                $("#discount").focus();
476
                $("#discount").focus();
477
            });
477
            });
478
478
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (-3 / +2 lines)
Lines 413-420 Link Here
413
           var amount = button.data('amount');
413
           var amount = button.data('amount');
414
           var amountoutstanding = button.data('amountoutstanding') || 0;
414
           var amountoutstanding = button.data('amountoutstanding') || 0;
415
           var paid = amount - amountoutstanding;
415
           var paid = amount - amountoutstanding;
416
           $("#paid + span").text(paid);
416
           $("#paid + span").text(paid.format_price());
417
           $("#returned").attr({ "value": paid, "max": paid });
417
           $("#returned").attr({ "value": paid.format_price(), "max": paid });
418
           var member = button.data('member');
418
           var member = button.data('member');
419
           if ( member === '' ) {
419
           if ( member === '' ) {
420
               $("#refund_type option[value='AC']").remove();
420
               $("#refund_type option[value='AC']").remove();
421
- 

Return to bug 37563