IDEMPIERE-6042 Improvements to Payment window (#2242)

- set IsReceipt field based on DocType
- avoid throwing error to the user on callout if the currency rate or converted amt are defined with default null
This commit is contained in:
Carlos Ruiz 2024-02-16 12:16:44 +01:00
parent 16074d80ee
commit 6da2abfd77
3 changed files with 27 additions and 7 deletions

View File

@ -0,0 +1,14 @@
-- IDEMPIERE-6042 Improvements to Payment window
SELECT register_migration_script('202402131228_IDEMPIERE-6042.sql') FROM dual;
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Feb 13, 2024, 12:28:11 PM CET
UPDATE AD_Field SET MandatoryLogic='@IsOverrideCurrencyRate@=Y',Updated=TO_TIMESTAMP('2024-02-13 12:28:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205669
;
-- Feb 13, 2024, 12:28:15 PM CET
UPDATE AD_Field SET MandatoryLogic='@IsOverrideCurrencyRate@=Y',Updated=TO_TIMESTAMP('2024-02-13 12:28:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205670
;

View File

@ -0,0 +1,11 @@
-- IDEMPIERE-6042 Improvements to Payment window
SELECT register_migration_script('202402131228_IDEMPIERE-6042.sql') FROM dual;
-- Feb 13, 2024, 12:28:11 PM CET
UPDATE AD_Field SET MandatoryLogic='@IsOverrideCurrencyRate@=Y',Updated=TO_TIMESTAMP('2024-02-13 12:28:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205669
;
-- Feb 13, 2024, 12:28:15 PM CET
UPDATE AD_Field SET MandatoryLogic='@IsOverrideCurrencyRate@=Y',Updated=TO_TIMESTAMP('2024-02-13 12:28:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205670
;

View File

@ -248,9 +248,8 @@ public class CalloutPayment extends CalloutEngine
if (C_DocType_ID != 0)
{
dt = MDocType.get (ctx, C_DocType_ID);
Env
.setContext (ctx, WindowNo, "IsSOTrx", dt.isSOTrx () ? "Y"
: "N");
Env.setContext (ctx, WindowNo, "IsSOTrx", dt.isSOTrx () ? "Y" : "N");
mTab.setValue(MPayment.COLUMNNAME_IsReceipt, dt.isSOTrx () ? "Y" : "N");
}
// Invoice
if (C_Invoice_ID != 0)
@ -363,8 +362,6 @@ public class CalloutPayment extends CalloutEngine
else
{
mTab.setValue(colName, oldValue);
if (overrideCR)
mTab.fireDataStatusEEvent("Invalid", Msg.getElement(ctx, colName), true);
return "";
}
}
@ -390,8 +387,6 @@ public class CalloutPayment extends CalloutEngine
else
{
mTab.setValue(colName, oldValue);
if (overrideCR)
mTab.fireDataStatusEEvent("Invalid", Msg.getElement(ctx, colName), true);
return "";
}
}