1ACC.paymentDetails = { 2 _autoload: [ 3 "showRemovePaymentDetailsConfirmation", 4 "showHideNewPaymentType", 5 "showHideStoredPaymentName", 6 "pageLoad" 7 ], 8 9 showRemovePaymentDetailsConfirmation: function () 10 { 11 $(document).on("click", ".removePaymentDetailsButton", function () 12 { 13 var paymentId = $(this).data("paymentId"); 14 var popupTitle = $(this).data("popupTitle"); 15 16 ACC.colorbox.open(ACC.common.encodeHtml(popupTitle),{ 17 inline: true, 18 href: "#popup_confirm_payment_removal_" + paymentId, 19 onComplete: function () 20 { 21 $(this).colorbox.resize(); 22 } 23 }); 24 25 }) 26 }, 27 28 showHideNewPaymentType: function () 29 { 30 $(document).on("change", "#payment_method", function () 31 { 32 if ( this.value == '') 33 { 34 $("#new-payment").show(); 35 } 36 else 37 { 38 $("#new-payment").hide(); 39 } 40 41 const creditMemoSubtotal = ACC.invoiceMakePayment.calculateCreditMemoSubtotal(); 42 $('#credit-memo-subtotal').text("(" + ACC.invoiceMakePayment.currencyFormatter.format(creditMemoSubtotal.valueOf()) + ")"); 43 44 const totalDue = ACC.invoiceMakePayment.calculateTotalDue(creditMemoSubtotal); 45 ACC.invoiceMakePayment.updatePaymentSummary(creditMemoSubtotal, totalDue); 46 ACC.invoiceMakePayment.toggleSubmitPaymentEligibility(totalDue); 47 48 }); 49 }, 50 51 showHideStoredPaymentName: function () 52 { 53 $(document).on("change", "#rememberPaymentInfo", function () 54 { 55 if ($(this).is(":checked")) 56 { 57 $("#stored_payment_name").show(); 58 } 59 else 60 { 61 $("#stored_payment_name").hide(); 62 } 63 }); 64 }, 65 66 pageLoad: function() 67 { 68 $(document).ready(function () 69 { 70 $("#payment_method").trigger("change"); 71 $("#rememberPaymentInfo").trigger("change"); 72 }); 73 } 74 75}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.