Announcements
No record found.
[ExtensionOf(formStr(VendEditInvoice))] final class VendEditInvoice_AzimutBenetti_Extension { protected boolean canProceedWithInvoicePosting() { boolean ret = next canProceedWithInvoicePosting(); if (!this.validateIntentLetter()) { ret = false; } return ret; } //public void clicked() //{ // boolean proceed = this.validateIntentLetter(); // if (proceed) // { // super(); // } //} // A new method for your validation logic private boolean validateIntentLetter() { VendInvoiceInfoLine vendInvoiceInfoLine; // Ottieni la fattura corrente PurchTable purchTable; Amount totalAmount = vendInvoiceInfoLine.LineAmount; // Ottenere l'ID della lettera di intento dalla tabella di lookup IntentLetter_IT intentLetter; // Recuperare la lettera di intento associata all'ID select firstOnly intentLetter join purchTable where intentLetter.IntentLetterId == purchTable.IntentLetterId_IT; // Ottenere l'ID della lettera di intento Amount remainingAmount = intentLetter.remainAmountMST(); Info(strFmt('%1, %2', totalAmount, remainingAmount)); if (totalAmount >= remainingAmount) { DialogButton diagBut; str strMessage = "Importo da decurtare al saldo della lettera di intento maggiore dell’importo residuo. Proseguire?"; str strTitle = "Splafonamento"; diagBut = Box::yesNo( strMessage, DialogButton::No, strTitle ); if (diagBut == DialogButton::No) { info('Operazione annullata'); return false; } } return true; } }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 543 Most Valuable Professional
André Arnaud de Cal... 415 Super User 2026 Season 2
CU-1234529-002 188