From 7b9de7502fe5532e79d826efa968b757662efb69 Mon Sep 17 00:00:00 2001 From: jonesgaohsu Date: Fri, 25 Oct 2024 06:48:24 -0700 Subject: [PATCH 1/4] This is an update of the ReverseCharge to Add the option to change debit alias. --- .../window/ReverseChargeWindow.js | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js b/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js index 967bf1623..900a2550d 100644 --- a/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js +++ b/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js @@ -299,7 +299,35 @@ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { } }] }); - + // added per request in Finance Tracker Issue 11380 + //debit alias + items.push({ + xtype: 'checkbox', + boxLabel: 'Change Debit Alias', + itemId: 'doChangedebitAlias', + listeners: { + change: function(field, val){ + field.up('panel').down('#debitPanel').setVisible(val); + } + } + },{ + xtype: 'panel', + itemId: 'debitPanel', + hidden: true, + defaults: { + border: false, + style: 'margin-left: 20px;' + }, + items: [{ + xtype: 'textfield', + itemId: 'debitAliasField', + width: 400, + labelWidth: 150, + fieldLabel: 'Debit Alias', + displayField: 'debitAlias', + valueField: 'debitAlias' + }] + }); //credit alias items.push({ xtype: 'checkbox', @@ -396,7 +424,10 @@ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { return; } - + if (this.down('#doChangeDebitAlias').getValue() && !this.down('#debitAliasField').getValue()){ + Ext4.Msg.alert('Error', 'You have checked that you want to alter the debit alias, but did not supply the new alias. Either enter an alias or uncheck the field'); + return; + } if (this.down('#doChangeCreditAlias').getValue() && !this.down('#creditAliasField').getValue()){ Ext4.Msg.alert('Error', 'You have checked that you want to alter the credit alias, but did not supply the new alias. Either enter an alias or uncheck the field'); return; From 15035b61b1cdbea2c4a9454f0b2322ab9d17c573 Mon Sep 17 00:00:00 2001 From: jonesgaohsu Date: Fri, 25 Oct 2024 14:21:07 -0700 Subject: [PATCH 2/4] New Revision still issues caused at Line 433 additional, posting so LK tcan take a look --- .../window/ReverseChargeWindow.js | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js b/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js index 900a2550d..08592a12f 100644 --- a/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js +++ b/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js @@ -299,8 +299,8 @@ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { } }] }); - // added per request in Finance Tracker Issue 11380 //debit alias + //Added b y Gary 2024-10-25 Finance issue 11380 items.push({ xtype: 'checkbox', boxLabel: 'Change Debit Alias', @@ -320,14 +320,15 @@ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { }, items: [{ xtype: 'textfield', - itemId: 'debitAliasField', + itemId: 'newDebitAliasField', width: 400, labelWidth: 150, fieldLabel: 'Debit Alias', - displayField: 'debitAlias', - valueField: 'debitAlias' + displayField: 'newDebitalias', + valueField: 'NewDebitalias' }] }); + //credit alias items.push({ xtype: 'checkbox', @@ -424,10 +425,13 @@ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { return; } - if (this.down('#doChangeDebitAlias').getValue() && !this.down('#debitAliasField').getValue()){ + //added as part of Finance 11380 update by Gary + //this issues is causing error + /* if (this.down('#doChangedebitAlias').getValue() && !this.down('#newDebitAlias').getValue()){ Ext4.Msg.alert('Error', 'You have checked that you want to alter the debit alias, but did not supply the new alias. Either enter an alias or uncheck the field'); return; - } + }*/ + if (this.down('#doChangeCreditAlias').getValue() && !this.down('#creditAliasField').getValue()){ Ext4.Msg.alert('Error', 'You have checked that you want to alter the credit alias, but did not supply the new alias. Either enter an alias or uncheck the field'); return; @@ -475,6 +479,9 @@ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { var creditAliasField = this.down('#creditAliasField'); var unitCostField = this.down('#unitCostField'); + + + if (this.down('#doChangeProject').getValue()){ toApply.project = this.down('#projectField').getValue(); toApply.debitedaccount = this.down('#debitAliasField').getValue(); @@ -482,7 +489,13 @@ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { toApply.debitedaccount = Ext4.String.trim(toApply.debitedaccount); } } - + /*//Added by Gary as part of 11380 update + if (this.down('#doChangeDebitlias').getValue()){ + toApply.debitedaccount = this.down('##newDebitAlias'').getValue(); + if (toApply.creditedaccount){ + toApply.creditedaccount = Ext4.String.trim(toApply.creditedaccount); + } + }*/ if (this.down('#doChangeCreditAlias').getValue()){ toApply.creditedaccount = this.down('#creditAliasField').getValue(); if (toApply.creditedaccount){ From 4cc11b35d61ef04933a9d588cda4605718252c5e Mon Sep 17 00:00:00 2001 From: jonesgaohsu Date: Tue, 29 Oct 2024 08:34:45 -0700 Subject: [PATCH 3/4] Latest Change is now functional in Dev Instance pushing to Prime sandbox for review --- .../onprc_billing/window/ReverseChargeWindow.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js b/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js index 08592a12f..174a4f5d3 100644 --- a/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js +++ b/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js @@ -427,10 +427,10 @@ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { } //added as part of Finance 11380 update by Gary //this issues is causing error - /* if (this.down('#doChangedebitAlias').getValue() && !this.down('#newDebitAlias').getValue()){ + if (this.down('#doChangedebitAlias').getValue() && !this.down('#newDebitAliasField').getValue()){ Ext4.Msg.alert('Error', 'You have checked that you want to alter the debit alias, but did not supply the new alias. Either enter an alias or uncheck the field'); return; - }*/ + } if (this.down('#doChangeCreditAlias').getValue() && !this.down('#creditAliasField').getValue()){ Ext4.Msg.alert('Error', 'You have checked that you want to alter the credit alias, but did not supply the new alias. Either enter an alias or uncheck the field'); @@ -489,13 +489,13 @@ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { toApply.debitedaccount = Ext4.String.trim(toApply.debitedaccount); } } - /*//Added by Gary as part of 11380 update - if (this.down('#doChangeDebitlias').getValue()){ - toApply.debitedaccount = this.down('##newDebitAlias'').getValue(); - if (toApply.creditedaccount){ - toApply.creditedaccount = Ext4.String.trim(toApply.creditedaccount); + //Added by Gary as part of 11380 update + if (this.down('#doChangedebitAlias').getValue()){ + toApply.debitedaccount = this.down('#newDebitAliasField').getValue(); + if (toApply.debitedaccount){ + toApply.debitedaccount = Ext4.String.trim(toApply.debitedaccount); } - }*/ + } if (this.down('#doChangeCreditAlias').getValue()){ toApply.creditedaccount = this.down('#creditAliasField').getValue(); if (toApply.creditedaccount){ From 7917db87f4d589beb908b7019b09cd1531ad2e0a Mon Sep 17 00:00:00 2001 From: jonesgaohsu Date: Wed, 30 Oct 2024 06:00:04 -0700 Subject: [PATCH 4/4] Latest Change is now functional in Dev Instance pushing to Prime sandbox for review --- .../resources/web/onprc_billing/window/ReverseChargeWindow.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js b/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js index 174a4f5d3..fb7058865 100644 --- a/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js +++ b/onprc_billing/resources/web/onprc_billing/window/ReverseChargeWindow.js @@ -2,6 +2,8 @@ * Copyright (c) 2013 LabKey Corporation * * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0 + * Modified jonesga October 30, 2024 + * **Per Finance Issue Tracker 11380 added debit Aklias add function to allow change of debit alias when no center project is associated */ Ext4.define('ONPRC_Billing.window.ReverseChargeWindow', { extend: 'Ext.window.Window',